/* ==================== GENEL ==================== */
:root {
    --sidebar-width: 260px;
    --topbar-height: 56px;
    --primary: #1a3a5c;
    --primary-light: #2563a8;
    --accent: #f59e0b;
    --sidebar-bg: #1a2535;
    --sidebar-text: #cbd5e1;
    --sidebar-hover: rgba(255,255,255,0.08);
    --sidebar-active: rgba(37,99,168,0.4);
}

html { font-size: 14px; }
@media (min-width: 768px) { html { font-size: 15px; } }

body { margin: 0; font-family: 'Segoe UI', system-ui, sans-serif; }

/* ==================== LOGİN ==================== */
.login-body {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-body::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(37,99,168,0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(245,158,11,0.1) 0%, transparent 40%);
    pointer-events: none;
}

.login-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-card-wrapper {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    box-shadow: 0 25px 50px rgba(0,0,0,0.4);
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #1a3a5c, #2563a8);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    box-shadow: 0 8px 20px rgba(37,99,168,0.4);
}

.login-icon i { font-size: 2rem; color: white; }

.login-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: white;
    margin: 0;
}

.login-subtitle {
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
    margin: 0.25rem 0 0;
}

.login-input {
    background: rgba(255,255,255,0.07) !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
    color: white !important;
    border-radius: 10px !important;
}

.login-input::placeholder { color: rgba(255,255,255,0.35) !important; }
.login-input:focus { box-shadow: 0 0 0 3px rgba(37,99,168,0.4) !important; }

.login-btn {
    background: linear-gradient(135deg, #2563a8, #1a3a5c);
    border: none;
    border-radius: 10px;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37,99,168,0.4);
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
}

/* ==================== LAYOUT ==================== */
.otosr-body { background: #f1f5f9; }

#wrapper { min-height: 100vh; }

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    position: fixed;
    top: 0; left: 0;
    z-index: 1030;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    overflow: hidden;
}

.sidebar-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    color: white !important;
    text-decoration: none !important;
    font-size: 1.1rem;
    font-weight: 700;
}

.sidebar-brand i { color: var(--accent); font-size: 1.3rem; }

.btn-close-sidebar {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.25rem;
}

.sidebar-menu {
    padding: 0.75rem 0.5rem;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.9rem;
    color: var(--sidebar-text) !important;
    text-decoration: none !important;
    border-radius: 8px;
    margin-bottom: 2px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.sidebar-item:hover { background: var(--sidebar-hover); color: white !important; }
.sidebar-item.active { background: var(--sidebar-active); color: white !important; }
.sidebar-item i { width: 18px; text-align: center; flex-shrink: 0; }

.sidebar-group { margin-bottom: 2px; }

.sidebar-group-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.9rem;
    color: var(--sidebar-text);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    user-select: none;
    transition: all 0.2s;
}

.sidebar-group-header:hover { background: var(--sidebar-hover); color: white; }
.sidebar-group-header i:first-child { width: 18px; text-align: center; }
.sidebar-arrow { font-size: 0.7rem; transition: transform 0.2s; }
.sidebar-group-header[aria-expanded="true"] .sidebar-arrow,
.collapse.show ~ .sidebar-group-header .sidebar-arrow { transform: rotate(-180deg); }

.sidebar-subitem {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.9rem 0.5rem 2.75rem;
    color: rgba(203,213,225,0.7) !important;
    text-decoration: none !important;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 1px;
    transition: all 0.2s;
}

.sidebar-subitem:hover { background: var(--sidebar-hover); color: white !important; }
.sidebar-subitem i { width: 14px; text-align: center; font-size: 0.8rem; }

/* Top Bar */
.top-bar {
    height: var(--topbar-height);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    position: sticky;
    top: 0;
    z-index: 1020;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Üst bar sol grup: menü gizle/göster butonu ile ileri/geri gezinme ayrı gruplar */
.topbar-menu-btn { line-height: 1; }

.topbar-sep {
    width: 1px;
    height: 24px;
    margin: 0 0.85rem;
    background: rgba(255,255,255,0.28);
    flex-shrink: 0;
}

.topbar-nav .btn { opacity: 0.8; transition: opacity 0.15s; }
.topbar-nav .btn:hover { opacity: 1; }
.topbar-nav .btn i { font-size: 0.9rem; }

@media (max-width: 575.98px) {
    .topbar-sep { margin: 0 0.5rem; }
}

/* Content wrapper */
#content-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s;
}

.main-content { flex: 1; }

/* Mobil sidebar */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1029;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.sidebar-overlay.show { opacity: 1; visibility: visible; }

@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    #content-wrapper {
        margin-left: 0 !important;
    }
}

/* Masaüstünde sidebar gizle/göster */
@media (min-width: 992px) {
    #wrapper.sidebar-closed .sidebar {
        transform: translateX(-100%);
    }
    #wrapper.sidebar-closed #content-wrapper {
        margin-left: 0;
    }
}

/* ==================== STAT KARTLARI ==================== */
.stat-card {
    background: white;
    border-radius: 14px;
    padding: 1.25rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.2s;
    border-top: 4px solid transparent;
    position: relative;
    overflow: hidden;
}

.stat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.1); }

.stat-icon { font-size: 1.75rem; margin-bottom: 0.5rem; opacity: 0.85; }
.stat-value { font-size: 1.4rem; font-weight: 700; color: #1e293b; line-height: 1.2; }
.stat-label { font-size: 0.75rem; color: #64748b; margin-top: 0.25rem; }

.stat-blue { border-top-color: #3b82f6; } .stat-blue .stat-icon { color: #3b82f6; }
.stat-orange { border-top-color: #f97316; } .stat-orange .stat-icon { color: #f97316; }
.stat-green { border-top-color: #22c55e; } .stat-green .stat-icon { color: #22c55e; }
.stat-red { border-top-color: #ef4444; } .stat-red .stat-icon { color: #ef4444; }
.stat-purple { border-top-color: #a855f7; } .stat-purple .stat-icon { color: #a855f7; }
.stat-dark { border-top-color: #475569; } .stat-dark .stat-icon { color: #475569; }
.stat-teal { border-top-color: #14b8a6; } .stat-teal .stat-icon { color: #14b8a6; }
.stat-indigo { border-top-color: #6366f1; } .stat-indigo .stat-icon { color: #6366f1; }

/* ==================== CARD ==================== */
.card { border: none; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.card-header { background: white; border-bottom: 1px solid #f1f5f9; padding: 0.9rem 1.25rem; border-radius: 12px 12px 0 0 !important; }

/* ==================== FORM ==================== */
.form-control, .form-select {
    border-radius: 8px;
    border-color: #e2e8f0;
    font-size: 0.9rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(37,99,168,0.15);
}

.btn { border-radius: 8px; font-size: 0.875rem; }
.btn-primary { background-color: var(--primary-light); border-color: var(--primary-light); }
.btn-primary:hover { background-color: var(--primary); border-color: var(--primary); }

/* ==================== TABLO ==================== */
.table { font-size: 0.875rem; }
.table th { font-weight: 600; color: #475569; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; }
.table-hover tbody tr:hover { background-color: #f8fafc; }

/* ==================== PAGE HEADER ==================== */
.page-header {
    background: white;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.page-title { font-size: 1.2rem; font-weight: 700; color: #1e293b; margin: 0; }
.page-subtitle { font-size: 0.8rem; color: #64748b; margin: 0; }

/* ==================== BADGE ==================== */
.badge { font-size: 0.75rem; }

/* ==================== YAZDIRMA ==================== */
@media print {
    .sidebar, .top-bar, .btn, .alert-dismissible .btn-close,
    #sidebarToggle, .no-print { display: none !important; }
    #content-wrapper { margin-left: 0 !important; }
    .card { box-shadow: none !important; border: 1px solid #dee2e6 !important; }
    body { background: white !important; }
    .main-content { padding: 0 !important; }
}

/* ==================== MOBİL ==================== */
@media (max-width: 575.98px) {
    .stat-card { padding: 1rem 0.75rem; }
    .stat-value { font-size: 1.1rem; }
    .stat-icon { font-size: 1.4rem; }
    .page-header { padding: 1rem; }
}
