/* ============================================================
   IBMS — NUR DIGITAL INSURANCE BROKERS
   Premium Design System
   ============================================================ */

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

/* ─── CSS Variables ─────────────────────────────────────── */
:root {
    --primary: #0f3460;
    --primary-light: #1a4f8a;
    --primary-dark: #0a2240;
    --accent: #e94560;
    --accent-light: #ff6b81;
    --accent-dark: #c73a52;
    --sidebar-bg: #0c1929;
    --sidebar-hover: #162d50;
    --sidebar-active: #1a3a66;
    --sidebar-width: 270px;
    --sidebar-collapsed: 70px;
    --topbar-height: 64px;
    --body-bg: #f0f2f5;
    --card-bg: #ffffff;
    --text-primary: #1a1a2e;
    --text-secondary: #6c757d;
    --text-muted: #adb5bd;
    --border-color: #e9ecef;
    --success: #00c853;
    --warning: #ffc107;
    --danger: #ff1744;
    --info: #00b0ff;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --glass-bg: rgba(255,255,255,0.85);
    --glass-border: rgba(255,255,255,0.18);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--body-bg);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    line-height: 1.3;
}

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

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

/* ─── Login Page ────────────────────────────────────────── */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0c1929 0%, #0f3460 40%, #1a4f8a 70%, #e94560 100%);
    position: relative;
    overflow: hidden;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(233,69,96,0.15) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    border-radius: 50%;
    animation: floatBubble 8s ease-in-out infinite;
}

.login-wrapper::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(15,52,96,0.2) 0%, transparent 70%);
    bottom: -80px;
    left: -80px;
    border-radius: 50%;
    animation: floatBubble 10s ease-in-out infinite reverse;
}

@keyframes floatBubble {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -30px) scale(1.1); }
}

.login-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 2;
    animation: slideUp 0.6s ease-out;
}

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

.login-card .logo-area {
    text-align: center;
    margin-bottom: 32px;
}

.login-card .logo-area img {
    height: 60px;
    margin-bottom: 12px;
}

.login-card .logo-area h2 {
    font-size: 1.3rem;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.login-card .logo-area p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 4px;
}

/* ─── Form Controls ─────────────────────────────────────── */
.form-floating {
    margin-bottom: 16px;
}

.form-control, .form-select {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 14px;
    transition: var(--transition);
    background: #fff;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(15,52,96,0.1);
}

.form-label {
    font-weight: 500;
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 6px;
}

/* ─── Buttons ───────────────────────────────────────────── */
.btn {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    border: none;
    cursor: pointer;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    box-shadow: 0 4px 15px rgba(15,52,96,0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    box-shadow: 0 6px 20px rgba(15,52,96,0.4);
    transform: translateY(-1px);
    color: #fff;
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: #fff;
    box-shadow: 0 4px 15px rgba(233,69,96,0.3);
}

.btn-accent:hover {
    background: linear-gradient(135deg, var(--accent-dark), var(--accent));
    box-shadow: 0 6px 20px rgba(233,69,96,0.4);
    transform: translateY(-1px);
    color: #fff;
}

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

.btn-outline-primary:hover {
    background: var(--primary);
    color: #fff;
}

.btn-light {
    background: #f8f9fa;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-light:hover {
    background: #e9ecef;
}

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

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-login {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    border-radius: var(--radius-md);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ─── Sidebar ───────────────────────────────────────────── */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--sidebar-bg) 0%, #0a1628 100%);
    z-index: 1040;
    transition: var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}

.sidebar-brand {
    padding: 20px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    min-height: var(--topbar-height);
}

.sidebar-brand img {
    height: 40px;
    border-radius: 8px;
}

.sidebar-brand .brand-text {
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.2;
    letter-spacing: -0.3px;
}

.sidebar-brand .brand-text small {
    font-size: 10px;
    font-weight: 400;
    color: rgba(255,255,255,0.5);
    display: block;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-menu {
    list-style: none;
    padding: 12px 0;
    margin: 0;
}

.sidebar-menu .menu-header {
    padding: 16px 24px 8px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.3);
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

.sidebar-menu .menu-item {
    margin: 2px 12px;
}

.sidebar-menu .menu-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: rgba(255,255,255,0.65);
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 400;
    transition: var(--transition);
    position: relative;
}

.sidebar-menu .menu-item a i {
    font-size: 18px;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-menu .menu-item a:hover {
    background: var(--sidebar-hover);
    color: #fff;
    transform: translateX(4px);
}

.sidebar-menu .menu-item.active a {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    box-shadow: 0 4px 15px rgba(15,52,96,0.4);
}

.sidebar-menu .menu-item.active a::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: var(--accent);
    border-radius: 0 4px 4px 0;
}

.sidebar-menu .menu-item .badge {
    margin-left: auto;
    font-size: 10px;
    padding: 3px 8px;
}

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

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

.topbar-left .toggle-sidebar {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.topbar-left .toggle-sidebar:hover {
    background: var(--body-bg);
}

.topbar-left .page-title {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

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

.topbar-right .top-icon-btn {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.topbar-right .top-icon-btn:hover {
    background: var(--body-bg);
    color: var(--primary);
}

.topbar-right .top-icon-btn .badge-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    border: 2px solid #fff;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

.user-dropdown {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: var(--radius-lg);
    transition: var(--transition);
    border: none;
    background: transparent;
}

.user-dropdown:hover {
    background: var(--body-bg);
}

.user-dropdown .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
}

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

.user-dropdown .user-info .user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    line-height: 1.2;
}

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

/* ─── Main Content ──────────────────────────────────────── */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--topbar-height);
    padding: 24px;
    min-height: calc(100vh - var(--topbar-height));
    transition: var(--transition);
}

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

.page-header .breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
    font-size: 13px;
}

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

.page-header .breadcrumb-item.active {
    color: var(--primary);
    font-weight: 600;
}

/* ─── Stats Cards (Dashboard Widgets) ───────────────────── */
.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

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

.stat-card.blue::before { background: linear-gradient(90deg, var(--primary), var(--primary-light)); }
.stat-card.red::before { background: linear-gradient(90deg, var(--accent), var(--accent-light)); }
.stat-card.green::before { background: linear-gradient(90deg, #00c853, #69f0ae); }
.stat-card.orange::before { background: linear-gradient(90deg, #ff9800, #ffc947); }
.stat-card.purple::before { background: linear-gradient(90deg, #7c4dff, #b388ff); }
.stat-card.teal::before { background: linear-gradient(90deg, #009688, #4db6ac); }
.stat-card.pink::before { background: linear-gradient(90deg, #e91e63, #f48fb1); }
.stat-card.cyan::before { background: linear-gradient(90deg, #00bcd4, #80deea); }

.stat-card .stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    margin-bottom: 16px;
}

.stat-card.blue .stat-icon { background: linear-gradient(135deg, var(--primary), var(--primary-light)); }
.stat-card.red .stat-icon { background: linear-gradient(135deg, var(--accent), var(--accent-light)); }
.stat-card.green .stat-icon { background: linear-gradient(135deg, #00c853, #69f0ae); }
.stat-card.orange .stat-icon { background: linear-gradient(135deg, #ff9800, #ffc947); }
.stat-card.purple .stat-icon { background: linear-gradient(135deg, #7c4dff, #b388ff); }
.stat-card.teal .stat-icon { background: linear-gradient(135deg, #009688, #4db6ac); }
.stat-card.pink .stat-icon { background: linear-gradient(135deg, #e91e63, #f48fb1); }
.stat-card.cyan .stat-icon { background: linear-gradient(135deg, #00bcd4, #80deea); }

.stat-card .stat-value {
    font-family: 'Inter', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
}

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

.stat-card .stat-change {
    font-size: 12px;
    margin-top: 8px;
    font-weight: 600;
}

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

/* ─── Cards ─────────────────────────────────────────────── */
.card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
}

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

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

.card-header h5, .card-header h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 15px;
    color: var(--text-primary);
    margin: 0;
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
    background: #fafbfc;
}

/* ─── Tables ────────────────────────────────────────────── */
.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    margin-bottom: 0;
    font-size: 13px;
}

.table thead th {
    background: #f8f9fa;
    border-bottom: 2px solid var(--border-color);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    padding: 12px 16px;
    white-space: nowrap;
}

.table tbody td {
    padding: 12px 16px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

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

.table tbody tr:hover {
    background: rgba(15,52,96,0.03);
}

.table .actions-cell {
    white-space: nowrap;
}

.table .actions-cell .btn {
    padding: 4px 10px;
    font-size: 12px;
    margin-right: 4px;
}

/* ─── Badges ────────────────────────────────────────────── */
.badge {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 11px;
    padding: 5px 10px;
    border-radius: 20px;
    letter-spacing: 0.3px;
}

/* ─── Charts ────────────────────────────────────────────── */
.chart-container {
    position: relative;
    width: 100%;
    padding: 16px;
}

/* ─── Alerts ────────────────────────────────────────────── */
.alert {
    border-radius: var(--radius-sm);
    border: none;
    font-size: 13px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-success { background: #e8f5e9; color: #2e7d32; }
.alert-danger { background: #ffebee; color: #c62828; }
.alert-warning { background: #fff8e1; color: #f57f17; }
.alert-info { background: #e3f2fd; color: #1565c0; }

/* ─── Modal ─────────────────────────────────────────────── */
.modal-content {
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 16px 24px;
}

.modal-header .modal-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 16px;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 12px 24px;
}

/* ─── Dropdown ──────────────────────────────────────────── */
.dropdown-menu {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    min-width: 200px;
}

.dropdown-item {
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

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

.dropdown-item i {
    width: 18px;
    text-align: center;
    color: var(--text-secondary);
}

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

/* ─── Notification Dropdown ─────────────────────────────── */
.notification-dropdown {
    width: 360px;
    max-height: 420px;
    overflow-y: auto;
    padding: 0;
}

.notification-dropdown .notif-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notification-dropdown .notif-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    transition: var(--transition);
    cursor: pointer;
}

.notification-dropdown .notif-item:hover {
    background: #f8f9fa;
}

.notification-dropdown .notif-item.unread {
    background: #f0f7ff;
}

.notification-dropdown .notif-item .notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.notification-dropdown .notif-item .notif-text {
    flex: 1;
}

.notification-dropdown .notif-item .notif-text p {
    font-size: 13px;
    margin: 0;
    color: var(--text-primary);
}

.notification-dropdown .notif-item .notif-text small {
    font-size: 11px;
    color: var(--text-muted);
}

/* ─── Sidebar Collapsed ─────────────────────────────────── */
body.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed);
}

body.sidebar-collapsed .sidebar .brand-text,
body.sidebar-collapsed .sidebar .menu-header,
body.sidebar-collapsed .sidebar .menu-item a span,
body.sidebar-collapsed .sidebar .menu-item a .badge {
    display: none;
}

body.sidebar-collapsed .sidebar .menu-item a {
    justify-content: center;
    padding: 12px;
}

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

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

/* ─── Activity Feed ─────────────────────────────────────── */
.activity-feed {
    list-style: none;
    padding: 0;
    margin: 0;
}

.activity-feed .feed-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}

.activity-feed .feed-item:last-child {
    border-bottom: none;
}

.activity-feed .feed-item .feed-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.activity-feed .feed-item .feed-content p {
    font-size: 13px;
    margin: 0;
}

.activity-feed .feed-item .feed-content small {
    font-size: 11px;
    color: var(--text-muted);
}

/* ─── Quick Stats Row ───────────────────────────────────── */
.quick-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.quick-stat:last-child {
    border-bottom: none;
}

.quick-stat .qs-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.quick-stat .qs-info {
    flex: 1;
}

.quick-stat .qs-info .qs-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.quick-stat .qs-info .qs-value {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

/* ─── Empty State ───────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state h5 {
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    max-width: 400px;
    margin: 0 auto 20px;
    font-size: 13px;
}

/* ─── Search Box ────────────────────────────────────────── */
.search-box {
    position: relative;
    max-width: 300px;
}

.search-box input {
    padding-left: 38px;
    background: var(--body-bg);
    border: 2px solid transparent;
}

.search-box input:focus {
    background: #fff;
    border-color: var(--primary);
}

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

/* ─── Animations ────────────────────────────────────────── */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

.fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }
.stagger-5 { animation-delay: 0.25s; }
.stagger-6 { animation-delay: 0.3s; }
.stagger-7 { animation-delay: 0.35s; }
.stagger-8 { animation-delay: 0.4s; }

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

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

    body.sidebar-open::before {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1035;
    }

    .topbar {
        left: 0;
    }

    .main-content {
        margin-left: 0;
    }

    body.sidebar-collapsed .topbar {
        left: 0;
    }

    body.sidebar-collapsed .main-content {
        margin-left: 0;
    }
}

@media (max-width: 767.98px) {
    .main-content {
        padding: 16px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-card .stat-value {
        font-size: 22px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .topbar-left .page-title {
        font-size: 15px;
    }

    .user-dropdown .user-info {
        display: none;
    }
}

/* ─── DataTables Override ───────────────────────────────── */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 13px;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(15,52,96,0.1);
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 6px !important;
    margin: 0 2px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary) !important;
    color: #fff !important;
    border-color: var(--primary) !important;
}

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

/* ─── Print ─────────────────────────────────────────────── */
@media print {
    .sidebar, .topbar, .btn, .page-header .btn {
        display: none !important;
    }
    .main-content {
        margin: 0 !important;
        padding: 0 !important;
    }
}
