/* Nabrix support platform — shared styles (portal + admin).
   Brand tokens live in :root so the same template can be re-skinned. */

@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  src: url('../fonts/cairo-arabic-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF,
    U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  src: url('../fonts/cairo-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('../fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --navy: #0D1F2F;
  --teal: #148F8A;
  --teal-btn: #0F7A76;
  --teal-deep: #0D383B;
  --mint: #7ED1C6;
  --paper: #F7F7F5;
  --white: #FFFFFF;
  --amber-bg: #FDF0DC;
  --amber-fg: #7A4A06;
  --amber-line: #B7791F;
  --red-bg: #FBE4E1;
  --red-fg: #8C1D12;
  --required: #B42318;
  --ink-72: rgba(13, 31, 47, 0.72);
  --ink-68: rgba(13, 31, 47, 0.68);
  --ink-62: rgba(13, 31, 47, 0.62);
  --line: rgba(13, 31, 47, 0.1);
  --line-strong: rgba(13, 31, 47, 0.22);
  --grad: linear-gradient(135deg, #0D383B, #0D1F2F);
  --font: 'Cairo', system-ui, sans-serif;
  --font-latin: 'Inter', 'Cairo', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--navy);
  background: var(--paper);
  line-height: 1.6;
}
html[lang='en'] body { font-family: var(--font-latin); }
a { color: var(--teal-btn); }
a:hover { color: var(--teal-deep); }
input, button, select, textarea { font-family: inherit; }
h1, h2, h3, p { margin: 0; }
.latin { font-family: var(--font-latin); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(20, 143, 138, 0.55); outline-offset: 2px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 28px;
  border: 0; border-radius: 999px;
  background: var(--teal-btn); color: var(--paper);
  font-size: 16px; font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--teal-deep); color: var(--paper); }
.btn[disabled] { opacity: 0.6; cursor: default; }
.btn-lg { min-height: 54px; padding: 0 36px; font-size: 17px; }
.btn-block { display: flex; width: 100%; }
.btn-ghost {
  background: var(--white); color: var(--navy);
  border: 1px solid var(--line-strong); font-weight: 600;
}
.btn-ghost:hover { background: var(--paper); color: var(--navy); }
.btn-dark { background: var(--navy); }
.btn-dark:hover { background: #000; }
.btn-mint { background: var(--mint); color: var(--navy); }
.btn-mint:hover { background: #9BDCD3; color: var(--navy); }
.btn-outline-light {
  background: transparent; color: var(--paper);
  border: 1px solid rgba(247, 247, 245, 0.6);
}
.btn-outline-light:hover { background: rgba(247, 247, 245, 0.1); color: var(--paper); }
.btn-sm { min-height: 46px; padding: 0 18px; font-size: 14px; font-weight: 600; }
.link-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0;
  border: 0; background: none; color: var(--teal-btn);
  font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer;
}
.link-btn:hover { color: var(--teal-deep); }
.link-danger { color: var(--red-fg); font-size: 15px; font-weight: 700; }
.link-danger:hover { color: #5F130C; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field > label, .field-label { font-size: 14px; font-weight: 700; }
.auth .field > label { font-weight: 600; }
.req { color: var(--required); }
.input, .select, .textarea {
  width: 100%; height: 50px; padding: 0 16px;
  border: 1px solid var(--line-strong); border-radius: 12px;
  background: var(--white); color: var(--navy); font-size: 16px;
}
.select { padding: 0 14px; }
.textarea { height: auto; padding: 14px 16px; line-height: 1.8; resize: vertical; }
.auth .input { height: 52px; }
.input[readonly] { background: var(--paper); border-color: rgba(13, 31, 47, 0.12); color: var(--ink-72); }
.input.ltr { direction: ltr; text-align: right; }
html[dir='ltr'] .input.ltr { text-align: left; }
.input[aria-invalid='true'], .select[aria-invalid='true'], .textarea[aria-invalid='true'] { border: 2px solid var(--required); }
.impact.invalid .impact-opt { border-color: var(--required); }
.hint { font-size: 13px; color: var(--ink-68); }
.error-text { font-size: 14px; font-weight: 600; color: var(--red-fg); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }

.notice {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 16px; border-radius: 16px;
  background: rgba(126, 209, 198, 0.18); border: 1px solid rgba(20, 143, 138, 0.22);
  font-size: 14px; line-height: 1.8; color: var(--teal-deep);
}
.notice svg { flex: none; margin-top: 3px; }
.alert {
  padding: 14px 16px; border-radius: 14px;
  background: var(--red-bg); color: var(--red-fg);
  font-size: 14px; font-weight: 600; line-height: 1.8;
}
.alert-ok { background: rgba(126, 209, 198, 0.22); color: var(--teal-deep); }

/* ---------- language switch ---------- */
.lang { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(13, 31, 47, 0.06); }
.lang button {
  border: 0; cursor: pointer; padding: 6px 12px; min-height: 34px; border-radius: 999px;
  background: transparent; color: var(--ink-68); font-size: 13px; font-weight: 600;
}
.lang button[aria-pressed='true'] { background: var(--teal-btn); color: var(--paper); }
.auth .lang button { padding: 7px 14px; min-height: 36px; }

/* ---------- auth pages (login, invite) ---------- */
.auth { min-height: 100vh; display: flex; flex-wrap: wrap; }
.auth-form {
  flex: 1 1 420px; min-width: 0; padding: 32px 56px 40px;
  display: flex; flex-direction: column; gap: 32px;
}
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.auth-top img { height: 44px; width: auto; }
.auth-mid { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.auth-box { width: 100%; max-width: 420px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.auth-box h1 { font-size: 32px; font-weight: 700; line-height: 1.4; }
.auth-box .lead { font-size: 16px; line-height: 1.8; color: var(--ink-68); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-8 { display: flex; flex-direction: column; gap: 8px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.auth-foot { font-size: 13px; color: var(--ink-62); text-align: center; }
.auth-side {
  flex: 1 1 420px; min-width: 0; padding: 64px 56px;
  display: flex; flex-direction: column; justify-content: center; gap: 36px;
  background: var(--grad); color: var(--paper);
}
.mark-tile {
  width: 76px; height: 76px; border-radius: 20px; background: var(--paper);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 8px rgba(126, 209, 198, 0.14);
}
.mark-tile img { height: 44px; width: auto; }
.pill-outline {
  align-self: flex-start; padding: 6px 16px; border-radius: 999px;
  border: 1px solid rgba(126, 209, 198, 0.5); color: var(--mint);
  font-size: 13px; font-weight: 600;
}
.auth-side h2 { font-size: 36px; font-weight: 700; line-height: 1.5; }
.feature { display: flex; gap: 14px; align-items: flex-start; }
.feature-icon {
  flex: none; width: 40px; height: 40px; border-radius: 12px;
  background: rgba(126, 209, 198, 0.14);
  display: flex; align-items: center; justify-content: center;
}
.feature-title { font-size: 16px; font-weight: 700; }
.feature-text { font-size: 14px; line-height: 1.8; color: rgba(247, 247, 245, 0.75); }
.tagline { font-family: var(--font-latin); font-size: 13px; letter-spacing: 0.32em; color: var(--mint); }
html[dir='rtl'] .tagline { direction: ltr; text-align: right; }
.org-card {
  display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(126, 209, 198, 0.3);
}
.org-card .avatar { width: 48px; height: 48px; border-radius: 14px; background: var(--mint); color: var(--navy); font-size: 18px; }

/* centered card page (reset password) */
.center-page {
  min-height: 100vh; padding: 32px;
  display: flex; flex-direction: column; align-items: center; gap: 40px;
}
.center-page > img { height: 44px; width: auto; }
.center-mid { flex: 1; width: 100%; display: flex; align-items: center; justify-content: center; }
.center-card {
  width: 100%; max-width: 460px; padding: 36px;
  background: var(--white); border: 1px solid var(--line); border-radius: 22px;
  display: flex; flex-direction: column; gap: 22px;
}
.center-card h1 { font-size: 28px; font-weight: 700; line-height: 1.4; }
.icon-tile {
  width: 56px; height: 56px; border-radius: 16px; background: rgba(126, 209, 198, 0.22);
  display: flex; align-items: center; justify-content: center;
}

/* ---------- portal shell ---------- */
.topbar { background: var(--white); border-bottom: 1px solid var(--line); }
.topbar-in {
  max-width: 1120px; margin: 0 auto; padding: 14px 32px;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.topbar-in > a > img { display: block; height: 38px; width: auto; }
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a {
  padding: 10px 16px; border-radius: 999px;
  color: var(--ink-72); font-size: 15px; font-weight: 600; text-decoration: none;
}
.nav a[aria-current='page'] { background: rgba(20, 143, 138, 0.12); color: var(--teal-deep); font-weight: 700; }
.topbar-end { margin-inline-start: auto; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.me { display: flex; align-items: center; gap: 10px; color: var(--navy); text-decoration: none; }
.me:hover { color: var(--navy); }
.me-name { font-size: 14px; font-weight: 700; line-height: 1.5; }
.me-org { font-size: 12px; color: var(--ink-62); line-height: 1.5; }
.avatar {
  flex: none; width: 40px; height: 40px; border-radius: 999px;
  background: linear-gradient(135deg, #148F8A, #0D383B); color: var(--paper);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700;
}
.avatar-dark { background: var(--navy); }
.avatar-team { border-radius: 12px; background: var(--paper); border: 1px solid var(--line); }
.avatar-team img { height: 22px; width: auto; }

.page { max-width: 1120px; margin: 0 auto; padding: 36px 32px 56px; display: flex; flex-direction: column; gap: 24px; }
.page-narrow { max-width: 820px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-title { font-size: 30px; font-weight: 700; line-height: 1.4; }
.page-sub { font-size: 15px; color: var(--ink-68); }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: 18px;
  padding: 26px 28px; display: flex; flex-direction: column; gap: 18px;
}
.card h2 { font-size: 18px; font-weight: 700; }

/* ---------- tickets list ---------- */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  cursor: pointer; padding: 9px 18px; min-height: 44px; border-radius: 999px;
  border: 1px solid rgba(13, 31, 47, 0.18); background: var(--white); color: var(--navy);
  font-size: 14px; font-weight: 600;
}
.chip[aria-pressed='true'] { border-color: var(--navy); background: var(--navy); color: var(--paper); }
.search { flex: 0 1 300px; min-width: 200px; }
.search input {
  width: 100%; height: 44px; padding: 0 16px;
  border: 1px solid rgba(13, 31, 47, 0.18); border-radius: 999px;
  background: var(--white); font-size: 14px; color: var(--navy);
}
.table-card { background: var(--white); border: 1px solid var(--line); border-radius: 18px; overflow-x: auto; }
.table { min-width: 860px; }
.trow {
  display: grid; grid-template-columns: 110px minmax(0, 2.4fr) minmax(0, 1.3fr) minmax(0, 1fr) 150px 120px;
  gap: 16px; align-items: center; padding: 18px 24px;
  border-bottom: 1px solid rgba(13, 31, 47, 0.08); font-size: 15px;
}
.trow:last-child { border-bottom: 0; }
.thead {
  padding: 14px 24px; border-bottom: 1px solid var(--line);
  font-size: 13px; font-weight: 700; color: var(--ink-62);
}
.t-ref { font-family: var(--font-latin); font-size: 14px; font-weight: 600; color: var(--ink-72); }
.t-title { font-weight: 700; color: var(--navy); text-decoration: none; line-height: 1.6; }
.t-title:hover { color: var(--teal-btn); }
.t-muted { color: var(--ink-72); }
.t-date { font-size: 14px; color: var(--ink-68); }
.empty { padding: 56px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.empty h2 { font-size: 20px; font-weight: 700; }
.empty p { font-size: 15px; color: var(--ink-68); }

/* ---------- status badges ---------- */
.badge {
  display: inline-block; padding: 5px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 700; white-space: nowrap;
}
.badge-lg { padding: 7px 18px; font-size: 14px; }
.st-new { background: var(--navy); color: var(--paper); }
.st-in_progress { background: rgba(20, 143, 138, 0.14); color: var(--teal-deep); }
.st-waiting_customer { background: var(--amber-bg); color: var(--amber-fg); }
.st-resolved { background: var(--teal-deep); color: var(--paper); }
.st-closed { background: rgba(13, 31, 47, 0.08); color: rgba(13, 31, 47, 0.78); }

/* ---------- new ticket ---------- */
.impact { margin: 0; padding: 0; border: 0; min-width: 0; }
.impact legend { padding: 0; margin-bottom: 10px; font-size: 14px; font-weight: 700; }
.impact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.impact-opt {
  display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 14px;
  border: 1px solid var(--line-strong); background: var(--white); cursor: pointer;
}
.impact-opt.on { border: 2px solid var(--teal-btn); padding: 15px; background: rgba(126, 209, 198, 0.16); }
.impact-opt input { margin-top: 6px; width: 18px; height: 18px; accent-color: var(--teal-btn); }
.impact-name { display: block; font-size: 15px; font-weight: 700; }
.impact-desc { display: block; font-size: 13px; line-height: 1.7; color: var(--ink-72); }
.dropzone {
  cursor: pointer; width: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 16px;
  border: 2px dashed rgba(20, 143, 138, 0.5); border-radius: 14px;
  background: rgba(126, 209, 198, 0.1); color: var(--teal-deep);
}
.dropzone.over { background: rgba(126, 209, 198, 0.28); }
.dropzone-title { font-size: 15px; font-weight: 700; }
.files { display: flex; gap: 10px; flex-wrap: wrap; }
.file {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%;
  padding: 8px 14px; border-radius: 10px;
  background: var(--paper); border: 1px solid var(--line);
  font-size: 13px; font-weight: 600; color: var(--navy); text-decoration: none;
}
button.file { cursor: pointer; }
.file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-x { border: 0; background: none; cursor: pointer; padding: 4px; margin: -4px; color: var(--ink-62); display: inline-flex; }
.actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---------- ticket page ---------- */
.back { align-self: flex-start; }
.back svg { transform: scaleX(1); }
html[dir='ltr'] .back svg { transform: scaleX(-1); }
.t-head { padding: 24px 28px; gap: 20px; }
.t-head-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.t-head h1 { font-size: 26px; font-weight: 700; line-height: 1.5; overflow-wrap: anywhere; }
.t-meta { font-size: 14px; color: var(--ink-68); }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.step { display: flex; flex-direction: column; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-62); }
.step::before { content: ''; height: 6px; border-radius: 999px; background: rgba(13, 31, 47, 0.12); }
.step.done { font-weight: 700; color: var(--teal-deep); }
.step.done::before { background: var(--teal-btn); }
.t-cols { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start; }
.t-main { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.t-side { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.msg { padding: 22px 24px; gap: 12px; }
.msg-team { border-color: rgba(20, 143, 138, 0.35); }
.msg-head { display: flex; align-items: center; gap: 12px; }
.msg-name { font-size: 15px; font-weight: 700; line-height: 1.6; }
.msg-time { font-size: 13px; color: var(--ink-62); line-height: 1.6; }
.msg-body { font-size: 16px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.composer { padding: 20px 24px; gap: 14px; }
.composer > label { font-size: 15px; font-weight: 700; }
.details h2 { font-size: 17px; }
.details { padding: 22px 24px; gap: 14px; }
.kv { display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.kv > div { display: flex; justify-content: space-between; gap: 12px; }
.kv dt, .kv .k { color: var(--ink-68); }
.kv .v { font-weight: 700; text-align: end; overflow-wrap: anywhere; }
.dark-card {
  background: var(--grad); color: var(--paper); border-radius: 18px;
  padding: 22px 24px; display: flex; flex-direction: column; gap: 10px;
}
.dark-card h2 { font-size: 16px; font-weight: 700; }
.dark-card p { font-size: 14px; line-height: 1.8; color: rgba(247, 247, 245, 0.78); }
.resolve-card { padding: 26px 28px; gap: 16px; }
.resolve-card h2 { font-size: 20px; }
.escalate { border: 2px solid var(--amber-line); padding: 24px 28px; gap: 16px; }
.escalate-head { display: flex; align-items: flex-start; gap: 12px; }
.escalate-head svg { flex: none; margin-top: 3px; }
.escalate p { font-size: 14px; line-height: 1.8; color: var(--ink-72); }
.flag {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
  background: var(--amber-bg); color: var(--amber-fg); font-size: 13px; font-weight: 700;
}

/* ---------- account ---------- */
.check { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; cursor: pointer; }
.check input { margin-top: 5px; width: 20px; height: 20px; accent-color: var(--teal-btn); flex: none; }
.check-title { display: block; font-size: 15px; font-weight: 700; }
.check-desc { display: block; font-size: 13px; color: var(--ink-68); }

/* ---------- misc ---------- */
.loading { padding: 64px 24px; text-align: center; color: var(--ink-62); font-size: 15px; }
.toast {
  position: fixed; inset-inline: 0; bottom: 24px; margin: 0 auto; width: max-content; max-width: calc(100% - 32px);
  padding: 12px 20px; border-radius: 999px; background: var(--navy); color: var(--paper);
  font-size: 14px; font-weight: 600; box-shadow: 0 8px 24px rgba(13, 31, 47, 0.25); z-index: 20;
}

@media (max-width: 640px) {
  .auth-form { padding: 24px 20px 32px; }
  .auth-side { padding: 40px 24px; }
  .auth-side h2 { font-size: 28px; }
  .auth-box h1 { font-size: 26px; }
  .topbar-in { padding: 12px 16px; gap: 12px; }
  .page { padding: 24px 16px 40px; }
  .card { padding: 20px; }
  .t-head { padding: 20px; }
  .page-title { font-size: 26px; }
  .center-page { padding: 20px 16px; }
  .center-card { padding: 24px; }
  .me-text { display: none; }
  /* the ticket list becomes stacked cards */
  .table { min-width: 0; }
  .thead { display: none; }
  .trow {
    grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 16px;
    grid-template-areas: 'ref status' 'title title' 'product date';
  }
  .trow .t-ref { grid-area: ref; }
  .trow .c-status { grid-area: status; }
  .trow .t-title { grid-area: title; }
  .trow .c-product { grid-area: product; font-size: 14px; }
  .trow .t-date { grid-area: date; }
  .trow .c-by { display: none; }
}

/* ======================================================================
   Admin panel
   ====================================================================== */
.admin { min-height: 100vh; display: flex; flex-wrap: wrap; }
.side {
  flex: 1 1 240px; min-width: 0; padding: 24px 18px;
  display: flex; flex-direction: column; gap: 28px;
  background: var(--grad); color: var(--paper);
}
.side-brand { display: flex; align-items: center; gap: 12px; }
.side-logo {
  flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--paper);
  display: flex; align-items: center; justify-content: center;
}
.side-logo img { height: 26px; width: auto; }
.side-name { font-family: var(--font-latin); font-size: 16px; font-weight: 600; letter-spacing: 0.18em; line-height: 1.5; }
.side-sub { font-size: 12px; color: var(--mint); line-height: 1.5; }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-nav a {
  display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 14px; border-radius: 12px;
  color: rgba(247, 247, 245, 0.78); font-size: 15px; font-weight: 600; text-decoration: none;
}
.side-nav a:hover { color: var(--paper); background: rgba(255, 255, 255, 0.06); }
.side-nav a[aria-current='page'] { background: rgba(126, 209, 198, 0.16); color: var(--paper); font-weight: 700; }
.side-nav a[aria-current='page'] svg { stroke: var(--mint); }
.side-count {
  margin-inline-start: auto; min-width: 22px; padding: 0 6px; border-radius: 999px;
  background: var(--mint); color: var(--navy);
  font-family: var(--font-latin); font-size: 12px; font-weight: 600; text-align: center;
}
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.side-me { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.08); }
.side-me .avatar { width: 38px; height: 38px; background: var(--mint); color: var(--navy); }
.side-me-name { font-size: 14px; font-weight: 700; line-height: 1.5; }
.side-me-role { font-size: 12px; color: rgba(247, 247, 245, 0.75); line-height: 1.5; }
.side-foot .lang { align-self: flex-start; background: rgba(255, 255, 255, 0.1); }
.side-foot .lang button { color: rgba(247, 247, 245, 0.78); }
.side-foot .lang button[aria-pressed='true'] { background: var(--mint); color: var(--navy); }
.side-out {
  align-self: flex-start; border: 0; background: none; padding: 0; min-height: 44px; cursor: pointer;
  color: rgba(247, 247, 245, 0.78); font-size: 14px; font-weight: 600;
}
.side-out:hover { color: var(--paper); }

.amain { flex: 999 1 560px; min-width: 0; padding: 28px 32px 48px; display: flex; flex-direction: column; gap: 22px; }
.amain-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.amain-title { font-size: 28px; font-weight: 700; }
.amain-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.amain-tools .search { flex: 0 1 320px; width: 320px; min-width: 180px; }
.amain-tools .search input { height: 46px; }
.btn-46 { min-height: 46px; padding: 0 22px; font-size: 15px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.stat {
  background: var(--white); border: 1px solid var(--line); border-radius: 16px;
  padding: 18px 20px; display: flex; flex-direction: column; gap: 4px;
}
.stat-label { font-size: 13px; font-weight: 600; color: var(--ink-68); }
.stat-value { font-family: var(--font-latin); font-size: 32px; font-weight: 600; line-height: 1.3; }
.stat.bad { background: #FBE9E6; border-color: rgba(140, 29, 18, 0.25); }
.stat.bad .stat-label { font-weight: 700; color: var(--red-fg); }
.stat.bad .stat-value { color: var(--red-fg); }

.filters { display: flex; gap: 10px; flex-wrap: wrap; }
.filters select {
  height: 44px; padding: 0 14px; border: 1px solid rgba(13, 31, 47, 0.18); border-radius: 999px;
  background: var(--white); font-size: 14px; font-weight: 600; color: var(--navy);
}
.atable { min-width: 900px; }
.arow {
  display: grid; grid-template-columns: 96px minmax(0, 2.4fr) minmax(0, 1.2fr) 96px 132px 110px 130px;
  gap: 14px; align-items: center; padding: 16px 22px;
  border-bottom: 1px solid rgba(13, 31, 47, 0.08); font-size: 14px;
}
.arow:last-child { border-bottom: 0; }
.arow.thead { padding: 14px 22px; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--ink-62); }
.arow .t-ref { font-size: 14px; }
.a-title { display: block; font-size: 15px; font-weight: 700; color: var(--navy); text-decoration: none; line-height: 1.6; overflow-wrap: anywhere; }
.a-title:hover { color: var(--teal-btn); }
.a-sub { font-size: 13px; color: var(--ink-68); }
.a-strong { font-weight: 600; }
.a-none { color: var(--ink-68); }
.sla-late { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--red-fg); }

.badge-sm { padding: 4px 12px; }
.pr-urgent { background: var(--red-bg); color: var(--red-fg); }
.pr-high { background: var(--amber-bg); color: var(--amber-fg); }
.pr-normal { background: rgba(13, 31, 47, 0.08); color: var(--navy); }
.pr-low { background: rgba(13, 31, 47, 0.05); color: var(--ink-72); }
.badge-esc { background: var(--red-bg); color: var(--red-fg); }
.badge-line {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line-strong); background: var(--white); color: var(--navy);
}

/* admin ticket page */
.a-head { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.a-head-badges { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.a-head h1 { font-size: 24px; font-weight: 700; line-height: 1.5; overflow-wrap: anywhere; }
.a-cols { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.a-col-main { flex: 999 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.a-col-side { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.amsg { padding: 20px 22px; gap: 10px; }
.amsg .avatar { width: 38px; height: 38px; }
.amsg .msg-body { font-size: 15px; }
.amsg-staff { border-color: rgba(20, 143, 138, 0.35); }
.amsg-staff .avatar { background: var(--mint); color: var(--navy); }
.amsg-role { font-size: 13px; font-weight: 600; color: var(--ink-62); }
.note { background: #FFF8EA; border: 1px dashed var(--amber-line); }
.note-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.note-tag { font-size: 13px; font-weight: 700; color: var(--amber-fg); }
.sysline {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 18px; border-radius: 14px;
  background: rgba(13, 31, 47, 0.05); font-size: 14px; color: rgba(13, 31, 47, 0.78);
}
.acomposer { padding: 18px 22px 20px; gap: 14px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab {
  cursor: pointer; min-height: 44px; padding: 0 18px; border-radius: 999px;
  border: 1px solid rgba(13, 31, 47, 0.18); background: var(--white); color: var(--navy);
  font-size: 14px; font-weight: 600;
}
.tab[aria-pressed='true'] { border-color: var(--navy); background: var(--navy); color: var(--paper); font-weight: 700; }
.acomposer .textarea { font-size: 15px; }
.acomposer.is-note .textarea { background: #FFF8EA; border-color: var(--amber-line); }
.btn-48 { min-height: 48px; font-size: 15px; }
.btn-teal-line { background: var(--white); color: var(--teal-deep); border: 1px solid var(--teal-btn); }
.btn-teal-line:hover { background: rgba(126, 209, 198, 0.16); color: var(--teal-deep); }
.side-card { padding: 20px; gap: 12px; }
.side-card h2 { font-size: 15px; }
.side-card .field { gap: 6px; }
.side-card .field > label { font-size: 13px; }
.side-card .select { height: 46px; padding: 0 12px; font-size: 15px; }
.sla-card { background: var(--grad); color: var(--paper); border: 0; }
.sla-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.sla-row .k { color: rgba(247, 247, 245, 0.78); }
.sla-row .v { font-weight: 700; }
.sla-row .v.good { color: var(--mint); }
.sla-row .v.late { color: #FFB4A8; }
.side-card .kv { gap: 10px; }
.log { display: flex; flex-direction: column; gap: 10px; font-size: 13px; line-height: 1.7; }
.log b { font-weight: 700; }
.soon { padding: 56px 24px; text-align: center; color: var(--ink-68); font-size: 15px; }

/* admin sign-in */
.alogin {
  min-height: 100vh; padding: 32px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  color: var(--paper); background: var(--grad);
}
.alogin-brand { display: flex; align-items: center; gap: 14px; }
.alogin-logo {
  width: 56px; height: 56px; border-radius: 16px; background: var(--paper);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 6px rgba(126, 209, 198, 0.14);
}
.alogin-logo img { height: 32px; width: auto; }
.alogin-card {
  width: 100%; max-width: 440px; padding: 36px; border-radius: 22px;
  background: var(--white); color: var(--navy); display: flex; flex-direction: column; gap: 20px;
}
.alogin-card h1 { font-size: 26px; font-weight: 700; line-height: 1.4; }
.alogin-card .field > label { font-weight: 600; }
.alogin-card .input { height: 52px; }
.alogin-foot { font-size: 14px; color: rgba(247, 247, 245, 0.78); text-align: center; }
.alogin-foot a { color: var(--mint); font-family: var(--font-latin); font-weight: 600; }

@media (min-width: 861px) {
  /* the side navigation stays in view while a long page scrolls */
  .side { position: sticky; top: 0; height: 100vh; align-self: flex-start; overflow-y: auto; max-width: 280px; }
}
@media (max-width: 860px) {
  .side { flex-basis: 100%; gap: 16px; padding: 16px; }
  .side-nav { flex-direction: row; flex-wrap: wrap; }
  .side-nav a { min-height: 44px; padding: 0 12px; }
  .side-foot { margin-top: 0; flex-direction: row; align-items: center; flex-wrap: wrap; }
  .amain { padding: 20px 16px 40px; }
  .alogin { padding: 20px 16px; }
  .alogin-card { padding: 24px; }
}
