/* =============================================================
   support.css — help center · ticket · detail · system status
   Builds on billing.css / styles.css tokens. Cosmic premium.
   ============================================================= */

.page-support { display: flex; flex-direction: column; gap: 16px; }

/* ── hero + search ── */
.sup-hero { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 0 2px; }
.sup-hero-title { font-family: var(--font-display); font-size: 34px; font-weight: 800; color: #fff; }
.app-shell.rtl .sup-hero-title { font-weight: 700; }
.sup-hero-sub { color: var(--gold); font-size: 14px; }
.sup-search {
  display: flex; align-items: center; gap: 12px; width: min(680px, 100%); margin-top: 8px;
  height: 56px; padding: 0 20px; border-radius: 16px;
  border: 1px solid rgba(152,114,255,0.4); background: rgba(10,12,26,0.7);
  color: var(--text-muted);
}
.sup-search:focus-within { border-color: rgba(152,114,255,0.7); box-shadow: 0 0 0 4px rgba(152,114,255,0.12); }
.sup-search input { flex: 1; background: transparent; border: none; outline: none; color: var(--text); font-family: inherit; font-size: 15px; }
.sup-search input::placeholder { color: var(--text-dim); }

/* ── action cards ── */
.sup-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.sup-card {
  position: relative; display: flex; flex-direction: column; gap: 7px; text-align: center; align-items: center;
  padding: 22px 16px 30px; border-radius: var(--r-lg); cursor: pointer;
  border: 1px solid var(--border-soft); background: linear-gradient(180deg, rgba(11,15,30,0.86), rgba(5,7,18,0.92));
  color: var(--text-soft); font-family: inherit; transition: transform .18s, border-color .18s, box-shadow .18s;
}
.sup-card:hover { transform: translateY(-3px); }
.sup-card-ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 4px; border: 1px solid; }
.sup-card strong { font-size: 15px; color: #fff; font-weight: 700; }
.sup-card-s { font-size: 11.5px; color: var(--text-muted); line-height: 1.6; }
.sup-card-go { position: absolute; bottom: 12px; color: var(--text-dim); }
.app-shell.ltr .sup-card-go { transform: scaleX(-1); }
.sup-card.violet .sup-card-ic { color: var(--violet); background: rgba(152,114,255,0.12); border-color: rgba(152,114,255,0.4); }
.sup-card.violet:hover { border-color: rgba(152,114,255,0.55); box-shadow: 0 14px 40px -20px rgba(152,114,255,0.7); }
.sup-card.cyan .sup-card-ic { color: var(--cyan); background: rgba(98,221,255,0.12); border-color: rgba(98,221,255,0.4); }
.sup-card.cyan:hover { border-color: rgba(98,221,255,0.55); box-shadow: 0 14px 40px -20px rgba(98,221,255,0.7); }
.sup-card.gold .sup-card-ic { color: var(--gold); background: rgba(248,198,72,0.12); border-color: rgba(248,198,72,0.4); }
.sup-card.gold:hover { border-color: rgba(248,198,72,0.55); box-shadow: 0 14px 40px -20px rgba(248,198,72,0.7); }
.sup-card.green .sup-card-ic { color: var(--green); background: rgba(95,214,181,0.12); border-color: rgba(95,214,181,0.4); }
.sup-card.green:hover { border-color: rgba(95,214,181,0.55); box-shadow: 0 14px 40px -20px rgba(95,214,181,0.7); }

/* ── two-column ── */
.sup-grid2 { display: grid; grid-template-columns: 1.55fr 1fr; gap: 16px; align-items: start; }

/* ── FAQ accordion ── */
.sup-faq { display: flex; flex-direction: column; gap: 8px; }
.sup-faq-item { border: 1px solid var(--border-soft); border-radius: 12px; overflow: hidden; transition: border-color .2s; }
.sup-faq-item.open { border-color: rgba(152,114,255,0.45); }
.sup-faq-q { display: flex; align-items: center; gap: 11px; width: 100%; padding: 14px 14px; background: transparent; border: none; cursor: pointer; font-family: inherit; color: var(--text); font-size: 13.5px; font-weight: 600; text-align: start; }
.sup-faq-ic { color: var(--violet); display: grid; place-items: center; flex: none; }
.sup-faq-q > span:nth-child(2) { flex: 1; }
.sup-faq-chev { color: var(--text-dim); transition: transform .25s; flex: none; }
.sup-faq-item.open .sup-faq-chev { transform: rotate(180deg); color: var(--violet); }
.sup-faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.sup-faq-item.open .sup-faq-a { grid-template-rows: 1fr; }
.sup-faq-a > p { overflow: hidden; margin: 0; padding: 0 16px; color: var(--text-muted); font-size: 12.5px; line-height: 1.9; }
.sup-faq-item.open .sup-faq-a > p { padding: 0 16px 14px; }
.app-shell.rtl .sup-faq-q, .app-shell.rtl .sup-faq-a > p { text-align: right; }
.sup-faq-all { margin-top: 4px; align-self: center; background: transparent; border: none; color: var(--cyan); font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 6px; }
.sup-faq-all:hover { text-decoration: underline; }

/* ── open ticket card ── */
.sup-ticket-open { border-color: rgba(152,114,255,0.35); }
.sup-to-head { display: flex; align-items: center; justify-content: space-between; }
.sup-to-head > span:first-child { font-size: 16px; font-weight: 700; color: var(--violet); }
.sup-to-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--violet); border: 1px solid rgba(152,114,255,0.4); background: rgba(152,114,255,0.1); }
.sup-to-rows { display: flex; flex-direction: column; gap: 11px; }
.sup-to-row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--text-muted); }
.sup-to-row b { font-family: var(--font-en); color: var(--text-soft); font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.app-shell.rtl .sup-to-row b { font-family: inherit; }
.sup-to-row b.amber { color: var(--gold); }
.sup-to-note { font-size: 12px; color: var(--text-muted); line-height: 1.7; }
.app-shell.rtl .sup-to-note { text-align: right; }
.sup-to-actions { display: flex; gap: 10px; }

/* ── submit ticket form ── */
.sup-form { gap: 16px; }
.sup-type-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.sup-type { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 10px; cursor: pointer; border: 1px solid var(--border-soft); background: rgba(255,255,255,0.02); color: var(--text-soft); font-family: inherit; font-size: 12.5px; font-weight: 600; transition: all .18s; }
.sup-type svg { color: var(--violet); }
.sup-type:hover { border-color: rgba(152,114,255,0.4); }
.sup-type.active { border-color: rgba(152,114,255,0.75); background: linear-gradient(180deg, rgba(152,114,255,0.2), rgba(110,80,200,0.1)); color: #fff; }
.sup-sel { flex: 1; background: transparent; border: none; outline: none; color: var(--text); font-family: inherit; font-size: 14px; height: 100%; cursor: pointer; }
.sup-sel option { background: #0b0e1c; }
.sup-textarea { width: 100%; resize: vertical; min-height: 110px; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid rgba(171,192,255,0.16); background: rgba(7,10,22,0.6); color: var(--text); font-family: inherit; font-size: 14px; line-height: 1.8; outline: none; }
.sup-textarea:focus { border-color: rgba(152,114,255,0.6); box-shadow: 0 0 0 3px rgba(152,114,255,0.12); }
.sup-textarea::placeholder { color: var(--text-dim); }
.app-shell.rtl .sup-textarea { text-align: right; }
.sup-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 24px; border-radius: var(--r-md); border: 1.5px dashed rgba(152,114,255,0.4); background: rgba(152,114,255,0.04); color: var(--text-muted); cursor: pointer; transition: all .18s; text-align: center; }
.sup-drop:hover { border-color: rgba(152,114,255,0.7); background: rgba(152,114,255,0.08); }
.sup-drop svg { color: var(--violet); }
.sup-drop strong { font-size: 13px; color: var(--text-soft); font-weight: 600; }
.sup-drop span { font-size: 11px; color: var(--text-dim); }
.sup-form-actions { display: flex; gap: 12px; justify-content: flex-end; }
.app-shell.rtl .sup-form-actions { justify-content: flex-start; }
.sup-submit { display: inline-flex; align-items: center; justify-content: center; gap: 9px; flex: 1; height: 50px; border-radius: 13px; cursor: pointer; font-family: inherit; font-size: 15px; font-weight: 700; color: #fff; border: 1px solid rgba(152,114,255,0.7); background: linear-gradient(180deg, rgba(152,114,255,0.5), rgba(110,80,200,0.35)); box-shadow: 0 0 24px rgba(152,114,255,0.3); transition: transform .18s, box-shadow .18s; }
.sup-submit:hover { transform: translateY(-1px); box-shadow: 0 0 32px rgba(152,114,255,0.45); }

/* ── info cards (ticket sidebar) ── */
.sup-info-card { flex-direction: row; align-items: center; gap: 14px; }
.app-shell.rtl .sup-info-card { flex-direction: row-reverse; text-align: right; }
.sup-info-ic { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; }
.sup-info-ic.violet { color: var(--violet); background: rgba(152,114,255,0.12); border: 1px solid rgba(152,114,255,0.35); }
.sup-info-ic.gold { color: var(--gold); background: rgba(248,198,72,0.12); border: 1px solid rgba(248,198,72,0.35); }
.sup-info-card div { display: flex; flex-direction: column; gap: 2px; }
.sup-info-card strong { font-size: 12.5px; color: var(--text-muted); font-weight: 600; }
.sup-big { font-size: 16px; color: #fff; font-weight: 700; }
.sup-info-card span { font-size: 11.5px; color: var(--text-muted); }
.sup-tips { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.sup-tips li { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--text-soft); }
.app-shell.rtl .sup-tips li { flex-direction: row-reverse; text-align: right; }
.sup-tip-ok { flex: none; width: 18px; height: 18px; border-radius: 999px; display: grid; place-items: center; color: #06121f; background: var(--green); }

/* ── ticket detail ── */
.sup-status-bar { flex-direction: row; flex-wrap: wrap; gap: 24px; }
.sup-sb { display: flex; flex-direction: column; gap: 3px; }
.app-shell.rtl .sup-sb { text-align: right; }
.sup-sb > span { font-size: 11.5px; color: var(--text-muted); }
.sup-sb b { font-family: var(--font-en); font-size: 14px; color: var(--text-soft); font-weight: 700; }
.app-shell.rtl .sup-sb b { font-family: inherit; }
.sup-sb b.amber { color: var(--gold); }
.sup-sb b.red { color: #ff8a8a; }
.sup-yourmsg { border-color: rgba(152,114,255,0.35); }
.sup-msg-head { display: flex; align-items: center; gap: 10px; }
.app-shell.rtl .sup-msg-head { flex-direction: row-reverse; }
.sup-msg-ic { width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center; color: var(--violet); background: rgba(152,114,255,0.12); border: 1px solid rgba(152,114,255,0.35); }
.sup-msg-head strong { color: var(--violet); font-size: 13.5px; font-weight: 700; flex: 1; }
.app-shell.rtl .sup-msg-head strong { text-align: right; }
.sup-msg-t { font-size: 11.5px; color: var(--text-dim); font-family: var(--font-en); }
.sup-yourmsg p { color: var(--text-soft); font-size: 13px; line-height: 1.9; }
.app-shell.rtl .sup-yourmsg p { text-align: right; }

.sup-timeline { display: flex; flex-direction: column; gap: 4px; position: relative; }
.sup-tl-item { display: grid; grid-template-columns: 36px 1fr; gap: 12px; padding: 12px 4px; position: relative; }
.sup-tl-item::before { content: ''; position: absolute; top: 36px; bottom: -4px; inset-inline-start: 17px; width: 2px; background: rgba(255,255,255,0.07); }
.sup-tl-item:last-child::before { display: none; }
.sup-tl-dot { width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center; z-index: 1; border: 1px solid; }
.sup-tl-item.violet .sup-tl-dot { color: var(--violet); background: rgba(152,114,255,0.14); border-color: rgba(152,114,255,0.4); }
.sup-tl-item.cyan .sup-tl-dot { color: var(--cyan); background: rgba(98,221,255,0.14); border-color: rgba(98,221,255,0.4); }
.sup-tl-item.gold .sup-tl-dot { color: var(--gold); background: rgba(248,198,72,0.14); border-color: rgba(248,198,72,0.4); }
.sup-tl-body { display: flex; flex-direction: column; gap: 3px; }
.app-shell.rtl .sup-tl-body { text-align: right; }
.sup-tl-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sup-tl-top strong { font-size: 13px; color: #fff; font-weight: 700; }
.sup-tl-top span { font-size: 11px; color: var(--text-dim); font-family: var(--font-en); }
.sup-tl-body p { color: var(--text-muted); font-size: 12.5px; line-height: 1.85; }
.sup-reply { margin-top: 8px; border-top: 1px solid var(--border-soft); padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.sup-reply textarea { width: 100%; resize: vertical; min-height: 52px; padding: 11px 14px; border-radius: var(--r-md); border: 1px solid rgba(171,192,255,0.16); background: rgba(7,10,22,0.6); color: var(--text); font-family: inherit; font-size: 13.5px; outline: none; }
.app-shell.rtl .sup-reply textarea { text-align: right; }
.sup-reply-btn { align-self: flex-end; display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 11px; cursor: pointer; font-family: inherit; font-weight: 700; font-size: 13px; color: #fff; border: 1px solid rgba(152,114,255,0.6); background: rgba(152,114,255,0.25); }
.app-shell.rtl .sup-reply-btn { align-self: flex-start; }
.sup-reply-btn:hover { background: rgba(152,114,255,0.38); }
.sup-detail-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.sup-acc { display: flex; flex-direction: column; gap: 11px; }
.sup-acc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--text-muted); }
.sup-acc-row b { font-family: var(--font-en); color: var(--text-soft); font-weight: 600; text-align: end; }
.app-shell.rtl .sup-acc-row b { font-family: inherit; }
.sup-acc-row b.gold { color: var(--gold); }
.sup-acc-row b.amber { color: var(--gold); }

/* ── system status ── */
.sup-status-hero { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 4px 0; }
.sup-status-mark { width: 84px; height: 84px; border-radius: 999px; display: grid; place-items: center; color: var(--violet); border: 1.5px solid rgba(152,114,255,0.5); background: rgba(152,114,255,0.08); box-shadow: 0 0 36px rgba(152,114,255,0.3); margin-bottom: 4px; }
.sup-allok { flex-direction: row; align-items: center; gap: 14px; border-color: rgba(95,214,181,0.3); background: linear-gradient(180deg, rgba(10,22,18,0.7), rgba(5,12,10,0.85)); }
.app-shell.rtl .sup-allok { flex-direction: row-reverse; text-align: right; }
.sup-allok.mini { padding: 12px 14px; }
.sup-allok-ic { flex: none; width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center; color: #06121f; background: radial-gradient(circle at 50% 38%, #7ef0c0, #46c98a); box-shadow: 0 0 20px rgba(95,214,181,0.5); }
.sup-allok-ic.sm { width: 32px; height: 32px; }
.sup-allok strong { display: block; font-size: 15px; color: var(--green); font-weight: 700; }
.sup-allok > div { flex: 1; }
.sup-allok span { font-size: 12px; color: var(--text-muted); }
.sup-uptime { text-align: end; }
.sup-uptime b { display: block; font-family: var(--font-en); font-size: 22px; font-weight: 800; color: #fff; }
.sup-uptime span { font-size: 11px; color: var(--text-muted); }
.sup-svc-list { display: flex; flex-direction: column; }
.sup-svc { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 13px 4px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.sup-svc:last-child { border-bottom: none; }
.sup-svc-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: var(--violet); background: rgba(152,114,255,0.1); }
.sup-svc-tx { display: flex; flex-direction: column; gap: 2px; }
.app-shell.rtl .sup-svc-tx { text-align: right; }
.sup-svc-tx strong { font-size: 13.5px; color: var(--text); font-weight: 600; }
.sup-svc-tx span { font-size: 11.5px; color: var(--text-muted); }
.sup-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.sup-badge i { width: 7px; height: 7px; border-radius: 999px; }
.sup-badge.ok { color: var(--green); background: rgba(95,214,181,0.12); border: 1px solid rgba(95,214,181,0.4); }
.sup-badge.ok i { background: var(--green); box-shadow: 0 0 8px var(--green); }
.sup-badge.watch { color: var(--gold); background: rgba(248,198,72,0.12); border: 1px solid rgba(248,198,72,0.4); }
.sup-badge.watch i { background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.sup-badge.degraded { color: #f4a261; background: rgba(244,162,97,0.12); border: 1px solid rgba(244,162,97,0.4); }
.sup-badge.degraded i { background: #f4a261; }
.sup-badge.down { color: #ff8a8a; background: rgba(244,95,95,0.12); border: 1px solid rgba(244,95,95,0.4); }
.sup-badge.down i { background: var(--red); }
.sup-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; padding-top: 12px; border-top: 1px solid var(--border-soft); margin-top: 4px; }
.sup-legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-muted); }
.sup-legend i { width: 8px; height: 8px; border-radius: 999px; }
.sup-legend i.ok { background: var(--green); }
.sup-legend i.watch { background: var(--gold); }
.sup-legend i.degraded { background: #f4a261; }
.sup-legend i.down { background: var(--red); }
.sup-incidents { display: flex; flex-direction: column; gap: 4px; }
.sup-inc { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: center; padding: 9px 2px; }
.sup-inc-dot { width: 22px; height: 22px; border-radius: 999px; display: grid; place-items: center; color: #06121f; background: var(--green); }
.sup-inc > div { display: flex; flex-direction: column; gap: 1px; }
.app-shell.rtl .sup-inc > div { text-align: right; }
.sup-inc strong { font-size: 12.5px; color: var(--text-soft); font-weight: 600; }
.sup-inc .green { font-size: 10.5px; color: var(--green); }
.sup-inc-date { font-size: 11px; color: var(--text-dim); font-family: var(--font-en); white-space: nowrap; }
.sup-maint { flex-direction: row; align-items: flex-start; gap: 14px; }
.app-shell.rtl .sup-maint { flex-direction: row-reverse; text-align: right; }
.sup-maint div { display: flex; flex-direction: column; gap: 4px; }
.sup-maint strong { font-size: 14px; color: #fff; font-weight: 700; }
.sup-maint span { font-size: 12px; color: var(--text-muted); line-height: 1.8; }
.sup-status-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

@media (max-width: 980px) {
  .sup-cards { grid-template-columns: repeat(2, 1fr); }
  .sup-grid2 { grid-template-columns: 1fr; }
  .sup-detail-actions, .sup-status-actions { grid-template-columns: 1fr; }
  .sup-status-bar { gap: 16px; }
}
