/* ═══════════════════════════════════════════════════════════════════════════
   CodeFolks SaaS Platform — HudHud HR Design System
   Primary: #d44ac2  |  Dark: #c13bb0  |  Text: #da4fc5
   Content bg: #f5e1f2  |  Sidebar: #f8f9fa  |  White: #ffffff
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
    --primary:      #d44ac2;
    --primary-dark: #c13bb0;
    --primary-text: #da4fc5;
    --primary-light:#f5e1f2;
    --primary-bg:   #f6e1e9;
    --sidebar-bg:   #f8f9fa;
    --white:        #ffffff;
    --text-dark:    #212529;
    --text-muted:   #6c757d;
    --text-gray:    #525151;
    --border:       #e9d5f0;
    --shadow-sm:    rgba(0,0,0,0.06) 0 2px 6px 0;
    --shadow-md:    rgba(0,0,0,0.10) 0 4px 16px 0;
    --radius:       10px;
    --radius-sm:    8px;
    --radius-pill:  20px;
    --topbar-h:     58px;
    --sidebar-w:    260px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    background: var(--primary-bg);
    color: var(--text-dark);
    font-size: 14px;
    line-height: 1.5;
}

a { text-decoration: none; }

/* ══ LAYOUT ══════════════════════════════════════════════════════════════════ */
.cf-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ══ SIDEBAR ═════════════════════════════════════════════════════════════════ */
.cf-sidebar {
    width: var(--sidebar-w);
    min-width: var(--sidebar-w);
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    z-index: 100;
    box-shadow: 2px 0 8px rgba(212,74,194,0.08);
}

/* Brand header — magenta gradient */
.cf-brand {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: var(--topbar-h);
    flex-shrink: 0;
}
.cf-brand-logo {
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.25);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
}
.cf-brand-text {}
.cf-brand-name { font-weight: 700; font-size: 16px; color: white; }
.cf-brand-sub  { font-size: 11px; color: rgba(255,255,255,0.75); }

/* Nav list */
.cf-nav {
    flex: 1;
    overflow-y: auto;
    padding: 10px 10px;
    scrollbar-width: thin;
    scrollbar-color: #e9d5f0 transparent;
}
.cf-nav::-webkit-scrollbar { width: 4px; }
.cf-nav::-webkit-scrollbar-thumb { background: #e9d5f0; border-radius: 4px; }

/* Nav group item */
.cf-nav-group { margin-bottom: 5px; }

/* Accordion: sub-nav hidden by default, shown when group is .open */
.cf-sub-nav { display: none; }
.cf-nav-group.open .cf-sub-nav { display: flex; }

.cf-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-radius: var(--radius);
    background: var(--white);
    color: var(--primary-text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    border: none;
    width: 100%;
    text-align: left;
    transition: all 0.18s;
    justify-content: space-between;
}
.cf-nav-item:hover { background: #fce8f8; }
.cf-nav-item.active {
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: rgba(212,74,194,0.35) 0 4px 12px;
}
.cf-nav-item-left { display: flex; align-items: center; gap: 10px; }
.cf-nav-item i { width: 18px; text-align: center; font-size: 13px; flex-shrink: 0; }
.cf-nav-chevron { font-size: 11px; transition: transform 0.2s; }
.cf-nav-item.active .cf-nav-chevron { transform: rotate(90deg); }
/* chevron on the nav-item itself */
.cf-chevron { font-size: 10px; margin-left: auto; transition: transform 0.22s; color: var(--primary-text); }
.cf-nav-item.active .cf-chevron { transform: rotate(180deg); color: white; }
.cf-nav-group.open .cf-chevron  { transform: rotate(180deg); }

/* Sub-items */
.cf-sub-nav {
    padding: 4px 0 4px 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.cf-sub-item {
    display: block;
    padding: 7px 14px;
    border-radius: var(--radius-pill);
    background: var(--white);
    color: var(--primary-text);
    font-size: 12px;
    font-weight: 600;
    border: 1.5px solid #f0ceed;
    transition: all 0.15s;
    cursor: pointer;
    text-align: left;
    width: 100%;
}
.cf-sub-item:hover { background: #fce8f8; border-color: var(--primary); }
.cf-sub-item.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-color: transparent;
    box-shadow: rgba(212,74,194,0.3) 0 3px 8px;
}

/* Sidebar footer */
.cf-sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid #edd5f0;
    background: var(--white);
    flex-shrink: 0;
}
.cf-user { display: flex; align-items: center; gap: 10px; }
.cf-avatar {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px; color: white;
    flex-shrink: 0;
    position: relative;
}
.cf-online-dot {
    position: absolute;
    bottom: 0; right: 0;
    width: 10px; height: 10px;
    background: #198754;
    border-radius: 50%;
    border: 2px solid white;
}
.cf-user-info {}
.cf-user-name { font-size: 13px; font-weight: 600; color: var(--text-dark); }
.cf-user-role  { font-size: 11px; color: var(--text-muted); }

/* ══ MAIN ════════════════════════════════════════════════════════════════════ */
.cf-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--primary-light);
}

/* ══ TOP BAR ═════════════════════════════════════════════════════════════════ */
.cf-topbar {
    min-height: var(--topbar-h);
    background: var(--white);
    border-bottom: 2px solid #f0d0ec;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    gap: 16px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(212,74,194,0.06);
}
/* Left side: title + breadcrumb */
.cf-topbar-left { display: flex; flex-direction: column; justify-content: center; }
.cf-topbar-title { font-size: 16px; font-weight: 700; color: var(--primary-text); line-height: 1.2; }
.cf-topbar-breadcrumb {
    display: flex; align-items: center; gap: 5px;
    font-size: 11px; color: var(--text-muted); margin-top: 2px;
}
/* Right side */
.cf-topbar-right { display: flex; align-items: center; gap: 8px; }
.cf-topbar-icon {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px;
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 15px;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
}
.cf-topbar-icon:hover { background: var(--primary-light); color: var(--primary); }
.cf-topbar-icon .cf-badge {
    position: absolute;
    top: -2px; right: -2px;
    min-width: 17px; height: 17px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    padding: 0 3px;
}
.cf-topbar-divider {
    width: 1px; height: 28px;
    background: #edd5f0;
    margin: 0 4px;
}
.cf-topbar-user {
    display: flex; align-items: center; gap: 8px;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 8px;
    transition: background 0.15s;
}
.cf-topbar-user:hover { background: var(--primary-light); }
.cf-topbar-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 13px;
    flex-shrink: 0;
}
.cf-topbar-user-info { display: flex; flex-direction: column; }
.cf-topbar-user-name { font-weight: 600; font-size: 13px; color: var(--text-dark); line-height: 1.2; }
.cf-topbar-user-role { font-size: 10px; color: var(--text-muted); }
/* legacy aliases */
.cf-topbar-username { font-weight: 600; font-size: 13px; color: var(--text-dark); }
.cf-topbar-chevron  { font-size: 10px; color: var(--text-muted); }

/* ══ CONTENT ═════════════════════════════════════════════════════════════════ */
.cf-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    scrollbar-width: thin;
    scrollbar-color: #e9d5f0 transparent;
}
.cf-content::-webkit-scrollbar { width: 6px; }
.cf-content::-webkit-scrollbar-thumb { background: #e9d5f0; border-radius: 4px; }

/* ══ PAGE HEADER CARD ════════════════════════════════════════════════════════ */
/* Legacy alias used by pages */
.page-header {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px 22px;
    margin-bottom: 18px;
    box-shadow: var(--shadow-sm);
}
.page-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-text);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
}
.page-header p { font-size: 12px; color: var(--text-muted); margin: 0; }

.cf-page-header {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px 22px;
    margin-bottom: 18px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.cf-page-header-left {}
.cf-page-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-text);
    line-height: 1.2;
}
.cf-page-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 3px;
}
.cf-breadcrumb {
    font-size: 12px;
    color: var(--text-gray);
    text-align: right;
}
.cf-breadcrumb span { margin: 0 4px; color: var(--text-muted); }

/* ══ CARDS ═══════════════════════════════════════════════════════════════════ */
.cf-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}
.cf-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0d0ec;
}
.cf-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
}

/* ══ STATS GRID ══════════════════════════════════════════════════════════════ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    border-left: 4px solid var(--primary);
}
.stat-card.green  { border-left-color: #198754; }
.stat-card.yellow { border-left-color: #ffc107; }
.stat-card.red    { border-left-color: #dc3545; }
.stat-card.purple { border-left-color: #6f42c1; }
.stat-card.blue   { border-left-color: var(--primary); }
.stat-label { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; font-weight: 500; }
.stat-value { font-size: 28px; font-weight: 700; color: var(--text-dark); }
.stat-sub   { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.stat-icon  { position: absolute; top: 14px; right: 14px; font-size: 24px; color: var(--primary); opacity: 0.18; }
.stat-card.green  .stat-icon { color: #198754; }
.stat-card.yellow .stat-icon { color: #ffc107; }
.stat-card.red    .stat-icon { color: #dc3545; }
.stat-card.purple .stat-icon { color: #6f42c1; }

/* ══ TABLES ══════════════════════════════════════════════════════════════════ */
.cf-table-wrapper { overflow-x: auto; }
.cf-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.cf-table thead tr th {
    background: var(--primary);
    color: white;
    padding: 11px 14px;
    font-weight: 600;
    font-size: 13px;
    text-align: left;
    white-space: nowrap;
}
.cf-table thead tr th:first-child { border-radius: 6px 0 0 0; }
.cf-table thead tr th:last-child  { border-radius: 0 6px 0 0; }
.cf-table tbody tr td {
    padding: 11px 14px;
    color: var(--text-dark);
    vertical-align: middle;
    border-bottom: 1px solid #f4e8f8;
}
.cf-table tbody tr:last-child td { border-bottom: none; }
.cf-table tbody tr:nth-child(even) td { background: #fdf5fd; }
.cf-table tbody tr:hover td { background: #fce8f8; }

/* ══ BUTTONS ═════════════════════════════════════════════════════════════════ */
.btn-cf {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.18s;
    text-decoration: none;
    white-space: nowrap;
}
.btn-cf:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-cf:active { transform: translateY(0); }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: rgba(212,74,194,0.3) 0 4px 12px;
}
.btn-success {
    background: linear-gradient(135deg, #198754, #157347);
    color: white;
    box-shadow: rgba(25,135,84,0.25) 0 4px 10px;
}
.btn-warning {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #212529;
    box-shadow: rgba(255,193,7,0.25) 0 4px 10px;
}
.btn-danger {
    background: linear-gradient(135deg, #dc3545, #bb2d3b);
    color: white;
    box-shadow: rgba(220,53,69,0.25) 0 4px 10px;
}
.btn-ghost {
    background: var(--white);
    color: var(--primary);
    border: 1.5px solid var(--primary);
}
.btn-ghost:hover { background: var(--primary-light); }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px;
    border-radius: 6px;
    border: none; cursor: pointer; font-size: 13px;
    transition: all 0.15s;
}
.btn-icon-edit   { background: #fce8f8; color: var(--primary); }
.btn-icon-delete { background: #fde8e8; color: #dc3545; }
.btn-icon-edit:hover   { background: var(--primary); color: white; }
.btn-icon-delete:hover { background: #dc3545; color: white; }

/* ══ FORMS ════════════════════════════════════════════════════════════════════ */
.cf-form-group { margin-bottom: 16px; }
.cf-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
}
.cf-input, .cf-select, .cf-textarea {
    width: 100%;
    background: var(--white);
    border: 1.5px solid #e8d0f0;
    border-radius: var(--radius-sm);
    color: var(--text-dark);
    padding: 8px 12px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.cf-input:focus, .cf-select:focus, .cf-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(212,74,194,0.12);
}
.cf-select option { background: white; }
.cf-textarea { resize: vertical; min-height: 80px; }

/* ══ BADGES ══════════════════════════════════════════════════════════════════ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.badge-active    { background: #d1f4e0; color: #0a6638; }
.badge-pending   { background: #fff3cd; color: #664d03; }
.badge-blocked   { background: #f8d7da; color: #842029; }
.badge-cancelled { background: #e9ecef; color: #495057; }
.badge-grace     { background: #ffe5d0; color: #7c3f00; }
.badge-paid      { background: #d1f4e0; color: #0a6638; }
.badge-overdue   { background: #f8d7da; color: #842029; }
.badge-open      { background: #cff4fc; color: #055160; }
.badge-resolved  { background: #d1f4e0; color: #0a6638; }
.badge-dedicated { background: #e8d5f8; color: #5a1a8c; }
.badge-shared    { background: #fce8f8; color: var(--primary); }
.badge-info      { background: #cff4fc; color: #055160; }

/* ══ MODAL ════════════════════════════════════════════════════════════════════ */
.cf-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.35);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(2px);
}
.cf-modal {
    background: var(--white);
    border-radius: 12px;
    padding: 28px;
    width: 100%; max-width: 560px;
    max-height: 90vh; overflow-y: auto;
    box-shadow: rgba(0,0,0,0.2) 0 20px 60px;
    animation: modalIn 0.2s ease-out;
}
@keyframes modalIn { from { opacity:0; transform:translateY(-12px); } to { opacity:1; transform:translateY(0); } }
.cf-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid #f0d0ec;
}
.cf-modal-title { font-size: 17px; font-weight: 700; color: var(--primary-text); }
.cf-modal-close {
    background: none; border: none;
    color: var(--text-muted); font-size: 18px; cursor: pointer;
    width: 30px; height: 30px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
}
.cf-modal-close:hover { background: var(--primary-light); color: var(--primary); }
.cf-modal-footer {
    display: flex; gap: 10px; justify-content: flex-end;
    margin-top: 20px; padding-top: 14px;
    border-top: 1px solid #f0d0ec;
}

/* ══ ONBOARDING STEPS ════════════════════════════════════════════════════════ */
.step-list { display: flex; flex-direction: column; gap: 10px; }
.step-item {
    display: flex; align-items: flex-start; gap: 14px;
    padding: 14px 16px;
    background: var(--white);
    border: 1.5px solid #f0d0ec;
    border-radius: var(--radius);
    transition: border-color 0.15s;
}
.step-item:hover { border-color: var(--primary); }
.step-num {
    width: 34px; height: 34px; flex-shrink: 0;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px;
}
.step-num.done { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; }
.step-num.prog { background: #fff3cd; color: #664d03; }
.step-num.pend { background: #f0d0ec; color: var(--primary-text); }
.step-title { font-weight: 600; font-size: 14px; color: var(--text-dark); }
.step-desc  { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ══ FOOTER ══════════════════════════════════════════════════════════════════ */
.cf-footer {
    text-align: center;
    padding: 10px 20px;
    font-size: 12px;
    color: var(--text-muted);
    background: var(--white);
    border-top: 1px solid #f0d0ec;
    flex-shrink: 0;
}

/* ══ UTILS ════════════════════════════════════════════════════════════════════ */
.d-flex  { display: flex; }
.align-items-center  { align-items: center; }
.justify-content-between { justify-content: space-between; }
.gap-1 { gap: 4px; }  .gap-2 { gap: 8px; }  .gap-3 { gap: 12px; }
.me-1 { margin-right:4px; } .me-2 { margin-right:8px; } .me-3 { margin-right:12px; }
.ms-2 { margin-left:8px; }
.mb-0 { margin-bottom:0; } .mb-2 { margin-bottom:8px; } .mb-3 { margin-bottom:12px; }
.mt-2 { margin-top:8px; }  .mt-3 { margin-top:12px; }
.w-100 { width:100%; }
.text-muted   { color: var(--text-muted) !important; }
.text-primary { color: var(--primary-text) !important; }
.text-success { color: #198754 !important; }
.text-danger  { color: #dc3545 !important; }
.text-warning { color: #cc9a00 !important; }
.text-dark    { color: var(--text-dark) !important; }
.text-info    { color: #0891b2 !important; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fs-12  { font-size: 12px; }
.fs-13  { font-size: 13px; }
.row  { display: flex; flex-wrap: wrap; gap: 16px; }
.col  { flex: 1; min-width: 200px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.text-right { text-align: right; }
.text-center { text-align: center; }

/* ══ BLAZOR ERROR ════════════════════════════════════════════════════════════ */
#blazor-error-ui {
    background: #f8d7da; color: #842029;
    bottom: 0; left: 0; right: 0;
    padding: 10px 20px;
    position: fixed; z-index: 9999;
    display: none;
    border-top: 2px solid #f1aeb5;
    font-size: 13px;
}
#blazor-error-ui .dismiss { float: right; cursor: pointer; font-weight: 700; }

/* ══ AUTH PAGES (Login, Change Password, etc.) ═════════════════════════════════════ */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-bg) 0%, #fce8f8 50%, var(--primary-light) 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}
.auth-page::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at 20% 80%, rgba(212,74,194,0.08) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(212,74,194,0.06) 0%, transparent 50%);
    pointer-events: none;
}
.auth-card {
    background: var(--white);
    border-radius: 16px;
    padding: 36px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 8px 32px rgba(212,74,194,0.15), 0 2px 8px rgba(0,0,0,0.06);
    position: relative;
    z-index: 1;
    animation: authCardIn 0.35s ease-out;
}
@keyframes authCardIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.auth-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border);
}
.auth-logo {
    width: 52px; height: 52px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    box-shadow: 0 4px 12px rgba(212,74,194,0.35);
}
.auth-brand-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
}
.auth-brand-sub {
    font-size: 12px;
    color: var(--text-muted);
}
.auth-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
}
.auth-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}
.auth-form { display: flex; flex-direction: column; gap: 18px; }
.auth-field {}
.auth-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
}
.auth-input-wrap {
    position: relative;
}
.auth-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
    width: 18px;
    text-align: center;
}
.auth-input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-dark);
    background: var(--white);
    transition: all 0.2s;
}
.auth-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(212,74,194,0.12);
}
.auth-input::placeholder { color: var(--text-muted); }
.auth-btn {
    width: 100%;
    padding: 13px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 6px;
    box-shadow: 0 4px 12px rgba(212,74,194,0.3);
}
.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212,74,194,0.4);
}
.auth-btn:active { transform: translateY(0); }
.auth-alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
}
.auth-alert-danger {
    background: #f8d7da;
    color: #842029;
    border: 1px solid #f5c6cb;
}
.auth-alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.auth-footer-note {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.auth-page-footer {
    margin-top: auto;
    padding: 16px;
    font-size: 12px;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}

/* Auth page responsive */
@media (max-width: 480px) {
    .auth-card { padding: 28px 24px; }
    .auth-title { font-size: 20px; }
}

/* ══ SIGNUP PAGE ─────────────────────────────────────────────────────────────*/
.auth-card-wide { max-width: 680px; }
.signup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 0;
}
@media (max-width: 600px) { .signup-grid { grid-template-columns: 1fr; } }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0 12px;
    color: var(--text-muted);
    font-size: 12px;
}
.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}
.auth-btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-btn-outline:hover {
    background: var(--primary-light);
    box-shadow: 0 4px 12px rgba(212,74,194,0.15);
}
.auth-success-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 0 8px;
    text-align: center;
}
.auth-success-icon {
    font-size: 56px;
    color: #22c55e;
    line-height: 1;
}

/* ══ NAV BADGES (pending count) ──────────────────────────────────────────────*/
.cf-nav-badge {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    background: #ef4444;
    color: white;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    margin-right: 4px;
}
.cf-sub-badge {
    margin-left: auto;
    min-width: 18px;
    height: 18px;
    background: #ef4444;
    color: white;
    border-radius: 9px;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

/* ══ PAGE HEADER ─────────────────────────────────────────────────────────────*/
.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 22px; font-weight: 700; color: var(--text-dark); margin-bottom: 4px; }
.page-header h2 { font-size: 18px; font-weight: 600; color: var(--text-dark); margin-bottom: 4px; }
.page-header p  { font-size: 13px; color: var(--text-muted); }
