/* ============================================
   GROUP FINANCE - ADMIN THEME
   "Banking Heritage" - Refined Corporate Design

   Aesthetic: Sophisticated financial institution
   Typography: Source Serif 4 + DM Sans
   Palette: Warm ivory, deep navy, brass accents
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Source+Serif+4:opsz,wght@8..60,400;8..60,600;8..60,700&display=swap');

/* ============================================
   HARD RESET - Override framework defaults
   ============================================ */
html, body {
    margin: 0 !important;
    padding: 0 !important;
}

body > .wrap,
body > .container,
body > .container-fluid,
.wrap {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Override Bootstrap navbar defaults */
.navbar {
    border-radius: 0 !important;
    margin-bottom: 0 !important;
    border: none !important;
}

:root {
    /* Core Backgrounds - Warm Ivory Tones */
    --bg-primary: #faf9f7;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f5f4f1;
    --bg-card: #ffffff;
    --bg-card-hover: #fdfcfb;
    --bg-sidebar: #1a1f2e;

    /* Card & Surface Styling */
    --card-border: #e8e6e1;
    --card-shadow: 0 1px 3px rgba(26, 31, 46, 0.04), 0 4px 12px rgba(26, 31, 46, 0.03);
    --card-shadow-hover: 0 2px 8px rgba(26, 31, 46, 0.06), 0 8px 24px rgba(26, 31, 46, 0.04);

    /* Primary Palette - Deep Navy */
    --accent-primary: #1a1f2e;
    --accent-primary-rgb: 26, 31, 46;
    --accent-secondary: #2d3548;
    --accent-light: #4a5568;

    /* Brass/Gold Accent */
    --accent-gold: #b8960c;
    --accent-gold-light: #d4af37;
    --accent-gold-bg: #fdf8e8;

    /* Text Hierarchy */
    --text-primary: #1a1f2e;
    --text-secondary: #4a5568;
    --text-muted: #8b95a5;
    --text-light: #a8b0bd;
    --text-inverse: #ffffff;

    /* Status Colors - Sophisticated Muted Tones */
    --success: #2d6a4f;
    --success-light: #40916c;
    --success-bg: #f0f7f4;
    --success-border: #d4e5dc;

    --warning: #b8860b;
    --warning-bg: #fdf6e3;
    --warning-border: #f0e4c4;

    --danger: #9b2c2c;
    --danger-light: #c53030;
    --danger-bg: #fdf2f2;
    --danger-border: #f5d5d5;

    --info: #2c5282;
    --info-bg: #ebf4ff;
    --info-border: #c3dafe;

    /* Layout Dimensions */
    --sidebar-width: 260px;
    --header-height: 68px;

    /* Border Radius - Subtle Refinement */
    --radius-xs: 3px;
    --radius-sm: 5px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* Transitions - Smooth & Professional */
    --transition-fast: 0.12s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.35s ease;

    /* Typography Scale */
    --font-display: 'Source Serif 4', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', monospace;
}

/* ============================================
   BASE RESET & TYPOGRAPHY
   ============================================ */

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

html {
    font-size: 15px;
    scroll-behavior: smooth;
    margin: 0;
    padding: 0;
}

/* Ensure no gaps at page edges */
html, body, .admin-wrapper {
    width: 100%;
}

/* Override any Bootstrap/framework container padding for admin layout */
.admin-wrapper main > .container,
.admin-wrapper .container,
.admin-wrapper .container-fluid {
    padding-top: 0;
    max-width: 100%;
}

/* Reset any navbar classes that Bootstrap might style */
.admin-sidebar.navbar,
.admin-sidebar.nav {
    padding: 0 2rem;
    margin: 0;
    border: none;
    border-radius: 0;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.65;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    padding: 0;
}

html {
    margin: 0;
    padding: 0;
}

/* Subtle paper texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.02;
    pointer-events: none;
    z-index: -1;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5em;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

h1 { font-size: 1.875rem; font-weight: 700; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; font-family: var(--font-body); font-weight: 600; }

p {
    color: var(--text-secondary);
    margin: 0 0 1em;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-light);
}

code, .mono {
    font-family: var(--font-mono);
    font-size: 0.9em;
}

/* ============================================
   LAYOUT STRUCTURE - Top Navigation
   ============================================ */

.admin-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
}

.admin-content {
    flex: 1;
    padding: 2rem;
    width: 100%;
    max-width: 100%;
}

/* ============================================
   TOP NAVIGATION BAR (uses .admin-sidebar)
   Dark navy bar across top of page
   ============================================ */

.admin-sidebar {
    width: 100%;
    background: var(--bg-sidebar);
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: row;
    align-items: center;
    height: 60px;
    padding: 0 2rem;
    margin: 0;
    box-sizing: border-box;
}

/* Brand / Logo */
.sidebar-brand {
    display: flex;
    align-items: center;
    padding: 0;
    border: none;
    margin-right: 2.5rem;
    flex-shrink: 0;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-light) 100%);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--bg-sidebar);
    font-family: var(--font-display);
}

.sidebar-logo-text {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-inverse);
    letter-spacing: -0.01em;
}

.sidebar-logo-text span {
    color: var(--text-light);
    font-weight: 400;
}

/* Navigation Area */
.sidebar-nav {
    display: flex;
    align-items: center;
    flex: 1;
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
}

/* Hide scrollbar but keep functionality */
.sidebar-nav::-webkit-scrollbar {
    display: none;
}

.sidebar-nav {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Nav Sections - display inline */
.nav-section {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

/* Hide section titles in top nav (or show as dividers) */
.nav-section-title {
    display: none;
}

/* Nav Items - horizontal layout */
.nav-item {
    display: inline-flex;
    margin: 0 0.125rem;
}

/* Nav Links - horizontal style */
.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, 0.65);
    font-weight: 500;
    font-size: 0.85rem;
    transition: all var(--transition-fast);
    position: relative;
    white-space: nowrap;
    border: none;
    background: none;
    text-decoration: none;
}

.nav-link:hover {
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
    color: var(--text-inverse);
    background: rgba(255, 255, 255, 0.1);
}

/* Gold accent bar under active item */
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--accent-gold);
    border-radius: 1px;
}

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

.nav-link.active svg,
.nav-link.active .nav-icon {
    opacity: 1;
}

/* Sidebar Footer - becomes right side of top nav */
.sidebar-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
    margin-left: auto;
    border: none;
}

/* Search Box in Top Nav */
.nav-search {
    position: relative;
    margin-right: 0.5rem;
}

.nav-search-input {
    width: 200px;
    height: 36px;
    padding: 0 0.875rem 0 2.25rem;
    font-size: 0.85rem;
    font-family: inherit;
    color: var(--text-inverse);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.nav-search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.nav-search-input:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

.nav-search-input:focus {
    outline: none;
    width: 260px;
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--accent-gold);
}

.nav-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

/* Icon Buttons in Top Nav (notifications, settings) */
.nav-icon-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.65);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.nav-icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-inverse);
}

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

/* Notification badge */
.nav-icon-btn .badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 0.65rem;
    font-weight: 600;
    line-height: 16px;
    text-align: center;
    background: var(--danger);
    color: white;
    border-radius: 8px;
}

/* Settings Icon */
.nav-settings {
    color: rgba(255, 255, 255, 0.5);
}

.nav-settings:hover {
    color: var(--text-inverse);
}

/* Divider between icon groups */
.nav-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 0.375rem;
}

/* User Menu in top bar */
.user-menu {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.375rem 0.625rem 0.375rem 0.375rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: background var(--transition-fast);
    border: none;
}

.user-menu:hover {
    background: rgba(255, 255, 255, 0.08);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--bg-sidebar);
    flex-shrink: 0;
}

.user-info {
    text-align: left;
}

.user-name {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-inverse);
    white-space: nowrap;
    line-height: 1.2;
}

.user-email {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.45);
    white-space: nowrap;
}

.user-role {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.45);
    white-space: nowrap;
}

/* Nav Dropdown for grouped items */
.nav-dropdown {
    position: relative;
    display: inline-flex;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.625rem;
    background: var(--bg-secondary);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    min-width: 200px;
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition-fast);
    z-index: 200;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-menu .nav-link {
    color: var(--text-secondary);
    padding: 0.6rem 0.875rem;
    border-radius: var(--radius-xs);
    width: 100%;
}

.nav-dropdown-menu .nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.nav-dropdown-menu .nav-link.active {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.nav-dropdown-menu .nav-link.active::after {
    display: none;
}

.nav-dropdown-divider {
    height: 1px;
    background: var(--card-border);
    margin: 0.375rem 0;
}

/* ============================================
   PAGE HEADER (Below Top Nav)
   ============================================ */

.admin-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--card-border);
    padding: 1.25rem 2rem;
}

.admin-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Mobile Navigation Toggle */
.mobile-nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-inverse);
    border-radius: var(--radius-sm);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.mobile-nav-toggle svg {
    width: 20px;
    height: 20px;
}

/* ============================================
   PAGE HEADER - Breadcrumb & Title Area
   ============================================ */

.page-header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.page-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
    line-height: 1.2;
}

.page-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.375rem 0;
    padding: 0;
    background: none;
    font-size: 0.75rem;
    list-style: none;
}

.breadcrumb-item {
    color: var(--text-muted);
}

.breadcrumb-item a {
    color: var(--text-muted);
}

.breadcrumb-item a:hover {
    color: var(--text-secondary);
}

.breadcrumb-item.active {
    color: var(--text-secondary);
}

.breadcrumb-item + .breadcrumb-item::before {
    content: '/';
    padding-right: 0.5rem;
    color: var(--text-light);
}

.header-btn {
    height: 36px;
    padding: 0 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--card-border);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.8rem;
    font-weight: 500;
    font-family: inherit;
}

.header-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: #d8d6d1;
}

.header-btn svg {
    width: 16px;
    height: 16px;
}

.header-btn-icon {
    width: 36px;
    padding: 0;
}

/* ============================================
   CARDS - Elegant & Clean
   ============================================ */

.card {
    background: var(--bg-card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: box-shadow var(--transition-base), border-color var(--transition-base);
}

.card:hover {
    border-color: #d8d6d1;
    box-shadow: var(--card-shadow-hover);
}

.card-header {
    padding: 1.125rem 1.5rem;
    border-bottom: 1px solid var(--card-border);
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--card-border);
    background: var(--bg-tertiary);
}

/* Stat Cards */
.stat-card {
    padding: 1.5rem;
    position: relative;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--accent-gold);
    border-radius: 0 2px 2px 0;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.stat-card:hover::after {
    opacity: 1;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.stat-icon.primary { background: var(--bg-tertiary); color: var(--accent-primary); }
.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-value {
    font-family: var(--font-display);
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.75rem;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-xs);
}

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

/* ============================================
   TABLES - Professional Data Display
   ============================================ */

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

.table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.table th {
    text-align: left;
    padding: 0.875rem 1.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--card-border);
}

.table td {
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--card-border);
    vertical-align: middle;
}

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

.table tbody tr:hover {
    background: var(--bg-tertiary);
}

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

/* ============================================
   FORMS - Clean & Functional
   ============================================ */

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.925rem;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.form-control:hover {
    border-color: #d0cec9;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(var(--accent-primary-rgb), 0.08);
}

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

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%234a5568' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.form-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check-input {
    width: 18px;
    height: 18px;
    background: var(--bg-secondary);
    border: 1.5px solid var(--card-border);
    border-radius: 3px;
    cursor: pointer;
    transition: all var(--transition-fast);
    appearance: none;
    flex-shrink: 0;
}

.form-check-input:hover {
    border-color: var(--accent-primary);
}

.form-check-input:checked {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

.form-check-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.input-group {
    display: flex;
    gap: 0;
}

.input-group .form-control {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.input-group .btn {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.invalid-feedback {
    font-size: 0.75rem;
    color: var(--danger);
    margin-top: 0.5rem;
}

.mb-3 {
    margin-bottom: 1.25rem;
}

/* ============================================
   BUTTONS - Refined & Professional
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.375rem;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

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

.btn-primary {
    background: var(--accent-primary);
    color: var(--text-inverse);
}

.btn-primary:hover {
    background: var(--accent-secondary);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--card-border);
}

.btn-secondary:hover {
    background: #eeede9;
    color: var(--text-primary);
}

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

.btn-success:hover {
    background: var(--success-light);
}

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

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

.btn-outline-primary {
    background: transparent;
    color: var(--accent-primary);
    border: 1.5px solid var(--accent-primary);
}

.btn-outline-primary:hover {
    background: var(--accent-primary);
    color: var(--text-inverse);
}

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

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

.btn-outline-danger {
    background: transparent;
    color: var(--danger);
    border: 1.5px solid var(--danger);
}

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

.btn-sm {
    padding: 0.5rem 0.875rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 0.9rem;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
}

/* ============================================
   BADGES - Subtle & Refined
   ============================================ */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.7rem;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: var(--radius-xs);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bg-success, .badge-success {
    background: var(--success-bg) !important;
    color: var(--success) !important;
}

.bg-danger, .badge-danger {
    background: var(--danger-bg) !important;
    color: var(--danger) !important;
}

.bg-warning, .badge-warning {
    background: var(--warning-bg) !important;
    color: var(--warning) !important;
}

.bg-info, .badge-info {
    background: var(--info-bg) !important;
    color: var(--info) !important;
}

.bg-secondary, .badge-secondary {
    background: var(--bg-tertiary) !important;
    color: var(--text-secondary) !important;
}

/* ============================================
   ALERTS - Professional Notifications
   ============================================ */

.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    border: 1px solid transparent;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.alert-success {
    background: var(--success-bg);
    border-color: var(--success-border);
    color: var(--success);
}

.alert-danger {
    background: var(--danger-bg);
    border-color: var(--danger-border);
    color: var(--danger);
}

.alert-warning {
    background: var(--warning-bg);
    border-color: var(--warning-border);
    color: var(--warning);
}

.alert-info {
    background: var(--info-bg);
    border-color: var(--info-border);
    color: var(--info);
}

/* ============================================
   LOGIN PAGE - Elegant Entry
   ============================================ */

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--bg-primary) 0%, #f0efec 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: 0 4px 24px rgba(26, 31, 46, 0.06);
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.login-logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-light) 100%);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--bg-sidebar);
    font-family: var(--font-display);
}

.login-logo-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.login-title {
    text-align: center;
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.login-subtitle {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.login-form .mb-3 {
    margin-bottom: 1.25rem;
}

.login-form .btn-primary {
    width: 100%;
    padding: 0.875rem;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* ============================================
   UTILITIES
   ============================================ */

.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.gap-4 { gap: 1.5rem; }

.text-center { text-align: center; }
.text-muted { color: var(--text-muted) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-primary { color: var(--accent-primary) !important; }

.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1.5rem; }
.ms-auto { margin-left: auto; }
.me-2 { margin-right: 0.5rem; }

.p-0 { padding: 0; }
.p-4 { padding: 1.5rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.px-3 { padding-left: 1rem; padding-right: 1rem; }

.w-100 { width: 100%; }
.rounded { border-radius: var(--radius-md); }

.row {
    display: flex;
    flex-wrap: wrap;
    margin: -0.75rem;
}

.col-12, .col-md-6, .col-lg-3, .col-lg-4, .col-lg-6, .col-lg-8 {
    padding: 0.75rem;
}

.col-12 { width: 100%; }
.col-lg-6 { width: 50%; }
.col-lg-8 { width: 66.666%; }
.col-lg-4 { width: 33.333%; }
.col-lg-3 { width: 25%; }

@media (max-width: 992px) {
    .col-lg-3, .col-lg-4, .col-lg-6, .col-lg-8 {
        width: 100%;
    }
}

/* Grid for stat cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

/* ============================================
   ANIMATIONS - Subtle & Professional
   ============================================ */

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

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-8px); }
    to { opacity: 1; transform: translateX(0); }
}

.fade-in {
    animation: fadeIn 0.35s ease-out forwards;
}

.card {
    animation: fadeIn 0.35s ease-out forwards;
}

/* Stagger children */
.stats-grid .card:nth-child(1) { animation-delay: 0s; }
.stats-grid .card:nth-child(2) { animation-delay: 0.05s; }
.stats-grid .card:nth-child(3) { animation-delay: 0.1s; }
.stats-grid .card:nth-child(4) { animation-delay: 0.15s; }

/* ============================================
   SCROLLBAR - Refined
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: #d0cec9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #b8b6b1;
}

/* Sidebar scrollbar */
.admin-sidebar ::-webkit-scrollbar-track {
    background: var(--bg-sidebar);
}

.admin-sidebar ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
}

.admin-sidebar ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1200px) {
    /* On medium screens, hide nav text, show icons only */
    .sidebar-nav .nav-link span {
        display: none;
    }

    .sidebar-nav .nav-link {
        padding: 0.5rem 0.625rem;
    }

    .sidebar-nav .nav-link svg,
    .sidebar-nav .nav-link .nav-icon {
        width: 18px;
        height: 18px;
    }

    .sidebar-brand {
        margin-right: 1.5rem;
    }
}

@media (max-width: 1100px) {
    .nav-search-input {
        width: 160px;
    }

    .nav-search-input:focus {
        width: 200px;
    }
}

@media (max-width: 992px) {
    .admin-sidebar {
        padding: 0 1.25rem;
    }

    /* Hide inline nav, show mobile toggle */
    .sidebar-nav {
        display: none;
    }

    .mobile-nav-toggle {
        display: flex;
        margin-left: auto;
        margin-right: 0.75rem;
    }

    /* Collapse search to icon on mobile */
    .nav-search-input {
        width: 36px;
        padding: 0;
        background: rgba(255, 255, 255, 0.04);
        border-color: transparent;
        color: transparent;
        cursor: pointer;
    }

    .nav-search-input::placeholder {
        color: transparent;
    }

    .nav-search-icon {
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .nav-search-input:focus {
        width: 200px;
        padding: 0 0.875rem 0 2.25rem;
        color: var(--text-inverse);
        cursor: text;
    }

    .nav-search-input:focus::placeholder {
        color: rgba(255, 255, 255, 0.4);
    }

    .nav-search-input:focus + .nav-search-icon {
        left: 0.75rem;
        transform: translateY(-50%);
    }

    .admin-content {
        padding: 1.5rem;
    }

    .admin-header {
        padding: 1rem 1.25rem;
    }

    /* Mobile Navigation Drawer */
    .mobile-nav {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-secondary);
        z-index: 99;
        padding: 1rem;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform var(--transition-base);
    }

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

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

    .mobile-nav .nav-section-title {
        display: block;
        font-size: 0.65rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        color: var(--text-muted);
        padding: 1rem 1rem 0.5rem;
        margin-top: 0.5rem;
    }

    .mobile-nav .nav-section-title:first-child {
        margin-top: 0;
    }

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

    .mobile-nav .nav-link {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.875rem 1rem;
        color: var(--text-secondary);
        font-size: 0.9rem;
        font-weight: 500;
        border-radius: var(--radius-sm);
        margin-bottom: 0.25rem;
        width: 100%;
    }

    .mobile-nav .nav-link span {
        display: inline;
    }

    .mobile-nav .nav-link:hover,
    .mobile-nav .nav-link.active {
        background: var(--bg-tertiary);
        color: var(--text-primary);
    }

    .mobile-nav .nav-link.active::after {
        display: none;
    }

    .mobile-nav .nav-link.active {
        border-left: 3px solid var(--accent-gold);
    }
}

@media (max-width: 768px) {
    .admin-content {
        padding: 1rem;
    }

    .admin-header {
        padding: 1rem;
    }

    .admin-header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .header-right {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .table td, .table th {
        padding: 0.75rem 1rem;
    }

    .page-title {
        font-size: 1.25rem;
    }

    .admin-sidebar {
        padding: 0 1rem;
    }

    .sidebar-logo-text {
        display: none;
    }

    .sidebar-brand {
        margin-right: 0;
    }

    .user-info {
        display: none;
    }

    .user-menu {
        padding: 0.375rem;
    }

    .nav-divider {
        display: none;
    }

    .card-body {
        padding: 1.25rem;
    }

    .card-header {
        padding: 1rem 1.25rem;
    }
}

@media (max-width: 576px) {
    .nav-search {
        display: none;
    }

    .sidebar-footer {
        gap: 0.25rem;
    }

    .nav-icon-btn {
        width: 32px;
        height: 32px;
    }

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

@media (max-width: 480px) {
    .admin-content {
        padding: 0.75rem;
    }

    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }

    .btn-sm {
        padding: 0.4rem 0.75rem;
        font-size: 0.7rem;
    }
}

/* ============================================
   SPECIAL ELEMENTS
   ============================================ */

/* Divider with text */
.divider-text {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 1.5rem 0;
}

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

/* Money/Currency styling */
.currency {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.currency-positive {
    color: var(--success);
}

.currency-negative {
    color: var(--danger);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    opacity: 0.3;
    margin-bottom: 1rem;
}

.empty-state-title {
    font-family: var(--font-display);
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.empty-state-text {
    font-size: 0.875rem;
    max-width: 300px;
    margin: 0 auto;
}

/* ============================================
   REPORT & DATA TABLE ENHANCEMENTS
   ============================================ */

/* Full-width card variant */
.card-full {
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

/* Report header with filters */
.report-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.report-filters {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.report-filter {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.report-filter label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.report-filter .form-check {
    margin: 0;
}

.report-filter .form-check-label {
    font-size: 0.85rem;
    text-transform: none;
    letter-spacing: normal;
    color: var(--text-primary);
}

.report-filter .form-control,
.report-filter .form-select {
    padding: 0.5rem 0.875rem;
    font-size: 0.85rem;
    min-width: 140px;
}

.report-actions {
    display: flex;
    gap: 0.5rem;
}

/* Comparison Table Styles (Xero-style P&L) */
.table-comparison-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-comparison {
    min-width: 600px;
}

.table-comparison th,
.table-comparison td {
    white-space: nowrap;
}

.table-comparison .col-account {
    position: sticky;
    left: 0;
    background: var(--bg-tertiary);
    z-index: 5;
    min-width: 220px;
    max-width: 280px;
    white-space: normal;
}

.table-comparison tbody .col-account,
.table-comparison tbody td:first-child {
    background: var(--bg-card);
}

.table-comparison tbody tr:hover td:first-child {
    background: #fdfcfa;
}

.table-comparison .col-currency {
    min-width: 110px;
    text-align: right;
    padding-right: 1.25rem;
}

.table-comparison .col-ytd {
    background: rgba(26, 31, 46, 0.03);
    border-left: 2px solid var(--card-border);
}

.table-comparison thead .col-ytd {
    background: #eceae6;
}

.table-comparison tfoot .col-ytd {
    background: #e8e6e1;
}

.table-comparison .section-header td {
    font-weight: 600;
    color: var(--text-primary);
    padding: 0.875rem 1rem;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--card-border);
}

.table-comparison .section-total td {
    font-weight: 600;
    background: #fdfcfb;
    border-top: 1px solid #f0eeea;
}

.table-comparison .section-total td:first-child {
    background: #fdfcfb;
}

.table-comparison .row-label {
    padding-left: 1.75rem;
}

.table-comparison tfoot td {
    font-weight: 600;
    background: var(--bg-tertiary);
    border-top: 2px solid var(--card-border);
}

.table-comparison tfoot td:first-child {
    background: var(--bg-tertiary);
}

.table-comparison tfoot .total-label {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    padding-left: 1rem;
}

.table-comparison tfoot .percent-row td {
    padding-top: 0.25rem;
    border-top: none;
}

.table-comparison tfoot .percent-row .total-label {
    font-weight: 500;
}

/* Subtotal rows (Gross Profit, Operating Profit) */
.table-comparison .subtotal-row {
    background: var(--bg-tertiary);
    border-top: 2px solid var(--card-border);
    border-bottom: 2px solid var(--card-border);
}

.table-comparison .subtotal-row td {
    padding: 0.75rem 1rem;
    font-weight: 600;
}

.table-comparison .subtotal-row td:first-child {
    background: var(--bg-tertiary);
}

.table-comparison .subtotal-row .subtotal-label {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    color: var(--text-primary);
}

.table-comparison .subtotal-row.subtotal-percent {
    border-top: none;
    background: #f0eeea;
}

.table-comparison .subtotal-row.subtotal-percent td {
    padding-top: 0.375rem;
    padding-bottom: 0.75rem;
    font-weight: 500;
}

.table-comparison .subtotal-row.subtotal-percent td:first-child {
    background: #f0eeea;
}

.table-comparison .subtotal-row.subtotal-percent .subtotal-label {
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* Percentage display */
.percentage {
    font-family: var(--font-display);
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--text-muted);
}

.percentage.currency-positive {
    color: var(--success);
}

.percentage.currency-negative {
    color: var(--danger);
}

/* Currency formatting */
.currency {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.currency-positive {
    color: var(--success);
}

.currency-negative {
    color: var(--danger);
}

/* Data table enhancements */
.table-report {
    font-size: 0.85rem;
}

.table-report th {
    padding: 0.75rem 1rem;
    font-size: 0.65rem;
    background: var(--bg-tertiary);
    position: sticky;
    top: 0;
    z-index: 10;
}

.table-report td {
    padding: 0.625rem 1rem;
    border-bottom-color: #f0eeea;
}

.table-report tbody tr:hover {
    background: #fdfcfa;
}

/* Numeric columns */
.table .text-right,
.table .col-number {
    text-align: right;
    font-family: var(--font-mono);
    font-size: 0.85em;
}

.table .col-currency {
    text-align: right;
    font-family: var(--font-display);
    font-weight: 600;
}

.table .col-date {
    white-space: nowrap;
    color: var(--text-muted);
    font-size: 0.85em;
}

.table .col-status {
    width: 100px;
}

.table .col-actions {
    width: 120px;
    text-align: right;
}

/* Table totals row */
.table tfoot td {
    font-weight: 600;
    background: var(--bg-tertiary);
    border-top: 2px solid var(--card-border);
    color: var(--text-primary);
}

.table tfoot .total-label {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
}

/* Striped variant */
.table-striped tbody tr:nth-child(even) {
    background: #fdfcfb;
}

.table-striped tbody tr:hover {
    background: var(--bg-tertiary);
}

/* Compact variant */
.table-compact th,
.table-compact td {
    padding: 0.5rem 0.75rem;
}

/* Bordered variant */
.table-bordered th,
.table-bordered td {
    border: 1px solid var(--card-border);
}

/* Sortable columns */
.table th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 1.5rem;
}

.table th.sortable:hover {
    background: #eceae6;
}

.table th.sortable::after {
    content: '';
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid var(--text-light);
}

.table th.sortable.asc::after {
    border-top: none;
    border-bottom: 4px solid var(--accent-primary);
}

.table th.sortable.desc::after {
    border-top: 4px solid var(--accent-primary);
}

/* Summary cards for reports */
.summary-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.summary-item {
    background: var(--bg-card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
}

.summary-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 0.375rem;
}

.summary-value {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.summary-value.positive {
    color: var(--success);
}

.summary-value.negative {
    color: var(--danger);
}

.summary-change {
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Toolbar for data grids */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--card-border);
    flex-wrap: wrap;
}

.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toolbar-search {
    position: relative;
}

.toolbar-search input {
    padding-left: 2.25rem;
    width: 240px;
}

.toolbar-search svg {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pagination-item {
    display: flex;
}

.pagination-link {
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.pagination-link.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: var(--text-inverse);
}

.pagination-link:disabled,
.pagination-link.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-right: 1rem;
}

/* ============================================
   TOP HEADER NAVIGATION (New Style)
   ============================================ */

.admin-top-header {
    width: 100%;
    background: var(--bg-sidebar);
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.header-container {
    display: flex;
    align-items: center;
    height: 60px;
    padding: 0 2rem;
    max-width: 100%;
}

.header-brand {
    flex-shrink: 0;
    margin-right: 2.5rem;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-light) 100%);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--bg-sidebar);
    font-family: var(--font-display);
}

.brand-text {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-inverse);
    letter-spacing: -0.01em;
}

.brand-text span {
    color: var(--text-light);
    font-weight: 400;
}

.header-nav {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 0.25rem;
}

.header-nav > .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, 0.65);
    font-weight: 500;
    font-size: 0.85rem;
    transition: all var(--transition-fast);
    position: relative;
    white-space: nowrap;
    text-decoration: none;
}

.header-nav > .nav-link:hover {
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.06);
}

.header-nav > .nav-link.active {
    color: var(--text-inverse);
    background: rgba(255, 255, 255, 0.1);
}

.header-nav > .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--accent-gold);
    border-radius: 1px;
}

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

.header-nav .nav-link.active .nav-icon {
    opacity: 1;
}

/* Dropdown in header nav */
.nav-dropdown {
    position: relative;
    display: inline-flex;
}

.nav-dropdown > .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, 0.65);
    font-weight: 500;
    font-size: 0.85rem;
    transition: all var(--transition-fast);
    position: relative;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
}

.nav-dropdown > .nav-link:hover {
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.06);
}

.nav-dropdown > .nav-link.active {
    color: var(--text-inverse);
    background: rgba(255, 255, 255, 0.1);
}

.dropdown-arrow {
    width: 14px;
    height: 14px;
    opacity: 0.5;
    margin-left: -0.25rem;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    min-width: 180px;
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition-fast);
    z-index: 200;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0.6rem 0.875rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: var(--radius-xs);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.dropdown-divider {
    height: 1px;
    background: var(--card-border);
    margin: 0.375rem 0;
}

/* Header actions (right side) */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.header-icon-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.65);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.header-icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-inverse);
}

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

.header-user-menu {
    margin-left: 0.5rem;
}

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.375rem 0.625rem 0.375rem 0.375rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: background var(--transition-fast);
    border: none;
}

.user-menu-trigger:hover {
    background: rgba(255, 255, 255, 0.08);
}

.logout-icon {
    width: 16px;
    height: 16px;
    color: rgba(255, 255, 255, 0.5);
    margin-left: 0.25rem;
}

.user-menu-trigger:hover .logout-icon {
    color: rgba(255, 255, 255, 0.8);
}

/* Page header below top nav */
.page-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--card-border);
    padding: 1.25rem 2rem;
}

/* Responsive adjustments for header nav */
@media (max-width: 1200px) {
    .header-nav > .nav-link span,
    .nav-dropdown > .nav-link > span:first-of-type {
        display: none;
    }

    .header-nav > .nav-link,
    .nav-dropdown > .nav-link {
        padding: 0.5rem 0.625rem;
    }

    .header-brand {
        margin-right: 1.5rem;
    }
}

@media (max-width: 992px) {
    .header-nav {
        display: none;
    }

    .header-container {
        padding: 0 1.25rem;
    }
}

@media (max-width: 768px) {
    .brand-text {
        display: none;
    }

    .header-brand {
        margin-right: 0;
    }

    .user-info {
        display: none;
    }

    .user-menu-trigger {
        padding: 0.375rem;
    }

    .page-header {
        padding: 1rem 1.5rem;
    }
}

@media (max-width: 576px) {
    .header-container {
        padding: 0 1rem;
    }

    .header-icon-btn {
        width: 32px;
        height: 32px;
    }

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

    .page-header {
        padding: 1rem;
    }
}

/* List group styles for user assignment */
.list-group {
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
}

.list-group-item {
    padding: 0.875rem 1rem;
    border: none;
    border-bottom: 1px solid var(--card-border);
    background: var(--bg-secondary);
    transition: background var(--transition-fast);
}

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

.list-group-item:hover {
    background: var(--bg-tertiary);
}

.list-group-item:first-child {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.list-group-item:last-child {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.list-group-item:only-child {
    border-radius: var(--radius-md);
}

.bg-primary {
    background: var(--accent-primary) !important;
    color: var(--text-inverse) !important;
}

/* Print styles */
@media print {
    .admin-topbar,
    .admin-header,
    .toolbar,
    .pagination,
    .btn,
    .header-btn {
        display: none !important;
    }

    .admin-content {
        padding: 0 !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }

    .table th {
        background: #f5f5f5 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    body {
        background: white !important;
    }
}
