/* ===================================================================
   Calvatron — Group Buy SEO Tools
   Clean, minimal, professional design system
   =================================================================== */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand: #2563EB;
  --brand-dark: #1D4ED8;
  --brand-light: #DBEAFE;
  --brand-50: #EFF6FF;
  --text: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --bg: #FFFFFF;
  --bg-alt: #F8FAFC;
  --bg-card: #FFFFFF;
  --border: #E2E8F0;
  --border-light: #F1F5F9;
  --success: #16A34A;
  --danger: #DC2626;
  --warning: #F59E0B;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,.06), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.08), 0 4px 6px rgba(0,0,0,.03);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-w: 1200px;
  --transition: 0.2s ease;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--brand); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--brand-dark); }

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

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}
h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }

p { color: var(--text-secondary); }

/* --- Layout --- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header .label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand);
  background: var(--brand-light);
  padding: 4px 14px;
  border-radius: 100px;
  margin-bottom: 12px;
}

.section-header h2 {
  margin-bottom: 12px;
}

.section-header p {
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0 auto;
  color: var(--text-secondary);
}

/* --- Navigation --- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.navbar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text);
  text-decoration: none;
}

.navbar-logo img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.navbar-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  text-decoration: none;
}

.navbar-links a:hover,
.navbar-links a.active {
  color: var(--brand);
  background: var(--brand-50);
}

.navbar-cta {
  margin-left: 8px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* Mobile nav */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .navbar-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 24px;
    gap: 4px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 999;
  }

  .navbar-links.open {
    transform: translateX(0);
  }

  .navbar-links a {
    font-size: 1.05rem;
    padding: 12px 16px;
    width: 100%;
  }

  .navbar-cta { margin-left: 0; margin-top: 8px; }
  .navbar-cta .btn { width: 100%; text-align: center; }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1.4;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}
.btn-primary:hover {
  background: var(--brand-dark);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.btn-outline {
  background: transparent;
  color: var(--brand);
  border: 1.5px solid var(--brand);
}
.btn-outline:hover {
  background: var(--brand);
  color: #fff;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover { background: #B91C1C; color: #fff; }

.btn-sm { padding: 6px 14px; font-size: 0.82rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 14px 32px; font-size: 1rem; }

.btn-whatsapp {
  background: #25D366;
  color: #fff;
}
.btn-whatsapp:hover { background: #1EBE5A; color: #fff; }

/* --- Hero --- */
.hero {
  padding: 100px 0 80px;
  text-align: center;
}

.hero h1 {
  margin-bottom: 16px;
  font-weight: 800;
}

.hero h1 .accent {
  color: var(--brand);
}

.hero .subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 48px;
  justify-content: center;
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.hero-stat {
  text-align: center;
}

.hero-stat .num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
}

.hero-stat .lbl {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

@media (max-width: 600px) {
  .hero { padding: 64px 0 48px; }
  .hero-stats { gap: 24px; flex-wrap: wrap; }
}

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: box-shadow var(--transition), border-color var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-light);
}

/* --- Tool Cards --- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition), border-color var(--transition);
}

.tool-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-light);
}

.tool-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.tool-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  flex-shrink: 0;
}

.tool-icon.seo { background: #2563EB; }
.tool-icon.ai { background: #7C3AED; }
.tool-icon.design { background: #EC4899; }
.tool-icon.writing { background: #F59E0B; }
.tool-icon.marketing { background: #10B981; }

.tool-icon img {
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
  object-fit: cover;
}

.tool-card-header h3 {
  font-size: 1.1rem;
  margin-bottom: 2px;
}

.tool-category {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 100px;
  color: var(--brand);
  background: var(--brand-light);
}

.tool-category.ai { color: #7C3AED; background: #EDE9FE; }
.tool-category.design { color: #EC4899; background: #FCE7F3; }
.tool-category.writing { color: #D97706; background: #FEF3C7; }
.tool-category.marketing { color: #059669; background: #D1FAE5; }

.tool-card p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 20px;
  flex-grow: 1;
}

.tool-pricing {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 16px;
}

.tool-pricing-values {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tool-pricing .original {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.tool-pricing .price {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.tool-pricing .price sup {
  font-size: 0.8rem;
  font-weight: 600;
}

.tool-pricing .price-inr {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--brand);
}

.tool-pricing .period {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.tool-card .btn {
  width: 100%;
}

/* --- Why Choose Us Grid --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.feature-card {
  text-align: center;
  padding: 36px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: box-shadow var(--transition);
}

.feature-card:hover {
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 56px;
  height: 56px;
  background: var(--brand-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.5rem;
}

.feature-card h3 {
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.9rem;
}

/* --- Explainer --- */
.explainer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.explainer-text h2 {
  margin-bottom: 16px;
}

.explainer-text p {
  margin-bottom: 12px;
  font-size: 0.95rem;
  line-height: 1.7;
}

.explainer-visual {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  text-align: center;
}

.explainer-steps {
  list-style: none;
  text-align: left;
}

.explainer-steps li {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}

.explainer-steps li:last-child { border-bottom: none; }

.step-num {
  width: 32px;
  height: 32px;
  background: var(--brand);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.step-text strong {
  display: block;
  color: var(--text);
  margin-bottom: 2px;
}

.step-text span {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .explainer { grid-template-columns: 1fr; gap: 32px; }
}

/* --- FAQ --- */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  background: var(--bg-card);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 18px 22px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  transition: background var(--transition);
}

.faq-question:hover {
  background: var(--bg-alt);
}

.faq-question .icon {
  font-size: 1.3rem;
  color: var(--text-muted);
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 12px;
}

.faq-item.open .faq-question .icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-answer-inner {
  padding: 0 22px 18px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.faq-item.open .faq-answer {
  max-height: 400px;
}

/* --- CTA Band --- */
.cta-band {
  background: var(--brand);
  padding: 64px 0;
  text-align: center;
}

.cta-band h2 {
  color: #fff;
  margin-bottom: 12px;
}

.cta-band p {
  color: rgba(255,255,255,.8);
  margin-bottom: 28px;
  font-size: 1.05rem;
}

.cta-band .btn-primary {
  background: #fff;
  color: var(--brand);
}
.cta-band .btn-primary:hover {
  background: var(--brand-light);
}

/* --- Filter Bar --- */
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
  justify-content: center;
}

.filter-btn {
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

/* --- Search --- */
.search-bar {
  max-width: 480px;
  margin: 0 auto 32px;
  position: relative;
}

.search-bar input {
  width: 100%;
  padding: 12px 20px 12px 44px;
  font-family: var(--font);
  font-size: 0.95rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
}

.search-bar input:focus {
  border-color: var(--brand);
}

.search-bar .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
}

/* --- Pricing Table --- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  text-align: center;
  position: relative;
  transition: box-shadow var(--transition);
}

.pricing-card.popular {
  border-color: var(--brand);
  box-shadow: var(--shadow-lg);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pricing-card h3 {
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.pricing-card .price {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text);
  margin: 16px 0 4px;
}

.pricing-card .price sup {
  font-size: 1rem;
  vertical-align: super;
}

.pricing-card .period {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: 28px;
}

.pricing-features li {
  padding: 8px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.pricing-features li::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
  flex-shrink: 0;
}

.pricing-card .btn {
  width: 100%;
}

/* --- Contact --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.contact-info-card {
  display: flex;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  transition: box-shadow var(--transition);
}

.contact-info-card:hover {
  box-shadow: var(--shadow-md);
}

.contact-info-card .icon {
  width: 44px;
  height: 44px;
  background: var(--brand-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-info-card h4 {
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.contact-info-card p {
  font-size: 0.88rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font);
  font-size: 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--brand);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

@media (max-width: 768px) {
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* --- Footer --- */
.footer {
  background: var(--text);
  color: rgba(255,255,255,.7);
  padding: 56px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
  margin-bottom: 12px;
  text-decoration: none;
}

.footer-brand .logo img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.footer-brand p {
  color: rgba(255,255,255,.5);
  font-size: 0.88rem;
  line-height: 1.6;
}

.footer h4 {
  color: #fff;
  font-size: 0.9rem;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: rgba(255,255,255,.5);
  font-size: 0.88rem;
  transition: color var(--transition);
  text-decoration: none;
}

.footer-links a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,.35);
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 8px; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* --- Admin Styles --- */
.admin-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-header {
  background: var(--text);
  color: #fff;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-header h1 {
  font-size: 1rem;
  color: #fff;
}

.admin-content {
  flex: 1;
  padding: 32px 24px;
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
}

/* Login */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  padding: 24px;
}

.login-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
}

.login-card h1 {
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 8px;
}

.login-card .login-sub {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.login-card .form-group {
  margin-bottom: 16px;
}

.login-card .btn {
  width: 100%;
  margin-top: 8px;
}

.login-error {
  background: #FEF2F2;
  color: var(--danger);
  font-size: 0.85rem;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  display: none;
}

/* Admin Table */
.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.admin-table th,
.admin-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.admin-table th {
  background: var(--bg-alt);
  font-weight: 600;
  color: var(--text);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.admin-table td { color: var(--text-secondary); }

.admin-table tr:hover td { background: var(--bg-alt); }

.admin-table .tool-name {
  font-weight: 600;
  color: var(--text);
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
}

.badge-active { background: #D1FAE5; color: #059669; }
.badge-inactive { background: #FEF2F2; color: #DC2626; }

.actions-cell {
  display: flex;
  gap: 6px;
}

/* Admin Modal / Form */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal h2 {
  font-size: 1.25rem;
  margin-bottom: 24px;
}

.modal .form-group {
  margin-bottom: 16px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

/* Toggle switch */
.toggle-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toggle {
  position: relative;
  width: 44px;
  height: 24px;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}

.toggle input:checked + .toggle-slider {
  background: var(--brand);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* --- Terms Page --- */
.prose {
  max-width: 720px;
  margin: 0 auto;
}

.prose h2 {
  margin: 36px 0 12px;
  font-size: 1.35rem;
}

.prose h3 {
  margin: 24px 0 8px;
}

.prose p {
  margin-bottom: 14px;
  font-size: 0.95rem;
  line-height: 1.75;
}

.prose ul, .prose ol {
  padding-left: 24px;
  margin-bottom: 14px;
}

.prose li {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  line-height: 1.65;
}

/* --- Toast notification --- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--text);
  color: #fff;
  padding: 14px 24px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  z-index: 3000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
}

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

.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

/* --- Empty state --- */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-muted);
}

.empty-state .icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

/* --- Page Header --- */
.page-header {
  background: var(--bg-alt);
  padding: 48px 0;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  margin-bottom: 8px;
}

.page-header p {
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
}

/* --- Utility --- */
.text-center { text-align: center; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ===================================================================
   Admin Tabs & Extended Dashboard
   =================================================================== */

/* Tab Navigation */
.admin-tabs {
  display: flex;
  gap: 0;
  background: var(--bg);
  border-bottom: 2px solid var(--border);
  padding: 0 32px;
  overflow-x: auto;
}

.admin-tab {
  padding: 14px 24px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color var(--transition), border-color var(--transition);
  white-space: nowrap;
  font-family: var(--font);
}

.admin-tab:hover {
  color: var(--text);
}

.admin-tab.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

/* Tab Panels */
.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* Order status badges */
.badge-pending {
  background: #FEF3C7;
  color: #92400E;
}

.badge-active {
  background: #DCFCE7;
  color: #166534;
}

.badge-inactive {
  background: #FEE2E2;
  color: #991B1B;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Success button variant */
.btn-success {
  background: var(--success);
  color: #fff;
  border: none;
}

.btn-success:hover {
  background: #15803D;
}

/* Form select small */
.form-select-sm {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}

.form-select-sm:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}

/* Bot Settings Form */
.bot-settings-form {
  max-width: 900px;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.settings-grid .full-width {
  grid-column: 1 / -1;
}

.settings-section {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.settings-section h3 {
  font-size: 1rem;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.settings-section small {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.settings-section small a {
  color: var(--brand);
}

/* QR Upload Area */
.qr-upload-area {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.qr-preview {
  width: 120px;
  height: 120px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg);
  flex-shrink: 0;
}

.qr-preview span {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  padding: 8px;
}

.qr-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ===================================================================
   Shopping Cart UI & Drawer Panel
   =================================================================== */

/* Header Cart Button & Badge */
.nav-cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  margin-right: 8px;
}

.nav-cart-btn:hover {
  background: var(--brand-light);
  border-color: var(--brand);
  color: var(--brand-dark);
}

.cart-badge {
  background: var(--brand);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 12px;
  min-width: 18px;
  text-align: center;
  line-height: 1.2;
}

/* Tool card actions layout */
.tool-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.tool-card-actions .btn {
  flex: 1;
  text-align: center;
  font-size: 0.85rem;
  padding: 10px 12px;
}

.btn-cart {
  background: var(--bg-alt);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-cart:hover {
  background: var(--brand-50);
  border-color: var(--brand);
  color: var(--brand);
}

.btn-cart.in-cart {
  background: var(--brand-light);
  color: var(--brand-dark);
  border-color: var(--brand);
}

/* Cart Overlay & Drawer */
.cart-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 999;
}

.cart-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  background: var(--bg-card);
  box-shadow: -8px 0 24px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
}

.cart-drawer.open {
  right: 0;
}

.cart-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}

.cart-drawer-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-drawer-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  border-radius: var(--radius-sm);
  transition: color var(--transition);
}

.cart-drawer-close:hover {
  color: var(--danger);
}

.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.cart-empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--text-muted);
}

.cart-empty .icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.cart-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cart-item-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

.cart-item-duration {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.cart-item-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cart-item-price {
  font-weight: 800;
  color: var(--brand);
  font-size: 0.95rem;
}

.cart-item-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 2px 6px;
  transition: color var(--transition);
}

.cart-item-remove:hover {
  color: var(--danger);
}

.cart-drawer-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 1.1rem;
  font-weight: 700;
}

.cart-total-price {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--brand);
}

.btn-checkout-tg {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius);
}


