/* ══════════════════════════════════════════════
           CSS TOKENS — Paleta Preto & Dourado
           ══════════════════════════════════════════════ */
        :root {
            --gold:        #C28D44;
            --gold-light:  #d4a55e;
            --gold-dark:   #9a6e2f;
            --gold-glow:   rgba(194, 141, 68, 0.35);
            --gold-subtle: rgba(194, 141, 68, 0.08);

            --black:      #111111;
            --black-soft: #1a1a1a;

            --success: #22c55e;
            --warning: #eab308;
            --danger:  #ef4444;

            /* Light */
            --bg-page:     #f5f3ef;
            --bg-card:     #ffffff;
            --bg-input:    #faf9f7;
            --border:      #e5e0d8;
            --border-hover:#ccc5b9;
            --text:        #1a1a1a;
            --text-muted:  #78716c;
            --header-bg:   #111111;

            --shadow-card:        0 8px 40px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.06);
            --shadow-input-focus: 0 0 0 3px var(--gold-glow);
            --shadow-btn:         0 4px 16px rgba(194,141,68,.25);
            --shadow-btn-hover:   0 8px 28px rgba(194,141,68,.35);
        }

        [data-theme="dark"] {
            --bg-page:     #0c0c0c;
            --bg-card:     #161616;
            --bg-input:    #1e1e1e;
            --border:      #2a2a2a;
            --border-hover:#3a3a3a;
            --text:        #f0ece4;
            --text-muted:  #8a8478;
            --header-bg:   #0a0a0a;

            --shadow-card:        0 8px 40px rgba(0,0,0,.5), 0 0 0 1px rgba(194,141,68,.06);
            --shadow-input-focus: 0 0 0 3px rgba(194,141,68,.2);
            --shadow-btn:         0 4px 20px rgba(194,141,68,.2);
            --shadow-btn-hover:   0 8px 32px rgba(194,141,68,.3);
        }

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

        html {
            scroll-behavior: smooth;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        body {
            font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
            background: var(--bg-page);
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 24px 16px;
            position: relative;
            overflow-x: hidden;
            transition: background 0.4s ease, color 0.4s ease;
        }

        /* Ambient glow background */
        body::before {
            content: '';
            position: fixed;
            inset: 0;
            background:
                radial-gradient(circle at 15% 20%, var(--gold-subtle) 0%, transparent 50%),
                radial-gradient(circle at 85% 80%, rgba(194,141,68,.04) 0%, transparent 50%);
            pointer-events: none;
            z-index: 0;
        }

        [data-theme="dark"] body::before {
            background:
                radial-gradient(circle at 15% 20%, rgba(194,141,68,.06) 0%, transparent 50%),
                radial-gradient(circle at 85% 80%, rgba(194,141,68,.03) 0%, transparent 50%);
        }

        /* ── Theme Toggle ── */
        .theme-toggle {
            position: fixed;
            top: 20px;
            right: 20px;
            z-index: 1000;
        }

        .theme-toggle-btn {
            background: var(--bg-card);
            border: 1.5px solid var(--border);
            width: 48px;
            height: 48px;
            border-radius: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all .25s ease;
            box-shadow: 0 2px 8px rgba(0,0,0,.06);
        }

        .theme-toggle-btn:hover {
            border-color: var(--gold);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0,0,0,.1);
        }

        .theme-toggle-btn:active { transform: scale(.96); }

        .theme-toggle-btn i {
            font-size: 20px;
            color: var(--gold);
            transition: color .3s ease;
        }

        /* ── Auth Container (shared across pages) ── */
        .auth-container {
            width: 100%;
            max-width: 440px;
            position: relative;
            z-index: 10;
            animation: fadeUp .5s cubic-bezier(.22,1,.36,1);
        }

        @keyframes fadeUp {
            from { opacity:0; transform:translateY(16px); }
            to   { opacity:1; transform:translateY(0); }
        }

        /* ── Card ── */
        .auth-card {
            background: var(--bg-card);
            border-radius: 24px;
            box-shadow: var(--shadow-card);
            overflow: hidden;
            border: 1px solid var(--border);
            transition: all .4s ease;
        }

        /* ── Card Header ── */
        .auth-header {
            background: var(--header-bg);
            padding: 40px 32px 32px;
            text-align: center;
            position: relative;
        }

        /* Gold gradient rule at bottom of header */
        .auth-header::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(90deg, transparent, var(--gold), transparent);
        }

        .auth-header-title {
            color: #ffffff;
            font-size: 26px;
            font-weight: 700;
            margin: 0 0 6px;
            letter-spacing: -.3px;
        }

        .auth-header-subtitle {
            color: rgba(255,255,255,.65);
            font-size: 14px;
            margin: 0;
            font-weight: 400;
            line-height: 1.6;
        }

        /* Logo (login page) */
        .auth-logo {
            max-width: 170px;
            height: auto;
            display: block;
            margin: 0 auto 18px;
            filter: drop-shadow(0 2px 8px rgba(0,0,0,.3));
        }

        /* Icon circle (forgot/reset pages) */
        .auth-icon-circle {
            width: 88px;
            height: 88px;
            margin: 0 auto 20px;
            background: rgba(194,141,68,.15);
            border: 2px solid rgba(194,141,68,.3);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .auth-icon-circle i {
            font-size: 40px;
            color: var(--gold);
        }

        /* ── Card Body ── */
        .auth-body { padding: 32px 32px 36px; }

        /* ── Form Elements ── */
        .form-group { margin-bottom: 22px; }

        .form-label {
            font-weight: 600;
            color: var(--text);
            margin-bottom: 8px;
            font-size: 13px;
            display: flex;
            align-items: center;
            gap: 6px;
            text-transform: uppercase;
            letter-spacing: .5px;
        }

        .form-label i { color: var(--gold); font-size: 15px; }

        .form-control {
            background: var(--bg-input);
            border: 1.5px solid var(--border);
            color: var(--text);
            padding: 14px 16px;
            border-radius: 12px;
            font-size: 15px;
            font-family: inherit;
            transition: all .25s ease;
            width: 100%;
            outline: none;
        }

        .form-control:hover  { border-color: var(--border-hover); }

        .form-control:focus {
            background: var(--bg-input);
            border-color: var(--gold);
            color: var(--text);
            box-shadow: var(--shadow-input-focus);
        }

        .form-control::placeholder { color: var(--text-muted); opacity: .5; }

        .form-control.is-invalid,
        .was-validated .form-control:invalid {
            border-color: var(--danger);
            background-image: none;
        }

        .form-control.is-invalid:focus {
            box-shadow: 0 0 0 3px rgba(239,68,68,.15);
        }

        /* Password wrapper */
        .password-wrapper { position: relative; }
        .password-wrapper .form-control { padding-right: 48px; }

        .password-toggle {
            position: absolute;
            right: 12px;
            top: 50%;
            transform: translateY(-50%);
            background: transparent;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            font-size: 18px;
            transition: all .25s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
            width: 34px;
            height: 34px;
        }

        .password-toggle:hover { color: var(--gold); background: var(--gold-subtle); }

        /* Primary button */
        .btn-auth {
            background: var(--gold);
            border: none;
            color: var(--black);
            padding: 15px 24px;
            font-size: 14px;
            font-weight: 700;
            font-family: inherit;
            border-radius: 12px;
            width: 100%;
            transition: all .3s ease;
            text-transform: uppercase;
            letter-spacing: 1.5px;
            box-shadow: var(--shadow-btn);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
        }

        .btn-auth:hover:not(:disabled) {
            background: var(--gold-light);
            transform: translateY(-2px);
            box-shadow: var(--shadow-btn-hover);
        }

        .btn-auth:active:not(:disabled) { transform: translateY(0); box-shadow: var(--shadow-btn); }
        .btn-auth:disabled { opacity: .6; cursor: not-allowed; }
        .btn-auth i { font-size: 17px; }

        /* Nav link (forgot / back to login) */
        .auth-nav-link {
            text-align: center;
            margin-top: 22px;
        }

        .auth-nav-link a {
            color: var(--text-muted);
            text-decoration: none;
            font-size: 13px;
            font-weight: 500;
            transition: all .25s ease;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 6px 10px;
            border-radius: 8px;
        }

        .auth-nav-link a:hover { color: var(--gold); background: var(--gold-subtle); }

        /* Info box (used in forgot/reset pages) */
        .info-box {
            background: var(--gold-subtle);
            border: 1px solid rgba(194,141,68,.2);
            border-radius: 12px;
            padding: 16px 18px;
            margin-bottom: 24px;
            display: flex;
            gap: 12px;
            align-items: flex-start;
        }

        [data-theme="dark"] .info-box {
            background: rgba(194,141,68,.07);
            border-color: rgba(194,141,68,.15);
        }

        .info-box > i {
            font-size: 20px;
            color: var(--gold);
            flex-shrink: 0;
            margin-top: 1px;
        }

        .info-box-title {
            font-weight: 600;
            font-size: 13px;
            color: var(--text);
            margin: 0 0 4px;
        }

        .info-box-text {
            font-size: 13px;
            color: var(--text-muted);
            margin: 0;
            line-height: 1.6;
        }

        /* Alerts */
        .alert {
            border-radius: 12px;
            border: none;
            padding: 14px 16px;
            margin-bottom: 22px;
            font-size: 13px;
            display: flex;
            align-items: center;
            gap: 10px;
            position: relative;
            overflow: hidden;
            font-weight: 500;
        }

        .alert::before {
            content: '';
            position: absolute;
            left: 0; top: 0; bottom: 0;
            width: 3px;
        }

        .alert i { font-size: 18px; flex-shrink: 0; }
        .alert-content { flex: 1; }

        .alert-close {
            background: transparent; border: none;
            color: inherit; opacity: .5; cursor: pointer;
            font-size: 18px; line-height: 1;
            transition: opacity .25s ease;
            border-radius: 6px;
            width: 26px; height: 26px;
            display: flex; align-items: center; justify-content: center;
            flex-shrink: 0;
        }

        .alert-close:hover { opacity: 1; }

        .alert-danger  { background: rgba(239,68,68,.08);  color: var(--danger); }
        .alert-danger::before  { background: var(--danger); }
        .alert-success { background: rgba(34,197,94,.08);  color: var(--success); }
        .alert-success::before { background: var(--success); }
        .alert-info    { background: var(--gold-subtle);   color: var(--gold); }
        .alert-info::before    { background: var(--gold); }
        .alert-warning { background: rgba(234,179,8,.08);  color: var(--warning); }
        .alert-warning::before { background: var(--warning); }

        [data-theme="dark"] .alert-danger  { background: rgba(239,68,68,.12); }
        [data-theme="dark"] .alert-success { background: rgba(34,197,94,.10); }
        [data-theme="dark"] .alert-info    { background: rgba(194,141,68,.10); }
        [data-theme="dark"] .alert-warning { background: rgba(234,179,8,.10); }

        .invalid-feedback {
            font-size: 12px;
            margin-top: 6px;
            color: var(--danger);
            display: flex;
            align-items: center;
            gap: 5px;
            font-weight: 500;
        }

        .invalid-feedback i { font-size: 13px; }

        /* Spinner */
        .spinner-border-sm { width: 16px; height: 16px; border-width: 2px; color: var(--black); }

        /* Loading Overlay */
        .loading-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,.6);
            backdrop-filter: blur(4px);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 9999;
        }

        .loading-overlay.active { display: flex; }

        .loading-spinner {
            width: 48px;
            height: 48px;
            border: 3px solid rgba(194,141,68,.2);
            border-top-color: var(--gold);
            border-radius: 50%;
            animation: spin .7s linear infinite;
        }

        @keyframes spin { to { transform: rotate(360deg); } }

        /* ══════════════════════════════════
           Toastr — preto & dourado
           ══════════════════════════════════ */
        #toast-container { pointer-events: none; }
        #toast-container > * { pointer-events: auto; }

        #toast-container > .toast {
            background-color: var(--bg-card);
            box-shadow: 0 8px 32px rgba(0,0,0,.15), 0 0 0 1px var(--border);
            border-radius: 14px;
            padding: 16px 18px;
            margin-bottom: 14px;
            width: 360px;
            max-width: calc(100vw - 32px);
            border: none;
            position: relative;
            overflow: hidden;
        }

        #toast-container > .toast-success { border-left: 4px solid var(--success); }
        #toast-container > .toast-error   { border-left: 4px solid var(--danger); }
        #toast-container > .toast-info    { border-left: 4px solid var(--gold); }
        #toast-container > .toast-warning { border-left: 4px solid var(--warning); }

        #toast-container > .toast-info,
        #toast-container > .toast-warning,
        #toast-container > .toast-success,
        #toast-container > .toast-error { background-image: none !important; }

        #toast-container > .toast .toast-title {
            font-weight: 700;
            font-size: 14px;
            margin-bottom: 4px;
            display: flex;
            align-items: center;
            gap: 8px;
            line-height: 1.4;
        }

        #toast-container > .toast-success .toast-title { color: var(--success); }
        #toast-container > .toast-error .toast-title   { color: var(--danger); }
        #toast-container > .toast-info .toast-title     { color: var(--gold); }
        #toast-container > .toast-warning .toast-title  { color: var(--warning); }

        #toast-container > .toast .toast-title::before {
            font-family: 'bootstrap-icons';
            font-size: 20px;
            line-height: 1;
            flex-shrink: 0;
        }

        #toast-container > .toast-success .toast-title::before { content: '\f26b'; color: var(--success); }
        #toast-container > .toast-error .toast-title::before   { content: '\f33a'; color: var(--danger); }
        #toast-container > .toast-info .toast-title::before     { content: '\f431'; color: var(--gold); }
        #toast-container > .toast-warning .toast-title::before  { content: '\f33a'; color: var(--warning); }

        #toast-container > .toast .toast-message {
            font-weight: 500;
            font-size: 13px;
            line-height: 1.5;
            color: var(--text-muted);
            padding-left: 28px;
        }

        #toast-container > .toast .toast-close-button {
            position: absolute;
            right: 10px; top: 10px;
            width: 26px; height: 26px;
            display: flex; align-items: center; justify-content: center;
            border-radius: 6px;
            background: rgba(0,0,0,.04);
            color: var(--text-muted);
            opacity: .6;
            font-size: 18px;
            font-weight: 700;
            line-height: 1;
            transition: all .2s ease;
        }

        #toast-container > .toast .toast-close-button:hover {
            opacity: 1;
            background: rgba(0,0,0,.08);
        }

        [data-theme="dark"] #toast-container > .toast .toast-close-button {
            background: rgba(255,255,255,.06);
        }

        #toast-container > .toast .toast-progress { height: 3px; opacity: .7; }
        #toast-container > .toast-success .toast-progress { background: var(--success); }
        #toast-container > .toast-error .toast-progress   { background: var(--danger); }
        #toast-container > .toast-info .toast-progress     { background: var(--gold); }
        #toast-container > .toast-warning .toast-progress  { background: var(--warning); }

        /* ══════════════════
           Responsive
           ══════════════════ */
        @media (max-width: 768px) {
            .theme-toggle { top: 16px; right: 16px; }
            .theme-toggle-btn { width: 44px; height: 44px; border-radius: 12px; }
            .theme-toggle-btn i { font-size: 18px; }
            .auth-card { border-radius: 20px; }
            .auth-header { padding: 32px 24px 28px; }
            .auth-logo { max-width: 150px; }
            .auth-header-title { font-size: 24px; }
            .auth-header-subtitle { font-size: 13px; }
            .auth-body { padding: 28px 24px 32px; }
            .form-group { margin-bottom: 18px; }
            .btn-auth { padding: 14px 20px; font-size: 13px; }
            .auth-icon-circle { width: 76px; height: 76px; }
            .auth-icon-circle i { font-size: 34px; }
        }

        @media (max-width: 425px) {
            body { padding: 16px 12px; }
            .auth-container { max-width: 100%; }
            .auth-card { border-radius: 18px; }
            .auth-header { padding: 28px 20px 24px; }
            .auth-logo { max-width: 130px; }
            .auth-header-title { font-size: 22px; }
            .auth-header-subtitle { font-size: 12px; }
            .auth-body { padding: 24px 20px 28px; }
            .form-label { font-size: 12px; }
            .form-control { padding: 13px 14px; font-size: 14px; border-radius: 10px; }
            .form-group { margin-bottom: 16px; }
            .btn-auth { padding: 13px 16px; font-size: 12px; border-radius: 10px; letter-spacing: 1px; }
            .auth-nav-link a { font-size: 12px; }
            .alert { padding: 12px 14px; font-size: 12px; }
            .auth-icon-circle { width: 68px; height: 68px; }
            .auth-icon-circle i { font-size: 30px; }
            .info-box { padding: 13px 15px; margin-bottom: 18px; }
        }

        @media (max-width: 375px) {
            body { padding: 12px 10px; }
            .theme-toggle { top: 12px; right: 12px; }
            .theme-toggle-btn { width: 40px; height: 40px; border-radius: 10px; }
            .theme-toggle-btn i { font-size: 16px; }
            .auth-card { border-radius: 16px; }
            .auth-header { padding: 24px 16px 20px; }
            .auth-logo { max-width: 120px; }
            .auth-header-title { font-size: 20px; }
            .auth-body { padding: 20px 16px 24px; }
            .form-label { font-size: 11px; }
            .form-control { padding: 12px 13px; font-size: 13px; }
            .password-toggle { right: 10px; width: 30px; height: 30px; font-size: 16px; }
            .btn-auth { padding: 12px 14px; font-size: 11px; border-radius: 10px; }
            .auth-nav-link a { font-size: 11px; }
            .alert { padding: 10px 12px; font-size: 11px; }
            .alert i { font-size: 16px; }
        }

        @media (prefers-reduced-motion: reduce) {
            *, *::before, *::after {
                animation-duration: .01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: .01ms !important;
            }
        }