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

:root {
    --bg-main: #F8FAFC;
    --bg-card: rgba(255, 255, 255, 0.85);
    --border-color: rgba(0, 0, 0, 0.08);
    --text-main: #0F172A;
    --text-muted: #64748B;
    --primary: #2563EB;
    --primary-gradient: linear-gradient(135deg, #2563EB, #7C3AED);
    --secondary: #059669;
    --warning: #D97706;
    --danger: #DC2626;
    --radius: 16px;
    --blur: blur(12px);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(37, 99, 235, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(124, 58, 237, 0.08), transparent 25%);
    background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    margin-top: 0;
}

/* Navbar */
.public-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: var(--blur);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-logo {
    height: 65px;
    width: auto;
    object-fit: contain;
}

.btn-login {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.btn-login:hover {
    background: #1D4ED8;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px -1px rgba(37, 99, 235, 0.3);
}

/* Main Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 5%;
}

/* Dashboard Header */
.dashboard-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.dashboard-header h1 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.dashboard-header .subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin: 0;
}

/* Stat Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    backdrop-filter: var(--blur);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: rgba(37, 99, 235, 0.3);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.icon-blue { background: rgba(59, 130, 246, 0.1); color: #60A5FA; }
.icon-green { background: rgba(16, 185, 129, 0.1); color: #34D399; }
.icon-purple { background: rgba(139, 92, 246, 0.1); color: #A78BFA; }

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    line-height: 1.2;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Filters */
.filter-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    backdrop-filter: var(--blur);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.filter-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.filter-select {
    width: 100%;
    padding: 0.75rem;
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.filter-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filter-select option {
    background: #FFFFFF;
    color: var(--text-main);
}

/* DataTables Styling Overrides */
.table-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    backdrop-filter: var(--blur);
    overflow-x: auto;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

table.dataTable {
    width: 100% !important;
    border-collapse: collapse !important;
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
}

table.dataTable thead th {
    background: rgba(241, 245, 249, 0.8);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    padding: 1rem !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
}

table.dataTable tbody td {
    padding: 1rem !important;
    border-bottom: 1px solid var(--border-color) !important;
    color: var(--text-main);
    vertical-align: middle;
}

table.dataTable.no-footer {
    border-bottom: none !important;
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    color: var(--text-muted) !important;
}

.dataTables_wrapper .dataTables_filter input {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    padding: 0.5rem;
    margin-left: 0.5rem;
    outline: none;
    transition: border-color 0.3s;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--primary);
}

/* Pagination */
.dataTables_wrapper .dataTables_paginate .paginate_button {
    color: var(--text-muted) !important;
    border: 1px solid transparent !important;
    border-radius: 8px !important;
    margin: 0 2px !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: rgba(37, 99, 235, 0.05) !important;
    color: var(--primary) !important;
    border-color: transparent !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--primary) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2) !important;
}

/* Expand Button */
td.details-control {
    text-align: center;
    cursor: pointer;
    width: 40px;
}

td.details-control i {
    color: var(--primary);
    transition: transform 0.3s;
    background: rgba(59, 130, 246, 0.1);
    padding: 8px;
    border-radius: 50%;
}

tr.shown td.details-control i {
    transform: rotate(180deg);
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* Child Row */
.child-table-wrapper {
    padding: 1rem;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin: 0.5rem 0;
}

.table-child {
    width: 100%;
    border-collapse: collapse;
}

.table-child th {
    background: transparent !important;
    color: var(--text-muted) !important;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.1) !important;
    text-transform: uppercase;
    font-size: 0.75rem;
    padding-bottom: 0.5rem;
}

.table-child td {
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    padding: 0.75rem 0.5rem;
}

.table-child tr:last-child td {
    border-bottom: none !important;
}

/* Badges */
.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-success { background: rgba(16, 185, 129, 0.15); color: #34D399; }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: #FBBF24; }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: #F87171; }
.badge-info { background: rgba(59, 130, 246, 0.15); color: #60A5FA; }
.badge-secondary { background: rgba(255, 255, 255, 0.1); color: #CBD5E1; }

.loading {
    text-align: center;
    padding: 2rem;
    color: var(--primary);
}
