/* Global Variables */
:root {
    --primary-color: #3b82f6;
    /* Modern Royal Blue */
    --primary-hover: #2563eb;
    --secondary-color: #10B981;
    /* Fresh Green */
    --bg-color: #f8fafc;
    /* Soft Blue-Gray background */
    --sidebar-bg: #e2e8f0;
    /* Dimmed Slate Gray for Sidebar */
    --sidebar-accent: #cbd5e1;
    /* Muted Slate Accent */
    --sidebar-width: 270px;
    --text-color: #1F2937;
    --text-muted: #6B7280;
    --card-bg: #FFFFFF;
    --border-radius: 16px;
    --shadow-sm: 0 2px 4px 0 rgba(0, 0, 0, 0.02);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 15px rgba(255, 107, 0, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.5px;
}

/* Sidebar Styles */
.sidebar {
    background: var(--sidebar-bg);
    width: var(--sidebar-width) !important;
    min-height: 100vh;
    color: #334155;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    border-right: 1px solid #94a3b8;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    overflow-y: auto;
    transition: var(--transition);
}

.sidebar-brand {
    padding: 35px 25px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 15px;
}

.sidebar .nav-link {
    color: #475569;
    padding: 14px 25px;
    margin: 4px 15px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
}

.sidebar .nav-link i {
    width: 24px;
    text-align: center;
    transition: var(--transition);
    font-size: 1.1rem;
}

.sidebar .nav-link:hover {
    color: var(--primary-color);
    background: var(--sidebar-accent);
}

.sidebar .nav-link:hover i {
    color: var(--primary-color);
}

.sidebar .nav-link.active {
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    color: #fff;
    box-shadow: 0 10px 20px -3px rgba(59, 130, 246, 0.4);
}

.sidebar .nav-link.active i {
    color: #fff;
}

.sidebar .menu-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 24px 25px 10px;
    color: #64748b;
    font-weight: 700;
}

/* Main Content Wrapper (Fixed Sidebar Compensation) */
body>.d-flex>div:last-child {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width)) !important;
}

/* Card Styles - Premium "Wow" Effect */
.card-box {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.02);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    height: 100%;
}

.card-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: var(--transition);
}

.card-box:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-glm);
    /* Typo fix: shadow-lg */
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.card-box:hover::before {
    opacity: 1;
}

.card-icon-bg {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
    transition: var(--transition);
}

.bg-soft-primary {
    background: rgba(255, 107, 0, 0.1);
    color: var(--primary-color);
}

.bg-soft-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--secondary-color);
}

.bg-soft-info {
    background: rgba(59, 130, 246, 0.1);
    color: #3B82F6;
}

.bg-soft-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #F59E0B;
}

.card-box:hover .bg-soft-primary {
    background: var(--primary-color);
    color: #fff;
}

.card-box:hover .bg-soft-success {
    background: var(--secondary-color);
    color: #fff;
}

.card-box h3 {
    font-size: 2.2rem;
    margin-bottom: 5px;
    font-weight: 700;
}

.card-box p {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
}

/* Premium Tables */
.table-container {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow-md);
    /* Soft shadow */
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.table {
    border-collapse: separate;
    border-spacing: 0 10px;
    margin-top: -10px;
}

.table thead th {
    border: none;
    color: #6B7280;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    padding: 15px 25px;
    background: transparent;
}

.table tbody tr {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.table tbody tr td {
    padding: 20px 25px;
    vertical-align: middle;
    border: none;
    color: #374151;
    font-size: 0.95rem;
}

.table tbody tr td:first-child {
    border-radius: 12px 0 0 12px;
}

.table tbody tr td:last-child {
    border-radius: 0 12px 12px 0;
}

.table tbody tr:hover {
    transform: scale(1.01);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
    background: #fff;
    z-index: 10;
    position: relative;
    border-left: 4px solid var(--primary-color);
}

/* Buttons & Inputs */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    padding: 12px 28px;
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.25);
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(255, 107, 0, 0.35);
    background: linear-gradient(135deg, #E65100 0%, #FF6B00 100%);
}

.form-control,
.form-select {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 12px 18px;
    font-size: 0.95rem;
}

.form-control:focus,
.form-select:focus {
    background: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(255, 107, 0, 0.1);
}

/* Modals */
.modal-content {
    border: none;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-header {
    border-bottom: 1px solid #F3F4F6;
    padding: 30px 30px 20px;
}

.modal-body,
.modal-footer {
    padding: 30px;
}

/* DataTables Overrides */
.dataTables_wrapper .dataTables_filter input {
    border: 2px solid #E5E7EB;
    border-radius: 10px;
    padding: 8px 15px;
    margin-left: 10px;
    outline: none;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--primary-color);
}

.page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 8px;
}

.page-link {
    color: var(--primary-color);
    border: none;
    margin: 0 3px;
    border-radius: 8px;
    font-weight: 600;
}

/* Login Page Specific (Split Layout) */
.login-page-body {
    background: #fff;
    overflow: hidden;
    /* Prevent scroll on full screen */
}

.login-visual {
    background: url('../image/login-bg.jpg') no-repeat center center;
    background-size: cover;
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
    padding: 20px;
}

.login-visual::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 107, 0, 0.85), rgba(0, 0, 0, 0.6));
    z-index: 1;
}

.login-content {
    position: relative;
    z-index: 2;
}

.login-section {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
    padding: 40px;
}

.login-form-box {
    width: 100%;
    max-width: 420px;
}

/* Utilities */
.text-primary-theme {
    color: var(--primary-color) !important;
}

.bg-primary-theme {
    background-color: var(--primary-color) !important;
}

.text-orange {
    color: var(--primary-color) !important;
}

.bg-orange {
    background-color: var(--primary-color) !important;
}