/* ============================================================
   İSTAKİP 2.0 — Panel Tasarım Sistemi
   Marka: turuncu vurgu · koyu lacivert sidebar · Inter tipografi
   ============================================================ */

:root {
    --brand: #f97316;
    --brand-dark: #ea580c;
    --brand-soft: #fff7ed;
    --ink: #0f172a;
    --ink-2: #1e293b;
    --surface: #f8fafc;
    --line: #e8edf3;
    --radius: .85rem;
    --radius-sm: .6rem;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
    --shadow: 0 4px 18px rgba(15, 23, 42, .08);
    --shadow-lg: 0 18px 45px rgba(15, 23, 42, .16);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    background: var(--surface);
    color: var(--ink);
    font-size: .925rem;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Navbar ---------- */
.topbar {
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    z-index: 1040;
}
.topbar .navbar-brand {
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--ink) !important;
}
.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: .7rem;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #fff;
    font-size: 1.05rem;
    box-shadow: 0 6px 16px rgba(249, 115, 22, .35);
}
.brand-word { color: var(--ink); }
.brand-word span { color: var(--brand); }

/* ---------- Sidebar ---------- */
.sidebar {
    width: 268px;
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
    border-right: 0;
    position: sticky;
    top: 56px;
    height: calc(100vh - 56px);
    overflow-y: auto;
    padding: 1.25rem 1rem 2rem;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 99px; }

.sidebar .nav-link {
    color: #cbd5e1;
    border-radius: .65rem;
    padding: .62rem .9rem;
    font-weight: 500;
    font-size: .875rem;
    display: flex;
    align-items: center;
    gap: .35rem;
    transition: all .18s ease;
}
.sidebar .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, .07);
    transform: translateX(3px);
}
.sidebar .nav-link.active,
.sidebar .nav-link:active {
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    box-shadow: 0 8px 20px rgba(249, 115, 22, .35);
}
.sidebar .nav-link i { opacity: .85; width: 1.35rem; }
.sidebar hr { border-color: rgba(255,255,255,.08); margin: .9rem 0; }

/* ---------- Ana içerik ---------- */
.main-content { padding: 2rem 2.25rem 3rem; width: 100%; max-width: 1480px; }

.page-title,
.main-content > h1,
.main-content h1.h3 {
    font-weight: 800;
    letter-spacing: -.025em;
    font-size: 1.65rem;
    color: var(--ink);
    margin-bottom: 0;
}

.main-content .card .card-header .fw-semibold,
.main-content .card .card-header.bg-transparent {
    color: var(--ink);
}

/* Kaydırılabilir tablolarda ipucu */
.table-responsive { border-radius: var(--radius); }

/* ---------- Kartlar ---------- */
.card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover { box-shadow: var(--shadow); }
.card-header {
    background: transparent;
    border-bottom: 1px solid var(--line);
    padding: 1.05rem 1.35rem;
    font-weight: 600;
    border-radius: var(--radius) var(--radius) 0 0 !important;
}
.card-body { padding: 1.35rem; }

.stat-card .card-body { padding: 1.25rem 1.35rem; }
.stat-card .stat-label {
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #94a3b8;
}
.stat-card .stat-value {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.15;
    color: var(--ink);
}
.stat-card .stat-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: .8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    background: var(--brand-soft);
    color: var(--brand-dark);
}

/* ---------- Tablolar ---------- */
.table { --bs-table-bg: transparent; margin-bottom: 0; }
.table thead th {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #94a3b8;
    border-bottom: 1px solid var(--line);
    padding: .85rem 1rem;
    white-space: nowrap;
}
.table tbody td {
    padding: .9rem 1rem;
    border-color: var(--line);
    vertical-align: middle;
}
.table-hover tbody tr { transition: background .15s ease; }
.table-hover tbody tr:hover { background: var(--brand-soft) !important; }

/* ---------- Butonlar ---------- */
.btn {
    font-weight: 600;
    border-radius: .65rem;
    padding: .55rem 1.15rem;
    transition: all .18s ease;
}
.btn-primary {
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    border: 0;
    box-shadow: 0 6px 16px rgba(249, 115, 22, .28);
}
.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(135deg, var(--brand-dark), #c2410c);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(249, 115, 22, .34);
}
.btn-outline-secondary {
    border-color: var(--line);
    color: var(--ink);
    background: #fff;
}
.btn-outline-secondary:hover { background: var(--surface); border-color: #cbd5e1; color: var(--ink); }
.btn-outline-primary { color: var(--brand-dark); border-color: #fed7aa; }
.btn-outline-primary:hover { background: var(--brand-soft); color: var(--brand-dark); border-color: var(--brand); }
.btn-sm { padding: .35rem .8rem; font-size: .8125rem; border-radius: .55rem; }

/* ---------- Formlar ---------- */
.form-label {
    font-weight: 600;
    font-size: .8125rem;
    color: var(--ink);
    margin-bottom: .35rem;
}
.form-control, .form-select {
    border-radius: .65rem;
    border-color: var(--line);
    padding: .6rem .9rem;
    font-size: .9rem;
    background: #fff;
    transition: all .18s ease;
}
.form-control:focus, .form-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 .22rem rgba(249, 115, 22, .14);
}
.input-group-text {
    background: var(--brand-soft);
    border-color: var(--line);
    color: var(--brand-dark);
    border-radius: .65rem;
}

/* ---------- Rozetler & uyarılar ---------- */
.badge { font-weight: 600; letter-spacing: .01em; padding: .45em .8em; }
.text-bg-success { background-color: #16a34a !important; }
.text-bg-warning { background-color: #d97706 !important; }
.text-bg-danger { background-color: #dc2626 !important; }
.text-bg-info { background-color: #0891b2 !important; }
.text-bg-primary { background-color: var(--brand) !important; }

.alert { border: 0; border-radius: var(--radius); font-weight: 500; }

/* ---------- Modal ---------- */
.modal-content {
    border: 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}
.modal-header { border-bottom-color: var(--line); padding: 1.15rem 1.35rem; }
.modal-body { padding: 1.35rem; }
.modal-footer { border-top-color: var(--line); padding: 1rem 1.35rem; }

/* ---------- DataTables uyumu ---------- */
.dataTables_wrapper .dt-processing { z-index: 10; }
div.dataTables_wrapper div.dataTables_filter input,
div.dataTables_wrapper div.dataTables_length select {
    border-radius: .65rem;
    border-color: var(--line);
}
table.dataTable thead th { background: transparent; }
table.dataTable tbody tr { transition: background .15s ease; }
.dataTables_wrapper .dataTables_info { color: #94a3b8; font-size: .8125rem; }
.page-link { border-radius: .55rem !important; margin: 0 .15rem; border-color: var(--line); color: var(--ink); }
.page-item.active .page-link { background: var(--brand); border-color: var(--brand); }

/* ---------- Boş durumlar ---------- */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: #94a3b8;
}
.empty-state i { font-size: 2.75rem; opacity: .55; }

/* ---------- Giriş sayfası ---------- */
.login-page {
    min-height: 100vh;
    background:
        radial-gradient(1100px 500px at 85% -10%, rgba(249, 115, 22, .28), transparent 60%),
        radial-gradient(900px 500px at -10% 110%, rgba(14, 116, 144, .22), transparent 60%),
        linear-gradient(160deg, var(--ink) 0%, var(--ink-2) 100%);
}
.login-card {
    border: 0;
    border-radius: 1.35rem;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* ---------- Animasyonlar ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.fade-up { animation: fadeUp .35s ease both; }

/* ---------- Mobil ---------- */
@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        top: 56px;
        bottom: 0;
        left: 0;
        height: auto;
        z-index: 1040;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform .25s ease;
    }
    .sidebar.show { transform: translateX(0); box-shadow: 0 0 2.5rem rgba(0, 0, 0, .4); }
    .main-content { padding: 1.25rem 1rem 2.5rem; }
    .page-title { font-size: 1.35rem; }
}

/* Karanlık tema */
[data-bs-theme="dark"] .topbar { background: rgba(15, 23, 42, .92); border-color: var(--line); }
[data-bs-theme="dark"] .brand-word { color: #f1f5f9; }
[data-bs-theme="dark"] .btn-outline-secondary { background: var(--ink-2); border-color: var(--line); color: #e2e8f0; }
