/**
 * BITS Payroll & Sub-Ledger System
 * Bright Light-Blue Executive Theme
 */

:root {
    /* Bright Theme Backgrounds & Surfaces */
    --bg-base: #f0f7ff;
    --bg-surface: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.95);
    --bg-card-hover: #ffffff;
    --border-glass: #e2e8f0;
    --border-blue: #bae6fd;
    --border-glow: rgba(14, 165, 233, 0.25);

    /* Text Hierarchy */
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-subtle: #64748b;

    /* Light Blue / Sky Brand Accents */
    --primary: #0284c7;
    --primary-light: #0ea5e9;
    --primary-hover: #0369a1;
    --primary-subtle: #e0f2fe;
    --primary-glow: rgba(14, 165, 233, 0.25);

    /* Functional Colors */
    --emerald: #059669;
    --emerald-subtle: #d1fae5;
    --emerald-glow: rgba(16, 185, 129, 0.18);

    --cyan: #0284c7;
    --cyan-subtle: #e0f2fe;

    --amber: #d97706;
    --amber-subtle: #fef3c7;

    --rose: #e11d48;
    --rose-subtle: #ffe4e6;

    /* Typography */
    --font-heading: 'Outfit', -apple-system, sans-serif;
    --font-body: 'Inter', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Radii & Shadows */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-card: 0 4px 20px -2px rgba(14, 165, 233, 0.08), 0 2px 6px -1px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 10px 25px -3px rgba(14, 165, 233, 0.14), 0 4px 8px -2px rgba(0, 0, 0, 0.05);
}

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

body {
    background: radial-gradient(circle at 10% 10%, #e0f2fe 0%, #f0f7ff 50%, #f8fafc 100%);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ==========================================================================
   Layout Structure
   ========================================================================== */

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

.sidebar {
    width: 260px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-blue);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 100;
}

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

.brand-logo {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary) 0%, #38bdf8 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.brand-title {
    display: block;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 0.5px;
    color: #0369a1;
}

.brand-subtitle {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-light);
    font-weight: 600;
}

.nav-menu {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-item:hover {
    color: var(--primary);
    background: var(--primary-subtle);
}

.nav-item.active {
    color: #0369a1;
    background: var(--primary-subtle);
    border-left: 3px solid var(--primary);
    font-weight: 600;
}

.nav-icon {
    flex-shrink: 0;
}

.nav-badge {
    margin-left: auto;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 20px;
}

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

.accounting-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.server-info {
    font-size: 10px;
    color: var(--text-subtle);
    font-family: var(--font-mono);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.online {
    background: var(--emerald);
    box-shadow: 0 0 6px var(--emerald);
}

.main-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* ==========================================================================
   Top Navbar
   ========================================================================== */

.topbar {
    height: 70px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-blue);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 90;
}

.page-title {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
}

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

.btn-privacy-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid var(--border-blue);
    border-radius: var(--radius-md);
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    user-select: none;
}

.btn-privacy-toggle:hover {
    background: var(--primary-subtle);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-privacy-toggle.active {
    background: #e0f2fe;
    border-color: var(--primary);
    color: #0369a1;
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.privacy-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    transition: transform 0.2s ease;
}

.btn-privacy-toggle:active .privacy-icon-wrap {
    transform: scale(0.9);
}

.privacy-masked {
    letter-spacing: 2px !important;
    user-select: none;
    transition: all 0.2s ease;
}

.persona-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    padding: 6px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-blue);
    box-shadow: var(--shadow-sm);
}

.persona-selector label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-subtle);
    font-weight: 600;
}

.persona-selector select {
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    padding: 6px 12px 6px 6px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-blue);
    box-shadow: var(--shadow-sm);
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, #38bdf8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 11px;
    color: #fff;
    box-shadow: 0 2px 8px var(--primary-glow);
}

.user-meta {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-main);
}

.user-role-badge {
    font-size: 10px;
    color: var(--primary);
    font-weight: 600;
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
    margin-left: 4px;
}

.btn-logout:hover {
    color: var(--rose);
    background: var(--rose-subtle);
}

.page-content {
    padding: 32px;
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
}

/* ==========================================================================
   Glass Cards & Grids
   ========================================================================== */

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-blue);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.glass-card:hover {
    box-shadow: var(--shadow-hover);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    position: relative;
    overflow: hidden;
    background: #ffffff;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.stat-cyan::before { background: linear-gradient(90deg, #0284c7, #38bdf8); }
.stat-amber::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.stat-emerald::before { background: linear-gradient(90deg, #059669, #34d399); }
.stat-purple::before { background: linear-gradient(90deg, #6366f1, #818cf8); }

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

.stat-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: var(--text-muted);
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: var(--primary-subtle);
    color: var(--primary);
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-main);
}

.stat-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-subtle);
}

.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 16px 24px;
    background: #ffffff;
}

.action-buttons {
    display: flex;
    gap: 12px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 24px;
}

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

.section-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.section-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.link-action {
    color: var(--primary);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
}

.link-action:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #0369a1 100%);
    color: #fff;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px var(--primary-glow);
}

.btn-secondary {
    background: #ffffff;
    color: var(--primary);
    border: 1px solid var(--border-blue);
    box-shadow: var(--shadow-sm);
}

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

.btn-success {
    background: linear-gradient(135deg, var(--emerald) 0%, #047857 100%);
    color: #fff;
    box-shadow: 0 4px 14px var(--emerald-glow);
}

.btn-danger {
    background: linear-gradient(135deg, var(--rose) 0%, #be123c 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(225, 29, 72, 0.25);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-glass);
}

.btn-ghost:hover {
    color: var(--primary);
    background: var(--primary-subtle);
    border-color: var(--border-blue);
}

.btn-xs {
    padding: 5px 10px;
    font-size: 11px;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 14px 24px;
    font-size: 15px;
}

.btn-outline {
    background: #ffffff;
    color: var(--primary);
    border: 1px solid var(--border-blue);
    font-weight: 600;
}

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

.btn-danger-ghost {
    background: transparent;
    color: var(--rose);
    border: 1px solid rgba(225, 29, 72, 0.2);
}

.btn-danger-ghost:hover {
    background: #ffe4e6;
    border-color: var(--rose);
}

.currency-select-sm {
    padding: 3px 6px;
    font-size: 11px;
    font-family: var(--font-mono);
    border: 1px solid var(--border-blue);
    border-radius: var(--radius-sm);
    background: #ffffff;
    color: var(--text-main);
    cursor: pointer;
    font-weight: 600;
}

.currency-select-sm:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.badge-model {
    display: inline-block;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 6px;
    text-transform: uppercase;
}

.badge-model.badge-hourly { background: #e0f2fe; color: #0284c7; }
.badge-model.badge-salary { background: #dcfce7; color: #15803d; }
.badge-model.badge-per_ticket { background: #fef3c7; color: #b45309; }
.badge-model.badge-commission { background: #f3e8ff; color: #7e22ce; }
.badge-model.badge-hybrid { background: #ffedd5; color: #c2410c; }

/* ==========================================================================
   Tables
   ========================================================================== */

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

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

.data-table th {
    padding: 12px 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-subtle);
    border-bottom: 2px solid var(--border-blue);
    background: rgba(240, 249, 255, 0.5);
}

.data-table td {
    padding: 14px;
    border-bottom: 1px solid var(--border-glass);
    vertical-align: middle;
    color: var(--text-main);
}

.data-table tbody tr:hover {
    background: rgba(224, 242, 254, 0.3);
}

.tech-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tech-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary-subtle);
    border: 1px solid var(--border-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
}

.tech-name {
    font-weight: 600;
    color: #0f172a;
}

.tech-code {
    font-size: 11px;
    color: var(--text-subtle);
    font-family: var(--font-mono);
}

/* ==========================================================================
   Badges
   ========================================================================== */

.badge-model {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge-salary { background: #e0e7ff; color: #4338ca; }
.badge-hourly { background: #e0f2fe; color: #0369a1; }
.badge-per_ticket { background: #d1fae5; color: #047857; }
.badge-commission { background: #fef3c7; color: #b45309; }
.badge-hybrid { background: #ffe4e6; color: #be123c; }

.badge-tag {
    background: #f1f5f9;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.badge-tier {
    background: var(--primary-subtle);
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 4px;
    font-weight: 600;
}

.badge-pending {
    background: #fef3c7;
    color: #b45309;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.badge-acct {
    font-family: var(--font-mono);
    font-size: 10px;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text-muted);
    font-weight: 600;
}

.badge-status {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.status-approved { background: #d1fae5; color: #047857; }
.status-locked { background: #e0e7ff; color: #4338ca; }
.status-submitted { background: #fef3c7; color: #b45309; }
.status-rejected { background: #ffe4e6; color: #be123c; }

.audit-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    font-size: 11px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
}

.audit-gps { background: var(--primary-subtle); color: var(--primary); }
.audit-photo { background: #e0e7ff; color: #4338ca; }

/* ==========================================================================
   Journal Stream & Splits
   ========================================================================== */

.journal-stream {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.journal-card {
    background: #ffffff;
    border: 1px solid var(--border-blue);
    border-radius: var(--radius-md);
    padding: 14px;
    box-shadow: var(--shadow-sm);
}

.journal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.journal-ref {
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
}

.journal-time {
    margin-left: auto;
    font-size: 11px;
    color: var(--text-subtle);
}

.journal-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.journal-splits {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-top: 1px solid var(--border-glass);
    padding-top: 8px;
}

.split-row {
    display: flex;
    align-items: center;
    font-size: 11px;
}

.split-type {
    width: 50px;
    font-weight: 700;
    font-size: 10px;
    text-transform: uppercase;
}

.split-debit { color: var(--rose); }
.split-credit { color: var(--emerald); }

.split-acct {
    flex-grow: 1;
    color: var(--text-muted);
}

.split-tech {
    color: var(--text-subtle);
}

.split-amt {
    font-weight: 700;
}

.split-table-mini {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.split-row-mini {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
}

.split-type-mini {
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 700;
}

.split-type-mini.debit { background: #ffe4e6; color: var(--rose); }
.split-type-mini.credit { background: #d1fae5; color: var(--emerald); }

/* ==========================================================================
   Trial Balance Card & Accounts Grid
   ========================================================================== */

.trial-balance-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 28px;
    background: #ffffff;
}

.card-balanced {
    border-left: 5px solid var(--emerald);
}

.card-unbalanced {
    border-left: 5px solid var(--rose);
}

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

.tb-status-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--emerald-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--emerald);
}

.tb-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

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

.tb-figures {
    display: flex;
    align-items: center;
    gap: 20px;
}

.tb-fig {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.tb-fig-label {
    font-size: 10px;
    letter-spacing: 0.8px;
    color: var(--text-subtle);
    font-weight: 600;
}

.tb-fig-val {
    font-size: 18px;
    font-weight: 700;
}

.tb-fig-sep {
    font-size: 20px;
    color: var(--text-subtle);
}

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

.account-card {
    padding: 16px;
    background: #ffffff;
}

.account-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.account-code {
    font-size: 15px;
    font-weight: 800;
    color: var(--primary);
}

.badge-normal {
    font-size: 9px;
    padding: 2px 5px;
    border-radius: 3px;
    font-weight: 700;
}

.badge-normal.debit { background: #ffe4e6; color: var(--rose); }
.badge-normal.credit { background: #d1fae5; color: var(--emerald); }

.account-name {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 4px;
    line-height: 1.3;
    color: #0f172a;
}

.account-type-tag {
    font-size: 10px;
    color: var(--text-subtle);
    margin-bottom: 10px;
    font-weight: 600;
}

.account-balance {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 6px;
    color: #0f172a;
}

/* ==========================================================================
   Dry Run & NACHA Preview
   ========================================================================== */

.dry-run-summary-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid var(--border-blue);
    border-radius: var(--radius-md);
    padding: 16px 24px;
    box-shadow: var(--shadow-sm);
}

.summary-metric {
    display: flex;
    flex-direction: column;
}

.summary-metric.highlight {
    background: #d1fae5;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid #a7f3d0;
}

.metric-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: var(--text-muted);
}

.metric-val {
    font-size: 20px;
    font-weight: 800;
}

.summary-sep {
    font-size: 22px;
    color: var(--text-subtle);
}

.phase3-action-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 5px solid var(--emerald);
    padding: 20px 28px;
    background: #ffffff;
}

.nacha-preview {
    background: #0f172a;
    border: 1px solid var(--border-blue);
    border-radius: var(--radius-md);
    padding: 16px;
    font-size: 12px;
    line-height: 1.6;
    color: #38bdf8;
    max-height: 320px;
    overflow-y: auto;
    white-space: pre;
}

/* ==========================================================================
   Forms & Inputs
   ========================================================================== */

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
    background: #ffffff;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 13px;
    outline: none;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-group.align-end {
    justify-content: flex-end;
}

/* Currency Selector Pill */
.currency-select-sm {
    background: #ffffff;
    border: 1px solid var(--border-blue);
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    font-size: 11px;
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--primary);
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.currency-select-sm:hover,
.currency-select-sm:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

/* Modal Form Sections */
.form-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px dashed var(--border-blue);
}

.section-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: var(--primary);
    color: #ffffff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
}

/* ==========================================================================
   Login Page Dedicated Styles
   ========================================================================== */

.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: radial-gradient(circle at 50% 20%, #bae6fd 0%, #e0f2fe 40%, #f0f7ff 80%);
    padding: 24px;
}

.login-wrapper {
    width: 100%;
    max-width: 460px;
}

.login-card {
    background: #ffffff;
    border: 1px solid var(--border-blue);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 40px -10px rgba(14, 165, 233, 0.25), 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 40px;
}

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

.brand-logo-large {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--primary) 0%, #38bdf8 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-bottom: 16px;
    box-shadow: 0 8px 20px var(--primary-glow);
}

.login-title {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #0369a1;
}

.login-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

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

.input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-subtle);
    pointer-events: none;
}

.input-icon-wrapper input {
    padding-left: 42px !important;
    width: 100%;
}

.form-row-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 12px 0 20px 0;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    cursor: pointer;
}

.password-toggle-btn {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.password-toggle-btn:hover {
    color: var(--primary);
    background: var(--primary-subtle);
}

.input-icon-wrapper input#password {
    padding-right: 44px !important;
}

.credentials-card {
    margin-top: 24px;
    background: #f0f9ff;
    border: 1px solid var(--border-blue);
    border-radius: var(--radius-md);
    padding: 14px 16px;
}

.credentials-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #0369a1;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 10px;
}

.credentials-card-header svg {
    color: var(--primary);
}

.credentials-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.credentials-table th {
    text-align: left;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-subtle);
    padding: 4px 6px;
    border-bottom: 1px solid rgba(14, 165, 233, 0.2);
}

.credentials-table td {
    padding: 6px 6px;
    border-bottom: 1px solid rgba(224, 242, 254, 0.7);
    color: var(--text-main);
    vertical-align: middle;
}

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

.credentials-table code {
    background: #ffffff;
    border: 1px solid var(--border-blue);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: #0369a1;
    font-weight: 600;
}

.cred-role {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.role-admin { background: #e0e7ff; color: #4338ca; }
.role-sup { background: #fef3c7; color: #b45309; }
.role-tech { background: #e0f2fe; color: #0284c7; }
.role-aud { background: #d1fae5; color: #047857; }

.login-footer {
    margin-top: 24px;
    text-align: center;
}

.security-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-subtle);
    font-family: var(--font-mono);
}

.alert-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 13px;
}

.alert-danger {
    background: #ffe4e6;
    border: 1px solid #fecdd3;
    color: #be123c;
}

/* ==========================================================================
   Modals & Toasts
   ========================================================================== */

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 20px;
}

.modal-dialog {
    width: 100%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid var(--border-blue);
}

.modal-dialog.modal-lg {
    max-width: 850px;
}

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

.modal-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

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

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
}

.modal-close:hover {
    color: var(--text-main);
}

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

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

.toast {
    background: #ffffff;
    border: 1px solid var(--border-blue);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px -5px rgba(14, 165, 233, 0.2);
    padding: 14px 20px;
    font-size: 13px;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: toastSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.toast-success { border-left-color: var(--emerald); }
.toast.toast-error { border-left-color: var(--rose); }

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

/* Helper Utilities */
.text-cyan { color: var(--primary); }
.text-emerald { color: var(--emerald); }
.text-amber { color: var(--amber); }
.text-rose { color: var(--rose); }
.text-muted { color: var(--text-muted); }
.text-bold { font-weight: 700; }
.font-mono { font-family: var(--font-mono); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mb-1 { margin-bottom: 4px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.py-4 { padding-top: 24px; padding-bottom: 24px; }
.block { display: block; }

/* ==========================================================================
   Location Management Modal Styles
   ========================================================================== */
.loc-nav-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-glass);
    flex-wrap: wrap;
}

.loc-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(240, 249, 255, 0.6);
    border: 1px solid var(--border-blue);
    cursor: pointer;
    transition: all 0.2s ease;
}

.loc-tab-btn:hover {
    color: var(--primary);
    background: #e0f2fe;
    border-color: rgba(14, 165, 233, 0.4);
}

.loc-tab-btn.active {
    color: #ffffff;
    background: var(--gradient-primary);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25);
}

.loc-tab-pane {
    animation: fadeIn 0.2s ease-in-out;
}

/* Quick inline action link beside form labels */
.btn-link-action {
    background: none;
    border: none;
    padding: 0 4px;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.15s ease;
}

.btn-link-action:hover {
    color: #0284c7;
    text-decoration: none;
}

.loc-city-pill {
    display: inline-block;
    padding: 2px 7px;
    font-size: 11px;
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 4px;
    margin: 2px;
}

