/* ==========================================================================
   Super 10 - Enterprise Financial & Co-operative Management System
   Modern, Ultra-Premium Responsive Design System
   ========================================================================== */

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

:root {
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Color Palette - Dark Theme Default */
    --bg-base: #0a0e17;
    --bg-surface: #111827;
    --bg-surface-elevated: #1f293d;
    --bg-glass: rgba(17, 24, 39, 0.75);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(16, 185, 129, 0.3);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --brand-primary: #10b981;
    --brand-primary-light: #34d399;
    --brand-primary-dark: #059669;
    --brand-primary-glow: rgba(16, 185, 129, 0.18);

    --brand-secondary: #6366f1;
    --brand-secondary-light: #818cf8;
    --brand-secondary-glow: rgba(99, 102, 241, 0.18);

    --brand-accent: #f59e0b;
    --brand-accent-glow: rgba(245, 158, 11, 0.18);

    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.18);
    --success: #10b981;
    --warning: #f59e0b;
    --info: #3b82f6;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --shadow-subtle: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
    --shadow-elevated: 0 10px 30px -5px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 25px var(--brand-primary-glow);

    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
    --bg-base: #f1f5f9;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #f8fafc;
    --bg-glass: rgba(255, 255, 255, 0.85);
    --border-color: #e2e8f0;
    --border-highlight: rgba(16, 185, 129, 0.4);

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --brand-primary-glow: rgba(16, 185, 129, 0.12);
    --brand-secondary-glow: rgba(99, 102, 241, 0.12);
    --shadow-subtle: 0 4px 15px -1px rgba(0, 0, 0, 0.05);
    --shadow-elevated: 0 10px 25px -3px rgba(0, 0, 0, 0.08);
}

/* Reset & Basics */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Layout */
.app-container {
    display: flex;
    width: 100vw;
    min-height: 100vh;
}

/* Sidebar */
.app-sidebar {
    width: 270px;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: transform var(--transition-normal);
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px 24px 8px;
    border-bottom: 1px solid var(--border-color);
}

.brand-logo {
    display: block;
    width: 100%;
    max-width: 220px;
    height: auto;
    margin: 0 auto;
}

.login-visual-logo {
    display: block;
    width: 100%;
    max-width: 300px;
    height: auto;
    margin-bottom: 22px;
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.55));
}

.login-form-logo {
    display: block;
    width: 100%;
    max-width: 240px;
    height: auto;
}

.brand-badge {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 20px;
    color: #ffffff;
    box-shadow: 0 4px 14px var(--brand-primary-glow);
}

.brand-text h1 {
    font-family: var(--font-heading);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--text-primary);
}

.brand-text p {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Navigation */
.nav-menu {
    list-style: none;
    margin-top: 20px;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    padding: 12px 12px 6px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.nav-link svg {
    width: 19px;
    height: 19px;
    stroke-width: 2;
    transition: stroke var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-surface-elevated);
}

.nav-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand-primary-dark), var(--brand-primary));
    box-shadow: 0 4px 15px var(--brand-primary-glow);
}

.nav-link.active svg {
    stroke: #ffffff;
}

.sidebar-footer {
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.theme-toggle-btn {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.theme-toggle-btn:hover {
    color: var(--brand-primary);
    border-color: var(--brand-primary);
}

/* Main Content Area */
.main-wrapper {
    margin-left: 270px;
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: calc(100vw - 270px);
}

/* Header */
.app-header {
    height: 72px;
    padding: 0 32px;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 90;
}

.header-left h2 {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.header-left p {
    font-size: 13px;
    color: var(--text-secondary);
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
    color: #ffffff;
    box-shadow: 0 3px 12px var(--brand-primary-glow);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px var(--brand-primary-glow);
}

.btn-secondary {
    background: var(--bg-surface-elevated);
    border-color: var(--border-color);
    color: var(--text-primary);
}
.btn-secondary:hover {
    background: var(--border-color);
}

.btn-outline {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-secondary);
}
.btn-outline:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12.5px;
}

/* Content Views */
.content-body {
    padding: 32px;
    flex: 1;
}

.view-section {
    display: none;
    animation: fadeIn 0.25s ease-out;
}
.view-section.active {
    display: block;
}

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

/* Metric / KPI Cards Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 22px;
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-fast), border-color var(--transition-fast);
}

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

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.stat-card-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-card-icon.emerald {
    background: var(--brand-primary-glow);
    color: var(--brand-primary-light);
}

.stat-card-icon.indigo {
    background: var(--brand-secondary-glow);
    color: var(--brand-secondary-light);
}

.stat-card-icon.amber {
    background: var(--brand-accent-glow);
    color: var(--brand-accent);
}

.stat-card-icon.rose {
    background: var(--danger-glow);
    color: var(--danger);
}

.stat-card-value {
    font-family: var(--font-heading);
    font-size: 27px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.stat-card-footer {
    font-size: 12.5px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.badge-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-size: 11.5px;
    font-weight: 600;
}
.badge-tag.success { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.badge-tag.warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.badge-tag.danger { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.badge-tag.info { background: rgba(99, 102, 241, 0.15); color: #a5b4fc; }

/* Panels & Cards */
.panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-subtle);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.panel-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13.5px;
}

.data-table th {
    background: var(--bg-surface-elevated);
    padding: 13px 16px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.data-table td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
    background: var(--bg-surface-elevated);
}

.money-cell {
    font-family: var(--font-mono);
    font-weight: 600;
    white-space: nowrap;
}

/* Month Selector Tabs */
.month-pills-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 20px;
}

.month-pill {
    padding: 8px 16px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-fast);
}

.month-pill:hover {
    color: var(--text-primary);
    border-color: var(--border-highlight);
}

.month-pill.active {
    background: var(--brand-primary);
    color: #ffffff;
    border-color: var(--brand-primary);
    box-shadow: 0 2px 10px var(--brand-primary-glow);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-elevated);
    transform: scale(0.95);
    transition: transform var(--transition-normal);
}

.modal-card.modal-xl {
    width: 96%;
    max-width: 1280px;
    max-height: 94vh;
}

/* Create Next Month form */
.cm-intro {
    font-size: 13.5px;
    color: var(--text-secondary);
    margin-bottom: 18px;
}

.cm-section-title {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 6px 0 12px;
}

.cm-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.cm-section-head .cm-section-title {
    margin-bottom: 8px;
}

.cm-section-actions {
    display: flex;
    gap: 8px;
}

.cm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0 16px;
}

.cm-auto {
    border-style: dashed;
}

.cm-auto-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.cm-auto-toggle input {
    accent-color: var(--brand-primary);
    width: 15px;
    height: 15px;
}

.cm-table-wrap {
    margin-bottom: 22px;
    max-height: 460px;
    overflow: auto;
}

.cm-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 10px 8px;
    font-size: 12px;
}

.cm-table td {
    padding: 6px 6px;
}

.cm-table .cm-member {
    min-width: 160px;
    white-space: nowrap;
}

.cm-input {
    min-width: 92px;
    padding: 6px 8px;
    font-size: 13px;
    font-family: var(--font-mono);
}

.cm-input.cm-status {
    min-width: 82px;
    font-family: var(--font-main);
}

.cm-input.cm-input-wide {
    min-width: 190px;
    font-family: var(--font-main);
}

.cm-include {
    accent-color: var(--brand-primary);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.cm-row-excluded td {
    opacity: 0.4;
}

.cm-row-excluded td:first-child {
    opacity: 1;
}

.cm-row-changed td {
    background: rgba(245, 158, 11, 0.08);
}

.cm-row-changed td:first-child {
    box-shadow: inset 3px 0 0 var(--brand-accent);
}

/* Edit All Payments */
.ep-cascade {
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--brand-secondary);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin-bottom: 18px;
}

.ep-cascade:empty {
    display: none;
}

.ep-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    background: var(--bg-surface-elevated);
    border-radius: var(--radius-md);
    padding: 14px 16px;
}

.ep-summary small {
    display: block;
    font-size: 11.5px;
    color: var(--text-muted);
}

.ep-summary strong {
    font-family: var(--font-mono);
    font-size: 14px;
}

.ep-delta {
    display: block;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
}

.ep-delta.up { color: var(--success); }
.ep-delta.down { color: var(--danger); }

/* Delete confirmation */
.del-archive-note {
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--brand-secondary-glow);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin-bottom: 16px;
}

.del-error {
    color: var(--danger);
    font-size: 13px;
    min-height: 18px;
}

/* Deletion report & change log */
.archive-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--border-color);
}

.archive-tab {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 14px;
    cursor: pointer;
    margin-bottom: -1px;
}

.archive-tab.active {
    color: var(--text-primary);
    border-bottom-color: var(--brand-primary);
}

.archive-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0 14px;
}

.archive-filters .form-group {
    min-width: 160px;
}

.archive-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.archive-stat {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
}

.archive-stat small {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.archive-stat strong {
    font-family: var(--font-heading);
    font-size: 22px;
}

.archive-stat-wide {
    grid-column: span 2;
}

.archive-chip {
    display: inline-block;
    font-size: 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 3px 10px;
    margin: 2px 4px 2px 0;
}

.archive-chip strong {
    font-size: 12px;
    font-family: var(--font-main);
}

.archive-folder {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 14px;
    overflow: hidden;
}

.archive-folder > summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 12px 16px;
    background: var(--bg-surface-elevated);
    font-weight: 700;
    font-family: var(--font-heading);
    list-style: none;
}

.archive-folder > summary::-webkit-details-marker {
    display: none;
}

.archive-folder-count {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-muted);
    font-family: var(--font-main);
}

.archive-folder .table-responsive {
    border: none;
    border-radius: 0;
}

.archive-table .badge-tag {
    white-space: nowrap;
}

.archive-reason {
    max-width: 260px;
    font-style: italic;
}

.archive-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 24px;
}

.archive-meta {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 6px 18px;
    font-size: 13.5px;
}

.archive-meta dt {
    color: var(--text-muted);
    font-weight: 600;
}

.archive-rows {
    max-height: 320px;
    overflow: auto;
}

.archive-rows .data-table td,
.archive-rows .data-table th {
    padding: 6px 10px;
    font-size: 12px;
    white-space: nowrap;
}

.audit-details {
    margin-top: 6px;
    font-size: 12.5px;
    color: var(--text-secondary);
}

.audit-details summary {
    cursor: pointer;
    color: var(--brand-secondary-light);
}

.audit-details ul {
    margin: 4px 0 4px 18px;
}

.audit-change {
    margin-top: 6px;
}

.print-only {
    display: none;
}

@media (max-width: 640px) {
    .archive-stat-wide {
        grid-column: auto;
    }
}

@media print {
    .no-print {
        display: none !important;
    }
    .print-only {
        display: block;
    }
    .archive-folder {
        break-inside: avoid;
    }
}

/* Member card dues */
.dues-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dues-label {
    font-size: 12px;
    color: var(--text-muted);
}

.dues-breakdown {
    margin-top: 6px;
    border-top: 1px dashed var(--border-color);
    padding-top: 6px;
}

.dues-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.7;
}

.dues-line > span:first-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.dues-line .money-cell {
    flex-shrink: 0;
}

.dues-line em {
    white-space: nowrap;
    font-style: normal;
    font-size: 11px;
    opacity: 0.85;
}

.dues-line .money-cell {
    font-size: 12px;
    font-weight: 600;
}

.dues-line.has {
    color: var(--text-secondary);
}

.dues-line.has .money-cell {
    color: #f87171;
}

.dues-detail {
    font-size: 11.5px;
    color: var(--text-muted);
    text-align: right;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cm-formula-note {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: -4px;
}

.modal-overlay.open .modal-card {
    transform: scale(1);
}

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

.modal-title {
    font-family: var(--font-heading);
    font-size: 19px;
    font-weight: 700;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 22px;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    line-height: 1;
}
.modal-close-btn:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

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

/* Form Controls */
.form-group {
    margin-bottom: 18px;
}

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

.form-control {
    width: 100%;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 14px;
    font-family: var(--font-main);
    color: var(--text-primary);
    outline: none;
    transition: border-color var(--transition-fast);
}

.form-control:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px var(--brand-primary-glow);
}

/* Toast */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1100;
}

.toast {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--brand-primary);
    border-radius: var(--radius-sm);
    padding: 14px 20px;
    color: var(--text-primary);
    font-size: 13.5px;
    box-shadow: var(--shadow-elevated);
    animation: slideInRight 0.3s ease forwards;
}

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

/* Responsive */
@media (max-width: 992px) {
    .app-sidebar {
        transform: translateX(-100%);
    }
    .app-sidebar.mobile-open {
        transform: translateX(0);
    }
    .main-wrapper {
        margin-left: 0;
        width: 100vw;
    }
}

/* Print Stylesheet matching PDF layout */
@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }
    .app-sidebar, .app-header, .btn, .month-pills-bar, .modal-overlay, .toast-container, .theme-toggle-btn {
        display: none !important;
    }
    .main-wrapper {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }
    .content-body {
        padding: 0 !important;
    }
    .panel {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        margin-bottom: 20px !important;
        page-break-inside: avoid;
    }
}

/* Role Badges & Permissions */
.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.role-badge.super_admin {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(245, 158, 11, 0.2));
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}
.role-badge.admin {
    background: rgba(99, 102, 241, 0.18);
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: #a5b4fc;
}
.role-badge.shoddosho {
    background: rgba(16, 185, 129, 0.18);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
}

/* Delete / Power buttons */
.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    box-shadow: 0 3px 12px var(--danger-glow);
}
.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px var(--danger-glow);
}
.btn-icon-danger {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}
.btn-icon-danger:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
    color: #ffffff;
}

/* User Profile Header Chip */
.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    padding: 5px 14px 5px 6px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.user-chip:hover {
    border-color: var(--brand-primary);
}
.user-avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: #ffffff;
}

.power-action-btns {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

/* ==========================================================================
   Enterprise Split-Screen Login Portal Template
   ========================================================================== */
.login-screen-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 15% 15%, rgba(16, 185, 129, 0.15), transparent 45%),
                radial-gradient(circle at 85% 85%, rgba(99, 102, 241, 0.14), transparent 45%),
                #070a10;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 24px;
    overflow-y: auto;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.login-container-split {
    display: flex;
    width: 100%;
    max-width: 1040px;
    min-height: 600px;
    background: var(--bg-surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.9), 0 0 40px rgba(16, 185, 129, 0.1);
    overflow: hidden;
    position: relative;
    animation: zoomIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes zoomIn {
    from { transform: scale(0.96); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Left Visual Pane */
.login-visual-pane {
    flex: 1.15;
    position: relative;
    background-image: url('../img/login_hero.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 44px 38px;
    color: #ffffff;
    overflow: hidden;
}

.login-visual-pane::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(7, 10, 16, 0.45) 0%, rgba(7, 10, 16, 0.78) 65%, rgba(7, 10, 16, 0.95) 100%),
                linear-gradient(135deg, rgba(16, 185, 129, 0.3) 0%, transparent 60%);
    z-index: 1;
}

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

.login-visual-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.login-visual-badge svg {
    width: 14px !important;
    height: 14px !important;
    flex-shrink: 0;
}

.login-visual-title {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
    color: #ffffff;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7);
}

.login-visual-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: 420px;
}

.login-visual-stats {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: auto;
}

.login-vstat-box {
    background: rgba(17, 24, 39, 0.75);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    padding: 12px 10px;
}

.login-vstat-val {
    font-family: var(--font-heading);
    font-size: 19px;
    font-weight: 700;
    color: #34d399;
    letter-spacing: -0.3px;
}

.login-vstat-lbl {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.75);
    margin-top: 3px;
    font-weight: 500;
    line-height: 1.3;
}

/* Right Form Pane */
.login-form-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 44px 40px;
    background: var(--bg-surface);
    position: relative;
}

.login-form-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.login-brand-icon-sm {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 20px;
    color: #ffffff;
    box-shadow: 0 4px 16px var(--brand-primary-glow);
    flex-shrink: 0;
}

.login-form-title {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.4px;
    margin-bottom: 4px;
}

.login-form-sub {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 22px;
}

.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-icon-wrapper .input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    width: 18px;
    height: 18px;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.input-icon-wrapper .input-icon svg {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    display: block;
    flex-shrink: 0;
}

.input-icon-wrapper .form-control {
    padding-left: 44px;
    padding-right: 44px;
    height: 46px;
    font-size: 14px;
    border-radius: var(--radius-sm);
    width: 100%;
}

.input-pwd-toggle {
    position: absolute;
    right: 10px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: color var(--transition-fast);
}

.input-pwd-toggle svg {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    display: block;
    flex-shrink: 0;
}

.input-pwd-toggle:hover {
    color: var(--text-primary);
}

.login-error-alert {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    padding: 11px 15px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 18px;
    display: none;
    animation: fadeIn 0.2s ease;
}

/* Responsive adjustment for login */
@media (max-width: 860px) {
    .login-screen-wrapper {
        padding: 16px;
        align-items: flex-start;
    }
    .login-container-split {
        flex-direction: column;
        max-width: 480px;
        min-height: auto;
        margin: auto;
    }
    .login-visual-pane {
        flex: none;
        height: 200px;
        padding: 24px 20px;
        display: flex;
    }
    .login-visual-title {
        font-size: 20px;
        margin-bottom: 4px;
    }
    .login-visual-desc,
    .login-visual-stats,
    .login-visual-logo {
        display: none;
    }
    .login-container-split,
    .login-form-pane,
    .login-visual-pane {
        min-width: 0;
    }
    .login-visual-badge {
        margin-bottom: 10px;
        padding: 4px 10px;
        font-size: 10px;
    }
    .login-form-pane {
        padding: 28px 22px;
    }
}



