/* ============================================================
   TIFFANY GRAY PLATFORM — BRAWT Design System v1.0

   Font:    Poppins
   Teal:    #00b8b8
   Coral:   #e07a5f
   Cloud:   #f4f6fc
   ============================================================ */

/* ── CSS Variables (BRAWT Tokens) ──────────────────────────── */
:root {
    /* Primary */
    --teal: #00b8b8;
    --teal-dark: #009999;
    --teal-900: #007a7a;
    --teal-light: rgba(0, 184, 184, 0.1);

    /* Secondary */
    --coral: #e07a5f;
    --coral-dark: #c45a3a;
    --coral-light: rgba(224, 122, 95, 0.1);

    /* Neutrals */
    --charcoal: #2d3636;
    --slate-dark: #404d4d;
    --slate-mid: #6a7e87;
    --slate-light: #8fa3ad;
    --border: #d1d9e0;
    --cloud: #f4f6fc;
    --white: #ffffff;

    /* States */
    --success: #22c55e;
    --error: #ef4444;
    --error-light: rgba(239, 68, 68, 0.1);
    --warning: #f59e0b;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Base ──────────────────────────────────────────────────── */
body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    color: var(--slate-dark);
    background: var(--cloud);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--teal-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--teal-900);
}

/* ── Auth Layout ───────────────────────────────────────────── */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-logo {
    margin-bottom: 24px;
    text-align: center;
    width: 100%;
    max-width: 440px;
}

.auth-logo img {
    width: 100%;
    height: auto;
}

/* ── Auth Card ─────────────────────────────────────────────── */
.auth-card {
    background: var(--white);
    border: 1px solid var(--border);
    padding: 40px 36px;
    width: 100%;
    max-width: 440px;
    position: relative;
    box-shadow: var(--shadow-sm);
}

/* BRAWT signature: L-shaped teal corner accent (top-left) */
.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 4px;
    background: var(--teal);
}

.auth-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 40px;
    background: var(--teal);
}

.auth-card h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 8px;
    line-height: 1.3;
}

.auth-card .subtitle {
    font-size: 14px;
    color: var(--slate-mid);
    margin-bottom: 28px;
    line-height: 1.5;
}

/* ── Eyebrow line — kept for optional use ──────────────────── */
.eyebrow {
    display: none;
}

/* ── Forms ──────────────────────────────────────────────────── */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--slate-dark);
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: var(--slate-dark);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 4px;
    transition: all 0.2s ease;
    outline: none;
}

.form-group input::placeholder {
    color: var(--slate-mid);
}

.form-group input:hover {
    border-color: var(--slate-mid);
}

.form-group input:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px var(--teal-light);
}

.form-group input.error {
    border-color: var(--error);
}

.form-group input.error:focus {
    box-shadow: 0 0 0 3px var(--error-light);
}

/* OTP Code Input */
.form-group .code-input {
    font-size: 32px;
    font-weight: 600;
    letter-spacing: 12px;
    text-align: center;
    padding: 16px;
    color: var(--charcoal);
}

/* ── Field Errors ──────────────────────────────────────────── */
.field-error {
    display: none;
    font-size: 12px;
    color: var(--error);
    margin-top: 6px;
    line-height: 1.4;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 24px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.btn:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 2px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--teal);
    color: var(--white);
    border-color: var(--teal);
}

.btn-primary:hover:not(:disabled) {
    background: var(--teal-dark);
    border-color: var(--teal-dark);
}

.btn-primary:active:not(:disabled) {
    background: var(--teal-900);
    border-color: var(--teal-900);
}

.btn-secondary {
    background: transparent;
    color: var(--teal);
    border-color: var(--border);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--teal-light);
    border-color: var(--teal);
}

.btn-text {
    background: none;
    border: none;
    color: var(--teal-dark);
    padding: 8px;
    font-size: 13px;
    width: auto;
}

.btn-text:hover:not(:disabled) {
    color: var(--teal-900);
}

/* ── Divider ───────────────────────────────────────────────── */
.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 24px 0;
}

/* ── Auth Footer ───────────────────────────────────────────── */
.auth-footer {
    text-align: center;
    font-size: 13px;
    color: var(--slate-mid);
    margin-top: 12px;
}

.auth-footer a {
    color: var(--teal-dark);
    font-weight: 500;
}

/* ── Back Link ─────────────────────────────────────────────── */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--slate-mid);
    margin-bottom: 20px;
    cursor: pointer;
    transition: color 0.2s ease;
    background: none;
    border: none;
    font-family: 'Poppins', sans-serif;
    padding: 0;
}

.back-link:hover {
    color: var(--teal-dark);
}

.back-link svg {
    width: 16px;
    height: 16px;
}

/* ── No Account State ─────────────────────────────────────── */
.no-account-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--cloud);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

/* ── Success State ─────────────────────────────────────────── */
.success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.success-icon svg {
    width: 32px;
    height: 32px;
    color: var(--success);
}

.success-text {
    text-align: center;
}

.success-text h1 {
    text-align: center;
}

.success-text p {
    text-align: center;
    color: var(--slate-mid);
    font-size: 14px;
}

/* ── Email Display ─────────────────────────────────────────── */
.email-display {
    font-size: 14px;
    font-weight: 500;
    color: var(--charcoal);
    background: var(--cloud);
    padding: 10px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
}

/* ── Resend Section ────────────────────────────────────────── */
.resend-section {
    text-align: center;
    margin-top: 16px;
}

.resend-section .btn-text {
    font-size: 13px;
}

/* ── Page Footer ───────────────────────────────────────────── */
.page-footer {
    margin-top: 32px;
    text-align: center;
    font-size: 15px;
    color: var(--slate-mid);
}

.page-footer a {
    color: var(--slate-dark);
    font-weight: 500;
}

/* ── Hidden ────────────────────────────────────────────────── */
.hidden {
    display: none !important;
}

/* ── Animation ─────────────────────────────────────────────── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-card {
    animation: fadeIn 0.3s ease;
}

/* ── Form Input iOS Zoom Prevention ───────────────────────── */
.form-group input,
.form-group select,
.form-group textarea {
    font-size: 16px; /* Prevents iOS Safari zoom on focus */
}

/* ── Touch Target Minimums ────────────────────────────────── */
.btn,
.btn-primary,
.btn-secondary,
.btn-text,
.back-link {
    min-height: 44px;
}

/* ── Responsive: Auth pages ───────────────────────────────── */
@media (max-width: 480px) {
    .auth-page {
        padding: 24px 16px;
        justify-content: flex-start;
        padding-top: 48px;
    }

    .auth-logo img {
        width: 100%;
        height: auto;
    }

    .auth-card {
        padding: 28px 24px;
    }

    .auth-card h1 {
        font-size: 20px;
    }

    .form-group .code-input {
        font-size: 24px;
        letter-spacing: 8px;
    }
}

/* ============================================================
   DASHBOARD & LAYOUT (for future pages)
   ============================================================ */

.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--charcoal);
    color: var(--white);
    padding: 24px 0;
    flex-shrink: 0;
}

.main {
    flex: 1;
    padding: 32px;
    background: var(--cloud);
    min-width: 0; /* Prevent flex overflow */
}

.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    border-radius: 4px;
}

.badge-teal { background: var(--teal-light); color: var(--teal-dark); }
.badge-coral { background: var(--coral-light); color: var(--coral-dark); }
.badge-success { background: rgba(34, 197, 94, 0.1); color: #16a34a; }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: #d97706; }
.badge-error { background: var(--error-light); color: var(--error); }

/* ============================================================
   SHARED RESPONSIVE — Platform Pages
   ============================================================ */

/* ── Visibility Utilities ─────────────────────────────────── */
@media (max-width: 640px) {
    .hide-mobile { display: none !important; }
}
@media (min-width: 641px) {
    .show-mobile-only { display: none !important; }
}
@media (min-width: 1025px) {
    .hide-desktop { display: none !important; }
}
@media (max-width: 1024px) {
    .show-desktop-only { display: none !important; }
}

/* ── Platform Header — Responsive ─────────────────────────── */
@media (max-width: 768px) {
    /* Shared header patterns used across platform pages */
    .dashboard-header,
    .admin-header,
    .account-header {
        padding: 0 16px;
        height: 56px;
    }
    .dashboard-header-nav,
    .admin-header-nav,
    .account-header-nav {
        font-size: 12px;
    }
    .dashboard-header-nav a,
    .admin-header-nav a,
    .account-header-nav a {
        margin: 0 4px;
    }
}

@media (max-width: 480px) {
    /* Stack header on very small screens */
    .dashboard-header,
    .admin-header {
        height: auto;
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 8px;
    }
    .dashboard-header-left,
    .admin-header-left {
        width: 100%;
        justify-content: space-between;
    }
    .dashboard-header-nav,
    .admin-header-nav {
        display: flex;
        gap: 4px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        width: 100%;
        padding-bottom: 4px;
    }
    .dashboard-header-right,
    .admin-header-right {
        width: 100%;
        justify-content: flex-end;
    }
}

/* ── Platform Content — Responsive ────────────────────────── */
@media (max-width: 768px) {
    .dashboard-content,
    .admin-content {
        padding: 20px 16px;
    }
}

@media (max-width: 480px) {
    .dashboard-content,
    .admin-content {
        padding: 16px 12px;
    }
}

/* ── Layout Sidebar — Responsive ──────────────────────────── */
@media (max-width: 900px) {
    .layout {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        padding: 12px 0;
    }
    .main {
        padding: 20px 16px;
    }
}

/* ── Print Styles ─────────────────────────────────────────── */
@media print {
    .dashboard-header,
    .admin-header,
    .account-header,
    .sidebar,
    .btn,
    .btn-sign-out,
    .no-print {
        display: none !important;
    }
    .main,
    .dashboard-content,
    .admin-content,
    .account-content {
        padding: 0;
        max-width: 100%;
    }
}
