/* Saif Tech Global LLC — Working Mode / Helpline / Admin portals.
   Same black + dark-pink theme and Bodoni Moda type as the approved homepage. */
@import url("https://fonts.googleapis.com/css2?family=Bodoni+Moda:ital,opsz,wght@0,6..96,400..800;1,6..96,400..800&display=swap");

:root {
  --bg: #000;
  --panel: #070708;
  --panel-2: #0d0d10;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.22);
  --pink: #f2155f;
  --pink-hi: #ff4a83;
  --pink-soft: rgba(242, 21, 95, 0.12);
  --text: #f5f5f7;
  --muted: rgba(245, 245, 247, 0.62);
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --radius: 16px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: "Bodoni Moda", "Didot", Georgia, serif;
  font-style: italic;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  overflow-x: hidden;
}
a { color: var(--pink-hi); }
h1, h2, h3 { font-weight: 400; margin: 0; letter-spacing: -0.01em; }
code, pre, .mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-style: normal; }
.label { font-style: normal; text-transform: uppercase; letter-spacing: 0.2em; font-size: 11px; color: var(--muted); }
.hidden { display: none !important; }

/* ---------- header ---------- */
.p-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) 12px calc(16px + env(safe-area-inset-left));
  background: rgba(0, 0, 0, 0.9); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 14px; color: var(--text); text-decoration: none; border-left: 2px solid var(--pink); padding-left: 12px; min-width: 0; }
.brand strong { display: block; font-size: 18px; font-weight: 600; white-space: nowrap; }
.brand strong span { color: var(--pink); }
.brand small { display: block; font-style: normal; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.emblem-protect { position: relative; display: inline-block; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; margin-right: 12px; }
.emblem-protect img { pointer-events: none; user-select: none; -webkit-user-drag: none; display: block; }
.emblem-tm { position: absolute; bottom: 0; right: -12px; font-size: 12px; line-height: 1; color: #a1a1aa; font-style: normal; user-select: none; pointer-events: none; }
.p-nav { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 12px; border: 1px solid var(--line-strong); background: #000; color: var(--text);
  padding: 10px 16px; font: inherit; font-size: 15px; cursor: pointer; text-decoration: none; transition: border-color .2s, background .2s, transform .2s;
}
.btn:hover { border-color: var(--pink); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--pink); border-color: var(--pink); color: #fff; }
.btn.primary:hover { background: #ff2a6d; }
.btn.small { padding: 6px 10px; font-size: 13px; border-radius: 10px; }
.btn.danger { border-color: rgba(248, 113, 113, .5); color: #fecaca; }
input, textarea, select {
  width: 100%; font: inherit; font-style: normal; font-size: 15px; color: var(--text);
  background: #050506; border: 1px solid var(--line-strong); border-radius: 12px; padding: 11px 13px;
}
input:focus, textarea:focus, select:focus, .btn:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
textarea { min-height: 90px; resize: vertical; }
label.field { display: block; margin: 0 0 12px; }
label.field > span { display: block; margin-bottom: 6px; font-size: 13px; color: var(--muted); font-style: normal; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { width: auto; margin-top: 4px; }

/* ---------- layout ---------- */
.wrap { max-width: 1440px; margin: 0 auto; padding: 28px 16px 120px; }
.hero { text-align: center; padding: 26px 0 12px; }
.hero h1 { font-size: clamp(34px, 6vw, 58px); line-height: 1.06; }
.hero h1 em { color: var(--pink); font-style: italic; }
.hero p { max-width: 720px; margin: 14px auto 0; color: rgba(245, 245, 247, .85); font-size: 18px; }
.bar { width: 96px; height: 3px; border-radius: 3px; background: var(--pink); margin: 18px auto 0; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.panel.pink { border-color: rgba(242, 21, 95, .45); }
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: 1fr; }
@media (min-width: 900px) { .cols-2 { grid-template-columns: 340px minmax(0, 1fr); } }
.steps { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-top: 26px; }
.step { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: #050506; }
.step b { color: var(--pink); font-style: normal; font-size: 12px; letter-spacing: .2em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.list { display: flex; flex-direction: column; gap: 6px; }
.list button { text-align: left; width: 100%; }
.list .active { border-color: var(--pink); background: var(--pink-soft); }

/* ---------- chips & status ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px 10px; font-size: 12px; font-style: normal; white-space: nowrap; }
.chip.pink { border-color: rgba(242, 21, 95, .7); color: #ffc0d4; }
.chip.green { border-color: rgba(52, 211, 153, .6); color: #a7f3d0; }
.chip.amber { border-color: rgba(251, 191, 36, .6); color: #fde68a; }
.chip.red { border-color: rgba(248, 113, 113, .6); color: #fecaca; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }

/* ---------- chat ---------- */
.chat { display: flex; flex-direction: column; gap: 12px; max-height: min(62dvh, 640px); overflow-y: auto; padding: 6px; }
/* Full-size chat workspace (Working Mode + Helpline): fills the screen like a standard chat app */
.chat-panel { display: flex; flex-direction: column; min-height: clamp(520px, calc(100dvh - 250px), 1000px); padding: 24px; }
.chat-panel .chat { flex: 1 1 auto; min-height: 340px; max-height: none; }
.msg { max-width: 82%; border-radius: 16px; padding: 14px 18px; white-space: pre-wrap; word-wrap: break-word; font-size: 17px; line-height: 1.6; }
.msg.user { align-self: flex-end; background: var(--pink-soft); border: 1px solid rgba(242, 21, 95, .45); }
.msg.assistant, .msg.staff { align-self: flex-start; background: var(--panel-2); border: 1px solid var(--line); }
.msg.notice, .msg.system { align-self: center; font-size: 13px; color: #ffc0d4; border: 1px dashed rgba(242, 21, 95, .5); }
.msg .who { display: block; font-size: 11px; font-style: normal; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.composer { display: flex; gap: 10px; margin-top: 12px; align-items: flex-end; }
.composer textarea { min-height: 76px; max-height: 240px; font-size: 17px; padding: 14px 16px; }
.composer .btn { min-height: 56px; padding: 0 26px; font-size: 17px; }
.typing { color: var(--muted); font-size: 14px; }

/* ---------- money table ---------- */
table { width: 100%; border-collapse: collapse; font-style: normal; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 500; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
td.num, th.num { text-align: right; white-space: nowrap; }
.total td { font-size: 16px; font-weight: 600; border-bottom: none; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- markdown ---------- */
.md h1, .md h2, .md h3 { margin: 18px 0 8px; font-size: 20px; }
.md h1 { font-size: 24px; }
.md p, .md li { color: rgba(245, 245, 247, .88); }
.md code { background: #111; padding: 1px 5px; border-radius: 6px; }
details > summary { cursor: pointer; color: var(--pink-hi); }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 50; background: #000; border: 1px solid var(--pink); border-radius: 12px; padding: 10px 16px; font-size: 14px; max-width: calc(100vw - 32px); }
.error { color: #fecaca; }
.progress { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--pink); }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 8px 0 8px 18px; border-left: 2px solid var(--line); position: relative; font-size: 14px; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--pink); }
footer.p-foot { text-align: center; color: var(--muted); font-size: 12px; padding: 30px 16px calc(30px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); font-style: normal; }

/* Phones: stack the message box above the Send button, keep the header readable */
@media (max-width: 600px) {
  .composer { flex-direction: column; align-items: stretch; }
  .composer .btn { width: 100%; }
  .msg { max-width: 94%; font-size: 16px; }
  .chat-panel { padding: 16px; min-height: clamp(480px, calc(100dvh - 220px), 900px); }
  .brand strong { font-size: 15px; }
  .brand small { font-size: 8.5px; letter-spacing: .12em; }
  .p-nav .btn.small { padding: 5px 8px; font-size: 12px; }
}
