/* ===================== TOAST ===================== */
/* Sidebar (z-index:1000) ve overlay (z-index:1050) üzerinde kalması için */
#toast-container {
    z-index: 11000;
}

/* ===================== LOADER ===================== */
#page-loader {
    position: fixed;
    inset: 0;
    background: rgba(240, 244, 251, 0.82);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
}

.loader-spinner-ring {
    width: 52px;
    height: 52px;
    border: 4px solid #d0e1f9;
    border-top-color: #1a73e8;
    border-radius: 50%;
    animation: nova-spin 0.75s linear infinite;
}

@keyframes nova-spin {
    to { transform: rotate(360deg); }
}

.loader-text {
    color: #1a73e8;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* Login sayfasında loader arka planı beyaz/mavi temalı */
.login-body #page-loader {
    background: rgba(13, 45, 94, 0.55);
}

.login-body .loader-spinner-ring {
    border-color: rgba(255,255,255,0.25);
    border-top-color: #fff;
}

.login-body .loader-text {
    color: #fff;
}

/* ===================== GLOBAL ===================== */
html, body {
    height: 100%;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 15px;
    background-color: #f0f4fb;
    margin: 0;
    padding: 0;
}

* { box-sizing: border-box; }

.btn:focus, .form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(26, 115, 232, 0.2);
}

/* ===================== WRAPPER ===================== */
#wrapper {
    min-height: 100vh;
}

/* ===================== SIDEBAR ===================== */
#sidebar {
    width: 250px;
    min-height: 100vh;
    background: linear-gradient(180deg, #0d2d5e 0%, #163f7a 100%);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: width 0.3s ease;
}

.sidebar-header {
    padding: 18px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    min-height: 70px;
}

.sidebar-logo {
    width: 38px;
    height: 38px;
    object-fit: contain;
    flex-shrink: 0;
}

.sidebar-title {
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-nav {
    list-style: none;
    padding: 10px 0;
    margin: 0;
}

.sidebar-section {
    color: rgba(255,255,255,0.4);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    padding: 14px 18px 4px;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 18px;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 14px;
    border-left: 3px solid transparent;
}

.sidebar-link:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-left-color: rgba(255,255,255,0.3);
}

.sidebar-link.active {
    background: rgba(66,133,244,0.2);
    color: #7ab3ff;
    border-left-color: #4285f4;
}

.sidebar-link i {
    font-size: 16px;
    width: 20px;
    flex-shrink: 0;
    text-align: center;
}

/* ===================== SIDEBAR COLLAPSED (desktop) ===================== */
#wrapper.sidebar-collapsed #sidebar {
    width: 62px;
}

#wrapper.sidebar-collapsed .sidebar-title,
#wrapper.sidebar-collapsed .sidebar-section,
#wrapper.sidebar-collapsed .sidebar-link span {
    display: none;
}

#wrapper.sidebar-collapsed .sidebar-link {
    justify-content: center;
    padding: 12px;
    border-left: none;
}

#wrapper.sidebar-collapsed .sidebar-header {
    justify-content: center;
    padding: 18px 10px;
}

/* ===================== OVERLAY (mobile) ===================== */
#sidebarOverlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1040;
}

#wrapper.sidebar-open #sidebarOverlay {
    display: block;
}

/* ===================== TOPBAR ===================== */
.topbar {
    height: 62px;
    border-bottom: 1px solid #e2e8f5;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 999;
}

.topbar-title {
    font-size: 15px;
    color: #4a5568;
}

.avatar-circle {
    width: 32px;
    height: 32px;
    background: #e8f0fe;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a73e8;
    font-size: 16px;
}

/* ===================== MAIN CONTENT ===================== */
.main-content {
    padding: 24px;
    background: #f0f4fb;
}

/* ===================== CARDS ===================== */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    border-radius: 10px 10px 0 0 !important;
    font-weight: 600;
    font-size: 14px;
    padding: 14px 18px;
}

/* ===================== STAT CARDS ===================== */
.stat-card {
    border-radius: 10px;
    padding: 20px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.stat-icon.blue  { background: #e8f0fe; color: #1a73e8; }
.stat-icon.green { background: #e6f4ea; color: #1e8e3e; }
.stat-icon.orange{ background: #fef3e2; color: #f29900; }
.stat-icon.red   { background: #fce8e6; color: #d93025; }

/* ===================== BUTTONS ===================== */
.btn-primary {
    background-color: #1a73e8;
    border-color: #1a73e8;
}
.btn-primary:hover {
    background-color: #1557b0;
    border-color: #1557b0;
}

/* ===================== TABLES ===================== */
.table th {
    font-size: 12.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    background: #f8fafc;
}

.table td {
    vertical-align: middle;
    font-size: 14.5px;
}

/* ===================== BADGES ===================== */
.badge-status {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
}

/* ===================== LOGIN PAGE ===================== */
.login-body {
    background: linear-gradient(135deg, #0d2d5e 0%, #1a73e8 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.login-wrapper {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px 36px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}

.login-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 767px) {
    #sidebar {
        position: fixed;
        left: -250px;
        top: 0;
        height: 100vh;
        z-index: 1050;
        transition: left 0.3s ease;
    }

    #wrapper.sidebar-open #sidebar {
        left: 0;
    }

    .main-content {
        padding: 16px;
    }

    .login-card {
        padding: 28px 22px;
    }
}

@media (min-width: 768px) {
    #content-wrapper {
        min-width: 0;
    }
}
