/* კაუკასუს არქივი — caucasusauto.com სტილში */
:root {
  --navy: #0a1e3c;
  --navy2: #12294d;
  --accent: #f5a623;
  --accent2: #ff8a00;
  --ink: #1a1d21;
  --muted: #6f737a;
  --line: #e4e7ec;
  --soft: #f4f6f9;
  --card: #ffffff;
  --ok: #067647;
  --bad: #b42318;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(10, 30, 60, .08);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Sylfaen", "Noto Sans Georgian", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--soft);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 22px; width: 100%; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 13px; }
.error { color: var(--bad); font-size: 13px; min-height: 18px; margin: 6px 0; }

/* header */
.top { background: linear-gradient(120deg, var(--navy) 60%, var(--navy2)); color: #fff; position: sticky; top: 0; z-index: 30; box-shadow: 0 2px 18px rgba(0,0,0,.25); }
.bar { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; }
.logo { width: 34px; height: 34px; color: var(--accent); }
.brand-name { font-weight: 800; font-size: 19px; letter-spacing: .01em; }
.brand-sub { font-size: 12px; opacity: .75; }
.topnav { display: flex; align-items: center; gap: 10px; }
.me { font-size: 13px; opacity: .85; margin-right: 4px; }

main { flex: 1; padding: 26px 0 40px; }

/* cards */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; margin-bottom: 22px; }
.card h2 { margin: 0 0 14px; font-size: 17px; color: var(--navy); }
.card h3 { font-size: 14px; color: var(--navy); margin: 18px 0 8px; }

/* login */
.login-card { max-width: 420px; margin: 60px auto; }
.login-card h1 { color: var(--navy); margin: 0 0 4px; font-size: 24px; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
label.row { display: flex; align-items: center; gap: 8px; color: var(--ink); }
input[type="text"], input[type="password"], input:not([type]), input[type="datetime-local"] {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px;
  font-size: 14px; margin-top: 5px; font-family: inherit; background: #fbfcfe;
}
input:focus { outline: 2px solid rgba(245,166,35,.4); border-color: var(--accent); }

/* buttons */
.btn {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  padding: 10px 18px; border-radius: 9px; font-size: 14px; cursor: pointer;
  font-family: inherit; transition: all .15s;
}
.btn:hover { border-color: var(--accent); color: var(--accent2); }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy2); color: #fff; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--navy); font-weight: 700; }
.btn.accent:hover { background: var(--accent2); color: #fff; }
.btn.ghost { background: transparent; color: inherit; border-color: rgba(255,255,255,.3); }
.top .btn.ghost:hover { border-color: #fff; color: #fff; }
.btn.big { width: 100%; padding: 12px; font-size: 15px; }
.btn.small { padding: 5px 12px; font-size: 12px; }
.navbtn { background: none; border: none; color: rgba(255,255,255,.8); font-size: 14px; padding: 8px 10px; cursor: pointer; border-bottom: 2px solid transparent; font-family: inherit; }
.navbtn.active { color: #fff; border-bottom-color: var(--accent); }
.btn.danger { color: var(--bad); border-color: #f2c1bd; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 22px; }
.step { background: var(--card); border-radius: var(--radius); padding: 14px 16px; display: flex; gap: 12px; align-items: center; box-shadow: var(--shadow); }
.stepnum { font-size: 22px; font-weight: 800; color: var(--accent); }
.step b { display: block; font-size: 14px; color: var(--navy); }
.step small { color: var(--muted); }

.grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 22px; }
@media (max-width: 900px) { .grid { grid-template-columns: 1fr; } }

/* lists */
.list { display: flex; flex-direction: column; gap: 8px; }
.item { border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 8px; transition: border-color .15s; background: #fff; }
.item:hover { border-color: var(--accent); }
.item.sel { border-color: var(--navy); background: #f0f5ff; }
.item b { font-size: 14px; }
.item .sub { font-size: 12px; color: var(--muted); }
.badge { font-size: 11px; padding: 3px 9px; border-radius: 20px; background: var(--soft); color: var(--muted); white-space: nowrap; }
.badge.on { background: #e7f6ec; color: var(--ok); }
.badge.off { background: #fdecea; color: var(--bad); }

/* channels */
.chgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 8px; }
.ch { border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; cursor: pointer; font-size: 12px; background: #fff; text-align: left; font-family: inherit; }
.ch:hover { border-color: var(--accent); }
.ch.sel { border-color: var(--navy); background: #f0f5ff; }
.ch .d { font-weight: 700; color: var(--navy); font-size: 13px; }
.ch .nm { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; }
.dot.on { background: var(--ok); }
.dot.off { background: var(--bad); }

/* time row */
.timerow { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.timerow label { flex: 1; min-width: 200px; margin-bottom: 0; }
.quickrow { margin-top: 12px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* segments */
.segments { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.seg { display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; flex-wrap: wrap; }
.seg .times { font-variant-numeric: tabular-nums; font-size: 13px; }
.seg .btns { display: flex; gap: 8px; }

/* player */
.playerwrap { background: #000; border-radius: 10px; overflow: hidden; margin-bottom: 14px; }
video { width: 100%; max-height: 520px; display: block; }
.trimrow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.trimrow input { max-width: 220px; }

/* admin */
.audit { max-height: 480px; overflow: auto; font-size: 12px; display: flex; flex-direction: column; gap: 4px; }
.audit .rowline { display: flex; gap: 8px; border-bottom: 1px solid var(--soft); padding: 5px 0; }
.audit .ts { color: var(--muted); white-space: nowrap; }
.audit .act { font-weight: 700; color: var(--navy); white-space: nowrap; }
.accrow { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.accrow select { padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; font-family: inherit; }

#discover-row { margin-bottom: 18px; display: flex; gap: 12px; align-items: center; }

/* footer */
.foot { background: var(--navy); color: rgba(255,255,255,.65); padding: 18px 0; font-size: 13px; margin-top: auto; }

/* toast */
#toast { position: fixed; bottom: 24px; right: 24px; background: var(--navy); color: #fff; padding: 12px 20px; border-radius: 10px; box-shadow: 0 8px 30px rgba(0,0,0,.3); font-size: 14px; z-index: 99; }

/* მობილური */
@media (max-width: 640px) {
  .wrap { padding: 0 12px; }
  .bar { min-height: 60px; gap: 8px; }
  .brand-name { font-size: 16px; }
  .brand-sub { display: none; }
  .logo { width: 28px; height: 28px; }
  .me { display: none; }
  .navbtn { font-size: 13px; padding: 6px 6px; }
  .btn { padding: 9px 13px; font-size: 13px; }
  main { padding: 14px 0 28px; }
  .card { padding: 14px 14px; margin-bottom: 14px; border-radius: 11px; }
  .steps { grid-template-columns: 1fr; gap: 8px; margin-bottom: 14px; }
  .step { padding: 10px 12px; }
  .chgrid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
  .ch { padding: 6px 8px; }
  .timerow { gap: 8px; }
  .timerow label { min-width: 0; flex: 1 1 100%; }
  .trimrow input { max-width: none; flex: 1; }
  .seg { padding: 8px 10px; }
  .seg .btns { width: 100%; }
  .seg .btns .btn { flex: 1; }
  video { max-height: 300px; }
  .login-card { margin: 24px auto; padding: 18px; }
  #toast { left: 12px; right: 12px; bottom: 12px; text-align: center; }
}
