/* ========================================
   OPTIXRENTAL - Professional Theme
   ======================================== */

:root {
    --primary: #3b5bdb;
    --primary-dark: #2f4acb;
    --primary-light: #e8ecff;
    --sidebar-bg: #0d1b2a;
    --sidebar-hover: #162232;
    --sidebar-active-bg: rgba(59, 91, 219, 0.18);
    --sidebar-active-border: #3b5bdb;
    --sidebar-text: #8da5bb;
    --sidebar-text-active: #ffffff;
    --sidebar-width: 260px;
    --topbar-height: 60px;
    --bg-main: #f0f4f9;
    --card-bg: #ffffff;
    --text-dark: #1a2332;
    --text-medium: #374151;
    --text-muted: #6b7280;
    --border-color: #e5eaf0;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0,0,0,0.08);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --transition: all 0.22s ease;
}

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

body {
    font-family: 'Inter', 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-main);
    color: var(--text-dark);
    margin: 0; padding: 0;
    -webkit-font-smoothing: antialiased;
}

/* ============================
   LOGIN PAGE
   ============================ */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    background: #0d1b2a;
}

.auth-left {
    flex: 1;
    display: none;
    flex-direction: column;
    justify-content: center;
    padding: 60px 50px;
    background: linear-gradient(145deg, #0d1b2a 0%, #162d47 50%, #0d1b2a 100%);
    position: relative;
    overflow: hidden;
}

.auth-left::before {
    content: '';
    position: absolute;
    width: 520px; height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59,91,219,0.22) 0%, transparent 70%);
    top: -120px; right: -100px;
}

.auth-left::after {
    content: '';
    position: absolute;
    width: 380px; height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(6,182,212,0.16) 0%, transparent 70%);
    bottom: -100px; left: -60px;
}

.auth-left-content { position: relative; z-index: 1; }

.auth-brand {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 60px;
}

.auth-brand-icon {
    width: 48px; height: 48px;
    border-radius: 13px;
    background: linear-gradient(135deg, #3b5bdb, #06b6d4);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; flex-shrink: 0;
}

.auth-brand-text { line-height: 1.1; }

.auth-brand-name {
    font-size: 22px; font-weight: 800;
    color: #ffffff; letter-spacing: -0.4px;
    display: block;
}

.auth-brand-name span { color: #06b6d4; }

.auth-brand-sub {
    font-size: 11px; color: #7a9bb5;
    text-transform: uppercase; letter-spacing: 0.8px;
}

.auth-hero-title {
    font-size: 36px; font-weight: 800;
    color: #ffffff; line-height: 1.25;
    margin-bottom: 18px; letter-spacing: -0.5px;
}

.auth-hero-title .gradient-text {
    background: linear-gradient(90deg, #4f7eff, #06b6d4);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-hero-desc {
    font-size: 15px; color: #8da5bb;
    line-height: 1.7; max-width: 390px;
    margin-bottom: 44px;
}

.auth-features { display: flex; flex-direction: column; gap: 14px; }

.auth-feature-item {
    display: flex; align-items: center; gap: 14px;
}

.auth-feature-dot {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: rgba(59, 91, 219, 0.18);
    border: 1px solid rgba(59, 91, 219, 0.28);
    display: flex; align-items: center; justify-content: center;
    font-size: 17px; flex-shrink: 0;
}

.auth-feature-text {
    color: #c1d6e8; font-size: 14px; font-weight: 500;
}

.auth-right {
    width: 100%; max-width: 480px;
    background: #f8fafc;
    display: flex; flex-direction: column;
    justify-content: center;
    padding: 44px 38px;
    min-height: 100vh;
}

.auth-mobile-brand {
    display: flex; align-items: center;
    gap: 12px; margin-bottom: 36px;
}

.auth-mobile-brand-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b5bdb, #06b6d4);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
}

.auth-mobile-brand-text { line-height: 1.15; }

.auth-mobile-brand-name {
    font-size: 20px; font-weight: 800;
    color: var(--text-dark); letter-spacing: -0.3px;
    display: block;
}

.auth-mobile-brand-name span { color: var(--primary); }

.auth-mobile-brand-sub {
    font-size: 11px; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.6px;
}

.auth-form-title {
    font-size: 26px; font-weight: 800;
    color: var(--text-dark); margin-bottom: 6px;
    letter-spacing: -0.4px;
}

.auth-form-sub {
    font-size: 14px; color: var(--text-muted);
    margin-bottom: 30px; line-height: 1.5;
}

.auth-form-group { margin-bottom: 18px; }

.auth-form-group label {
    display: block; font-size: 13px;
    font-weight: 600; color: var(--text-medium);
    margin-bottom: 7px;
}

.auth-input-wrap { position: relative; }

.auth-input-wrap .input-icon {
    position: absolute; left: 13px;
    top: 50%; transform: translateY(-50%);
    color: var(--text-muted); font-size: 15px;
    pointer-events: none;
}

.auth-input-wrap .form-control {
    width: 100%; padding: 12px 14px 12px 40px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px; color: var(--text-dark);
    background: #fff; transition: var(--transition);
    outline: none; appearance: none;
}

.auth-input-wrap .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(59,91,219,0.1);
}

.auth-input-wrap .toggle-pw {
    position: absolute; right: 12px;
    top: 50%; transform: translateY(-50%);
    background: none; border: none;
    color: var(--text-muted); cursor: pointer;
    padding: 0; font-size: 15px; line-height: 1;
}

.form-check-row {
    display: flex; align-items: center;
    justify-content: space-between; margin-bottom: 22px;
}

.custom-checkbox {
    display: flex; align-items: center;
    gap: 8px; cursor: pointer;
    font-size: 13px; color: var(--text-medium);
    user-select: none;
}

.custom-checkbox input[type="checkbox"] {
    width: 15px; height: 15px;
    accent-color: var(--primary); cursor: pointer;
    border-radius: 4px;
}

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

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

.auth-btn {
    width: 100%; padding: 13px;
    background: linear-gradient(135deg, #3b5bdb, #5c7cfa);
    border: none; border-radius: var(--radius-sm);
    color: #fff; font-size: 15px; font-weight: 600;
    cursor: pointer; transition: var(--transition);
    letter-spacing: 0.3px; position: relative;
}

.auth-btn:hover {
    background: linear-gradient(135deg, #2f4acb, #4c6cf0);
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(59,91,219,0.38);
}

.auth-btn:active { transform: translateY(0); }

.auth-alert {
    padding: 11px 15px; border-radius: var(--radius-sm);
    font-size: 13px; margin-bottom: 18px;
    border: 1px solid; display: flex; align-items: center; gap: 8px;
}

.auth-alert.success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.auth-alert.error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

.auth-error-list {
    padding: 11px 15px; border-radius: var(--radius-sm);
    font-size: 13px; margin-bottom: 18px;
    background: #fef2f2; border: 1px solid #fecaca;
    color: #991b1b;
}

.auth-error-list ul { margin: 4px 0 0 16px; padding: 0; }
.auth-error-list li { margin-bottom: 2px; }

/* ============================
   SIDEBAR
   ============================ */
#sidebar {
    position: fixed; top: 0; left: 0;
    width: var(--sidebar-width); height: 100vh;
    background: var(--sidebar-bg);
    z-index: 1000;
    display: flex; flex-direction: column;
    transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
    overflow-y: auto; overflow-x: hidden;
}

#sidebar::-webkit-scrollbar { width: 3px; }
#sidebar::-webkit-scrollbar-track { background: transparent; }
#sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }

.sidebar-brand {
    display: flex; align-items: center; gap: 12px;
    padding: 20px 18px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    text-decoration: none; flex-shrink: 0;
}

.sidebar-brand-icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #3b5bdb, #06b6d4);
    display: flex; align-items: center; justify-content: center;
    font-size: 17px; flex-shrink: 0;
}

.sidebar-brand-text { overflow: hidden; line-height: 1.1; }

.sidebar-brand-name {
    font-size: 16px; font-weight: 800;
    color: #ffffff; letter-spacing: -0.3px;
    white-space: nowrap; display: block;
}

.sidebar-brand-name span { color: #06b6d4; }

.sidebar-brand-sub {
    font-size: 10px; color: var(--sidebar-text);
    text-transform: uppercase; letter-spacing: 0.7px;
}

.sidebar-user {
    padding: 14px 16px;
    display: flex; align-items: center; gap: 11px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    background: rgba(255,255,255,0.02);
}

.sidebar-user-avatar {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #3b5bdb, #06b6d4);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700; color: #fff;
    flex-shrink: 0;
}

.sidebar-user-info { overflow: hidden; }

.sidebar-user-name {
    font-size: 13px; font-weight: 600;
    color: #e2e8f0; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
    display: block;
}

.sidebar-user-role {
    font-size: 11px; color: var(--sidebar-text);
}

.sidebar-nav { padding: 14px 0; flex: 1; }

.sidebar-section { padding: 0 12px; margin-bottom: 6px; }

.sidebar-section-title {
    font-size: 10px; font-weight: 700;
    color: var(--sidebar-text);
    text-transform: uppercase; letter-spacing: 1.2px;
    padding: 8px 8px 5px;
}

.sidebar-link {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 11px;
    border-radius: 9px;
    text-decoration: none; color: var(--sidebar-text);
    font-size: 13px; font-weight: 500;
    transition: var(--transition); margin-bottom: 2px;
    position: relative;
}

.sidebar-link:hover {
    background: var(--sidebar-hover);
    color: #c8d8e8; text-decoration: none;
}

.sidebar-link.active {
    background: var(--sidebar-active-bg);
    color: #fff; font-weight: 600;
}

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

.sidebar-link .nav-icon {
    width: 20px; text-align: center;
    font-size: 15px; flex-shrink: 0;
}

.sidebar-link .nav-badge {
    margin-left: auto;
    background: var(--primary); color: #fff;
    font-size: 10px; font-weight: 700;
    padding: 2px 7px; border-radius: 20px;
}

.sidebar-link .nav-badge.warn { background: var(--warning); color: #fff; }

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}

.sidebar-logout {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 11px; border-radius: 9px;
    color: #ff7b7b; font-size: 13px; font-weight: 500;
    cursor: pointer; background: none; border: none;
    width: 100%; transition: var(--transition); text-decoration: none;
}

.sidebar-logout:hover {
    background: rgba(239,68,68,0.1);
    color: #ff6b6b; text-decoration: none;
}

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

/* ============================
   MAIN WRAPPER + TOPBAR
   ============================ */
.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh; display: flex;
    flex-direction: column;
    transition: margin-left 0.28s cubic-bezier(0.4,0,0.2,1);
}

.topbar {
    height: var(--topbar-height);
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    display: flex; align-items: center;
    padding: 0 24px; position: sticky;
    top: 0; z-index: 100; gap: 12px;
}

.topbar-toggle {
    display: none; background: none;
    border: none; cursor: pointer; padding: 7px;
    border-radius: 8px; color: var(--text-muted);
    transition: var(--transition); font-size: 20px;
    line-height: 1; align-items: center; justify-content: center;
}

.topbar-toggle:hover { background: var(--bg-main); color: var(--text-dark); }

.topbar-title {
    font-size: 16px; font-weight: 700;
    color: var(--text-dark); flex: 1;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.topbar-actions {
    display: flex; align-items: center; gap: 6px;
}

.topbar-icon-btn {
    width: 36px; height: 36px;
    border-radius: 9px; background: var(--bg-main);
    border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); font-size: 16px;
    transition: var(--transition); position: relative;
    text-decoration: none;
}

.topbar-icon-btn:hover { background: var(--primary-light); color: var(--primary); }

.notif-dot {
    position: absolute; top: 7px; right: 7px;
    width: 7px; height: 7px;
    background: #ef4444; border-radius: 50%;
    border: 1.5px solid #fff;
}

.topbar-divider {
    width: 1px; height: 24px;
    background: var(--border-color); flex-shrink: 0;
}

.topbar-user-wrap { position: relative; }

.topbar-user-btn {
    display: flex; align-items: center; gap: 9px;
    padding: 5px 10px 5px 5px;
    border-radius: 10px; cursor: pointer;
    background: none; border: none;
    transition: var(--transition);
}

.topbar-user-btn:hover { background: var(--bg-main); }

.topbar-avatar {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #3b5bdb, #06b6d4);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; color: #fff;
    flex-shrink: 0;
}

.topbar-user-name {
    font-size: 13px; font-weight: 600;
    color: var(--text-dark); white-space: nowrap;
}

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

.topbar-dropdown {
    position: absolute; right: 0; top: calc(100% + 8px);
    width: 230px; background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    padding: 6px; z-index: 200; display: none;
}

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

.td-user-header {
    padding: 10px 12px 12px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 4px;
}

.td-user-name { font-size: 14px; font-weight: 700; color: var(--text-dark); }
.td-user-email { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.td-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: 8px;
    text-decoration: none; color: var(--text-medium);
    font-size: 13px; transition: var(--transition);
    cursor: pointer; background: none; border: none;
    width: 100%;
}

.td-item:hover { background: var(--bg-main); color: var(--text-dark); text-decoration: none; }
.td-item.danger { color: #dc2626; }
.td-item.danger:hover { background: #fef2f2; color: #dc2626; }

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

/* ============================
   PAGE CONTENT
   ============================ */
.page-content { padding: 28px 24px; flex: 1; }

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

.page-header-left { }

.page-title {
    font-size: 22px; font-weight: 800;
    color: var(--text-dark); letter-spacing: -0.4px; margin: 0;
}

.page-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 3px; }

/* ============================
   STAT CARDS
   ============================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px; margin-bottom: 26px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 22px 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition); cursor: default;
}

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

.stat-card-top { display: flex; align-items: flex-start; justify-content: space-between; }

.stat-icon {
    width: 46px; height: 46px;
    border-radius: 12px;
    display: flex; align-items: center;
    justify-content: center; font-size: 20px;
}

.si-blue { background: #eff3ff; color: #3b5bdb; }
.si-green { background: #ecfdf5; color: #059669; }
.si-orange { background: #fff7ed; color: #d97706; }
.si-purple { background: #f5f3ff; color: #7c3aed; }
.si-cyan { background: #ecfeff; color: #0891b2; }
.si-red { background: #fef2f2; color: #dc2626; }

.stat-trend {
    font-size: 12px; font-weight: 600;
    display: flex; align-items: center; gap: 3px;
    padding: 3px 8px; border-radius: 20px;
}

.stat-trend.up { background: #ecfdf5; color: #059669; }
.stat-trend.down { background: #fef2f2; color: #dc2626; }
.stat-trend.flat { background: #f8fafc; color: var(--text-muted); }

.stat-value {
    font-size: 28px; font-weight: 800;
    color: var(--text-dark); letter-spacing: -0.5px;
    margin: 14px 0 4px; line-height: 1;
}

.stat-label { font-size: 13px; color: var(--text-muted); font-weight: 500; }

/* ============================
   CONTENT CARDS
   ============================ */
.card-pro {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

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

.card-pro-title {
    font-size: 15px; font-weight: 700;
    color: var(--text-dark); margin: 0;
    display: flex; align-items: center; gap: 8px;
}

.card-pro-title .title-icon {
    width: 28px; height: 28px; border-radius: 7px;
    display: flex; align-items: center;
    justify-content: center; font-size: 13px;
}

.card-pro-body { padding: 20px; }
.card-pro-body.p-0 { padding: 0; }

/* ============================
   TABLES
   ============================ */
.tbl-pro { width: 100%; border-collapse: collapse; }

.tbl-pro thead th {
    padding: 11px 18px; text-align: left;
    font-size: 11px; font-weight: 700;
    color: var(--text-muted); text-transform: uppercase;
    letter-spacing: 0.7px; background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.tbl-pro tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.14s;
}

.tbl-pro tbody tr:last-child { border-bottom: none; }
.tbl-pro tbody tr:hover { background: #f8fafc; }

.tbl-pro tbody td {
    padding: 13px 18px; font-size: 13.5px;
    color: var(--text-medium); vertical-align: middle;
}

.tbl-primary { font-weight: 600; color: var(--text-dark); }

/* ============================
   STATUS BADGES
   ============================ */
.badge-pro {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 600;
}

.badge-pro::before {
    content: ''; width: 5px; height: 5px;
    border-radius: 50%; background: currentColor;
}

.bp-active { background: #ecfdf5; color: #059669; }
.bp-pending { background: #fff7ed; color: #d97706; }
.bp-expired { background: #fef2f2; color: #dc2626; }
.bp-vacant { background: #eff3ff; color: #3b5bdb; }
.bp-maintenance { background: #f5f3ff; color: #7c3aed; }

/* ============================
   BUTTONS
   ============================ */
.btn-pro {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 18px; border: none; border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 600; cursor: pointer;
    transition: var(--transition); text-decoration: none;
    letter-spacing: 0.1px; white-space: nowrap;
}

.btn-pro-primary { background: var(--primary); color: #fff; }
.btn-pro-primary:hover {
    background: var(--primary-dark); color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(59,91,219,0.32);
    text-decoration: none;
}

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

.btn-pro-outline:hover {
    background: var(--bg-main); color: var(--text-dark);
    text-decoration: none;
}

.btn-pro-danger { background: #dc2626; color: #fff; }
.btn-pro-danger:hover {
    background: #b91c1c; color: #fff;
    text-decoration: none;
}

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

.btn-pro-icon {
    width: 34px; height: 34px; padding: 0;
    display: inline-flex; align-items: center;
    justify-content: center; border-radius: 8px;
}

/* ============================
   QUICK ACTIONS
   ============================ */
.qa-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.qa-item {
    display: flex; flex-direction: column;
    align-items: center; gap: 10px;
    padding: 18px 10px;
    border-radius: var(--radius);
    background: var(--bg-main);
    border: 1.5px solid var(--border-color);
    text-decoration: none; transition: var(--transition);
    cursor: pointer;
}

.qa-item:hover {
    background: var(--primary-light);
    border-color: rgba(59,91,219,0.3);
    transform: translateY(-2px); box-shadow: var(--shadow);
    text-decoration: none;
}

.qa-icon {
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center;
    justify-content: center; font-size: 20px;
}

.qa-label {
    font-size: 12px; font-weight: 600;
    color: var(--text-medium); text-align: center; line-height: 1.3;
}

/* ============================
   ACTIVITY FEED
   ============================ */
.activity-feed { }

.act-item {
    display: flex; gap: 13px;
    padding: 13px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.13s;
}

.act-item:last-child { border-bottom: none; }
.act-item:hover { background: #f8fafc; }

.act-icon {
    width: 34px; height: 34px; border-radius: 9px;
    display: flex; align-items: center;
    justify-content: center; font-size: 14px; flex-shrink: 0;
}

.ai-blue { background: #eff3ff; color: #3b5bdb; }
.ai-green { background: #ecfdf5; color: #059669; }
.ai-orange { background: #fff7ed; color: #d97706; }
.ai-red { background: #fef2f2; color: #dc2626; }
.ai-purple { background: #f5f3ff; color: #7c3aed; }

.act-text { font-size: 13px; color: var(--text-medium); line-height: 1.5; }
.act-text strong { color: var(--text-dark); font-weight: 600; }
.act-time { font-size: 11.5px; color: var(--text-muted); margin-top: 3px; }

/* ============================
   AI PANEL
   ============================ */
.ai-insights {
    background: linear-gradient(145deg, #0d1b2a 0%, #162d47 100%);
    border-radius: var(--radius); padding: 20px;
    color: #fff; position: relative; overflow: hidden;
    border: 1px solid rgba(59,91,219,0.25);
}

.ai-insights::before {
    content: '';
    position: absolute; width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(59,91,219,0.25) 0%, transparent 70%);
    top: -60px; right: -40px;
}

.ai-header {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 16px; position: relative; z-index: 1;
}

.ai-icon-wrap {
    width: 38px; height: 38px; border-radius: 10px;
    background: linear-gradient(135deg, #3b5bdb, #06b6d4);
    display: flex; align-items: center; justify-content: center;
    font-size: 17px;
}

.ai-title { font-size: 14px; font-weight: 700; color: #fff; margin: 0; }
.ai-sub { font-size: 11px; color: #7a9bb5; }

.ai-list {
    position: relative; z-index: 1;
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: 8px;
}

.ai-list-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 10px 13px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 9px; font-size: 13px; color: #c1d6e8;
}

.ai-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: #06b6d4; margin-top: 5px; flex-shrink: 0;
}

/* ============================
   PROFILE PAGE
   ============================ */
.profile-layout {
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: 24px; align-items: start;
}

.profile-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm); overflow: hidden;
}

.profile-cover {
    height: 78px;
    background: linear-gradient(135deg, #1e3a5f 0%, #3b5bdb 60%, #06b6d4 100%);
}

.profile-avatar-section {
    padding: 0 18px 18px; text-align: center; margin-top: -28px;
}

.profile-avatar {
    width: 62px; height: 62px; border-radius: 16px;
    background: linear-gradient(135deg, #3b5bdb, #06b6d4);
    display: inline-flex; align-items: center;
    justify-content: center; font-size: 24px;
    font-weight: 800; color: #fff;
    border: 3px solid #fff;
    box-shadow: 0 4px 14px rgba(0,0,0,0.14);
}

.profile-display-name {
    font-size: 16px; font-weight: 800;
    color: var(--text-dark); margin-top: 11px; margin-bottom: 3px;
}

.profile-display-email { font-size: 12.5px; color: var(--text-muted); }

.profile-info-list {
    list-style: none; padding: 0; margin: 0;
}

.profile-info-item {
    display: flex; align-items: center; gap: 11px;
    padding: 10px 18px; font-size: 13px;
    color: var(--text-medium);
    border-top: 1px solid var(--border-color);
}

.profile-info-item .pii-icon { color: var(--text-muted); font-size: 14px; }

.profile-nav-list {
    list-style: none; padding: 6px; margin: 0;
    border-top: 1px solid var(--border-color);
}

.profile-nav-link {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: 8px;
    text-decoration: none; color: var(--text-medium);
    font-size: 13px; font-weight: 500; transition: var(--transition);
}

.profile-nav-link:hover { background: var(--bg-main); color: var(--text-dark); text-decoration: none; }
.profile-nav-link.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }

/* Form styles for profile */
.form-section-hdr {
    font-size: 14px; font-weight: 700;
    color: var(--text-dark); margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    display: flex; align-items: center; gap: 8px;
}

.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.fg-pro { margin-bottom: 18px; }

.fg-pro label {
    display: block; font-size: 13px; font-weight: 600;
    color: var(--text-medium); margin-bottom: 7px;
}

.fg-pro .fc-pro {
    width: 100%; padding: 11px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px; color: var(--text-dark);
    background: #fff; transition: var(--transition); outline: none;
}

.fg-pro .fc-pro:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59,91,219,0.1);
}

.fg-pro .fc-pro.has-error { border-color: #dc2626; }

.err-msg {
    font-size: 12px; color: #dc2626;
    margin-top: 5px; display: flex; align-items: center; gap: 4px;
}

.save-ok {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; color: #059669; font-weight: 600;
    background: #ecfdf5; padding: 5px 12px; border-radius: 20px;
}

.password-strength { margin-top: 6px; }
.strength-bar {
    height: 4px; border-radius: 2px;
    background: var(--border-color); overflow: hidden;
}
.strength-bar-fill {
    height: 100%; border-radius: 2px;
    transition: width 0.3s, background 0.3s;
}

/* ============================
   BREADCRUMB
   ============================ */
.breadcrumb-pro {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; color: var(--text-muted); margin-bottom: 20px;
}

.breadcrumb-pro a { color: var(--primary); text-decoration: none; }
.breadcrumb-pro a:hover { text-decoration: underline; }
.breadcrumb-pro .sep { color: var(--border-color); }
.breadcrumb-pro .current { color: var(--text-medium); font-weight: 600; }

/* ============================
   RESPONSIVE
   ============================ */
@media (min-width: 992px) {
    .auth-left { display: flex; }
    .auth-mobile-brand { display: none; }
}

@media (max-width: 991.98px) {
    #sidebar { transform: translateX(calc(-1 * var(--sidebar-width))); }
    #sidebar.open { transform: translateX(0); }
    .sidebar-overlay.active { display: block; }
    .main-wrapper { margin-left: 0; }
    .topbar-toggle { display: flex; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .qa-grid { grid-template-columns: repeat(2, 1fr); }
    .profile-layout { grid-template-columns: 1fr; }
    .page-content { padding: 20px 16px; }
    .topbar { padding: 0 16px; }
    .form-row-2 { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 767.98px) {
    .two-col { grid-template-columns: 1fr !important; }
    .topbar-user-name { display: none; }
}

@media (max-width: 575.98px) {
    .stats-grid { gap: 10px; }
    .stat-card { padding: 16px 14px; }
    .stat-value { font-size: 22px; }
    .page-header { flex-direction: column; align-items: flex-start; }
    .auth-right { padding: 30px 20px; }
    .qa-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================
   MISC UTILS
   ============================ */
.grid-2col { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.grid-2col-equal { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

@media (max-width: 991.98px) {
    .grid-2col, .grid-2col-equal { grid-template-columns: 1fr; }
}

.stack { display: flex; flex-direction: column; gap: 20px; }
.mb-24 { margin-bottom: 24px; }

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

.empty-state .empty-icon { font-size: 40px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; margin: 0; }

/* ============================
   TABLE ACTION BUTTONS
   ============================ */
.tbl-action-btn {
    width: 30px; height: 30px;
    border-radius: 7px; border: none;
    cursor: pointer; display: inline-flex;
    align-items: center; justify-content: center;
    font-size: 13px; transition: all 0.18s;
    background: none; padding: 0;
}

.tbl-action-btn.edit   { background: #eff3ff; color: #3b5bdb; }
.tbl-action-btn.edit:hover  { background: #3b5bdb; color: #fff; }

.tbl-action-btn.disable { background: #fff7ed; color: #d97706; }
.tbl-action-btn.disable:hover { background: #d97706; color: #fff; }

.tbl-action-btn.enable  { background: #f0fdf4; color: #059669; }
.tbl-action-btn.enable:hover  { background: #059669; color: #fff; }

.tbl-action-btn.delete  { background: #fef2f2; color: #dc2626; }
.tbl-action-btn.delete:hover  { background: #dc2626; color: #fff; }

/* ============================
   SIDEBAR SUBMENU
   ============================ */
.sidebar-submenu {
    padding-left: 18px;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.25s ease;
}

.sidebar-submenu.open { max-height: 400px; }

.sidebar-parent {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 11px; border-radius: 9px;
    text-decoration: none; color: var(--sidebar-text);
    font-size: 13px; font-weight: 500;
    transition: var(--transition); margin-bottom: 2px;
    cursor: pointer; background: none; border: none;
    width: 100%; text-align: left;
}

.sidebar-parent:hover { background: var(--sidebar-hover); color: #c8d8e8; }

.sidebar-parent.open { background: var(--sidebar-hover); color: #c8d8e8; }

.sidebar-parent .nav-arrow {
    margin-left: auto; font-size: 11px;
    transition: transform 0.22s;
}

.sidebar-parent.open .nav-arrow { transform: rotate(90deg); }

/* ============================
   SERVER-SIDE DATATABLE
   ============================ */
.dt-footer {
    display: flex; align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap; gap: 8px;
    background: #fff;
}

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

.dataTables_paginate {
    display: flex !important; align-items: center; gap: 2px;
}

.paginate_button {
    padding: 5px 11px !important;
    border-radius: 6px !important;
    font-size: 13px; font-weight: 500;
    cursor: pointer;
    color: var(--text-medium) !important;
    background: transparent !important;
    border: 1.5px solid transparent !important;
    transition: var(--transition);
    text-decoration: none !important;
    line-height: 1.4;
}

.paginate_button:not(.disabled):not(.current):hover {
    background: var(--bg-main) !important;
    border-color: var(--border-color) !important;
    color: var(--text-dark) !important;
}

.paginate_button.current,
.paginate_button.current:hover {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
    font-weight: 700;
}

.paginate_button.disabled,
.paginate_button.disabled:hover {
    opacity: 0.35 !important;
    cursor: default !important;
    pointer-events: none;
}

/* Sort icons in th */
table.dataTable thead th.sorting,
table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc {
    padding-right: 28px;
    cursor: pointer;
}

table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc {
    color: var(--primary);
}

table.dataTable thead th.sorting:before,
table.dataTable thead th.sorting_asc:before,
table.dataTable thead th.sorting_desc:before,
table.dataTable thead th.sorting:after,
table.dataTable thead th.sorting_asc:after,
table.dataTable thead th.sorting_desc:after {
    font-size: 10px;
    opacity: 0.55;
    right: 10px;
}

/* Processing overlay */
.dataTables_processing {
    background: rgba(255,255,255,0.94) !important;
    padding: 12px 20px !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1) !important;
    font-size: 13px !important; font-weight: 600 !important;
    color: var(--primary) !important;
    border: 1px solid var(--border-color) !important;
    top: 55% !important;
    width: auto !important;
    min-width: 140px;
    text-align: center !important;
}

/* ============================
   MULTI-SELECT BANKS
   ============================ */
.ms-wrap {
    position: relative;
}

.ms-trigger {
    width: 100%; padding: 11px 38px 11px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px; color: var(--text-dark);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 13px center;
    cursor: pointer; transition: var(--transition);
    outline: none; text-align: left;
    border: 1.5px solid var(--border-color);
    min-height: 44px; display: flex; align-items: center;
    flex-wrap: wrap; gap: 4px;
    appearance: none;
}

.ms-trigger:focus, .ms-trigger.open {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59,91,219,0.1);
}

.ms-tag {
    display: inline-flex; align-items: center; gap: 4px;
    background: var(--primary-light); color: var(--primary);
    font-size: 11.5px; font-weight: 600;
    padding: 2px 8px; border-radius: 20px;
    white-space: nowrap; line-height: 1.4;
}

.ms-tag .ms-remove {
    background: none; border: none; cursor: pointer;
    color: var(--primary); padding: 0; font-size: 11px;
    line-height: 1; display: flex; align-items: center;
    opacity: 0.7;
}

.ms-tag .ms-remove:hover { opacity: 1; }

.ms-placeholder { color: var(--text-muted); font-size: 14px; }

.ms-dropdown {
    position: fixed;
    background: #fff; border: 1.5px solid var(--primary);
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 30px rgba(0,0,0,0.18);
    z-index: 10002; display: none; overflow: hidden;
}

.ms-dropdown.open { display: block; }

.ms-search {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
}

.ms-search input {
    width: 100%; padding: 7px 11px;
    border: 1.5px solid var(--border-color);
    border-radius: 6px; font-size: 13px;
    outline: none; color: var(--text-dark);
}

.ms-search input:focus { border-color: var(--primary); }

.ms-list {
    max-height: 200px; overflow-y: auto;
    padding: 6px;
}

.ms-list::-webkit-scrollbar { width: 4px; }
.ms-list::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 2px; }

.ms-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: 7px;
    cursor: pointer; transition: background 0.13s;
    font-size: 13px; color: var(--text-medium);
    user-select: none;
}

.ms-item:hover { background: var(--bg-main); }

.ms-item.selected { background: var(--primary-light); color: var(--primary); }

.ms-item input[type="checkbox"] {
    width: 15px; height: 15px;
    accent-color: var(--primary);
    flex-shrink: 0; cursor: pointer;
}

.ms-item-label { flex: 1; line-height: 1.3; }
.ms-item-sub { font-size: 11px; color: var(--text-muted); display: block; }

.ms-empty {
    padding: 16px; text-align: center;
    font-size: 13px; color: var(--text-muted);
}

.ms-footer {
    padding: 8px 12px;
    border-top: 1px solid var(--border-color);
    background: #f8fafc; font-size: 12px;
    color: var(--text-muted); display: flex;
    align-items: center; justify-content: space-between;
}

.ms-footer-btn {
    background: none; border: none; cursor: pointer;
    font-size: 12px; font-weight: 600;
    color: var(--primary); padding: 0;
}

.ms-footer-btn:hover { text-decoration: underline; }
