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

/* Koyu tema varsayılan; açık tema hem sistem tercihinden hem manuel anahtardan gelebilir.
   Palet, tanıtım sayfasıyla (platform/home.php) aynı tonlarda tutulur. */
:root {
    --bg: #0a0f1a;
    --panel: #0f172a;
    --panel-2: #111d33;
    --border: #1e293b;
    --text: #f1f5f9;
    --muted: #94a3b8;
    --faint: #64748b;
    --accent: #f59e0b;
    --accent-warm: #f59e0b;
    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, "Segoe UI", sans-serif;
    color-scheme: dark;
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
        --bg: #f8fafc;
        --panel: #ffffff;
        --panel-2: #f1f5f9;
        --border: #e2e8f0;
        --text: #0f172a;
        --muted: #475569;
        --faint: #94a3b8;
        color-scheme: light;
    }
}

:root[data-theme="light"] {
    --bg: #f8fafc;
    --panel: #ffffff;
    --panel-2: #f1f5f9;
    --border: #e2e8f0;
    --text: #0f172a;
    --muted: #475569;
    --faint: #94a3b8;
    color-scheme: light;
}

:root[data-theme="dark"] {
    color-scheme: dark;
}

/* İnce tane doku — kullanan öğeye position:relative olmalı. ::after kullanılıyor
   ki elemanın kendi ::before'unu (varsa) ezmesin. */
.grain { position: relative; isolation: isolate; }
.grain::after {
    content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1;
    opacity: .35; mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.grain > * { position: relative; z-index: 2; }

.theme-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border);
    background: var(--panel); color: var(--muted); cursor: pointer; flex-shrink: 0;
}
.theme-toggle svg { width: 17px; height: 17px; }

.pw-wrap { position: relative; display: flex; align-items: center; }
.pw-wrap input[type="password"], .pw-wrap input[type="text"] { padding-right: 2.7rem; }
.pw-toggle {
    position: absolute; right: .35rem; top: 0; bottom: 0; margin: auto 0;
    width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
    background: none; border: none; cursor: pointer; padding: 0;
    font-size: 1.25rem; line-height: 1; border-radius: 8px;
}
.pw-toggle:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: block; }
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) .theme-toggle .icon-moon { display: none; }
    :root:not([data-theme="dark"]) .theme-toggle .icon-sun { display: block; }
}
