/* ============ QR Menü — Admin Panel ============ */
*{margin:0;padding:0;box-sizing:border-box}
:root{--p:#c8962b;--p2:#e6b34d;--bg:#0d0c0a;--surface:#17150f;--card:#1f1c15;
    --text:#f2ede3;--muted:#9a9182;--line:rgba(255,255,255,.08);--ok:#3fb950;--err:#f85149;
    --grad:linear-gradient(100deg,var(--p),var(--p2))}
body{font-family:-apple-system,'Segoe UI',Roboto,Arial,sans-serif;background:var(--bg);color:var(--text);line-height:1.55}
a{color:inherit;text-decoration:none}
input,select,textarea,button{font-family:inherit;font-size:15px}

/* Giriş */
.login-body{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:20px;
    background:radial-gradient(1000px 500px at 50% -10%,#241f18,var(--bg))}
.login-card{width:100%;max-width:400px;background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:36px;box-shadow:0 30px 80px rgba(0,0,0,.5)}
.login-brand{font-size:24px;font-weight:800;text-align:center;background:var(--grad);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
.login-sub{text-align:center;color:var(--muted);margin:6px 0 24px;font-size:14px}
.login-card label{display:block;font-size:13px;color:var(--muted);margin:14px 0 6px}
.login-card input{width:100%;padding:12px 14px;border-radius:11px;border:1px solid var(--line);background:#000;color:var(--text)}
.login-card input:focus{outline:none;border-color:var(--p)}
.login-back{display:block;text-align:center;color:var(--muted);font-size:13px;margin-top:18px}

/* Layout */
.admin-wrap{display:flex;min-height:100vh}
.sidebar{width:240px;flex-shrink:0;background:var(--surface);border-right:1px solid var(--line);
    display:flex;flex-direction:column;padding:22px 16px;position:fixed;top:0;bottom:0;left:0;z-index:50;transition:transform .25s}
.brand{font-size:19px;font-weight:800;padding:0 8px 20px;line-height:1.1}
.brand span{display:block;font-size:11px;color:var(--muted);font-weight:600;letter-spacing:1px;text-transform:uppercase;margin-top:2px}
.side-nav{display:flex;flex-direction:column;gap:4px}
.side-nav a{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:11px;color:var(--muted);font-weight:600;font-size:14px;transition:.15s}
.side-nav a .ic{width:20px;text-align:center;font-size:15px}
.side-nav a:hover{background:rgba(255,255,255,.05);color:var(--text)}
.side-nav a.active{background:var(--grad);color:#1a1408}
.side-nav .ext{margin-top:12px;border-top:1px solid var(--line);padding-top:18px}
.side-nav .logout{color:#ff9d96}

.content{flex:1;margin-left:240px;min-width:0}
.topbar{display:flex;align-items:center;gap:14px;padding:18px 26px;border-bottom:1px solid var(--line);position:sticky;top:0;background:rgba(13,12,10,.9);backdrop-filter:blur(10px);z-index:30}
.topbar h1{font-size:20px;font-weight:700;flex:1}
.topbar-user{font-size:13px;color:var(--muted)}
.hamburger{display:none;font-size:22px;cursor:pointer;padding:2px 8px}
.content-inner{padding:26px}

.flash{margin:16px 26px 0;padding:13px 16px;border-radius:11px;font-size:14px;font-weight:600}
.flash.success{background:rgba(63,185,80,.14);color:#7ee787;border:1px solid rgba(63,185,80,.3)}
.flash.error{background:rgba(248,81,73,.14);color:#ff9d96;border:1px solid rgba(248,81,73,.3)}

/* Kartlar/istatistik */
.stat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:16px;margin-bottom:22px}
.stat-card{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:22px;display:flex;flex-direction:column;gap:6px;transition:.2s}
.stat-card:hover{transform:translateY(-3px);border-color:rgba(230,179,77,.4)}
.stat-ic{font-size:22px}
.stat-num{font-size:32px;font-weight:800}
.stat-label{font-size:13px;color:var(--muted)}
.quick-actions{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:24px}

/* Butonlar */
.btn-primary{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:var(--grad);color:#1a1408;
    border:none;padding:12px 22px;border-radius:11px;font-weight:700;cursor:pointer;transition:.2s}
.btn-primary:hover{transform:translateY(-2px);filter:brightness(1.06)}
.btn-ghost{display:inline-flex;align-items:center;gap:8px;background:rgba(255,255,255,.05);border:1px solid var(--line);
    color:var(--text);padding:12px 22px;border-radius:11px;font-weight:600;cursor:pointer;transition:.2s}
.btn-ghost:hover{background:rgba(255,255,255,.1)}

/* Panel & tablo */
.panel{background:var(--surface);border:1px solid var(--line);border-radius:16px;overflow:hidden;margin-bottom:20px}
.panel-head{padding:18px 20px;border-bottom:1px solid var(--line)}
.panel-head h2{font-size:17px}
.panel-actions{display:flex;gap:12px;align-items:center;margin-bottom:18px;flex-wrap:wrap}
.filter-form{margin-left:auto}
.filter-form select{background:var(--surface);border:1px solid var(--line);color:var(--text);padding:10px 14px;border-radius:11px}
.table-scroll{overflow-x:auto}
.data-table{width:100%;border-collapse:collapse;min-width:560px}
.data-table th{text-align:left;font-size:12px;text-transform:uppercase;letter-spacing:.5px;color:var(--muted);padding:14px 16px;border-bottom:1px solid var(--line)}
.data-table td{padding:12px 16px;border-bottom:1px solid var(--line);font-size:14px;vertical-align:middle}
.data-table tr:last-child td{border-bottom:none}
.data-table tr:hover td{background:rgba(255,255,255,.02)}
.muted{color:var(--muted)}
.thumb{width:46px;height:46px;border-radius:10px;object-fit:cover}
.thumb-emoji{display:inline-flex;align-items:center;justify-content:center;background:rgba(255,255,255,.06);font-size:20px}
.pill{font-size:12px;font-weight:700;padding:4px 11px;border-radius:50px}
.pill.on{background:rgba(63,185,80,.15);color:#7ee787}
.pill.off{background:rgba(255,255,255,.08);color:var(--muted)}
.actions{display:flex;gap:8px;white-space:nowrap}
.mini-btn{background:rgba(255,255,255,.06);border:1px solid var(--line);padding:7px 13px;border-radius:9px;font-size:13px;font-weight:600;transition:.15s}
.mini-btn:hover{background:rgba(255,255,255,.12)}
.mini-btn.danger{color:#ff9d96}
.mini-btn.danger:hover{background:rgba(248,81,73,.15)}

/* Formlar */
.form-card{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:24px;max-width:860px}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.form-grid-5{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:12px}
.form-group{margin-bottom:16px}
.form-group label{display:block;font-size:13px;color:var(--muted);margin-bottom:6px}
.form-group label small{color:var(--p2);font-weight:400}
.form-group input,.form-group select,.form-group textarea{width:100%;padding:12px 14px;border-radius:11px;border:1px solid var(--line);background:#000;color:var(--text)}
.form-group input:focus,.form-group select:focus,.form-group textarea:focus{outline:none;border-color:var(--p)}
.form-group input[type=file]{padding:9px;font-size:13px}
.form-group input[type=color]{padding:4px;height:46px;cursor:pointer}
.switch{display:flex;align-items:center;gap:10px;font-size:14px;color:var(--text);cursor:pointer;margin:8px 0}
.switch input{width:auto}
.switch.small{font-size:13px;color:var(--muted)}
.toggles{display:flex;flex-direction:column;gap:0;justify-content:center}
.fieldset{border:1px solid var(--line);border-radius:14px;padding:18px;margin:16px 0}
.fieldset legend{padding:0 10px;font-size:13px;color:var(--p2);font-weight:700}
.form-actions{display:flex;gap:12px;margin-top:20px}
.form-actions.sticky{position:sticky;bottom:0;background:var(--surface);padding-top:16px;border-top:1px solid var(--line)}
.current-media{margin-top:10px}
.current-media img,.current-media video{max-height:120px;border-radius:10px;border:1px solid var(--line)}

/* AI kutusu */
.ai-box{background:linear-gradient(135deg,rgba(200,150,43,.1),rgba(230,179,77,.04));border:1px solid rgba(230,179,77,.3);border-radius:14px;padding:18px;margin:16px 0}
.ai-head{display:flex;align-items:center;gap:16px;justify-content:space-between;flex-wrap:wrap}
.ai-head strong{font-size:15px}
.ai-head p{font-size:13px;color:var(--muted);margin-top:2px;max-width:440px}
.btn-ai{background:var(--grad);color:#1a1408;border:none;padding:12px 20px;border-radius:11px;font-weight:700;cursor:pointer;white-space:nowrap;transition:.2s}
.btn-ai:hover{transform:translateY(-2px);filter:brightness(1.06)}
.btn-ai:disabled{opacity:.6;cursor:wait}
.ai-status{font-size:13px;margin-top:10px;min-height:18px}
.ai-status.ok{color:#7ee787}
.ai-status.err{color:#ff9d96}

/* Tema ayarları */
.tabs{display:flex;gap:6px;border-bottom:1px solid var(--line);margin-bottom:22px;overflow-x:auto}
.tab{background:none;border:none;color:var(--muted);padding:12px 16px;font-weight:600;cursor:pointer;border-bottom:2px solid transparent;white-space:nowrap}
.tab.active{color:var(--p2);border-bottom-color:var(--p2)}
.tab-panel{display:none}
.tab-panel.active{display:block;animation:fade .3s}
@keyframes fade{from{opacity:0}to{opacity:1}}
.hint-block{color:var(--muted);font-size:14px;margin-bottom:16px}
.preset-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:12px;margin-bottom:22px}
.preset{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:12px;cursor:pointer;transition:.2s;display:flex;flex-direction:column;gap:8px;align-items:flex-start}
.preset:hover{border-color:var(--p2);transform:translateY(-2px)}
.preset.preset-featured{border-color:#b9793a;box-shadow:0 0 0 1px rgba(185,121,58,.35)}
.preset.preset-featured .preset-name{color:#e8b985}
.preset-swatch{width:100%;height:26px;border-radius:7px}
.preset-bg{width:100%;height:12px;border-radius:6px;border:1px solid var(--line)}
.preset-name{font-size:12px;color:var(--muted);font-weight:600}
.color-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:14px}
.color-field label{display:block;font-size:12px;color:var(--muted);margin-bottom:6px}
.color-field input{width:100%;height:46px;border:1px solid var(--line);border-radius:11px;padding:4px;background:#000;cursor:pointer}
.theme-preview{margin-top:24px}
.tp-card{border-radius:16px;padding:24px;text-align:center;transition:.3s}
.tp-title{font-size:20px;font-weight:800;display:block}
.tp-muted{font-size:14px;margin:8px 0 16px}
.tp-btn{display:inline-block;padding:12px 26px;border-radius:50px;font-weight:700}

/* Mobil */
.nav-toggle-cb:checked ~ .sidebar{transform:translateX(0)}
@media(max-width:860px){
    .sidebar{transform:translateX(-100%)}
    .content{margin-left:0}
    .hamburger{display:block}
    .form-row{grid-template-columns:1fr}
    .nav-toggle-cb:checked ~ .content::before{content:"";position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:40}
}
