/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Color Palette */
    --primary-color: #0f766e;
    /* Deep Teal */
    --primary-dark: #0d6e66;
    --primary-light: #14b8a6;
    --secondary-color: #64748b;
    /* Slate Gray */
    --bg-color: #f3f4f6;
    /* Light Gray Background */
    --surface-color: #ffffff;
    /* Pure White Surface */
    --text-main: #1e293b;
    /* Dark Slate */
    --text-secondary: #64748b;
    --accent-color: #f97316;
    /* Coral Accent */
    --success-color: #10b981;
    --danger-color: #ef4444;

    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-md: 0.5rem;
    /* 8px */
    --radius-lg: 0.75rem;
    /* 12px */
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Typography Overrides */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    color: var(--text-main);
}

/* Card Component */
.card {
    background-color: var(--surface-color);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Buttons */
/* Buttons */
.btn {
    border-radius: var(--radius-md) !important;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    transition: all 0.2s;
}

/* Forms */
.form-control,
.form-select {
    border-radius: var(--radius-md) !important;
    padding: 0.6rem 1rem;
    border: 1px solid #cbd5e1;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(15, 118, 110, 0.25);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Navbar/Sidebar */
.bg-primary {
    background-color: var(--primary-color) !important;
}

/* Login Page Specifics */
.login-split-bg {
    background: linear-gradient(135deg, var(--primary-color) 0%, #064e3b 100%);
}

.login-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

/* Dashboard Cards */
.summary-card {
    border-left: 5px solid var(--primary-color);
}

/* Sidebar */
#sidebar-wrapper {
    background: linear-gradient(180deg, var(--primary-color) 0%, #064e3b 100%);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    margin-left: 0;
    z-index: 1000;
}

#wrapper.toggled #sidebar-wrapper {
    margin-left: -250px;
}

@media (max-width: 768px) {
    #sidebar-wrapper {
        margin-left: -250px;
        position: fixed;
    }

    #wrapper.toggled #sidebar-wrapper {
        margin-left: 0;
    }

    #page-content-wrapper {
        min-width: 100vw;
    }
}

#sidebar-wrapper .list-group-item {
    border: none;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    transition: all 0.2s;
    border-radius: 0.25rem;
    margin: 0 0.5rem 0.2rem 0.5rem;
}

#sidebar-wrapper .list-group-item:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

#sidebar-wrapper .list-group-item.active {
    background-color: var(--surface-color) !important;
    color: var(--primary-color) !important;
    font-weight: 600;
}

/* Navbar */
.navbar {
    box-shadow: var(--shadow-sm);
}

/* Modals */
.modal-content {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Modern Tables */
.table-container {
    background: var(--surface-color);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

/* Fix dropdown overflow in tables */
.overflow-x-auto,
.table-responsive,
.card-body {
    overflow: visible !important;
}

.table .dropdown-menu {
    position: absolute;
    z-index: 1050;
}

.table .btn-group {
    position: static;
}

.table td {
    position: relative;
}

table.dataTable {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    width: 100% !important;
}

table.dataTable thead th {
    border-bottom: 2px solid #f1f5f9 !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    padding: 0.75rem 1rem !important;
    /* Reduced padding */
}

table.dataTable tbody tr {
    background-color: var(--surface-color);
    border-bottom: 1px solid #f1f5f9;
}

table.dataTable tbody tr:hover {
    background-color: #fafafa !important;
}

table.dataTable tbody td {
    padding: 0.75rem 1rem !important;
    /* Reduced padding for better fit */
    border: none !important;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9 !important;
}

table.dataTable tbody td:first-child {
    border-top-left-radius: var(--radius-md);
    border-bottom-left-radius: var(--radius-md);
}

table.dataTable tbody td:last-child {
    border-top-right-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
}

/* Status Badges */
.badge {
    padding: 0.5em 0.8em;
    font-weight: 500;
    border-radius: 20px;
    font-size: 0.75rem;
}

.badge-success {
    background-color: #dcfce7;
    color: #166534;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-primary {
    background-color: #e0f2fe;
    color: #075985;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Sidebar chevron rotation */
.transition-transform {
    transition: transform 0.3s ease;
}

a[aria-expanded="true"] .transition-transform {
    transform: rotate(180deg);
}

/* Print Styles */
@media print {

    #sidebar-wrapper,
    .navbar,
    .card-header button {
        display: none !important;
    }

    #page-content-wrapper {
        padding: 0 !important;
    }

    .card {
        box-shadow: none !important;
        border: none !important;
    }
}