/* Support Desk — additions on top of styles.css. Indigo accent tells the two apps apart. */
body.support { --accent: #818cf8; --accent-2: #4f46e5; --accent-ink: #1e1b4b; }
body.support { background: radial-gradient(1200px 600px at 10% -10%, #161a3a 0%, var(--bg) 60%); }
.brand-mark.sd { background: #818cf8; box-shadow: 0 0 0 4px rgba(129,140,248,.18); }
.btn-primary:hover { background: #a5b4fc; }
.pill-tab { margin-left: 4px; background: rgba(129,140,248,.2); color: #c7d2fe; }
.sd-app { display: block; max-width: 1240px; }
.view { display: flex; flex-direction: column; gap: 16px; }

/* layout */
.sd-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
@media (max-width: 960px) { .sd-grid { grid-template-columns: 1fr; } }
.sd-side { display: flex; flex-direction: column; gap: 16px; }

/* form */
.sd-form { padding: 24px; display: flex; flex-direction: column; gap: 22px; }
.sd-form-head h2 { font-size: 20px; margin-bottom: 4px; }
.sd-field { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.sd-field legend, .sd-label { font-weight: 600; font-size: 13.5px; padding: 0; margin-bottom: 2px; }
.req { color: var(--accent); }
.sd-help { font-size: 12px; line-height: 1.45; }
.sd-field input, .sd-field textarea { width: 100%; font-size: 14.5px; }
.sd-field textarea { resize: vertical; min-height: 140px; line-height: 1.5; }

.opt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.opt-grid-tools { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .opt-grid, .opt-grid-tools { grid-template-columns: 1fr; } }
.opt { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg-2); cursor: pointer; text-align: left; font: inherit; color: var(--text); min-width: 0; transition: border-color .12s, background .12s; }
.opt:hover { border-color: #3b4a72; }
.opt.is-selected { border-color: var(--accent); background: rgba(129,140,248,.12); box-shadow: 0 0 0 3px rgba(129,140,248,.14); }
.opt-label { font-weight: 600; font-size: 13.5px; }
.opt-hint { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.opt-row { display: flex; flex-wrap: wrap; gap: 8px; }
.opt-row .opt { flex: 1 1 140px; }
.opt.u-blocking.is-selected { border-color: #f87171; background: rgba(248,113,113,.12); box-shadow: 0 0 0 3px rgba(248,113,113,.14); }
.opt.u-high.is-selected { border-color: #fbbf24; background: rgba(251,191,36,.12); box-shadow: 0 0 0 3px rgba(251,191,36,.14); }

/* dropzone */
.dropzone { border: 1.5px dashed var(--line); border-radius: 12px; padding: 22px 16px; text-align: center; background: rgba(15,23,42,.35); cursor: pointer; transition: border-color .12s, background .12s; }
.dropzone:hover, .dropzone:focus-visible, .dropzone.is-over { border-color: var(--accent); background: rgba(129,140,248,.08); outline: none; }
.dz-inner { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13.5px; }
.dz-icon { font-size: 22px; color: var(--accent); }
.file-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.file-list:empty { display: none; }
.file-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg-2); font-size: 13px; }
.file-thumb { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; background: var(--card-2); flex: none; display: grid; place-items: center; font-size: 11px; color: var(--muted); text-transform: uppercase; }
.file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { color: var(--muted); font-variant-numeric: tabular-nums; }
.file-item.is-bad { border-color: rgba(248,113,113,.5); }
.file-item.is-bad .file-size { color: var(--danger); }
.file-rm { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 16px; padding: 0 4px; }
.file-rm:hover { color: var(--text); }

.sd-submit { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; padding-top: 6px; border-top: 1px solid var(--line-soft); }
.btn-lg { padding: 11px 20px; font-size: 15px; }
.progress { width: 100%; height: 6px; border-radius: 4px; background: var(--bg-2); overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: var(--accent); transition: width .15s; }

/* side tips */
.sd-tips { padding: 16px 18px; }
.sd-tips h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 10px; }
.steps, .ticks { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; line-height: 1.45; }
.ticks { list-style: none; padding-left: 0; }
.ticks li::before { content: "✓ "; color: var(--accent); font-weight: 700; }
.sd-tips-warn { border-color: rgba(251,191,36,.35); }
.sd-tips p { margin: 0; font-size: 13px; }

/* success */
.sd-success { padding: 36px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ok-mark { width: 52px; height: 52px; border-radius: 50%; background: rgba(20,184,166,.15); color: #5eead4; display: grid; place-items: center; font-size: 26px; font-weight: 700; }
.sd-success h2 { font-size: 20px; }
.sd-success-actions { display: flex; gap: 10px; margin-top: 8px; }

/* tables */
.tbl-tickets tbody tr { cursor: pointer; }
.tbl .col-no { width: 1%; white-space: nowrap; font: 600 12.5px var(--mono); }
.tbl td.subject { min-width: 240px; max-width: 480px; }
.tbl td.subject .sub { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 480px; }
.status-pill, .urg-pill { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; letter-spacing: .02em; }
.status-pill.s-new { background: rgba(129,140,248,.18); color: #c7d2fe; }
.status-pill.s-in_progress { background: rgba(20,184,166,.18); color: #5eead4; }
.status-pill.s-paused { background: rgba(251,191,36,.18); color: #fde68a; }
.status-pill.s-done { background: rgba(148,163,184,.18); color: #cbd5e1; }
.urg-pill.u-blocking { background: rgba(248,113,113,.18); color: #fca5a5; }
.urg-pill.u-high { background: rgba(251,191,36,.18); color: #fde68a; }
.urg-pill.u-normal { background: rgba(148,163,184,.14); color: #cbd5e1; }
.urg-pill.u-low { background: rgba(148,163,184,.1); color: #94a3b8; }
.tbl tr.is-done td { color: var(--muted); }
.attach-mini { color: var(--muted); font-size: 12px; margin-left: 6px; }

/* drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(2,6,23,.6); z-index: 20; backdrop-filter: blur(2px); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(720px, 100vw); background: var(--bg-2); border-left: 1px solid var(--line);
  z-index: 21; display: flex; flex-direction: column; box-shadow: -20px 0 60px rgba(0,0,0,.5); }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 24px 16px; border-bottom: 1px solid var(--line); }
.drawer-no { font: 600 13px var(--mono); color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.drawer-head h2 { font-size: 18px; line-height: 1.3; margin-bottom: 4px; }
.drawer-body { overflow-y: auto; padding: 20px 24px 40px; display: flex; flex-direction: column; gap: 22px; }
.d-section h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px; display: flex; align-items: center; }
.d-desc { margin: 0; white-space: pre-wrap; line-height: 1.55; font-size: 14px; }
.work-card { padding: 16px 18px; border-left: 3px solid var(--accent); display: flex; flex-direction: column; gap: 10px; }
.work-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.work-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.work-note { width: 100%; resize: vertical; font-size: 13.5px; }
.work-card.is-paused .timer { color: #fde68a; }
.work-card.is-queued .timer { color: var(--muted); }
.work-card.is-done .timer { color: #cbd5e1; }
.btn-danger { border-color: rgba(248,113,113,.4); color: #fca5a5; }
.btn-danger:hover { background: rgba(248,113,113,.12); }
.attach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.attach { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card); text-decoration: none; color: var(--text); }
.attach img, .attach video { width: 100%; height: 110px; object-fit: cover; background: #000; display: block; }
.attach .attach-file { height: 110px; display: grid; place-items: center; font: 600 13px var(--mono); color: var(--muted); text-transform: uppercase; background: var(--card-2); }
.attach .attach-name { font-size: 12px; padding: 0 10px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach .attach-size { color: var(--muted); font-size: 11px; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.timeline li { display: grid; grid-template-columns: 150px 1fr; gap: 12px; font-size: 13px; }
.timeline .tl-when { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.timeline .tl-detail { color: var(--muted); display: block; font-size: 12.5px; white-space: pre-wrap; }
@media (max-width: 560px) { .timeline li { grid-template-columns: 1fr; gap: 2px; } .drawer-body, .drawer-head { padding-left: 16px; padding-right: 16px; } }
