﻿/* ─────────────────────────────────────────
   MailInsight — Enterprise UI Design System
   Font: IBM Plex Sans + IBM Plex Mono
   ───────────────────────────────────────── */

:root {
    --font-body: 'IBM Plex Sans', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
    /* Neutral palette */
    --gray-50: #F8F9FA;
    --gray-100: #F1F3F5;
    --gray-200: #E9ECEF;
    --gray-300: #DEE2E6;
    --gray-400: #CED4DA;
    --gray-500: #ADB5BD;
    --gray-600: #6C757D;
    --gray-700: #495057;
    --gray-800: #343A40;
    --gray-900: #212529;
    /* Blue brand */
    --blue-50: #EFF6FF;
    --blue-100: #DBEAFE;
    --blue-500: #3B82F6;
    --blue-600: #2563EB;
    --blue-700: #1D4ED8;
    --blue-900: #1E3A8A;
    /* Status */
    --red-50: #FFF5F5;
    --red-100: #FFE3E3;
    --red-500: #FA5252;
    --red-600: #E03131;
    --orange-50: #FFF4E6;
    --orange-500: #F76707;
    --orange-600: #E8590C;
    --green-50: #EBFBEE;
    --green-500: #40C057;
    --green-600: #2F9E44;
    --yellow-50: #FFF9DB;
    --yellow-500: #FAB005;
    /* Sidebar */
    --sidebar-bg: #0F172A;
    --sidebar-hover: #1E293B;
    --sidebar-active: #1E40AF;
    --sidebar-text: #94A3B8;
    --sidebar-active-text: #FFFFFF;
    --sidebar-width: 240px;
    /* Layout */
    --header-height: 56px;
    --content-bg: #F8F9FA;
    --surface: #FFFFFF;
    --border: #E9ECEF;
    --border-strong: #DEE2E6;
    /* Shadow */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.04);
    /* Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    /* Typography */
    --text-xs: 11px;
    --text-sm: 12.5px;
    --text-base: 14px;
    --text-md: 15px;
    --text-lg: 17px;
    --text-xl: 20px;
    --text-2xl: 24px;
    --text-3xl: 30px;
}

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

html, body {
    height: 100%;
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--gray-800);
    background: var(--content-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ─── APP SHELL ───────────────────────────────────── */

.app-shell {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ─── SIDEBAR ─────────────────────────────────────── */

.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    height: 100%;
    z-index: 100;
}

.sidebar-brand {
    height: var(--header-height);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sidebar-brand-icon {
    width: 28px;
    height: 28px;
    background: var(--blue-600);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .sidebar-brand-icon svg {
        width: 16px;
        height: 16px;
        fill: white;
    }

.sidebar-brand-name {
    font-size: var(--text-md);
    font-weight: 600;
    color: #FFFFFF;
    letter-spacing: -0.01em;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
}

.nav-section-label {
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #475569;
    padding: 10px 10px 6px;
    margin-top: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--sidebar-text);
    font-size: var(--text-sm);
    font-weight: 400;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
    text-decoration: none;
    position: relative;
}

    .nav-item:hover {
        background: var(--sidebar-hover);
        color: #CBD5E1;
    }

    .nav-item.active {
        background: var(--sidebar-active);
        color: var(--sidebar-active-text);
        font-weight: 500;
    }

    .nav-item svg {
        width: 16px;
        height: 16px;
        opacity: 0.75;
        flex-shrink: 0;
    }

    .nav-item.active svg {
        opacity: 1;
    }

.nav-badge {
    margin-left: auto;
    background: var(--red-500);
    color: white;
    font-size: 10px;
    font-weight: 600;
    font-family: var(--font-mono);
    padding: 1px 6px;
    border-radius: 10px;
    line-height: 16px;
}

.sidebar-footer {
    padding: 16px 10px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.user-block {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--blue-700);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.user-info-name {
    font-size: var(--text-sm);
    font-weight: 500;
    color: #E2E8F0;
    line-height: 1.3;
}

.user-info-role {
    font-size: var(--text-xs);
    color: #64748B;
    line-height: 1.3;
}

/* ─── MAIN AREA ───────────────────────────────────── */

.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

/* ─── HEADER ──────────────────────────────────────── */

.header {
    height: var(--header-height);
    min-height: var(--header-height);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
    z-index: 50;
}

.header-title {
    font-size: var(--text-md);
    font-weight: 600;
    color: var(--gray-900);
    flex: 1;
}

.header-meta {
    font-size: var(--text-sm);
    color: var(--gray-500);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--gray-500);
    transition: all 0.12s;
}

    .icon-btn:hover {
        background: var(--gray-50);
        color: var(--gray-700);
        border-color: var(--border-strong);
    }

    .icon-btn svg {
        width: 15px;
        height: 15px;
    }

/* ─── PAGE CONTENT ────────────────────────────────── */

.page-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.page-header {
    margin-bottom: 20px;
}

.page-title {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--gray-900);
    letter-spacing: -0.01em;
}

.page-subtitle {
    font-size: var(--text-sm);
    color: var(--gray-500);
    margin-top: 4px;
}

/* ─── CARDS ───────────────────────────────────────── */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--gray-800);
}

.card-subtitle {
    font-size: var(--text-xs);
    color: var(--gray-500);
    margin-top: 2px;
}

.card-body {
    padding: 20px;
}

/* ─── STAT CARDS ──────────────────────────────────── */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    box-shadow: var(--shadow-xs);
    transition: box-shadow 0.15s;
}

    .stat-card:hover {
        box-shadow: var(--shadow-sm);
    }

.stat-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .stat-icon svg {
        width: 18px;
        height: 18px;
    }

    .stat-icon.blue {
        background: var(--blue-50);
        color: var(--blue-600);
    }

    .stat-icon.orange {
        background: var(--orange-50);
        color: var(--orange-600);
    }

    .stat-icon.green {
        background: var(--green-50);
        color: var(--green-600);
    }

    .stat-icon.red {
        background: var(--red-50);
        color: var(--red-600);
    }

.stat-body {
    flex: 1;
    min-width: 0;
}

.stat-label {
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.stat-value {
    font-size: var(--text-3xl);
    font-weight: 600;
    color: var(--gray-900);
    line-height: 1;
    font-family: var(--font-mono);
    letter-spacing: -0.02em;
}

.stat-trend {
    font-size: var(--text-xs);
    color: var(--gray-400);
    margin-top: 6px;
}

/* ─── TABLES ──────────────────────────────────────── */

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}

thead th {
    padding: 10px 14px;
    text-align: left;
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--gray-50);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

    thead th:first-child {
        border-radius: var(--radius-sm) 0 0 0;
    }

    thead th:last-child {
        border-radius: 0 var(--radius-sm) 0 0;
    }

tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.1s;
}

    tbody tr:hover {
        background: var(--gray-50);
    }

    tbody tr:last-child {
        border-bottom: none;
    }

tbody td {
    padding: 12px 14px;
    color: var(--gray-700);
    vertical-align: middle;
}

.cell-subject {
    font-weight: 500;
    color: var(--gray-900);
    max-width: 260px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cell-mono {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--gray-500);
}

.cell-sender {
    color: var(--gray-700);
}

.cell-summary {
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--gray-600);
    font-size: var(--text-xs);
}

/* ─── BADGES / PILLS ──────────────────────────────── */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.badge-critical {
    background: var(--red-100);
    color: var(--red-600);
}

.badge-high {
    background: var(--orange-50);
    color: var(--orange-600);
}

.badge-medium {
    background: var(--yellow-50);
    color: #A16207;
}

.badge-low {
    background: var(--gray-100);
    color: var(--gray-600);
}

.badge-open {
    background: var(--blue-50);
    color: var(--blue-700);
}

.badge-inprogress {
    background: var(--yellow-50);
    color: #92400E;
}

.badge-resolved {
    background: var(--green-50);
    color: var(--green-600);
}

.badge-closed {
    background: var(--gray-100);
    color: var(--gray-500);
}

.badge-yes {
    background: var(--orange-50);
    color: var(--orange-600);
}

.badge-no {
    background: var(--green-50);
    color: var(--green-600);
}

/* ─── BUTTONS ─────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.12s;
    text-decoration: none;
    white-space: nowrap;
}

    .btn svg {
        width: 14px;
        height: 14px;
    }

.btn-primary {
    background: var(--blue-600);
    color: white;
    border-color: var(--blue-700);
}

    .btn-primary:hover {
        background: var(--blue-700);
    }

.btn-secondary {
    background: var(--surface);
    color: var(--gray-700);
    border-color: var(--border-strong);
}

    .btn-secondary:hover {
        background: var(--gray-50);
        border-color: var(--gray-400);
    }

.btn-ghost {
    background: transparent;
    color: var(--blue-600);
    border-color: transparent;
    padding: 5px 8px;
    font-size: var(--text-xs);
}

    .btn-ghost:hover {
        background: var(--blue-50);
        color: var(--blue-700);
    }

.btn-danger {
    background: var(--red-500);
    color: white;
    border-color: var(--red-600);
}

    .btn-danger:hover {
        background: var(--red-600);
    }

.btn-sm {
    padding: 5px 10px;
    font-size: var(--text-xs);
}

/* ─── SEARCH & FILTERS ────────────────────────────── */

.toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 320px;
}

    .search-box svg {
        position: absolute;
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
        width: 14px;
        height: 14px;
        color: var(--gray-400);
        pointer-events: none;
    }

.search-input {
    width: 100%;
    padding: 7px 12px 7px 32px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--gray-800);
    background: var(--surface);
    outline: none;
    transition: border-color 0.12s, box-shadow 0.12s;
}

    .search-input:focus {
        border-color: var(--blue-500);
        box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
    }

    .search-input::placeholder {
        color: var(--gray-400);
    }

.filter-select {
    padding: 7px 28px 7px 10px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--gray-700);
    background: var(--surface);
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    background-size: 16px;
    transition: border-color 0.12s;
}

    .filter-select:focus {
        border-color: var(--blue-500);
    }

.filter-label {
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--gray-500);
}

/* ─── DETAIL PAGE ─────────────────────────────────── */

.detail-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
}

.detail-section {
    margin-bottom: 20px;
}

.detail-section-title {
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gray-400);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.detail-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 14px;
}

.detail-field-label {
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-field-value {
    font-size: var(--text-base);
    color: var(--gray-800);
}

.email-body-box {
    background: var(--gray-50);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    font-size: var(--text-sm);
    color: var(--gray-700);
    line-height: 1.7;
    white-space: pre-wrap;
}

.ai-panel {
    background: var(--blue-50);
    border: 1px solid var(--blue-100);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.ai-panel-header {
    background: var(--blue-600);
    color: white;
    padding: 10px 16px;
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-panel-body {
    padding: 16px;
}

.ai-summary-text {
    font-size: var(--text-sm);
    color: var(--gray-700);
    line-height: 1.65;
    margin-bottom: 14px;
}

.ai-field {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
    font-size: var(--text-sm);
}

.ai-field-key {
    font-weight: 500;
    color: var(--gray-500);
    min-width: 110px;
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding-top: 2px;
}

.action-strip {
    display: flex;
    gap: 10px;
    padding: 16px;
    background: var(--gray-50);
    border-top: 1px solid var(--border);
    margin-top: 0;
}

/* ─── DAILY SUMMARY ───────────────────────────────── */

.summary-date-picker {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.summary-date-label {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--gray-600);
}

.date-input {
    padding: 6px 10px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--gray-800);
    outline: none;
}

    .date-input:focus {
        border-color: var(--blue-500);
    }

.summary-header-box {
    background: var(--sidebar-bg);
    color: white;
    padding: 20px 24px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.summary-report-title {
    font-size: var(--text-xl);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.summary-report-date {
    font-size: var(--text-sm);
    color: #94A3B8;
    margin-top: 3px;
}

.important-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: var(--text-sm);
    color: var(--gray-700);
    line-height: 1.5;
}

    .important-item:last-child {
        border-bottom: none;
    }

.item-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--blue-500);
    margin-top: 5px;
    flex-shrink: 0;
}

/* ─── EMPTY STATES ────────────────────────────────── */

.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--gray-400);
}

    .empty-state svg {
        width: 36px;
        height: 36px;
        margin: 0 auto 12px;
        opacity: 0.4;
    }

    .empty-state p {
        font-size: var(--text-sm);
    }

/* ─── MISC ────────────────────────────────────────── */

.section-gap {
    margin-bottom: 20px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-sm);
    color: var(--gray-500);
    margin-bottom: 16px;
    cursor: pointer;
    transition: color 0.1s;
}

    .back-link:hover {
        color: var(--gray-700);
    }

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

.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 20px 0;
}

.text-muted {
    color: var(--gray-400);
}

.text-sm {
    font-size: var(--text-sm);
}

.text-xs {
    font-size: var(--text-xs);
}

/* ─── RESPONSIVE ──────────────────────────────────── */

@media (max-width: 1100px) {
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .detail-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 0px;
    }

    .sidebar {
        display: none;
    }

    .stat-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ─────────────────────────────────────────
   AUTH PAGES — Login & Register
   ───────────────────────────────────────── */

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--gray-50);
}

/* Left panel — brand/marketing side */
.auth-panel-left {
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px;
    position: relative;
    overflow: hidden;
}

    .auth-panel-left::before {
        content: '';
        position: absolute;
        top: -120px;
        right: -80px;
        width: 420px;
        height: 420px;
        border-radius: 50%;
        background: rgba(37, 99, 235, 0.12);
        pointer-events: none;
    }

    .auth-panel-left::after {
        content: '';
        position: absolute;
        bottom: -60px;
        left: -60px;
        width: 280px;
        height: 280px;
        border-radius: 50%;
        background: rgba(37, 99, 235, 0.07);
        pointer-events: none;
    }

.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.auth-brand-icon {
    width: 36px;
    height: 36px;
    background: var(--blue-600);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .auth-brand-icon svg {
        width: 20px;
        height: 20px;
        fill: white;
    }

.auth-brand-name {
    font-size: 20px;
    font-weight: 600;
    color: white;
    letter-spacing: -0.01em;
}

.auth-panel-tagline {
    position: relative;
    z-index: 1;
}

.auth-tagline-heading {
    font-size: 32px;
    font-weight: 600;
    color: white;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.auth-tagline-sub {
    font-size: 15px;
    color: #94A3B8;
    line-height: 1.65;
    max-width: 360px;
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    z-index: 1;
}

.auth-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.auth-feature-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

    .auth-feature-dot svg {
        width: 10px;
        height: 10px;
        fill: var(--blue-500);
    }

.auth-feature-text {
    font-size: 13.5px;
    color: #CBD5E1;
    line-height: 1.5;
}

    .auth-feature-text strong {
        color: white;
        font-weight: 500;
    }

.auth-panel-footer {
    font-size: 12px;
    color: #475569;
    position: relative;
    z-index: 1;
}

/* Right panel — form side */
.auth-panel-right {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    background: white;
}

.auth-form-wrapper {
    width: 100%;
    max-width: 400px;
}

.auth-form-header {
    margin-bottom: 32px;
}

.auth-form-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--gray-900);
    letter-spacing: -0.01em;
    margin-bottom: 6px;
}

.auth-form-subtitle {
    font-size: 14px;
    color: var(--gray-500);
    line-height: 1.5;
}

/* Form fields */
.auth-field {
    margin-bottom: 18px;
}

.auth-label {
    display: block;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--gray-600);
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

.auth-input {
    width: 100%;
    padding: 10px 13px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--gray-900);
    background: var(--surface);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
}

    .auth-input:focus {
        border-color: var(--blue-500);
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
    }

    .auth-input::placeholder {
        color: var(--gray-400);
    }

    .auth-input.error {
        border-color: var(--red-500);
        box-shadow: 0 0 0 3px rgba(250, 82, 82, 0.1);
    }

.auth-input-hint {
    font-size: 11.5px;
    color: var(--gray-400);
    margin-top: 5px;
}

.auth-input-error {
    font-size: 11.5px;
    color: var(--red-500);
    margin-top: 5px;
}

/* Password field with toggle */
.auth-input-group {
    position: relative;
}

    .auth-input-group .auth-input {
        padding-right: 42px;
    }

.auth-input-toggle {
    position: absolute;
    right: 11px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
    padding: 2px;
    display: flex;
    align-items: center;
    transition: color 0.12s;
}

    .auth-input-toggle:hover {
        color: var(--gray-600);
    }

    .auth-input-toggle svg {
        width: 16px;
        height: 16px;
    }

/* Two-column field row */
.auth-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* Remember / forgot row */
.auth-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.auth-checkbox-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: var(--gray-600);
    cursor: pointer;
}

    .auth-checkbox-label input[type="checkbox"] {
        width: 15px;
        height: 15px;
        accent-color: var(--blue-600);
        cursor: pointer;
    }

.auth-forgot {
    font-size: 13px;
    color: var(--blue-600);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    font-family: var(--font-body);
    transition: color 0.12s;
}

    .auth-forgot:hover {
        color: var(--blue-700);
        text-decoration: underline;
    }

/* Submit button */
.auth-submit {
    width: 100%;
    padding: 11px;
    background: var(--blue-600);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

    .auth-submit:hover {
        background: var(--blue-700);
        box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
    }

    .auth-submit:disabled {
        background: var(--gray-300);
        cursor: not-allowed;
        box-shadow: none;
    }

    .auth-submit svg {
        width: 15px;
        height: 15px;
    }

/* Spinner */
.auth-spinner {
    width: 15px;
    height: 15px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    color: var(--gray-300);
    font-size: 12px;
    color: var(--gray-400);
}

    .auth-divider::before,
    .auth-divider::after {
        content: '';
        flex: 1;
        height: 1px;
        background: var(--border);
    }

/* SSO button */
.auth-sso {
    width: 100%;
    padding: 10px;
    background: white;
    color: var(--gray-700);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    transition: background 0.12s, border-color 0.12s;
    margin-bottom: 10px;
}

    .auth-sso:hover {
        background: var(--gray-50);
        border-color: var(--gray-400);
    }

    .auth-sso svg {
        width: 16px;
        height: 16px;
    }

/* Alert */
.auth-alert {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 18px;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    line-height: 1.5;
}

    .auth-alert svg {
        width: 15px;
        height: 15px;
        flex-shrink: 0;
        margin-top: 1px;
    }

.auth-alert-error {
    background: var(--red-50);
    color: var(--red-600);
    border: 1px solid var(--red-100);
}

.auth-alert-success {
    background: var(--green-50);
    color: var(--green-600);
    border: 1px solid #B2F2BB;
}

/* Switch link */
.auth-switch {
    text-align: center;
    font-size: 13.5px;
    color: var(--gray-500);
    margin-top: 4px;
}

    .auth-switch a, .auth-switch button {
        color: var(--blue-600);
        font-weight: 500;
        background: none;
        border: none;
        cursor: pointer;
        font-family: var(--font-body);
        font-size: 13.5px;
        padding: 0;
        transition: color 0.12s;
    }

        .auth-switch a:hover,
        .auth-switch button:hover {
            color: var(--blue-700);
            text-decoration: underline;
        }

/* Password strength bar */
.strength-bar-wrap {
    height: 3px;
    background: var(--gray-100);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s, background 0.3s;
}

.strength-label {
    font-size: 11px;
    margin-top: 4px;
    font-weight: 500;
}

/* Terms checkbox */
.auth-terms {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-bottom: 20px;
    font-size: 12.5px;
    color: var(--gray-500);
    line-height: 1.5;
}

    .auth-terms input[type="checkbox"] {
        margin-top: 2px;
        width: 14px;
        height: 14px;
        accent-color: var(--blue-600);
        cursor: pointer;
        flex-shrink: 0;
    }

    .auth-terms a {
        color: var(--blue-600);
        text-decoration: none;
    }

        .auth-terms a:hover {
            text-decoration: underline;
        }

/* Policy note */
.auth-policy-note {
    font-size: 11.5px;
    color: var(--gray-400);
    text-align: center;
    margin-top: 20px;
    line-height: 1.6;
}

/* Step indicator (register) */
.auth-steps {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 28px;
}

.auth-step-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gray-200);
    transition: all 0.2s;
}

    .auth-step-dot.active {
        width: 20px;
        border-radius: 3px;
        background: var(--blue-600);
    }

    .auth-step-dot.done {
        background: var(--green-500);
    }

/* Responsive */
@media (max-width: 900px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-panel-left {
        display: none;
    }

    .auth-panel-right {
        padding: 40px 24px;
    }
}
