:root {
  color-scheme: dark;
  --bg: #070c1a;
  --surface: rgba(22, 29, 57, 0.95);
  --surface-strong: #111a38;
  --text: #eef2ff;
  --muted: #9aa7c7;
  --primary: #2563eb;
  --primary-soft: #1d4ed8;
  --accent: #ef4444;
  --card: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: radial-gradient(circle at top, rgba(37, 99, 235, 0.3), transparent 28%),
    radial-gradient(circle at bottom, rgba(239, 68, 68, 0.17), transparent 26%),
    radial-gradient(circle at 20% 25%, rgba(255, 163, 111, 0.12), transparent 22%),
    var(--bg);
  color: var(--text);
}

body {
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell,
.auth-shell {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 0 32px 32px;
}

.topbar,
.auth-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(6, 10, 24, 0.45);
  backdrop-filter: blur(16px);
}

.brand-wrap,
.auth-header > div {
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: center;
}

.header-right {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-logo {
  display: flex;
  gap: 0;
}

.brand {
  font-size: 1.45rem;
  font-weight: 800;
}

.brand.blue {
  color: #2563eb;
}

.brand.red {
  color: #ef4444;
}

.brand-sub {
  color: var(--muted);
}

.hotline-small {
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.brand-tagline {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.admin-link,
.back-link {
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.06);
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.admin-link {
  padding: 8px 12px;
  border-radius: 50%;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
}

.menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
}

.mobile-intro {
  display: none;
}

.search-box {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 10px 14px;
}

.search-box input {
  flex: 1;
  border: none;
  background: transparent;
  color: #fff;
  outline: none;
  font-size: 0.96rem;
}

.search-box::placeholder,
.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.65);
}

.search-box button {
  border: none;
  background: #2563eb;
  color: #fff;
  border-radius: 14px;
  padding: 10px 14px;
  min-width: 48px;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.quick-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 14px;
  border-radius: 18px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
}

.quick-action.action-red {
  background: linear-gradient(135deg, #dc2626, #ef4444);
}

.quick-action.action-blue {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
}

.welcome-label {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.main-content {
  display: grid;
  gap: 24px;
  min-height: calc(100vh - 94px);
}

.hero-card {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0;
  padding: 0;
  border: none;
  border-radius: 36px;
  background: rgba(7, 12, 30, 0.95);
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.28);
  min-height: 64vh;
  overflow: hidden;
}

.hero-text {
  max-width: 680px;
}

.hero-category-intro {
  text-align: left;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.76rem;
}

.hero-card h1 {
  margin: 10px 0 8px;
  font-size: clamp(2rem, 4vw, 2.75rem);
}

.hero-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.hero-promotion-slider {
  display: grid;
  gap: 22px;
  padding: 28px;
}

.minimal-hero {
  display: grid;
  gap: 10px;
}

.minimal-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.5rem);
}

.promotion-slider-wrapper {
  position: relative;
  overflow: hidden;
  min-height: 420px;
}

.promotion-slider {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  max-height: 100%;
  height: 100%;
}

.promotion-slider::-webkit-scrollbar {
  display: none;
}

.promotion-slide {
  min-width: 100%;
  border-radius: 28px;
  overflow: hidden;
  scroll-snap-align: start;
  display: grid;
  grid-template-rows: auto auto;
  background: rgba(255, 255, 255, 0.04);
}

.promotion-slide.empty-slide {
  min-width: 100%;
  padding: 24px;
}

@media (min-width: 900px) {
  .desktop-offers {
    display: block;
  }

  .promotion-slider {
    grid-auto-columns: minmax(0, calc((100% - 36px) / 3));
    min-height: 260px;
    height: auto;
  }

  .promotion-slide {
    min-width: auto;
    min-height: 260px;
  }
}

@media (max-width: 900px) {
  .desktop-offers {
    display: block;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0 16px;
    margin-top: 16px;
  }

  .desktop-offers .section-header {
    padding: 0;
  }

  .promotion-slider-wrapper {
    min-height: auto;
  }

  .promotion-slider {
    grid-auto-columns: 100%;
  }
}

.promotion-slide img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.promotion-slide::after {
  display: none;
}

.promotion-copy {
  position: static;
  padding: 18px 20px 24px;
  display: grid;
  gap: 10px;
  z-index: 1;
  max-width: 100%;
  background: rgba(7, 12, 30, 0.95);
}

.promotion-copy h2 {
  margin: 0;
  font-size: 1.15rem;
}

.promotion-copy p {
  margin: 0;
  color: var(--muted);
}

.promotion-copy {
  background: rgba(7, 12, 30, 0.95);
}

.promotion-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.2);
  color: #ffcccb;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.offer-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #ef4444);
  color: #fff;
  font-weight: 700;
  width: fit-content;
  margin-top: 8px;
}

.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.16);
  cursor: pointer;
}

.slider-dot.active {
  background: var(--primary);
  border-color: rgba(37, 99, 235, 0.7);
}

.slider-btn {
  border: none;
  border-radius: 999px;
  min-width: 48px;
  min-height: 48px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
}

.slider-btn:hover {
  background: rgba(37, 99, 235, 0.28);
}

@media (max-width: 520px) {
  .promotion-slider {
    grid-auto-columns: 100%;
  }
}

.category-card {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 22px;
  text-align: center;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  min-height: 210px;
  backdrop-filter: blur(14px);
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
}

.category-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.icon {
  display: inline-flex;
  width: 54px;
  height: 54px;
  justify-content: center;
  align-items: center;
  border-radius: 18px;
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.3), rgba(239, 68, 68, 0.14));
  font-size: 1.7rem;
}

.category-content {
  display: grid;
  gap: 6px;
}

.category-card strong {
  font-size: 1rem;
}

.category-card small {
  color: var(--muted);
  line-height: 1.4;
  max-width: 210px;
  margin: 0 auto;
}

.desktop-copy {
  display: block;
}

.mobile-copy {
  display: none;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

.admin-table th,
.admin-table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.admin-table th {
  text-align: left;
  font-size: 0.9rem;
  color: var(--muted);
}

.admin-table td {
  font-size: 0.95rem;
}

.error-box,
.success-box {
  padding: 14px 16px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.form-note {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.error-box {
  background: rgba(255, 93, 93, 0.14);
  border: 1px solid rgba(255, 93, 93, 0.22);
  color: #ffd8d8;
}

.success-box {
  background: rgba(108, 209, 122, 0.13);
  border: 1px solid rgba(108, 209, 122, 0.24);
  color: #d8f8d8;
}

.small-link {
  color: #2563eb;
  text-decoration: none;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  text-align: center;
}

.hotline-footer {
  padding: 24px 16px;
  margin-top: 20px;
}

.hotline-card {
  display: grid;
  gap: 12px;
  padding: 28px;
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(239, 68, 68, 0.12));
  border: 1px solid rgba(37, 99, 235, 0.24);
  text-align: center;
}

.hotline-label {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hotline-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #ef4444);
  color: #fff;
  text-decoration: none;
  font-size: 1.3rem;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hotline-link:active {
  transform: scale(0.96);
}

.hotline-icon {
  font-size: 1.5rem;
}

.hotline-number {
  letter-spacing: 0.05em;
}

.hotline-note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-note {
  display: none;
}

.hero-actions {
  display: none;
}

.hero-visual,
.phone-shell,
.status-bar,
.phone-screen,
.app-widget,
.app-widget.small {
  display: none;
}

@media (max-width: 760px) {
  .mobile-intro {
    display: grid;
    gap: 16px;
  }

  .topbar {
    padding: 14px 0 12px;
  }

  .menu-btn {
    display: inline-flex;
  }

  .brand-tagline {
    display: none;
  }

  .app-shell,
  .auth-shell {
    padding: 0 16px 26px;
  }

  .categories-section,
  .feature-section {
    padding: 18px;
  }

  .section-header {
    gap: 12px;
  }

  .section-header p {
    max-width: 100%;
  }

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .category-card {
    gap: 10px;
    padding: 14px;
    min-height: auto;
    border-radius: 22px;
  }

  .category-icon {
    width: 60px;
    height: 60px;
  }

  .icon {
    width: 40px;
    height: 40px;
    font-size: 1.4rem;
  }

  .category-card strong {
    font-size: 0.78rem;
  }

  .category-card small {
    display: none;
  }

  .category-card {
    text-align: center;
  }

  .desktop-copy {
    display: none;
  }

  .mobile-copy {
    display: block;
  }
}

.categories-section,
.feature-section {
  padding: 22px;
  border-radius: 32px;
  background: rgba(10, 14, 28, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.16);
}

.categories-section {
  display: grid;
  gap: 20px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  flex-wrap: wrap;
}

.section-header > div {
  display: grid;
  gap: 8px;
}

.section-header h2 {
  margin: 0;
  font-size: clamp(1.7rem, 2.3vw, 2.3rem);
}

.section-header p {
  margin: 0;
  color: var(--muted);
  max-width: 760px;
  line-height: 1.65;
}

@media (min-width: 900px) {
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .hero-card {
    padding: 0;
  }

  .promotion-label {
    font-size: 0.85rem;
    padding: 8px 16px;
  }

  .desktop-copy {
    display: block;
  }

  .mobile-copy {
    display: none;
  }

  .category-card {
    display: grid;
    grid-template-rows: 1fr auto;
    justify-items: start;
    gap: 0;
  }

  .category-card .category-icon {
    display: none;
  }

  .category-content {
    align-self: end;
    padding-top: 0;
  }
}

@media (min-width: 1200px) {
  .main-content {
    min-height: calc(100vh - 100px);
  }

  .categories-section {
    overflow: visible;
  }

  .hotline-footer {
    margin-top: 0;
  }
}

@media (min-width: 1400px) {
  .promotion-copy {
    max-width: 620px;
  }

  .hero-card {
    min-height: 75vh;
  }

  .category-grid {
    gap: 16px;
  }
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

@media (min-width: 900px) {
  .category-grid {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
  }
}

@media (min-width: 1400px) {
  .category-grid {
    grid-template-columns: repeat(4, minmax(240px, 1fr));
  }
}

@media (max-width: 760px) {
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (max-width: 520px) {
  .app-shell,
  .auth-shell {
    padding: 0 12px 20px;
  }

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .category-card {
    padding: 14px;
    min-height: auto;
  }

  .category-icon {
    width: 52px;
    height: 52px;
  }

  .icon {
    width: 34px;
    height: 34px;
    font-size: 1.2rem;
  }

  .category-card strong {
    font-size: 0.92rem;
  }

  .category-card small {
    max-width: 100%;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

.category-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
  padding: 22px;
  text-align: left;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04)), var(--category-image, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  min-height: 210px;
  backdrop-filter: blur(14px);
}

@media (max-width: 760px) {
  .category-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  }
}

.category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
}

@media (min-width: 900px) {
  .category-card {
    grid-template-rows: 1fr auto;
    justify-items: start;
    gap: 0;
  }

  .category-card .category-icon {
    display: none;
  }

  .category-content {
    align-self: end;
    padding-top: 0;
  }
}

@media (max-width: 760px) {
  .category-card {
    gap: 10px;
    padding: 14px;
    min-height: auto;
    border-radius: 22px;
  }

  .category-icon {
    width: 68px;
    height: 68px;
  }

  .icon {
    width: 48px;
    height: 48px;
    font-size: 1.45rem;
  }

  .category-card strong {
    font-size: 0.95rem;
  }

  .category-card small {
    display: none;
  }
}

.feature-section {
  display: grid;
  gap: 14px;
}

.feature-card {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 16px;
}

.feature-card h3 {
  margin: 0 0 8px;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
}

.bottom-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.bottom-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 12px 0;
  border-radius: 18px;
  text-decoration: none;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.bottom-link.active,
.bottom-link:hover {
  color: #fff;
  background: rgba(37, 99, 235, 0.22);
}

.auth-main {
  padding: 16px 0 0;
}

.login-form {
  display: grid;
  gap: 16px;
  padding: 20px;
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.login-form label {
  display: grid;
  gap: 8px;
  color: var(--text);
}

.login-form input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.login-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 520px) {
  body {
    overflow-x: hidden;
  }

  .app-shell,
  .auth-shell {
    padding: 0 10px 18px;
  }

  .main-content {
    gap: 16px;
  }

  .categories-section,
  .feature-section {
    padding: 14px;
  }

  .section-header {
    gap: 8px;
  }

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .category-card {
    padding: 10px;
    min-height: 170px;
  }

  .category-icon {
    width: 44px;
    height: 44px;
  }

  .icon {
    width: 28px;
    height: 28px;
    font-size: 1rem;
  }

  .category-card strong {
    font-size: 0.85rem;
  }

  .category-card small {
    display: none;
  }

  .bottom-nav {
    grid-template-columns: repeat(2, 1fr);
  }
}
