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

/* ===== Global ===== */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #f4f6f9;
    color: #1e293b;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* ===== Main Content — Responsive ===== */
.main-content {
    margin-left: 16rem;
    padding: 2rem 1.5rem;
}

@media (max-width: 767.98px) {
    .main-content {
        margin-left: 0;
        padding: 1rem 0.75rem;
        padding-top: 72px;
    }
}

/* ===== Sidebar ===== */
.sidebar {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
}

.sidebar-logo {
    filter: brightness(0) invert(1);
}

.sidebar .nav-pills .nav-link {
    color: #94a3b8;
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 4px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.sidebar .nav-pills .nav-link:hover {
    color: #e2e8f0;
    background-color: rgba(255, 255, 255, 0.08);
}

.sidebar .nav-pills .nav-link.active {
    color: #ffffff;
    background-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.sidebar .btn-secondary {
    background-color: transparent;
    border: 1px solid #475569;
    color: #94a3b8;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sidebar .btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: #64748b;
    color: #e2e8f0;
}

/* ===== Mobile Header ===== */
.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 16px;
    z-index: 1040;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

/* ===== Offcanvas Sidebar (Mobile) ===== */
.offcanvas-sidebar {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%) !important;
    color: white !important;
}

.offcanvas-sidebar .btn-close {
    filter: invert(1);
}

.offcanvas-sidebar .sidebar-logo {
    filter: brightness(0) invert(1);
}

.offcanvas-sidebar .nav-pills .nav-link {
    color: #94a3b8;
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 4px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.offcanvas-sidebar .nav-pills .nav-link:hover {
    color: #e2e8f0;
    background-color: rgba(255, 255, 255, 0.08);
}

.offcanvas-sidebar .nav-pills .nav-link.active {
    color: #ffffff;
    background-color: #3b82f6;
}

.offcanvas-sidebar hr {
    border-color: #334155;
    opacity: 0.5;
}

.offcanvas-sidebar .btn-secondary {
    background-color: transparent;
    border: 1px solid #475569;
    color: #94a3b8;
    border-radius: 8px;
}

/* ===== Cards ===== */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
}

/* ===== Buttons ===== */
.btn {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    border-radius: 8px;
    padding: 8px 20px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
}

.btn-info {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

.btn-info:hover {
    background-color: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.btn-success {
    background-color: #10b981;
    border-color: #10b981;
}

.btn-success:hover {
    background-color: #059669;
    border-color: #059669;
}

/* ===== DataTable — Text Selection Fix ===== */
.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner td,
.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner td div,
.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner td span,
.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner td input {
    user-select: text !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
}

/* ===== DataTable — Styling ===== */
.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner table {
    border-collapse: separate;
    border-spacing: 0;
}

.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner th {
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    font-size: 0.8rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: #475569 !important;
    background-color: #f8fafc !important;
    border-bottom: 2px solid #e2e8f0 !important;
    padding: 12px 16px !important;
}

.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner td {
    font-family: 'Inter', sans-serif !important;
    font-size: 0.875rem !important;
    color: #334155 !important;
    padding: 10px 16px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner tr:hover td {
    background-color: #f0f7ff !important;
}

.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner tr:nth-child(even) td {
    background-color: #fafbfc !important;
}

.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner tr:nth-child(even):hover td {
    background-color: #f0f7ff !important;
}

/* DataTable pagination */
.dash-table-container .previous-next-container {
    font-family: 'Inter', sans-serif;
    padding: 12px 0;
}

/* DataTable responsive */
@media (max-width: 767.98px) {
    .dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner th,
    .dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner td {
        padding: 8px 10px !important;
        font-size: 0.8rem !important;
    }
}

/* ===== Form Controls ===== */
.form-check-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
}

.form-check-input:checked {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

/* Date picker */
.DateInput_input {
    font-family: 'Inter', sans-serif !important;
    font-size: 0.875rem !important;
    border-radius: 8px !important;
}

/* Dropdown */
.Select-control, .Select-menu-outer {
    font-family: 'Inter', sans-serif !important;
    border-radius: 8px !important;
}

/* ===== Page header ===== */
.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.03em;
}

.page-subtitle {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 400;
}

@media (max-width: 767.98px) {
    .page-title {
        font-size: 1.35rem;
    }

    .page-subtitle {
        font-size: 0.8rem;
    }
}

/* ===== Filter card ===== */
.filter-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

@media (max-width: 767.98px) {
    .filter-card {
        padding: 16px;
        border-radius: 10px;
    }
}

/* ===== Table card ===== */
.table-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

@media (max-width: 767.98px) {
    .table-card {
        padding: 16px 12px;
        border-radius: 10px;
    }
}

/* ===== Login ===== */
.login-card {
    border-radius: 16px !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1) !important;
    padding: 2rem;
}

@media (max-width: 767.98px) {
    .login-card {
        padding: 1.25rem;
    }
}
