:root {
  --bg: #050810;
  --bg-soft: #09111f;
  --panel: rgba(11, 19, 34, .86);
  --panel-solid: #0d1627;
  --panel-raised: #111d32;
  --line: rgba(151, 180, 226, .14);
  --line-strong: rgba(151, 180, 226, .25);
  --text: #f5f8ff;
  --muted: #98a8c1;
  --muted-strong: #bac6d8;
  --blue: #3389ff;
  --blue-strong: #146fe5;
  --blue-soft: rgba(51, 137, 255, .13);
  --cyan: #59c8ff;
  --green: #4dd59b;
  --yellow: #f1c65b;
  --orange: #ff9763;
  --red: #ff6475;
  --purple: #a68cff;
  --shadow: 0 24px 80px rgba(0, 0, 0, .38);
  --radius: 20px;
  --radius-small: 12px;
  --transition: 180ms ease;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: dark; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 6%, rgba(35, 111, 230, .14), transparent 26%),
    radial-gradient(circle at 90% 20%, rgba(36, 129, 255, .08), transparent 24%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .24;
  background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
p { color: var(--muted); }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.13; letter-spacing: -.025em; }
h1 { font-size: clamp(2.2rem, 5vw, 4.9rem); margin-bottom: 22px; }
h2 { font-size: clamp(1.55rem, 2.3vw, 2.25rem); margin-bottom: 10px; }
h3 { font-size: 1.06rem; margin-bottom: 8px; }
code { color: #b9d5ff; font-size: .78rem; }

.page-glow { position: fixed; width: 440px; height: 440px; border-radius: 50%; filter: blur(110px); pointer-events: none; opacity: .12; z-index: -1; }
.page-glow-one { background: #176de0; top: 5%; left: -220px; }
.page-glow-two { background: #267fff; right: -230px; bottom: 8%; }
.shell { width: min(1180px, calc(100% - 36px)); margin: 0 auto; position: relative; z-index: 1; }
.shell-wide { width: min(1450px, calc(100% - 36px)); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.inline-form { display: inline-flex; margin: 0; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 84px;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand img { width: 38px; height: 38px; object-fit: contain; }
.brand span { font-weight: 750; letter-spacing: -.02em; }
.brand small { color: var(--blue); font-size: .72rem; text-transform: uppercase; letter-spacing: .16em; font-weight: 800; padding-left: 10px; border-left: 1px solid var(--line-strong); }
.site-nav { display: flex; align-items: center; gap: 10px; }
.nav-link { color: var(--muted-strong); padding: 10px 12px; border-radius: 9px; font-size: .92rem; transition: var(--transition); }
.nav-link:hover, .nav-link.active { color: white; background: rgba(255,255,255,.045); }
.nav-user { max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: .86rem; padding: 0 8px; }

.button {
  border: 1px solid transparent;
  border-radius: 11px;
  min-height: 44px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 720;
  font-size: .92rem;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition), border-color var(--transition), box-shadow var(--transition), color var(--transition);
}
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button-primary { background: linear-gradient(135deg, var(--blue), var(--blue-strong)); color: white; box-shadow: 0 10px 30px rgba(36, 125, 255, .22); }
.button-primary:hover { box-shadow: 0 14px 34px rgba(36, 125, 255, .32); }
.button-ghost { background: rgba(255,255,255,.035); border-color: var(--line-strong); color: var(--text); }
.button-ghost:hover { background: rgba(255,255,255,.07); border-color: rgba(138,174,230,.38); }
.button-danger { background: rgba(255, 69, 89, .13); border-color: rgba(255, 100, 117, .35); color: #ff9eaa; }
.button-danger:hover { background: rgba(255, 69, 89, .2); }
.button-small { min-height: 37px; padding: 0 14px; font-size: .84rem; border-radius: 9px; }
.button-large { min-height: 53px; padding: 0 24px; }
.button-full { width: 100%; }

.eyebrow { color: #adcbf6; text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; font-weight: 850; display: inline-flex; align-items: center; gap: 9px; margin-bottom: 18px; }
.eyebrow > span { width: 23px; height: 2px; background: var(--blue); box-shadow: 0 0 12px var(--blue); }
.hero { min-height: 680px; display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(420px, .98fr); align-items: center; gap: clamp(45px, 7vw, 110px); padding: 70px 0 90px; }
.hero-copy h1 { max-width: 780px; }
.hero-copy > p { max-width: 670px; font-size: 1.13rem; color: #aab8cc; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 28px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 18px; color: #8ea1bd; font-size: .8rem; }
.trust-row span { display: inline-flex; align-items: center; gap: 7px; }
.trust-row span::before { content: "✓"; color: var(--green); font-weight: 900; }
.hero-visual { position: relative; min-height: 460px; display: flex; align-items: center; }
.support-card { border: 1px solid var(--line-strong); background: linear-gradient(145deg, rgba(17,30,53,.97), rgba(8,15,28,.95)); box-shadow: var(--shadow); border-radius: 24px; }
.support-card-main { width: 100%; padding: 27px; position: relative; overflow: hidden; }
.support-card-main::after { content: ""; position: absolute; right: -90px; top: -90px; width: 220px; height: 220px; border-radius: 50%; background: rgba(46,126,242,.12); filter: blur(20px); }
.support-card-top { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.support-card-top > div:nth-child(2) { display: grid; margin-right: auto; }
.support-card-top strong { font-size: .94rem; }
.support-card-top span:not(.badge) { color: var(--muted); font-size: .76rem; }
.mini-logo { width: 42px; height: 42px; padding: 8px; border-radius: 12px; background: rgba(255,255,255,.05); border: 1px solid var(--line); }
.support-card h3 { margin-top: 35px; font-size: 1.38rem; }
.support-card p { font-size: .9rem; max-width: 92%; }
.ticket-progress { display: flex; align-items: flex-start; margin: 32px 0 30px; }
.progress-step { display: grid; place-items: center; gap: 8px; color: #667793; min-width: 66px; }
.progress-step span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-strong); background: #0c1526; font-size: .8rem; font-weight: 800; }
.progress-step small { font-size: .7rem; }
.progress-step.complete, .progress-step.active { color: #d9e9ff; }
.progress-step.complete span { color: white; background: var(--blue); border-color: var(--blue); }
.progress-step.active span { color: var(--blue); border-color: var(--blue); box-shadow: 0 0 0 5px rgba(51,137,255,.08); }
.progress-line { flex: 1; height: 1px; background: var(--line-strong); margin-top: 16px; min-width: 30px; }
.progress-line.active { background: var(--blue); }
.assigned-row { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding-top: 20px; }
.assigned-row > div:nth-child(2) { display: grid; margin-right: auto; }
.assigned-row small { color: var(--muted); font-size: .68rem; }
.assigned-row strong { font-size: .84rem; }
.priority-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); }
.avatar { width: 39px; height: 39px; border-radius: 12px; display: grid; place-items: center; flex: 0 0 auto; background: linear-gradient(135deg, rgba(51,137,255,.28), rgba(40,90,170,.15)); border: 1px solid rgba(83,151,255,.28); color: #bcd8ff; font-size: .75rem; font-weight: 850; }
.floating-card { position: absolute; display: flex; gap: 10px; align-items: center; padding: 13px 15px; border-radius: 14px; background: rgba(15,26,45,.96); border: 1px solid var(--line-strong); box-shadow: 0 18px 45px rgba(0,0,0,.35); }
.floating-card > span { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--blue-soft); color: #7eb5ff; font-size: .76rem; font-weight: 850; }
.floating-card div { display: grid; }
.floating-card strong { font-size: .76rem; }
.floating-card small { font-size: .66rem; color: var(--muted); }
.floating-card-one { top: 34px; right: -34px; }
.floating-card-two { bottom: 20px; left: -30px; }
.feature-strip { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: rgba(9,16,29,.72); }
.feature-strip article { padding: 32px; min-height: 220px; }
.feature-strip article + article { border-left: 1px solid var(--line); }
.feature-number { color: var(--blue); font-weight: 850; font-size: .75rem; letter-spacing: .12em; }
.feature-strip h3 { margin-top: 44px; font-size: 1.17rem; }
.feature-strip p { margin-bottom: 0; font-size: .9rem; }
.security-panel { margin: 110px 0 50px; display: grid; grid-template-columns: .75fr 1.25fr; gap: 80px; align-items: start; }
.security-panel h2 { max-width: 500px; }
.security-grid { display: grid; gap: 13px; }
.security-grid > div { padding: 22px 23px; border: 1px solid var(--line); border-radius: 15px; background: rgba(11,19,34,.64); }
.security-grid strong { display: block; margin-bottom: 4px; }
.security-grid p { margin-bottom: 0; font-size: .88rem; }

.site-footer { margin-top: 80px; min-height: 120px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 25px; color: var(--muted); font-size: .8rem; }
.footer-brand { display: flex; align-items: center; gap: 11px; }
.footer-brand img { width: 34px; height: 34px; }
.footer-brand div { display: grid; }
.footer-brand strong { color: var(--text); font-size: .82rem; }
.footer-brand span { font-size: .7rem; }
.site-footer p { margin: 0; }

.panel { background: linear-gradient(145deg, rgba(14,24,42,.93), rgba(8,15,27,.92)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 16px 50px rgba(0,0,0,.16); }
.panel-header { min-height: 80px; padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.panel-header h2 { margin: 1px 0 0; font-size: 1.3rem; }
.panel-kicker { color: var(--blue); text-transform: uppercase; letter-spacing: .13em; font-size: .65rem; font-weight: 850; }
.step-pill, .role-pill { display: inline-flex; align-items: center; min-height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted-strong); font-size: .72rem; font-weight: 750; }
.owner-role { color: #b8d7ff; border-color: rgba(51,137,255,.35); background: rgba(51,137,255,.08); }

.onboarding-layout { min-height: 680px; display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; gap: 90px; padding: 70px 0; }
.onboarding-copy h1 { font-size: clamp(2.4rem, 5vw, 4.3rem); }
.onboarding-copy > p { font-size: 1.04rem; max-width: 550px; }
.setup-list { display: grid; gap: 20px; margin-top: 38px; }
.setup-list > div { display: flex; gap: 16px; }
.setup-list > div > span { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid rgba(51,137,255,.35); border-radius: 10px; color: #8bbcff; font-size: .76rem; font-weight: 850; flex: 0 0 auto; }
.setup-list strong { display: block; margin-bottom: 2px; }
.setup-list p { margin: 0; font-size: .86rem; }
.onboarding-card { overflow: hidden; }
.onboarding-card form { padding: 26px; }

.form-stack { display: grid; gap: 17px; }
.form-spacious { gap: 21px; }
label { color: #dce7f7; font-size: .82rem; font-weight: 700; display: grid; gap: 8px; }
label small, .form-note { color: var(--muted); font-weight: 450; font-size: .72rem; line-height: 1.45; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: rgba(4,9,18,.7);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
input, select { min-height: 45px; padding: 0 13px; }
textarea { padding: 12px 13px; resize: vertical; min-height: 110px; }
input::placeholder, textarea::placeholder { color: #61708a; }
input:focus, textarea:focus, select:focus { border-color: rgba(61,146,255,.78); box-shadow: 0 0 0 4px rgba(51,137,255,.09); background: rgba(6,12,23,.94); }
input:disabled, select:disabled { opacity: .65; cursor: not-allowed; }
.form-divider { display: flex; align-items: center; gap: 12px; color: #7688a4; font-size: .7rem; text-transform: uppercase; letter-spacing: .11em; font-weight: 800; margin: 5px 0; }
.form-divider::before, .form-divider::after { content: ""; height: 1px; background: var(--line); flex: 1; }

.dashboard { padding: 55px 0 20px; }
.dashboard-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 35px; margin-bottom: 32px; }
.dashboard-heading h1 { font-size: clamp(2.2rem, 4.7vw, 4rem); margin-bottom: 10px; }
.dashboard-heading p { margin-bottom: 0; max-width: 680px; }
.dashboard-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat-card { min-height: 145px; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(145deg, rgba(15,26,45,.84), rgba(8,14,26,.83)); display: flex; flex-direction: column; }
.stat-card > span { color: var(--muted-strong); font-size: .78rem; }
.stat-card strong { font-size: 2rem; margin: 14px 0 5px; letter-spacing: -.04em; }
.stat-card small { color: var(--muted); margin-top: auto; font-size: .71rem; }
.stat-card-profile { border-color: rgba(51,137,255,.24); background: linear-gradient(145deg, rgba(22,62,113,.38), rgba(8,14,26,.88)); }
.notice { min-height: 55px; padding: 13px 17px; border-radius: 13px; display: flex; align-items: center; gap: 12px; margin-bottom: 18px; font-size: .82rem; }
.notice strong { white-space: nowrap; }
.notice span { color: var(--muted-strong); }
.notice-warning { background: rgba(241,198,91,.08); border: 1px solid rgba(241,198,91,.22); color: #f6d887; }
.notice-lock { background: rgba(84,136,211,.08); border: 1px solid rgba(87,146,229,.22); color: #9fc5fa; }
.ticket-list-panel { overflow: hidden; }
.queue-header { min-height: 86px; }
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 910px; }
.data-table th { color: #8191aa; text-transform: uppercase; letter-spacing: .1em; font-size: .63rem; text-align: left; padding: 14px 20px; border-bottom: 1px solid var(--line); background: rgba(1,5,11,.14); }
.data-table td { padding: 17px 20px; border-bottom: 1px solid rgba(151,180,226,.08); color: #c3cede; font-size: .79rem; vertical-align: middle; }
.data-table tbody tr { transition: background var(--transition); }
.data-table tbody tr:hover { background: rgba(255,255,255,.018); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.ticket-title { display: grid; min-width: 210px; }
.ticket-title strong { color: var(--text); font-size: .84rem; max-width: 280px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.ticket-title span { color: #6e819d; font-size: .68rem; margin-top: 3px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.table-action { color: #84b8ff; font-weight: 750; white-space: nowrap; }
.client-cell, .assignment { display: grid; }
.client-cell strong { color: #dbe6f5; font-size: .78rem; }
.client-cell span, .assignment small { color: #71839f; font-size: .66rem; }
.assignment-open { color: #8eb8f0; }
.row-locked { opacity: .66; }
.badge { display: inline-flex; align-items: center; min-height: 26px; padding: 0 9px; border: 1px solid transparent; border-radius: 999px; font-size: .66rem; font-weight: 800; white-space: nowrap; }
.badge-open { color: #7dd9ac; background: rgba(77,213,155,.09); border-color: rgba(77,213,155,.2); }
.badge-in_progress { color: #86baff; background: rgba(51,137,255,.1); border-color: rgba(51,137,255,.22); }
.badge-waiting_user { color: #f2d47d; background: rgba(241,198,91,.09); border-color: rgba(241,198,91,.2); }
.badge-resolved { color: #bcaeff; background: rgba(166,140,255,.1); border-color: rgba(166,140,255,.22); }
.badge-closed { color: #a1afc2; background: rgba(137,151,173,.08); border-color: rgba(137,151,173,.17); }
.priority { display: inline-flex; align-items: center; gap: 7px; color: var(--muted-strong); font-size: .72rem; white-space: nowrap; }
.priority i { width: 7px; height: 7px; border-radius: 50%; background: #8594a9; }
.priority-low i { background: #60c8c5; }
.priority-normal i { background: var(--yellow); }
.priority-high i { background: var(--orange); }
.priority-urgent i { background: var(--red); box-shadow: 0 0 9px rgba(255,100,117,.55); }
.empty-state { min-height: 390px; padding: 55px 25px; display: grid; place-items: center; align-content: center; text-align: center; }
.empty-state p { max-width: 500px; }
.empty-icon { width: 74px; height: 74px; padding: 16px; border-radius: 21px; border: 1px solid var(--line); background: rgba(255,255,255,.035); margin-bottom: 15px; }
.compact-empty { min-height: 220px; }

.filter-bar { padding: 16px 20px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(190px, 1.5fr) minmax(145px,.7fr) minmax(145px,.7fr) auto auto auto; gap: 10px; align-items: end; }
.filter-bar label { gap: 5px; font-size: .67rem; color: #7f90aa; text-transform: uppercase; letter-spacing: .08em; }
.filter-bar input, .filter-bar select { min-height: 39px; font-size: .78rem; text-transform: none; letter-spacing: 0; }
.check-filter { display: flex; align-items: center; gap: 8px; min-height: 39px; text-transform: none !important; letter-spacing: 0 !important; white-space: nowrap; }
.check-filter input { width: 16px; min-height: 16px; accent-color: var(--blue); }

.toast { position: fixed; top: 94px; right: 24px; width: min(420px, calc(100vw - 40px)); padding: 14px 16px; border-radius: 14px; z-index: 1000; display: flex; align-items: center; gap: 11px; color: #eaf1fb; box-shadow: 0 20px 55px rgba(0,0,0,.42); animation: toastIn .28s ease both; }
.toast-success { background: rgba(18,62,49,.96); border: 1px solid rgba(77,213,155,.3); }
.toast-error { background: rgba(67,24,34,.97); border: 1px solid rgba(255,100,117,.28); }
.toast-icon { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px; background: rgba(255,255,255,.08); font-weight: 900; }
.toast > span:nth-child(2) { flex: 1; font-size: .82rem; }
.toast button { color: inherit; border: 0; background: transparent; font-size: 1.2rem; cursor: pointer; }
.toast.hide { animation: toastOut .22s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px) translateX(10px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-8px) translateX(15px); } }

.modal { width: 100%; max-width: none; height: 100%; max-height: none; border: 0; padding: 24px; background: transparent; color: var(--text); overflow-y: auto; }
.modal::backdrop { background: rgba(1,4,10,.78); backdrop-filter: blur(11px); }
.modal[open] { display: grid; place-items: center; animation: modalFade .18s ease both; }
.modal-panel { width: min(100%, 520px); position: relative; padding: 28px; background: linear-gradient(145deg, rgba(17,29,50,.99), rgba(7,13,24,.99)); border: 1px solid var(--line-strong); border-radius: 22px; box-shadow: 0 35px 100px rgba(0,0,0,.58); animation: modalUp .25s ease both; }
.modal-panel-medium { width: min(100%, 650px); }
.modal-panel-large { width: min(100%, 940px); }
.modal-panel-auth { width: min(100%, 510px); }
.modal-close { position: absolute; top: 14px; right: 14px; width: 35px; height: 35px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.035); color: #9cacbf; cursor: pointer; font-size: 1.3rem; z-index: 2; }
.modal-brand { text-align: center; padding: 5px 40px 22px; }
.modal-brand img { max-width: 285px; margin: 0 auto 8px; }
.modal-brand p { margin: 0; font-size: .8rem; }
.modal-heading { display: flex; align-items: center; gap: 13px; padding-right: 40px; margin-bottom: 17px; }
.modal-heading h2 { margin: 1px 0 0; font-size: 1.55rem; }
.modal-icon { width: 45px; height: 45px; border-radius: 13px; display: grid; place-items: center; color: #a9ccff; background: var(--blue-soft); border: 1px solid rgba(75,148,255,.22); font-weight: 850; font-size: .78rem; }
.modal-intro { font-size: .85rem; margin-bottom: 23px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.tab-switcher { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; gap: 4px; border-radius: 12px; background: rgba(2,7,14,.55); border: 1px solid var(--line); margin-bottom: 24px; }
.tab-button { min-height: 39px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; font-weight: 750; font-size: .8rem; }
.tab-button.active { background: rgba(51,137,255,.14); color: #c9dfff; }
.auth-section { display: none; }
.auth-section.active { display: block; }
.auth-section h2 { font-size: 1.65rem; }
.auth-section > p { font-size: .82rem; margin-bottom: 22px; }
.auth-section .form-note { display: block; margin-top: 14px; text-align: center; }
@keyframes modalFade { from { opacity: 0; } }
@keyframes modalUp { from { opacity: 0; transform: translateY(14px) scale(.985); } }

.settings-layout { display: grid; grid-template-columns: 190px 1fr; gap: 25px; margin-top: 18px; }
.settings-tabs { display: grid; align-content: start; gap: 5px; }
.settings-tab { min-height: 43px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); text-align: left; padding: 0 13px; cursor: pointer; font-weight: 700; font-size: .79rem; }
.settings-tab:hover, .settings-tab.active { color: var(--text); background: rgba(255,255,255,.045); }
.settings-tab.danger-tab { color: #d98d98; margin-top: 8px; }
.settings-content { border-left: 1px solid var(--line); padding-left: 25px; min-height: 430px; }
.settings-section { display: none; }
.settings-section.active { display: block; }
.settings-section > p { font-size: .82rem; margin-bottom: 20px; }
.community-list { display: grid; gap: 8px; margin-bottom: 16px; }
.community-row { min-height: 48px; padding: 8px 10px 8px 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: rgba(1,5,12,.36); border: 1px solid var(--line); border-radius: 10px; }
.community-row > span { color: #d5e1f1; font-size: .78rem; display: grid; }
.community-row small { color: var(--muted); font-size: .67rem; }
.icon-button { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255,255,255,.03); color: var(--muted); cursor: pointer; }
.icon-button.danger { color: #ff8997; border-color: rgba(255,100,117,.19); }
.inline-add-form { display: flex; align-items: end; gap: 9px; }
.inline-add-form input, .inline-add-form select { flex: 1; }
.danger-zone { border: 1px solid rgba(255,100,117,.22); background: rgba(255,70,92,.045); padding: 20px; border-radius: 14px; }
.danger-zone p { font-size: .8rem; }

.ticket-page { padding: 42px 0 20px; }
.back-link { display: inline-flex; color: #8fa2bd; font-size: .8rem; margin-bottom: 18px; }
.back-link:hover { color: #d4e3f8; }
.ticket-header { padding: 25px 27px; display: flex; align-items: center; justify-content: space-between; gap: 25px; margin-bottom: 15px; }
.ticket-header-main h1 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); margin: 11px 0 8px; }
.ticket-header-main p { margin: 0; font-size: .8rem; }
.ticket-meta-row { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.ticket-id { color: #7baeff; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .74rem; }
.ticket-header-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.ticket-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 15px; align-items: start; }
.conversation-panel { overflow: hidden; }
.message-count { color: var(--muted); font-size: .72rem; }
.conversation-stream { padding: 25px; display: grid; gap: 21px; }
.message { display: flex; gap: 13px; align-items: flex-start; }
.message-avatar { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: 0 0 auto; color: #b9d5ff; background: rgba(51,137,255,.11); border: 1px solid rgba(51,137,255,.2); font-size: .69rem; font-weight: 850; }
.message-support .message-avatar { color: #90e1bd; background: rgba(77,213,155,.08); border-color: rgba(77,213,155,.2); }
.message-owner .message-avatar { color: #d0c5ff; background: rgba(166,140,255,.1); border-color: rgba(166,140,255,.2); }
.message-body { flex: 1; min-width: 0; border: 1px solid var(--line); background: rgba(2,7,14,.28); border-radius: 13px; padding: 15px 17px; }
.message-head { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 10px; }
.message-head > div { display: grid; }
.message-head strong { font-size: .82rem; }
.message-head span, .message-head time { color: var(--muted); font-size: .66rem; }
.message-body p { color: #c5d0df; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .83rem; margin: 0; }
.reply-box { border-top: 1px solid var(--line); padding: 23px; display: grid; gap: 10px; }
.reply-box > label { font-size: .78rem; }
.reply-actions { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.reply-actions small { color: var(--muted); font-size: .68rem; }
.closed-reply { border-top: 1px solid var(--line); padding: 24px; display: grid; text-align: center; }
.closed-reply strong { color: #d2ddeb; }
.closed-reply span { color: var(--muted); font-size: .75rem; }
.ticket-sidebar { display: grid; gap: 15px; }
.info-card { padding: 20px; }
.info-card > .panel-kicker { display: block; margin-bottom: 16px; }
.detail-list { margin: 0; display: grid; gap: 14px; }
.detail-list > div { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.detail-list dt { color: var(--muted); font-size: .72rem; }
.detail-list dd { margin: 0; color: #cdd8e7; font-size: .75rem; text-align: right; }
.assigned-profile { display: flex; align-items: center; gap: 11px; }
.assigned-profile > div:nth-child(2) { display: grid; min-width: 0; }
.assigned-profile strong { font-size: .79rem; }
.assigned-profile span { color: var(--muted); font-size: .65rem; overflow: hidden; text-overflow: ellipsis; }
.collaborator-summary { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 15px; padding-top: 14px; border-top: 1px solid var(--line); }
.collaborator-summary small { width: 100%; color: var(--muted); font-size: .65rem; margin-bottom: 2px; }
.collaborator-summary span { border-radius: 999px; padding: 4px 8px; background: rgba(255,255,255,.04); color: #a9b8cc; font-size: .64rem; }
.unassigned-state { display: flex; gap: 11px; }
.unassigned-state > span { color: var(--blue); }
.unassigned-state strong { font-size: .78rem; }
.unassigned-state p { font-size: .7rem; margin: 3px 0 0; }
.action-card { display: grid; gap: 17px; }
.compact-form { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px; }
.compact-form label { font-size: .68rem; }
.compact-form select { min-height: 38px; font-size: .75rem; }
.settings-grid-two { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.settings-box { padding: 19px; border: 1px solid var(--line); border-radius: 14px; background: rgba(1,6,13,.23); }
.settings-box > p { font-size: .76rem; }
.settings-span-two { grid-column: span 2; }
.collaborator-list { max-height: 190px; overflow-y: auto; }
.muted-empty { color: var(--muted); font-size: .75rem; padding: 15px; border: 1px dashed var(--line-strong); border-radius: 10px; }

.owner-tabs { display: flex; gap: 5px; border-bottom: 1px solid var(--line); margin: 32px 0 17px; }
.owner-tab { border: 0; background: transparent; color: var(--muted); min-height: 48px; padding: 0 17px; cursor: pointer; font-weight: 750; font-size: .8rem; border-bottom: 2px solid transparent; }
.owner-tab.active { color: white; border-bottom-color: var(--blue); }
.owner-section { display: none; }
.owner-section.active { display: block; }
.staff-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; padding: 20px; }
.staff-card { padding: 19px; border: 1px solid var(--line); border-radius: 15px; background: rgba(4,10,19,.32); }
.staff-card-inactive { opacity: .64; }
.staff-card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 15px; }
.staff-card h3 { margin-bottom: 3px; }
.staff-card > p { font-size: .72rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.staff-meta { min-height: 42px; display: grid; align-content: start; gap: 4px; color: var(--muted); font-size: .65rem; margin: 15px 0; }
.temporary-label { color: #f2cd6d; }
.audit-table { min-width: 1000px; }
.audit-details { display: block; max-width: 310px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #7f91aa; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .66rem; }

.error-page { min-height: 650px; display: grid; place-items: center; align-content: center; text-align: center; padding: 60px 20px; }
.error-page img { width: 90px; margin-bottom: 15px; }
.error-code { color: var(--blue); letter-spacing: .15em; font-size: .76rem; font-weight: 850; }
.error-page h1 { font-size: clamp(2.2rem, 5vw, 4rem); margin: 8px 0 10px; }
.error-page p { max-width: 520px; margin-bottom: 25px; }

.reveal { animation: reveal .7s ease both; }
.reveal-delay { animation-delay: .13s; }
@keyframes reveal { from { opacity: 0; transform: translateY(16px); } }


/* Denser desktop workspace: keeps more of the ticket queue and controls visible
   without relying on browser zoom or affecting mobile readability. */
@media (min-width: 901px) {
  .app-page .shell-wide { width: min(1640px, calc(100% - 48px)); }
  .app-page .site-header { min-height: 70px; }
  .app-page .brand img { width: 34px; height: 34px; }
  .app-page .brand span { font-size: .92rem; }
  .app-page .brand small { font-size: .65rem; }
  .app-page .nav-link { padding: 8px 10px; font-size: .84rem; }
  .app-page .nav-user { font-size: .78rem; }
  .app-page .button { min-height: 40px; padding: 0 15px; font-size: .84rem; border-radius: 10px; }
  .app-page .button-small { min-height: 34px; padding: 0 12px; font-size: .76rem; }

  .app-page .dashboard { padding: 34px 0 16px; }
  .app-page .dashboard-heading { gap: 28px; margin-bottom: 22px; }
  .app-page .dashboard-heading h1 { font-size: clamp(1.95rem, 3.2vw, 3rem); margin-bottom: 7px; }
  .app-page .dashboard-heading p { max-width: 760px; font-size: .9rem; }
  .app-page .eyebrow { margin-bottom: 12px; font-size: .64rem; }

  .app-page .stats-grid { gap: 11px; margin-bottom: 16px; }
  .app-page .stat-card { min-height: 110px; padding: 16px 18px; border-radius: 13px; }
  .app-page .stat-card > span { font-size: .71rem; }
  .app-page .stat-card strong { font-size: 1.62rem; margin: 8px 0 3px; }
  .app-page .stat-card small { font-size: .64rem; }
  .app-page .notice { min-height: 48px; padding: 10px 14px; margin-bottom: 14px; font-size: .76rem; }

  .app-page .panel { border-radius: 15px; }
  .app-page .panel-header { min-height: 64px; padding: 14px 18px; }
  .app-page .queue-header { min-height: 68px; }
  .app-page .panel-header h2 { font-size: 1.13rem; }
  .app-page .panel-kicker { font-size: .59rem; }
  .app-page .step-pill,
  .app-page .role-pill { min-height: 26px; padding: 0 9px; font-size: .65rem; }

  .app-page .filter-bar { padding: 11px 14px; gap: 8px; grid-template-columns: minmax(210px, 1.7fr) minmax(130px, .65fr) minmax(130px, .65fr) auto auto auto; }
  .app-page .filter-bar label { font-size: .61rem; }
  .app-page .filter-bar input,
  .app-page .filter-bar select { min-height: 35px; font-size: .72rem; border-radius: 9px; }
  .app-page .check-filter { min-height: 35px; }

  .app-page .data-table { min-width: 860px; }
  .app-page .data-table th { padding: 10px 14px; font-size: .57rem; }
  .app-page .data-table td { padding: 12px 14px; font-size: .72rem; }
  .app-page .ticket-title { min-width: 190px; }
  .app-page .ticket-title strong { max-width: 360px; font-size: .77rem; }
  .app-page .ticket-title span { font-size: .61rem; margin-top: 2px; }
  .app-page .client-cell strong { font-size: .72rem; }
  .app-page .client-cell span,
  .app-page .assignment small { font-size: .6rem; }
  .app-page .badge { min-height: 23px; padding: 0 8px; font-size: .6rem; }
  .app-page .priority { font-size: .65rem; }

  .app-page .owner-tabs { margin: 20px 0 14px; }
  .app-page .owner-tab { min-height: 41px; padding: 0 14px; font-size: .73rem; }
  .app-page .staff-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; padding: 15px; }
  .app-page .staff-card { padding: 15px; border-radius: 13px; }
  .app-page .staff-card-top { margin-bottom: 11px; }
  .app-page .staff-meta { min-height: 34px; margin: 11px 0; }

  .app-page .ticket-page { padding: 30px 0 16px; }
  .app-page .back-link { margin-bottom: 13px; font-size: .73rem; }
  .app-page .ticket-header { padding: 18px 20px; margin-bottom: 12px; }
  .app-page .ticket-header-main h1 { font-size: clamp(1.55rem, 2.6vw, 2.25rem); margin: 8px 0 6px; }
  .app-page .ticket-layout { grid-template-columns: minmax(0, 1fr) 315px; gap: 12px; }
  .app-page .conversation-stream { padding: 18px; gap: 15px; }
  .app-page .message { gap: 10px; }
  .app-page .message-avatar { width: 34px; height: 34px; border-radius: 10px; }
  .app-page .message-body { padding: 12px 14px; border-radius: 11px; }
  .app-page .message-head { margin-bottom: 7px; }
  .app-page .message-body p { font-size: .77rem; }
  .app-page .reply-box { padding: 17px; }
  .app-page .ticket-sidebar { gap: 12px; }
  .app-page .info-card { padding: 16px; }
  .app-page .detail-list { gap: 11px; }

  .app-page .site-footer { margin-top: 50px; min-height: 90px; font-size: .72rem; }
}

@media (min-width: 901px) and (max-width: 1250px) {
  .app-page .staff-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1120px) {
  .hero { grid-template-columns: 1fr 1fr; gap: 35px; }
  .ticket-layout { grid-template-columns: minmax(0,1fr) 300px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .filter-bar { grid-template-columns: 1.5fr 1fr 1fr auto; }
  .filter-bar .button { align-self: end; }
  .staff-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 900px) {
  .site-header { min-height: 74px; }
  .brand small, .nav-user, .site-nav .nav-link { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 60px; }
  .hero-copy { text-align: center; }
  .hero-copy > p { margin-left: auto; margin-right: auto; }
  .hero-actions, .trust-row { justify-content: center; }
  .hero-visual { width: min(100%, 620px); margin: 0 auto; }
  .feature-strip { grid-template-columns: 1fr; }
  .feature-strip article + article { border-left: 0; border-top: 1px solid var(--line); }
  .security-panel { grid-template-columns: 1fr; gap: 30px; }
  .onboarding-layout { grid-template-columns: 1fr; gap: 35px; padding-top: 45px; }
  .onboarding-copy { text-align: center; }
  .setup-list { max-width: 610px; margin-left: auto; margin-right: auto; text-align: left; }
  .dashboard-heading { align-items: flex-start; flex-direction: column; }
  .dashboard-actions { justify-content: flex-start; }
  .ticket-layout { grid-template-columns: 1fr; }
  .ticket-sidebar { grid-template-columns: repeat(2, 1fr); }
  .action-card { grid-column: span 2; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-tabs { grid-template-columns: repeat(4, 1fr); overflow-x: auto; }
  .settings-tab { text-align: center; white-space: nowrap; }
  .settings-content { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; padding-top: 22px; }
}

@media (max-width: 680px) {
  .shell, .shell-wide { width: min(100% - 22px, 1450px); }
  .site-header { gap: 10px; }
  .brand span { font-size: .86rem; }
  .brand img { width: 33px; height: 33px; }
  .site-nav { gap: 6px; }
  .site-nav .button { padding: 0 10px; }
  .hero { min-height: auto; padding: 52px 0 70px; }
  h1 { font-size: 2.55rem; }
  .hero-copy > p { font-size: .98rem; }
  .hero-actions .button { width: 100%; }
  .hero-visual { min-height: 390px; }
  .support-card-main { padding: 20px; }
  .floating-card-one { right: -4px; top: -25px; }
  .floating-card-two { left: -4px; bottom: -20px; }
  .feature-strip article { padding: 25px; min-height: 190px; }
  .feature-strip h3 { margin-top: 30px; }
  .security-panel { margin-top: 75px; }
  .site-footer { flex-direction: column; justify-content: center; text-align: center; padding: 28px 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-card { min-height: 125px; padding: 17px; }
  .dashboard { padding-top: 35px; }
  .dashboard-heading h1 { font-size: 2.35rem; }
  .dashboard-actions { width: 100%; }
  .dashboard-actions .button { flex: 1; }
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .filter-bar > label:first-child { grid-column: span 2; }
  .filter-bar .check-filter { grid-column: span 2; }
  .ticket-header { align-items: flex-start; flex-direction: column; padding: 20px; }
  .ticket-header-actions { width: 100%; }
  .ticket-header-actions .button, .ticket-header-actions form { flex: 1; }
  .ticket-header-actions form .button { width: 100%; }
  .ticket-sidebar { grid-template-columns: 1fr; }
  .action-card { grid-column: auto; }
  .conversation-stream { padding: 18px 14px; }
  .message { gap: 8px; }
  .message-avatar { width: 32px; height: 32px; border-radius: 10px; }
  .message-head { flex-direction: column; gap: 4px; }
  .reply-actions { align-items: flex-start; flex-direction: column; }
  .reply-actions .button { width: 100%; }
  .settings-grid-two { grid-template-columns: 1fr; }
  .settings-span-two { grid-column: auto; }
  .settings-tabs { grid-template-columns: 1fr 1fr; }
  .modal { padding: 10px; }
  .modal-panel { padding: 23px 18px; border-radius: 18px; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .button { width: 100%; }
  .inline-add-form { align-items: stretch; flex-direction: column; }
  .staff-grid { grid-template-columns: 1fr; padding: 14px; }
  .owner-tabs { overflow-x: auto; }
  .owner-tab { white-space: nowrap; }
  .notice { align-items: flex-start; flex-direction: column; gap: 3px; }
  .notice strong { white-space: normal; }
}

@media (max-width: 430px) {
  .site-nav .button:first-of-type { display: none; }
  .stats-grid { grid-template-columns: 1fr; }
  .trust-row { display: grid; }
  .support-card-top .badge { display: none; }
  .ticket-progress { margin-left: -8px; margin-right: -8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Live ticket chat */
.conversation-live-meta { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 9px; }
.live-status,
.sound-toggle {
  min-height: 29px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.035);
  color: var(--muted-strong);
  padding: 0 10px;
  font-size: .65rem;
  font-weight: 760;
}
.live-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 4px rgba(241,198,91,.08); }
.live-status-live { color: #a9e8cb; border-color: rgba(77,213,155,.22); background: rgba(77,213,155,.06); }
.live-status-live i { background: var(--green); box-shadow: 0 0 0 4px rgba(77,213,155,.08), 0 0 12px rgba(77,213,155,.45); animation: livePulse 1.8s ease-in-out infinite; }
.live-status-reconnecting { color: #f1d99a; border-color: rgba(241,198,91,.2); }
.live-status-reconnecting i { background: var(--yellow); animation: livePulse 1.25s ease-in-out infinite; }
.sound-toggle { cursor: pointer; color: #b9c8dc; transition: var(--transition); }
.sound-toggle:hover { color: white; border-color: var(--line-strong); background: rgba(255,255,255,.06); }
.sound-toggle[aria-pressed="true"] > span:first-child { color: #8cbcff; }
.sound-toggle-off { opacity: .65; }
.new-message-jump {
  position: sticky;
  bottom: 17px;
  z-index: 4;
  display: block;
  width: fit-content;
  min-height: 36px;
  margin: -51px auto 15px;
  padding: 0 15px;
  border: 1px solid rgba(83,151,255,.36);
  border-radius: 999px;
  background: rgba(15,35,66,.96);
  color: #c9defe;
  box-shadow: 0 12px 32px rgba(0,0,0,.36);
  cursor: pointer;
  font-size: .72rem;
  font-weight: 780;
}
.new-message-jump[hidden] { display: none !important; }
.message-live-enter { animation: liveMessageIn .34s ease both; }
.toast-info { background: rgba(15,39,73,.97); border: 1px solid rgba(75,148,255,.3); }
.toast-link { flex: 1; min-width: 0; display: grid; color: #eaf1fb; }
.toast-link > span { font-size: .82rem; overflow-wrap: anywhere; }
.toast-link small { color: #8ebdff; margin-top: 2px; font-size: .66rem; font-weight: 780; }
.reply-box[hidden] { display: none !important; }
@keyframes livePulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .58; transform: scale(.82); } }
@keyframes liveMessageIn { from { opacity: 0; transform: translateY(9px); } }

@media (min-width: 901px) {
  .app-page .conversation-live-meta { gap: 7px; }
  .app-page .live-status,
  .app-page .sound-toggle { min-height: 26px; padding: 0 8px; font-size: .59rem; }
}

@media (max-width: 680px) {
  .conversation-panel .panel-header { align-items: flex-start; }
  .conversation-live-meta { justify-content: flex-start; }
  .message-count { width: 100%; }
  .sound-toggle > span:last-child { display: none; }
}

/* Desktop alerts, closed ticket archive, and transcript actions */
.notification-toggle { gap: 7px; }
.notification-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7f8da1;
  box-shadow: 0 0 0 4px rgba(127,141,161,.09);
}
.notification-toggle-on { border-color: rgba(77,213,155,.28); color: #b9ecd4; background: rgba(77,213,155,.07); }
.notification-toggle-on .notification-dot { background: var(--green); box-shadow: 0 0 0 4px rgba(77,213,155,.1), 0 0 12px rgba(77,213,155,.35); }
.notification-toggle-blocked { opacity: .64; }
.notification-toggle-blocked .notification-dot { background: #e47b83; box-shadow: 0 0 0 4px rgba(228,123,131,.09); }
.ticket-archive-panel { margin-top: 16px; }
.archive-note { max-width: 390px; color: var(--muted); font-size: .69rem; text-align: right; }
.ticket-list-state [hidden] { display: none !important; }
.table-action-group { display: flex; align-items: flex-start; justify-content: flex-end; flex-wrap: wrap; gap: 8px 12px; }
.transcript-link { color: #9fd7bd; }
.transcript-link:hover { color: #c7f5dc; }
.closed-reply {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  text-align: left;
}
.closed-reply > div { display: grid; gap: 4px; }
.closed-reply .button { flex: 0 0 auto; }

@media (max-width: 900px) {
  .archive-note { text-align: left; }
}

@media (max-width: 680px) {
  .notification-toggle [data-notification-label] { display: none; }
  .notification-toggle { width: 34px; min-width: 34px; padding: 0; justify-content: center; }
  .closed-reply { align-items: stretch; flex-direction: column; }
  .closed-reply .button { width: 100%; }
  .table-action-group { justify-content: flex-start; }
}

/* 1.1.0 ultra-compact authenticated workspace
   Keeps the client, support, owner, and ticket-detail panels dense enough to
   show substantially more information at normal browser zoom. */
body.app-page [hidden] { display: none !important; }

@media (min-width: 901px) {
  body.app-page {
    font-size: 14px;
    line-height: 1.4;
  }

  .app-page .shell-wide {
    width: min(1780px, calc(100% - 28px));
  }

  .app-page .site-header {
    min-height: 56px;
    gap: 14px;
  }
  .app-page .brand { gap: 8px; }
  .app-page .brand img { width: 28px; height: 28px; }
  .app-page .brand span { font-size: .82rem; }
  .app-page .brand small { font-size: .55rem; padding-left: 8px; }
  .app-page .site-nav { gap: 6px; }
  .app-page .nav-link { padding: 6px 9px; font-size: .72rem; border-radius: 8px; }
  .app-page .nav-user { max-width: 150px; padding: 0 5px; font-size: .68rem; }
  .app-page .button {
    min-height: 34px;
    padding: 0 12px;
    gap: 6px;
    border-radius: 8px;
    font-size: .73rem;
  }
  .app-page .button-small { min-height: 30px; padding: 0 10px; font-size: .68rem; }
  .app-page .button-large { min-height: 40px; padding: 0 16px; }
  .app-page .notification-toggle { min-height: 30px; }

  .app-page .dashboard { padding: 20px 0 10px; }
  .app-page .dashboard-heading {
    align-items: center;
    gap: 20px;
    margin-bottom: 14px;
  }
  .app-page .dashboard-heading h1 {
    font-size: clamp(1.75rem, 2.25vw, 2.25rem);
    margin-bottom: 4px;
  }
  .app-page .dashboard-heading p { max-width: 780px; font-size: .76rem; }
  .app-page .dashboard-actions { gap: 7px; }
  .app-page .eyebrow {
    gap: 7px;
    margin-bottom: 7px;
    font-size: .54rem;
    letter-spacing: .14em;
  }
  .app-page .eyebrow > span { width: 18px; }

  .app-page .notice {
    min-height: 38px;
    padding: 8px 12px;
    gap: 9px;
    margin-bottom: 10px;
    border-radius: 10px;
    font-size: .68rem;
  }

  .app-page .stats-grid { gap: 8px; margin-bottom: 10px; }
  .app-page .stat-card {
    min-height: 78px;
    padding: 11px 13px;
    border-radius: 11px;
  }
  .app-page .stat-card > span { font-size: .62rem; }
  .app-page .stat-card strong {
    font-size: 1.28rem;
    margin: 4px 0 1px;
    line-height: 1;
  }
  .app-page .stat-card small { font-size: .56rem; }

  .app-page .owner-tabs {
    gap: 3px;
    margin: 12px 0 9px;
  }
  .app-page .owner-tab {
    min-height: 34px;
    padding: 0 12px;
    font-size: .66rem;
  }

  .app-page .panel { border-radius: 12px; }
  .app-page .panel-header {
    min-height: 48px;
    padding: 10px 14px;
    gap: 12px;
  }
  .app-page .queue-header { min-height: 50px; }
  .app-page .panel-header h2 { margin-top: 0; font-size: .98rem; }
  .app-page .panel-kicker { font-size: .51rem; letter-spacing: .12em; }
  .app-page .step-pill,
  .app-page .role-pill {
    min-height: 22px;
    padding: 0 8px;
    font-size: .56rem;
  }

  .app-page .filter-bar {
    padding: 8px 12px;
    gap: 7px;
    grid-template-columns: minmax(220px, 1.9fr) minmax(125px, .65fr) minmax(125px, .65fr) auto auto auto;
  }
  .app-page .filter-bar label { gap: 3px; font-size: .52rem; }
  .app-page .filter-bar input,
  .app-page .filter-bar select {
    min-height: 31px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: .65rem;
  }
  .app-page .check-filter { min-height: 31px; gap: 6px; }
  .app-page .check-filter input { width: 13px; min-height: 13px; }

  .app-page .data-table { min-width: 820px; }
  .app-page .data-table th {
    padding: 7px 12px;
    font-size: .49rem;
    letter-spacing: .09em;
  }
  .app-page .data-table td {
    padding: 9px 12px;
    font-size: .65rem;
  }
  .app-page .ticket-title { min-width: 170px; }
  .app-page .ticket-title strong { max-width: 420px; font-size: .69rem; }
  .app-page .ticket-title span { margin-top: 1px; font-size: .53rem; }
  .app-page .client-cell strong { font-size: .65rem; }
  .app-page .client-cell span,
  .app-page .assignment small { font-size: .52rem; }
  .app-page .badge {
    min-height: 20px;
    padding: 0 7px;
    font-size: .52rem;
  }
  .app-page .priority { gap: 5px; font-size: .57rem; }
  .app-page .priority i { width: 6px; height: 6px; }
  .app-page .table-action-group { gap: 5px 9px; }
  .app-page .table-action { font-size: .62rem; }

  .app-page .empty-state {
    min-height: 185px;
    padding: 24px 18px;
  }
  .app-page .compact-empty { min-height: 125px; padding: 17px; }
  .app-page .empty-state h3 { margin-bottom: 4px; font-size: .82rem; }
  .app-page .empty-state p { margin-bottom: 10px; font-size: .66rem; }
  .app-page .empty-icon {
    width: 45px;
    height: 45px;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 13px;
  }

  .app-page .ticket-archive-panel { margin-top: 9px; }
  .app-page .archive-note { max-width: 430px; font-size: .59rem; }

  .app-page .staff-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    padding: 11px;
  }
  .app-page .staff-card { padding: 11px; border-radius: 10px; }
  .app-page .staff-card-top { margin-bottom: 7px; }
  .app-page .staff-card h3 { font-size: .75rem; }
  .app-page .staff-card > p { font-size: .59rem; }
  .app-page .staff-meta { min-height: 27px; gap: 2px; margin: 7px 0; font-size: .53rem; }
  .app-page .avatar { width: 31px; height: 31px; border-radius: 9px; font-size: .62rem; }

  .app-page .ticket-page { padding: 18px 0 10px; }
  .app-page .back-link { margin-bottom: 8px; font-size: .63rem; }
  .app-page .ticket-header {
    padding: 13px 15px;
    gap: 16px;
    margin-bottom: 8px;
  }
  .app-page .ticket-header-main h1 {
    font-size: clamp(1.35rem, 1.9vw, 1.8rem);
    margin: 5px 0 3px;
  }
  .app-page .ticket-header-main p,
  .app-page .ticket-id { font-size: .61rem; }
  .app-page .ticket-layout { grid-template-columns: minmax(0, 1fr) 285px; gap: 8px; }
  .app-page .conversation-stream { padding: 12px; gap: 10px; }
  .app-page .message { gap: 8px; }
  .app-page .message-avatar { width: 29px; height: 29px; border-radius: 8px; font-size: .55rem; }
  .app-page .message-body { padding: 9px 11px; border-radius: 9px; }
  .app-page .message-head { margin-bottom: 5px; }
  .app-page .message-head strong { font-size: .67rem; }
  .app-page .message-head span,
  .app-page .message-head time { font-size: .52rem; }
  .app-page .message-body p { font-size: .66rem; }
  .app-page .reply-box { padding: 11px; gap: 7px; }
  .app-page .reply-box textarea { min-height: 74px; }
  .app-page .ticket-sidebar { gap: 8px; }
  .app-page .info-card { padding: 11px; }
  .app-page .info-card > .panel-kicker { margin-bottom: 9px; }
  .app-page .detail-list { gap: 8px; }
  .app-page .detail-list dt { font-size: .58rem; }
  .app-page .detail-list dd { font-size: .62rem; }
  .app-page .action-card { gap: 10px; }
  .app-page .compact-form select { min-height: 31px; font-size: .64rem; }
  .app-page .closed-reply { padding: 12px; }

  .app-page input,
  .app-page select { min-height: 36px; padding: 0 10px; border-radius: 8px; }
  .app-page textarea { min-height: 88px; padding: 9px 10px; border-radius: 8px; }
  .app-page label { gap: 5px; font-size: .69rem; }
  .app-page label small,
  .app-page .form-note { font-size: .6rem; }
  .app-page .form-stack { gap: 11px; }
  .app-page .form-spacious { gap: 13px; }

  .app-page .modal { padding: 14px; }
  .app-page .modal-panel { width: min(100%, 470px); padding: 20px; border-radius: 16px; }
  .app-page .modal-panel-medium { width: min(100%, 590px); }
  .app-page .modal-panel-large { width: min(100%, 830px); }
  .app-page .modal-panel-auth { width: min(100%, 470px); }
  .app-page .modal-close { width: 30px; height: 30px; top: 10px; right: 10px; }
  .app-page .modal-heading { gap: 10px; margin-bottom: 11px; }
  .app-page .modal-heading h2 { font-size: 1.18rem; }
  .app-page .modal-icon { width: 36px; height: 36px; border-radius: 10px; font-size: .64rem; }
  .app-page .modal-intro { margin-bottom: 14px; font-size: .7rem; }
  .app-page .modal-actions { gap: 7px; }
  .app-page .settings-layout { grid-template-columns: 155px 1fr; gap: 17px; margin-top: 12px; }
  .app-page .settings-tab { min-height: 35px; padding: 0 10px; font-size: .67rem; }
  .app-page .settings-content { min-height: 335px; padding-left: 17px; }
  .app-page .settings-section > p { margin-bottom: 12px; font-size: .69rem; }
  .app-page .settings-box { padding: 13px; border-radius: 10px; }

  .app-page .site-footer { min-height: 62px; margin-top: 28px; font-size: .62rem; }
  .app-page .footer-brand img { width: 27px; height: 27px; }
}

@media (min-width: 901px) and (max-width: 1350px) {
  .app-page .staff-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .app-page .ticket-layout { grid-template-columns: minmax(0, 1fr) 265px; }
}

/* v1.1.1 database continuity and retained-record controls */
.database-safety-panel { margin-bottom: 14px; }
.database-safety-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 12px 16px 4px; }
.database-safety-grid > div { min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.02); }
.database-safety-grid span { display: block; margin-bottom: 4px; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.database-safety-grid strong { display: block; overflow: hidden; color: var(--text); font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.database-safety-copy { margin: 8px 16px 14px; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.retained-records-panel { margin-top: 12px; }
.retained-by { display: block; margin-top: 3px; color: var(--muted); font-size: .7rem; }
.table-action-button { appearance: none; padding: 0; border: 0; background: transparent; font: inherit; cursor: pointer; }
.table-action-group form { display: inline-flex; }
@media (max-width: 820px) { .database-safety-grid { grid-template-columns: 1fr; } }
.deployment-backups { margin: 10px 16px 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.deployment-backups-heading { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.deployment-backups-heading strong { font-size: .82rem; }
.deployment-backups-heading span { color: var(--muted); font-size: .72rem; }

/* v1.1.2 compact public portal and always-on live alerts */
.live-alerts-indicator {
  min-height: 37px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(77, 213, 155, .24);
  border-radius: 9px;
  background: rgba(77, 213, 155, .065);
  color: #b9ecd4;
  font-size: .8rem;
  font-weight: 760;
  white-space: nowrap;
}
.live-alerts-indicator .notification-dot {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(77, 213, 155, .1), 0 0 12px rgba(77, 213, 155, .34);
  animation: livePulse 2s ease-in-out infinite;
}
.live-alerts-compact { min-height: 29px; padding: 0 10px; border-radius: 999px; font-size: .65rem; }

.landing-page .hero-support {
  min-height: 570px;
  grid-template-columns: minmax(0, .88fr) minmax(500px, 1.12fr);
  gap: clamp(48px, 6vw, 92px);
  padding: 54px 0 68px;
}
.landing-page .hero-copy h1 {
  max-width: 650px;
  margin-bottom: 18px;
  font-size: clamp(3rem, 4.2vw, 4.35rem);
  line-height: 1.03;
}
.landing-page .hero-copy > p {
  max-width: 620px;
  margin-bottom: 0;
  font-size: 1.02rem;
  line-height: 1.65;
}
.landing-page .hero-actions { margin: 25px 0 22px; }
.landing-page .hero-visual {
  min-height: 390px;
  align-items: center;
}
.landing-page .portal-preview {
  width: 100%;
  max-width: 680px;
  margin-left: auto;
  padding: 23px;
  border-radius: 20px;
  overflow: hidden;
}
.landing-page .portal-preview .support-card-top { padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.landing-page .portal-preview .support-card-top > div:nth-child(2) { gap: 2px; }
.landing-page .portal-preview .support-card-top strong { font-size: .93rem; }
.landing-page .portal-preview .support-card-top span:not(.badge) { font-size: .7rem; }
.preview-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 1px 12px;
  color: var(--muted);
  font-size: .7rem;
}
.preview-meta-row span { display: inline-flex; align-items: center; gap: 7px; }
.preview-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(77, 213, 155, .09), 0 0 10px rgba(77, 213, 155, .32);
}
.preview-thread {
  display: grid;
  gap: 10px;
  padding: 3px 0 17px;
}
.preview-message {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  width: 89%;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .025);
}
.preview-message-support {
  justify-self: end;
  border-color: rgba(51, 137, 255, .24);
  background: rgba(51, 137, 255, .07);
}
.preview-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(83, 151, 255, .25);
  background: rgba(51, 137, 255, .1);
  color: #bcd8ff;
  font-size: .66rem;
  font-weight: 850;
}
.preview-message strong { display: block; margin-bottom: 3px; font-size: .72rem; }
.preview-message p { margin: 0; font-size: .76rem; line-height: 1.5; }
.preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}
.preview-footer > div { display: grid; gap: 1px; }
.preview-footer small { color: var(--muted); font-size: .62rem; }
.preview-footer strong { font-size: .77rem; }
.preview-proof {
  padding: 7px 10px;
  border: 1px solid rgba(77, 213, 155, .19);
  border-radius: 999px;
  background: rgba(77, 213, 155, .055);
  color: #a9dfc5;
  font-size: .63rem;
  font-weight: 740;
}
.landing-page .feature-strip article { min-height: 185px; padding: 27px 29px; }
.landing-page .feature-strip h3 { margin-top: 34px; }
.landing-page .security-panel { margin-top: 78px; }

@media (min-width: 901px) {
  .app-page .live-alerts-indicator { min-height: 30px; padding: 0 10px; gap: 7px; font-size: .66rem; }
  .app-page .live-alerts-compact { min-height: 26px; padding: 0 8px; font-size: .59rem; }
}

@media (max-width: 1100px) {
  .landing-page .hero-support { grid-template-columns: 1fr 1fr; gap: 34px; }
  .landing-page .hero-copy h1 { font-size: clamp(2.75rem, 5vw, 3.7rem); }
}

@media (max-width: 900px) {
  .landing-page .hero-support { grid-template-columns: 1fr; padding-top: 48px; }
  .landing-page .hero-copy { text-align: center; }
  .landing-page .hero-copy h1, .landing-page .hero-copy > p { margin-left: auto; margin-right: auto; }
  .landing-page .hero-actions, .landing-page .trust-row { justify-content: center; }
  .landing-page .hero-visual { width: min(100%, 680px); min-height: auto; margin: 0 auto; }
  .landing-page .portal-preview { margin: 0 auto; }
}

@media (max-width: 680px) {
  .live-alerts-indicator > span:last-child { display: none; }
  .live-alerts-indicator { width: 34px; min-width: 34px; min-height: 34px; padding: 0; }
  .live-alerts-compact { width: auto; min-width: 29px; min-height: 29px; padding: 0 9px; }
  .landing-page .hero-support { padding: 42px 0 58px; }
  .landing-page .hero-copy h1 { font-size: 2.55rem; }
  .landing-page .portal-preview { padding: 17px; }
  .preview-message { width: 100%; }
  .preview-footer { align-items: flex-start; flex-direction: column; }
  .preview-proof { width: 100%; text-align: center; }
}

/* v1.1.3 community-aware ticket creation */
.community-builder-fieldset {
  margin: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,.018);
}
.community-builder-fieldset legend {
  padding: 0 7px;
  color: var(--text);
  font-size: .78rem;
  font-weight: 780;
}
.community-builder-fieldset > p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.45;
}
.community-builder { display: grid; gap: 9px; }
.community-builder-row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr) 34px;
  align-items: end;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(1,5,12,.32);
}
.community-builder-row label { min-width: 0; }
.community-row-remove { margin-bottom: 1px; }
.community-add-row { margin-top: 10px; }
.community-profile-list { gap: 10px; }
.community-profile-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(1,5,12,.32);
}
.community-edit-form {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr) auto;
  align-items: end;
  gap: 8px;
}
.community-edit-form label,
.community-add-form label { min-width: 0; }
.community-add-form {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr) auto;
  align-items: end;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.community-cell { display: grid; min-width: 130px; }
.community-cell strong { max-width: 190px; overflow: hidden; color: var(--text); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.community-cell span { max-width: 190px; overflow: hidden; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .59rem; text-overflow: ellipsis; white-space: nowrap; }
.ticket-community-chip {
  max-width: 310px;
  padding: 4px 8px;
  overflow: hidden;
  border: 1px solid rgba(51,137,255,.22);
  border-radius: 999px;
  background: rgba(51,137,255,.07);
  color: #afd0ff;
  font-size: .61rem;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.detail-subvalue { display: block; margin-top: 2px; color: var(--muted); font-size: .62rem; font-weight: 500; overflow-wrap: anywhere; }
.community-summary > span { display: grid; }
.community-summary > span strong { color: #dce8f7; font-size: .7rem; }
.community-summary > span small { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .59rem; }

@media (max-width: 760px) {
  .community-builder-row,
  .community-edit-form,
  .community-add-form { grid-template-columns: 1fr; }
  .community-builder-row { position: relative; padding-right: 48px; }
  .community-builder-row .community-row-remove { position: absolute; top: 10px; right: 10px; }
  .community-profile-card { grid-template-columns: minmax(0, 1fr) 34px; align-items: start; }
  .ticket-community-chip { max-width: 100%; }
}
