/* =====================================================================
   Poyraz Panel · app.css
   Premium, kurumsal, koyu temalı SaaS arayüzü.
   Vurgu: indigo (#6366f1) · Tipografi: Manrope.
   Geçişler kasıtlı olarak sade (0.15–0.2s) tutulmuştur.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

/* ---------------- Değişkenler ---------------- */
:root {
    --bg:            #0a0e17;
    --bg-2:          #0d1220;
    --surface:       #121829;
    --surface-2:     #161d31;
    --surface-soft:  rgba(255, 255, 255, 0.035);
    --glass:         rgba(20, 26, 44, 0.72);
    --border:        rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);

    --text:          #e8eaf0;
    --text-muted:    #98a1b5;
    --text-dim:      #6b7488;

    --primary:       #6366f1;
    --primary-600:   #5457e6;
    --primary-700:   #4649d4;
    --primary-soft:  rgba(99, 102, 241, 0.14);
    --primary-ring:  rgba(99, 102, 241, 0.35);

    --success:       #34d399;
    --success-bg:    rgba(16, 185, 129, 0.12);
    --error:         #f87171;
    --error-bg:      rgba(239, 68, 68, 0.12);

    --radius:        16px;
    --radius-sm:     11px;
    --radius-xs:     9px;
    --shadow:        0 18px 50px -12px rgba(0, 0, 0, 0.55);
    --shadow-soft:   0 8px 24px -10px rgba(0, 0, 0, 0.45);
    --sidebar-w:     264px;
    --ease:          0.18s ease;

    --font: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* ---------------- Sıfırlama ---------------- */
*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-size: 15px;
    line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img { max-width: 100%; display: block; }

::selection { background: var(--primary-ring); color: #fff; }

/* İnce kaydırma çubuğu */
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: rgba(255,255,255,.13); border-radius: 20px; }
*::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.22); }

/* =====================================================================
   GİRİŞ / KİMLİK EKRANLARI
   ===================================================================== */
.auth-body {
    min-height: 100%;
    display: grid;
    place-items: center;
    padding: 24px;
    position: relative;
    overflow: hidden;
    background: var(--bg);
}

/* Gradient + ışık huzmeli arka plan */
.auth-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(60% 55% at 18% 12%, rgba(99, 102, 241, 0.22), transparent 60%),
        radial-gradient(55% 50% at 88% 88%, rgba(56, 70, 190, 0.20), transparent 62%),
        radial-gradient(40% 40% at 80% 10%, rgba(139, 92, 246, 0.12), transparent 60%),
        linear-gradient(160deg, #0a0e17 0%, #0c1120 55%, #090d16 100%);
}
.auth-bg::after {
    /* hafif doku için ince ızgara */
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 46px 46px;
    -webkit-mask-image: radial-gradient(70% 60% at 50% 40%, #000 30%, transparent 80%);
            mask-image: radial-gradient(70% 60% at 50% 40%, #000 30%, transparent 80%);
}

.auth-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 430px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

/* Glassmorphism kart */
.auth-card {
    width: 100%;
    background: var(--glass);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border: 1px solid var(--border-strong);
    border-radius: 22px;
    box-shadow: var(--shadow);
    padding: 38px 34px 34px;
}

.auth-brand { display: flex; justify-content: center; margin-bottom: 18px; }
.auth-logo { height: 46px; width: auto; object-fit: contain; }
.auth-logo-text {
    font-size: 22px; font-weight: 800; letter-spacing: -0.4px;
    color: #fff;
}

.auth-title {
    margin: 0;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #fff;
}
.auth-sub {
    margin: 8px 0 22px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

/* Uyarı kutuları */
.alert {
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    font-size: 13.5px;
    margin-bottom: 16px;
    border: 1px solid transparent;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.alert-success { background: var(--success-bg); color: #6ee7b7; border-color: rgba(16,185,129,.28); }
.alert-error   { background: var(--error-bg);   color: #fca5a5; border-color: rgba(239,68,68,.28); }
.alert.is-hiding { opacity: 0; transform: translateY(-4px); }

/* Form alanları */
.auth-form { display: flex; flex-direction: column; gap: 16px; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field-label { font-size: 12.5px; font-weight: 600; color: var(--text-muted); letter-spacing: 0.2px; }

.field-input {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0 12px;
    transition: border-color var(--ease), box-shadow var(--ease), background var(--ease);
}
.field-input:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
    background: var(--surface-2);
}
.field-icon { width: 18px; height: 18px; color: var(--text-dim); flex: none; }
.field-input input {
    flex: 1;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 14.5px;
    padding: 12px 0;
    outline: none;
    min-width: 0;
}
.field-input input::placeholder { color: var(--text-dim); }
.field-input input:-webkit-autofill,
.field-input input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text);
    -webkit-box-shadow: 0 0 0 40px var(--surface) inset;
    transition: background-color 5000s ease-in-out 0s;
}

/* Şifre göster/gizle */
.pwd-toggle {
    border: 0; background: transparent; cursor: pointer;
    color: var(--text-dim); padding: 6px; display: grid; place-items: center;
    border-radius: 8px; transition: color var(--ease), background var(--ease);
}
.pwd-toggle svg { width: 18px; height: 18px; }
.pwd-toggle:hover { color: var(--text); background: var(--surface-soft); }
.pwd-toggle.is-on { color: var(--primary); }

/* Satır: beni hatırla + şifremi unuttum */
.auth-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; margin-top: 2px;
}
.checkbox { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; color: var(--text-muted); user-select: none; }
.checkbox input {
    appearance: none; -webkit-appearance: none;
    width: 17px; height: 17px; border: 1.5px solid var(--border-strong);
    border-radius: 5px; background: var(--surface); cursor: pointer;
    display: grid; place-items: center; transition: all var(--ease); flex: none;
}
.checkbox input:checked { background: var(--primary); border-color: var(--primary); }
.checkbox input:checked::after {
    content: ""; width: 9px; height: 9px;
    background: #fff;
    clip-path: polygon(14% 47%, 0 60%, 39% 100%, 100% 22%, 86% 9%, 38% 73%);
}
.auth-link { color: var(--primary); font-size: 13.5px; font-weight: 600; transition: color var(--ease); }
.auth-link:hover { color: var(--primary-600); text-decoration: underline; }

/* Butonlar */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: 1px solid transparent; border-radius: var(--radius-sm);
    padding: 12px 18px; font-size: 14.5px; font-weight: 700; cursor: pointer;
    transition: background var(--ease), transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-700) 100%);
    box-shadow: 0 8px 20px -8px var(--primary-ring);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%); box-shadow: 0 10px 26px -8px var(--primary-ring); }
.btn-block { width: 100%; margin-top: 4px; }
.btn-ghost {
    background: var(--surface); color: var(--text); border-color: var(--border);
}
.btn-ghost:hover { background: var(--surface-2); border-color: var(--border-strong); }

.auth-bottom { text-align: center; margin: 18px 0 0; font-size: 13.5px; }
.auth-copy { color: var(--text-dim); font-size: 12px; text-align: center; margin: 0; }

/* 404 kartı */
.error-card { text-align: center; }
.err-code {
    display: block; font-size: 64px; font-weight: 800; letter-spacing: -2px;
    line-height: 1; margin-bottom: 8px;
    background: linear-gradient(135deg, var(--primary), #a78bfa);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* =====================================================================
   UYGULAMA KABUĞU (giriş sonrası)
   ===================================================================== */
.app-body {
    min-height: 100%;
    background:
        radial-gradient(50% 45% at 100% 0%, rgba(99,102,241,0.10), transparent 60%),
        linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
}

/* Mobil arka plan karartması */
.app-overlay {
    position: fixed; inset: 0; z-index: 40;
    background: rgba(4, 6, 12, 0.6);
    backdrop-filter: blur(2px);
    opacity: 0; visibility: hidden;
    transition: opacity var(--ease), visibility var(--ease);
}
.app-overlay.is-show { opacity: 1; visibility: visible; }

/* Yan menü */
.sidebar {
    position: fixed; top: 0; left: 0; z-index: 50;
    width: var(--sidebar-w); height: 100vh;
    background: linear-gradient(180deg, #0e1322 0%, #0b0f1b 100%);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    padding: 18px 14px;
}

.sidebar-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 6px 8px 18px; gap: 10px;
    border-bottom: 1px solid var(--border); margin-bottom: 14px;
}
.sidebar-logo { height: 34px; width: auto; object-fit: contain; }
.sidebar-logo-text { font-size: 18px; font-weight: 800; color: #fff; letter-spacing: -0.4px; }

.icon-btn {
    border: 0; background: transparent; color: var(--text-muted);
    cursor: pointer; width: 38px; height: 38px; border-radius: 10px;
    display: grid; place-items: center; transition: background var(--ease), color var(--ease);
}
.icon-btn svg { width: 21px; height: 21px; }
.icon-btn:hover { background: var(--surface-soft); color: var(--text); }
.sidebar-close { display: none; }

.sidebar-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; overflow-y: auto; }

.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 12px; border-radius: var(--radius-xs);
    color: var(--text-muted); font-size: 14px; font-weight: 600;
    transition: background var(--ease), color var(--ease);
    position: relative;
}
.nav-ic { width: 19px; height: 19px; flex: none; }
.nav-item:hover { background: var(--surface-soft); color: var(--text); }
.nav-item.is-active {
    background: var(--primary-soft); color: #c7c9ff;
}
.nav-item.is-active::before {
    content: ""; position: absolute; left: -14px; top: 50%; transform: translateY(-50%);
    width: 3px; height: 22px; border-radius: 0 3px 3px 0; background: var(--primary);
}
.nav-item.is-soon { cursor: default; color: var(--text-dim); }
.nav-item.is-soon:hover { background: transparent; color: var(--text-dim); }
.soon-badge {
    margin-left: auto; font-style: normal; font-size: 10px; font-weight: 700;
    letter-spacing: 0.4px; text-transform: uppercase;
    color: var(--text-dim); background: var(--surface-soft);
    border: 1px solid var(--border); padding: 2px 7px; border-radius: 20px;
}

.sidebar-foot { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 8px; }
.nav-logout { color: #f0a3a3; }
.nav-logout:hover { background: var(--error-bg); color: #fca5a5; }
.sidebar-tm { text-align: center; font-size: 11px; color: var(--text-dim); margin-top: 12px; user-select: none; }

/* Ana içerik kolonu */
.app-main {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex; flex-direction: column;
}

/* Üst bar */
.topbar {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; gap: 14px;
    padding: 14px 24px;
    background: rgba(10, 14, 23, 0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}
.topbar-burger { display: none; }

.topbar-search {
    position: relative; flex: 1; max-width: 520px;
    display: flex; align-items: center;
}
.search-ic {
    position: absolute; left: 13px; width: 18px; height: 18px; color: var(--text-dim);
    pointer-events: none;
}
.topbar-search input {
    width: 100%; border: 1px solid var(--border);
    background: var(--surface); color: var(--text);
    border-radius: var(--radius-sm); padding: 10px 14px 10px 40px;
    font-size: 14px; outline: none; transition: border-color var(--ease), box-shadow var(--ease);
}
.topbar-search input::placeholder { color: var(--text-dim); }
.topbar-search input:not([disabled]):focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.topbar-search input[disabled] { cursor: not-allowed; opacity: 0.85; }
.search-soon {
    position: absolute; right: 10px; font-size: 10px; font-weight: 700;
    letter-spacing: 0.4px; text-transform: uppercase; color: var(--text-dim);
    background: var(--surface-soft); border: 1px solid var(--border);
    padding: 3px 8px; border-radius: 20px;
}

.topbar-right { margin-left: auto; }
.user-chip {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 10px 6px 6px; border-radius: 40px;
    border: 1px solid var(--border); background: var(--surface);
    transition: border-color var(--ease), background var(--ease);
}
.user-chip:hover { border-color: var(--border-strong); background: var(--surface-2); }
.user-avatar {
    width: 34px; height: 34px; border-radius: 50%; flex: none;
    display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-700));
}
.user-meta { display: flex; flex-direction: column; line-height: 1.2; }
.user-name { font-size: 13.5px; font-weight: 700; color: var(--text); }
.user-role { font-size: 11.5px; color: var(--text-dim); }

/* İçerik alanı */
.content { padding: 28px 24px 40px; max-width: 1180px; width: 100%; }

/* Kart bileşeni */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

/* Sayfa başlığı */
.page-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 16px; margin-bottom: 24px; flex-wrap: wrap;
}
.page-title { margin: 0; font-size: 25px; font-weight: 700; letter-spacing: -0.5px; color: #fff; }
.page-sub { margin: 6px 0 0; color: var(--text-muted); font-size: 14.5px; }
.badge-soft {
    font-size: 12px; font-weight: 600; color: #c7c9ff;
    background: var(--primary-soft); border: 1px solid rgba(99,102,241,.28);
    padding: 7px 13px; border-radius: 20px; white-space: nowrap;
}

/* İstatistik kartları */
.stat-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px;
}
.stat-card {
    padding: 18px; display: flex; align-items: center; gap: 14px;
    position: relative; transition: transform var(--ease), border-color var(--ease);
}
.stat-card:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.stat-ic {
    width: 46px; height: 46px; border-radius: 13px; flex: none;
    display: grid; place-items: center; color: #c7c9ff;
    background: var(--primary-soft); border: 1px solid rgba(99,102,241,.22);
}
.stat-ic svg { width: 23px; height: 23px; }
.stat-body { display: flex; flex-direction: column; }
.stat-value { font-size: 24px; font-weight: 800; color: #fff; letter-spacing: -0.5px; line-height: 1.1; }
.stat-label { font-size: 13px; color: var(--text-muted); }
.stat-hint {
    position: absolute; top: 14px; right: 14px;
    font-size: 10.5px; color: var(--text-dim);
    background: var(--surface-soft); border: 1px solid var(--border);
    padding: 2px 8px; border-radius: 20px;
}

/* Bilgi notu kartı */
.note-card { padding: 22px; display: flex; gap: 16px; align-items: flex-start; }
.note-ic {
    width: 42px; height: 42px; border-radius: 12px; flex: none;
    display: grid; place-items: center; color: #c7c9ff;
    background: var(--primary-soft); border: 1px solid rgba(99,102,241,.22);
}
.note-ic svg { width: 22px; height: 22px; }
.note-text h2 { margin: 2px 0 6px; font-size: 16px; font-weight: 700; color: #fff; }
.note-text p { margin: 0; color: var(--text-muted); font-size: 14px; }

/* =====================================================================
   DUYARLI (RESPONSIVE)
   ===================================================================== */
@media (max-width: 1080px) {
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.22s ease;
        box-shadow: var(--shadow);
    }
    .sidebar.is-open { transform: translateX(0); }
    .sidebar-close { display: grid; }

    .app-main { margin-left: 0; }
    .topbar-burger { display: grid; }
    .topbar { padding: 12px 16px; }
    .content { padding: 22px 16px 36px; }

    .topbar-search { max-width: none; }
    .user-meta { display: none; }
    .user-chip { padding: 5px; }
}

@media (max-width: 560px) {
    .stat-grid { grid-template-columns: 1fr; }
    .auth-card { padding: 30px 22px 26px; }
    .page-title { font-size: 22px; }
    .auth-row { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* Hareket azaltma tercihi */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
