/* ============================================================
   Advanced Chama Management System - Main Stylesheet
   Theme: Professional Navy (#161950) + Blue Accent (#465fff)
   ============================================================ */

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

/* ===== CSS Variables ===== */
:root {
    --primary: #161950;
    --primary-dark: #0e1140;
    --primary-light: #1e2260;
    --secondary: #465fff;
    --secondary-dark: #3641f5;
    --secondary-light: #7592ff;
    --success: #12b76a;
    --warning: #f79009;
    --danger: #f04438;
    --info: #0ba5ec;

    --gray-50: #f9fafb;
    --gray-100: #f2f4f7;
    --gray-200: #e4e7ec;
    --gray-300: #d0d5dd;
    --gray-400: #98a2b3;
    --gray-500: #667085;
    --gray-600: #475467;
    --gray-700: #344054;
    --gray-800: #1d2939;
    --gray-900: #101828;

    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
    --topbar-height: 64px;
    --font-family: 'Outfit', sans-serif;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
    --shadow-md: 0 4px 6px rgba(16, 24, 40, 0.1);
    --shadow-lg: 0 8px 25px rgba(16, 24, 40, 0.1);
    --shadow-xl: 0 20px 40px rgba(16, 24, 40, 0.12);
    --transition: all 0.3s ease;
}

/* Dark mode variables */
[data-theme="dark"] {
    --primary: #1e2260;
    --primary-dark: #0e1140;
    --bg-primary: #0f1117;
    --bg-secondary: #1a1d29;
    --bg-card: #222635;
    --text-primary: #f2f4f7;
    --text-secondary: #98a2b3;
    --border-color: #333849;
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    font-size: 14px;
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--gray-50);
    overflow-x: hidden;
}

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

a:hover {
    color: var(--secondary-dark);
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
}

.text-title-sm { font-size: 1.5rem; font-weight: 600; }
.text-title-md { font-size: 2rem; font-weight: 600; }
.text-title-lg { font-size: 2.5rem; font-weight: 700; }
.text-title-xl { font-size: 3rem; font-weight: 700; }

/* ===== Buttons ===== */
.btn {
    font-weight: 500;
    border-radius: var(--border-radius-sm);
    padding: 0.5rem 1.25rem;
    transition: var(--transition);
    font-size: 0.875rem;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22, 25, 80, 0.3);
}

.btn-secondary {
    background: var(--secondary);
    border-color: var(--secondary);
    color: #fff;
}

.btn-secondary:hover {
    background: var(--secondary-dark);
    border-color: var(--secondary-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(70, 95, 255, 0.3);
}

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

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

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

.btn-warning {
    background: var(--warning);
    border-color: var(--warning);
    color: #fff;
}

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

.btn-info {
    background: var(--info);
    border-color: var(--info);
    color: #fff;
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1rem;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--border-radius-sm);
}

/* ===== Cards ===== */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    background: #fff;
}

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

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    background: transparent;
    border-top: 1px solid var(--gray-200);
    padding: 1rem 1.25rem;
}

.card-stat {
    border-radius: var(--border-radius);
    padding: 1.25rem;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.card-stat .icon {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2.5rem;
    opacity: 0.2;
}

.card-stat .number {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.card-stat .label {
    font-size: 0.875rem;
    opacity: 0.9;
}

.card-stat.bg-primary { background: linear-gradient(135deg, var(--primary), var(--primary-light)); }
.card-stat.bg-success { background: linear-gradient(135deg, #039855, #12b76a); }
.card-stat.bg-warning { background: linear-gradient(135deg, #dc6803, #f79009); }
.card-stat.bg-info { background: linear-gradient(135deg, #0086c9, #0ba5ec); }
.card-stat.bg-danger { background: linear-gradient(135deg, #d92d20, #f04438); }
.card-stat.bg-purple { background: linear-gradient(135deg, #6938ef, #7a5af8); }
.card-stat.bg-pink { background: linear-gradient(135deg, #dd2590, #ee46bc); }

/* ===== Forms ===== */
.form-control, .form-select {
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(70, 95, 255, 0.1);
}

.form-label {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--gray-700);
    margin-bottom: 0.375rem;
}

.form-text {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

/* ===== Tables ===== */
.table {
    margin-bottom: 0;
}

.table thead th {
    background: var(--gray-50);
    border-bottom: 2px solid var(--gray-200);
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-600);
    padding: 0.75rem 1rem;
}

.table tbody td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.875rem;
}

.table-hover tbody tr:hover {
    background: var(--gray-50);
}

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

.table-actions .btn {
    margin: 0 0.125rem;
}

/* ===== Badges ===== */
.badge {
    font-weight: 500;
    padding: 0.25em 0.625em;
    font-size: 0.75rem;
    border-radius: 100px;
}

.badge.bg-primary { background: var(--primary) !important; }
.badge.bg-secondary { background: var(--secondary) !important; }
.badge.bg-success { background: var(--success) !important; }
.badge.bg-warning { background: var(--warning) !important; }
.badge.bg-danger { background: var(--danger) !important; }
.badge.bg-info { background: var(--info) !important; }

/* ===== Alerts ===== */
.alert {
    border: none;
    border-radius: var(--border-radius-sm);
    padding: 0.875rem 1.25rem;
    font-size: 0.875rem;
}

.alert-success { background: #ecfdf3; color: #027a48; }
.alert-danger { background: #fef3f2; color: #b42318; }
.alert-warning { background: #fffaeb; color: #b54708; }
.alert-info { background: #f0f9ff; color: #026aa2; }

/* ===== Breadcrumbs ===== */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 0;
}

.breadcrumb-item {
    font-size: 0.8125rem;
}

.breadcrumb-item a {
    color: var(--gray-500);
}

.breadcrumb-item.active {
    color: var(--gray-800);
}

/* ===== Progress ===== */
.progress {
    height: 8px;
    border-radius: 100px;
    background: var(--gray-200);
}

.progress-bar {
    border-radius: 100px;
}

/* ===== Pagination ===== */
.pagination .page-link {
    border: none;
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
    color: var(--gray-700);
    border-radius: var(--border-radius-sm);
    margin: 0 0.125rem;
}

.pagination .page-item.active .page-link {
    background: var(--primary);
    color: #fff;
}

.pagination .page-item.disabled .page-link {
    color: var(--gray-400);
}

/* ===== Sidebar ===== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: var(--primary);
    color: #fff;
    z-index: 1000;
    transition: var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
}

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

.sidebar-brand {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    height: var(--topbar-height);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-brand img {
    height: 32px;
    width: auto;
    margin-right: 0.75rem;
}

.sidebar-brand span {
    font-size: 1.125rem;
    font-weight: 700;
    white-space: nowrap;
}

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

.sidebar-menu .menu-label {
    padding: 0.5rem 1.25rem;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.4);
    font-weight: 600;
}

.sidebar-menu .menu-item {
    display: flex;
    align-items: center;
    padding: 0.625rem 1.25rem;
    color: rgba(255,255,255,0.7);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    font-size: 0.875rem;
}

.sidebar-menu .menu-item:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.sidebar-menu .menu-item.active {
    background: rgba(255,255,255,0.12);
    color: #fff;
}

.sidebar-menu .menu-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--secondary);
    border-radius: 0 3px 3px 0;
}

.sidebar-menu .menu-item i {
    width: 20px;
    margin-right: 0.75rem;
    font-size: 1rem;
    text-align: center;
}

.sidebar-menu .menu-item .menu-text {
    white-space: nowrap;
    flex: 1;
}

.sidebar-menu .menu-item .menu-badge {
    background: var(--secondary);
    color: #fff;
    padding: 0.125rem 0.5rem;
    border-radius: 100px;
    font-size: 0.6875rem;
    font-weight: 600;
}

.sidebar-menu .menu-item .menu-arrow {
    transition: transform 0.3s;
    font-size: 0.75rem;
}

.sidebar-menu .menu-item .menu-arrow.open {
    transform: rotate(90deg);
}

.sidebar-menu .submenu {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
    background: rgba(0,0,0,0.15);
}

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

.sidebar-menu .submenu .menu-item {
    padding-left: 3.5rem;
    font-size: 0.8125rem;
}

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

.sidebar.collapsed .sidebar-brand span,
.sidebar.collapsed .menu-label,
.sidebar.collapsed .menu-text,
.sidebar.collapsed .menu-badge,
.sidebar.collapsed .menu-arrow {
    display: none;
}

.sidebar.collapsed .menu-item {
    justify-content: center;
    padding: 0.75rem;
}

.sidebar.collapsed .menu-item i {
    margin-right: 0;
    font-size: 1.25rem;
}

/* ===== Sidebar Overlay (mobile) ===== */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* ===== Top Navbar ===== */
.topbar {
    position: fixed;
    left: var(--sidebar-width);
    right: 0;
    top: 0;
    height: var(--topbar-height);
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    z-index: 999;
    transition: var(--transition);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
}

.sidebar.collapsed ~ .topbar,
.sidebar.collapsed + * .topbar {
    left: var(--sidebar-collapsed);
}

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

.topbar-left .sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--gray-600);
    cursor: pointer;
    padding: 0.25rem;
    margin-right: 1rem;
}

.topbar-left .sidebar-toggle:hover {
    color: var(--primary);
}

.topbar-search {
    position: relative;
    width: 300px;
}

.topbar-search input {
    border: 1px solid var(--gray-200);
    border-radius: 100px;
    padding: 0.375rem 1rem 0.375rem 2.5rem;
    font-size: 0.8125rem;
    background: var(--gray-50);
    transition: var(--transition);
    width: 100%;
}

.topbar-search input:focus {
    background: #fff;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(70, 95, 255, 0.1);
}

.topbar-search i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}

.topbar-right {
    display: flex;
    align-items: center;
    margin-left: auto;
    gap: 0.5rem;
}

.topbar-right .nav-item {
    position: relative;
}

.topbar-right .nav-link {
    color: var(--gray-600);
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    position: relative;
}

.topbar-right .nav-link:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.topbar-right .nav-link .badge-dot {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid #fff;
}

.topbar-right .dropdown-menu {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    min-width: 280px;
}

.topbar-right .dropdown-menu .dropdown-header {
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.875rem;
}

.topbar-right .dropdown-menu .dropdown-item {
    padding: 0.625rem 1rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.8125rem;
}

.topbar-right .dropdown-menu .dropdown-item:hover {
    background: var(--gray-50);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.user-avatar-sm {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
}

.user-avatar-lg {
    width: 64px;
    height: 64px;
    font-size: 1.5rem;
}

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

.sidebar.collapsed ~ .main-content,
.sidebar.collapsed + * .main-content {
    margin-left: var(--sidebar-collapsed);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h4 {
    margin-bottom: 0.25rem;
}

.page-header p {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-bottom: 0;
}

/* ===== Login Page ===== */
.login-page {
    min-height: 100vh;
    display: flex;
}

.login-form-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: #fff;
}

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

.login-brand-section {
    flex: 1;
    background: var(--primary);
    display: none;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-brand-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(70, 95, 255, 0.15) 0%, transparent 70%);
}

.login-brand-section::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(70, 95, 255, 0.1) 0%, transparent 70%);
}

.login-brand-content {
    text-align: center;
    position: relative;
    z-index: 1;
    padding: 2rem;
}

.login-brand-content h1 {
    color: #fff;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.login-brand-content p {
    color: rgba(255,255,255,0.7);
    font-size: 1rem;
}

/* ===== Landing Page ===== */
.landing-page {
    overflow-x: hidden;
}

/* Navbar */
.landing-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
    background: transparent;
}

.landing-navbar.scrolled {
    background: #fff;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    padding: 0.5rem 0;
}

.landing-navbar .navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: #fff;
}

.landing-navbar.scrolled .navbar-brand {
    color: var(--primary);
}

.landing-navbar .nav-link {
    color: rgba(255,255,255,0.8);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: var(--transition);
}

.landing-navbar.scrolled .nav-link {
    color: var(--gray-700);
}

.landing-navbar .nav-link:hover {
    color: #fff;
}

.landing-navbar.scrolled .nav-link:hover {
    color: var(--primary);
}

/* Hero */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--secondary) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
    position: relative;
    z-index: 1;
    color: #fff;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 540px;
}

.hero-image {
    position: relative;
    z-index: 1;
}

.hero-image img {
    width: 100%;
    max-width: 500px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
}

/* Floating shapes */
.hero-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
}

.hero-shape-1 {
    width: 400px;
    height: 400px;
    background: var(--secondary);
    top: -100px;
    right: -100px;
    animation: float 6s ease-in-out infinite;
}

.hero-shape-2 {
    width: 200px;
    height: 200px;
    background: #fff;
    bottom: 50px;
    left: -50px;
    animation: float 8s ease-in-out infinite;
}

.hero-shape-3 {
    width: 150px;
    height: 150px;
    background: var(--secondary);
    bottom: 200px;
    right: 200px;
    animation: float 10s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* Section common */
.section-padding {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.section-title p {
    color: var(--gray-500);
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Services */
.service-card {
    background: #fff;
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--gray-100);
    height: 100%;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.service-card .icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

.service-card h5 {
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.service-card p {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-bottom: 0;
}

/* Stats counter */
.stats-section {
    background: var(--primary);
    padding: 4rem 0;
}

.stat-item {
    text-align: center;
    color: #fff;
}

.stat-item .number {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.stat-item .label {
    opacity: 0.8;
    font-size: 0.875rem;
}

/* Testimonials */
.testimonial-card {
    background: #fff;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
}

.testimonial-card .stars {
    color: var(--warning);
    margin-bottom: 1rem;
}

.testimonial-card p {
    color: var(--gray-600);
    font-size: 0.9375rem;
    font-style: italic;
    margin-bottom: 1.25rem;
}

.testimonial-card .author {
    display: flex;
    align-items: center;
}

.testimonial-card .author img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: 1rem;
    object-fit: cover;
}

.testimonial-card .author h6 {
    margin-bottom: 0;
    font-size: 0.9375rem;
}

.testimonial-card .author span {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

/* FAQ */
.accordion-item {
    border: 1px solid var(--gray-200);
    margin-bottom: 0.5rem;
    border-radius: var(--border-radius-sm);
}

.accordion-button {
    font-weight: 500;
    color: var(--gray-800);
    padding: 1rem 1.25rem;
}

.accordion-button:not(.collapsed) {
    background: var(--gray-50);
    color: var(--primary);
    box-shadow: none;
}

.accordion-body {
    padding: 1rem 1.25rem;
    color: var(--gray-600);
}

/* Contact form */
.contact-section {
    background: var(--gray-50);
}

/* Footer */
.footer {
    background: var(--primary);
    color: rgba(255,255,255,0.7);
    padding: 3rem 0 1.5rem;
}

.footer h5 {
    color: #fff;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.footer a {
    color: rgba(255,255,255,0.7);
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.footer a:hover {
    color: #fff;
}

.footer .social-links a {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    margin-right: 0.5rem;
    margin-bottom: 0;
}

.footer .social-links a:hover {
    background: var(--secondary);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
    margin-top: 2rem;
    text-align: center;
    font-size: 0.875rem;
}

/* ===== Preloader ===== */
.preloader {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preloader .spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--secondary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== Dark Mode Toggle ===== */
.dark-mode-toggle {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--secondary);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.dark-mode-toggle:hover {
    transform: scale(1.1);
    background: var(--secondary-dark);
}

/* ===== Scroll to Top ===== */
.scroll-top {
    position: fixed;
    bottom: 5rem;
    right: 1.5rem;
    z-index: 9999;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.scroll-top.show {
    display: flex;
}

.scroll-top:hover {
    transform: translateY(-3px);
}

/* ===== Responsive ===== */
@media (min-width: 992px) {
    .login-brand-section {
        display: flex;
    }

    .login-form-section {
        padding: 3rem;
    }
}

@media (max-width: 991px) {
    .sidebar {
        left: calc(-1 * var(--sidebar-width));
    }

    .sidebar.show {
        left: 0;
    }

    .sidebar.collapsed {
        width: var(--sidebar-width);
    }

    .topbar {
        left: 0 !important;
    }

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

    .hero-content h1 {
        font-size: 2rem;
    }

    .section-padding {
        padding: 3rem 0;
    }

    .section-title h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .topbar-search {
        width: 180px;
    }

    .main-content {
        padding: 1rem;
    }

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

    .hero-content h1 {
        font-size: 1.75rem;
    }

    .stat-item .number {
        font-size: 1.75rem;
    }

    .login-form-section {
        padding: 1rem;
    }
}

/* ===== Transitions ===== */
.fade-in {
    animation: fadeIn 0.5s ease;
}

.slide-up {
    animation: slideUp 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* ===== DataTables overrides ===== */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 1rem;
}

.dataTables_wrapper .dataTables_length select {
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    padding: 0.25rem 0.5rem;
}

.dataTables_wrapper .dataTables_filter input {
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    padding: 0.375rem 0.75rem;
}

.dataTables_wrapper .dataTables_info {
    color: var(--gray-500);
    font-size: 0.8125rem;
    padding-top: 1rem;
}

.dataTables_wrapper .dataTables_paginate {
    padding-top: 1rem;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* ===== Utilities ===== */
.avatar-group {
    display: flex;
    align-items: center;
}

.avatar-group .user-avatar {
    border: 2px solid #fff;
    margin-left: -8px;
}

.avatar-group .user-avatar:first-child {
    margin-left: 0;
}

.text-muted {
    color: var(--gray-500) !important;
}

.bg-soft-primary { background: #ecf3ff; color: var(--secondary); }
.bg-soft-success { background: #ecfdf3; color: var(--success); }
.bg-soft-warning { background: #fffaeb; color: var(--warning); }
.bg-soft-danger { background: #fef3f2; color: var(--danger); }
.bg-soft-info { background: #f0f9ff; color: var(--info); }

/* Gallery */
.gallery-item {
    position: relative;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    margin-bottom: 1.5rem;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(22, 25, 80, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .overlay {
    opacity: 1;
}

.gallery-item .overlay i {
    color: #fff;
    font-size: 2rem;
}

/* Partners slider */
.partner-logo {
    padding: 1.5rem;
    text-align: center;
    opacity: 0.5;
    transition: var(--transition);
    filter: grayscale(100%);
}

.partner-logo:hover {
    opacity: 1;
    filter: grayscale(0);
}

.partner-logo img {
    max-height: 60px;
    width: auto;
}

/* News/Blog card */
.news-card {
    border-radius: var(--border-radius);
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
}

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

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-card .card-body {
    padding: 1.25rem;
}

.news-card .date {
    color: var(--gray-500);
    font-size: 0.8125rem;
    margin-bottom: 0.5rem;
}

.news-card h5 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.news-card p {
    color: var(--gray-600);
    font-size: 0.8125rem;
    margin-bottom: 0;
}
