:root {
  color-scheme: dark;
  --bg: #0b0d12;
  --bg-glow: #252844;
  --surface: rgba(23, 26, 35, .9);
  --surface-strong: #252a38;
  --surface-soft: rgba(255, 255, 255, .055);
  --input: rgba(4, 6, 11, .34);
  --border: rgba(255, 255, 255, .12);
  --border-strong: rgba(255, 255, 255, .2);
  --text: #f8f9fc;
  --muted: #a7adbd;
  --accent: #9d91ff;
  --accent-strong: #c0b8ff;
  --accent-contrast: #11101c;
  --danger: #ff858c;
  --success: #8ce3b4;
  --shadow: 0 28px 90px rgba(0, 0, 0, .36);
  --radius-lg: 24px;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6fb;
  --bg-glow: #e8e7ff;
  --surface: rgba(255, 255, 255, .86);
  --surface-strong: #ffffff;
  --surface-soft: rgba(52, 59, 83, .06);
  --input: rgba(244, 246, 251, .9);
  --border: rgba(45, 52, 76, .13);
  --border-strong: rgba(45, 52, 76, .22);
  --text: #1c2130;
  --muted: #6d7487;
  --accent: #6659dc;
  --accent-strong: #584bc9;
  --accent-contrast: #ffffff;
  --danger: #c84858;
  --success: #218255;
  --shadow: 0 24px 70px rgba(54, 63, 96, .14);
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: radial-gradient(circle at 50% -10%, var(--bg-glow) 0, var(--bg) 42rem); color: var(--text); font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; transition: background .25s ease, color .2s ease; }
button, textarea, select { font: inherit; }
button { cursor: pointer; }
.support-shell { width: min(760px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 36px; }
.topbar, .topbar-actions, .brand, .tabs, .inbox-header, .section-heading, .form-footer, .footer { display: flex; align-items: center; }
.topbar { justify-content: space-between; gap: 20px; }
.brand { gap: 10px; color: var(--text); font-weight: 800; letter-spacing: -.025em; text-decoration: none; }
.brand-mark { display: block; width: 32px; height: 32px; border-radius: 11px; object-fit: cover; box-shadow: 0 8px 18px rgba(0, 0, 0, .24); }
.topbar-actions { gap: 8px; }
.icon-button, .language-control select, .secondary-button { border: 1px solid var(--border); background: var(--surface-soft); color: var(--text); border-radius: 12px; transition: background .18s, border-color .18s, transform .18s; }
.icon-button:hover, .language-control select:hover, .secondary-button:hover { border-color: var(--border-strong); background: var(--surface-strong); }
.icon-button:active, .secondary-button:active { transform: translateY(1px); }
.icon-button { width: 40px; height: 40px; font-size: 18px; }
.language-control select { height: 40px; padding: 0 11px; }
.hero { padding: 78px 0 38px; max-width: 600px; }
.eyebrow { margin: 0 0 14px; color: var(--accent-strong); font-size: 11px; font-weight: 850; letter-spacing: .17em; }
h1 { margin: 0; font-size: clamp(38px, 7vw, 64px); letter-spacing: -.06em; line-height: 1; }
.hero-copy { max-width: 500px; margin: 20px 0 0; color: var(--muted); font-size: 17px; }
.tabs { gap: 5px; padding: 5px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface-soft); }
.tab { flex: 1; border: 0; border-radius: 11px; padding: 12px 15px; background: transparent; color: var(--muted); font-weight: 750; transition: background .18s, color .18s; }
.tab.is-active { background: var(--surface-strong); color: var(--text); box-shadow: 0 5px 18px rgba(0, 0, 0, .13); }
.unread-dot { display: inline-block; width: 7px; height: 7px; margin-left: 6px; border-radius: 50%; background: var(--danger); vertical-align: middle; }
.panel { margin-top: 16px; padding: clamp(22px, 5vw, 38px); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
fieldset { margin: 0; padding: 0; border: 0; }
legend, .field-label { display: block; margin-bottom: 12px; font-weight: 800; }
.category-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.category-option { position: relative; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 11px 14px; border: 1px solid var(--border); border-radius: 14px; color: var(--muted); transition: border-color .18s, background .18s, color .18s, transform .18s; }
.category-option:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.category-option:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--text); }
.category-option input { accent-color: var(--accent); }
textarea { width: 100%; resize: vertical; min-height: 150px; padding: 15px; border: 1px solid var(--border); border-radius: 15px; outline: none; background: var(--input); color: var(--text); transition: border-color .18s, background .18s, box-shadow .18s; }
textarea::placeholder { color: var(--muted); opacity: .8; }
textarea:focus, select:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.attachments { margin-top: 26px; }
.section-heading { justify-content: space-between; gap: 12px; margin-bottom: 11px; font-weight: 800; }
.section-heading small { color: var(--muted); font-weight: 500; text-align: right; }
.attachment-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.add-attachment, .attachment-preview { width: 116px; height: 96px; border: 1px dashed var(--border-strong); border-radius: 14px; background: var(--surface-soft); color: var(--muted); }
.add-attachment { font-weight: 750; transition: background .18s, border-color .18s; }
.add-attachment:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.attachment-preview { position: relative; overflow: hidden; border-style: solid; }
.attachment-preview img { width: 100%; height: 100%; object-fit: cover; }
.remove-attachment { position: absolute; top: 5px; right: 5px; width: 25px; height: 25px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .7); color: #fff; }
.form-footer { justify-content: space-between; gap: 16px; margin-top: 30px; }
.primary-button, .secondary-button { border: 0; padding: 12px 19px; border-radius: 12px; font-weight: 800; }
.primary-button { background: var(--accent); color: var(--accent-contrast); box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 24%, transparent); transition: transform .18s, filter .18s; }
.primary-button:hover { filter: brightness(1.08); transform: translateY(-1px); }
.primary-button:disabled { cursor: wait; opacity: .6; transform: none; }
.secondary-button { border: 1px solid var(--border); background: var(--surface-soft); color: var(--text); }
.form-error, .error-text { margin: 0; color: var(--danger); font-size: 13px; }
.success-message { margin: 16px 0 0; color: var(--success); }
.inbox-header { justify-content: space-between; gap: 14px; }
h2 { margin: 0; font-size: 21px; letter-spacing: -.035em; }
.inbox-header p { margin: 5px 0 0; color: var(--muted); }
.ticket-list { display: grid; gap: 10px; margin-top: 22px; }
.ticket-card { display: block; width: 100%; padding: 17px 18px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface-soft); color: var(--text); text-align: left; transition: border-color .18s, background .18s, transform .18s; }
.ticket-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.ticket-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 24px; }
.ticket-status, .ticket-unread { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; }
.ticket-status { padding: 4px 9px; border-radius: 999px; background: var(--surface-strong); color: var(--muted); }
.ticket-status.status-open { color: var(--accent-strong); }
.ticket-status.status-replied { color: var(--success); }
.ticket-status.status-closed { color: var(--muted); }
.ticket-unread { color: var(--danger); }
.ticket-unread-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ticket-card h3 { margin: 12px 0 3px; font-size: 17px; letter-spacing: -.02em; }
.ticket-number { margin: 0; color: var(--muted); font-size: 12px; }
.ticket-meta { display: flex; gap: 28px; margin: 16px 0 0; }
.ticket-meta div { min-width: 90px; }
.ticket-meta dt { color: var(--muted); font-size: 11px; }
.ticket-meta dd { margin: 2px 0 0; font-size: 13px; font-weight: 700; }
.ticket-empty { padding: 32px 0 10px; color: var(--muted); text-align: center; }
.ticket-detail { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.message { margin-top: 12px; padding: 13px; border-radius: 13px; background: var(--surface-soft); }
.message.support { border-left: 3px solid var(--accent); }
.message-meta { color: var(--muted); font-size: 12px; }
.message p { margin: 6px 0 0; white-space: pre-wrap; }
.reply-form { display: flex; gap: 10px; margin-top: 14px; }
.reply-form textarea { min-height: 70px; }
.footer { justify-content: center; gap: 8px; padding-top: 26px; color: var(--muted); font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.is-hidden { display: none !important; }
@media (max-width: 560px) {
  .support-shell { width: min(100% - 22px, 720px); padding-top: 18px; }
  .hero { padding-top: 58px; }
  .category-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .section-heading small { text-align: left; }
  .form-footer { align-items: flex-start; flex-direction: column-reverse; }
  .primary-button { width: 100%; }
  .panel { border-radius: 20px; }
}
