/* ==========================================================================
   app/static/css/style.css
   Nöbet Yönetim Platformu
   Custom Premium Dark Theme CSS Stylesheet
   ========================================================================== */

/* Design Tokens & CSS Variables */
:root {
    --bg-dark-custom: #0b0f19;       /* Deep Military Slate Black */
    --bg-card-custom: #111827;       /* Card Dark Grey */
    --bg-header-custom: #1f2937;     /* Header Medium Grey */
    --primary-custom: #3b82f6;       /* Radiant Blue */
    --success-custom: #10b981;       /* Emerald Green */
    --warning-custom: #f59e0b;       /* Amber Warning */
    --danger-custom: #ef4444;        /* Crimson Red */
    --text-light-custom: #ffffff;    /* Solid White text */
    --text-muted-custom: #e5e7eb;    /* Bright Light Gray text (replaces slate gray) */
    --border-dark-custom: #1f2937;   /* Borders for dark containers */
    --border-focus-custom: #4b5563;  /* Input focus border */
    --font-inter: 'Inter', sans-serif;
}

/* Global text-muted override to satisfy readability requests */
.text-muted, .text-secondary {
    color: #e5e7eb !important;
}

/* Base resets & theme styles */
body {
    font-family: var(--font-inter);
    background-color: var(--bg-dark-custom) !important;
    color: var(--text-light-custom) !important;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Background utilities */
.bg-dark-custom {
    background-color: var(--bg-dark-custom) !important;
}
.bg-dark-card {
    background-color: var(--bg-card-custom) !important;
}
.bg-dark-header {
    background-color: #161d2a !important;
}

/* Text utilities */
.text-light-custom {
    color: var(--text-light-custom) !important;
}
.text-muted-custom {
    color: var(--text-muted-custom) !important;
}
.text-primary-custom {
    color: var(--primary-custom) !important;
}

/* Borders */
.border-dark-border {
    border-color: var(--border-dark-custom) !important;
}

/* Custom buttons */
.btn-primary-custom {
    background-color: var(--primary-custom) !important;
    border-color: var(--primary-custom) !important;
    color: #fff !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-primary-custom:hover {
    filter: brightness(1.15);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}
.btn-primary-custom:active {
    transform: translateY(0);
}

/* Forms styling */
.form-control, .form-select {
    background-color: #161d2a !important;
    border-color: var(--border-dark-custom) !important;
    color: var(--text-light-custom) !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary-custom) !important;
    box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.2) !important;
}
.form-control::placeholder {
    color: #4b5563 !important;
}

/* Layout Architecture */
.sidebar {
    width: 260px;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s;
}

.content-wrapper {
    min-height: 100vh;
    overflow-x: hidden;
}

/* Sidebar navigation links */
.sidebar .nav-link {
    color: var(--text-muted-custom);
    font-weight: 500;
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    transition: all 0.2s ease;
    font-size: 0.88rem;
}
.sidebar .nav-link i {
    font-size: 1.1rem;
    vertical-align: middle;
}
.sidebar .nav-link:hover {
    color: var(--text-light-custom);
    background-color: rgba(255, 255, 255, 0.05);
}
.sidebar .nav-link.active {
    background-color: var(--primary-custom) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Custom Avatar Circle */
.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
}

/* Premium Card Panels */
.card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
}
.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3) !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
}

/* Scrollbar design */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark-custom);
}
::-webkit-scrollbar-thumb {
    background: #1f2937;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #374151;
}

/* Tables custom dark theme */
.table {
    --bs-table-bg: var(--bg-card-custom) !important;
    --bs-table-color: var(--text-light-custom) !important;
    --bs-table-border-color: var(--border-dark-custom) !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border-radius: 12px;
    overflow: hidden;
}
.table th {
    background-color: #161d2a !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    color: var(--text-muted-custom) !important;
    padding: 1rem !important;
    border-bottom: 2px solid var(--border-dark-custom) !important;
}
.table td {
    padding: 0.9rem 1rem !important;
    vertical-align: middle !important;
}

/* Table row hover scale effect */
.table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02) !important;
}

/* Custom list items */
.list-group-item {
    background-color: var(--bg-card-custom) !important;
    border-color: var(--border-dark-custom) !important;
    color: var(--text-light-custom) !important;
}

/* Responsive breakdowns */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-bottom: 1px solid var(--border-dark-custom) !important;
        border-end: none !important;
    }
    #sidebarMenu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--bg-card-custom) !important;
        z-index: 1050;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6);
        border-bottom: 1px solid var(--border-dark-custom);
        max-height: 80vh;
        overflow-y: auto;
    }
    .content-wrapper {
        width: 100% !important;
    }
    .container-fluid.p-4 {
        padding: 1.25rem 1rem !important;
    }
    .card-body {
        padding: 1.25rem 1rem !important;
    }
    h1, h2, h3, h4, h5, h6, .card-title {
        word-break: break-word;
    }
    /* Stack tables horizontally scrollable without breaking UI */
    .table-responsive {
        margin-bottom: 1rem;
        border: 1px solid var(--border-dark-custom);
        border-radius: 8px;
    }
}
@media (min-width: 768px) {
    .content-wrapper {
        width: calc(100% - 260px);
    }
}

/* Premium High-Contrast Subtle Badge Overrides for Dark Mode */
.badge {
    font-weight: 600 !important;
    letter-spacing: 0.5px;
}
.bg-secondary-subtle {
    background-color: rgba(156, 163, 175, 0.25) !important;
}
.text-secondary {
    color: #ffffff !important; /* Force to solid white inside badges */
}
.bg-primary-subtle {
    background-color: rgba(59, 130, 246, 0.25) !important;
}
.text-primary {
    color: #60a5fa !important;
}
.bg-success-subtle {
    background-color: rgba(16, 185, 129, 0.25) !important;
}
.text-success {
    color: #34d399 !important;
}
.bg-warning-subtle {
    background-color: rgba(245, 158, 11, 0.25) !important;
}
.text-warning {
    color: #fbbf24 !important;
}
.bg-danger-subtle {
    background-color: rgba(239, 68, 68, 0.25) !important;
}
.text-danger {
    color: #f87171 !important;
}
.bg-info-subtle {
    background-color: rgba(6, 182, 212, 0.25) !important;
}
.text-info {
    color: #22d3ee !important;
}

/* ==========================================================================
   Login Page Styling (Premium Glassmorphism & Glow Effects)
   ========================================================================== */

.login-card-glass {
    background: rgba(17, 24, 39, 0.7) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 40px rgba(59, 130, 246, 0.05) !important;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.login-card-glass:hover {
    border-color: rgba(59, 130, 246, 0.2) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 50px rgba(59, 130, 246, 0.1) !important;
}

.auth-bg-radial {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, rgba(139, 92, 246, 0.04) 40%, rgba(0,0,0,0) 70%);
    z-index: -1;
    pointer-events: none;
}

.input-glass {
    background-color: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    transition: all 0.3s ease !important;
}

.input-glass:focus {
    background-color: rgba(15, 23, 42, 0.8) !important;
    border-color: var(--primary-custom) !important;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2) !important;
}

.btn-glow {
    background: linear-gradient(135deg, var(--primary-custom) 0%, #2563eb 100%) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3) !important;
    transition: all 0.3s ease !important;
}

.btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5) !important;
    filter: brightness(1.1);
}

.btn-glow:active {
    transform: translateY(0);
}

