/* =========================================================
   Sistema de Contratos — Design System Cupertino
   Tipografia SF/Inter, Material Icons Round, dark mode auto
   ========================================================= */

:root {
    --bg: #f2f2f7;
    --bg-elevated: #ffffff;
    --card: #ffffff;
    --text: #1c1c1e;
    --text2: #6e6e73;
    --text3: #b0b0b5;
    --blue: #007aff;
    --blue-hover: #0066d6;
    --green: #34c759;
    --orange: #ff9500;
    --red: #ff3b30;
    --purple: #af52de;
    --yellow: #ffcc00;
    --sep: rgba(60, 60, 67, 0.12);
    --sep-strong: rgba(60, 60, 67, 0.29);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.08), 0 12px 40px rgba(0, 0, 0, 0.08);
    --radius: 14px;
    --radius-lg: 18px;
    --radius-sm: 10px;
    --topbar-bg: rgba(242, 242, 247, 0.85);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #000000;
        --bg-elevated: #1c1c1e;
        --card: #1c1c1e;
        --text: #f2f2f7;
        --text2: #8e8e93;
        --text3: #48484a;
        --sep: rgba(84, 84, 88, 0.65);
        --sep-strong: rgba(120, 120, 128, 0.55);
        --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
        --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.5);
        --topbar-bg: rgba(0, 0, 0, 0.85);
    }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

code, kbd, samp,
.mono, .placa, .timestamp, .uuid {
    font-family: 'SF Mono', 'Fira Code', ui-monospace, Menlo, Consolas, monospace;
    font-feature-settings: "tnum" 1;
}

.material-icons-round {
    font-family: 'Material Icons Round';
    font-weight: normal;
    font-style: normal;
    display: inline-flex;
    vertical-align: middle;
    line-height: 1;
    text-transform: none;
    letter-spacing: normal;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

/* ========== TOP BAR (frosted glass) ========== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--topbar-bg);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--sep);
}
.header-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.header .logo img { height: 38px; width: auto; display: block; }
.header-right { display: flex; align-items: center; gap: 12px; }
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text2);
    font-weight: 500;
}
.user-info > span { display: inline-flex; align-items: center; gap: 6px; color: var(--text); }

/* ========== MAIN ========== */
.main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px 24px 64px;
}

/* ========== CARDS ========== */
.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid var(--sep);
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--sep);
}
.card-title {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.2px;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.card-body { color: var(--text); }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ========== STATS ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 22px 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--sep);
    border-left: 6px solid var(--blue);
    transition: transform .2s ease, box-shadow .2s ease;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-value {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.8px;
    line-height: 1.1;
    font-feature-settings: "tnum" 1;
}
.stat-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text2);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 6px;
}
.stat-value.blue   { color: var(--blue); }
.stat-value.green  { color: var(--green); }
.stat-value.purple { color: var(--purple); }
.stat-value.yellow { color: var(--orange); }
.stat-value.red    { color: var(--red); }
.stat-card:nth-child(1) { border-left-color: var(--blue); }
.stat-card:nth-child(2) { border-left-color: var(--green); }
.stat-card:nth-child(3) { border-left-color: var(--purple); }
.stat-card:nth-child(4) { border-left-color: var(--orange); }

/* ========== TABS ========== */
.tabs-container {
    background: var(--card);
    border-radius: var(--radius);
    padding: 8px;
    box-shadow: var(--shadow);
    border: 1px solid var(--sep);
    margin-bottom: 20px;
    overflow-x: auto;
}
.tabs { display: flex; gap: 4px; min-width: max-content; }
.tab {
    padding: 10px 18px;
    border: none;
    background: transparent;
    color: var(--text2);
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background .2s, color .2s;
    white-space: nowrap;
    font-family: inherit;
}
.tab:hover { color: var(--text); background: var(--sep); }
.tab.active { background: var(--blue); color: #fff; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ========== DASHBOARD GRID ========== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}
.quick-actions { display: flex; flex-direction: column; gap: 10px; }

/* ========== BOTÕES ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.1px;
    cursor: pointer;
    transition: background .15s ease, transform .1s ease, box-shadow .15s ease;
    text-decoration: none;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn:disabled, .btn.disabled { opacity: .5; cursor: default; pointer-events: none; }
.btn .material-icons-round { font-size: 18px; }

.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); }

.btn-secondary { background: var(--sep); color: var(--text); }
.btn-secondary:hover { background: var(--sep-strong); }

.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { filter: brightness(0.95); }

.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { filter: brightness(0.95); }

.btn-info { background: var(--purple); color: #fff; }
.btn-info:hover { filter: brightness(0.95); }

.btn-warning { background: var(--orange); color: #fff; }

.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 10px; }
.btn-sm .material-icons-round { font-size: 16px; }
.btn-lg { padding: 16px 24px; font-size: 17px; }
.btn-block { width: 100%; }

/* ========== INPUTS / FORMS ========== */
.form-grid { display: flex; flex-direction: column; gap: 20px; }
.form-section {
    padding: 20px;
    background: var(--bg);
    border-radius: var(--radius);
    border: 1px solid var(--sep);
}
.form-section h3,
.form-section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text2);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 14px;
}
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}
.form-row:last-child { margin-bottom: 0; }
.form-group { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.form-group.flex-2 { grid-column: span 2; }

.form-group label,
.field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text2);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.form-control,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="tel"],
input[type="url"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--sep);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 15px;
    transition: border-color .15s, box-shadow .15s, background .15s;
    -webkit-appearance: none;
    appearance: none;
}
.form-control:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
    background: var(--card);
}
.form-control::placeholder,
input::placeholder,
textarea::placeholder { color: var(--text3); }

textarea { min-height: 90px; resize: vertical; line-height: 1.5; }
.form-hint { font-size: 12px; color: var(--text2); margin-top: 4px; }
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--sep);
}
.checkbox-group, .checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text);
}
.checkbox-label input[type="checkbox"],
.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--blue);
    cursor: pointer;
}

/* ========== LOGIN ========== */
.login-page {
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.login-wrapper { width: 100%; max-width: 420px; }
.login-card {
    padding: 36px 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    text-align: center;
}
.login-logo { margin-bottom: 18px; }
.login-logo img { max-width: 220px; height: auto; }
.login-title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.6px;
    color: var(--text);
    margin-bottom: 6px;
}
.login-subtitle {
    color: var(--text2);
    font-size: 15px;
    margin-bottom: 26px;
}
.login-card form { text-align: left; display: flex; flex-direction: column; gap: 16px; }
.login-card .btn-block { margin-top: 8px; }
.login-footer {
    margin-top: 24px;
    font-size: 12px;
    color: var(--text2);
    text-align: center;
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field-input {
    position: relative;
    display: flex;
    align-items: center;
}
.field-icon {
    position: absolute;
    left: 14px;
    color: var(--text2);
    font-size: 20px;
    pointer-events: none;
}
.field-input input {
    padding-left: 44px;
}

/* ========== STATUS BAR / BADGES ========== */
.status-bar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    width: 100%;
    box-sizing: border-box;
}
.status-bar .material-icons-round { font-size: 18px; }
.status-success { background: rgba(52, 199, 89, 0.12); color: var(--green); }
.status-error   { background: rgba(255, 59, 48, 0.12); color: var(--red); }
.status-warning { background: rgba(255, 149, 0, 0.12); color: var(--orange); }
.status-info    { background: rgba(0, 122, 255, 0.12); color: var(--blue); }

.login-error {
    background: rgba(255, 59, 48, 0.12);
    color: var(--red);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 14px;
    display: none;
}
.login-error.show { display: block; }

.status-badge,
.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}
.status-rascunho   { background: rgba(142, 142, 147, 0.18); color: var(--text2); }
.status-vigente    { background: rgba(52, 199, 89, 0.15);  color: var(--green); }
.status-aguardando { background: rgba(255, 149, 0, 0.15);  color: var(--orange); }
.status-cancelado  { background: rgba(255, 59, 48, 0.15);  color: var(--red); }
.status-encerrado  { background: rgba(175, 82, 222, 0.15); color: var(--purple); }

.role-admin { background: rgba(0, 122, 255, 0.15); color: var(--blue); }
.role-user  { background: rgba(142, 142, 147, 0.18); color: var(--text2); }

.service-badge,
.services-badges span {
    display: inline-block;
    padding: 3px 9px;
    background: rgba(0, 122, 255, 0.12);
    color: var(--blue);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    margin: 2px;
}

/* ========== LISTAS ========== */
.client-list,
.contract-list,
.plan-list,
.users-list,
.recent-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.client-item,
.contract-item,
.user-item,
.recent-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--bg);
    border: 1px solid var(--sep);
    border-radius: var(--radius);
    transition: transform .15s ease, box-shadow .15s ease;
}
.client-item:hover,
.contract-item:hover,
.user-item:hover,
.recent-item:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}
.client-avatar,
.user-avatar,
.recent-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 122, 255, 0.12);
    color: var(--blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}
.client-info,
.contract-info,
.recent-info,
.plan-info { flex: 1; min-width: 0; }
.client-details,
.contract-details,
.user-details,
.recent-details {
    font-size: 13px;
    color: var(--text2);
    margin-top: 2px;
}
.client-actions,
.contract-actions,
.user-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.contract-header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.contract-number { font-weight: 700; font-family: 'SF Mono','Fira Code',monospace; color: var(--text); }
.contract-client { font-size: 14px; color: var(--text); }
.contract-value {
    font-weight: 700;
    color: var(--green);
    font-feature-settings: "tnum" 1;
}

.user-username, .user-login {
    font-family: 'SF Mono','Fira Code',monospace;
    font-size: 13px;
    color: var(--text2);
}
.user-meta { font-size: 12px; color: var(--text2); }

/* ========== PLANOS ========== */
.plan-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.plan-card {
    background: var(--bg);
    border: 1px solid var(--sep);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: transform .15s ease, box-shadow .15s ease;
}
.plan-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.plan-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.plan-name { font-weight: 700; font-size: 16px; color: var(--text); }
.plan-price { display: flex; align-items: baseline; gap: 4px; }
.plan-price-value {
    font-size: 26px; font-weight: 700; color: var(--blue);
    font-feature-settings: "tnum" 1; letter-spacing: -0.5px;
}
.plan-price-period { font-size: 13px; color: var(--text2); font-weight: 500; }
.plan-features { display: flex; flex-direction: column; gap: 6px; }
.plan-feature {
    font-size: 13px;
    color: var(--text3);
    display: flex;
    align-items: center;
    gap: 6px;
}
.plan-feature::before { content: '○'; }
.plan-feature.active { color: var(--text); }
.plan-feature.active::before { content: '●'; color: var(--green); }
.plan-footer {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    padding-top: 12px;
    border-top: 1px solid var(--sep);
}

/* ========== EMPTY / LOADING ========== */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text2);
}
.empty-icon { font-size: 48px; margin-bottom: 12px; opacity: .55; }
.empty-text { font-size: 14px; }

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 122, 255, 0.2);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
.btn .spinner { border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ========== TABELAS ========== */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
}
th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--sep);
    font-size: 14px;
}
th {
    background: var(--bg);
    color: var(--text2);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
tr:last-child td { border-bottom: none; }

/* ========== MODAL ==========
   Estrutura: <div class="modal-overlay"><div class="modal">...</div></div>
   modal-overlay = container raiz fullscreen (oculto por padrão)
   modal         = caixa branca centralizada
*/
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.45);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}
.modal-overlay.active { display: flex; }
.modal {
    position: relative;
    background: var(--card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.modal-overlay.modal-sm .modal { max-width: 420px; }
.modal-overlay.modal-lg .modal { max-width: 800px; }
.modal-overlay.modal-xl .modal { max-width: 1080px; }

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--sep);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.modal-title { font-size: 17px; font-weight: 600; color: var(--text); }
.modal-close {
    background: var(--sep);
    color: var(--text);
    border: none;
    width: 30px; height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.modal-close:hover { background: var(--sep-strong); }
.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--sep);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ========== TOAST ========== */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.toast {
    pointer-events: auto;
    min-width: 280px;
    max-width: 380px;
    background: var(--card);
    border: 1px solid var(--sep);
    border-radius: var(--radius);
    padding: 14px 16px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: opacity .3s ease, transform .3s ease;
    border-left: 4px solid var(--blue);
}
.toast.success { border-left-color: var(--green); }
.toast.error   { border-left-color: var(--red); }
.toast.warning { border-left-color: var(--orange); }
.toast.info    { border-left-color: var(--blue); }
.toast-icon {
    font-size: 18px;
    font-weight: 700;
    width: 24px; height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.toast.success .toast-icon { background: rgba(52,199,89,.15); color: var(--green); }
.toast.error   .toast-icon { background: rgba(255,59,48,.15); color: var(--red); }
.toast.warning .toast-icon { background: rgba(255,149,0,.15); color: var(--orange); }
.toast.info    .toast-icon { background: rgba(0,122,255,.15); color: var(--blue); }
.toast-content { flex: 1; min-width: 0; }
.toast-title { font-size: 14px; font-weight: 600; color: var(--text); }
.toast-message { font-size: 13px; color: var(--text2); margin-top: 2px; }

/* ========== CONTRACT VIEW ========== */
.contract-view { display: flex; flex-direction: column; gap: 18px; }
.contract-view-section {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 18px;
    border: 1px solid var(--sep);
}
.contract-view-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 12px;
}
.contract-view-item { display: flex; flex-direction: column; gap: 4px; }
.contract-view-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text2);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.contract-view-value { font-size: 14px; color: var(--text); font-weight: 500; }

.veiculo-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) 40px;
    gap: 10px;
    align-items: end;
    padding: 14px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--sep);
    margin-bottom: 10px;
}

/* ========== SEARCH FIELD ========== */
.search-field {
    position: relative;
    background: var(--card);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
}
.search-field .material-icons-round {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text2);
    font-size: 20px;
    pointer-events: none;
}
.search-field input {
    padding-left: 38px;
    border: none;
    box-shadow: none;
    background: transparent;
}

/* ========== HELPERS ========== */
.text-center { text-align: center; }
.hidden { display: none !important; }
.mt-2 { margin-top: 16px; }
.mb-2 { margin-bottom: 16px; }

/* ========== RESPONSIVO ========== */
@media (max-width: 960px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .header-content { padding: 12px 16px; }
    .main { padding: 20px 16px 48px; }
}
@media (max-width: 640px) {
    .stat-value { font-size: 24px; }
    .card { padding: 18px; }
    .form-actions { flex-direction: column; }
    .form-actions .btn { width: 100%; }
    .toast-container { left: 16px; right: 16px; top: 16px; }
    .toast { max-width: none; }
    .user-info > span { display: none; }
    .header-content { gap: 8px; }
    .login-card { padding: 28px 22px; }
    .login-title { font-size: 24px; }
    .form-group.flex-2 { grid-column: span 1; }
}
