:root {
  --bg-dark: #040404;
  --bg-darker: #000000;
  --card-bg: rgba(8, 8, 8, 0.82);
  --card-bg-2: rgba(18, 18, 18, 0.75);
  --surface: rgba(255, 255, 255, 0.055);
  --surface-strong: rgba(255, 255, 255, 0.09);
  --text: #fafafa;
  --text-soft: #cfcfcf;
  --muted: #9b9b9b;
  --orange-1: #ff8a00;
  --orange-2: #ff6400;
  --orange-3: #ffbb6a;
  --orange-4: #ff9f1a;
  --danger: #ff6d6d;
  --ok: #79dfa1;
  --border: rgba(255, 255, 255, 0.14);
  --focus: rgba(255, 138, 0, 0.65);
  --shadow: 0 26px 60px rgba(0, 0, 0, 0.55);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
}

body {
  position: relative;
  overflow-x: hidden;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 700px at -10% -15%, rgba(255, 122, 0, 0.30) 0%, rgba(255, 122, 0, 0) 62%),
    radial-gradient(900px 460px at 104% 115%, rgba(255, 98, 0, 0.24) 0%, rgba(255, 98, 0, 0) 62%),
    radial-gradient(560px 320px at 50% 98%, rgba(255, 166, 47, 0.10) 0%, rgba(255, 166, 47, 0) 65%),
    linear-gradient(145deg, var(--bg-darker) 0%, #080808 52%, var(--bg-dark) 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 42px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 42px);
  mask-image: radial-gradient(circle at center, black 52%, transparent 95%);
  opacity: 0.36;
}

body::after {
  background: conic-gradient(from 0deg at 50% 50%, rgba(255, 112, 0, 0.20), rgba(255, 140, 40, 0), rgba(255, 112, 0, 0.20));
  filter: blur(110px);
  opacity: 0.3;
  animation: aura 12s linear infinite;
}

.page {
  min-height: 100dvh;
  display: grid;
  align-items: start;
  justify-items: center;
  padding: clamp(14px, 3.5vw, 48px);
}

.hidden {
  display: none !important;
}

.card {
  position: relative;
  isolation: isolate;
  width: min(100%, 820px);
  border: 1px solid var(--border);
  border-radius: 24px;
  background:
    linear-gradient(170deg, var(--card-bg-2) 0%, var(--card-bg) 48%, rgba(8, 8, 8, 0.88) 100%);
  backdrop-filter: blur(9px);
  box-shadow: var(--shadow);
  padding: clamp(18px, 3.2vw, 34px);
}

.auth-card {
  width: min(100%, 560px);
  align-self: center;
}

.prices-card {
  width: min(100%, 1120px);
}

.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 24px;
  z-index: -1;
  background: linear-gradient(125deg, rgba(255, 187, 106, 0.52) 0%, rgba(255, 128, 0, 0.15) 38%, rgba(255, 96, 0, 0.48) 100%);
  filter: blur(0.6px);
}

.card::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.logo {
  width: clamp(42px, 8vw, 60px);
  height: clamp(42px, 8vw, 60px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(255, 128, 0, 0.28);
}

.kicker {
  margin: 0 0 3px;
  font-size: 0.79rem;
  letter-spacing: 0.14em;
  color: var(--orange-3);
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(1.32rem, 2.9vw, 1.95rem);
  line-height: 1.06;
  text-wrap: balance;
}

h2,
h3 {
  margin: 0;
}

h2 {
  font-size: 1.05rem;
  color: var(--text);
  font-weight: 700;
}

h3 {
  font-size: 0.98rem;
  line-height: 1.28;
}

.subtitle {
  margin: -6px 0 12px;
  color: var(--text-soft);
  font-size: 0.93rem;
}

.form {
  display: grid;
  gap: 14px;
}

.field-group {
  display: grid;
  gap: 8px;
}

label {
  font-size: 0.93rem;
  color: var(--text-soft);
  letter-spacing: 0.01em;
}

input,
button {
  width: 100%;
  border-radius: 13px;
  font: inherit;
}

input {
  border: 1px solid var(--border);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.075) 0%, rgba(255, 255, 255, 0.02) 100%);
  color: var(--text);
  padding: 13px 14px;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease, background-color 140ms ease;
}

input:hover {
  border-color: rgba(255, 177, 92, 0.45);
}

input:focus {
  outline: none;
  border-color: var(--orange-1);
  box-shadow: 0 0 0 3px var(--focus), 0 0 28px rgba(255, 128, 0, 0.16);
  transform: translateY(-1px);
}

button {
  border: 0;
  cursor: pointer;
  color: #161616;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 14px 16px;
  background:
    linear-gradient(130deg, var(--orange-3) 0%, var(--orange-4) 36%, var(--orange-1) 64%, var(--orange-2) 100%);
  background-size: 160% 160%;
  transition: transform 140ms ease, filter 160ms ease, opacity 140ms ease, box-shadow 160ms ease;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  box-shadow: 0 14px 28px rgba(255, 119, 0, 0.35);
}

button:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
  background-position: right center;
}

button:active {
  transform: translateY(0);
}

button:disabled {
  opacity: 0.62;
  cursor: wait;
  box-shadow: none;
}

.btn-ghost {
  width: auto;
  padding: 9px 12px;
  font-size: 0.85rem;
  color: var(--orange-3);
  background: rgba(255, 140, 26, 0.10);
  border: 1px solid rgba(255, 140, 26, 0.25);
  box-shadow: none;
}

.btn-ghost:hover {
  background: rgba(255, 140, 26, 0.18);
  filter: none;
}

.session-row {
  margin: -6px 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.session-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.session-line,
.toolbar-note,
.summary-note {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.summary-band,
.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid rgba(255, 140, 26, 0.18);
  border-radius: 16px;
  background: rgba(255, 140, 26, 0.075);
}

.section-label {
  margin: 0 0 5px;
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--orange-3);
}

.list-picker {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.products-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.price-lists-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.price-list-option {
  min-height: 82px;
  align-items: flex-start;
  justify-content: center;
  gap: 7px;
  padding: 14px;
  color: var(--text);
  text-align: left;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.090) 0%, rgba(255, 255, 255, 0.025) 100%);
  border: 1px solid rgba(255, 140, 26, 0.20);
  box-shadow: none;
}

.price-list-option.active,
.price-list-option:hover {
  border-color: rgba(255, 187, 106, 0.64);
  background: rgba(255, 140, 26, 0.16);
}

.price-list-name {
  font-size: 1rem;
  font-weight: 800;
}

.price-list-access {
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 600;
}

.price-list-area {
  display: grid;
  gap: 12px;
}

.toolbar-actions {
  display: grid;
  grid-template-columns: minmax(220px, 320px) auto;
  gap: 10px;
  align-items: end;
}

.search-field input {
  min-height: 42px;
  padding: 11px 13px;
}

.products-table-shell {
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.20);
}

.price-table {
  width: 100%;
  min-width: 660px;
  border-collapse: collapse;
}

.price-table th,
.price-table td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  vertical-align: top;
}

.price-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--orange-3);
  font-size: 0.78rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  background: rgba(8, 8, 8, 0.96);
}

.price-table tbody tr {
  background: rgba(255, 255, 255, 0.018);
}

.price-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.040);
}

.price-table tbody tr:hover {
  background: rgba(255, 140, 26, 0.10);
}

.price-table tbody tr:last-child td {
  border-bottom: 0;
}

.product-cell {
  min-width: 260px;
  color: var(--text);
  font-weight: 700;
}

.money-cell,
.date-cell,
.numeric-heading {
  text-align: right;
  white-space: nowrap;
}

.money-cell {
  color: #ffffff;
  font-weight: 800;
}

.promo-cell {
  color: var(--orange-3);
}

.promo-expired {
  color: var(--text-soft) !important;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(255, 255, 255, 0.72);
}

.date-cell {
  color: var(--text-soft);
}

.table-empty,
.empty-list {
  color: var(--text-soft);
  text-align: center;
}

.table-empty {
  padding: 24px 14px !important;
}

.mobile-products-list {
  display: none;
}

.product-mobile-item {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.mobile-price-line {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.mobile-price-line strong {
  color: var(--text);
  text-align: right;
}

.empty-state-panel {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid rgba(255, 109, 109, 0.22);
  border-radius: 16px;
  background: rgba(255, 109, 109, 0.075);
}

.empty-state-panel p {
  margin: 0;
  color: var(--text-soft);
}

.btn-loader {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(22, 22, 22, 0.3);
  border-top-color: rgba(22, 22, 22, 1);
  border-radius: 50%;
  display: none;
  animation: spin 0.8s linear infinite;
}

.is-loading .btn-loader {
  display: inline-block;
}

.is-loading .btn-text {
  opacity: 0.96;
}

.status {
  margin: 14px 0 0;
  min-height: 22px;
  font-size: 0.92rem;
  color: var(--text-soft);
}

.status.error {
  color: var(--danger);
}

.status.success {
  color: var(--ok);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes aura {
  0% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(180deg) scale(1.05);
  }
  100% {
    transform: rotate(360deg) scale(1);
  }
}

@media (max-width: 820px) {
  .summary-band,
  .list-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar-actions {
    grid-template-columns: 1fr;
  }

  .toolbar-actions .btn-ghost,
  .session-actions,
  .session-actions .btn-ghost {
    width: 100%;
  }
}

@media (max-width: 700px) {
  .products-table-shell {
    display: none;
  }

  .mobile-products-list {
    display: grid;
    gap: 10px;
  }
}

@media (max-width: 580px) {
  .card {
    border-radius: 20px;
  }

  .card::before {
    border-radius: 20px;
  }

  .card::after {
    border-radius: 18px;
  }

  .card-header {
    align-items: flex-start;
    margin-bottom: 20px;
  }

  .price-lists-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 390px) {
  .page {
    padding: 10px;
  }

  .card {
    padding: 16px;
  }

  label {
    font-size: 0.88rem;
  }

  input,
  button {
    font-size: 0.93rem;
  }

  .mobile-price-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .mobile-price-line strong {
    text-align: left;
  }
}
