@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #060a14; --bg2: #0a1120; --card: rgba(255,255,255,.045); --card2: rgba(255,255,255,.075);
  --line: rgba(255,255,255,.09); --line2: rgba(255,255,255,.16);
  --text: #e8edf6; --muted: #91a1b9; --dim: #5f6d84;
  --accent: #22d3ee; --accent2: #a78bfa; --ok: #34d399; --warn: #fbbf24; --bad: #f87171;
  --p1: #f87171; --p2: #fb923c; --p3: #facc15; --p4: #60a5fa;
  --radius: 18px; --shadow: 0 20px 60px rgba(0,0,0,.45);
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--text);
  background: var(--bg); min-height: 100vh; -webkit-font-smoothing: antialiased; line-height: 1.5;
  background-image:
    radial-gradient(900px 520px at 8% -8%, rgba(34,211,238,.13), transparent 62%),
    radial-gradient(800px 480px at 105% 4%, rgba(167,139,250,.13), transparent 60%),
    radial-gradient(700px 500px at 50% 120%, rgba(52,211,153,.06), transparent 60%);
  background-attachment: fixed;
}
a { color: var(--accent); text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
.hidden { display: none !important; }
.mono { font-family: var(--mono); }

/* brand */
.brand { display: flex; align-items: center; gap: 12px; }
.logo {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #061018; font-size: 18px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.15), 0 8px 24px rgba(34,211,238,.35);
}
.brand-name { font-weight: 700; letter-spacing: -.01em; }
.brand-sub { font-size: 12px; color: var(--muted); }

/* cards and controls */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
label.lbl, .field > label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 8px;
  letter-spacing: .01em; }
.opt { font-weight: 500; color: var(--dim); margin-left: 6px; }
.field { margin-bottom: 20px; }
textarea, input[type=text], input[type=email], input[type=tel] {
  width: 100%; background: rgba(0,0,0,.28); border: 1px solid var(--line2); border-radius: 12px; color: var(--text);
  padding: 13px 14px; font: inherit; outline: none; transition: border-color .2s, box-shadow .2s; resize: vertical;
}
textarea:focus, input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(34,211,238,.15); }
textarea::placeholder, input::placeholder { color: var(--dim); }

.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button, .chip {
  border: 1px solid var(--line2); background: rgba(255,255,255,.03); border-radius: 999px; padding: 9px 15px;
  font-size: 14px; transition: all .18s; color: var(--text);
}
.seg button.on, .chip.on {
  border-color: transparent; color: #04121a; font-weight: 600;
  background: linear-gradient(135deg, var(--accent), #67e8f9);
  box-shadow: 0 6px 20px rgba(34,211,238,.28);
}
.chips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.chip { border-radius: 12px; text-align: left; padding: 11px 13px; display: flex; gap: 9px; align-items: center; }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }

.primary {
  width: 100%; border: 0; border-radius: 14px; padding: 15px 18px; font-weight: 700; font-size: 16px; color: #04121a;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: 0 12px 30px rgba(34,211,238,.25);
  transition: transform .15s, opacity .2s, box-shadow .2s;
}
.primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 16px 36px rgba(34,211,238,.32); }
.primary:disabled { opacity: .35; cursor: not-allowed; }
.ghost {
  border: 1px solid var(--line2); background: rgba(255,255,255,.04); border-radius: 12px; padding: 10px 14px;
  font-weight: 600; font-size: 14px;
}
.ghost:hover { background: rgba(255,255,255,.08); }
.fine { font-size: 12px; color: var(--dim); text-align: center; margin: 14px 0 0; }

/* media */
.media { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile {
  display: flex; align-items: center; justify-content: center; gap: 9px; border: 1px dashed var(--line2);
  border-radius: 14px; padding: 16px 12px; background: rgba(255,255,255,.025); font-weight: 600; font-size: 14px;
  cursor: pointer; transition: all .2s; color: var(--text);
}
.tile:hover { border-color: var(--accent); background: rgba(34,211,238,.06); }
.tile svg { width: 20px; height: 20px; }
.tile.rec { border-style: solid; border-color: var(--bad); background: rgba(248,113,113,.1); color: #fecaca; }
.thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.thumb { position: relative; width: 84px; height: 84px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0;
  background: rgba(0,0,0,.65); color: #fff; font-size: 13px; line-height: 1; }
.voice { margin-top: 12px; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px;
  border: 1px solid var(--line2); background: rgba(0,0,0,.25); }
.voice audio { flex: 1; height: 34px; }
.meter { flex: 1; height: 34px; display: flex; align-items: center; gap: 3px; }
.meter i { flex: 1; background: linear-gradient(180deg, var(--accent), var(--accent2)); border-radius: 3px; min-height: 3px;
  transition: height .08s; }
.timer { font-family: var(--mono); font-size: 13px; color: var(--muted); min-width: 44px; }
.icon-btn { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line2); background: rgba(255,255,255,.05);
  display: grid; place-items: center; flex: none; }

/* priority & status */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; border-radius: 999px;
  padding: 3px 10px; border: 1px solid var(--line2); white-space: nowrap; }
.pill.P1 { color: #fecaca; border-color: rgba(248,113,113,.5); background: rgba(248,113,113,.12); }
.pill.P2 { color: #fed7aa; border-color: rgba(251,146,60,.5); background: rgba(251,146,60,.12); }
.pill.P3 { color: #fef08a; border-color: rgba(250,204,21,.45); background: rgba(250,204,21,.1); }
.pill.P4 { color: #bfdbfe; border-color: rgba(96,165,250,.45); background: rgba(96,165,250,.1); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(34,211,238,.7);
  animation: pulse 1.6s infinite; display: inline-block; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34,211,238,.6); } 70% { box-shadow: 0 0 0 9px rgba(34,211,238,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,211,238,0); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.rise { animation: rise .35s ease both; }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.2);
  border-top-color: var(--accent); animation: spin .8s linear infinite; display: inline-block; }

/* toasts */
.toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 10px; z-index: 99;
  max-width: 380px; }
.toast { border-radius: 14px; padding: 13px 15px; background: rgba(14,22,40,.96); border: 1px solid var(--line2);
  box-shadow: var(--shadow); animation: rise .3s ease both; font-size: 14px; }
.toast b { display: block; margin-bottom: 2px; }
.toast.urgent { border-color: rgba(248,113,113,.6); box-shadow: 0 0 0 1px rgba(248,113,113,.3), var(--shadow); }

@media (max-width: 520px) { .card { padding: 18px; border-radius: 16px; } }
