* { box-sizing: border-box; }
:root {
  /* Mahakal palette — saffron + deep night blue */
  --bg: #0f1115;
  --bg-2: #131722;
  --bg-3: #1a1d24;
  --line: #232838;
  --ink: #e6e8eb;
  --ink-dim: #94a3b8;
  --saffron: #ff9933;
  --saffron-dim: rgba(255, 153, 51, 0.12);
  --gold: #fbbf24;
  --green: #34d399;
  --red: #fda4af;
  --blue: #60a5fa;
}
body {
  margin: 0;
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(ellipse at top, rgba(255,153,51,0.07), transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(76,29,149,0.10), transparent 60%),
    var(--bg);
  color: var(--ink);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Trishul watermark — subtle, fixed, behind content */
.trishul-watermark {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  font-size: clamp(280px, 60vw, 720px);
  line-height: 1;
  display: grid;
  place-items: center;
  opacity: 0.04;
  filter: drop-shadow(0 0 40px rgba(255, 153, 51, 0.4));
  user-select: none;
}
.trishul-watermark::after {
  content: "🔱";
  transform: rotate(-8deg);
}

/* Layered repeating trishuls in the corner — adds visual richness */
body::before {
  content: "🔱";
  position: fixed;
  top: -30px;
  right: -30px;
  font-size: 220px;
  opacity: 0.025;
  transform: rotate(15deg);
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: "🔱";
  position: fixed;
  bottom: -40px;
  left: -40px;
  font-size: 240px;
  opacity: 0.025;
  transform: rotate(-12deg);
  pointer-events: none;
  z-index: 0;
}

/* All real content sits above the watermark */
.bar, main { position: relative; z-index: 1; }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: var(--bg-3); padding: 1px 5px; border-radius: 3px; font-size: 12px; }

.bar {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  background: linear-gradient(90deg, rgba(255,153,51,0.08), var(--bg-2) 30%, var(--bg-2) 70%, rgba(76,29,149,0.08));
  border-bottom: 1px solid var(--line);
  gap: 18px;
  backdrop-filter: blur(8px);
}
.brand {
  font-weight: 700;
  font-size: 17px;
  background: linear-gradient(90deg, var(--saffron), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.02em;
}
nav { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
nav a { color: #cbd5e1; transition: color 0.15s; }
nav a:hover { color: var(--saffron); text-decoration: none; }
.role { margin-left: auto; opacity: .6; font-size: 12px; }

main { padding: 24px 20px; max-width: 1280px; margin: 0 auto; }

h1 {
  margin: 0 0 16px;
  font-size: 26px;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}
h2 {
  margin: 28px 0 12px;
  font-size: 13px;
  color: var(--saffron);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
  position: relative;
  padding-left: 14px;
}
h2::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 4px;
  height: 16px;
  background: linear-gradient(180deg, var(--saffron), transparent);
  border-radius: 2px;
  transform: translateY(-50%);
}
h3 { margin: 0 0 10px; }

table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(19, 23, 34, 0.85);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  backdrop-filter: blur(6px);
}
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); }
th {
  background: var(--bg-3);
  font-size: 11px;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(255, 153, 51, 0.03); }

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin: 12px 0 24px;
}
.tile {
  background: linear-gradient(160deg, rgba(255,153,51,0.06), rgba(19,23,34,0.95) 60%);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s, border-color 0.15s;
}
.tile:hover {
  transform: translateY(-2px);
  border-color: var(--saffron-dim);
}
.tile::before {
  content: "🔱";
  position: absolute;
  right: -8px;
  bottom: -16px;
  font-size: 64px;
  opacity: 0.06;
  pointer-events: none;
}
.tile .num { font-size: 32px; font-weight: 800; color: #fff; }
.tile .lbl {
  font-size: 11px;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-top: 4px;
  font-weight: 600;
}
.tile.ok .num { color: var(--green); }
.tile.warn .num { color: var(--gold); }

.alert {
  background: linear-gradient(90deg, rgba(255,153,51,0.10), rgba(180,83,9,0.20));
  border: 1px solid #b45309;
  padding: 12px 16px;
  border-radius: 10px;
  margin: 8px 0 18px;
  color: #fde68a;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: #1f2937;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge.senior { background: #4c1d95; color: #ddd6fe; }
.badge.st-confirmed { background: #064e3b; color: #6ee7b7; }
.badge.st-pending { background: #1e3a8a; color: #93c5fd; }
.badge.st-awaiting_payment { background: #78350f; color: #fcd34d; }
.badge.st-cancelled { background: #4c0519; color: #fda4af; }
.badge.st-rejected { background: #3f0f0f; color: #fca5a5; }

.bar-bg { background: var(--line); height: 8px; border-radius: 4px; }
.bar-fill {
  background: linear-gradient(90deg, var(--saffron), var(--gold) 50%, var(--green));
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s;
}

form.row, form.filter, form { display: flex; gap: 8px; flex-wrap: wrap; }
input, select, button {
  background: var(--bg-3);
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 9px 12px;
  border-radius: 7px;
  font-size: 14px;
}
input:focus, select:focus { outline: none; border-color: var(--saffron); }
button {
  background: linear-gradient(180deg, var(--saffron), #e87c1e);
  border-color: var(--saffron);
  color: #1a0e00;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.15s, transform 0.1s;
}
button:hover { filter: brightness(1.1); }
button:active { transform: translateY(1px); }

.card {
  background: rgba(19, 23, 34, 0.85);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  margin: 8px 0 18px;
  backdrop-filter: blur(6px);
}
.narrow { max-width: 360px; margin: 60px auto; }
.narrow form { flex-direction: column; }
.narrow label { display: block; font-size: 12px; color: var(--ink-dim); }
.narrow input { width: 100%; margin-top: 4px; }
.err { color: var(--red); }
.hint { font-size: 12px; color: var(--ink-dim); }

.btn.block {
  display: block;
  text-align: center;
  padding: 9px 12px;
  border-radius: 7px;
  border: 1px solid var(--saffron);
  color: var(--saffron);
  background: transparent;
  font-weight: 600;
  margin: 8px 0;
}
.btn.block:hover {
  background: var(--saffron-dim);
  text-decoration: none;
}

.sim-grid { display: grid; grid-template-columns: 240px 1fr; gap: 16px; }
.phones { list-style: none; padding: 0; margin: 0; }
.phones li { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.phones a.active { color: var(--green); font-weight: 700; }
.chat {
  background: rgba(10, 13, 18, 0.92);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  height: 60vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}
.msg { max-width: 75%; padding: 8px 12px; border-radius: 12px; white-space: pre-wrap; }
.msg.in { background: #1e3a8a; align-self: flex-end; border-bottom-right-radius: 2px; }
.msg.out { background: #134e2a; align-self: flex-start; border-bottom-left-radius: 2px; }

small { color: var(--ink-dim); }
.ok { color: var(--green); font-weight: 600; }
ol li { margin-bottom: 6px; }

@media (max-width: 640px) {
  .bar { flex-direction: column; align-items: flex-start; }
  nav { gap: 8px; font-size: 13px; }
  .role { margin-left: 0; }
  main { padding: 16px 12px; }
  h1 { font-size: 22px; }
  .tile { padding: 14px; }
  .tile .num { font-size: 26px; }
}
