/* =====================================================================
   Facebook Interaction Manager — Professional Admin UI
   Design: flat, sharp corners, dark sidebar, light content
   ===================================================================== */

:root {
    /* Backgrounds */
    --bg: #f3f4f6;
    --surface: #ffffff;
    --surface-2: #f9fafb;
    --surface-3: #f0f1f3;

    /* Borders */
    --border: #d1d5db;
    --border-muted: #e5e7eb;

    /* Sidebar */
    --sidebar-bg: #111827;
    --sidebar-border: #1f2937;
    --sidebar-text: #9ca3af;
    --sidebar-muted: #6b7280;
    --sidebar-hover: #1f2937;
    --sidebar-active-bg: #374151;
    --sidebar-active-text: #f9fafb;

    /* Text */
    --text: #111827;
    --text-secondary: #374151;
    --muted: #6b7280;
    --muted-light: #9ca3af;

    /* Accent */
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-light: #eff6ff;
    --accent-border: #bfdbfe;

    /* Status */
    --success: #15803d;
    --success-bg: #f0fdf4;
    --success-border: #86efac;
    --warning: #b45309;
    --warning-bg: #fffbeb;
    --warning-border: #fcd34d;
    --danger: #b91c1c;
    --danger-bg: #fef2f2;
    --danger-border: #fca5a5;
    --info: #0369a1;
    --info-bg: #f0f9ff;
    --info-border: #7dd3fc;

    --badge-radius: 2px;
    --radius: 4px;
    --radius-lg: 6px;

    --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.10), 0 1px 2px rgba(0,0,0,0.06);
    --shadow: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);

    --sidebar-w: 240px;
    --sidebar-w-collapsed: 72px;
}

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

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

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

body.fixed-layout .app-shell {
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-w);
    min-width: var(--sidebar-w);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-header {
    padding: 20px 16px 16px;
    border-bottom: 1px solid var(--sidebar-border);
}

.sidebar-toggle {
    width: 30px;
    height: 30px;
    border: 1px solid #2b3444;
    background: #182132;
    color: #cbd5e1;
    border-radius: var(--radius);
    display: inline-grid;
    place-items: center;
    margin-bottom: 10px;
    cursor: pointer;
}

.sidebar-toggle:hover {
    background: #1f2b3e;
}

.brand { display: flex; align-items: center; gap: 10px; }

.brand-icon {
    width: 32px;
    height: 32px;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    display: grid;
    place-items: center;
    border-radius: var(--radius);
    flex-shrink: 0;
}

.brand-name { color: #f9fafb; font-size: 14px; font-weight: 600; line-height: 1.2; }
.brand-sub  { color: var(--sidebar-muted); font-size: 11px; margin-top: 1px; }

.sidebar-nav { padding: 12px 8px; flex: 1; }

.nav-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.nav-section-label {
    padding: 8px 8px 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sidebar-muted);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--radius);
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: background 0.12s, color 0.12s;
    margin-bottom: 2px;
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
}

.nav-item:hover { background: var(--sidebar-hover); color: #e5e7eb; }
.nav-item.active { background: var(--sidebar-active-bg); color: var(--sidebar-active-text); }

.sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--sidebar-border);
}

.sidebar-field-label {
    display: block;
    color: var(--sidebar-muted);
    font-size: 11px;
    margin-bottom: 6px;
}

.sidebar-select {
    width: 100%;
    background: #1f2937;
    border: 1px solid #334155;
    color: #e5e7eb;
    border-radius: var(--radius);
    padding: 6px 8px;
    font-size: 12px;
}

.sidebar-version {
    color: var(--sidebar-muted);
    font-size: 11px;
    margin-top: 8px;
}

body.sidebar-collapsed .sidebar {
    width: var(--sidebar-w-collapsed);
    min-width: var(--sidebar-w-collapsed);
}

body.sidebar-collapsed .brand-name,
body.sidebar-collapsed .brand-sub,
body.sidebar-collapsed .nav-text,
body.sidebar-collapsed .nav-section-label,
body.sidebar-collapsed .sidebar-field-label,
body.sidebar-collapsed .sidebar-select,
body.sidebar-collapsed .sidebar-version {
    display: none;
}

body.sidebar-collapsed .sidebar-header {
    padding: 14px 10px;
}

body.sidebar-collapsed .brand {
    justify-content: center;
}

body.sidebar-collapsed .sidebar-nav {
    padding: 12px 8px;
}

body.sidebar-collapsed .nav-item {
    justify-content: center;
    padding: 10px 8px;
}

body.sidebar-collapsed .sidebar-footer {
    padding: 10px;
}

/* Main content */
.main-content {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

body.fixed-layout .main-content {
    height: 100vh;
    overflow: hidden;
}

.page-area {
    flex: 1;
    width: 100%;
    overflow-y: auto;
    padding: 24px 28px;
}

.page-area > * {
    width: 100%;
}

body.fixed-layout .page-area { height: 100%; }

/* Page header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-title { margin: 0; font-size: 18px; font-weight: 600; }
.page-subtitle { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Toolbar */
.toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.toolbar-label { font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.toolbar-sep { width: 1px; height: 20px; background: var(--border); flex-shrink: 0; }

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

.card-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.card-title { font-size: 14px; font-weight: 600; margin: 0; }
.card-body { padding: 16px 18px; }
.card-body.no-pad { padding: 0; }

/* Stats */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.stat-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
}

.stat-label {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin-bottom: 4px;
}

.stat-value { font-size: 22px; font-weight: 700; color: var(--text); line-height: 1.1; }
.stat-secondary { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* Table */
.table-wrap { width: 100%; overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }

thead th {
    padding: 9px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

tbody tr { border-bottom: 1px solid var(--border-muted); transition: background 0.1s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface-2); }
tbody td { padding: 10px 14px; color: var(--text-secondary); vertical-align: middle; }

.td-mono { font-family: 'Consolas','Menlo','SF Mono',monospace; font-size: 12px; }
.td-muted { color: var(--muted); }
.td-truncate { max-width: 280px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s, opacity 0.12s;
    text-decoration: none;
    white-space: nowrap;
    background: transparent;
    font-family: inherit;
}

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

.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }

.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-2); border-color: var(--muted-light); }

.btn-danger { background: var(--surface); color: var(--danger); border-color: var(--danger-border); }
.btn-danger:hover:not(:disabled) { background: var(--danger-bg); }

.btn-ghost { background: transparent; color: var(--accent); border-color: transparent; padding: 4px 8px; }
.btn-ghost:hover:not(:disabled) { background: var(--accent-light); }

.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-success:hover:not(:disabled) { filter: brightness(0.92); }

.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-xs { padding: 2px 8px; font-size: 11px; }
.btn-icon { padding: 6px; }

/* Forms */
label { font-size: 12px; font-weight: 500; color: var(--text-secondary); display: block; margin-bottom: 4px; }

input[type='text'], input[type='number'], input[type='email'], input[type='password'], select, textarea {
    display: block;
    width: 100%;
    padding: 7px 10px;
    font-size: 13px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(37,99,235,0.15);
}

textarea { resize: vertical; min-height: 80px; }
.form-group { margin-bottom: 14px; }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--badge-radius);
    border: 1px solid transparent;
    white-space: nowrap;
}

.badge-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

.badge-success { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.badge-success .badge-dot { background: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }
.badge-warning .badge-dot { background: var(--warning); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger);  border-color: var(--danger-border); }
.badge-danger  .badge-dot { background: var(--danger); }
.badge-info    { background: var(--info-bg);    color: var(--info);    border-color: var(--info-border); }
.badge-info    .badge-dot { background: var(--info); }
.badge-neutral { background: var(--surface-3);  color: var(--muted);   border-color: var(--border); }
.badge-neutral .badge-dot { background: var(--muted); }

/* Alert / Banner */
.alert {
    padding: 10px 14px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
}

.alert.visible { display: block; }
.alert-success { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.alert-error   { background: var(--danger-bg);  color: var(--danger);  border-color: var(--danger-border); }
.alert-info    { background: var(--info-bg);    color: var(--info);    border-color: var(--info-border); }
.alert-warning { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }

/* Modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-backdrop.open { display: flex; }

.modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

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

.modal-title { font-size: 15px; font-weight: 600; margin: 0; }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 12px 20px; border-top: 1px solid var(--border-muted); display: flex; gap: 8px; justify-content: flex-end; }

/* Profile grid */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.profile-field {
    background: var(--surface-2);
    border: 1px solid var(--border-muted);
    border-radius: var(--radius);
    padding: 10px 14px;
}

.profile-field label { margin-bottom: 2px; color: var(--muted); }
.profile-field .val  { font-size: 15px; font-weight: 600; color: var(--text); }
.profile-field .val a { color: var(--accent); text-decoration: none; }

/* Sync form */
.sync-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.sync-form .form-group { margin-bottom: 0; min-width: 120px; }

/* Comments layout */
.comments-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.comments-toolbar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 14px;
    flex-wrap: wrap;
}

.posts-scroll {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 16px;
}

/* Post card */
.post-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.post-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    cursor: pointer;
    user-select: none;
}

.post-card-header:hover { background: var(--surface-2); }

.post-expand-icon {
    font-size: 10px;
    color: var(--muted);
    transition: transform 0.15s;
    flex-shrink: 0;
}

.post-card.expanded .post-expand-icon { transform: rotate(90deg); }

.post-meta { flex: 1; min-width: 0; }

.post-excerpt {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-info-row {
    display: flex;
    gap: 12px;
    margin-top: 2px;
    font-size: 11px;
    color: var(--muted);
    flex-wrap: wrap;
    align-items: center;
}

.post-info-row a { color: var(--accent); text-decoration: none; }

.post-actions-header { display: flex; gap: 6px; flex-shrink: 0; }

.post-body { border-top: 1px solid var(--border-muted); display: none; }
.post-card.expanded .post-body { display: block; }

/* Insights panel */
.insights-panel {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-muted);
    background: var(--surface-2);
    display: none;
}

.insights-panel.visible { display: block; }

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
}

.ins-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 12px; }
.ins-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 2px; }
.ins-value { font-size: 18px; font-weight: 700; color: var(--text); }

/* Comment list */
.comment-list { padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; }

.comment-item {
    border: 1px solid var(--border-muted);
    border-radius: var(--radius);
    background: var(--surface);
}

.comment-item.reply-item {
    margin-left: 24px;
    background: var(--surface-2);
}

.comment-top { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px 8px; }

.comment-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--surface-3);
    border: 1px solid var(--border);
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    flex-shrink: 0;
}

.comment-body      { flex: 1; min-width: 0; }
.comment-author    { font-size: 12px; font-weight: 600; color: var(--text); }
.comment-time      { font-size: 11px; color: var(--muted); margin-left: 6px; }
.comment-text      { margin: 4px 0 0; font-size: 13px; color: var(--text-secondary); line-height: 1.5; word-break: break-word; }

.comment-actions-row {
    padding: 0 12px 8px 50px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.reply-form-wrap {
    padding: 8px 12px;
    border-top: 1px solid var(--border-muted);
    background: var(--surface-2);
    display: none;
}

.reply-form-wrap.open { display: block; }
.reply-form-wrap textarea { margin-bottom: 8px; font-size: 13px; }
.reply-form-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* Monitor cards */
.monitor-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 10px;
}

.monitor-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
}

.monitor-status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.monitor-status-dot.active { background: var(--success); box-shadow: 0 0 0 3px var(--success-bg); }
.monitor-status-dot.paused { background: var(--muted-light); box-shadow: 0 0 0 3px var(--surface-3); }

.monitor-meta { flex: 1; min-width: 0; }

.monitor-post-excerpt {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.monitor-post-id {
    font-size: 11px;
    color: var(--muted);
    font-family: 'Consolas', monospace;
    margin-top: 2px;
}

.monitor-tags { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.monitor-actions { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; }

.monitor-card-body {
    border-top: 1px solid var(--border-muted);
    padding: 14px 16px;
    background: var(--surface-2);
    display: none;
}

.monitor-card.expanded .monitor-card-body { display: block; }

.monitor-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.monitor-detail-item label { margin-bottom: 2px; }
.monitor-detail-item .val { font-size: 13px; font-weight: 500; color: var(--text); }

.replied-table-wrap { margin-top: 10px; }

/* Empty state */
.empty-state { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty-state-icon { font-size: 32px; margin-bottom: 10px; opacity: 0.5; }
.empty-state p { margin: 0; font-size: 13px; }

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

.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
}

/* Utility */
.hidden { display: none !important; }
.text-muted { color: var(--muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.font-mono { font-family: 'Consolas','Menlo',monospace; }
.text-xs { font-size: 11px; }
.text-sm { font-size: 12px; }
.fw-600 { font-weight: 600; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; }
.mt-2 { margin-top: 8px; }
.mb-0 { margin-bottom: 0; }
.w-full { width: 100%; }

.sidebar-logout {
    width: 100%;
    margin-top: 10px;
    justify-content: center;
}

/* =====================================================================
   Login Page Styling (Modern Redesign)
   ===================================================================== */

.login-body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8fafc;
    background-image: 
        radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(30, 64, 175, 0.05) 0px, transparent 50%);
    font-family: 'Inter', -apple-system, sans-serif;
}

.login-container {
    width: 100%;
    max-width: 960px;
    padding: 24px;
    animation: loginFadeIn 0.6s ease-out;
}

.login-card {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    min-height: 580px;
}

.login-brand {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 48px;
    color: #f8fafc;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.brand-content { position: relative; z-index: 2; }

.brand-logo {
    width: 56px;
    height: 56px;
    background: rgba(37, 99, 235, 0.15);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
}

.brand-logo i { width: 28px; height: 28px; color: #3b82f6; }

.brand-tag {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #60a5fa;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: block;
}

.brand-title {
    font-size: 38px;
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 16px 0;
    letter-spacing: -0.02em;
}

.brand-description {
    font-size: 16px;
    color: #94a3b8;
    line-height: 1.6;
    margin: 0;
}

.brand-features {
    margin-top: 48px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #cbd5e1;
}

.feature-icon { width: 18px; height: 18px; color: #3b82f6; }

.brand-footer { font-size: 12px; color: #64748b; }

.login-main {
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-header { margin-bottom: 32px; }
.login-header h2 { font-size: 28px; font-weight: 700; color: #1e293b; margin: 0 0 8px 0; }
.login-header p { font-size: 15px; color: #64748b; margin: 0; }

.login-alert {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 12px 16px;
    color: #dc2626;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.input-group { margin-bottom: 20px; }
.input-group label { display: block; font-size: 13px; font-weight: 600; color: #475569; margin-bottom: 8px; }

.input-wrapper { position: relative; display: flex; align-items: center; }
.input-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: #94a3b8;
    transition: color 0.2s;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 12px 12px 42px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    color: #1e293b;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-wrapper input:focus {
    background: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    outline: none;
}

.input-wrapper input:focus + .input-icon { color: #3b82f6; }
.input-wrapper.disabled input { background: #f1f5f9; color: #94a3b8; cursor: not-allowed; }

.login-submit-btn {
    width: 100%;
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.login-submit-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.login-help {
    margin-top: 32px;
    display: flex;
    gap: 10px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}

.login-help i { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }
.login-help code { background: #e2e8f0; padding: 2px 4px; border-radius: 4px; }

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.animate-shake { animation: shake 0.4s ease-in-out 0s 2; }

@media (max-width: 900px) {
    .login-container { padding: 16px; }
    .login-card { grid-template-columns: 1fr; min-height: auto; }
    .login-brand { padding: 40px; order: 2; }
    .login-main { padding: 40px; order: 1; }
    .brand-features { margin-top: 32px; }
    .sidebar {
        width: var(--sidebar-w-collapsed);
        min-width: var(--sidebar-w-collapsed);
    }

    .brand-name,
    .brand-sub,
    .nav-text,
    .nav-section-label,
    .sidebar-field-label,
    .sidebar-select,
    .sidebar-version {
        display: none;
    }

    .sidebar-header {
        padding: 14px 10px;
    }

    .brand {
        justify-content: center;
    }

    .nav-item {
        justify-content: center;
        padding: 10px 8px;
    }

    .page-area {
        padding: 18px 14px;
    }
}

@media (max-width: 820px) {
    .login-card-pro {
        grid-template-columns: 1fr;
    }

    .login-panel {
        padding: 22px 20px;
    }

    .login-title {
        font-size: 28px;
    }
}
