/* FabCommand Support — brand: #438ec7 blue, #545558 charcoal, #ffffff white, Open Sans */

:root {
  --fc-blue: #438ec7;
  --fc-blue-600: #3479ad;
  --fc-blue-700: #2a638e;
  --fc-blue-50: #eef5fb;
  --fc-blue-100: #d9e8f5;
  --fc-charcoal: #545558;
  --fc-charcoal-900: #3a3b3e;
  --fc-white: #ffffff;

  --bg: #f4f6f8;
  --surface: var(--fc-white);
  --border: #e2e5e9;
  --border-strong: #cfd4da;
  --text: var(--fc-charcoal-900);
  --text-body: var(--fc-charcoal);
  --text-muted: #7b7d82;

  --success: #2f9e6e;
  --success-bg: #e8f6ef;
  --warning: #b7791f;
  --warning-bg: #fdf4e3;
  --danger: #cc4b4b;
  --danger-bg: #fcebeb;

  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(58, 59, 62, .06);
  --shadow: 0 1px 3px rgba(58, 59, 62, .06), 0 8px 24px rgba(58, 59, 62, .06);
  --focus: 0 0 0 3px rgba(67, 142, 199, .28);

  --font: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-body);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--fc-blue-600); text-decoration: none; }
a:hover { color: var(--fc-blue-700); text-decoration: underline; }

h1, h2, h3 { color: var(--text); margin: 0; line-height: 1.25; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); font-weight: 700; letter-spacing: -.01em; }

code, pre { font-family: var(--mono); }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 640px; }

/* ------------------------------------------------------------ header */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header::after {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--fc-blue) 0 72%, var(--fc-charcoal) 72% 100%);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }

.brand { display: flex; align-items: center; gap: 14px; color: var(--text); }
.brand a { display: flex; align-items: center; gap: 14px; color: inherit; }
.brand a:hover { text-decoration: none; }
.brand-logo { height: 40px; width: auto; display: block; }
.brand-divider { width: 1px; height: 26px; background: var(--border-strong); }
.brand-product {
  font-size: .8rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--text-muted);
}

.main-nav { display: flex; gap: 4px; }
.nav-link {
  padding: 8px 14px; border-radius: var(--radius-sm); font-weight: 600; font-size: .9rem; color: var(--text-body);
}
.nav-link:hover { background: var(--bg); text-decoration: none; color: var(--text); }
.nav-link.is-active { color: var(--fc-blue-600); background: var(--fc-blue-50); }

/* ------------------------------------------------------------ layout */

.site-main { flex: 1; padding-bottom: 64px; }

.page-hero { padding: 44px 0 32px; }
.page-hero-compact { padding: 32px 0 24px; }
.hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.eyebrow {
  margin: 0 0 8px;
  font-size: .75rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--text-muted);
}
.prompt { color: var(--fc-blue); font-weight: 800; margin-right: 4px; }
.lede { max-width: 620px; margin: 10px 0 0; font-size: 1.05rem; color: var(--text-body); }
.lede-sm { margin: 6px 0 0; color: var(--text-muted); font-size: .9rem; }

.layout-split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.stack { display: grid; gap: 24px; }
.sidebar { display: grid; gap: 16px; position: sticky; top: 96px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* ------------------------------------------------------------ form */

.ticket-form { padding: 8px 32px 28px; }
.form-section { border: 0; margin: 0; padding: 24px 0; border-bottom: 1px solid var(--border); min-width: 0; }
.form-section:last-of-type { border-bottom: 0; }
.form-section legend + * { clear: both; }
.form-section legend {
  float: left; width: 100%;
  display: flex; align-items: center; gap: 10px; padding: 0; margin-bottom: 20px;
  font-size: 1.05rem; font-weight: 700; color: var(--text);
}
.step {
  font-family: var(--mono); font-size: .75rem; font-weight: 600; color: var(--fc-blue-600);
  background: var(--fc-blue-50); border: 1px solid var(--fc-blue-100); padding: 2px 7px; border-radius: 4px;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }

.field { margin-bottom: 18px; min-width: 0; }
.field:last-child, .field:has(+ .field[hidden]:last-child) { margin-bottom: 0; }
.field label, .field .label {
  display: block; margin-bottom: 6px; font-size: .875rem; font-weight: 600; color: var(--text);
}
.req { color: var(--danger); }
.optional { font-weight: 400; color: var(--text-muted); font-size: .8rem; margin-left: 4px; }

input[type="text"], input[type="email"], input[type="tel"], input[type="search"], input[type="password"], select, textarea {
  width: 100%;
  font: inherit;
  font-size: .95rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 96px; line-height: 1.55; }
textarea.mono { font-family: var(--mono); font-size: .85rem; }
input::placeholder, textarea::placeholder { color: #a3a6ab; }
input:hover, select:hover, textarea:hover { border-color: #b5bac1; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--fc-blue); box-shadow: var(--focus); }

.select-wrap { position: relative; }
.select-wrap::after {
  content: ""; position: absolute; right: 14px; top: 50%; width: 8px; height: 8px; margin-top: -6px;
  border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg); pointer-events: none;
}
select { appearance: none; padding-right: 36px; cursor: pointer; }

.has-error input, .has-error select, .has-error textarea, .has-error .dropzone { border-color: var(--danger); }
.has-error input:focus, .has-error textarea:focus { box-shadow: 0 0 0 3px rgba(204, 75, 75, .2); }
.field-error { margin: 6px 0 0; font-size: .82rem; color: var(--danger); font-weight: 500; }
.field-meta { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.counter { margin-left: auto; margin-top: 6px; font-size: .78rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.counter.is-near { color: var(--warning); }

/* priority radio cards */
.priority-group { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.priority-option { position: relative; margin: 0 !important; cursor: pointer; }
.priority-option input { position: absolute; opacity: 0; pointer-events: none; }
.priority-card {
  display: flex; flex-direction: column; gap: 2px; height: 100%;
  padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.priority-option:hover .priority-card { border-color: #b5bac1; }
.priority-name { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .9rem; color: var(--text); }
.priority-hint { font-size: .78rem; font-weight: 400; color: var(--text-muted); line-height: 1.4; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.priority-low .dot { color: #9aa0a6; }
.priority-normal .dot { color: var(--fc-blue); }
.priority-high .dot { color: #e0922f; }
.priority-urgent .dot { color: var(--danger); }
.priority-request .dot { color: #2b8a8a; border-radius: 1px; transform: rotate(45deg); }
.priority-option input:checked + .priority-card {
  border-color: var(--fc-blue); background: var(--fc-blue-50); box-shadow: inset 0 0 0 1px var(--fc-blue);
}
.priority-request input:checked + .priority-card {
  border-color: #2b8a8a; background: #e8f5f5; box-shadow: inset 0 0 0 1px #2b8a8a;
}
.priority-urgent input:checked + .priority-card {
  border-color: var(--danger); background: var(--danger-bg); box-shadow: inset 0 0 0 1px var(--danger);
}
.priority-option input:focus-visible + .priority-card { box-shadow: var(--focus); }

/* dropzone */
.field .dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  padding: 26px 16px; border: 1.5px dashed var(--border-strong); border-radius: var(--radius);
  background: #fafbfc; cursor: pointer; transition: border-color .15s, background .15s;
  margin: 0 !important; font-weight: 400 !important;
}
.dropzone:hover, .dropzone.is-dragover { border-color: var(--fc-blue); background: var(--fc-blue-50); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone-icon { color: var(--fc-blue); margin-bottom: 4px; }
.dropzone-text { font-size: .92rem; color: var(--text); }
.dropzone-text .link { color: var(--fc-blue-600); font-weight: 600; }
.dropzone-hint { font-size: .78rem; color: var(--text-muted); }

.file-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.file-list:empty { display: none; }
.file-list li {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .85rem;
}
.file-list .file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.file-list .file-size { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.file-list .file-too-big { color: var(--danger); }
.file-remove {
  border: 0; background: none; color: var(--text-muted); cursor: pointer; font-size: 1.1rem; line-height: 1; padding: 2px 4px; border-radius: 4px;
}
.file-remove:hover { color: var(--danger); background: var(--danger-bg); }

.form-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 24px; border-top: 1px solid var(--border);
}
.form-actions-tight { padding-top: 12px; border-top: 0; justify-content: flex-end; }
.fine-print { margin: 0; font-size: .82rem; color: var(--text-muted); }

.alert { display: flex; flex-direction: column; gap: 2px; margin-top: 24px; padding: 12px 16px; border-radius: var(--radius); font-size: .9rem; }
.alert-error { background: var(--danger-bg); color: #9d3535; border: 1px solid #f1caca; }

/* ------------------------------------------------------------ buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: .9rem; font-weight: 600; line-height: 1;
  padding: 11px 18px; border-radius: var(--radius-sm); border: 1px solid transparent;
  cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s, transform .05s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn-primary { background: var(--fc-blue); color: var(--fc-white); }
.btn-primary:hover { background: var(--fc-blue-600); color: var(--fc-white); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--fc-charcoal); color: var(--text); }
.btn-ghost { background: transparent; color: var(--fc-blue-600); }
.btn-ghost:hover { background: var(--fc-blue-50); color: var(--fc-blue-700); }
.btn-lg { padding: 14px 24px; font-size: 1rem; }
.btn-sm { padding: 6px 10px; font-size: .8rem; }
.btn[disabled] { opacity: .65; cursor: progress; }

/* ------------------------------------------------------------ sidebar */

.side-card { padding: 20px 22px; }
.side-card p { margin: 0 0 12px; font-size: .88rem; }
.side-title {
  margin-bottom: 12px; font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted);
}
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: .88rem; }
.checklist li { position: relative; padding-left: 22px; }
.checklist li::before {
  content: ""; position: absolute; left: 2px; top: 7px; width: 8px; height: 5px;
  border-left: 2px solid var(--fc-blue); border-bottom: 2px solid var(--fc-blue); transform: rotate(-45deg);
}

.sla { margin: 0; display: grid; gap: 10px; }
.sla div { display: flex; justify-content: space-between; align-items: center; font-size: .88rem; }
.sla dt, .sla dd { margin: 0; }
.sla dd { color: var(--text); font-weight: 500; }

.side-card-accent { background: var(--fc-charcoal-900); border-color: var(--fc-charcoal-900); color: #d7d8da; }
.side-card-accent .side-title { color: #a9abaf; }
.side-card-accent p { color: #d7d8da; }
.inline-search { display: flex; gap: 8px; }
.inline-search input { background: #4a4b4f; border-color: #5f6064; color: var(--fc-white); }
.inline-search input::placeholder { color: #9a9ca0; }

.terminal-mark { font-family: var(--mono); font-weight: 700; font-size: 1.3rem; margin-bottom: 8px; line-height: 1; }
.terminal-mark span:first-child { color: var(--fc-blue); }
.terminal-mark .cursor { color: #a9abaf; animation: blink 1.1s steps(1) infinite; }
.terminal-mark-lg { font-size: 2.4rem; margin-bottom: 16px; }
.empty-state .terminal-mark .cursor { color: var(--fc-charcoal); }
@keyframes blink { 50% { opacity: 0; } }

/* ------------------------------------------------------------ badges & status */

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px;
  font-size: .75rem; font-weight: 700; letter-spacing: .02em; white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-priority-low { background: #f0f1f3; color: #6b6e73; }
.badge-priority-normal { background: var(--fc-blue-50); color: var(--fc-blue-700); }
.badge-priority-high { background: #fdf1e2; color: #a8621a; }
.badge-priority-urgent { background: var(--danger-bg); color: #b23c3c; }
.badge-priority-request { background: #e8f5f5; color: #1f6f6f; }
.badge-priority-request::before { border-radius: 1px; transform: rotate(45deg); }

.status {
  display: inline-block; padding: 3px 10px; border-radius: var(--radius-sm);
  font-size: .78rem; font-weight: 600; white-space: nowrap; border: 1px solid;
}
.status-open { color: var(--fc-blue-700); border-color: var(--fc-blue-100); background: var(--fc-blue-50); }
.status-in_progress { color: #7a4fb8; border-color: #e6dcf5; background: #f5f0fc; }
.status-waiting { color: var(--warning); border-color: #f3e0bb; background: var(--warning-bg); }
.status-resolved { color: var(--success); border-color: #c9ead9; background: var(--success-bg); }
.status-closed { color: #6b6e73; border-color: var(--border); background: #f4f5f6; }

/* ------------------------------------------------------------ confirmation */

.confirm-card { margin-top: 48px; padding: 44px 40px; text-align: center; box-shadow: var(--shadow); }
.confirm-mark {
  width: 64px; height: 64px; margin: 0 auto 20px; display: grid; place-items: center; border-radius: 50%;
  background: var(--fc-blue); color: var(--fc-white); box-shadow: 0 0 0 8px var(--fc-blue-50);
}
.confirm-card .lede { margin-left: auto; margin-right: auto; }
.ticket-id-box {
  display: inline-flex; align-items: center; gap: 12px; margin: 24px 0 8px; padding: 10px 10px 10px 18px;
  background: var(--fc-charcoal-900); border-radius: var(--radius); color: var(--fc-white);
}
.ticket-id-box code { font-size: 1.5rem; font-weight: 700; letter-spacing: .04em; }
.ticket-id-box .prompt { font-family: var(--mono); font-size: 1.4rem; }
.ticket-id-box .btn-ghost { color: #cfe3f3; }
.ticket-id-box .btn-ghost:hover { background: #4a4b4f; color: var(--fc-white); }

.summary-list { margin: 28px 0 0; text-align: left; border-top: 1px solid var(--border); }
.summary-list div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.summary-list dt { color: var(--text-muted); margin: 0; }
.summary-list dd { margin: 0; color: var(--text); font-weight: 500; text-align: right; }
.confirm-actions { display: flex; justify-content: center; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

/* ------------------------------------------------------------ ticket list */

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat {
  display: flex; flex-direction: column; gap: 4px; padding: 18px 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  color: var(--text-body); transition: border-color .15s, box-shadow .15s;
}
.stat:hover { text-decoration: none; border-color: var(--fc-blue); color: var(--text-body); }
.stat.is-selected { border-color: var(--fc-blue); box-shadow: inset 0 0 0 1px var(--fc-blue); }
.stat-label { font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }
.stat-value { font-size: 1.9rem; font-weight: 700; color: var(--text); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-alert .stat-value { color: var(--danger); }

.filter-bar { display: flex; gap: 10px; padding: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.filter-bar .select-wrap { width: 170px; }
.search-field { position: relative; flex: 1; min-width: 220px; }
.search-field svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.search-field input { padding-left: 38px; }

.table-card { overflow-x: auto; }
.ticket-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.ticket-table th {
  text-align: left; padding: 12px 16px; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-muted); background: #fafbfc; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.ticket-table th:first-child { border-top-left-radius: var(--radius-lg); }
.ticket-table th:last-child { border-top-right-radius: var(--radius-lg); }
.ticket-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.ticket-table tr:last-child td { border-bottom: 0; }
.row-link { cursor: pointer; transition: background .1s; }
.row-link:hover { background: #f8fafc; }
.cell-id a { font-family: var(--mono); font-weight: 600; font-size: .85rem; white-space: nowrap; }
.cell-subject { max-width: 380px; }
.subject, .requester { display: block; color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta { display: block; font-size: .8rem; color: var(--text-muted); }
.cell-date { white-space: nowrap; color: var(--text-muted); font-size: .82rem; }

.empty-state { padding: 56px 24px; text-align: center; }
.empty-state h2 { font-size: 1.2rem; margin-bottom: 6px; }
.empty-state p { margin: 0 0 20px; color: var(--text-muted); }

/* ------------------------------------------------------------ ticket detail */

.back-link { display: inline-block; margin-bottom: 14px; font-size: .88rem; font-weight: 600; }
.detail-heading { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ticket-code {
  font-size: .85rem; font-weight: 700; color: var(--fc-white); background: var(--fc-charcoal-900);
  padding: 4px 10px; border-radius: var(--radius-sm);
}

.content-card { padding: 26px 30px; }
.section-label {
  margin: 28px 0 12px; font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted);
}
.section-label:first-child { margin-top: 0; }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-body); }
.code-block {
  margin: 0; padding: 14px 16px; background: #f6f8fa; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: .84rem; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text);
}

.attachment-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.attachment {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); font-size: .85rem;
}
.attachment:hover { border-color: var(--fc-blue); text-decoration: none; background: var(--fc-blue-50); color: var(--text); }
.attachment-icon { color: var(--fc-blue); display: flex; }
.attachment-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.attachment-size { color: var(--text-muted); font-size: .78rem; white-space: nowrap; }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: var(--border); }
.timeline-item { position: relative; padding: 0 0 20px 30px; }
.timeline-dot {
  position: absolute; left: 0; top: 5px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--fc-blue); box-shadow: 0 0 0 3px var(--surface);
}
.timeline-item.is-event .timeline-dot { background: var(--surface); border: 2px solid var(--border-strong); }
.timeline-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: .88rem; }
.timeline-head strong { color: var(--text); }
.timeline-event { color: var(--text-muted); }
.timeline-head time { color: var(--text-muted); font-size: .78rem; margin-left: auto; }
.timeline-text {
  margin-top: 8px; padding: 12px 14px; background: #fafbfc; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: .9rem;
}

.comment-form { margin-top: 8px; padding-top: 20px; border-top: 1px solid var(--border); }
.grid-comment { display: grid; grid-template-columns: 180px 1fr; gap: 0 16px; }

.status-form { display: grid; gap: 8px; }
.status-form .select-wrap { flex: 1; }

.detail-list { margin: 0; display: grid; gap: 10px; font-size: .88rem; }
.detail-list div { display: grid; grid-template-columns: 96px 1fr; gap: 8px; }
.detail-list dt { color: var(--text-muted); margin: 0; }
.detail-list dd { margin: 0; color: var(--text); font-weight: 500; overflow-wrap: anywhere; }

/* ------------------------------------------------------------ footer */

.site-footer { border-top: 1px solid var(--border); background: var(--surface); }
.footer-inner { display: flex; align-items: center; gap: 10px; height: 60px; font-size: .82rem; color: var(--text-muted); }
.footer-icon { height: 20px; width: auto; }
.footer-contact { margin-left: auto; font-weight: 600; }
.footer-legal { color: inherit; }

/* ------------------------------------------------------------ responsive */

@media (max-width: 960px) {
  .layout-split { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; }
  .priority-group { grid-template-columns: repeat(2, 1fr); }
  .priority-request { grid-column: span 2; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .header-inner { height: 60px; }
  .brand-logo { height: 32px; }
  .brand-divider, .brand-product { display: none; }
  .nav-link { padding: 8px 10px; font-size: .85rem; }
  .ticket-form { padding: 4px 18px 20px; }
  .content-card { padding: 20px; }
  .grid-2, .grid-comment { grid-template-columns: 1fr; }
  .form-actions { flex-direction: column-reverse; align-items: stretch; }
  .form-actions .btn { width: 100%; }
  .confirm-card { padding: 32px 20px; margin-top: 24px; }
  .search-field { flex-basis: 100%; }
  .filter-bar .select-wrap { flex: 1; width: auto; }
  .ticket-table th:nth-child(3), .ticket-table td:nth-child(3),
  .ticket-table th:nth-child(6), .ticket-table td:nth-child(6) { display: none; }
}

/* ------------------------------------------------------------ admin & login */

.admin-tag {
  font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--fc-white); background: var(--fc-charcoal); padding: 3px 8px; border-radius: 4px;
}
.main-nav { align-items: center; }
.main-nav form { margin: 0; }
.nav-user {
  padding: 0 12px; margin: 0 4px; font-size: .85rem; color: var(--text-muted);
  border-left: 1px solid var(--border); border-right: 1px solid var(--border);
}
.nav-button { font: inherit; font-weight: 600; font-size: .9rem; border: 0; background: none; cursor: pointer; }

.login-wrap { display: flex; justify-content: center; padding-top: 64px; }
.login-card { width: 100%; max-width: 400px; padding: 36px 32px 32px; box-shadow: var(--shadow); }
.login-icon { height: 44px; width: auto; display: block; margin-bottom: 20px; }
.login-card h1 { font-size: 1.6rem; }
.login-card .alert { margin-top: 20px; margin-bottom: 0; }
.login-card code { font-size: .82rem; background: rgba(0,0,0,.06); padding: 1px 5px; border-radius: 4px; }
.login-form { margin-top: 24px; }
.btn-block { width: 100%; margin-top: 6px; }
.alert-warning { background: var(--warning-bg); color: #7d5314; border: 1px solid #f1dcae; }

.next-steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: .88rem; color: #d7d8da; }
.next-steps li::marker { color: var(--fc-blue); font-weight: 700; }

.confirm-note { margin: 20px 0 0; font-size: .9rem; color: var(--text-muted); }
.confirm-note strong { color: var(--text); font-weight: 600; }

@media (max-width: 640px) {
  .admin-tag { display: none; }
  .nav-user { display: none; }
  .login-wrap { padding-top: 24px; }
  .login-card { padding: 28px 20px; }
}

/* ------------------------------------------------------------ customer status */

.dark-lookup { display: grid; gap: 8px; }
.dark-lookup input { background: #4a4b4f; border-color: #5f6064; color: var(--fc-white); }
.dark-lookup input::placeholder { color: #9a9ca0; }
.dark-lookup input:focus { border-color: var(--fc-blue); }

.lookup-card { max-width: 440px; }
.lookup-foot { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--border); font-size: .82rem; color: var(--text-muted); }
.mono-input { font-family: var(--mono) !important; letter-spacing: .03em; }

.status-page { display: grid; gap: 24px; }
.progress-card { padding: 28px 32px; }
.progress { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); position: relative; }
.progress-step { display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; text-align: center; }
.progress-step:not(:last-child)::after {
  content: ""; position: absolute; top: 15px; left: calc(50% + 22px); right: calc(-50% + 22px); height: 3px;
  background: var(--border); border-radius: 2px;
}
.progress-step.is-done:not(:last-child)::after { background: var(--fc-blue); }
.progress-dot {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: .85rem; font-weight: 700;
  background: var(--surface); border: 2px solid var(--border-strong); color: var(--text-muted); position: relative; z-index: 1;
}
.progress-step.is-done .progress-dot { background: var(--fc-blue); border-color: var(--fc-blue); color: var(--fc-white); }
.progress-step.is-current .progress-dot { border-color: var(--fc-blue); color: var(--fc-blue); box-shadow: 0 0 0 5px var(--fc-blue-50); }
.progress-label { font-size: .85rem; font-weight: 600; color: var(--text-muted); }
.progress-step.is-done .progress-label, .progress-step.is-current .progress-label { color: var(--text); }

.status-message { margin-top: 24px; padding: 14px 18px; border-radius: var(--radius); font-size: .92rem; background: var(--fc-blue-50); border: 1px solid var(--fc-blue-100); }
.status-message strong { color: var(--text); }
.status-message-waiting { background: var(--warning-bg); border-color: #f3e0bb; }
.status-message-resolved { background: var(--success-bg); border-color: #c9ead9; }
.status-message-closed { background: #f4f5f6; border-color: var(--border); }
.prose-sm { font-size: .88rem; max-height: 240px; overflow: auto; }

/* ------------------------------------------------------------ admin visibility */

.visibility { font-size: .7rem; font-weight: 700; letter-spacing: .04em; padding: 1px 7px; border-radius: 4px; }
.visibility-public { color: var(--fc-blue-700); background: var(--fc-blue-50); border: 1px solid var(--fc-blue-100); }
.visibility-internal { color: #6b6e73; background: #f0f1f3; border: 1px solid var(--border); }

.toggle { display: inline-flex; align-items: center; gap: 10px; margin-top: 12px; cursor: pointer; font-size: .88rem; color: var(--text); font-weight: 600; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-track { width: 36px; height: 20px; border-radius: 999px; background: var(--border-strong); position: relative; transition: background .15s; flex: none; }
.toggle-track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--fc-white); box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s;
}
.toggle input:checked + .toggle-track { background: var(--fc-blue); }
.toggle input:checked + .toggle-track::after { transform: translateX(16px); }
.toggle input:focus-visible + .toggle-track { box-shadow: var(--focus); }

.side-hint { margin: 10px 0 0 !important; font-size: .78rem !important; color: var(--text-muted); }
.side-hint-top { margin: 0 0 10px !important; }
.copy-row { display: flex; gap: 6px; }
.copy-row input { font-size: .78rem; padding: 7px 9px; color: var(--text-muted); background: #fafbfc; }

@media (max-width: 640px) {
  .progress-card { padding: 22px 16px; }
  .progress-label { font-size: .78rem; }
}
