:root {
    --primary-color: #1e293b;
    --primary-hover: #0f172a;
    --accent-color: #3b82f6;
    --text-color: #334155;
    --sidebar-width: 260px;
    --header-height: 70px;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f1f5f9;
    color: var(--text-color);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--primary-color);
    color: #fff;
    transition: all 0.3s;
    z-index: 1000;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.sidebar .sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0,0,0,0.15);
    font-weight: 800;
    font-size: 1.2rem;
    padding: 0 15px;
    text-align: center;
    letter-spacing: 0.5px;
}

.sidebar ul.components {
    padding: 20px 0;
}

.sidebar ul p {
    color: #fff;
    padding: 10px;
}

.sidebar ul li a {
    padding: 15px 25px;
    font-size: 1.05em;
    display: block;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 0px solid transparent;
}

.sidebar ul li a:hover,
.sidebar ul li.active > a {
    color: #fff;
    background: rgba(255,255,255,0.05);
    border-left: 6px solid var(--accent-color);
    padding-left: 25px;
}

.sidebar ul li a i {
    margin-right: 15px;
    width: 20px;
    text-align: center;
    transition: transform 0.3s ease;
}

.sidebar ul li a:hover i {
    transform: scale(1.2);
    color: var(--accent-color);
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    width: calc(100vw - var(--sidebar-width));
    max-width: calc(100vw - var(--sidebar-width));
    min-height: 100vh;
    min-width: 0;
    transition: all 0.3s;
}

/* Top Navbar */
.top-navbar {
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 900;
}

.top-navbar .navbar-brand {
    font-weight: 800;
    color: var(--primary-color);
    margin: 0;
    font-size: 1.4rem;
    letter-spacing: -0.5px;
}

/* Cards */
.card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    margin-bottom: 24px;
    background: #ffffff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.05);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(0,0,0,0.03);
    font-weight: 700;
    color: var(--primary-color);
    border-top-left-radius: 16px !important;
    border-top-right-radius: 16px !important;
    padding: 20px 25px;
    font-size: 1.1rem;
}

.card-body {
    padding: 25px;
}

/* Summary Cards */
.summary-card {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    display: flex;
    align-items: center;
    border-left: 5px solid var(--primary-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.summary-card::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 100%);
    pointer-events: none;
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(58, 123, 213, 0.1);
    border-left-width: 8px;
}

.summary-card .icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-right: 25px;
    background: rgba(58, 123, 213, 0.1);
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.summary-card:hover .icon {
    transform: scale(1.1) rotate(5deg);
    background: var(--primary-color);
    color: white;
}

.summary-card .details h3 {
    margin: 0;
    font-size: 2.2rem;
    font-weight: 800;
    color: #1e293b;
}

.summary-card .details p {
    margin: 0;
    color: #6c757d;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #3a7bd5 100%);
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(58, 123, 213, 0.2);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, #2a5298 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(58, 123, 213, 0.3);
}

.btn-warning, .btn-danger, .btn-success, .btn-info {
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
}

.btn-warning:hover, .btn-danger:hover, .btn-success:hover, .btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* DataTables customization */
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, #3a7bd5 100%) !important;
    color: white !important;
    border-color: transparent !important;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(58, 123, 213, 0.2);
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 8px;
    transition: all 0.2s ease;
}

table.dataTable tbody tr {
    transition: background-color 0.2s ease;
}
table.dataTable tbody tr:hover {
    background-color: #f8fafc !important;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        margin-left: calc(var(--sidebar-width) * -1);
    }
    .sidebar.active {
        margin-left: 0;
    }
    .main-content {
        margin-left: 0;
    }
    .main-content.active {
        margin-left: var(--sidebar-width);
    }
}

/* Login Page */
.login-page {
    background: url('https://images.unsplash.com/photo-1436491865332-7a61a109cc05?q=80&w=2074&auto=format&fit=crop') no-repeat center center fixed;
    background-size: cover;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(26, 60, 110, 0.85) 0%, rgba(42, 82, 152, 0.75) 100%);
    backdrop-filter: blur(5px);
    z-index: 1;
}

.login-card {
    max-width: 420px;
    width: 100%;
    padding: 45px 35px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 20px 40px rgba(0,0,0,0.25), 0 0 100px rgba(255,255,255,0.1) inset;
    z-index: 2;
    position: relative;
    transition: transform 0.3s ease;
}

.login-card:hover {
    transform: translateY(-5px);
}

.login-logo {
    text-align: center;
    margin-bottom: 35px;
}

.login-logo h4 {
    color: var(--primary-color);
    font-weight: 800;
    font-size: 1.6rem;
    letter-spacing: 0.5px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-logo h4 i {
    color: #3a7bd5;
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.login-logo p {
    color: #6c757d;
    font-size: 0.95rem;
    margin-top: 5px;
}

.login-card .form-control {
    border-radius: 10px;
    padding: 12px 15px;
    border: 1px solid #e1e5eb;
    background-color: #f8fafc;
    transition: all 0.3s ease;
}

.login-card .form-control:focus {
    box-shadow: 0 0 0 4px rgba(58, 123, 213, 0.15);
    border-color: #3a7bd5;
    background-color: #fff;
}

.login-card .form-label {
    font-weight: 600;
    color: #4a5568;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.login-card .btn-primary {
    border-radius: 10px;
    padding: 12px;
    font-weight: 600;
    font-size: 1.05rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #3a7bd5 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(58, 123, 213, 0.3);
    transition: all 0.3s ease;
}

.login-card .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(58, 123, 213, 0.4);
    background: linear-gradient(135deg, var(--primary-hover) 0%, #2a5298 100%);
}

/* Utilities */
.text-primary-custom {
    color: var(--primary-color) !important;
}
