/* =========================================================
   SMS Dispatch — a small console for sending a single SMS,
   styled like the instrument panel of the tool it actually is:
   something you type into, send, and watch report back.
   ========================================================= */

:root {
  --bg-deep:    #141a2e;
  --bg-panel:   #1b2340;
  --bg-inset:   #11162a;
  --ink:        #edeff7;
  --ink-soft:   #9aa3c4;
  --ink-faint:  #6b7396;
  --border:     #2a3358;
  --border-soft:#232a4a;

  --amber:      #f5a623;
  --amber-ink:  #2a1a02;
  --mint:       #3ddc97;
  --coral:      #ff6b6b;

  --font-display: 'Space Grotesk', 'Hind Siliguri', sans-serif;
  --font-bangla:  'Hind Siliguri', 'Space Grotesk', sans-serif;

  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-bangla);
  color: var(--ink);
  background:
    radial-gradient(720px 420px at 50% -8%, rgba(245, 166, 35, 0.16), transparent 60%),
    radial-gradient(600px 500px at 100% 100%, rgba(61, 220, 151, 0.06), transparent 55%),
    var(--bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.page {
  width: 100%;
  display: flex;
  justify-content: center;
}

.card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px 28px;
  box-shadow:
    0 30px 60px -20px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  animation: rise 0.5s ease both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Header ---------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 14px;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 0 rgba(61, 220, 151, 0.6);
  animation: pulse 2.2s ease-out infinite;
  flex: none;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(61, 220, 151, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0); }
}

.card h1 {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.subtitle {
  margin: 0 0 24px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}

hr.divider {
  border: none;
  border-top: 1px solid var(--border-soft);
  margin: 0 0 22px;
}

/* ---------- Fields ---------- */

.field {
  margin-bottom: 20px;
}

.label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}

label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  text-transform: uppercase;
  font-family: var(--font-display);
}

label .hint {
  text-transform: none;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink-faint);
  font-family: var(--font-bangla);
  margin-left: 4px;
}

input[type="tel"],
textarea {
  width: 100%;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--ink);
  padding: 13px 14px;
  font-size: 15px;
  font-family: var(--font-display);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea {
  font-family: var(--font-bangla);
  resize: vertical;
  min-height: 92px;
  line-height: 1.5;
}

input[type="tel"]::placeholder,
textarea::placeholder {
  color: var(--ink-faint);
}

input[type="tel"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.18);
}

textarea.over {
  border-color: var(--coral);
}
textarea.over:focus {
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.18);
}

/* ---------- Character counter (signature element) ---------- */

.counter {
  display: flex;
  align-items: center;
  gap: 8px;
}

.counter-ring {
  --pct: 0;
  --ring-color: var(--amber);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  position: relative;
  flex: none;
  background: conic-gradient(var(--ring-color) calc(var(--pct) * 3.6deg), var(--border) 0deg);
  transition: background 0.15s linear;
}
.counter-ring::after {
  content: '';
  position: absolute;
  inset: 3.5px;
  border-radius: 50%;
  background: var(--bg-panel);
}
.counter-ring.over { --ring-color: var(--coral); }

.counter-text {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.counter-text.over { color: var(--coral); }

.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  min-height: 16px;
}

.lang-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--border-soft);
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}
.lang-tag.bangla {
  background: rgba(245, 166, 35, 0.14);
  color: var(--amber);
}

.error-text {
  font-size: 12px;
  color: var(--coral);
  min-height: 15px;
}

/* ---------- Button ---------- */

button[type="submit"] {
  width: 100%;
  border: none;
  border-radius: var(--radius-md);
  background: var(--amber);
  color: var(--amber-ink);
  font-family: var(--font-bangla);
  font-size: 15.5px;
  font-weight: 700;
  padding: 14px;
  cursor: pointer;
  transition: transform 0.08s ease, filter 0.15s ease, opacity 0.15s ease;
  margin-top: 4px;
}

button[type="submit"]:hover:not(:disabled) {
  filter: brightness(1.07);
}
button[type="submit"]:active:not(:disabled) {
  transform: scale(0.98);
}
button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: wait;
}
button[type="submit"]:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* ---------- Status (delivery-report style) ---------- */

.status {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: center;
  min-height: 20px;
  margin-top: 16px;
  transition: color 0.15s ease;
}
.status.success { color: var(--mint); }
.status.error   { color: var(--coral); }

/* ---------- Location notice ---------- */

.location-note {
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-faint);
}
.location-note .en {
  display: block;
  margin-top: 3px;
}

/* ---------- Responsive ---------- */

@media (max-width: 400px) {
  .card {
    padding: 26px 20px 22px;
    border-radius: var(--radius-md);
  }
  .card h1 { font-size: 22px; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .card { animation: none; }
  .live-dot { animation: none; }
  * { transition-duration: 0.001ms !important; }
}
