:root {
  --blue: #1463ff;
  --blue-dark: #063fbd;
  --cyan: #22d3ee;
  --black: #07111f;
  --ink: #172033;
  --muted: #667085;
  --line: #dbe4f0;
  --soft: #f4f8ff;
  --white: #ffffff;
  --danger: #e11d48;
  --success: #16a34a;
  --warning: #f59e0b;
  --shadow: 0 18px 48px rgba(7, 17, 31, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #eef5ff 0%, #ffffff 34%, #f7fbff 100%);
}

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

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

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

.hidden {
  display: none !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px clamp(18px, 5vw, 64px);
  border-bottom: 1px solid rgba(219, 228, 240, 0.84);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

.logo {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--black);
  font-size: 1.08rem;
  font-weight: 900;
  letter-spacing: 0;
}

.logo::before {
  content: "TT";
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-right: 10px;
  border-radius: 8px;
  color: var(--white);
  font-size: 0.78rem;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 10px 24px rgba(20, 99, 255, 0.28);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-nav a,
.logout-btn {
  border: 0;
  border-radius: 8px;
  padding: 10px 13px;
  color: #263348;
  background: transparent;
  cursor: pointer;
  transition: 0.2s ease;
}

.site-nav a:hover,
.logout-btn:hover {
  color: var(--blue);
  background: #eef5ff;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--black);
  background: var(--white);
  cursor: pointer;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 32px;
  align-items: center;
  padding: clamp(48px, 8vw, 92px) clamp(18px, 5vw, 64px) 42px;
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(7, 17, 31, 0.92), rgba(12, 70, 174, 0.88)),
    url("https://images.unsplash.com/photo-1559136555-9303baea8ebd?auto=format&fit=crop&w=1400&q=80") center/cover;
}

.hero-content {
  max-width: 780px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--cyan);
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  color: inherit;
  font-size: clamp(2.2rem, 6vw, 4.9rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  color: var(--black);
  font-size: clamp(1.55rem, 3vw, 2.3rem);
  line-height: 1.15;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  color: var(--black);
  font-size: 1.05rem;
}

.hero-copy {
  max-width: 680px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 11px 18px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 14px 26px rgba(20, 99, 255, 0.24);
}

.btn-primary:hover {
  box-shadow: 0 18px 36px rgba(20, 99, 255, 0.32);
}

.btn-secondary {
  color: var(--blue);
  border-color: rgba(20, 99, 255, 0.22);
  background: var(--white);
}

.btn-danger {
  color: var(--white);
  background: var(--danger);
}

.full {
  width: 100%;
}

.hero-panel {
  display: grid;
  gap: 14px;
}

.stat-card {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
}

.stat-card span {
  display: block;
  font-size: 2rem;
  font-weight: 900;
}

.stat-card p {
  margin: 5px 0 0;
  color: rgba(255, 255, 255, 0.78);
}

.section,
.page-shell {
  padding: 52px clamp(18px, 5vw, 64px);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 24px;
}

.section-heading.compact {
  display: block;
}

.section-heading.compact p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

.product-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 8px 28px rgba(7, 17, 31, 0.07);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.product-card:hover {
  transform: translateY(-5px);
  border-color: rgba(20, 99, 255, 0.35);
  box-shadow: var(--shadow);
}

.product-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #dbeafe;
}

.product-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
}

.product-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}

.price {
  color: var(--blue-dark);
  font-size: 1.04rem;
  font-weight: 900;
}

.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--success);
  font-size: 0.78rem;
  font-weight: 800;
  background: #dcfce7;
}

.badge.out {
  color: #9a3412;
  background: #ffedd5;
}

.contact-band,
.topup-guide,
.form-panel,
.auth-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 36px rgba(7, 17, 31, 0.08);
}

.contact-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 clamp(18px, 5vw, 64px) 56px;
}

.contact-band p {
  margin: 10px 0 0;
  color: var(--muted);
}

.auth-body {
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.22), transparent 28%),
    linear-gradient(135deg, #07111f 0%, #0b2f77 48%, #f4f8ff 48%, #ffffff 100%);
}

.auth-layout {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 460px);
  gap: 32px;
  align-items: center;
  width: min(1050px, 100%);
  min-height: calc(100vh - 48px);
}

.auth-brand {
  color: var(--white);
}

.auth-brand .logo {
  color: var(--white);
  margin-bottom: 34px;
}

.auth-brand h1 {
  max-width: 650px;
}

.auth-brand p {
  max-width: 580px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.08rem;
  line-height: 1.7;
}

.auth-card,
.form-panel {
  padding: clamp(22px, 4vw, 34px);
}

.auth-card h2,
.form-panel h2 {
  margin-bottom: 22px;
}

.auth-note {
  margin: 18px 0 0;
  color: var(--muted);
  text-align: center;
}

.auth-note a {
  color: var(--blue);
  font-weight: 800;
}

.auth-note.small {
  font-size: 0.88rem;
}

.form {
  display: grid;
  gap: 15px;
}

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

.wide {
  grid-column: 1 / -1;
}

.form label {
  display: grid;
  gap: 7px;
  color: #263348;
  font-size: 0.92rem;
  font-weight: 800;
}

.form input,
.form textarea,
.form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  color: var(--ink);
  outline: none;
  background: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form input:focus,
.form textarea:focus,
.form select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(20, 99, 255, 0.12);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  place-items: center;
  padding: 18px;
}

.modal.open {
  display: grid;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 17, 31, 0.62);
  backdrop-filter: blur(8px);
}

.modal-card {
  position: relative;
  width: min(540px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  border-radius: 8px;
  padding: 28px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.modal-card h2 {
  margin-bottom: 18px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  max-width: min(420px, calc(100vw - 36px));
  padding: 14px 16px;
  border-radius: 8px;
  color: var(--white);
  font-weight: 800;
  background: var(--black);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: 0.24s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.success {
  background: linear-gradient(135deg, #15803d, #22c55e);
}

.toast.error {
  background: linear-gradient(135deg, #be123c, #f43f5e);
}

.topup-guide {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px);
  gap: 28px;
  align-items: center;
  margin-bottom: 28px;
  padding: clamp(24px, 5vw, 42px);
}

.topup-guide h1 {
  color: var(--black);
}

.topup-guide p {
  color: var(--muted);
  line-height: 1.65;
}

.bank-box {
  border-radius: 8px;
  padding: 20px;
  color: var(--white);
  background: linear-gradient(135deg, var(--black), var(--blue-dark));
}

.bank-box p {
  margin: 8px 0;
  color: rgba(255, 255, 255, 0.88);
}

.site-footer {
  padding: 26px clamp(18px, 5vw, 64px);
  color: #5b6678;
  text-align: center;
  border-top: 1px solid var(--line);
  background: var(--white);
}

.admin-body {
  background: #f4f8ff;
}

.admin-login {
  padding: 24px;
  margin: 0 auto;
}

.admin-login .auth-brand,
.admin-login .auth-brand .logo {
  color: var(--black);
}

.admin-login .auth-brand p {
  color: var(--muted);
}

.admin-panel {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100vh;
  padding: 22px;
  border-right: 1px solid var(--line);
  background: var(--white);
}

.admin-sidebar .logo {
  margin-bottom: 18px;
}

.admin-tab {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 12px 14px;
  color: #263348;
  font-weight: 800;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.admin-tab:hover,
.admin-tab.active {
  color: var(--blue);
  background: #eef5ff;
}

.admin-sidebar .btn {
  margin-top: auto;
}

.admin-content {
  min-width: 0;
  padding: 26px;
}

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

.admin-topbar h1 {
  color: var(--black);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.admin-section {
  display: none;
}

.admin-section.active {
  display: block;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 10px 30px rgba(7, 17, 31, 0.06);
}

table {
  width: 100%;
  min-width: 850px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: #344054;
  font-size: 0.82rem;
  text-transform: uppercase;
  background: #f8fbff;
}

td {
  color: #344054;
}

tr:last-child td {
  border-bottom: 0;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.table-actions .btn {
  min-height: 36px;
  padding: 8px 10px;
  font-size: 0.86rem;
}

.thumb {
  width: 74px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
}

.form-actions {
  display: flex;
  align-items: end;
  gap: 10px;
}

.empty-state {
  padding: 22px;
  color: var(--muted);
  text-align: center;
}

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

@media (max-width: 860px) {
  .nav-toggle {
    display: grid;
  }

  .site-nav {
    position: absolute;
    top: 73px;
    right: 18px;
    left: 18px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: var(--shadow);
  }

  .site-nav.open {
    display: flex;
  }

  .hero,
  .topup-guide,
  .auth-layout,
  .admin-panel {
    grid-template-columns: 1fr;
  }

  .auth-layout {
    min-height: auto;
  }

  .auth-body {
    display: block;
    background: linear-gradient(180deg, #07111f 0%, #0b2f77 42%, #f4f8ff 42%, #ffffff 100%);
  }

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

  .contact-band,
  .admin-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-sidebar {
    position: static;
    height: auto;
  }

  .admin-sidebar .btn {
    margin-top: 8px;
  }
}

@media (max-width: 620px) {
  .site-header {
    padding: 14px 16px;
  }

  .hero {
    padding: 42px 18px 34px;
  }

  .section,
  .page-shell {
    padding: 38px 18px;
  }

  .section-heading {
    display: block;
  }

  .product-grid,
  .form.two-col {
    grid-template-columns: 1fr;
  }

  .contact-band {
    margin: 0 18px 42px;
    padding: 24px;
  }

  .product-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .product-footer .btn {
    width: 100%;
  }

  .auth-body {
    padding: 16px;
  }

  .auth-card,
  .form-panel,
  .modal-card {
    padding: 22px;
  }

  .admin-content {
    padding: 18px;
  }
}
