@font-face {
  font-family: IRANSansLocal;
  src: local("IRANSans"), local("IranSans"), local("Vazirmatn");
  font-display: swap;
}

* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #060d18;
  --panel: rgba(9, 19, 34, 0.82);
  --panel-strong: rgba(13, 27, 46, 0.94);
  --line: rgba(164, 196, 226, 0.18);
  --text: #eff8ff;
  --muted: #a5b8cb;
  --blue: #2f95ff;
  --cyan: #42decf;
  --green: #37d79a;
  --red: #ff6678;
  --amber: #ffd166;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: IRANSansLocal, IRANSans, IranSans, Vazirmatn, Tahoma, Arial, sans-serif;
  background:
    linear-gradient(90deg, rgba(3, 8, 15, 0.95), rgba(5, 13, 23, 0.78) 48%, rgba(3, 8, 15, 0.92)),
    url("/assets/wallpaper.png") center / cover fixed;
  color: var(--text);
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 100% 96px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px) 0 0 / 96px 100%;
  mask-image: linear-gradient(to bottom, transparent, black 16%, black 84%, transparent);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  cursor: pointer;
}

button:hover {
  border-color: rgba(66, 222, 207, 0.55);
  background: rgba(66, 222, 207, 0.11);
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(4, 11, 20, 0.72);
  color: var(--text);
  outline: none;
}

input {
  min-height: 48px;
  padding: 0 14px;
}

textarea {
  min-height: 116px;
  padding: 14px;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: rgba(66, 222, 207, 0.68);
  box-shadow: 0 0 0 4px rgba(66, 222, 207, 0.1);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card,
.topbar,
.hero,
.status-strip,
.card,
.notice {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.auth-card {
  width: min(460px, 100%);
  padding: 26px;
  border-radius: 8px;
}

.auth-brand,
.brand-inline {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-brand {
  margin-bottom: 24px;
}

.auth-brand span,
.brand-inline small,
.eyebrow,
.hint,
.muted-link,
.card p,
.spec-list span,
.access-grid span,
.status-strip span,
.logs span {
  color: var(--muted);
}

.auth-brand h1 {
  margin: 2px 0 0;
  font-size: 25px;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #06111e;
  font-weight: 900;
}

.form,
.ticket-form {
  display: grid;
  gap: 14px;
}

.form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.primary {
  border-color: rgba(47, 149, 255, 0.75);
  background: linear-gradient(135deg, #1676ff, #23c4ee);
  color: white;
  font-weight: 800;
}

.danger {
  border-color: rgba(255, 102, 120, 0.62);
  color: #ffd7dc;
}

.error {
  padding: 12px;
  border: 1px solid rgba(255, 102, 120, 0.45);
  border-radius: 8px;
  background: rgba(255, 102, 120, 0.12);
  color: #ffd7dc;
}

.hint,
.muted-link {
  display: block;
  margin: 16px 0 0;
  line-height: 1.9;
}

.setup-box {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid rgba(66, 222, 207, 0.28);
  border-radius: 8px;
  background: rgba(66, 222, 207, 0.08);
}

code,
.setup-box textarea {
  direction: ltr;
  text-align: left;
}

code {
  display: block;
  padding: 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  color: #aaf7e8;
  overflow-wrap: anywhere;
}

.setup-box textarea {
  min-height: 84px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

.topbar {
  position: sticky;
  top: 14px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1180px, calc(100% - 28px));
  min-height: 72px;
  margin: 14px auto 0;
  padding: 12px 16px;
  border-radius: 8px;
}

.brand-inline strong,
.brand-inline small {
  display: block;
}

.topnav {
  display: flex;
  gap: 8px;
}

.topnav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.topnav a:hover {
  color: var(--text);
  border-color: rgba(66, 222, 207, 0.48);
}

.notice {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 20;
  max-width: min(420px, calc(100% - 36px));
  padding: 12px 14px;
  border-radius: 8px;
}

.dashboard {
  width: min(1180px, calc(100% - 28px));
  margin: 22px auto 56px;
}

.dashboard.narrow {
  width: min(720px, calc(100% - 28px));
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 220px;
  padding: 28px;
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(8, 18, 32, 0.98), rgba(9, 32, 48, 0.72)),
    radial-gradient(circle at 18% 12%, rgba(66, 222, 207, 0.13), transparent 38%);
}

.hero h1 {
  margin: 8px 0;
  font-size: 36px;
  letter-spacing: 0;
}

.hero p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
}

.hero-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(112px, 1fr));
  gap: 10px;
  min-width: 390px;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 18px;
  padding: 1px;
  border-radius: 8px;
  overflow: hidden;
}

.status-strip div {
  display: grid;
  gap: 6px;
  min-height: 76px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.ok {
  color: var(--green);
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.card {
  min-height: 230px;
  padding: 20px;
  border-radius: 8px;
}

.span-2 {
  grid-column: span 2;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.card h1,
.card h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  background: rgba(47, 149, 255, 0.13);
  color: #a8dcff;
  font-size: 13px;
  font-weight: 800;
}

.pill.safe {
  background: rgba(55, 215, 154, 0.14);
  color: #88f0c6;
}

.pill.warn {
  background: rgba(255, 209, 102, 0.13);
  color: #ffe2a4;
}

.access-grid,
.spec-list {
  display: grid;
  gap: 12px;
}

.access-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.access-grid div,
.spec-list div,
.logs div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid rgba(164, 196, 226, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.access-grid strong,
.spec-list strong,
.logs strong {
  color: #c4ebff;
}

.secret,
.copy {
  min-height: 34px;
  padding: 0 10px;
}

.location-mark {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin: 20px auto 12px;
  border: 1px solid rgba(66, 222, 207, 0.28);
  border-radius: 8px;
  color: var(--cyan);
  font-size: 42px;
  background: rgba(66, 222, 207, 0.08);
}

.big-value {
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  color: #c8eeff;
}

.price {
  margin: 26px 0 10px;
  font-size: 30px;
  font-weight: 900;
  color: var(--cyan);
}

.full {
  width: 100%;
  margin-top: 18px;
}

.tabs {
  display: flex;
  gap: 8px;
}

.tabs button {
  min-height: 34px;
  padding: 0 12px;
}

.tabs .active {
  border-color: rgba(47, 149, 255, 0.62);
  background: rgba(47, 149, 255, 0.2);
}

.chart {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  align-items: end;
  gap: 10px;
  height: 212px;
  padding: 18px;
  border: 1px solid rgba(164, 196, 226, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px) 0 0 / 100% 25%,
    rgba(255, 255, 255, 0.04);
}

.chart span {
  min-height: 12px;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, var(--cyan), var(--blue));
}

.logs {
  display: grid;
  gap: 10px;
}

.ticket-form {
  grid-template-columns: 1fr;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  max-width: min(420px, calc(100% - 36px));
  padding: 12px 14px;
  border: 1px solid rgba(66, 222, 207, 0.42);
  border-radius: 8px;
  background: rgba(8, 21, 34, 0.94);
  box-shadow: var(--shadow);
}

@media (max-width: 1080px) {
  .grid,
  .status-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .access-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar,
  .hero {
    flex-direction: column;
    align-items: stretch;
  }

  .topnav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .grid,
  .status-strip,
  .hero-actions {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    min-width: 0;
  }

  .span-2 {
    grid-column: span 1;
  }

  .hero h1 {
    font-size: 28px;
  }

  .card-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
