/* მართვის პანელი — სტილები */
:root{ --ink:#23262C; --ink2:#2B2E34; --red:#A11F17; --red-d:#861812; --red-t:#FBEBE9;
  --steel:#6A7180; --paper:#F4F5F7; --line:#E4E6EB; --ok:#1f7a4d; --err:#b3261e; }
*{ box-sizing:border-box; }
body{ margin:0; font-family:"Noto Sans Georgian",system-ui,sans-serif; background:var(--paper);
  color:var(--ink); font-size:15px; line-height:1.55; }
a{ color:var(--ink); text-decoration:none; }
h1,h2,h3{ margin:0 0 .4em; }
.admin{ display:flex; min-height:100vh; }
.side{ width:230px; flex:0 0 230px; background:var(--ink2); color:#cdd2db; position:sticky; top:0; height:100vh;
  display:flex; flex-direction:column; }
.side .brand{ padding:22px 20px; border-bottom:1px solid rgba(255,255,255,.08); }
.side .brand strong{ color:#fff; font-size:1.05rem; display:block; }
.side .brand small{ color:#8b93a1; font-size:.76rem; }
.side nav{ padding:12px; flex:1; }
.side nav a{ display:flex; align-items:center; gap:10px; padding:11px 14px; border-radius:9px;
  color:#cdd2db; font-weight:500; margin-bottom:2px; }
.side nav a:hover{ background:rgba(255,255,255,.06); color:#fff; }
.side nav a.on{ background:var(--red); color:#fff; }
.side .foot{ padding:14px 18px; border-top:1px solid rgba(255,255,255,.08); font-size:.85rem; }
.side .foot a{ color:#8b93a1; display:block; margin-bottom:6px; }
.main{ flex:1; min-width:0; }
.top{ background:#fff; border-bottom:1px solid var(--line); padding:14px 26px; display:flex;
  align-items:center; justify-content:space-between; position:sticky; top:0; z-index:10; }
.top .menu{ display:none; background:none; border:0; font-size:1.4rem; cursor:pointer; }
.content{ padding:26px; max-width:1000px; }
.panel{ background:#fff; border:1px solid var(--line); border-radius:12px; padding:24px; margin-bottom:22px; }
.phead{ display:flex; align-items:center; justify-content:space-between; margin-bottom:18px; flex-wrap:wrap; gap:12px; }
.phead h2{ margin:0; font-size:1.3rem; }
.stat-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:16px; margin-bottom:24px; }
.stat{ background:#fff; border:1px solid var(--line); border-radius:12px; padding:20px; }
.stat .n{ font-size:2rem; font-weight:800; } .stat .l{ color:var(--steel); font-size:.85rem; }
.btn{ display:inline-flex; align-items:center; gap:7px; font-family:inherit; font-weight:600; font-size:.9rem;
  padding:10px 17px; border-radius:9px; border:1.5px solid transparent; cursor:pointer; transition:.15s; }
.btn--primary{ background:var(--red); color:#fff; } .btn--primary:hover{ background:var(--red-d); }
.btn--dark{ background:var(--ink2); color:#fff; }
.btn--ghost{ background:#fff; border-color:var(--line); color:var(--ink); } .btn--ghost:hover{ border-color:var(--ink); }
.btn--danger{ background:#fff; border-color:#f0c4c1; color:var(--err); } .btn--danger:hover{ background:#fbeae9; }
.btn--sm{ padding:7px 12px; font-size:.82rem; }
.table{ width:100%; border-collapse:collapse; }
.table th,.table td{ text-align:left; padding:12px 14px; border-bottom:1px solid var(--line); vertical-align:middle; }
.table th{ font-size:.76rem; text-transform:uppercase; letter-spacing:.05em; color:var(--steel); }
.table tr:hover td{ background:#fafbfc; }
.table .actions{ display:flex; gap:8px; justify-content:flex-end; }
.thumb{ width:64px; height:44px; object-fit:cover; border-radius:6px; background:var(--paper); }
.field{ margin-bottom:16px; } .field label{ display:block; font-weight:600; font-size:.86rem; margin-bottom:5px; }
.field input,.field textarea,.field select{ width:100%; padding:11px 13px; border:1.5px solid var(--line);
  border-radius:9px; font-family:inherit; font-size:.94rem; background:#fff; color:var(--ink); }
.field input:focus,.field textarea:focus{ outline:none; border-color:var(--red); box-shadow:0 0 0 3px var(--red-t); }
.field textarea{ min-height:120px; resize:vertical; } .field .hint{ color:var(--steel); font-size:.8rem; margin-top:4px; }
.row2{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.alert{ padding:12px 15px; border-radius:9px; margin-bottom:18px; font-size:.92rem; }
.alert--ok{ background:#e6f4ec; color:var(--ok); border:1px solid #bfe3cd; }
.alert--err{ background:#fbeae9; color:var(--err); border:1px solid #f3c9c6; }
.login{ min-height:100vh; display:grid; place-items:center; background:var(--ink2); padding:20px; }
.login .card{ background:#fff; border-radius:14px; padding:38px 34px; width:100%; max-width:380px; box-shadow:0 20px 60px rgba(0,0,0,.3); }
.login h1{ font-size:1.4rem; } .login p{ color:var(--steel); margin:0 0 22px; font-size:.9rem; }
@media (max-width:780px){ .side{ position:fixed; left:-230px; z-index:100; transition:.2s; } .side.open{ left:0; }
  .stat-grid{ grid-template-columns:repeat(2,1fr); } .row2{ grid-template-columns:1fr; } .top .menu{ display:block; } }

/* ---- ენების ტაბები ---- */
.tabs{ display:flex; gap:6px; margin:6px 0 16px; border-bottom:1px solid var(--line); padding-bottom:0; }
.tab{ background:none; border:0; border-bottom:2px solid transparent; padding:9px 14px; cursor:pointer;
  font-family:inherit; font-weight:600; font-size:.88rem; color:var(--steel); }
.tab:hover{ color:var(--ink); }
.tab.on{ color:var(--red); border-bottom-color:var(--red); }
.tabpane{ display:none; } .tabpane.on{ display:block; }
.pill{ display:inline-block; padding:2px 8px; border-radius:999px; font-size:.7rem; font-weight:700; margin-right:3px; }
.pill--on{ background:#e6f4ec; color:var(--ok); }
.pill--off{ background:#f0eee9; color:var(--steel); }

/* ---- ვიზუალური რედაქტორი ---- */
.rte-wrap{ border:1.5px solid var(--line); border-radius:10px; overflow:hidden; background:#fff; }
.rte-wrap:focus-within{ border-color:var(--red); box-shadow:0 0 0 3px var(--red-t); }
.rte-bar{ display:flex; flex-wrap:wrap; gap:2px; padding:7px 8px; background:#fafbfc;
  border-bottom:1px solid var(--line); align-items:center; }
.rte-b{ min-width:32px; height:30px; padding:0 8px; border:1px solid transparent; background:none;
  border-radius:6px; cursor:pointer; font-family:inherit; font-size:.85rem; color:var(--ink);
  display:inline-flex; align-items:center; justify-content:center; transition:.12s; }
.rte-b:hover{ background:#fff; border-color:var(--line); }
.rte-b:active,.rte-b.on{ background:var(--red); color:#fff; border-color:var(--red); }
.rte-sep{ width:1px; height:20px; background:var(--line); margin:0 5px; }
.rte{ min-height:220px; max-height:520px; overflow-y:auto; padding:16px 18px; outline:none;
  font-size:.98rem; line-height:1.7; }
.rte:empty::before{ content:'ტექსტი დაწერე აქ…'; color:#aab; }
.rte h2{ font-size:1.35rem; margin:.9em 0 .35em; } .rte h3{ font-size:1.12rem; margin:.8em 0 .3em; }
.rte p{ margin:0 0 .8em; } .rte ul,.rte ol{ padding-left:1.4em; margin:0 0 .8em; }
.rte blockquote{ margin:.9em 0; padding:10px 16px; border-left:3px solid var(--red);
  background:#fafbfc; color:#4A4F58; }
.rte a{ color:var(--red); text-decoration:underline; }
.rte img{ max-width:100%; border-radius:6px; }
.rte-src{ display:none !important; }
.src-on .rte{ display:none; }
.src-on .rte-src{ display:block !important; width:100%; border:0; border-radius:0; min-height:260px;
  font-family:ui-monospace,Menlo,Consolas,monospace; font-size:.85rem; padding:14px 16px; resize:vertical; }
.src-on .rte-src:focus{ outline:none; box-shadow:none; }
