/* Volta — միակ ոճի ֆայլը (կայք + ադմին)։ Գույները/ֆոնտը՝ ՄԻԱՅՆ այստեղի :root-ից։ Տես DESIGN.md */
:root {
  --font: "Noto Sans Armenian", system-ui, sans-serif;
  --accent: #2F5BEA;
  --accent-dark: #2347C4;
  --accent-soft: #EEF2FE;
  --ink: #111827;
  --muted: #6B7280;
  --line: #E5E7EB;
  --bg: #F6F7F9;
  --surface: #FFFFFF;
  --sale: #E5484D;
  --ok: #16A34A;
  --r: 10px;
  --r-card: 14px;
  --shadow: 0 1px 3px rgba(17, 24, 39, .06), 0 1px 2px rgba(17, 24, 39, .04);
  --shadow-lg: 0 20px 50px rgba(17, 24, 39, .18);
  --wrap: 1240px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0 0 12px; line-height: 1.25; font-weight: 700; }
h1 { font-size: 28px; } h2 { font-size: 22px; } h3 { font-size: 18px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

/* Կոճակներ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 15px var(--font); cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-danger { color: var(--sale); }
.btn-danger:hover { border-color: var(--sale); color: var(--sale); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }

/* Դաշտեր */
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.input, select.input, textarea.input { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink); font: 400 15px var(--font); }
textarea.input { height: auto; min-height: 110px; padding: 10px 12px; resize: vertical; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* Քարտեր, պիտակներ, ծանուցումներ */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 20px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; color: var(--ink); }
.chip.is-on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--accent-soft); color: var(--accent); }
.tag-sale { background: var(--sale); color: #fff; }
.tag-ok { background: transparent; color: var(--ok); padding: 0; }
.alert { padding: 12px 14px; border-radius: var(--r); font-size: 14px; border: 1px solid var(--line); background: var(--surface); }
.alert-error { border-color: var(--sale); color: var(--sale); }
.alert-ok { border-color: var(--ok); color: var(--ok); }
.price { font-weight: 700; color: var(--ink); }
.price-old { color: var(--muted); text-decoration: line-through; font-weight: 400; font-size: 13px; }

/* Լոգո (ժամանակավոր) */
.logo { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 700; font-size: 22px; letter-spacing: .3px; }
.logo-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 17px; }
.logo-text { font-weight: 700; font-size: 24px; color: var(--accent); margin-bottom: 14px; }

/* Մուտքի/տեղադրման էջ */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-lg); padding: 28px; }

/* Կայքի վերնամաս */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); font-size: 13px; }
.topbar .wrap { display: flex; align-items: center; gap: 18px; height: 38px; overflow-x: auto; white-space: nowrap; }
.topbar a { color: var(--muted); }
.topbar a:hover { color: var(--accent); }
.header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header .wrap { display: flex; align-items: center; gap: 16px; height: 68px; }
.search { flex: 1; display: flex; }
.search .input { border-radius: var(--r) 0 0 var(--r); }
.search .btn { border-radius: 0 var(--r) var(--r) 0; }
.header-icons { display: flex; gap: 6px; }
.icon-btn { position: relative; width: 44px; height: 44px; border-radius: var(--r); display: inline-flex; align-items: center; justify-content: center; color: var(--ink); border: 1px solid transparent; }
.icon-btn:hover { background: var(--accent-soft); color: var(--accent); }
.icon-btn .count { position: absolute; top: 4px; right: 4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center; }
.catbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.catbar .wrap { display: flex; gap: 4px; overflow-x: auto; }
.catbar a { padding: 12px 12px; color: var(--ink); font-weight: 500; white-space: nowrap; border-bottom: 2px solid transparent; }
.catbar a:hover, .catbar a.is-on { color: var(--accent); border-bottom-color: var(--accent); }
.footer { margin-top: 48px; background: var(--surface); border-top: 1px solid var(--line); padding: 32px 0; font-size: 14px; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
.footer a { color: var(--muted); display: block; padding: 3px 0; }
.footer a:hover { color: var(--accent); }

/* Ցանցեր */
.section { margin-top: 32px; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.cat-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px 14px; text-align: center; color: var(--ink); font-weight: 600; transition: border-color .15s, box-shadow .15s; }
.cat-tile:hover { border-color: var(--accent); color: var(--accent); box-shadow: var(--shadow); }

/* Ադմին */
.admin { display: flex; min-height: 100vh; }
.admin-side { width: 240px; flex: none; background: var(--surface); border-right: 1px solid var(--line); padding: 18px 12px; }
.admin-side a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r); color: var(--ink); font-weight: 500; }
.admin-side a:hover { background: var(--bg); }
.admin-side a.is-on { background: var(--accent-soft); color: var(--accent); }
.admin-main { flex: 1; min-width: 0; padding: 24px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; }
.table th { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--bg); }
.table tr:last-child td { border-bottom: none; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.stat b { display: block; font-size: 26px; }

@media (max-width: 800px) {
  .admin { flex-direction: column; }
  .admin-side { width: auto; display: flex; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--line); padding: 8px; }
  .admin-side a { white-space: nowrap; }
  .admin-main { padding: 16px; }
  .header .wrap { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; }
  .search { order: 3; flex-basis: 100%; }
}
