:root {
  --bg-top: #0f4478;
  --bg-bottom: #0a2749;
  --surface: rgba(9, 34, 64, 0.84);
  --surface-strong: rgba(7, 27, 51, 0.94);
  --surface-soft: rgba(27, 84, 133, 0.34);
  --line: rgba(117, 204, 255, 0.18);
  --line-strong: rgba(255, 199, 56, 0.35);
  --ink: #f2fbff;
  --muted: #aacce6;
  --accent: #4bc5ff;
  --accent-2: #ffc62d;
  --accent-3: #ff9d16;
  --danger: #ff8c87;
  --success: #8de2b5;
  --shadow: 0 28px 70px rgba(3, 12, 26, 0.36);
  --radius: 26px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 16% 14%, rgba(75, 197, 255, 0.24), transparent 18%),
    radial-gradient(circle at 84% 16%, rgba(255, 198, 45, 0.2), transparent 14%),
    radial-gradient(circle at 74% 42%, rgba(73, 138, 255, 0.16), transparent 20%),
    linear-gradient(180deg, var(--bg-top) 0%, #0d355f 38%, var(--bg-bottom) 100%);
  color: var(--ink);
  font-family: "Trebuchet MS", "Avenir Next", "Segoe UI", sans-serif;
}

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

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 30px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-avatar,
.hero-avatar {
  object-fit: cover;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 40px rgba(1, 10, 24, 0.32);
}

.brand-avatar {
  width: 74px;
  height: 74px;
  background: linear-gradient(145deg, rgba(75, 197, 255, 0.24), rgba(255, 198, 45, 0.16));
}

.hero-avatar {
  width: 132px;
  height: 132px;
  margin-bottom: 10px;
}

.brand-mark {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--accent-2);
  font-weight: 800;
}

.brand-name {
  font-size: clamp(30px, 5vw, 58px);
  line-height: 0.94;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.brand-subtitle {
  max-width: 580px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 17px;
}

.nav {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pill-link,
.button,
button.button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 13px 18px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.pill-link:hover,
.button:hover,
button.button:hover {
  transform: translateY(-1px);
}

.pill-link {
  background: rgba(9, 34, 64, 0.62);
  border: 1px solid rgba(117, 204, 255, 0.14);
  color: #d7f3ff;
}

.button.primary {
  background: linear-gradient(135deg, var(--accent-2) 0%, var(--accent-3) 100%);
  color: #17253b;
  box-shadow: 0 16px 40px rgba(255, 165, 36, 0.3);
}

.button.secondary {
  background: linear-gradient(135deg, rgba(83, 201, 255, 0.22) 0%, rgba(17, 83, 138, 0.44) 100%);
  border: 1px solid rgba(117, 204, 255, 0.18);
  color: var(--ink);
}

.button.ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--ink);
}

.button.warn {
  background: linear-gradient(135deg, #ffbf2a 0%, #ff891c 100%);
  color: #16243a;
}

.button.danger {
  background: linear-gradient(135deg, #ff8c87 0%, #ff6363 100%);
  color: #1f1320;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 420px);
  gap: 26px;
  align-items: stretch;
  margin-bottom: 34px;
}

.panel,
.card,
.hero-card {
  position: relative;
  background: linear-gradient(180deg, rgba(11, 44, 79, 0.9) 0%, rgba(7, 26, 48, 0.94) 100%);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  overflow: hidden;
}

.panel::before,
.card::before,
.hero-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(75, 197, 255, 0.44), rgba(255, 198, 45, 0));
  pointer-events: none;
}

.hero-copy,
.hero-card,
.panel,
.card {
  padding: 24px;
}

.hero-copy {
  display: grid;
  gap: 18px;
  background:
    radial-gradient(circle at top right, rgba(255, 198, 45, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(16, 64, 112, 0.78) 0%, rgba(8, 30, 56, 0.94) 100%);
}

.hero-card {
  display: grid;
  align-content: start;
  gap: 14px;
  background:
    radial-gradient(circle at top left, rgba(75, 197, 255, 0.18), transparent 24%),
    linear-gradient(180deg, rgba(12, 45, 81, 0.9) 0%, rgba(7, 27, 51, 0.96) 100%);
}

.eyebrow {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent-2);
}

.hero-title {
  margin: 0;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 0.92;
  max-width: 10ch;
}

.hero-lead {
  margin: 0;
  font-size: 19px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 62ch;
}

.stack {
  display: grid;
  gap: 18px;
}

.hero-stat {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(117, 204, 255, 0.12);
}

.hero-stat strong {
  font-size: 32px;
  line-height: 1;
  color: var(--accent-2);
}

.hero-stat span {
  color: var(--muted);
  line-height: 1.55;
}

.section {
  display: grid;
  gap: 18px;
  margin-bottom: 30px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
}

.section-title {
  margin: 0;
  font-size: 32px;
  line-height: 1;
}

.section-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.58;
  max-width: 58ch;
}

.grid-3,
.grid-2,
.tariff-grid {
  display: grid;
  gap: 18px;
}

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

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

.tariff-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card h3,
.panel h3 {
  margin: 0 0 10px;
  font-size: 23px;
  line-height: 1.04;
}

.card p,
.panel p,
.meta-list li,
.status-line {
  margin: 0;
  color: var(--muted);
  line-height: 1.58;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(75, 197, 255, 0.14);
  color: #9fe6ff;
  border: 1px solid rgba(75, 197, 255, 0.14);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tag.warn {
  background: rgba(255, 198, 45, 0.14);
  color: #ffd86d;
  border-color: rgba(255, 198, 45, 0.14);
}

.tariff-price {
  font-size: 38px;
  line-height: 1;
  font-weight: 900;
  color: var(--accent-2);
}

.tariff-price small {
  font-size: 17px;
  color: var(--muted);
}

.card-actions,
.button-row,
.inline-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.meta-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.form-card {
  width: min(540px, 100%);
  margin: 56px auto 0;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 14px;
  font-weight: 700;
  color: #d6f1ff;
}

.field input {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(117, 204, 255, 0.14);
  border-radius: 16px;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: rgba(4, 20, 38, 0.62);
}

.field input:focus {
  outline: 2px solid rgba(75, 197, 255, 0.18);
  border-color: var(--accent);
}

.form-stack {
  display: grid;
  gap: 16px;
}

.flash {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(117, 204, 255, 0.1);
  color: #d8f2ff;
}

.flash.success {
  background: rgba(70, 213, 154, 0.12);
  color: var(--success);
  border-color: rgba(70, 213, 154, 0.24);
}

.flash.error {
  background: rgba(255, 104, 120, 0.12);
  color: var(--danger);
  border-color: rgba(255, 104, 120, 0.22);
}

.cabinet-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 420px);
  gap: 18px;
}

.cabinet-stack {
  display: grid;
  gap: 18px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(117, 204, 255, 0.08);
}

.info-row:last-child {
  border-bottom: 0;
}

.info-row strong {
  font-size: 14px;
  color: #dff6ff;
}

.mono {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  word-break: break-all;
}

.order-list {
  display: grid;
  gap: 12px;
}

.order-item {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(117, 204, 255, 0.1);
}

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

.muted {
  color: var(--muted);
}

.small {
  font-size: 14px;
}

.logout-form {
  margin: 0;
}

@media (max-width: 980px) {
  .hero,
  .cabinet-grid,
  .grid-3,
  .tariff-grid {
    grid-template-columns: 1fr;
  }

  .section-head,
  .topbar {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 16px;
  }

  .hero-copy,
  .hero-card,
  .panel,
  .card {
    padding: 18px;
  }

  .brand {
    align-items: start;
  }

  .brand-avatar {
    width: 60px;
    height: 60px;
    border-radius: 20px;
  }

  .brand-name {
    font-size: 34px;
  }

  .hero-title {
    font-size: 42px;
  }

  .hero-avatar {
    width: 110px;
    height: 110px;
  }
}
