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

:root {
    /* Color Palette */
    --primary: #4F46E5;
    --primary-dark: #4338ca;
    --primary-light: #818cf8;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    /* Backgrounds */
    --bg-body: #f3f4f6;
    --bg-card: #ffffff;
    --bg-nav: #1e293b;

    /* Text */
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --text-light: #f9fafb;

    /* Spacing & Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

html {
    font-size: 13px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

/* Navigation */
.navbar {
    background-color: var(--bg-nav) !important;
    box-shadow: var(--shadow-md);
    padding: 0.75rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.025em;
}

.navbar-logo {
    max-width: 60px;
}

@media (max-width: 991.98px) {
    .navbar-logo {
        max-width: 100px;
    }
}

.nav-link {
    font-weight: 500;
    color: #cbd5e1 !important;
    transition: color 0.2s;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: white !important;
}

/* Cards */
.card {
    background-color: var(--bg-card);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid #e5e7eb;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* Stats Cards */
.stats-card {
    color: white;
    position: relative;
    overflow: hidden;
}

.stats-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(to bottom right, rgba(255, 255, 255, 0.1), transparent);
    pointer-events: none;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #4F46E5, #4338ca);
}

.bg-gradient-success {
    background: linear-gradient(135deg, #10b981, #059669);
}

.bg-gradient-info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* Buttons */
.btn {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

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

.table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom-width: 1px;
    padding: 1rem 1.5rem;
}

.table td {
    padding: 1rem 1.5rem;
    vertical-align: middle;
    color: var(--text-main);
    border-bottom-color: #f3f4f6;
}

.clickable-row {
    cursor: pointer;
    transition: background-color 0.15s;
}

.clickable-row:hover {
    background-color: #f8fafc !important;
}

/* Badges */
.badge {
    padding: 0.35em 0.65em;
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.status-active {
    background-color: #d1fae5 !important;
    color: #065f46 !important;
}

.status-inactive {
    background-color: #fee2e2 !important;
    color: #991b1b !important;
}

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

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

/* Page Headers */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    color: var(--text-main);
}

.page-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 1.875rem;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
}

.required:after {
    content:" *";
    color: red;
}

.tabulator {
    font-size: 12px;
}

/* Mobile Responsive */
@media (max-width: 767.98px) {
    .card-body {
        padding: 1rem;
    }

    .card-header {
        padding: 0.875rem 1rem;
    }

    .table th,
    .table td {
        padding: 0.625rem 0.75rem;
    }

    .page-title {
        font-size: 1.5rem;
    }

    h1 {
        font-size: 1.625rem;
    }
}

@media (max-width: 575.98px) {
    .card-body {
        padding: 0.875rem;
    }

    .table th,
    .table td {
        padding: 0.5rem 0.625rem;
        font-size: 0.875rem;
    }

    h1 {
        font-size: 1.375rem;
    }

    .badge {
        font-size: 0.7em;
    }
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
    background-color: var(--bg-nav);
    color: #cbd5e1;
    font-size: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.5rem 0;
    color: #64748b;
}

.footer-version {
    color: #64748b;
    white-space: nowrap;
}
