/* ============================================================================
   ՀՊՏՀ · IT — «Paper & Signal» դիզայն
   Եզակի, ոչ-Jira տեսք. թղթե ֆոն + ազդանշանային (teal/amber) գույներ,
   «կտրոն» (ticket stub) քարտեր, հստակ բաժանված բացող/վերցնող դաշտեր։
   ========================================================================== */

:root {
  /* չափեր և տառատեսակ */
  --font: "Inter", "Noto Sans Armenian", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-num: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --radius: 14px;
  --radius-sm: 10px;

  /* լույս թեմա */
  --bg: #eef1f5;
  --bg-2: #e7ecf2;
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --surface-3: #eef2f8;
  --line: #e3e8ef;
  --line-strong: #cbd5e1;
  --ink: #0e1620;
  --ink-2: #475467;
  --ink-3: #77869a;
  --primary: #0f766e;
  --primary-2: #0d9488;
  --primary-ink: #ffffff;
  --primary-soft: #d8f3ef;
  --accent: #d97706;
  --accent-soft: #fef3c7;
  --violet: #6d5bd0;
  --violet-soft: #ece9fb;
  --danger: #b42318;
  --danger-soft: #fee4e2;
  --ok: #0f7a4e;
  --ok-soft: #dcf5e9;
  --warn: #92400e;
  --warn-soft: #fdf0c9;
  --mark: #ffe08a;
  --row-hover: #f2f7fb;
  --row-sel: #e2f4f1;

  /* վիճակների գույներ */
  --st-new: #d97706;
  --st-progress: #0e7490;
  --st-waiting: #6d5bd0;
  --st-confirm: #c2410c;
  --st-done: #0f7a4e;

  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 10px 26px -16px rgba(16, 24, 40, .35);
  --shadow-lg: 0 24px 60px rgba(13, 25, 40, .22);
  --ring: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
  --rail: linear-gradient(180deg, var(--primary), var(--accent));
  --dots: radial-gradient(circle at 1px 1px, rgba(15, 118, 110, .16) 1px, transparent 0);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1218;
    --bg-2: #0e1720;
    --surface: #131d26;
    --surface-2: #18242f;
    --surface-3: #1d2b38;
    --line: #25333f;
    --line-strong: #35475a;
    --ink: #e8eef5;
    --ink-2: #b3c0cf;
    --ink-3: #8494a6;
    --primary: #2dd4bf;
    --primary-2: #5eead4;
    --primary-ink: #04211d;
    --primary-soft: #123c39;
    --accent: #fbbf24;
    --accent-soft: #3a2b0c;
    --violet: #a99bff;
    --violet-soft: #262046;
    --danger: #f97066;
    --danger-soft: #3d1b19;
    --ok: #4ade80;
    --ok-soft: #102e1f;
    --warn: #fbbf24;
    --warn-soft: #33270d;
    --mark: #6b5a12;
    --row-hover: #17232e;
    --row-sel: #13332f;
    --st-new: #fbbf24;
    --st-progress: #38bdf8;
    --st-waiting: #a99bff;
    --st-confirm: #fb923c;
    --st-done: #4ade80;
    --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 12px 30px -18px rgba(0, 0, 0, .8);
    --shadow-lg: 0 28px 70px rgba(0, 0, 0, .6);
    --dots: radial-gradient(circle at 1px 1px, rgba(45, 212, 191, .13) 1px, transparent 0);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  background-color: var(--bg);
  color: var(--ink);
  font: 14.5px/1.5 var(--font);
  background-image:
    var(--dots),
    radial-gradient(900px 420px at 12% -160px, color-mix(in srgb, var(--primary) 16%, transparent), transparent 70%),
    radial-gradient(760px 380px at 92% -120px, color-mix(in srgb, var(--accent) 12%, transparent), transparent 72%);
  background-size: 22px 22px, auto, auto;
  background-attachment: fixed;
  min-height: 100dvh;
}
/* վերևի բարակ «ազդանշանի» գիծը՝ կայքի ստորագրությունը */
body::before {
  content: ""; position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60;
  background: linear-gradient(90deg, var(--primary), var(--primary-2) 40%, var(--accent) 100%);
  pointer-events: none;
}
@media (max-width: 760px) {
  body { background-attachment: scroll; background-size: 18px 18px, auto, auto; }
}
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
a { color: var(--primary); }
h1, h2, h3, h4 { letter-spacing: -.015em; }
::selection { background: color-mix(in srgb, var(--primary) 25%, transparent); }

/* ---------- առաջին էկրան (բեռնում) ---------- */
.boot { min-height: 55vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--ink-3); }
.boot-logo {
  width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center;
  background: var(--rail); color: #fff; font-weight: 800; letter-spacing: .5px;
  box-shadow: 0 12px 30px -10px color-mix(in srgb, var(--primary) 60%, transparent);
  animation: bootPulse 1.4s ease-in-out infinite;
}
.boot-text { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
@keyframes bootPulse { 50% { transform: translateY(-4px) scale(1.03); } }

/* ---------- վերևի գոտի ---------- */
.stickytop { position: sticky; top: 0; z-index: 30; background: var(--surface); box-shadow: 0 1px 0 var(--line); }
.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 10px 20px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px; min-width: 0; flex: 0 1 auto;
  cursor: pointer; border: 0; background: none; padding: 4px 8px 4px 2px; border-radius: 12px;
}
.brand:hover { background: var(--surface-2); }
.logo {
  width: 38px; height: 38px; border-radius: 13px; flex: none; position: relative;
  display: grid; place-items: center; background: var(--rail); color: #fff;
  font-weight: 800; font-size: 14px; letter-spacing: .06em;
  box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--primary) 70%, transparent);
}
.logo::after {
  content: ""; position: absolute; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); right: -2px; top: -2px; border: 2px solid var(--surface);
}
.brand-title { font-weight: 750; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-wrap { position: relative; flex: 1 1 460px; max-width: 720px; }
.search-wrap input {
  width: 100%; height: 42px; padding: 0 40px 0 42px; font-size: 14.5px;
  border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface-2);
  outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
}
.search-wrap input:focus { border-color: var(--primary); background: var(--surface); box-shadow: var(--ring); }
.search-wrap input::-webkit-search-cancel-button { display: none; }
.search-ico { position: absolute; left: 14px; top: 12px; width: 18px; height: 18px; fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-linecap: round; }
.search-clear {
  position: absolute; right: 8px; top: 8px; width: 26px; height: 26px; border: 0; border-radius: 50%;
  background: transparent; color: var(--ink-3); font-size: 20px; line-height: 1; cursor: pointer;
}
.search-clear:hover { background: var(--line); color: var(--ink); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.live { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: 12px; padding: 5px 9px; border-radius: 999px; background: var(--surface-2); }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.live.off::before { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.user-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; font-size: 14px; font-weight: 600;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer;
}
.user-chip:hover { border-color: var(--line-strong); background: var(--surface-2); }
.user-chip .avatar { width: 32px; height: 32px; font-size: 12px; }
.user-chip .role { font-size: 11px; padding: 2px 8px; }
.avatar {
  width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary); font-weight: 750; font-size: 12px; flex: none;
}
.avatar.lg { width: 38px; height: 38px; font-size: 13px; border-radius: 12px; }
.avatar.sm { width: 22px; height: 22px; font-size: 10px; border-radius: 7px; }
.avatar.group { background: var(--violet-soft); color: var(--violet); }
.role { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--line); color: var(--ink-2); }
.role.admin { background: var(--primary); color: var(--primary-ink); }
.role.editor { background: var(--ok-soft); color: var(--ok); }

.warnbar { padding: 9px 20px; background: var(--warn-soft); color: var(--warn); font-size: 13px; font-weight: 600; border-bottom: 1px solid var(--line); }

/* ---------- ներդիրներ (pills, ոչ թե ընդհատող գծեր) ---------- */
.tabs {
  display: flex; gap: 6px; padding: 8px 18px 9px; background: var(--surface); border-bottom: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: thin; -webkit-overflow-scrolling: touch;
}
.tab {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; border: 1px solid transparent;
  padding: 7px 13px; border-radius: 999px; background: transparent; font-size: 14px; font-weight: 650;
  color: var(--ink-2); cursor: pointer; transition: background .12s, color .12s, border-color .12s;
}
.tab:hover { background: var(--surface-2); color: var(--ink); }
.tab.active { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.tab.active .count { background: color-mix(in srgb, var(--surface) 25%, transparent); color: var(--surface); }
.tab .count { font-size: 11px; font-weight: 750; padding: 1px 7px; border-radius: 999px; background: var(--line); color: var(--ink-2); min-width: 19px; text-align: center; font-family: var(--font-num); }
.tab .count.hit { background: var(--accent); color: #3a2400; animation: pulse 1.8s ease-out infinite; }
.tab.add { color: var(--primary); }
.tab-sep { width: 1px; margin: 8px 4px; background: var(--line); flex: none; }
.tabs-right { position: sticky; right: 0; margin-left: auto; display: flex; gap: 4px; padding-left: 10px; background: var(--surface); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 70%, transparent); } 100% { box-shadow: 0 0 0 8px transparent; } }

/* ---------- գործիքների տող ---------- */
.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 9px 18px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.toolbar .spacer { flex: 1; }
.toolbar .info { color: var(--ink-3); font-size: 12.5px; white-space: nowrap; }
.filter {
  height: 32px; max-width: 210px; padding: 0 26px 0 10px; border: 1px solid var(--line-strong); border-radius: 9px;
  background: var(--surface); cursor: pointer;
}
.filter.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 650; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 33px; padding: 0 13px;
  border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); cursor: pointer; white-space: nowrap;
  font-weight: 600; transition: background .12s, border-color .12s, transform .08s;
}
.btn:hover { border-color: var(--ink-3); background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); box-shadow: 0 6px 16px -10px color-mix(in srgb, var(--primary) 90%, transparent); }
.btn.primary:hover { background: var(--primary-2); border-color: var(--primary-2); }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.btn.ok:hover { background: var(--ok-soft); }
.btn.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.btn.warn:hover { background: var(--warn-soft); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { height: 28px; padding: 0 9px; font-size: 12.5px; border-radius: 8px; }
.btn.lg { height: 42px; padding: 0 20px; font-size: 15px; border-radius: 11px; }
.btn.block { width: 100%; }
.btn.ico { width: 36px; padding: 0; }
.allstaff { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); color: var(--warn); background: var(--accent-soft); }
.allstaff:hover { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); border-color: var(--accent); }
.bulkbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 8px 18px; background: var(--primary-soft); border-bottom: 1px solid var(--line); color: var(--primary); font-weight: 650;
}
.bulkbar select, .bulkbar input { height: 30px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 0 8px; background: var(--surface); color: var(--ink); font-weight: 400; }

/* ---------- հիմնական բովանդակություն ---------- */
main { padding: 16px 18px 70px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.table-wrap { overflow: auto; max-height: calc(100vh - var(--stick, 160px) - 60px); border-radius: var(--radius); }
.group + .group { margin-top: 22px; }
.group-head { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; flex-wrap: wrap; }
.group-head h2 { margin: 0; font-size: 15px; }
.group-head .info { color: var(--ink-3); font-size: 12.5px; }
.group .table-wrap { max-height: none; overflow: visible; }
.group .table-wrap .grid th { top: var(--stick, 0px); }

/* ---------- աղյուսակ ---------- */
table.grid { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
.grid th, .grid td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.grid th {
  position: sticky; top: 0; z-index: 2; background: var(--surface-2); color: var(--ink-2); font-weight: 700; font-size: 11.5px;
  user-select: none; border-bottom: 1px solid var(--line-strong);
  white-space: normal; overflow-wrap: break-word; text-transform: uppercase; letter-spacing: .03em;
}
.grid th:hover { color: var(--ink); }
.grid th .sort { color: var(--primary); margin-left: 4px; }
.grid th.secret-col::after { content: " 🔒"; font-size: 11px; }
.grid td { white-space: nowrap; }
.grid th.tight, .grid td.tight { width: 1%; }
.grid td.tight { white-space: nowrap; max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
.grid td.wrap { white-space: normal; min-width: 90px; max-width: 190px; overflow-wrap: break-word; }
@media (max-width: 1500px) { table.grid { font-size: 12.5px; } .grid th, .grid td { padding: 6px 6px; } }
.grid tfoot td {
  position: sticky; bottom: 0; background: var(--surface-2); border-top: 2px solid var(--line-strong);
  font-weight: 700; color: var(--ink); white-space: nowrap;
}
.grid tbody tr:hover td { background: var(--row-hover); }
.grid tbody tr.sel td { background: var(--row-sel); }
.grid tbody tr.flash td { animation: flash 1.6s ease-out; }
@keyframes flash { from { background: var(--mark); } to { background: transparent; } }
.grid td.num, .grid th.num { width: 1%; white-space: nowrap; color: var(--ink-3); text-align: right; font-family: var(--font-num); }
.grid td.chk, .grid th.chk { width: 1%; padding-right: 4px; cursor: default; }
.grid td.empty { color: var(--ink-3); }
.grid td.editable { cursor: cell; }
.grid td.editing { padding: 3px 4px; background: var(--surface) !important; overflow: visible; }
.grid td.editing input, .grid td.editing select { width: 100%; min-width: 0; height: 28px; padding: 0 6px; border: 2px solid var(--primary); border-radius: 6px; background: var(--surface); outline: none; box-sizing: border-box; }
.rowbtn {
  border: 1px solid transparent; background: none; border-radius: 7px; padding: 1px 7px; color: var(--ink-3);
  cursor: pointer; font-variant-numeric: tabular-nums; font-family: var(--font-num);
}
.rowbtn:hover { border-color: var(--line-strong); color: var(--primary); background: var(--surface); }
mark { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 1px; }
.secret { font-family: var(--font-num); letter-spacing: 1px; color: var(--ink-3); }
.secret.shown { letter-spacing: 0; color: var(--warn); }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.pill.p0 { background: var(--surface-3); color: var(--ink-2); }
.pill.p1 { background: var(--ok-soft); color: var(--ok); }
.pill.p2 { background: var(--accent-soft); color: var(--warn); }
.pill.p3 { background: var(--primary-soft); color: var(--primary); }
.pill.st-new { background: var(--accent-soft); color: var(--warn); }
.pill.st-progress { background: var(--primary-soft); color: var(--primary); }
.pill.st-waiting { background: var(--violet-soft); color: var(--violet); }
.pill.st-confirm { background: color-mix(in srgb, var(--st-confirm) 16%, var(--surface)); color: var(--st-confirm); }
.pill.st-done { background: var(--ok-soft); color: var(--ok); }
.empty-state { padding: 56px 20px; text-align: center; color: var(--ink-3); }
.empty-state .big { font-size: 34px; margin-bottom: 8px; }
.hint { color: var(--ink-3); font-size: 12px; }
.mt-s { margin-top: 10px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.emp-form .form-actions, .ticket-form > .form-actions { justify-content: stretch; }
.ticket-form > .form-actions .btn { flex: 1 1 auto; }
.mono { font-family: var(--font-num); }
.board-wrap { max-width: 1200px; margin: 0 auto; }
.grid th.drag, .grid td.drag { width: 1%; padding: 7px 4px; }
.grid td.drag { cursor: grab; color: var(--ink-3); user-select: none; text-align: center; font-size: 14px; }
.grid td.drag:hover { color: var(--primary); }
.grid tr.drop-before td { box-shadow: inset 0 2px 0 0 var(--primary); }
.grid tr.drop-after td { box-shadow: inset 0 -2px 0 0 var(--primary); }
.ticket-stub.hl, .tcard.hl { animation: cardHl 1.2s ease-in-out 3; }
.toast.remind { border-left-width: 6px; }
.toast.remind .toast-msg { white-space: pre-line; }
.toast.remind.late { border-left-color: #d92d20; }

/* ---------- մուտքի էջ ---------- */
.landing { max-width: 1080px; margin: 0 auto; padding: 26px 0 20px; }
.land-hero { text-align: center; margin: 6px auto 26px; max-width: 740px; }
.land-hero h1 { margin: 0 0 8px; font-size: clamp(30px, 4.6vw, 46px); letter-spacing: -.04em; line-height: 1.1; }
.land-hero p { margin: 0; color: var(--ink-2); font-size: clamp(14px, 1.5vw, 16.5px); font-weight: 700; line-height: 1.45; }
.land-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
.land-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 26px; }
.help-card {
  overflow: hidden; color: #f4fffd; border: 0;
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(255, 255, 255, .18), transparent 55%),
    linear-gradient(150deg, #0b3b38 0%, #0f766e 55%, #14a89b 100%);
  box-shadow: 0 24px 50px -28px rgba(15, 118, 110, .9);
}
.help-card::after {
  content: ""; position: absolute; right: -70px; bottom: -70px; width: 240px; height: 240px; border-radius: 50%;
  border: 30px solid rgba(255, 255, 255, .08); pointer-events: none;
}
.help-card::before {
  content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 5px;
  background: linear-gradient(90deg, var(--accent), #ffd88a);
}
.hc-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .18); font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.hc-ico { position: absolute; top: 22px; right: 24px; width: 56px; height: 56px; display: grid; place-items: center; font-size: 28px; border-radius: 18px; background: rgba(255, 255, 255, .16); }
.help-card h2 { margin: 16px 0 8px; font-size: clamp(23px, 2.7vw, 30px); line-height: 1.18; padding-right: 70px; }
.hc-lead { margin: 0 0 18px; color: rgba(255, 255, 255, .9); line-height: 1.55; max-width: 500px; }
.hc-steps { list-style: none; counter-reset: st; margin: 0 0 22px; padding: 0; display: grid; gap: 10px; }
.hc-steps li { counter-increment: st; display: flex; align-items: center; gap: 12px; }
.hc-steps li > div { display: flex; flex-wrap: wrap; column-gap: 10px; }
.hc-steps li::before {
  content: counter(st); flex: none; width: 28px; height: 28px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent); color: #2a1a00; font-weight: 800; font-size: 13px;
}
.hc-steps b { font-weight: 700; }
.hc-steps span { color: rgba(255, 255, 255, .75); font-size: 13px; }
.hc-btns { display: flex; flex-wrap: wrap; gap: 10px; position: relative; z-index: 1; }
.help-card .btn.lg { height: 46px; padding: 0 20px; border-radius: 12px; font-size: 15px; }
.help-card .btn.primary { background: #fff; border-color: #fff; color: #0b3b38; }
.help-card .btn.primary:hover { background: #e9fffb; }
.help-card .btn:not(.primary) { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .4); color: #fff; }
.help-card .btn:not(.primary):hover { background: rgba(255, 255, 255, .24); }
.help-card .hint { color: rgba(255, 255, 255, .78); }
.login-card { display: flex; flex-direction: column; }
.lc-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.lc-ico { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; background: var(--primary-soft); }
.lc-head h2 { margin: 2px 0 4px; font-size: 19px; }
.lc-head p { margin: 0; color: var(--ink-3); font-size: 13px; line-height: 1.45; }
.login-card .field input { height: 46px; border-radius: 11px; }
.pw-wrap { position: relative; display: flex; }
.pw-wrap input { flex: 1; padding-right: 44px !important; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: none; cursor: pointer; border-radius: 9px; opacity: .7; }
.pw-eye:hover { opacity: 1; background: var(--surface-2); }
.login-card .btn.lg { height: 46px; border-radius: 11px; font-size: 15px; }
.lc-foot { margin: 14px 0 0; text-align: center; color: var(--ink-3); font-size: 12.5px; }
@media (max-width: 860px) {
  .landing { padding-top: 8px; }
  .land-grid { grid-template-columns: 1fr; }
  .land-card { padding: 20px 16px; }
  .hc-ico { width: 46px; height: 46px; font-size: 22px; top: 16px; right: 16px; }
  .hc-btns .btn { flex: 1 1 100%; }
  .hc-steps li > div { flex-direction: column; }
}

/* ---------- ձևեր ---------- */
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field label { font-size: 11.5px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em; }
.field input:not([type=checkbox]):not([type=radio]):not([type=file]), .field select, .field textarea, .input {
  height: 38px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--surface); outline: none; width: 100%; transition: border-color .12s, box-shadow .12s;
}
.field textarea { height: auto; min-height: 74px; padding: 9px 11px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--primary); box-shadow: var(--ring); }
.field.wide { grid-column: 1 / -1; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0 14px; }
.error { color: var(--danger); background: var(--danger-soft); padding: 9px 11px; border-radius: 10px; margin-bottom: 12px; font-size: 13px; font-weight: 550; }
.check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; white-space: nowrap; }
.check input { width: auto; height: auto; margin: 0; }
input[type=checkbox], input[type=radio] { accent-color: var(--primary); width: 16px; height: 16px; }
input[type=date], input[type=time] { font-family: var(--font-num); }
.role-sel { height: 30px; font-size: 12px; padding: 0 6px; }
.row-inline { display: flex; gap: 8px; }
.row-inline input { flex: 1; }
.date-edit { display: flex; align-items: center; gap: 4px; }
.date-edit input[type=date] { flex: 1; min-width: 118px; }
.cell-clear { flex: 0 0 auto; width: 24px; height: 28px; line-height: 1; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-3); border-radius: 6px; cursor: pointer; font-size: 12px; }
.cell-clear:hover { color: var(--danger); border-color: var(--danger); }
.row-order { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); flex-wrap: wrap; }

/* հայտի ձևի բաժինները */
.ticket-form { display: flex; flex-direction: column; gap: 14px; }
.form-sec { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px 4px; background: var(--surface); position: relative; }
.form-sec .fs-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.form-sec .fs-n {
  flex: none; width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center;
  background: var(--primary); color: var(--primary-ink); font-weight: 800; font-size: 13px; font-family: var(--font-num);
}
.form-sec h4 { margin: 0; font-size: 15px; }
.form-sec .fs-head .hint { margin: 1px 0 0; }
.sec-opener { background: color-mix(in srgb, var(--primary) 4%, var(--surface)); }
.sec-problem { background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.sec-assign { background: color-mix(in srgb, var(--violet) 4%, var(--surface)); }
.sec-assign .fs-n { background: var(--violet); }
.sec-problem .fs-n { background: var(--accent); color: #2a1a00; }

/* հանձնարարման ռեժիմներ */
.assign-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.assign-mode {
  display: flex; align-items: flex-start; gap: 9px; text-align: left; padding: 10px 12px; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); transition: border-color .12s, background .12s;
}
.assign-mode:hover { border-color: var(--line-strong); background: var(--surface-2); }
.assign-mode.on { border-color: var(--violet); background: var(--violet-soft); }
.am-ico { font-size: 17px; line-height: 1.2; }
.am-body { display: flex; flex-direction: column; min-width: 0; }
.am-body b { font-size: 13.5px; }
.am-hint { font-size: 11.5px; color: var(--ink-3); line-height: 1.35; }
.assign-pick { border: 1px dashed var(--line-strong); border-radius: 12px; padding: 10px; background: var(--surface); margin-bottom: 10px; }
.assign-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.staff-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2px 8px; max-height: 210px; overflow-y: auto; }
.staff-opt { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 9px; cursor: pointer; font-size: 13.5px; }
.staff-opt:hover { background: var(--surface-2); }
.staff-opt.on { background: var(--violet-soft); font-weight: 650; }
.assign-sum { display: flex; flex-wrap: wrap; gap: 6px; min-height: 24px; align-items: center; padding-bottom: 10px; }
.assign-row { display: flex; gap: 8px; align-items: center; }
.assign-row input { flex: 1; min-width: 0; }
.assign-note { margin-top: 6px; }

/* ---------- մոդալ ---------- */
.modal-bg {
  position: fixed; inset: 0; z-index: 100; background: rgba(9, 16, 24, .55); backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; overflow: auto;
  animation: fade .12s ease-out;
}
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 720px; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; }
.modal.wide { max-width: 940px; }
.modal.narrow { max-width: 460px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 15px 20px; border-bottom: 1px solid var(--line); background: var(--surface); }
.modal-head h3 { margin: 0; font-size: 16px; flex: 1; }
.modal-body { padding: 16px 20px; overflow-y: auto; }
.modal-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface-2); }
.modal-foot .spacer { flex: 1; }
.x { border: 0; background: none; font-size: 22px; line-height: 1; color: var(--ink-3); cursor: pointer; width: 32px; height: 32px; border-radius: 9px; }
.x:hover { background: var(--line); color: var(--ink); }
.kv { display: grid; grid-template-columns: minmax(130px, 210px) 1fr; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.kv > div { padding: 9px 12px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.kv > div:nth-last-child(-n+2) { border-bottom: 0; }
.kv .k { background: var(--surface-2); color: var(--ink-2); font-weight: 650; font-size: 12px; }
.meta { color: var(--ink-3); font-size: 12px; margin-top: 10px; }
.subtabs { display: flex; gap: 4px; margin: -2px 0 14px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.subtabs button { border: 0; background: none; padding: 9px 12px; border-bottom: 2px solid transparent; cursor: pointer; color: var(--ink-2); font-weight: 650; white-space: nowrap; }
.subtabs button.active { color: var(--primary); border-bottom-color: var(--primary); }

/* սյունակների խմբագրիչ */
.col-list { display: flex; flex-direction: column; gap: 6px; }
.col-item { display: grid; grid-template-columns: 1fr auto auto auto auto auto auto auto; gap: 8px; align-items: center; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.col-item input[type=text] { height: 32px; }
.col-item .col-type { height: 32px; width: auto; }
.col-item .col-opts { grid-column: 1 / -1; }
.col-item .check { font-size: 12px; color: var(--ink-2); }

/* ցանկեր */
.list { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.list-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .sub { color: var(--ink-3); font-size: 12px; }
.badge { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--surface-3); color: var(--ink-2); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.primary { background: var(--primary-soft); color: var(--primary); }
.secret-box { font-family: var(--font-num); font-size: 16px; padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); user-select: all; }
.creds-table { max-height: 50vh; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.creds-table td.mono { font-family: var(--font-num); }

/* պատմություն */
.hist { display: flex; flex-direction: column; gap: 8px; }
.hist-item { padding: 10px 14px; }
.hist-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hist-top .who { font-weight: 700; }
.hist-top .when { color: var(--ink-3); font-size: 12px; margin-left: auto; }
.hist-sum { margin-top: 3px; }
.changes { margin: 6px 0 0; padding: 0; list-style: none; font-size: 13px; }
.changes li { padding: 2px 0; }
.changes .lbl { color: var(--ink-2); font-weight: 650; }
.changes .from { color: var(--danger); text-decoration: line-through; }
.changes .to { color: var(--ok); }
.hist-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.hist-filter .input { flex: 1 1 320px; width: auto; }

/* վիճակագրություն */
.stats { display: flex; flex-direction: column; gap: 18px; max-width: 1200px; margin: 0 auto; }
.stats-head h1 { margin: 4px 0 2px; font-size: 21px; }
.stats-head .hint { font-size: 13px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.tile { position: relative; padding: 16px; overflow: hidden; border-top: 3px solid var(--primary); transition: transform .12s, box-shadow .12s; }
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.tile .ico { position: absolute; right: 12px; top: 12px; font-size: 20px; opacity: .35; }
.tile .lbl { color: var(--ink-2); font-size: 12px; font-weight: 650; padding-right: 26px; text-transform: uppercase; letter-spacing: .04em; }
.tile .val { font-size: 30px; font-weight: 750; letter-spacing: -.5px; margin-top: 4px; font-variant-numeric: tabular-nums; color: var(--primary); font-family: var(--font-num); }
.tile .sub { color: var(--ink-3); font-size: 12px; margin-top: 2px; }
.tile.warn { border-top-color: var(--danger); }
.tile.warn .val { color: var(--danger); }
.stat-card { padding: 16px 18px; }
.stat-card h3 { margin: 0 0 3px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.stat-card .desc { color: var(--ink-3); font-size: 12px; margin-bottom: 12px; }
table.st { border-collapse: collapse; width: 100%; font-size: 13px; font-variant-numeric: tabular-nums; }
.st th, .st td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.st th:first-child, .st td:first-child { text-align: left; }
.st th { color: var(--ink-2); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; background: var(--surface-2); position: sticky; top: 0; }
.st tbody tr:hover td { background: var(--row-hover); }
.st tfoot td { font-weight: 700; border-top: 2px solid var(--line-strong); background: var(--surface-2); }
.st td.zero { color: var(--line-strong); }
.st td.link { cursor: pointer; color: var(--primary); font-weight: 650; }
.st td.link:hover { text-decoration: underline; }
.st td.bar-cell, .st th.bar-h { text-align: left; min-width: 170px; }
.bar { display: flex; align-items: center; gap: 8px; }
.bar i { display: block; height: 11px; border-radius: 4px; min-width: 3px; background: linear-gradient(90deg, var(--primary), var(--accent)); }
.bar-cell.link { cursor: pointer; }
.bar span { min-width: 30px; text-align: right; font-weight: 700; }
.stat-scroll { overflow-x: auto; max-height: 70vh; }

/* ---------- գլխավոր էջ ---------- */
.home { max-width: 1200px; margin: 0 auto; }
.home-head { margin: 6px 0 14px; }
.home-head h1 { margin: 0 0 4px; font-size: 21px; }
.home-head .hint { font-size: 13px; max-width: 660px; }
.home-head.mt { margin-top: 26px; }
.helpdesk { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 18px; border-left: 4px solid var(--accent); }
.hd-text { min-width: 240px; flex: 1; }
.hd-title { font-weight: 750; margin-bottom: 2px; }
.hd-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.fac-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 14px; align-items: stretch; }
.fac-card { display: flex; flex-direction: column; gap: 8px; padding: 16px 16px 14px; cursor: pointer; -webkit-tap-highlight-color: transparent; border-top: 3px solid var(--primary); transition: border-color .12s, transform .12s, box-shadow .12s; }
.fac-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 10px 26px -16px rgba(16, 24, 40, .4); }
.fac-card:active { background: var(--surface-2); }
.fac-name { font-weight: 750; font-size: 15.5px; line-height: 1.25; }
.fac-total { display: flex; align-items: baseline; gap: 6px; }
.fac-total .num { font-size: 26px; font-weight: 800; letter-spacing: -.5px; font-variant-numeric: tabular-nums; color: var(--primary); font-family: var(--font-num); }
.fac-total .lbl { color: var(--ink-3); font-size: 12px; }
.fac-counts { display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; }
.fac-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: baseline; gap: 10px; }
.fac-open { color: var(--primary); font-size: 13px; font-weight: 650; }
.fac-link { margin-left: auto; font-size: 11px; color: var(--ink-3); text-decoration: none; }
.fac-link:hover { color: var(--primary); text-decoration: underline; }
.sheet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 14px; }
.sheet-card { display: flex; align-items: center; gap: 10px; padding: 14px 16px; min-height: 58px; cursor: pointer; transition: border-color .12s, transform .12s; }
.sheet-card:hover { border-color: var(--primary); transform: translateY(-1px); }
.sh-ico { font-size: 19px; }
.sh-name { font-weight: 650; min-width: 0; overflow-wrap: anywhere; }
.sh-eye { opacity: .6; font-size: 12px; }
.sh-n { margin-left: auto; font-size: 12px; font-weight: 750; padding: 2px 8px; border-radius: 999px; background: var(--surface-3); color: var(--ink-2); font-family: var(--font-num); }
.fac-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 2px 0 14px; }
.fac-head h1 { margin: 0; font-size: 21px; }
.sum-picks { display: flex; flex-wrap: wrap; gap: 6px 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.sum-out { max-height: 55vh; overflow: auto; }
.sum-table th { top: 0; }

/* ---------- հեռախոսի քարտեր ---------- */
.cards { display: flex; flex-direction: column; gap: 8px; }
.row-card { padding: 11px 13px; cursor: pointer; -webkit-tap-highlight-color: transparent; content-visibility: auto; contain-intrinsic-size: auto 120px; }
.row-card:active { background: var(--surface-2); }
.row-card.flash { animation: flash 1.6s ease-out; }
.rc-title { font-weight: 700; margin-bottom: 4px; overflow-wrap: anywhere; }
.rc-sub { color: var(--ink-3); font-size: 12px; margin: -2px 0 4px; }
.rc-fields { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.rc-f { display: flex; gap: 10px; }
.rc-k { flex: 0 0 43%; max-width: 130px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-v { flex: 1; overflow-wrap: anywhere; min-width: 0; }
.rc-more { margin-top: 4px; color: var(--primary); font-size: 12px; }
.tb-panel { display: flex; flex-wrap: wrap; gap: 8px; flex-basis: 100%; min-width: 0; padding-top: 4px; }
.tb-panel .filter { flex: 1 1 100%; max-width: none; min-width: 0; }
.preview-bar { display: flex; align-items: center; gap: 12px; justify-content: space-between; max-width: 860px; margin: 0 auto 6px; padding: 10px 14px; border-radius: 12px; background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 30%, var(--line)); color: var(--warn); font-weight: 650; font-size: 13.5px; flex-wrap: wrap; }

/* ---------- popover ---------- */
.popover { position: absolute; z-index: 60; min-width: 220px; max-height: 62vh; overflow: auto; padding: 8px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow-lg); }
.popover .item { display: flex; align-items: center; gap: 8px; padding: 8px 9px; border-radius: 8px; cursor: pointer; font-size: 13.5px; }
.popover .item:hover { background: var(--surface-2); }
.popover hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }

/* ---------- հայտերի հերթ (queue) ---------- */
.queue { max-width: 1100px; margin: 0 auto; }
.queue .q-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin: 4px 0 14px; }
.queue .q-head h1 { margin: 0 0 3px; font-size: 22px; }
.queue .q-head .hint { max-width: 560px; }
.q-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.q-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.q-kpi {
  display: flex; flex-direction: column; gap: 1px; padding: 12px 14px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.q-kpi::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--primary); }
.q-kpi b { font-size: 25px; font-family: var(--font-num); line-height: 1.1; }
.q-kpi span { font-size: 11.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; font-weight: 650; }
.q-kpi.hot::after { background: var(--accent); }
.q-kpi.hot b { color: var(--warn); }
.q-kpi.work::after { background: var(--st-progress); }
.q-kpi.mine::after { background: var(--violet); }
.q-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.q-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.q-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-weight: 650; font-size: 13px;
}
.q-chip:hover { border-color: var(--line-strong); background: var(--surface-2); }
.q-chip.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.q-chip.hasnew { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.q-n { font-family: var(--font-num); font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--surface-3); color: var(--ink-2); }
.q-chip.on .q-n { background: color-mix(in srgb, var(--surface) 22%, transparent); color: var(--surface); }
.q-search-wrap { margin-left: auto; display: flex; gap: 6px; align-items: center; flex: 1 1 260px; max-width: 420px; }
.q-search-wrap .input { height: 36px; }
.stub-list { display: flex; flex-direction: column; gap: 10px; }

/* «կտրոն» քարտը */
.ticket-stub {
  --st: var(--line-strong);
  position: relative; display: block; background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; padding: 13px 16px 12px 20px; cursor: pointer; box-shadow: var(--shadow);
  transition: border-color .12s, transform .12s, box-shadow .12s; content-visibility: auto; contain-intrinsic-size: auto 180px;
}
.ticket-stub:hover { border-color: var(--line-strong); transform: translateY(-1px); box-shadow: 0 12px 28px -18px rgba(16, 24, 40, .5); }
.ticket-stub:focus-visible { outline: none; box-shadow: var(--ring), var(--shadow); }
.ticket-stub .stub-rail { position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--st); border-radius: 16px 0 0 16px; }
.ticket-stub.st-new { --st: var(--st-new); }
.ticket-stub.st-progress { --st: var(--st-progress); }
.ticket-stub.st-waiting { --st: var(--st-waiting); }
.ticket-stub.st-confirm { --st: var(--st-confirm); }
.ticket-stub.st-done { --st: var(--st-done); }
.ticket-stub.prio-high { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--danger) 35%, transparent), var(--shadow); }
.ticket-stub.mine { background: color-mix(in srgb, var(--violet) 5%, var(--surface)); }
.ticket-stub.mine::after {
  content: "🎯 Ձերն է"; position: absolute; right: 14px; top: -1px; font-size: 10.5px; font-weight: 700;
  padding: 2px 8px; border-radius: 0 0 8px 8px; background: var(--violet); color: #fff; letter-spacing: .03em;
}
.stub-head { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; font-size: 12px; }
.stub-num { font-family: var(--font-num); font-weight: 750; color: var(--primary); background: var(--primary-soft); padding: 2px 8px; border-radius: 8px; letter-spacing: .02em; }
.stub-kind { color: var(--ink-3); font-weight: 600; }
.stub-fire { color: var(--danger); font-weight: 750; font-size: 11.5px; }
.stub-ago { color: var(--ink-3); font-size: 11.5px; white-space: nowrap; }
.stub-text { margin: 9px 0 0; font-size: 15.5px; line-height: 1.35; font-weight: 650; overflow-wrap: anywhere; }
.stub-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.stub-people {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; padding-top: 10px;
  border-top: 1px dashed var(--line-strong);
}
.stub-people.col { grid-template-columns: 1fr; }
.sp { display: flex; gap: 8px; align-items: flex-start; min-width: 0; }
.sp-ico { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); font-size: 14px; flex: none; }
.sp.taker.has .sp-ico { background: var(--ok-soft); }
.sp.taker.none .sp-ico { background: var(--warn-soft); }
.sp-body { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.sp-lbl { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 750; }
.sp-n { font-weight: 650; overflow-wrap: anywhere; }
.sp.taker.none .sp-n { color: var(--ink-3); font-weight: 500; }
.sp-sub { font-size: 11.5px; color: var(--ink-3); }
.stub-uc { margin-top: 8px; padding: 7px 9px; border-radius: 9px; background: var(--warn-soft); color: var(--ink-2); font-size: 12.5px; line-height: 1.4; }
.stub-uc b { color: var(--warn); }
.stub-res { display: inline-block; margin-top: 8px; font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.stub-res.solved { background: var(--ok-soft); color: var(--ok); }
.stub-res.unsolved { background: var(--warn-soft); color: var(--warn); }
.stub-acts { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); }
.stub-acts .btn { height: 28px; }
.stub-foot { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.ar-more { text-align: center; margin: 16px 0; }

/* հին ցուցակների ոճեր (արխիվ, պլան) */
.plist { display: flex; flex-direction: column; gap: 10px; }
.pticket { padding: 12px 14px; border-left: 4px solid var(--line-strong); }
.pticket.prio-high { border-left-color: var(--danger); }
.pticket.prio-normal { border-left-color: var(--primary); }
.pt-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; margin-bottom: 6px; }
.pt-text { font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; white-space: pre-wrap; }
.pt-foot { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.tc-num { font-weight: 750; color: var(--primary); font-family: var(--font-num); }
.tc-kind { color: var(--ink-3); }
.tc-when { color: var(--ink-3); font-size: 11.5px; }
.tc-res { display: inline-block; margin-top: 6px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.tc-res.solved { background: var(--ok-soft); color: var(--ok); }
.tc-res.unsolved { background: var(--warn-soft); color: var(--warn); }
.toolbar-inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.ar-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.ar-search { flex: 1 1 280px; height: 36px; }
.ar-stats { margin: 0 0 10px; font-size: 13px; }
.ar-item { cursor: pointer; }
.ar-item:hover { border-color: var(--primary); }

/* հայտի պատուհան */
.tstate { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: space-between; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; }
.tstate.done { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 25%, var(--line)); }
.tstate.new { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.ts-now, .ts-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ts-now .tc-res { margin-top: 0; }
.tpeople { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.tp-box { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface); position: relative; }
.tp-box.opener { border-left: 3px solid var(--primary); }
.tp-box.taker { border-left: 3px solid var(--violet); }
.tp-box.taker.has { border-left-color: var(--ok); background: color-mix(in srgb, var(--ok) 5%, var(--surface)); }
.tp-box.taker.none { border-left-color: var(--accent); }
.tp-h { display: flex; align-items: center; gap: 6px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); font-weight: 750; }
.tp-ico { font-size: 13px; }
.tp-name { font-weight: 700; font-size: 14.5px; margin-top: 3px; overflow-wrap: anywhere; }
.tp-box.taker.none .tp-name { color: var(--ink-3); font-weight: 500; }
.tp-sub { font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.tdesc { white-space: pre-wrap; background: var(--surface-2); border-radius: 10px; padding: 11px 13px; margin: 12px 0; font-size: 14px; overflow-wrap: anywhere; }
.ticket-audio { margin: 10px 0 12px; padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--line-strong); background: var(--surface-2); }
.ta-h { font-size: 11.5px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin-bottom: 6px; }
.tlog { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.tlog h4 { margin: 0 0 6px; font-size: 13px; color: var(--ink-2); }
.tlog-row { display: flex; gap: 8px; font-size: 12px; padding: 3px 0; color: var(--ink-2); flex-wrap: wrap; }
.tlog-when { color: var(--ink-3); white-space: nowrap; min-width: 90px; }
.tlog-by { font-weight: 650; white-space: nowrap; }
.uc-box { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: var(--ok-soft); border: 1px solid color-mix(in srgb, var(--ok) 25%, var(--line)); font-size: 13px; line-height: 1.5; }
.uc-box .uc-head { font-weight: 750; color: var(--ok); margin-bottom: 4px; }
.sent { text-align: center; padding: 8px 0 4px; }
.big-num { font-size: 42px; font-weight: 800; color: var(--primary); letter-spacing: -1px; font-family: var(--font-num); }
.track-out { margin-top: 10px; }

/* ---------- հայտի ձևը՝ կոմպակտ ---------- */
.modal.md { max-width: 760px; }
.modal.md .modal-body { padding: 14px 18px 10px; }
.ticket-form { gap: 10px; }
.form-sec { padding: 10px 14px 2px; }
.form-sec .fs-head { margin-bottom: 7px; gap: 8px; align-items: center; }
.form-sec .fs-n { width: 22px; height: 22px; border-radius: 7px; font-size: 12px; }
.form-sec h4 { font-size: 14px; }
.form-sec .field { margin-bottom: 8px; }
.form-sec .field label { font-size: 10.5px; }
.form-sec .field input:not([type=checkbox]):not([type=radio]), .form-sec .field select { height: 35px; }
.form-sec .field textarea { min-height: 58px; padding: 7px 10px; }
.ticket-form .form-grid { grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 0 10px; }
.form-sec .field.span2 { grid-column: span 2; }
.sec-opener, .sec-problem, .sec-place, .sec-assign { background: var(--surface); }
.sec-opener { background: color-mix(in srgb, var(--primary) 4%, var(--surface)); }
.sec-problem { background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.sec-place { background: color-mix(in srgb, var(--primary) 3%, var(--surface)); }
.sec-assign { background: color-mix(in srgb, var(--violet) 4%, var(--surface)); }
.sec-place .fs-n { background: var(--st-progress); }
.assign-modes { gap: 6px; margin-bottom: 8px; }
.assign-mode { padding: 7px 9px; border-radius: 10px; gap: 6px; align-items: center; }
.assign-mode .am-ico { font-size: 15px; }
.assign-mode b { font-size: 12.5px; font-weight: 650; line-height: 1.2; }
.assign-pick { padding: 8px; margin-bottom: 8px; }
.assign-tools { margin-bottom: 6px; }
.staff-pick { max-height: 150px; }
.assign-sum { padding-bottom: 6px; min-height: 20px; }
.ticket-form > .form-actions { margin-top: 2px; }

/* փակելիս՝ առաջարկվող տարբերակներ */
.note-sugg { display: flex; flex-wrap: wrap; gap: 5px; margin: -2px 0 10px; }
.chip { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink-2); font-size: 12px; cursor: pointer; }
.chip:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

/* հայտի պատմությունը՝ ամբողջը */
.tlog h4 { display: flex; align-items: center; gap: 8px; }
.tlog h4 .badge { margin-left: auto; }
.tlog-list { display: flex; flex-direction: column; gap: 2px; max-height: 260px; overflow-y: auto; padding-right: 4px; }
.tlog-row { display: flex; gap: 8px; font-size: 12px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.tlog-row:last-child { border-bottom: 0; }
.tlog-txt { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.reassign-note {
  display: flex; gap: 9px; align-items: flex-start; margin: 0 0 12px; padding: 9px 11px;
  border-radius: 12px; background: color-mix(in srgb, var(--violet) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--violet) 26%, var(--line)); font-size: 12.5px; line-height: 1.45;
}
.reassign-note b { color: var(--violet); }
.rn-ico { font-size: 16px; }

/* սեփական անունը */
.name-card { display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; margin-bottom: 14px; border-left: 4px solid var(--accent); }
.nc-ico { font-size: 22px; }
.nc-body { flex: 1; min-width: 0; }
.nc-row { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.nc-row input { flex: 1 1 220px; height: 38px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); min-width: 0; }
.name-card .error { flex-basis: 100%; margin: 6px 0 0; }

/* ---------- 👥 աշխատակիցների հաշիվների էջ ---------- */
.people { max-width: 1200px; margin: 0 auto; }
.people-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 12px; }
.people-head h1 { margin: 0 0 3px; font-size: 21px; }
.people-head .hint { max-width: 680px; }
.people-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px; }
.people-kpis { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.people-kpis .pk { display: flex; align-items: baseline; gap: 6px; padding: 8px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.people-kpis .pk b { font-size: 20px; font-family: var(--font-num); }
.people-kpis .pk span { font-size: 11.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; font-weight: 650; }
.people-kpis .pk.ok b { color: var(--ok); }
.people-kpis .pk.hot b { color: var(--warn); }
.people-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.people-bar .input { flex: 1 1 260px; height: 38px; max-width: 420px; }
.people-grid { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 14px; align-items: start; }
.people-list { display: flex; flex-direction: column; gap: 3px; max-height: calc(100dvh - 250px); overflow-y: auto; padding-right: 4px; }
.person-row {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; cursor: pointer;
  padding: 8px 9px; border: 1px solid transparent; border-radius: 11px; background: var(--surface);
}
.person-row:hover { background: var(--surface-2); border-color: var(--line); }
.person-row.on { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); }
.person-row.pending .avatar { background: var(--warn-soft); color: var(--warn); }
.pr-body { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.pr-name { font-weight: 650; font-size: 13.5px; }
.pr-sub { font-size: 11.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-badge { font-size: 10.5px; padding: 2px 7px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); white-space: nowrap; }
.pr-badge.ok { background: var(--surface-3); color: var(--ink-2); font-family: var(--font-num); }
.people-detail { padding: 18px 20px; position: sticky; top: calc(var(--stick, 120px) + 10px); }
.pd-head { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.pd-head h3 { margin: 0; font-size: 17px; }
.pd-head .spacer { flex: 1; }
.pd-form { margin-top: 12px; }
.pd-static { height: 38px; display: flex; align-items: center; padding: 0 10px; border-radius: 10px; background: var(--surface-2); border: 1px dashed var(--line-strong); color: var(--ink-2); font-size: 13px; }
.pd-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; align-items: center; }
.pd-actions .spacer { flex: 1; }

/* ---------- ծանուցումների ախտորոշում ---------- */
.push-diag { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.push-diag h4 { margin: 0 0 8px; font-size: 13.5px; }
.pd-row { display: flex; gap: 8px; justify-content: space-between; padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: 12.5px; }
.pd-row:last-of-type { border-bottom: 0; }
.pd-k { color: var(--ink-3); }
.pd-v { font-weight: 650; text-align: right; overflow-wrap: anywhere; }
.pd-v.ok { color: var(--ok); }
.pd-v.bad { color: var(--danger); }
.hint.bad { color: var(--danger); font-weight: 600; }
.pd-log { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.pd-log-row { font-family: var(--font-num); font-size: 11px; color: var(--ink-2); padding: 1px 0; }


.chat {
  display: grid; grid-template-columns: 320px minmax(0, 1fr); overflow: hidden;
  height: calc(100dvh - var(--stick, 120px) - 40px); min-height: 420px;
}
.chat-side { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: var(--surface-2); }
.chat-side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 12px 8px; }
.chat-side-head h2 { margin: 0; font-size: 16px; }
.chat-search { margin: 0 12px 8px; width: auto; }
.chat-list { flex: 1; overflow-y: auto; padding: 0 6px 10px; }
.chat-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 8px; border: 0; border-radius: 11px; background: none; cursor: pointer; text-align: left; }
.chat-item:hover { background: var(--row-hover); }
.chat-item.active { background: var(--primary-soft); }
.ci-body { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 2px; }
.ci-top, .ci-bottom { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ci-name { font-weight: 650; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci-time { font-size: 11px; color: var(--ink-3); white-space: nowrap; font-family: var(--font-num); }
.ci-prev { flex: 1; min-width: 0; font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-item.unread .ci-name, .chat-item.unread .ci-prev { color: var(--ink); font-weight: 700; }
.ci-badge { background: var(--primary); color: var(--primary-ink); font-size: 11px; font-weight: 750; border-radius: 999px; padding: 0 7px; min-width: 20px; text-align: center; }
.chat-sep { padding: 10px 8px 4px; font-size: 10.5px; font-weight: 750; color: var(--ink-3); text-transform: uppercase; text-align: center; letter-spacing: .06em; }
.chat-empty { padding: 30px 16px; text-align: center; color: var(--ink-3); font-size: 13px; line-height: 1.5; }
.chat-empty.big { margin: auto; }
.chat-empty .big { font-size: 40px; }
.chat-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); min-height: 58px; background: var(--surface); }
.chat-head:empty { display: none; }
.chat-head .spacer { flex: 1; }
.ch-title { min-width: 0; }
.ch-name { font-weight: 750; }
.ch-title .hint { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 56vw; }
.chat-back { display: none; font-size: 18px; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; background: var(--bg); overscroll-behavior: contain; }
.chat-day { align-self: center; margin: 12px 0 6px; padding: 2px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 11.5px; color: var(--ink-3); }
.chat-sys { align-self: center; margin: 6px 0; font-size: 12px; color: var(--ink-3); text-align: center; }
.msg { display: flex; flex-direction: column; align-items: flex-start; max-width: min(620px, 80%); margin-top: 8px; position: relative; }
.msg.cont { margin-top: 2px; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg-from { font-size: 11.5px; font-weight: 650; color: var(--primary); margin: 0 0 2px 10px; }
.bubble {
  padding: 8px 12px 5px; border-radius: 16px 16px 16px 6px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 1px 1px rgba(16, 24, 40, .04); user-select: text; max-width: 100%;
}
.msg.mine .bubble { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 24%, var(--line)); border-radius: 16px 16px 6px 16px; }
.msg-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
.msg-text a { color: var(--primary); }
.msg.deleted .msg-text { color: var(--ink-3); font-style: italic; }
.msg-meta { font-size: 10.5px; color: var(--ink-3); text-align: right; margin-top: 2px; font-family: var(--font-num); }
.msg-seen { font-size: 11px; color: var(--ink-3); margin-top: 3px; }
.msg-acts { position: absolute; top: 2px; right: calc(100% + 4px); display: none; gap: 2px; }
.msg.mine:hover .msg-acts, .msg.mine:focus-within .msg-acts { display: flex; }
.bubble-audio { display: flex; flex-direction: column; gap: 6px; margin: 2px 0 4px; }
.bubble-audio audio, .voice-play audio { width: 260px; max-width: 100%; height: 40px; display: block; }
.msg .bubble.has-audio { min-width: min(280px, 78vw); }
.bubble.has-audio { padding-top: 8px; }
.chat-compose { display: flex; align-items: flex-end; gap: 6px; padding: 9px 10px calc(9px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.chat-compose[hidden] { display: none; }
.chat-input { flex: 1; resize: none; min-height: 40px; max-height: 150px; padding: 9px 12px; line-height: 1.4; border: 1px solid var(--line-strong); border-radius: 13px; background: var(--surface-2); outline: none; }
.chat-input:focus { border-color: var(--primary); background: var(--surface); box-shadow: var(--ring); }
.chat-send { height: 40px; width: 44px; padding: 0; font-size: 17px; border-radius: 13px; }
.voice-trigger { height: 40px; width: 40px; padding: 0; font-size: 19px; border-radius: 13px; background: var(--surface-2); border: 1px solid var(--line); }
.voice-trigger:hover { background: var(--accent-soft); border-color: var(--accent); }
.pick-list { display: flex; flex-direction: column; gap: 2px; max-height: 340px; overflow-y: auto; margin: 10px 0; }
.pick-item { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; cursor: pointer; }
.pick-item:hover { background: var(--row-hover); }
.pick-item.on { background: var(--primary-soft); }

/* ---------- 🎤 ձայնագրիչ (միայն ուղիղ ձայնագրում) ---------- */
.voice { display: flex; flex-direction: column; gap: 6px; position: relative; }
.voice.dis { opacity: .6; pointer-events: none; }
.voice-idle { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.voice-mic {
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px 0 10px; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--danger) 32%, var(--line)); border-radius: 999px;
  background: color-mix(in srgb, var(--danger) 8%, var(--surface)); color: var(--danger); font-weight: 700; font-size: 14px;
  transition: background .12s, transform .08s;
}
.voice-mic:hover { background: color-mix(in srgb, var(--danger) 15%, var(--surface)); }
.voice-mic:active { transform: scale(.98); }
.vm-ico { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--danger); color: #fff; font-size: 15px; flex: none; }
.voice-hint { font-size: 11.5px; color: var(--ink-3); }
.voice-noweb { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px dashed var(--line-strong); font-size: 12.5px; color: var(--ink-2); }
.voice-noweb b { color: var(--ink); }
.voice-https { color: var(--primary); font-weight: 700; font-size: 12.5px; }
.voice.on .voice-idle { display: none; }
.voice-rec {
  display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 12px; border-radius: 14px;
  background: var(--danger-soft); color: var(--danger); font-weight: 750;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 14%, transparent);
}
.voice-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: vdot 1s ease-in-out infinite; flex: none; }
@keyframes vdot { 50% { opacity: .25; transform: scale(.8); } }
.voice-timer { font-family: var(--font-num); font-size: 14px; min-width: 42px; }
.voice-bars { display: flex; gap: 3px; align-items: flex-end; height: 24px; flex: 1; min-width: 40px; }
.voice-bars i {
  width: 100%; max-width: 8px; height: 100%; border-radius: 3px; background: currentColor; opacity: .7;
  transform-origin: bottom; transform: scaleY(calc(.12 + var(--lv, 0) * .88));
  transition: transform .08s linear;
}
.voice-bars i:nth-child(2n) { transform: scaleY(calc(.18 + var(--lv, 0) * .82)); }
.voice-bars i:nth-child(3n) { transform: scaleY(calc(.08 + var(--lv, 0) * .95)); }
.voice-stop { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--danger); color: #fff; font-size: 14px; cursor: pointer; flex: none; }
.voice-cancel { width: 30px; height: 30px; border-radius: 50%; border: 0; background: transparent; color: var(--danger); font-size: 15px; cursor: pointer; flex: none; }
.voice-cancel:hover, .voice-stop:hover { filter: brightness(1.06); }
.voice-status { font-size: 12px; color: var(--ink-3); line-height: 1.4; }
.voice-status.bad { color: var(--danger); font-weight: 600; }
.voice-preview { display: flex; flex-direction: column; gap: 7px; }
.voice-clip { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-strong); }
.voice-clip audio { flex: 1; min-width: 0; height: 36px; }
.voice-len { font-size: 11.5px; color: var(--ink-3); font-family: var(--font-num); white-space: nowrap; }
.voice-x { border: 0; background: none; cursor: pointer; font-size: 15px; color: var(--ink-3); border-radius: 8px; padding: 4px 6px; }
.voice-x:hover { background: var(--danger-soft); color: var(--danger); }
.voice-again { align-self: flex-start; border: 0; background: none; color: var(--primary); font-size: 12.5px; font-weight: 650; cursor: pointer; padding: 2px 0; }
.voice-again:hover { text-decoration: underline; }
.voice-play { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }

/* չաթում՝ կոմպակտ ձայնագրիչ, որը բացվում է դաշտի վերևում */
.chat-compose { position: relative; }
.voice.compact { flex: none; position: static; }
.voice.compact .voice-idle { gap: 0; }
.voice.compact .voice-mic { width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 13px; background: var(--surface-2); border-color: var(--line); color: var(--ink-2); }
.voice.compact .voice-mic:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--warn); }
.voice.compact .vm-ico { background: transparent; color: inherit; width: auto; height: auto; font-size: 19px; }
.voice.compact .vm-txt { display: none; }
.voice.compact .voice-rec,
.voice.compact .voice-status {
  position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); z-index: 6;
  background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink);
  box-shadow: 0 -8px 26px -14px rgba(16, 24, 40, .45);
  border-radius: 14px;
}
.voice.compact .voice-rec { color: var(--danger); background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 30%, var(--line)); padding: 9px 10px 9px 13px; animation: alIn .18s ease-out; }
.voice.compact .voice-rec .voice-bars { max-width: none; }
.voice.compact .voice-status { padding: 9px 12px; font-size: 12px; }

/* emoji */
.emo { position: relative; flex: none; }
.emo-btn { height: 40px; width: 40px; padding: 0; font-size: 20px; line-height: 1; border-radius: 13px; background: var(--surface-2); border: 1px solid var(--line); }
.emo.open .emo-btn { background: var(--primary-soft); border-color: var(--primary); }
.emo-panel {
  display: none; position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 30;
  width: 350px; max-width: calc(100vw - 24px); background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; animation: emoIn .14s ease-out;
}
.emo.open .emo-panel { display: flex; flex-direction: column; }
@keyframes emoIn { from { opacity: 0; transform: translateY(6px); } }
.emo-tabs { display: flex; gap: 2px; padding: 6px 6px 0; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.emo-tab { flex: 1; height: 36px; border: 0; background: none; font-size: 19px; cursor: pointer; border-bottom: 3px solid transparent; border-radius: 9px 9px 0 0; }
.emo-tab:hover { background: var(--row-hover); }
.emo-tab.on { border-bottom-color: var(--primary); background: var(--surface); }
.emo-title { font-size: 11.5px; font-weight: 700; color: var(--ink-3); padding: 8px 12px 2px; text-transform: uppercase; letter-spacing: .05em; }
.emo-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 2px; padding: 4px 8px 10px; max-height: 232px; overflow-y: auto; overflow-x: hidden; }
.emo-i { height: 38px; min-width: 0; padding: 0; border: 0; background: none; border-radius: 9px; font-size: 23px; line-height: 1; cursor: pointer; transition: transform .08s; }
.emo-i:hover { background: var(--row-hover); transform: scale(1.18); }
.emo-empty { grid-column: 1 / -1; padding: 24px 0; text-align: center; color: var(--ink-3); font-size: 13px; }
.msg-text.big-emo { font-size: 34px; line-height: 1.2; }

/* ---------- կատարվելիք գործեր ---------- */
.lchk { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 550; }
.lchk input { width: 17px; height: 17px; }
.plan-chip { display: inline-flex; align-items: center; gap: 2px; margin-top: 6px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 650;
  background: var(--primary-soft); color: var(--primary); border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent); }
.plan-chip .pc-rem { font-weight: 500; opacity: .85; }
.plan-chip.today { background: var(--accent-soft); color: var(--warn); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.plan-chip.soon { background: var(--surface-3); }
.plan-chip.late { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.plan .toolbar-inline { margin-top: 10px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.plan-day { margin-top: 22px; }
.plan-day h3 { display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px; font-size: 18px; }
.plan-day h3 .count { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--line); color: var(--ink-2); }
.plan-day .pd-date { font-size: 13px; font-weight: 500; color: var(--ink-3); }
.plan-day.today h3 { color: var(--warn); }
.plan-day.late h3 { color: var(--danger); }
.plan-item { display: grid; grid-template-columns: 128px 1fr auto; gap: 16px; align-items: start; }
.plan-item.mine { box-shadow: inset 4px 0 0 var(--violet); }
.pi-when { padding: 8px 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); text-align: center; }
.pi-day { font-size: 12px; color: var(--ink-3); font-weight: 650; }
.pi-time { font-size: 20px; font-weight: 750; margin: 2px 0; font-family: var(--font-num); }
.pi-rem { font-size: 11.5px; color: var(--primary); }
.pi-rem.off { color: var(--ink-3); }
.plan-day.today .pi-when { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.plan-day.late .pi-when { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 30%, var(--line)); }
.pi-main { min-width: 0; }
.pi-who { font-weight: 650; font-size: 13px; }
.pi-who.none { color: var(--danger); font-weight: 500; }
.pi-acts { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.plan-box { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.plan-box[hidden] { display: none; }
.plan-box .field.wide { grid-column: 1 / -1; }
.quick-days { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.quick-days .btn { border: 1px solid var(--line); }
.rem-ed { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rem-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-strong); }
.rem-chip input { border: 0; background: none; padding: 2px; width: auto; min-width: 0; font-weight: 650; }
.rem-x { border: 0; background: none; font-size: 17px; line-height: 1; cursor: pointer; color: var(--ink-3); padding: 0 6px; }
.rem-x:hover { color: var(--danger); }

/* ---------- աշխատակցի էջ ---------- */
.emp { max-width: 860px; margin: 0 auto; padding: 8px 0 40px; }
.emp-hero { text-align: center; margin: 16px 0 20px; }
.emp-hero h1 { font-size: 28px; margin: 0 0 6px; }
.emp-hero p { color: var(--ink-2); margin: 0 auto; max-width: 620px; }
.emp-form { padding: 20px 22px; border-top: 5px solid var(--primary); }
.ef-title { margin: 0 0 16px; font-size: 21px; }
.kind-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kind-tile { display: flex; align-items: center; gap: 10px; padding: 13px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface);
  font-size: 14.5px; font-weight: 650; cursor: pointer; text-align: left; transition: border-color .12s, background .12s, transform .08s; }
.kind-tile:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); transform: translateY(-1px); }
.kind-tile.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.kt-ico { font-size: 25px; line-height: 1; }
.emp-form input[type=text] { font-size: 16px; }
.prob-count { float: right; font-weight: 500; color: var(--ink-3); font-size: 11.5px; }
.prob-count.bad { color: var(--danger); font-weight: 700; }
.prob-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.prob-chips[hidden] { display: none; }
.prob-chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface-2); cursor: pointer; font-size: 13.5px; }
.prob-chip:hover { border-color: var(--primary); }
.prob-chip.on { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.emp-result { padding: 20px 22px; border-top: 5px solid var(--ok); }
.er-head { display: flex; gap: 14px; align-items: center; }
.er-head h2 { margin: 0; font-size: 22px; }
.er-head p { margin: 4px 0 0; }
.er-ok { flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; font-size: 26px; font-weight: 800; }
.er-sub { margin: 22px 0 10px; font-size: 17px; }
.sol-list { display: flex; flex-direction: column; gap: 10px; }
.sol { border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); padding: 4px 14px; }
.sol[open] { background: var(--surface); box-shadow: var(--shadow); }
.sol summary { cursor: pointer; padding: 10px 0; font-weight: 650; font-size: 15.5px; display: flex; align-items: center; gap: 10px; list-style: none; }
.sol summary::-webkit-details-marker { display: none; }
.sol-n { width: 26px; height: 26px; flex: none; border-radius: 9px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.sol ol { margin: 0 0 10px; padding-left: 46px; line-height: 1.55; }
.sol ol li { margin: 4px 0; }
.sol .btn { margin: 0 0 12px 36px; }
.er-foot { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.emp-mine { margin-top: 26px; }
.emp-mine h3 { margin: 0 0 10px; }
.emp-t { display: flex; align-items: center; gap: 12px; padding: 12px 14px; flex-wrap: wrap; }
.et-ico { font-size: 22px; }
.et-main { flex: 1; min-width: 0; }
.et-st { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.emp-t.st-progress .et-st { color: var(--primary); font-weight: 650; }
.emp-t.st-done { opacity: .78; }
.users-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.users-bar .input { flex: 1; min-width: 220px; }
.users-bar select { height: 40px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); font: inherit; }
.users-bar .hint { white-space: nowrap; }
.ea-groups { max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: 12px; padding: 6px 10px; }
.ea-group summary { cursor: pointer; padding: 6px 0; font-weight: 650; }
.ea-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 2px 12px; padding: 4px 0 10px 22px; }
.ea-item { display: flex; gap: 6px; align-items: baseline; font-size: 13px; cursor: pointer; }

/* ---------- բազմակի ընտրություն (ms) ---------- */
.ms { position: relative; }
.ms-btn { width: 100%; height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 11px; text-align: left;
  border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); cursor: pointer; }
.ms-btn:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.ms-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-text.ph { color: var(--ink-3); }
.ms-caret { color: var(--ink-3); font-size: 12px; }
.ms-panel { position: absolute; z-index: 40; top: calc(100% + 4px); left: 0; right: 0; min-width: 250px; max-height: 300px; overflow-y: auto;
  padding: 6px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow-lg); }
.ms-panel[hidden] { display: none; }
.ms-tools { display: flex; flex-wrap: wrap; gap: 5px; padding: 2px 2px 8px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.ms-opt { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 8px; cursor: pointer; }
.ms-opt:hover { background: var(--surface-2); }
.ms-opt:has(input:checked) { background: var(--violet-soft); font-weight: 650; }

/* ---------- մեծ ծանուցումներ (էկրանի ձախ ներքև) ---------- */
#alerts { position: fixed; left: 18px; bottom: 18px; z-index: 900; width: min(430px, calc(100vw - 36px));
  display: flex; flex-direction: column; gap: 10px; pointer-events: none; max-height: calc(100dvh - 150px); overflow-y: auto; padding: 4px 6px 2px 2px; }
#alerts > * { pointer-events: auto; }
.alert {
  --ac: var(--primary); position: relative; display: flex; gap: 12px; padding: 14px 42px 15px 14px; border-radius: 16px; cursor: pointer;
  background: var(--surface); color: var(--ink); border: 1.5px solid var(--ac); border-left-width: 7px; overflow: hidden;
  box-shadow: 0 18px 40px -18px rgba(16, 24, 40, .6), 0 0 0 4px color-mix(in srgb, var(--ac) 12%, transparent);
  animation: alIn .4s cubic-bezier(.2, 1.3, .4, 1);
}
.alert[hidden] { display: none; }
.alert:hover, .alert:focus-visible { transform: translateX(3px); outline: none; }
.alert.out { animation: alOut .25s ease-in forwards; }
.alert.a-new { --ac: #1f6feb; }
.alert.a-assign { --ac: #7c3aed; border-width: 2px 2px 2px 8px; background: linear-gradient(100deg, color-mix(in srgb, var(--violet) 12%, var(--surface)), var(--surface)); }
.alert.a-due { --ac: #d92d20; animation: alIn .4s cubic-bezier(.2, 1.3, .4, 1), alShake .6s ease-in-out .5s 2; }
.alert.a-late { --ac: #d92d20; }
.alert.a-remind { --ac: #f79009; }
.alert.a-confirm { --ac: #12b76a; }
.alert.urgent { --ac: #d92d20; }
.al-ico { flex: none; width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; font-size: 26px;
  background: color-mix(in srgb, var(--ac) 14%, var(--surface)); }
.alert.a-assign .al-ico { animation: alRing 1s ease-in-out .4s 3; }
.al-body { min-width: 0; flex: 1; }
.al-title { font-size: 17px; font-weight: 800; color: var(--ac); line-height: 1.25; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.al-tag { font-size: 11px; font-weight: 750; padding: 2px 8px; border-radius: 999px; background: #d92d20; color: #fff; }
.al-kind { font-size: 12.5px; font-weight: 650; color: var(--ink-2); margin-top: 3px; }
.al-text { font-size: 14.5px; margin-top: 5px; line-height: 1.4; overflow-wrap: anywhere; }
.al-meta { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; }
.al-open { font-size: 12px; font-weight: 700; color: var(--ac); margin-top: 8px; }
.al-acts { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; }
.al-x { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border: 0; border-radius: 9px; background: transparent; font-size: 21px; line-height: 1; color: var(--ink-3); cursor: pointer; }
.al-x:hover { background: var(--surface-2); color: var(--ink); }
.al-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--ac); transform-origin: left; animation: alBar linear forwards; }
.alert.hold .al-bar { animation-play-state: paused; }
.al-more { display: flex; gap: 8px; justify-content: flex-start; }
.al-more .btn { box-shadow: 0 6px 16px rgba(16, 24, 40, .18); }
.tcard.hl { animation: cardHl 1.2s ease-in-out 3; }
@keyframes alIn { from { opacity: 0; transform: translateX(-110%) scale(.92); } }
@keyframes alOut { to { opacity: 0; transform: translateX(-105%); } }
@keyframes alShake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
@keyframes alRing { 15%, 45% { transform: rotate(-14deg); } 30%, 60% { transform: rotate(14deg); } 75% { transform: none; } }
@keyframes alBar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes cardHl { 50% { box-shadow: 0 0 0 4px var(--accent), 0 10px 24px rgba(247, 144, 9, .3); } }

/* ---------- toasts ---------- */
#toasts { position: fixed; right: 18px; top: calc(var(--stick, 120px) + 12px); z-index: 950;
  display: flex; flex-direction: column; gap: 10px; width: min(420px, calc(100vw - 24px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 12px; padding: 13px 11px 13px 15px;
  border-radius: 14px; background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong);
  border-left: 5px solid var(--primary); box-shadow: 0 14px 34px -18px rgba(16, 24, 40, .65);
  font-size: 14px; line-height: 1.45; animation: toast-in .22s cubic-bezier(.2, .9, .3, 1.2); }
.toast.out { animation: toast-out .2s forwards; }
.toast.clickable { cursor: pointer; }
.toast.clickable:hover { background: var(--surface-2); }
.toast.ok { border-left-color: var(--ok); }
.toast.error { border-left-color: var(--danger); background: var(--danger-soft); }
.toast.notify { border-left-color: var(--primary); border-width: 2px 2px 2px 6px; border-color: var(--primary); }
.toast-ico { flex: none; font-size: 21px; line-height: 1; margin-top: 1px; }
.toast.notify .toast-ico { animation: ring .8s ease-in-out 2; }
.toast-body { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.toast-title { font-weight: 750; margin-bottom: 2px; }
.toast-msg { color: var(--ink-2); }
.toast:not(:has(.toast-title)) .toast-msg { color: var(--ink); font-weight: 550; }
.toast-x { flex: none; width: 26px; height: 26px; border: 0; border-radius: 50%; background: none; color: var(--ink-3); font-size: 18px; line-height: 1; cursor: pointer; }
.toast-x:hover { background: var(--line); color: var(--ink); }
@keyframes toast-in { from { opacity: 0; transform: translateX(40px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(40px); } }
@keyframes ring { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-18deg); } 40% { transform: rotate(14deg); } 60% { transform: rotate(-8deg); } 80% { transform: rotate(4deg); } }

/* ---------- զանգակ և ծանուցումների ցուցակ ---------- */
.bell { position: relative; width: 38px; height: 38px; flex: none; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 17px; display: inline-flex; align-items: center; justify-content: center; }
.bell:hover { background: var(--surface-2); }
.bell.has { animation: bell-wiggle 1.6s ease-in-out 2; }
.bell-n { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 750; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--surface); }
@keyframes bell-wiggle { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-14deg); } 40% { transform: rotate(12deg); } 60% { transform: rotate(-8deg); } 80% { transform: rotate(4deg); } }
.notif-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 4px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.notif-list { width: min(360px, calc(100vw - 40px)); }
.notif { display: flex; gap: 10px; padding: 9px 8px; border-radius: 10px; cursor: pointer; }
.notif:hover { background: var(--surface-2); }
.notif.new { background: color-mix(in srgb, var(--primary) 10%, transparent); }
.notif-ico { font-size: 18px; }
.notif-body { min-width: 0; font-size: 13.5px; }
.notif-body b { display: block; }
.notif-text { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.notif-body .sub { color: var(--ink-3); font-size: 11.5px; }
.notif-empty { padding: 14px 8px; }
.linkish { background: none; border: 0; padding: 6px 4px; color: var(--primary); cursor: pointer; font: inherit; font-size: 13px; text-align: left; }
.linkish:hover { text-decoration: underline; }

/* ---------- ծանուցումների հուշաժապավեն ---------- */
.pushbar { display: flex; align-items: center; gap: 10px; padding: 9px 18px; background: color-mix(in srgb, var(--primary) 10%, var(--surface)); border-bottom: 1px solid var(--line); font-size: 13.5px; }
.pushbar[hidden] { display: none; }
.pushbar .pb-ico { font-size: 19px; flex: none; }
.pushbar .pb-text { flex: 1; min-width: 0; line-height: 1.4; }
.pushbar .pb-text a { font-weight: 700; word-break: break-all; }
.pushbar .btn { flex: none; }
.pushbar .pb-x { flex: none; border: 0; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--ink-2); padding: 0 4px; }

/* ---------- հեռախոսի ներքևի նավիգացիա ---------- */
.mobnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: none; gap: 2px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); padding: 5px 4px calc(5px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 24px -18px rgba(16, 24, 40, .5);
}
body.has-mobnav .mobnav { display: flex; }
.mnav-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; border: 0; background: none;
  padding: 6px 2px; border-radius: 12px; color: var(--ink-3); position: relative; cursor: pointer; min-width: 0;
}
.mnav-btn.on { color: var(--primary); background: var(--primary-soft); }
.mnav-ico { font-size: 19px; line-height: 1.15; }
.mnav-l { font-size: 10px; font-weight: 700; letter-spacing: .01em; white-space: nowrap; }
.mnav-b { position: absolute; top: 2px; left: 50%; margin-left: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 750; line-height: 16px; text-align: center; }
body.has-mobnav main { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }

/* ---------- թաքցված/տպագրական ---------- */
body.locked .grid, body.locked .cards, body.locked .stub-list, body.locked .fac-grid, body.locked .kv, body.locked .st { -webkit-user-select: none; user-select: none; }
@media print {
  body.locked #app { display: none; }
  body.locked::after { content: "Տպելը հասանելի է միայն ադմիններին"; display: block; padding: 40px; font: 600 16px system-ui, sans-serif; text-align: center; }
  .topbar, .tabs, .toolbar, .bulkbar, #toasts, .grid .chk, .no-print, .mobnav, .pushbar, #alerts { display: none !important; }
  body { background: #fff; color: #000; }
  main { padding: 0; }
  .card { box-shadow: none; border: 0; }
  .table-wrap { max-height: none; overflow: visible; }
  .grid th { position: static; }
  mark { background: none; }
  .chat { height: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ============================================================================
   ՀԵՌԱԽՈՍ (≤ 760px)՝ կարևոր ուղղումներ
   ========================================================================== */
@media (max-width: 760px) {
  body { font-size: 15px; }
  .topbar { flex-wrap: wrap; gap: 8px; padding: 8px 12px 10px; }
  .brand { padding: 2px 6px 2px 0; }
  .brand-title { font-size: 15.5px; }
  .logo { width: 34px; height: 34px; border-radius: 11px; font-size: 13px; }
  .search-wrap { order: 4; flex-basis: 100%; max-width: none; }
  .search-wrap input { height: 40px; font-size: 16px; }
  .search-ico { top: 11px; }
  .top-right { gap: 6px; }
  .live { display: none; }
  .user-chip { padding: 3px; gap: 0; border-radius: 12px; }
  .user-chip > span:not(.avatar) { display: none; }
  .bell { width: 36px; height: 36px; }
  .tabs { padding: 7px 10px 8px; gap: 4px; }
  .tab { font-size: 13.5px; padding: 6px 11px; }
  .tab .count { font-size: 10.5px; }
  .tabs-right { position: static; box-shadow: none; margin-left: 0; padding-left: 0; }
  main, .toolbar, .tabs, .bulkbar { padding-left: 11px; padding-right: 11px; }
  main { padding-top: 12px; }
  .table-wrap { max-height: none; }
  .kv { grid-template-columns: 1fr; }
  .kv .k { border-bottom: 0; padding-bottom: 0; }
  .col-item { grid-template-columns: 1fr auto auto; }

  /* հարմար հպում և ≥16px դաշտեր (iOS-ը չի մեծացնի էջը) */
  input, select, textarea { font-size: 16px; }
  .btn { height: 40px; }
  .btn.sm { height: 34px; font-size: 13px; }
  .filter { height: 38px; font-size: 14px; }
  .grid th, .grid td { padding: 9px 10px; }
  .form-grid { grid-template-columns: 1fr; }
  .toolbar .filter { flex: 1 1 calc(50% - 8px); max-width: none; min-width: 0; height: 38px; }

  /* մոդալները՝ ամբողջ էկրանով, կպնող գլխով/ոտքով */
  .modal-bg { padding: 0; align-items: stretch; }
  .modal { max-width: none; border-radius: 0; height: 100dvh; max-height: 100dvh; display: flex; flex-direction: column; }
  .modal-head { position: sticky; top: 0; background: var(--surface); z-index: 3; flex: none; }
  .modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 14px 14px 20px; }
  .modal-foot { position: sticky; bottom: 0; z-index: 3; flex: none; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); }
  .modal-foot .btn { flex: 1 1 auto; }
  .modal.narrow { height: auto; max-height: 90dvh; min-height: 0; margin: auto; border-radius: 16px; width: calc(100% - 20px); max-width: 460px; align-self: center; }
  .modal-bg.narrow-bg { padding: 14px 0; align-items: center; }
  .modal.md { max-width: none; }
  .modal.md .modal-body { padding: 12px 12px 18px; }
  .form-sec { padding: 9px 11px 2px; }
  .ticket-form .form-grid { grid-template-columns: 1fr; }
  .form-sec .field.span2 { grid-column: auto; }
  .tlog-list { max-height: none; }
  .people-grid { grid-template-columns: 1fr; }
  .people-list { max-height: none; }
  .people-detail { position: static; padding: 14px; }
  .people-head { align-items: flex-start; }
  .people-actions { margin-left: 0; width: 100%; }
  .people-actions .btn { flex: 1 1 auto; }
  .people-kpis .pk { flex: 1 1 30%; justify-content: center; }
  .people-bar .input { max-width: none; flex: 1 1 100%; }

  /* բաժինները՝ մեկ սյունակ */
  .assign-modes { grid-template-columns: 1fr; }
  .assign-mode { padding: 9px 11px; }
  .tpeople { grid-template-columns: 1fr; }
  .stub-people { grid-template-columns: 1fr; gap: 8px; }
  .stub-head { gap: 6px; }
  .ticket-stub { padding: 12px 12px 11px 18px; }
  .q-kpis { display: none; }
  .q-head h1 { font-size: 19px; }
  .q-actions { margin-left: 0; width: 100%; }
  .q-actions .btn { flex: 1 1 auto; }
  .q-bar { gap: 8px; }
  .q-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 3px; width: 100%; -webkit-overflow-scrolling: touch; }
  .q-chip { flex: none; }
  .q-search-wrap { max-width: none; flex: 1 1 100%; }
  .q-search-wrap .input { height: 40px; }
  .ar-bar, .toolbar-inline { gap: 6px; }
  .plan-item { grid-template-columns: 1fr; gap: 10px; }
  .pi-when { display: flex; gap: 10px; align-items: baseline; text-align: left; }
  .pi-acts { flex-direction: row; flex-wrap: wrap; }
  .plan-box { grid-template-columns: 1fr; }
  .kind-tiles { grid-template-columns: repeat(2, 1fr); }
  .emp-form, .emp-result { padding: 16px; }
  .emp-t { flex-wrap: wrap; }
  .alerts, #alerts { left: 10px; right: 10px; bottom: calc(74px + env(safe-area-inset-bottom)); width: auto; max-height: calc(100dvh - 240px); }
  body:not(.has-mobnav) #alerts { bottom: 12px; }
  .alert { padding: 12px 38px 13px 12px; }
  .al-ico { width: 42px; height: 42px; font-size: 22px; border-radius: 12px; }
  .al-title { font-size: 15.5px; }
  .al-text { font-size: 13.5px; }
  #toasts { right: 10px; left: 10px; width: auto; top: auto; bottom: calc(76px + env(safe-area-inset-bottom)); }
  .toast { font-size: 13.5px; padding: 11px 10px 11px 13px; }
  .popover { min-width: 0; }
  .pushbar { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 5px 10px; align-items: start; padding: 9px 34px 9px 12px; font-size: 12.5px; }
  .pushbar .pb-ico { grid-column: 1; grid-row: 1 / span 2; font-size: 17px; margin-top: 1px; }
  .pushbar .pb-text { grid-column: 2; }
  .pushbar .btn { grid-column: 2; justify-self: start; margin-top: 2px; }
  .pushbar .pb-x { position: absolute; top: 0; right: 0; }
  .hd-btns { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .hd-btns .btn { width: 100%; min-width: 0; padding: 0 8px; font-size: 13px; overflow: hidden; }
  .helpdesk { padding: 12px 13px; gap: 10px; }
  .search-wrap input { text-overflow: ellipsis; }
  body.has-mobnav:not(.sheet-view) .tabs { display: none; }
  .history, .stats { padding: 0; }

  /* չաթը՝ ամբողջ էկրան, առանց ավելորդ տողերի */
  body.chat-open .pushbar,
  body.chat-open .warnbar { display: none; }
  body.chat-open main { padding: 0; }
  body.chat-open .stickytop .search-wrap,
  body.chat-open .stickytop .tabs { display: none; }
  .chat { grid-template-columns: 1fr; height: calc(100dvh - var(--stick, 58px)); min-height: 0; border-radius: 0; border: 0; box-shadow: none; }
  .chat.has-cur .chat-side { display: none; }
  .chat:not(.has-cur) .chat-main { display: none; }
  .chat-side { border-right: 0; }
  .chat-back { display: inline-flex; }
  .chat-msgs { padding: 10px 10px 6px; }
  .msg { max-width: 92%; }
  .msg-acts { position: static; display: flex; opacity: .7; }
  .chat-send { width: 44px; flex: none; }
  .chat-input { font-size: 16px; min-height: 44px; }
  .chat-compose { gap: 5px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); }
  .emo-btn, .voice-trigger { width: 42px; height: 42px; }
  .emo-panel { position: fixed; left: 8px; right: 8px; bottom: calc(76px + env(safe-area-inset-bottom)); width: auto; max-width: none; }
  .ms-panel { position: fixed; left: 10px; right: 10px; top: auto; bottom: calc(10px + env(safe-area-inset-bottom)); max-height: 58vh; z-index: 120; }
  .voice-bars { max-width: 120px; }
  .voice-clip audio { max-width: none; }
}

/* փոքր հեռախոսներ */
@media (max-width: 420px) {
  .q-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .q-kpi b { font-size: 21px; }
  .stub-text { font-size: 14.5px; }
  .brand-title { max-width: 130px; }
  .mnav-l { font-size: 9.5px; }
  .assign-mode .am-hint { display: none; }
}

/* ---------- առաջնահերթություն / շատ շտապ ---------- */
.prio-pick { display: flex; flex-direction: column; gap: 4px; }
.prio-btns { display: flex; gap: 4px; }
.prio-btn {
  flex: 1; height: 34px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface);
  font-size: 12.5px; font-weight: 650; cursor: pointer; white-space: nowrap; padding: 0 4px;
}
.prio-btn:hover { background: var(--surface-2); }
.prio-btn.on.p-normal { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.prio-btn.on.p-high { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); }
.prio-btn.on.p-critical { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.prio-hint { font-size: 11px; color: var(--danger); font-weight: 600; line-height: 1.35; }
.ticket-stub.prio-critical { --st: var(--danger); box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--danger) 55%, transparent), var(--shadow); }
.stub-fire.crit { color: var(--danger); font-weight: 800; letter-spacing: .01em; }
.pticket.prio-critical { border-left-color: var(--danger); }
.pd-crit { color: var(--danger); }

/* ---------- հաշիվների զանգվածային ստեղծում ---------- */
.job-bar { height: 10px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin: 12px 0 8px; }
.job-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width .3s ease; }

/* ---------- ծանուցումներ՝ ավելի կոմպակտ ---------- */
.notif-list { max-height: 58vh; overflow-y: auto; }
.notif { padding: 7px 7px; gap: 8px; }
.notif b { font-size: 13px; font-weight: 700; }
.notif-text { font-size: 12px; line-height: 1.35; -webkit-line-clamp: 2; }
.notif .sub { font-size: 10.5px; }
.notif.crit { background: color-mix(in srgb, var(--danger) 9%, transparent); }
.notif-head { gap: 8px; flex-wrap: wrap; }
.notif-head .spacer { flex: 1; }
.linkish.danger { color: var(--danger); }
.linkish.danger:hover { background: var(--danger-soft); border-radius: 6px; }
.notif-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); flex: none; }

/* ---------- թարմացման գոտի ---------- */
.warnbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.warnbar > span { flex: 1 1 260px; }
.warnbar .btn { flex: none; }

/* ---------- այլ ---------- */
.lc-phone { display: inline-block; margin-top: 4px; font-weight: 650; color: var(--ink-2); }
input.ro { background: var(--surface-2); color: var(--ink-2); cursor: default; border-style: dashed; }

@media (max-width: 760px) {
  .notif-list { max-height: 46vh; }
  .notif { padding: 7px 5px; }
  .notif b { font-size: 12.5px; }
  .notif-text { font-size: 11.5px; }
  .notif-ico { width: 27px; height: 27px; font-size: 15px; }
  .notif-head .linkish { font-size: 12px; padding: 4px 2px; }
  .popover { position: fixed !important; left: 8px !important; right: 8px !important; top: auto !important; bottom: calc(72px + env(safe-area-inset-bottom)) !important; max-height: 72vh; }
  .prio-btn { height: 36px; font-size: 13px; }
}

/* ախտորոշումը՝ բացվող բլոկ (հեռախոսում չծանրաբեռնի) */
.push-diag summary { cursor: pointer; font-weight: 700; font-size: 13px; color: var(--ink-2); padding: 3px 0; list-style: none; }
.push-diag summary::-webkit-details-marker { display: none; }
.push-diag summary::before { content: "▸ "; color: var(--ink-3); }
.push-diag[open] summary::before { content: "▾ "; }
.push-diag[open] { padding-bottom: 8px; }

@media (max-width: 760px) {
  /* մուտքի ձևը՝ առաջինը (անանուն հայտ չկա, պետք է անմիջապես մուտք գործել) */
  .land-grid { grid-template-columns: 1fr; }
  .land-grid > .login-card { order: -1; }
}
