/**
 * Moliya & Oylik Boshqaruvi Dashboard Stylesheet
 * Zamonaviy, toza, premium Dark & Glassmorphism UI
 */

:root {
    --bg-main: #0b0f19;
    --bg-card: #151d30;
    --bg-card-hover: #1c263f;
    --border-color: #23304e;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-family);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.navbar-custom {
    background-color: rgba(21, 29, 48, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.nav-link {
    color: var(--text-muted) !important;
    font-weight: 500;
    padding: 0.6rem 1rem !important;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
    color: #fff !important;
    background: rgba(59, 130, 246, 0.15);
}

.nav-link.active {
    color: var(--primary) !important;
}

/* Cards */
.card-custom {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-custom:hover {
    box-shadow: 0 8px 30px -4px rgba(0, 0, 0, 0.45);
}

/* Stat KPI Cards */
.stat-card {
    position: relative;
    overflow: hidden;
}

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

.stat-icon.primary { background: rgba(59, 130, 246, 0.15); color: var(--primary); }
.stat-icon.success { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.stat-icon.warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.stat-icon.danger  { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.stat-icon.info    { background: rgba(6, 182, 212, 0.15); color: var(--info); }

/* Tables */
.table,
.table-custom {
    --bs-table-bg: transparent !important;
    --bs-table-striped-bg: rgba(255, 255, 255, 0.02) !important;
    --bs-table-hover-bg: rgba(255, 255, 255, 0.05) !important;
    --bs-table-color: #f8fafc !important;
    color: #f8fafc !important;
    vertical-align: middle;
    margin-bottom: 0;
    background-color: transparent !important;
}

.table-custom th,
.table th {
    background-color: #0d1322 !important;
    color: #94a3b8 !important;
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 12px 16px;
}

.table-custom td,
.table td {
    background-color: transparent !important;
    color: #f8fafc !important;
    border-bottom: 1px solid rgba(35, 48, 78, 0.6) !important;
    padding: 14px 16px;
    font-size: 0.95rem;
}

.table-custom tbody tr,
.table tbody tr {
    background-color: #151d30 !important;
}

.table-custom tbody tr:nth-of-type(even),
.table tbody tr:nth-of-type(even) {
    background-color: #101726 !important;
}

.table-custom tbody tr:hover,
.table tbody tr:hover {
    background-color: #1e293b !important;
}

.table-custom tbody tr:hover td,
.table tbody tr:hover td {
    background-color: transparent !important;
}

/* Badges */
.badge-advance { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.badge-salary  { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-bonus   { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-penalty { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }

/* Forms & Inputs */
.form-control, .form-select {
    background-color: #0d1322 !important;
    border: 1px solid var(--border-color) !important;
    color: #fff !important;
    border-radius: 8px;
    padding: 10px 14px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25) !important;
}

.form-control::placeholder {
    color: var(--text-dim);
}

/* Modals */
.modal-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    color: var(--text-main);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.modal-header, .modal-footer {
    border-color: var(--border-color);
}

.btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Buttons */
.btn-primary-custom {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: none;
    color: white;
    font-weight: 500;
    border-radius: 8px;
    padding: 8px 18px;
    transition: opacity 0.2s ease;
}

.btn-primary-custom:hover {
    opacity: 0.9;
    color: white;
}

/* Filter Bar */
.filter-bar {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 18px;
}

/* Toast */
.toast-custom {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    min-width: 300px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .table-responsive {
        border-radius: 12px;
        overflow: hidden;
    }
}
