@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;600&display=swap');

:root {
  color-scheme: dark;
  --bg: #050505;
  --bg-soft: #0a0a09;
  --surface: #11110f;
  --surface-2: #171714;
  --surface-3: #1d1c19;
  --text: #fff7eb;
  --muted: #aaa49a;
  --quiet: #6f6c66;
  --line: #302e29;
  --line-strong: #454139;
  --accent: #e7b86b;
  --accent-deep: #a97832;
  --green: #48c978;
  --blue: #63a4ff;
  --red: #ff655f;
  --yellow: #f2b941;
  --gutter: clamp(20px, 3vw, 44px);
  font-family: "Hanken Grotesk", Inter, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--bg); color: var(--text); }
button, input, textarea, select { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
button { color: inherit; }

::selection { background: var(--accent); color: #16130f; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.eyebrow {
  color: var(--accent);
  font: 600 11px/1.2 "JetBrains Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.brand { display: inline-flex; align-items: flex-end; gap: 12px; }
.brand img { width: 118px; height: auto; }
.brand span { color: var(--muted); font-size: 13px; line-height: 1; margin-bottom: 2px; }

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 0 18px;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}
.button:hover { border-color: var(--accent); }
.button:active { transform: translateY(1px); }
.button--primary { background: var(--accent); border-color: var(--accent); color: #17130d; }
.button--primary:hover { background: #f0c57e; border-color: #f0c57e; }
.button--ghost { color: var(--muted); }
.button--large { min-height: 56px; padding-inline: 26px; }
.icon-button {
  width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 4px; background: transparent;
  color: var(--muted); font-size: 22px; display: inline-grid; place-items: center; cursor: pointer;
}
.icon-button:hover { color: var(--text); border-color: var(--accent); }

.public-header, .portal-header {
  height: 92px; padding: 0 var(--gutter); display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line); background: rgba(5,5,5,.92); position: relative; z-index: 10;
}
.public-footer { min-height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 var(--gutter); border-top: 1px solid var(--line); color: var(--quiet); font-size: 13px; }

.support-home { min-height: calc(100vh - 164px); display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(360px, .7fr); }
.support-home__intro { padding: clamp(80px, 12vh, 150px) var(--gutter); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.support-home__intro h1 { max-width: 900px; margin: 20px 0 28px; font-size: clamp(58px, 8vw, 126px); line-height: .84; font-weight: 800; }
.support-home__intro > p:not(.eyebrow) { max-width: 620px; margin-bottom: 38px; color: var(--muted); font-size: clamp(18px, 2vw, 25px); line-height: 1.45; }
.support-home__rail { display: grid; border-left: 1px solid var(--line); }
.support-home__rail div { padding: clamp(32px, 5vw, 64px); border-bottom: 1px solid var(--line); display: grid; align-content: center; }
.support-home__rail div:last-child { border: 0; }
.support-home__rail span { font: 600 11px "JetBrains Mono", monospace; color: var(--accent); }
.support-home__rail strong { margin-top: 18px; font-size: clamp(22px, 2vw, 32px); }
.support-home__rail p { max-width: 390px; margin: 10px 0 0; color: var(--muted); line-height: 1.55; }

@media (min-width: 681px) {
  body.home-page { height:100vh;height:100dvh;min-height:0;overflow:hidden;display:grid;grid-template-rows:92px minmax(0,1fr) 72px; }
  .home-page .public-header,.home-page .public-footer{height:100%;min-height:0;}
  .home-page .support-home{height:100%;min-height:0;overflow:hidden;}
  .home-page .support-home__intro{min-height:0;padding:clamp(24px,5vh,58px) var(--gutter);}
  .home-page .support-home__intro h1{margin:clamp(10px,2vh,20px) 0 clamp(14px,2.5vh,26px);font-size:clamp(48px,min(7vw,10vh),112px);}
  .home-page .support-home__intro>p:not(.eyebrow){margin-bottom:clamp(18px,3vh,34px);font-size:clamp(17px,min(1.7vw,2.8vh),24px);}
  .home-page .support-home__rail{min-height:0;grid-template-rows:repeat(3,minmax(0,1fr));}
  .home-page .support-home__rail div{min-height:0;padding:clamp(16px,3vh,34px) clamp(24px,3.5vw,52px);}
  .home-page .support-home__rail strong{margin-top:clamp(6px,1.4vh,14px);font-size:clamp(20px,min(1.8vw,3vh),30px);}
  .home-page .support-home__rail p{margin-top:clamp(4px,1vh,9px);font-size:clamp(13px,min(1vw,1.9vh),16px);line-height:1.4;}
}

.ticket-form-wrap { width: min(1050px, calc(100% - 40px)); margin: 0 auto; padding: 80px 0 120px; }
.form-heading { display: grid; grid-template-columns: 90px 1fr; gap: 30px; margin-bottom: 70px; }
.step-number { color: var(--accent); font: 600 12px "JetBrains Mono", monospace; padding-top: 13px; }
.form-heading h1 { max-width: 760px; margin-bottom: 16px; font-size: clamp(42px, 6vw, 76px); line-height: .98; }
.form-heading p { color: var(--muted); font-size: 19px; }
.ticket-form { margin-left: 120px; }
.ticket-form fieldset { margin: 0; padding: 48px 0; border: 0; border-top: 1px solid var(--line); }
.ticket-form legend { float: left; width: 220px; font-size: 14px; font-weight: 700; }
.ticket-form fieldset > :not(legend) { margin-left: 240px; }
.ticket-form label, .login-panel label, .detail-pane--form label, .template-form label { display: grid; gap: 9px; margin-bottom: 18px; color: var(--muted); font-size: 13px; font-weight: 600; }
.ticket-form label em { color: var(--quiet); font-style: normal; font-weight: 400; }
input, textarea, select {
  width: 100%; border: 1px solid var(--line); border-radius: 3px; background: var(--bg-soft); color: var(--text);
  padding: 14px 15px; min-height: 50px; outline: none; transition: border-color 160ms ease, background 160ms ease;
}
textarea { resize: vertical; line-height: 1.55; }
input:focus, textarea:focus, select:focus { border-color: var(--accent-deep); background: #0d0d0b; }
input::placeholder, textarea::placeholder { color: #68655e; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice { margin: 0 !important; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span { min-height: 104px; display: grid; align-content: center; gap: 7px; padding: 20px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
.choice strong { color: var(--text); font-size: 17px; }
.choice small { color: var(--muted); font-weight: 400; }
.choice input:checked + span { border-color: var(--accent); box-shadow: inset 3px 0 var(--accent); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.upload-control input, .file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-control span { min-height: 50px; display: flex; align-items: center; padding: 0 15px; border: 1px dashed var(--line-strong); color: var(--muted); }
.form-submit { margin-left: 240px; padding-top: 36px; display: flex; align-items: center; justify-content: space-between; gap: 32px; border-top: 1px solid var(--line); }
.form-submit p { max-width: 440px; margin: 0; color: var(--quiet); font-size: 12px; line-height: 1.55; }
.honeypot { position: absolute !important; left: -9999px !important; }

.flash { margin: 12px auto; padding: 14px 18px; border-left: 3px solid var(--blue); background: #11151a; color: var(--text); }
.flash--success { border-color: var(--green); background: #0d1711; }
.flash--error { border-color: var(--red); background: #1a0f0e; }
.flash--warning { border-color: var(--yellow); background: #19150d; }
.admin-shell > .flash { position: fixed; top: 76px; right: 28px; z-index: 100; max-width: 440px; box-shadow: 0 18px 50px #0009; }

.success-page, .offline-page { display: grid; place-items: center; }
.success-state, .offline-state { width: min(700px, calc(100% - 40px)); text-align: center; padding: 80px 20px; }
.success-state h1, .offline-state h1 { margin: 20px 0; font-size: clamp(48px, 8vw, 88px); line-height: .93; }
.success-state > p:not(.eyebrow), .offline-state p { color: var(--muted); font-size: 18px; }
.success-state small { display: block; max-width: 470px; margin: 30px auto 0; color: var(--quiet); }
.success-mark { width: 70px; height: 70px; display: grid; place-items: center; margin: 0 auto 35px; border: 1px solid var(--accent); border-radius: 50%; color: var(--accent); font-size: 28px; }
.offline-state img { width: 130px; margin: 0 auto 70px; }

.portal-status { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 14px; }
.portal-layout { width: min(920px, calc(100% - 40px)); margin: 0 auto; padding: 70px 0 110px; }
.portal-ticket-head { padding-bottom: 42px; border-bottom: 1px solid var(--line); }
.back-link { display: inline-block; margin-bottom: 40px; color: var(--muted); font-size: 14px; }
.portal-ticket-head h1 { max-width: 820px; margin: 14px 0 28px; font-size: clamp(38px, 6vw, 68px); line-height: 1; }
.ticket-meta { display: flex; flex-wrap: wrap; gap: 10px 28px; color: var(--quiet); font-size: 13px; }
.conversation { display: grid; gap: 16px; padding: 48px 0; }
.message { width: min(78%, 680px); padding: 26px; border: 1px solid var(--line); background: var(--surface); }
.message--admin { justify-self: end; border-color: #554127; background: #15120d; }
.message header, .detail-message header { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.message header div, .detail-message header div { display: grid; }
.message header small, .detail-message header small { color: var(--quiet); font-size: 11px; }
.avatar { flex: 0 0 auto; width: 34px; height: 34px; border: 1px solid var(--line-strong); border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-weight: 700; }
.message__body { color: #d9d4cb; line-height: 1.65; }
.attachments { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.attachments a { min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.attachments a small { display: block; color: var(--quiet); }
.reply-box { position: sticky; bottom: 14px; padding: 22px; border: 1px solid var(--line-strong); background: rgba(15,15,13,.97); box-shadow: 0 18px 50px #0008; }
.reply-box > label { display: block; margin-bottom: 10px; font-weight: 700; }
.reply-box textarea { border: 0; padding: 0; min-height: 110px; background: transparent; }
.reply-box__actions, .composer-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.file-button { color: var(--muted); cursor: pointer; font-size: 13px; }
.closed-notice { padding: 24px; border: 1px solid var(--line); color: var(--muted); text-align: center; }

.login-layout { min-height: 100vh; display: grid; grid-template-columns: 1.35fr minmax(420px, .65fr); }
.login-brand { padding: 46px var(--gutter); display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--line); background: radial-gradient(circle at 65% 45%, #18140d 0, #050505 43%); }
.login-brand h1 { margin: 20px 0 0; font-size: clamp(52px, 7vw, 110px); line-height: .86; }
.login-brand > small { color: var(--quiet); }
.login-panel { display: grid; place-items: center; padding: 40px; }
.login-panel form { width: min(100%, 420px); }
.login-panel h2 { margin-bottom: 8px; font-size: 34px; }
.login-panel p { margin-bottom: 32px; color: var(--muted); }
.login-panel .button { width: 100%; margin-top: 8px; }
.privacy-note { display:block;margin-top:18px;color:var(--quiet);line-height:1.5; }
.verified-customer { margin-left:240px;padding:24px;border:1px solid rgba(230,183,104,.35);background:rgba(230,183,104,.06);display:grid;gap:6px; }
.verified-customer span { width:max-content;padding:5px 9px;background:#243426;color:#8fd0a6;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.08em; }
.verified-customer strong { font-size:20px;color:var(--text); }
.verified-customer small { color:var(--muted); }

.admin-page { overflow: hidden; }
.admin-nav { position: fixed; inset: 0 auto 0 0; width: 214px; display: flex; flex-direction: column; justify-content: space-between; padding: 26px 12px 22px; border-right: 1px solid var(--line); background: #030303; z-index: 50; }
.admin-nav .brand { padding: 0 14px; }
.admin-nav .brand img { width: 112px; }
.admin-nav .brand span { display: none; }
.admin-nav nav { display: grid; gap: 4px; margin-top: 40px; }
.admin-nav nav a { min-height: 48px; display: flex; align-items: center; gap: 14px; padding: 0 14px; border-left: 2px solid transparent; border-radius: 3px; color: var(--muted); }
.admin-nav nav a span { width: 22px; color: var(--quiet); text-align: center; }
.admin-nav nav a:hover, .admin-nav nav a.is-active { color: var(--text); background: var(--surface); border-left-color: var(--accent); }
.admin-nav nav a.is-active span { color: var(--accent); }
.admin-nav nav .app-switch { width:100%;min-width:0;display:grid;grid-template-columns:22px minmax(0,1fr);column-gap:12px;row-gap:1px;margin-top:18px;border:1px solid rgba(230,183,104,.38);border-left:2px solid var(--accent);background:linear-gradient(135deg,rgba(230,183,104,.14),rgba(230,183,104,.035));color:var(--text);box-shadow:0 10px 28px #0005;overflow:hidden; }.admin-nav nav .app-switch span{grid-row:1/3;color:var(--accent);font-size:18px}.admin-nav nav .app-switch strong,.admin-nav nav .app-switch small{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.admin-nav nav .app-switch strong{font-size:13px}.admin-nav nav .app-switch small{color:var(--accent);font-size:9px;font-weight:750;letter-spacing:.07em;text-transform:uppercase}.admin-nav nav .app-switch:hover{border-color:rgba(230,183,104,.7);background:linear-gradient(135deg,rgba(230,183,104,.22),rgba(230,183,104,.06));transform:translateY(-1px)}
.admin-nav__foot { padding: 18px 14px 0; border-top: 1px solid var(--line); display: grid; gap: 18px; color: var(--quiet); font-size: 13px; }
.online-state { display: flex; align-items: center; gap: 8px; }
.online-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px #48c97888; }
.pwa-install { min-height:36px;padding:0 13px;border:1px solid var(--line-strong);border-radius:4px;background:var(--surface);color:var(--accent);font-size:12px;cursor:pointer; }
.pwa-connection { display:flex;align-items:center;gap:7px;color:var(--muted);font-size:11px;white-space:nowrap; }.pwa-connection i{width:7px;height:7px;border-radius:50%;background:var(--green);box-shadow:0 0 10px #48c97888}.pwa-connection.is-offline i{background:var(--red);box-shadow:0 0 10px #ff6b6b77}
.pwa-toast { position:fixed;right:22px;bottom:22px;z-index:120;max-width:min(440px,calc(100vw - 32px));display:flex;align-items:center;gap:12px;padding:14px 14px 14px 16px;border:1px solid var(--line-strong);border-radius:5px;background:#151513;color:var(--text);box-shadow:0 18px 60px #000a;font-size:13px;line-height:1.4}.pwa-toast>span{flex:1}.pwa-toast button{min-height:34px;padding:0 10px;border:1px solid var(--accent);border-radius:3px;background:transparent;color:var(--accent);white-space:nowrap;cursor:pointer}.pwa-toast .pwa-toast__close{width:30px;padding:0;border-color:transparent;color:var(--muted);font-size:20px}
.is-standalone body { padding-top:env(safe-area-inset-top); }
.admin-shell { height: 100vh; margin-left: 214px; background: var(--bg-soft); }
.admin-topbar { height: 72px; display: flex; align-items: center; justify-content: flex-end; gap: 28px; padding: 0 24px; border-bottom: 1px solid var(--line); background: #080808; }
.admin-search { width: min(560px, 52vw); display: flex; align-items: center; gap: 10px; margin-right: auto; margin-left: 10px; border: 1px solid var(--line); border-radius: 4px; padding: 0 13px; }
.admin-search input { min-height: 42px; padding: 0; border: 0; background: transparent; }
.admin-profile { display: flex; align-items: center; gap: 10px; }
.admin-profile .avatar { width: 32px; height: 32px; font-size: 12px; }
.notification { color: var(--accent); font-size: 10px; }
.mobile-menu, .mobile-admin-brand, .mobile-bottom, .mobile-search, .mobile-chevron, .mobile-stats { display: none; }
.admin-content { height: calc(100vh - 72px); overflow: auto; padding: 32px clamp(24px, 3vw, 52px) 60px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.page-heading h1 { margin: 6px 0 0; font-size: clamp(38px, 4vw, 56px); line-height: 1; }
.metric-strip { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); }
.metric-strip > div { min-height: 140px; display: grid; grid-template-columns: auto 1fr; align-content: center; gap: 12px; padding: 22px; border-right: 1px solid var(--line); background: var(--surface); }
.metric-strip > div:last-child { border: 0; }
.metric-strip small { color: var(--muted); }
.metric-strip strong { grid-column: 1 / -1; font-size: 40px; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--quiet); }
.status--new { background: var(--blue); }.status--open { background: var(--yellow); }.status--waiting { background: #8e91ff; }.status--resolved { background: var(--green); }.status--closed { background: var(--quiet); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .55fr); gap: 20px; margin-top: 22px; }
.recent-list, .work-pulse { border: 1px solid var(--line); background: var(--surface); }
.section-title { height: 66px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.section-title h2 { margin: 0; font-size: 18px; }.section-title a { color: var(--accent); font-size: 13px; }
.recent-list > a { min-height: 72px; padding: 0 20px; display: grid; grid-template-columns: 10px minmax(0,1fr) auto 15px; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); }
.recent-list > a:last-child { border: 0; }.recent-list > a:hover { background: var(--surface-2); }
.recent-list a span:nth-child(2) { display: grid; gap: 3px; min-width: 0; }.recent-list small { color: var(--quiet); }.recent-list strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.recent-list time { color: var(--muted); font-size: 12px; }
.work-pulse { padding: 28px; display: flex; flex-direction: column; justify-content: center; }.work-pulse strong { font-size: 84px; line-height: .9; }.work-pulse > span { margin: 10px 0 26px; color: var(--accent); }.work-pulse > p:not(.eyebrow) { color: var(--muted); line-height: 1.55; }

.ticket-workspace { height: calc(100vh - 72px); display: grid; grid-template-columns: minmax(620px, 1fr); }
.ticket-workspace.has-detail { grid-template-columns: minmax(620px, 1.25fr) minmax(440px, .75fr); }
.ticket-list-pane { min-width: 0; overflow: auto; padding: 28px 22px 50px; }
.filter-tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.filter-tabs a { min-height: 45px; display: inline-flex; align-items: center; gap: 8px; padding: 0 16px; color: var(--muted); border-bottom: 2px solid transparent; }
.filter-tabs a span { min-width: 22px; padding: 2px 6px; border-radius: 12px; background: var(--surface-3); font-size: 11px; text-align: center; }
.filter-tabs a.is-active { color: var(--text); border-bottom-color: var(--accent); }
.ticket-table { min-width: 850px; }
.ticket-table__head, .ticket-row { display: grid; grid-template-columns: 120px minmax(210px,1.5fr) minmax(130px,.8fr) 145px 86px 92px; gap: 12px; align-items: center; padding: 0 12px; }
.ticket-table__head { min-height: 44px; color: var(--quiet); font-size: 11px; }
.ticket-row { min-height: 70px; border-top: 1px solid var(--line); font-size: 13px; }
.ticket-row:hover, .ticket-row.is-selected { background: var(--surface); }
.ticket-row.is-selected { box-shadow: inset 2px 0 var(--accent); }
.ticket-row > strong { font-size: 14px; line-height: 1.25; }.ticket-row > span { color: var(--muted); }.ticket-row > span:nth-of-type(3) { display: flex; align-items: center; gap: 8px; }.ticket-row time { color: var(--quiet); }
.ticket-number { display: flex; align-items: center; gap: 9px; font-family: "JetBrains Mono", monospace; font-size: 11px; }
.priority { padding-left: 12px; position: relative; }.priority::before { content:""; position:absolute; left:0; top:50%; width:6px; height:6px; border-radius:50%; background:var(--blue); transform:translateY(-50%); }.priority--high::before,.priority--urgent::before{background:var(--red)}.priority--low::before{background:var(--green)}
.empty-state { padding: 80px 20px; text-align: center; color: var(--muted); }.empty-state strong { color: var(--text); font-size: 22px; }

.detail-pane { height: calc(100vh - 72px); display: flex; flex-direction: column; border-left: 1px solid var(--line); background: #0c0c0b; overflow: hidden; }
.detail-head { min-height: 142px; padding: 22px; display: grid; grid-template-columns: 1fr auto; gap: 12px; border-bottom: 1px solid var(--line); }
.detail-head > div p { margin: 0 0 8px; color: var(--muted); font: 500 11px "JetBrains Mono", monospace; }.detail-head h2 { margin: 0 0 7px; font-size: 22px; line-height: 1.1; }.detail-head > div span { color: var(--muted); font-size: 13px; }.detail-back { display: none; }
.ticket-controls { min-height: 72px; display: grid; grid-template-columns: 1fr 1fr 1fr 1fr 44px; gap: 8px; align-items: end; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.ticket-controls label { display: grid; gap: 3px; color: var(--quiet); font-size: 10px; }.ticket-controls select,.ticket-controls input { min-height: 38px; padding: 6px 8px; font-size: 12px; }
.detail-conversation { flex: 1; overflow: auto; padding: 20px; }
.detail-message { padding: 18px 0; border-bottom: 1px solid var(--line); color: #d5d1ca; font-size: 14px; line-height: 1.55; }.detail-message.is-internal { margin: 10px 0; padding: 16px; border: 1px solid #5f4725; background: #171209; }.detail-message.is-internal strong { color: var(--accent); }
.admin-composer { flex: 0 0 auto; margin: 0 12px 12px; border: 1px solid var(--line-strong); background: var(--surface); }
.composer-tabs { display: flex; border-bottom: 1px solid var(--line); }.composer-tabs button { min-height: 42px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); cursor:pointer; }.composer-tabs button.is-active { color: var(--accent); border-bottom-color: var(--accent); }
.admin-composer select { min-height: 36px; border-width: 0 0 1px; font-size: 12px; }.admin-composer textarea { min-height: 100px; border: 0; background: transparent; }.composer-actions { padding: 10px; }
.detail-pane--form { overflow: auto; padding: 24px; }.detail-pane--form header { margin-bottom: 26px; }.detail-pane--form header .icon-button { float: right; }.detail-pane--form h2 { font-size: 36px; }.detail-pane--form form { display: grid; }.detail-pane--form .button { margin-top: 8px; }
.form-hint { margin:-4px 0 18px; color:var(--quiet); font-size:12px; line-height:1.5; }

.customer-list, .template-list, .template-form { border: 1px solid var(--line); background: var(--surface); }
.customer-list__head, .customer-list > div:not(.customer-list__head) { min-height: 66px; display: grid; grid-template-columns: minmax(220px,1.3fr) minmax(220px,1fr) 90px 140px; gap: 18px; align-items: center; padding: 0 22px; border-bottom: 1px solid var(--line); }.customer-list__head { min-height: 44px; color: var(--quiet); font-size: 11px; }.customer-list > div:last-child { border:0; }.customer-list span { display:grid; }.customer-list small { color:var(--quiet); }.customer-list a { color:var(--muted); }.customer-list time { color:var(--quiet); }
.customer-list > .is-disabled { opacity:.48; }
.template-grid { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(340px,.65fr); gap: 20px; }.template-list article { min-height: 120px; padding: 20px; display:flex; justify-content:space-between; gap:16px; border-bottom:1px solid var(--line); }.template-list article:last-child{border:0}.template-list article div{display:grid;gap:5px}.template-list small,.template-list p{color:var(--muted)}.template-list p{margin:8px 0 0}.template-form{padding:24px}.template-form h2{margin-bottom:22px}

@media (max-width: 1100px) {
  .ticket-workspace.has-detail { grid-template-columns: minmax(0, 1fr) minmax(390px, .85fr); }
  .ticket-table { min-width: 0; }
  .ticket-table__head { display: none; }
  .ticket-row { grid-template-columns: minmax(0,1fr) 95px; min-height: 86px; padding: 14px; }
  .ticket-row > * { display: none !important; }
  .ticket-row > strong, .ticket-row > time { display: block !important; }
  .ticket-row > strong::before { content: attr(data-ticket); }
  .ticket-row > strong { font-size: 15px; }.ticket-row time { text-align:right; }.ticket-row .ticket-number { display:flex !important; grid-row:2; }
  .metric-strip > div { min-height: 115px; }
}

@media (max-width: 820px) {
  body.admin-page { overflow: auto; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .admin-nav { width: min(82vw, 320px); transform: translateX(-102%); transition: transform 200ms ease; box-shadow: 18px 0 50px #000b; }.admin-nav.is-open { transform:none; }
  .admin-shell { height:auto; min-height:100vh; margin-left:0; }.admin-topbar { height:68px; padding:0 18px; position:sticky; top:0; z-index:30; }.admin-search,.pwa-install { display:none; }.pwa-connection span{display:none}.admin-profile strong,.notification { display:none; }.mobile-menu{display:block;border:0;background:none;color:var(--text);font-size:22px}.mobile-admin-brand{display:block;margin-left:14px}.mobile-admin-brand img{width:88px}.admin-profile{margin-left:auto}
  .admin-content { height:auto; overflow:visible; padding:26px 18px 40px; }.page-heading { align-items:center; }.page-heading h1 { font-size:38px; }.page-heading .button { width:44px;padding:0}.page-heading .button-label{display:none}.page-heading .button>span[aria-hidden]{font-size:22px}
  .mobile-bottom { position:fixed; inset:auto 0 0; height:calc(70px + env(safe-area-inset-bottom)); padding-bottom:env(safe-area-inset-bottom); display:grid; grid-template-columns:repeat(4,1fr); border-top:1px solid var(--line); background:rgba(5,5,5,.97); z-index:60; }.mobile-bottom a,.mobile-bottom button{border:0;background:none;color:var(--muted);display:grid;place-content:center;gap:3px;font-size:11px}.mobile-bottom span{font-size:21px}.mobile-bottom .is-active{color:var(--accent)}
  .metric-strip { grid-template-columns:1fr 1fr; }.metric-strip > div:nth-child(2){border-right:0}.metric-strip > div:nth-child(-n+2){border-bottom:1px solid var(--line)}.dashboard-grid{grid-template-columns:1fr}.work-pulse{min-height:260px}.recent-list > a{grid-template-columns:8px minmax(0,1fr) auto}.recent-list > a b{display:none}
  .ticket-workspace,.ticket-workspace.has-detail{height:auto;display:block}.ticket-list-pane{overflow:visible;padding:24px 18px 30px}.ticket-workspace.has-detail .ticket-list-pane{display:none}.ticket-workspace.auto-detail .ticket-list-pane{display:block}.ticket-workspace.auto-detail .detail-pane{display:none}.mobile-stats{display:flex;gap:18px;margin:0 0 20px;color:var(--muted);font-size:12px}.mobile-stats b{color:var(--text);font-size:18px}.filter-tabs{overflow:auto}.filter-tabs a{padding:0 14px;white-space:nowrap}.mobile-search{display:flex;margin:12px 0}.mobile-search input{border-radius:3px 0 0 3px}.mobile-search button{width:50px;border:1px solid var(--line);background:var(--surface);color:var(--text)}
  .ticket-row { display:grid;grid-template-columns:10px minmax(0,1fr) auto 16px;gap:10px;min-height:112px;padding:18px 0;border-top:1px solid var(--line);background:transparent!important;box-shadow:none!important}.ticket-row > *{display:none!important}.ticket-row .ticket-number{display:flex!important;grid-column:2;grid-row:1;font-size:11px;color:var(--quiet)}.ticket-row .ticket-number .status-dot{position:absolute;left:18px;width:10px;height:10px}.ticket-row>strong{display:block!important;grid-column:2;grid-row:2;font-size:17px}.ticket-row>span:nth-of-type(2){display:block!important;grid-column:2;grid-row:3;color:var(--muted)}.ticket-row>time{display:block!important;grid-column:3;grid-row:1/3;text-align:right;color:var(--muted)}.mobile-chevron{display:block!important;grid-column:4;grid-row:1/4;align-self:center;font-size:24px;font-weight:400}.detail-pane{height:calc(100vh - 68px - 70px);border-left:0}.detail-back{display:inline-block;grid-column:1/-1;color:var(--muted);font-size:13px}.detail-head{min-height:148px}.ticket-controls{overflow:auto;grid-template-columns:140px 120px 130px 130px 44px}.detail-conversation{padding:16px}.admin-composer{margin:0;border-inline:0;border-bottom:0}.detail-pane--form{height:auto;min-height:calc(100vh - 138px)}
  .customer-list__head{display:none}.customer-list>div:not(.customer-list__head){grid-template-columns:1fr auto;height:auto;padding:18px}.customer-list>div a{grid-column:1}.customer-list>div b{grid-column:2;grid-row:1}.customer-list>div time{grid-column:2;grid-row:2}.template-grid{grid-template-columns:1fr}.template-form{order:-1}
}

@media (max-width: 680px) {
  .pwa-toast{right:16px;bottom:calc(84px + env(safe-area-inset-bottom));align-items:flex-start;flex-wrap:wrap}.pwa-toast>span{flex-basis:calc(100% - 44px)}
  .public-header,.portal-header{height:76px}.brand img{width:102px}.brand span{font-size:11px}.public-header .button--ghost{width:44px;font-size:0}.public-header .button--ghost::after{content:'↗';font-size:16px}
  .support-home{display:block;min-height:auto}.support-home__intro{min-height:calc(100vh - 76px);padding:70px 20px}.support-home__intro h1{font-size:clamp(54px,17vw,78px)}.support-home__intro>p:not(.eyebrow){font-size:18px}.support-home__rail{border-left:0;border-top:1px solid var(--line)}.support-home__rail div{min-height:210px;padding:32px 20px}.public-footer{align-items:flex-start;flex-direction:column;justify-content:center;gap:8px;padding:20px}
  .ticket-form-wrap{width:calc(100% - 36px);padding:50px 0 90px}.form-heading{grid-template-columns:1fr;gap:12px;margin-bottom:45px}.step-number{padding:0}.form-heading h1{font-size:46px}.ticket-form{margin-left:0}.ticket-form fieldset{padding:34px 0}.ticket-form legend{float:none;width:auto;margin-bottom:24px}.ticket-form fieldset>:not(legend){margin-left:0}.verified-customer{margin-left:0}.choice-grid,.form-grid{grid-template-columns:1fr}.choice span{min-height:90px}.form-submit{margin-left:0;align-items:stretch;flex-direction:column}.form-submit .button{width:100%}
  .portal-layout{width:calc(100% - 36px);padding:44px 0 90px}.portal-ticket-head h1{font-size:42px}.message{width:92%;padding:20px}.reply-box{bottom:78px;margin-inline:-8px}.reply-box__actions{align-items:stretch;flex-direction:column}.reply-box__actions .button{width:100%}
  .login-layout{display:block;width:100vw;max-width:100%;overflow:hidden}.login-brand{width:100vw;min-height:46vh;padding:30px 22px;border-right:0;border-bottom:1px solid var(--line);overflow:hidden}.login-brand h1{max-width:calc(100vw - 44px);font-size:46px;line-height:.9;overflow-wrap:anywhere}.login-brand>small{display:block;width:calc(100vw - 44px);line-height:1.45;white-space:normal}.login-panel{display:block;width:100vw;min-width:0;padding:42px 22px;overflow:hidden}.login-panel form{display:block;min-width:0;width:calc(100vw - 44px);max-width:calc(100vw - 44px)}.login-panel h2{font-size:31px;overflow-wrap:anywhere}.login-panel p,.privacy-note{max-width:100%;overflow-wrap:anywhere}.login-panel input,.login-panel button{max-width:100%}
  .metric-strip>div{padding:16px}.metric-strip strong{font-size:34px}.recent-list> a{padding:0 14px}.recent-list time{display:none}
}

@media (prefers-reduced-motion: reduce) { *,*::before,*::after{scroll-behavior:auto!important;animation:none!important;transition:none!important} }
