:root {
  --bg: #f4f7fb;
  --bg-elevated: rgba(255, 255, 255, 0.88);
  --bg-soft: rgba(255, 255, 255, 0.72);
  --surface: #ffffff;
  --surface-2: #eef3fb;
  --text: #0f172a;
  --text-soft: #526074;
  --muted: #7b8aa0;
  --line: rgba(15, 23, 42, 0.1);
  --primary: #2264ff;
  --primary-soft: rgba(34, 100, 255, 0.12);
  --secondary: #7c3aed;
  --success: #0f9f64;
  --warning: #f59e0b;
  --danger: #e11d48;
  --shadow-lg: 0 28px 80px rgba(15, 23, 42, 0.12);
  --shadow-md: 0 18px 45px rgba(15, 23, 42, 0.08);
  --shadow-sm: 0 8px 22px rgba(15, 23, 42, 0.06);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

html[data-theme='dark'] {
  --bg: #07111f;
  --bg-elevated: rgba(12, 20, 34, 0.88);
  --bg-soft: rgba(8, 15, 26, 0.72);
  --surface: #0c1627;
  --surface-2: #111f34;
  --text: #e5eefc;
  --text-soft: #a5b3c8;
  --muted: #8da0b9;
  --line: rgba(148, 163, 184, 0.16);
  --primary: #78a5ff;
  --primary-soft: rgba(120, 165, 255, 0.15);
  --secondary: #b794ff;
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #fb7185;
  --shadow-lg: 0 28px 80px rgba(2, 6, 23, 0.4);
  --shadow-md: 0 18px 45px rgba(2, 6, 23, 0.3);
  --shadow-sm: 0 8px 22px rgba(2, 6, 23, 0.22);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background:
    radial-gradient(circle at top left, rgba(73, 118, 255, 0.15), transparent 36%),
    radial-gradient(circle at top right, rgba(112, 81, 255, 0.12), transparent 24%),
    var(--bg);
  color: var(--text);
}

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

img {
  max-width: 100%;
  display: block;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.page-section {
  padding: 32px 0 80px;
}

.glass-card,
.panel,
.auth-card,
.sidebar,
.topbar,
.product-card,
.pricing-card,
.summary-card,
.profile-card,
.list-card,
.status-card,
.empty-card,
.maintenance-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px);
}

.panel,
.summary-card,
.profile-card,
.list-card,
.status-card,
.empty-card,
.maintenance-card {
  border-radius: var(--radius-xl);
}

.flash {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  font-size: 0.95rem;
}

.flash.success {
  background: rgba(15, 159, 100, 0.1);
  color: var(--success);
}

.flash.error {
  background: rgba(225, 29, 72, 0.1);
  color: var(--danger);
}

.btn,
.btn-icon,
.input,
.select {
  border-radius: 16px;
  border: 1px solid transparent;
  transition: 180ms ease;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 18px;
  font-weight: 700;
  line-height: 1;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #4f86ff);
  color: white;
  box-shadow: 0 12px 28px rgba(34, 100, 255, 0.25);
}

.btn-secondary {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--text);
}

.btn-outline {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn-google {
  background: white;
  color: #111827;
  border-color: rgba(17, 24, 39, 0.08);
}

html[data-theme='dark'] .btn-google {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: var(--line);
}

.btn-cloudflare {
  background: transparent;
  border-color: var(--line);
  color: var(--text-soft);
  padding-block: 10px;
  font-size: 0.88rem;
}

.btn-small {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.92rem;
}

.btn-full {
  width: 100%;
}

.input,
.select,
textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.input:focus,
.select:focus,
textarea:focus {
  border-color: rgba(34, 100, 255, 0.5);
  box-shadow: 0 0 0 4px rgba(34, 100, 255, 0.12);
}

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

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field label,
.field .label {
  font-size: 0.95rem;
  color: var(--text-soft);
  font-weight: 600;
}

.help-text,
.muted {
  color: var(--muted);
  font-size: 0.92rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.86rem;
  font-weight: 700;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: capitalize;
}

.status-pill.pending {
  background: rgba(245, 158, 11, 0.12);
  color: var(--warning);
}

.status-pill.processing {
  background: rgba(34, 100, 255, 0.12);
  color: var(--primary);
}

.status-pill.completed {
  background: rgba(15, 159, 100, 0.12);
  color: var(--success);
}

.status-pill.failed,
.status-pill.cancelled,
.status-pill.expired {
  background: rgba(225, 29, 72, 0.12);
  color: var(--danger);
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
}

.login-visual {
  position: relative;
  overflow: hidden;
  padding: 48px;
  display: flex;
  align-items: flex-end;
}

.login-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 15, 26, 0.12), rgba(8, 15, 26, 0.58)),
    url('/img/brand/felix-cat.jpg') center/cover no-repeat;
  filter: saturate(1.05);
}

.login-visual::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 160px;
  background: linear-gradient(180deg, transparent, rgba(8, 15, 26, 0.76));
}

.visual-content {
  position: relative;
  z-index: 1;
  max-width: 560px;
  color: #eef4ff;
}

.brand-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  font-weight: 700;
}

.brand-chip img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

.visual-content h1 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.04;
}

.visual-content p {
  margin: 0 0 24px;
  max-width: 54ch;
  color: rgba(238, 244, 255, 0.84);
  font-size: 1.02rem;
}

.visual-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.metric-card {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
}

.metric-card strong {
  display: block;
  font-size: 1.12rem;
  margin-bottom: 6px;
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 24px;
}

.auth-card {
  width: min(520px, 100%);
  border-radius: 32px;
  padding: 34px;
}

.auth-header {
  margin-bottom: 22px;
}

.auth-header h2 {
  margin: 0 0 8px;
  font-size: 1.9rem;
}

.auth-header p {
  margin: 0;
  color: var(--text-soft);
}

.auth-form {
  display: grid;
  gap: 18px;
}

.password-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.password-row a {
  color: var(--primary);
  font-size: 0.92rem;
  font-weight: 700;
}

.auth-divider {
  position: relative;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.auth-divider::before {
  content: '';
  position: absolute;
  inset: 50% 0 auto;
  height: 1px;
  background: var(--line);
}

.auth-divider span {
  position: relative;
  padding: 0 12px;
  background: var(--bg-elevated);
}

.auth-links {
  display: flex;
  justify-content: center;
  gap: 8px;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.auth-links a {
  color: var(--primary);
  font-weight: 700;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 300px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  min-height: 100vh;
  padding: 26px 22px;
  border-right: 1px solid var(--line);
  box-shadow: none;
  border-radius: 0;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.sidebar-brand img {
  width: 56px;
  height: 56px;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}

.sidebar-brand strong {
  display: block;
  font-size: 1.1rem;
}

.sidebar-brand span {
  color: var(--muted);
  font-size: 0.92rem;
}

.sidebar-group {
  display: grid;
  gap: 8px;
  margin-bottom: 24px;
}

.sidebar-title {
  margin: 0 0 8px;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  color: var(--text-soft);
  border: 1px solid transparent;
}

.nav-link:hover,
.nav-link.active {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.nav-link .nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-icon {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 900;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
}

.content-area {
  padding: 18px 24px 32px;
}

.topbar {
  position: sticky;
  top: 18px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 20px;
  margin-bottom: 24px;
  border-radius: 24px;
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(1.3rem, 2vw, 1.9rem);
}

.topbar-subtitle {
  color: var(--text-soft);
  font-size: 0.92rem;
}

.btn-icon {
  width: 46px;
  height: 46px;
  display: inline-grid;
  place-items: center;
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
  position: relative;
}

.btn-icon:hover {
  border-color: rgba(34, 100, 255, 0.26);
}

.btn-icon .count-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger);
  color: white;
  font-size: 0.72rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.profile-menu {
  position: relative;
}

.profile-menu summary {
  list-style: none;
}

.profile-menu summary::-webkit-details-marker {
  display: none;
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 250px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  padding: 10px;
  display: grid;
  gap: 4px;
}

.profile-dropdown a,
.profile-dropdown button {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 16px;
  padding: 12px 14px;
  color: var(--text);
}

.profile-dropdown a:hover,
.profile-dropdown button:hover {
  background: var(--surface-2);
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  margin-bottom: 28px;
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 34px;
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(34, 100, 255, 0.14), rgba(124, 58, 237, 0.16)),
    var(--bg-elevated);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}

.hero-card h2 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
}

.hero-card p {
  margin: 0 0 24px;
  color: var(--text-soft);
  max-width: 58ch;
}

.hero-card .stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.stat-pill {
  display: inline-grid;
  gap: 2px;
  padding: 14px 16px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  min-width: 120px;
}

.stat-pill strong {
  font-size: 1.05rem;
}

.hero-visual {
  border-radius: 30px;
  overflow: hidden;
  min-height: 320px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.product-card {
  padding: 24px;
  border-radius: 28px;
  display: grid;
  gap: 18px;
}

.product-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.product-card img {
  width: 88px;
  height: 88px;
}

.product-card h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.product-card p {
  margin: 0;
  color: var(--text-soft);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pricing-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

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

.pricing-card {
  position: relative;
  border-radius: 28px;
  padding: 22px;
  display: grid;
  gap: 16px;
}

.pricing-card.featured {
  border-color: rgba(34, 100, 255, 0.28);
  box-shadow: 0 18px 55px rgba(34, 100, 255, 0.14);
}

.pricing-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(34, 100, 255, 0.12);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 800;
}

.plan-top {
  display: flex;
  gap: 14px;
  align-items: center;
}

.plan-top img {
  width: 70px;
  height: 70px;
}

.plan-title h3 {
  margin: 0;
  font-size: 1.16rem;
}

.plan-title p {
  margin: 8px 0 0;
  color: var(--muted);
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.price-main {
  font-size: 2rem;
  font-weight: 900;
}

.price-caption {
  color: var(--text-soft);
}

.spec-list {
  display: grid;
  gap: 10px;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}

.spec-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.stock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.checkout-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
}

.summary-card,
.status-card {
  padding: 26px;
}

.card-title {
  margin: 0 0 18px;
  font-size: 1.25rem;
}

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

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}

.summary-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.summary-row.total {
  font-size: 1.08rem;
  font-weight: 800;
}

.qr-card {
  display: grid;
  place-items: center;
  text-align: center;
  gap: 16px;
  padding: 24px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px dashed var(--line);
}

.qr-card img {
  width: min(320px, 100%);
  border-radius: 22px;
  padding: 14px;
  background: white;
}

.payment-methods {
  display: grid;
  gap: 14px;
}

.method-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
}

.method-card strong {
  display: block;
  margin-bottom: 6px;
}

.method-card .check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 900;
}

.table-card {
  overflow: hidden;
}

.table-scroll {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 16px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.table th {
  color: var(--muted);
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

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

.list-card {
  padding: 22px;
}

.list-card h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
}

.list-card p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.65;
}

.list-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

.profile-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 22px;
}

.profile-card {
  padding: 26px;
}

.profile-summary {
  display: flex;
  align-items: center;
  gap: 18px;
}

.profile-avatar {
  width: 84px;
  height: 84px;
  border-radius: 28px;
  object-fit: cover;
  background: var(--surface-2);
}

.profile-summary h2 {
  margin: 0 0 8px;
}

.profile-actions {
  display: grid;
  gap: 12px;
}

.setting-block {
  display: grid;
  gap: 14px;
  padding: 20px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.setting-block h3 {
  margin: 0;
}

.setting-block p {
  margin: 0;
  color: var(--text-soft);
}

.maintenance-card {
  padding: 34px;
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}

.maintenance-card img {
  width: 110px;
  height: 110px;
  margin: 0 auto 18px;
}

.empty-card {
  padding: 32px;
  text-align: center;
}

.inline-form {
  display: inline;
}

.footer {
  padding: 30px 0 40px;
  color: var(--text-soft);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.footer-telegram {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.footer-telegram img {
  width: 24px;
  height: 24px;
}

.mobile-drawer-toggle {
  display: none;
}

.hidden-mobile {
  display: inline-flex;
}

.center-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 0;
}

.simple-card {
  width: min(620px, calc(100% - 32px));
  padding: 34px;
  border-radius: 32px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}

.simple-card h1,
.simple-card h2 {
  margin-top: 0;
}

.simple-card p {
  color: var(--text-soft);
}

@media (max-width: 1180px) {
  .product-grid,
  .pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero,
  .checkout-layout,
  .profile-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 380px;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(320px, 86vw);
    transform: translateX(-102%);
    transition: transform 220ms ease;
    z-index: 60;
    border-right: 1px solid var(--line);
    background: var(--surface);
  }

  body.drawer-open .sidebar {
    transform: translateX(0);
  }

  .mobile-drawer-toggle {
    display: inline-grid;
  }

  body.drawer-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.48);
    z-index: 50;
  }

  .content-area {
    padding-inline: 16px;
  }

  .topbar {
    top: 12px;
    padding: 14px 16px;
  }
}

@media (max-width: 760px) {
  .field-row,
  .visual-metrics,
  .product-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 320px;
    padding: 28px;
  }

  .auth-card,
  .simple-card,
  .summary-card,
  .status-card,
  .profile-card,
  .maintenance-card {
    padding: 22px;
  }

  .topbar-right {
    gap: 8px;
  }

  .hidden-mobile {
    display: none;
  }

  .summary-row,
  .spec-item,
  .stock-row,
  .product-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-inner {
    align-items: flex-start;
  }
}
