@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800;900&display=swap');

/* ============================================================
   DESIGN TOKENS — PREMIUM NIT STUDENT PORTAL
   ============================================================ */
:root {
    --primary:       hsl(224, 76%, 48%);
    --primary-dark:  hsl(224, 76%, 20%);
    --primary-light: hsl(217, 91%, 60%);
    --primary-xs:    hsl(214, 100%, 97%);
    --accent:        hsl(38, 52%, 56%);
    --accent-hover:  hsl(38, 52%, 48%);
    --accent-light:  hsl(38, 52%, 95%);

    --bg:            hsl(220, 30%, 96%);
    --surface:       hsl(0, 0%, 100%);
    --surface-soft:  hsl(220, 20%, 98%);
    --surface-glass: rgba(255, 255, 255, 0.85);

    --text:          hsl(222, 47%, 11%);
    --text-muted:    hsl(215, 16%, 37%);
    --text-light:    hsl(215, 16%, 60%);

    --border:        hsl(214, 32%, 91%);
    --border-focus:  hsl(217, 91%, 60%);

    --success:       hsl(142, 72%, 29%);
    --success-bg:    hsl(138, 76%, 95%);
    --error:         hsl(346, 84%, 48%);
    --error-bg:      hsl(346, 84%, 97%);
    --warning:       hsl(38, 92%, 50%);
    --warning-bg:    hsl(48, 100%, 96%);

    --shadow-xs:  0 1px 2px rgba(0,0,0,.05);
    --shadow-sm:  0 2px 10px rgba(15, 23, 42, 0.04);
    --shadow-md:  0 10px 30px rgba(15, 23, 42, 0.06);
    --shadow-lg:  0 20px 50px rgba(15, 23, 42, 0.1);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;

    --font-body:    'Inter', system-ui, -apple-system, sans-serif;
    --font-heading: 'Outfit', 'Inter', sans-serif;

    --sidebar-w: 260px;
    --topbar-h: 70px;
    --transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);

    /* Sidebar theme variables */
    --sidebar-bg:    #ffffff;
    --sidebar-text:  #475569;
    --sidebar-text-hover: #0f172a;
    --sidebar-bg-hover: #f1f5f9;
    --sidebar-border: #e2e8f0;
    --sidebar-text-title: #0f172a;
    --sidebar-text-muted: #64748b;
    --sidebar-user-name: #1e293b;
    --sidebar-user-bg: #f8fafc;
    --sidebar-user-border: #e2e8f0;
}

[data-theme="dark"] {
    --bg:            #0f172a;
    --surface:       #1e293b;
    --surface-soft:  #111827;
    --surface-glass: rgba(30, 41, 59, 0.85);

    --text:          #f8fafc;
    --text-muted:    #cbd5e1;
    --text-light:    #94a3b8;

    --border:        #334155;
    --border-focus:  #3b82f6;

    --primary-xs:    rgba(37, 99, 235, 0.1);
    --accent-light:  rgba(245, 158, 11, 0.15);
    --primary-dark:  #f8fafc;

    /* Sidebar theme mapping for student portal */
    --sidebar-bg:    #020617;
    --sidebar-text:  #cbd5e1;
    --sidebar-text-hover: #f1f5f9;
    --sidebar-bg-hover: rgba(255, 255, 255, 0.03);
    --sidebar-border: #1e293b;
    --sidebar-text-title: #f8fafc;
    --sidebar-text-muted: #475569;
    --sidebar-user-name: #f8fafc;
    --sidebar-user-bg: rgba(255, 255, 255, 0.02);
    --sidebar-user-border: rgba(255, 255, 255, 0.04);
}

/* ============================================================
   RESET & BASE STYLES
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

body.logged-in {
    background: var(--bg);
}

body.logged-out {
    background: radial-gradient(circle at 10% 20%, hsl(220, 60%, 97%) 0%, hsl(220, 30%, 93%) 90%);
}

a { text-decoration: none; color: inherit; transition: color var(--transition); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary-dark);
    font-weight: 700;
}

/* ============================================================
   PORTAL APP GRID LAYOUT
   ============================================================ */
.app-layout {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    min-height: 100vh;
    width: 100%;
}

.main-content {
    display: flex;
    flex-direction: column;
    min-width: 0; /* Prevents flexbox children blowout */
    background: var(--bg);
}

.portal-main-body {
    flex: 1;
    padding: 2rem;
    max-width: 1300px;
    width: 100%;
    margin: 0 auto;
}

/* ============================================================
   SIDEBAR COMPONENT
   ============================================================ */
.sidebar {
    background: var(--primary-dark);
    color: hsl(0, 0%, 100%);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 100;
    border-right: 3px solid var(--accent);
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition);
}

.sidebar-brand {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar-brand img {
    height: 40px;
    width: auto;
}
.sidebar-brand .brand-text h1 {
    color: #fff;
    font-size: 1.05rem;
    line-height: 1.1;
    margin: 0;
}
.sidebar-brand .brand-text p {
    font-size: 0.62rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    margin-top: 1px;
}

.sidebar-user {
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar-user-avatar-wrapper {
    position: relative;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--accent);
    background: #fff;
    flex-shrink: 0;
}
.sidebar-user-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.sidebar-user-name {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: 140px;
}
.sidebar-user-reg {
    font-size: 0.72rem;
    color: var(--text-light);
    font-family: monospace;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    overflow-y: auto;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}
.sidebar-link i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}
.sidebar-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}
.sidebar-link.active {
    color: var(--primary-dark);
    background: var(--accent);
    font-weight: 600;
}
.sidebar-link.active i {
    color: var(--primary-dark);
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    color: #fda4af;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}
.sidebar-logout:hover {
    background: rgba(244, 63, 94, 0.15);
    color: #f43f5e;
}

/* ============================================================
   TOPBAR COMPONENT
   ============================================================ */
.topbar {
    background: var(--surface);
    height: var(--topbar-h);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--border);
}
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--primary-dark);
    cursor: pointer;
    padding: 0.5rem;
}
.topbar-title h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary-dark);
}
.topbar-user {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}
.topbar-greeting {
    font-size: 0.875rem;
    color: var(--text-muted);
}
.topbar-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: border-color var(--transition);
}
.topbar-avatar:hover {
    border-color: var(--primary);
}

/* ============================================================
   PUBLIC HEADER & FOOTER (Login, search)
   ============================================================ */
.public-header {
    background: var(--primary-dark);
    height: var(--topbar-h);
    box-shadow: var(--shadow-md);
    border-bottom: 3px solid var(--accent);
}
.public-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}
.public-nav {
    display: flex;
    gap: 1.5rem;
}
.public-footer {
    background: var(--primary-dark);
    color: rgba(255, 255, 255, 0.6);
    padding: 2.5rem 0;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.footer-links {
    display: flex;
    gap: 1.5rem;
}
.footer-links a {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}
.footer-links a:hover {
    color: var(--accent);
}

.portal-footer {
    padding: 1.5rem 2rem;
    background: var(--surface-soft);
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-muted);
}
.footer-container {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* ============================================================
   CARDS & WIDGETS
   ============================================================ */
.card {
    background: var(--surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    padding: 1.75rem;
    margin-bottom: 2rem;
    transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover {
    box-shadow: var(--shadow-md);
}
.card-title {
    font-size: 1.15rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ============================================================
   GRID CONFIGURATIONS
   ============================================================ */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-widget {
    grid-column: span 1;
}

.widget-large {
    grid-column: span 2;
}

.widget-full {
    grid-column: span 3;
}

/* Quick Summary Widget */
.summary-widget {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1.25rem;
}
.summary-icon {
    width: 54px;
    height: 54px;
    border-radius: var(--radius-sm);
    background: var(--primary-xs);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.summary-info h3 {
    font-size: 1.6rem;
    font-weight: 800;
}
.summary-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* Attendance Progress Ring Widget */
.attendance-ring-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 0;
}
.progress-ring {
    position: relative;
    width: 120px;
    height: 120px;
}
.progress-ring svg {
    width: 120px;
    height: 120px;
    transform: rotate(-90deg);
}
.progress-ring circle {
    fill: none;
    stroke-width: 10;
}
.progress-ring .background-circle {
    stroke: var(--border);
}
.progress-ring .active-circle {
    stroke: var(--primary);
    stroke-linecap: round;
    transition: stroke-dashoffset 0.65s ease;
}
.progress-ring .percent-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-dark);
}

/* ============================================================
   TABLE STYLING
   ============================================================ */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
}
table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}
th {
    background: var(--surface-soft);
    color: var(--primary-dark);
    font-weight: 700;
    padding: 1rem;
    border-bottom: 2px solid var(--border);
}
td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}
tr:last-child td {
    border-bottom: none;
}
tr:hover td {
    background: var(--primary-xs);
}

/* ============================================================
   BADGES (STATUS / LABELS)
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-error { background: var(--error-bg); color: var(--error); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-info { background: var(--primary-xs); color: var(--primary); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
}
.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.2);
}
.btn-outline {
    background: transparent;
    border-color: var(--border);
    color: var(--text-muted);
}
.btn-outline:hover {
    background: var(--surface-soft);
    border-color: var(--text-light);
}
.btn-accent {
    background: var(--accent);
    color: var(--primary-dark);
}
.btn-accent:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}
.btn-danger {
    background: var(--error);
    color: #fff;
}
.btn-danger:hover {
    background: hsl(346, 84%, 38%);
}

/* ============================================================
   FORMS & INPUTS
   ============================================================ */
.form-group {
    margin-bottom: 1.25rem;
}
.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}
.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* ============================================================
   PROFILE PHOTO UPLOAD SECTION
   ============================================================ */
.photo-upload-container {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
    background: var(--surface-soft);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}
.photo-upload-preview {
    width: 140px;
    height: 140px;
    border-radius: var(--radius-md);
    border: 3px solid var(--accent);
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.photo-upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.photo-upload-controls {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.file-input-label {
    background: var(--primary);
    color: #fff;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background var(--transition);
    display: inline-block;
}
.file-input-label:hover {
    background: var(--primary-dark);
}
.photo-upload-controls input[type="file"] {
    display: none;
}
.photo-upload-note {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============================================================
   DIGITAL ID CARD STYLING
   ============================================================ */
.id-card-wrapper {
    display: flex;
    gap: 3rem;
    justify-content: center;
    flex-wrap: wrap;
    padding: 2rem 0;
}
.id-badge {
    width: 320px;
    height: 480px;
    background: linear-gradient(135deg, var(--primary-dark) 0%, hsl(224, 76%, 15%) 100%);
    color: #fff;
    border-radius: var(--radius-lg);
    border: 4px solid var(--accent);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}
.id-badge-back {
    background: hsl(220, 20%, 98%);
    color: var(--text);
    border: 4px solid var(--primary-dark);
}
.id-header {
    text-align: center;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.75rem;
    margin-bottom: 1.25rem;
}
.id-header img {
    height: 45px;
    margin: 0 auto 0.5rem auto;
}
.id-header h2 {
    color: #fff;
    font-size: 0.9rem;
    letter-spacing: -0.3px;
}
.id-header p {
    color: var(--accent);
    font-size: 0.58rem;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.08em;
}
.id-photo-container {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 3px solid var(--accent);
    overflow: hidden;
    margin: 0 auto 1rem auto;
    background: #fff;
}
.id-photo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.id-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.id-details h3 {
    color: #fff;
    text-align: center;
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}
.id-field {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0.25rem;
}
.id-field-label {
    color: var(--text-light);
    font-weight: 500;
}
.id-field-value {
    font-weight: 600;
    color: #fff;
}
.id-back-header {
    text-align: center;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
    font-weight: 800;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.5rem;
}
.id-qr {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    width: 120px;
    height: 120px;
    margin: 1rem auto;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}
.id-qr img {
    width: 100%;
    height: 100%;
}
.id-rules {
    font-size: 0.68rem;
    color: var(--text-muted);
    padding: 0 0.5rem;
    line-height: 1.4;
    text-align: center;
    margin-bottom: 1.5rem;
}
.id-signatures {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    font-size: 0.65rem;
    font-weight: 700;
    margin-top: auto;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
}

/* ============================================================
   PROVISIONAL HALL TICKET
   ============================================================ */
.hall-ticket-container {
    background: #fff;
    padding: 2.5rem;
    border: 2px solid #0f172a;
    border-radius: var(--radius-sm);
    position: relative;
}
.hall-ticket-header {
    display: grid;
    grid-template-columns: 80px 1fr 110px;
    gap: 1.5rem;
    align-items: center;
    border-bottom: 3px double #0f172a;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}
.hall-ticket-logo img {
    height: 70px;
    object-fit: contain;
}
.hall-ticket-title-block {
    text-align: center;
}
.hall-ticket-title-block h1 {
    font-size: 1.6rem;
    color: #000;
    font-family: serif;
    font-weight: 800;
    margin-bottom: 0.25rem;
}
.hall-ticket-title-block p {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #333;
}
.hall-ticket-badge-lbl {
    background: #000;
    color: #fff;
    display: inline-block;
    padding: 0.2rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 3px;
    margin-top: 0.5rem;
}
.hall-ticket-photo {
    width: 100px;
    height: 110px;
    border: 2px solid #000;
    background: #f8fafc;
    overflow: hidden;
}
.hall-ticket-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hall-ticket-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 2rem;
    margin-bottom: 2.5rem;
    font-size: 0.95rem;
}
.hall-ticket-info-field {
    border-bottom: 1px dashed #cbd5e1;
    padding-bottom: 0.25rem;
}

/* ============================================================
   RESPONSIVENESS (MOBILE-FIRST CONFIGURATIONS)
   ============================================================ */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .widget-large {
        grid-column: span 2;
    }
    .widget-full {
        grid-column: span 2;
    }
}

@media (max-width: 991px) {
    .app-layout {
        grid-template-columns: 1fr;
    }
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: var(--sidebar-w);
        transform: translateX(-100%);
        z-index: 999;
    }
    .sidebar.active,
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    .sidebar-toggle {
        display: block;
    }
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.55);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 998;
    }
    .sidebar-overlay.show {
        display: block;
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .widget-large, .widget-full, .dashboard-widget {
        grid-column: span 1;
    }
    .topbar {
        padding: 0 1.25rem;
    }
    .portal-main-body {
        padding: 1.25rem;
    }
    .photo-upload-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .topbar-greeting {
        display: none;
    }
    .id-card-wrapper {
        gap: 1.5rem;
    }
    .id-badge {
        width: 100%;
        max-width: 320px;
    }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
    body {
        background: #fff !important;
        color: #000 !important;
    }
    .sidebar, .topbar, .no-print, .portal-footer, .public-header, .public-footer {
        display: none !important;
    }
    .app-layout {
        display: block !important;
    }
    .main-content {
        display: block !important;
        background: #fff !important;
    }
    .portal-main-body {
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
    }
    .card {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .id-card-wrapper {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        gap: 20mm !important;
        page-break-inside: avoid;
    }
    .id-badge {
        border: 2px solid #000 !important;
        box-shadow: none !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .hall-ticket-container {
        border: 2px solid #000 !important;
        padding: 0 !important;
        page-break-after: avoid;
    }
}

/* ============================================================
   GLASSMORPHISM & PREMIUM UI TRANSFORMATIONS
   ============================================================ */
:root {
    --glass-bg: rgba(15, 23, 42, 0.45);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.glassmorphism {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* Card hover and micro interactions */
.card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 20px -8px rgba(0, 0, 0, 0.3);
}

/* Mobile bottom navigation bar */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 68px;
    background: rgba(15, 23, 42, 0.85); /* Slate 900 background with transparency */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15);
}

.bottom-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 550;
    gap: 0.2rem;
    flex: 1;
    height: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.bottom-nav-link i {
    font-size: 1.2rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bottom-nav-link span {
    font-size: 0.65rem;
    letter-spacing: 0.01em;
    opacity: 0.8;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bottom-nav-link:hover {
    color: #f8fafc;
}

.bottom-nav-link.active {
    color: #6366f1; /* Premium Indigo */
    font-weight: 600;
}

.bottom-nav-link.active i {
    transform: translateY(-5px) scale(1.1);
    color: #818cf8; /* Light Indigo glow */
    text-shadow: 0 0 12px rgba(129, 140, 248, 0.5);
}

.bottom-nav-link.active span {
    color: #f1f5f9;
    opacity: 1;
}

.bottom-nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 4px;
    height: 4px;
    background: #818cf8;
    border-radius: 50%;
    box-shadow: 0 0 8px #818cf8;
    animation: bounceInNav 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes bounceInNav {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Responsive Overrides */
@media (max-width: 991px) {
    .mobile-bottom-nav {
        display: flex;
    }
    .portal-main-body {
        padding-bottom: 80px !important; /* Avoid content overlap with bottom nav */
    }
    .portal-footer {
        margin-bottom: 70px !important;
    }
    /* Sidebar is shown as a toggleable drawer on mobile (see media queries above) */
    .topbar-search-container {
        margin: 0 0.5rem !important;
    }
}

@media (max-width: 576px) {
    .consulting-card > div {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center;
    }
    .consulting-card > div > div {
        flex-direction: column !important;
        align-items: center !important;
        gap: 1rem !important;
    }
    .consulting-card > div > div:last-child {
        gap: 1rem !important;
        margin-top: 1rem;
    }
}

/* Skeleton screen shimmer loading animation */
.shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.03) 25%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0.03) 75%
    );
    background-size: 200% 100%;
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ============================================================
   ELITE CONSULTANCY DESIGN OVERHAUL
   ============================================================ */
:root {
    /* Neon Glows */
    --neon-indigo: 0 0 15px rgba(99, 102, 241, 0.25);
    --neon-blue: 0 0 15px rgba(59, 130, 246, 0.25);
    --neon-cyan: 0 0 15px rgba(6, 182, 212, 0.25);
    --neon-green: 0 0 15px rgba(16, 185, 129, 0.25);
    
    /* Premium Gradients */
    --gradient-glow: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(6, 182, 212, 0.05) 100%);
    --gradient-border: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
    --gradient-border-active: linear-gradient(135deg, rgba(99, 102, 241, 0.5) 0%, rgba(6, 182, 212, 0.5) 100%);
}

/* Glassmorphic card styling */
.consulting-card {
    background: rgba(255, 255, 255, 0.04) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.15);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.consulting-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: var(--gradient-border);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    transition: background 0.4s ease;
}

.consulting-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 48px 0 rgba(99, 102, 241, 0.15), var(--neon-indigo);
    border-color: rgba(99, 102, 241, 0.25) !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

.consulting-card:hover::before {
    background: var(--gradient-border-active);
}

/* Soft radial glow effect */
.glowing-accent {
    position: absolute;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, rgba(99, 102, 241, 0) 70%);
    border-radius: 50%;
    filter: blur(25px);
    pointer-events: none;
    z-index: 0;
}

/* Translucent active navigation indicator */
.sidebar-glow-item {
    position: relative;
}

.sidebar-glow-item.active {
    background: rgba(99, 102, 241, 0.1) !important;
    color: #a5b4fc !important;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.1) !important;
}

.sidebar-glow-item.active i {
    color: #818cf8 !important;
    text-shadow: 0 0 10px rgba(129, 140, 248, 0.6);
}

.sidebar-glow-item.active::after {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 3px;
    background: linear-gradient(180deg, #6366f1 0%, #06b6d4 100%);
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.8);
}

/* Skeleton Shimmer Loading Placeholder classes */
.skeleton-placeholder {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
}
.skeleton-placeholder::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0) 100%);
    background-size: 200% 100%;
    animation: shimmer-anim 1.5s infinite;
}
@keyframes shimmer-anim {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 12px;
    margin-bottom: 8px;
    border-radius: 4px;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
}
.skeleton-title {
    height: 20px;
    margin-bottom: 15px;
    border-radius: 6px;
    width: 60%;
    background: rgba(255, 255, 255, 0.05);
}
.skeleton-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.05);
}

/* Micro-interactions */
.btn, .sidebar-link, .card, .bottom-nav-link {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn:active {
    transform: scale(0.96);
}
.sidebar-link:active {
    transform: scale(0.98);
}

/* Auto Theme Detection Utilities */
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0b0f19;
        --surface: #131926;
        --surface-soft: #182030;
        --border: rgba(255, 255, 255, 0.05);
    }
}



/* =====================================================
   NEXENTORA ADMIN PANEL STYLE OVERRIDES
   ===================================================== */

/* =====================================================
   NEXENTORA ADMIN PANEL â€” DESIGN SYSTEM
   Premium SaaS Dark Theme
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* â”€â”€ CSS Variables â”€â”€ */
:root {
  /* Colors */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #fcfdfe;
  --bg-input: #ffffff;
  --bg-sidebar: #ffffff;
  --sidebar-text: #475569;
  --sidebar-text-hover: #0f172a;
  --sidebar-bg-hover: #f1f5f9;
  --sidebar-border: #e2e8f0;
  --sidebar-text-title: #0f172a;
  --sidebar-text-muted: #64748b;
  --sidebar-user-name: #1e293b;
  --sidebar-user-bg: #f8fafc;
  --sidebar-user-border: #e2e8f0;
  --bg-topbar: rgba(255, 255, 255, 0.9);

  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-white: #1e293b;

  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  --divider: rgba(0, 0, 0, 0.05);

  /* Accent Colors */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #3b82f6;
  --primary-bg: rgba(37, 99, 235, 0.05);

  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.08);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.08);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.08);
  --info: #06b6d4;
  --info-bg: rgba(6, 182, 212, 0.08);
  --purple: #8b5cf6;
  --purple-bg: rgba(139, 92, 246, 0.08);
  --secondary: #64748b;
  --secondary-bg: rgba(100, 116, 139, 0.08);

  --whatsapp: #25d366;
  --whatsapp-bg: rgba(37, 211, 102, 0.08);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #2563eb, #7c3aed);
  --gradient-success: linear-gradient(135deg, #10b981, #06b6d4);
  --gradient-danger: linear-gradient(135deg, #ef4444, #f97316);
  --gradient-info: linear-gradient(135deg, #06b6d4, #2563eb);

  /* Spacing */
  --sidebar-width: 260px;
  --sidebar-collapsed: 70px;
  --topbar-height: 64px;

  /* Border Radius */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 50px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 4px 12px rgba(0,0,0,0.03);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.06);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.1);
  --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.2);

  /* Transitions */
  --transition: all 0.2s ease;
  --transition-slow: all 0.3s ease;
}

[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #111827;
  --bg-card: #1e293b;
  --bg-card-hover: #1e294b;
  --bg-input: #0f172a;
  --bg-sidebar: #020617;
  --sidebar-text: #94a3b8;
  --sidebar-text-hover: #f1f5f9;
  --sidebar-bg-hover: rgba(255, 255, 255, 0.03);
  --sidebar-border: #1e293b;
  --sidebar-text-title: #f8fafc;
  --sidebar-text-muted: #475569;
  --sidebar-user-name: #f8fafc;
  --sidebar-user-bg: rgba(255, 255, 255, 0.02);
  --sidebar-user-border: rgba(255, 255, 255, 0.04);
  --bg-topbar: rgba(15, 23, 42, 0.9);
  
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-white: #f8fafc;
  
  --border-color: #334155;
  --border-light: #1e293b;
  --divider: rgba(255, 255, 255, 0.05);

  --shadow: 0 4px 12px rgba(0,0,0,0.5);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.6);
}

/* â”€â”€ Reset & Base â”€â”€ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  overflow-x: hidden;
  width: 100%;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
}

a { color: var(--primary-light); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary); }

img { max-width: 100%; height: auto; }

/* â”€â”€ Scrollbar â”€â”€ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--bg-tertiary); border-radius: 10px; }

/* â”€â”€ Form Inputs â”€â”€ */
.form-control {
  width: 100%;
  background: var(--bg-input, #fff);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  transition: var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-bg);
}
.form-control::placeholder { color: var(--text-muted); }

.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.form-group { margin-bottom: 16px; }

/* Fix dropdown options for dark sidebar / dark theme */
select option,
.form-control option {
  background-color: var(--bg-card, #fff);
  color: var(--text-primary, #1e293b);
}
[data-theme="dark"] select option,
[data-theme="dark"] .form-control option {
  background-color: #1e293b;
  color: #f1f5f9;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* â”€â”€ Layout â”€â”€ */
.admin-wrapper {
  display: flex;
  min-height: 100vh;
}

.admin-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding-top: var(--topbar-height);
  min-height: 100vh;
  transition: var(--transition-slow);
}

.admin-content.sidebar-collapsed {
  margin-left: var(--sidebar-collapsed);
}

.page-content {
  padding: 24px;
}

/* ── Sidebar ── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--sidebar-border);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: var(--transition-slow);
  overflow: hidden;
}

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

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--sidebar-border);
  min-height: var(--topbar-height);
}

.sidebar-brand img {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.sidebar-brand-text h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--sidebar-text-title);
  white-space: nowrap;
  letter-spacing: -0.02em;
}

.sidebar-brand-text span {
  font-size: 0.65rem;
  color: var(--sidebar-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Sidebar profile card */
.sb-user-card {
  margin: 1.25rem;
  padding: 1rem;
  background: var(--sidebar-user-bg);
  border-radius: var(--radius);
  border: 1px solid var(--sidebar-user-border);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
}

.sb-user-card:hover {
  background: var(--sidebar-bg-hover);
  border-color: var(--sidebar-user-border);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.05);
}

.sb-user-info .sb-user-name {
  color: var(--sidebar-user-name);
}

/* Sidebar nav text must also be explicit */
.sidebar .nav-link {
  color: var(--sidebar-text);
}
.sidebar .nav-link:hover {
  color: var(--sidebar-text-hover);
  background: var(--sidebar-bg-hover);
}
.sidebar .nav-link.active {
  color: var(--primary);
  background: var(--primary-bg);
}
.sidebar .nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}

.sidebar .nav-label {
  color: var(--sidebar-text-muted);
}

.sidebar.collapsed .sidebar-brand-text,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-text,
.sidebar.collapsed .nav-arrow,
.sidebar.collapsed .sb-user-card .sb-user-info,
.sidebar.collapsed .nav-children { display: none; }

.sidebar.collapsed .sidebar-brand { justify-content: center; padding: 16px 8px; }
.sidebar.collapsed .sb-user-card { margin: 1.25rem 0.5rem; padding: 0.5rem; justify-content: center; }
.sidebar.collapsed .nav-link { justify-content: center; padding: 12px 0; }
.sidebar.collapsed .nav-link .nav-icon { margin: 0; font-size: 1.1rem; }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}

.sidebar-nav::-webkit-scrollbar { width: 0; }

.nav-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 16px 18px 6px;
}

.nav-item { position: relative; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 450;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  text-decoration: none;
  position: relative;
}

.nav-link:hover {
  color: var(--text-white);
  background: rgba(99, 102, 241, 0.06);
}

.nav-link.active {
  color: var(--primary-light);
  background: var(--primary-bg);
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}

.nav-icon {
  width: 20px;
  text-align: center;
  font-size: 0.9rem;
  flex-shrink: 0;
  opacity: 0.8;
}

.nav-text { flex: 1; white-space: nowrap; }

.nav-arrow {
  font-size: 0.65rem;
  transition: var(--transition);
  opacity: 0.5;
}

.nav-item.open > .nav-link .nav-arrow { transform: rotate(90deg); }

.nav-children {
  display: none;
  padding: 2px 0;
}

.nav-item.open > .nav-children { display: block; }

.nav-children .nav-link {
  padding: 7px 18px 7px 48px;
  font-size: 0.8rem;
  font-weight: 400;
}

.nav-children .nav-link::before { display: none; }

.nav-children .nav-link.active {
  background: transparent;
  color: var(--primary-light);
  font-weight: 500;
}

/* â”€â”€ Topbar â”€â”€ */
.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--topbar-height);
  background: var(--bg-topbar);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 999;
  transition: var(--transition-slow);
}

.topbar.sidebar-collapsed { left: var(--sidebar-collapsed); }

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sidebar-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.15rem;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.sidebar-toggle:hover { color: var(--text-white); background: var(--bg-tertiary); }

.topbar-search {
  position: relative;
}

.topbar-search input {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 14px 8px 36px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  width: 260px;
  transition: var(--transition);
  font-family: inherit;
}

.topbar-search input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
  width: 320px;
}

.topbar-search input::placeholder { color: var(--text-muted); }

.topbar-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.82rem;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-btn {
  position: relative;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.05rem;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius);
  transition: var(--transition);
}

.topbar-btn:hover { color: var(--text-white); background: var(--bg-secondary); }

.topbar-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  background: var(--danger);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topbar-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 4px 4px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.topbar-profile:hover { background: var(--bg-secondary); }

.topbar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.topbar-user-info { line-height: 1.3; }
.topbar-user-name { font-size: 0.82rem; font-weight: 600; color: var(--text-primary); }
.topbar-user-role { font-size: 0.68rem; color: var(--text-muted); }

/* Profile Dropdown */
.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 200px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 6px;
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 1001;
}

.profile-dropdown.show { display: block; }

.profile-dropdown a,
.profile-dropdown button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  color: var(--text-secondary);
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  border: none;
  background: none;
  width: 100%;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

.profile-dropdown a:hover,
.profile-dropdown button:hover { background: var(--bg-tertiary); color: var(--text-white); }

.profile-dropdown .divider {
  height: 1px;
  background: var(--border-color);
  margin: 4px 0;
}

.profile-dropdown .text-danger { color: var(--danger) !important; }

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

.page-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: -0.02em;
}

.page-header p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 2px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary-light); }
.breadcrumb .separator { opacity: 0.4; }

/* â”€â”€ Cards â”€â”€ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: var(--transition);
}

.card:hover { border-color: var(--border-light); }

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

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-white);
}

.card-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Stat Cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  opacity: 0.04;
  transform: translate(30%, -30%);
}

.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border-light); }

.stat-card.primary { border-left: 3px solid var(--primary); }
.stat-card.primary::after { background: var(--primary); }
.stat-card.success { border-left: 3px solid var(--success); }
.stat-card.success::after { background: var(--success); }
.stat-card.warning { border-left: 3px solid var(--warning); }
.stat-card.warning::after { background: var(--warning); }
.stat-card.danger { border-left: 3px solid var(--danger); }
.stat-card.danger::after { background: var(--danger); }
.stat-card.info { border-left: 3px solid var(--info); }
.stat-card.info::after { background: var(--info); }
.stat-card.purple { border-left: 3px solid var(--purple); }
.stat-card.purple::after { background: var(--purple); }

.stat-info h3 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-info p {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-info .stat-change {
  font-size: 0.72rem;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.stat-change.up { background: var(--success-bg); color: var(--success); }
.stat-change.down { background: var(--danger-bg); color: var(--danger); }

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.stat-icon.primary { background: var(--primary-bg); color: var(--primary-light); }
.stat-icon.success { background: var(--success-bg); color: var(--success); }
.stat-icon.warning { background: var(--warning-bg); color: var(--warning); }
.stat-icon.danger { background: var(--danger-bg); color: var(--danger); }
.stat-icon.info { background: var(--info-bg); color: var(--info); }
.stat-icon.purple { background: var(--purple-bg); color: var(--purple); }

/* â”€â”€ Grid System â”€â”€ */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }

/* â”€â”€ Tables â”€â”€ */
.table-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

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

.table-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-white);
}

.table-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

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

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  background: var(--bg-primary);
  padding: 10px 16px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  border-bottom: 1px solid var(--border-color);
}

tbody td {
  padding: 12px 16px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--divider);
  vertical-align: middle;
}

tbody tr:hover { background: rgba(99,102,241,0.03); }
tbody tr:last-child td { border-bottom: none; }

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

.table-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.table-user-info .name { font-weight: 500; color: var(--text-white); font-size: 0.82rem; }
.table-user-info .sub { font-size: 0.72rem; color: var(--text-muted); }

.table-actions {
  display: flex;
  gap: 4px;
}

.table-actions .action-btn {
  width: 30px;
  height: 30px;
  border: none;
  background: none;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: var(--transition);
}

.table-actions .action-btn:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.table-actions .action-btn.danger:hover { background: var(--danger-bg); color: var(--danger); }

/* Standalone action-btn (outside .table-actions) */
.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  background: none;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.8rem;
  transition: var(--transition);
  text-decoration: none;
}
.action-btn:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.action-btn.danger:hover { background: var(--danger-bg); color: var(--danger); }

/* â”€â”€ Badges â”€â”€ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge-primary { background: var(--primary-bg); color: var(--primary-light); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-purple { background: var(--purple-bg); color: var(--purple); }
.badge-secondary { background: var(--secondary-bg); color: var(--secondary); }

/* â”€â”€ Buttons â”€â”€ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border: none;
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-weight: 550;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-sm { padding: 6px 12px; font-size: 0.75rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 12px 24px; font-size: 0.9rem; }

.btn-primary { background: var(--gradient-primary); color: white; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-glow); color: white; }

.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #059669; color: white; }

.btn-warning { background: var(--warning); color: #1e293b; }
.btn-warning:hover { background: #d97706; }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; color: white; }

.btn-info { background: var(--info); color: white; }
.btn-info:hover { background: #0891b2; color: white; }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary-light); background: var(--primary-bg); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover { background: var(--bg-tertiary); color: var(--text-white); }

.btn-whatsapp { background: var(--whatsapp); color: white; }
.btn-whatsapp:hover { background: #1fba59; color: white; }

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
}

.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* â”€â”€ Forms â”€â”€ */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 550;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-label .required {
  color: var(--danger);
  margin-left: 2px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-family: inherit;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

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

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

textarea.form-control { resize: vertical; min-height: 100px; }

.form-text {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-error {
  font-size: 0.72rem;
  color: var(--danger);
  margin-top: 4px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.form-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

.form-select-sm {
  padding: 6px 30px 6px 10px;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  width: 40px;
  height: 22px;
  cursor: pointer;
}

.toggle-switch input { display: none; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg-tertiary);
  border-radius: 22px;
  transition: var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  transition: var(--transition);
}

.toggle-switch input:checked + .toggle-slider { background: var(--primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }

/* Search Input Filter */
.search-input {
  position: relative;
}

.search-input input {
  padding-left: 34px;
}

.search-input i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* â”€â”€ Modals â”€â”€ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

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

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: modalSlideIn 0.25s ease;
}

@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

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

.modal-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-white);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.modal-close:hover { color: var(--text-white); background: var(--bg-tertiary); }

.modal-body { padding: 24px; }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
}

/* â”€â”€ Toast / Alerts â”€â”€ */
.toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 280px;
  max-width: 420px;
  animation: toastSlideIn 0.3s ease;
  font-size: 0.82rem;
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}

.toast.toast-success { border-left: 3px solid var(--success); }
.toast.toast-error { border-left: 3px solid var(--danger); }
.toast.toast-warning { border-left: 3px solid var(--warning); }
.toast.toast-info { border-left: 3px solid var(--info); }

.toast-icon { font-size: 1rem; }
.toast-success .toast-icon { color: var(--success); }
.toast-error .toast-icon { color: var(--danger); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-info .toast-icon { color: var(--info); }

.toast-content { flex: 1; color: var(--text-primary); }

.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
  font-size: 0.9rem;
}

/* Alert Inline */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.82rem;
  margin-bottom: 16px;
}

.alert-success { background: var(--success-bg); border: 1px solid rgba(16,185,129,0.2); color: var(--success); }
.alert-error { background: var(--danger-bg); border: 1px solid rgba(239,68,68,0.2); color: var(--danger); }
.alert-warning { background: var(--warning-bg); border: 1px solid rgba(245,158,11,0.2); color: var(--warning); }
.alert-info { background: var(--info-bg); border: 1px solid rgba(6,182,212,0.2); color: var(--info); }

/* â”€â”€ Pagination â”€â”€ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 12px;
}

.pagination-info {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.pagination-links {
  display: flex;
  gap: 4px;
}

.pagination-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  transition: var(--transition);
  text-decoration: none;
}

.pagination-btn:hover { background: var(--bg-tertiary); color: var(--text-white); }
.pagination-btn.active { background: var(--primary); color: white; }

/* â”€â”€ Tabs â”€â”€ */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
  overflow-x: auto;
}

.tab-btn {
  padding: 10px 20px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
  white-space: nowrap;
  font-family: inherit;
}

.tab-btn:hover { color: var(--text-white); }

.tab-btn.active {
  color: var(--primary-light);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px 2px 0 0;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* â”€â”€ Empty State â”€â”€ */
.empty-state {
  text-align: center;
  padding: 48px 20px;
}

.empty-state i {
  font-size: 3rem;
  color: var(--text-muted);
  opacity: 0.4;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* â”€â”€ Activity Timeline â”€â”€ */
.timeline {
  position: relative;
  padding-left: 24px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

.timeline-item {
  position: relative;
  padding-bottom: 18px;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -20px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid var(--primary);
}

.timeline-dot.success { border-color: var(--success); }
.timeline-dot.warning { border-color: var(--warning); }
.timeline-dot.danger { border-color: var(--danger); }

.timeline-content h4 {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.timeline-content p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* â”€â”€ Progress Bar â”€â”€ */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 6px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 6px;
  background: var(--gradient-primary);
  transition: width 0.5s ease;
}

.progress-fill.success { background: var(--gradient-success); }

.progress-text {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* â”€â”€ Charts â”€â”€ */
.chart-container {
  position: relative;
  height: 280px;
  width: 100%;
}

.chart-container-sm { height: 200px; }

/* â”€â”€ Pipeline / Kanban â”€â”€ */
.pipeline,
.pipeline-board {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
}

.pipeline-column,
.pipeline-col {
  min-width: 240px;
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 14px;
  overflow: hidden;
}

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

.pipeline-header h4 {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pipeline-count {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
}

.pipeline-body {
  padding: 8px;
  min-height: 100px;
}

.pipeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.pipeline-card:hover { border-color: var(--primary); background: var(--bg-card-hover); }

.pipeline-card h5 {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-white);
  margin-bottom: 6px;
}

.pipeline-card p {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.pipeline-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

/* â”€â”€ Confirm Dialog â”€â”€ */
.confirm-dialog .modal {
  max-width: 400px;
  text-align: center;
}

.confirm-dialog .confirm-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--danger-bg);
  color: var(--danger);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 16px;
}

.confirm-dialog h3 { margin-bottom: 8px; }
.confirm-dialog p { color: var(--text-muted); }

/* â”€â”€ Flex Utilities â”€â”€ */
.d-flex { display: flex; }
.d-grid { display: grid; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-col { flex-direction: column; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }

/* â”€â”€ Spacing Utilities â”€â”€ */
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 24px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 24px; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary-light); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-white { color: var(--text-white) !important; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fs-sm { font-size: 0.75rem; }
.fs-lg { font-size: 1.1rem; }

/* â”€â”€ Quick Actions â”€â”€ */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 10px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 500;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
}

.quick-action i { font-size: 1.2rem; }
.quick-action:hover { border-color: var(--primary); color: var(--primary-light); background: var(--primary-bg); }

/* â”€â”€ Login Page â”€â”€ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99,102,241,0.08), transparent 70%);
  border-radius: 50%;
}

.login-page::after {
  content: '';
  position: absolute;
  bottom: -30%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(139,92,246,0.06), transparent 70%);
  border-radius: 50%;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 36px;
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-xl);
}

.login-logo {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo img {
  width: 50px;
  height: 50px;
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.login-logo h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 4px;
}

.login-logo p {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.login-card .btn-primary {
  width: 100%;
  justify-content: center;
  padding: 12px;
  font-size: 0.88rem;
}

/* â”€â”€ Mobile Responsive â”€â”€ */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
}

/* Tablet < 1024px */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .topbar-search input { width: 180px; }
  .topbar-search input:focus { width: 220px; }
}

/* Mobile < 991px */
@media (max-width: 991px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 1001;
    width: var(--sidebar-width);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .sidebar-overlay.show { display: block; }

  .admin-content {
    margin-left: 0 !important;
  }

  .topbar {
    left: 0 !important;
  }

  .mobile-nav-toggle { display: block; }

  .page-content { padding: 16px; }
  .page-header { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }

  .stat-grid { grid-template-columns: 1fr; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

  .table-header { flex-direction: column; align-items: flex-start; }
  .table-filters { width: 100%; }

  .topbar-search { display: none; }
  .topbar-user-info { display: none; }

  .form-row { grid-template-columns: 1fr; }

  .pipeline { flex-direction: column; }
  .pipeline-column { min-width: 100%; }

  .modal { margin: 10px; max-width: calc(100% - 20px); }

  .quick-actions { grid-template-columns: repeat(2, 1fr); }

  .tabs { gap: 0; }
  .tab-btn { padding: 8px 12px; font-size: 0.75rem; }

  .pagination { flex-direction: column; align-items: center; }
}

/* Small Mobile < 576px */
@media (max-width: 576px) {
    .main-content,
    .admin-content {
        padding: 4.5rem 0.75rem 2rem !important;
    }
    .page-content {
        padding: 8px !important;
    }
    .stat-card { padding: 14px; }
    .stat-info h3 { font-size: 1.3rem; }
    .card { padding: 14px; }
    .btn-group { flex-direction: column; }
    .btn-group .btn { width: 100%; justify-content: center; }
}

/* Small Mobile < 480px */
@media (max-width: 480px) {
    .login-card { padding: 24px; margin: 10px; }
}

/* Print */
@media print {
  .sidebar, .topbar, .toast-container { display: none !important; }
  .admin-content { margin-left: 0 !important; padding-top: 0 !important; }
  .page-content { padding: 0 !important; }
  body { background: white; color: #1e293b; }
  .card { border: 1px solid #e2e8f0; }
}

/* ============================================================
   PHASE 6 — PREMIUM SAAS PORTAL UPGRADES
   ============================================================ */

/* 1. Light/Dark HSL Token Mapping */
[data-theme="dark"] {
    --primary:       hsl(224, 76%, 60%);
    --primary-dark:  hsl(224, 76%, 15%);
    --primary-light: hsl(217, 91%, 65%);
    --primary-xs:    hsl(224, 50%, 12%);
    --bg:            hsl(222, 47%, 10%);
    --surface:       hsl(222, 47%, 15%);
    --surface-soft:  hsl(222, 47%, 18%);
    --surface-glass: rgba(15, 23, 42, 0.75);

    --text:          hsl(210, 40%, 98%);
    --text-muted:    hsl(215, 20%, 80%);
    --text-light:    hsl(215, 16%, 60%);

    --border:        hsl(222, 30%, 25%);
    --border-focus:  hsl(217, 91%, 65%);

    --success:       hsl(142, 72%, 45%);
    --success-bg:    hsl(142, 50%, 15%);
    --error:         hsl(346, 84%, 60%);
    --error-bg:      hsl(346, 50%, 15%);
    --warning:       hsl(38, 92%, 60%);
    --warning-bg:    hsl(38, 50%, 15%);
    --shadow-sm:     0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow-md:     0 10px 30px rgba(0, 0, 0, 0.4);
    --shadow-lg:     0 20px 50px rgba(0, 0, 0, 0.5);
}

/* 2. Glassmorphism Card styling & upgrades */
.card, .stat-card {
    backdrop-filter: var(--glass-blur, blur(12px));
    -webkit-backdrop-filter: var(--glass-blur, blur(12px));
    background: var(--surface-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s ease;
}

.card:hover, .stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px -5px rgba(37, 99, 235, 0.12), 0 8px 10px -6px rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.3);
}

/* Welcome premium card style */
.gradient-primary-card {
    background: linear-gradient(135deg, hsl(224, 76%, 48%) 0%, hsl(262, 83%, 58%) 100%) !important;
    border: none !important;
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.4) !important;
}

/* 3. Skeleton Loading & Shimmer Animation */
.skeleton-placeholder {
    background: linear-gradient(90deg, var(--border) 25%, var(--surface-soft) 50%, var(--border) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
    display: inline-block;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Structure-aware skeletons */
.skeleton-circle {
    width: 60px;
    height: 60px;
    border-radius: 50% !important;
}

.skeleton-text {
    height: 12px;
    margin-bottom: 8px;
    width: 100%;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-card {
    padding: 24px;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 4. Bottom Mobile Navigation Upgrades */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--surface-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    padding: 0 10px;
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
    }
}

.bottom-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 500;
    text-decoration: none;
    width: 60px;
    height: 100%;
    gap: 4px;
    transition: color 0.25s ease, transform 0.25s ease;
    position: relative;
}

.bottom-nav-link i {
    font-size: 1.25rem;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bottom-nav-link.active {
    color: var(--primary);
    font-weight: 700;
}

.bottom-nav-link.active i {
    transform: translateY(-5px) scale(1.15);
}

/* Dot indicator on active bottom nav link */
.bottom-nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 8px var(--primary);
}

/* Button micro-interactions */
.btn, .action-btn {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:active, .action-btn:active {
    transform: scale(0.96) !important;
}

/* ============================================================
   PHASE 13 — ACCESSIBILITY & ENTERPRISE AUDIT REMEDIATION
   ============================================================ */

/* Skip Link Utility - Visually hidden until focused by keyboard */
.skip-link {
    position: absolute;
    top: -100px;
    left: 20px;
    background: #2563eb;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 0 0 8px 8px;
    z-index: 99999;
    font-weight: 800;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.35);
    transition: top 0.2s ease-in-out;
}

.skip-link:focus {
    top: 0;
    outline: none;
}

/* Global keyboard focus outline states */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.sb-user-card-link:focus-visible {
    outline: 3px solid #3b82f6 !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.35) !important;
}

/* Ensure no visual regressions for custom inputs/buttons */
.form-control:focus-visible {
    border-color: #3b82f6 !important;
}

/* ============================================================
   THEME MODERNIZATION & DEFENSIVE UTILITY OVERRIDES
   ============================================================ */
.profile-dropdown,
.dropdown-menu {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

.logo-pill {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .bg-white {
    background-color: var(--surface) !important;
}

[data-theme="dark"] .bg-light {
    background-color: var(--surface-soft) !important;
}

[data-theme="dark"] .text-dark {
    color: var(--text) !important;
}

[data-theme="dark"] .text-black {
    color: var(--text) !important;
}

[data-theme="dark"] .modal-content {
    background-color: var(--surface) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
}


