/* =========================================
   MISC Platform - Component Styles
   ========================================= */

/* ---- Hamburger Menu ---- */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

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

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

@media (max-width: 768px) {
  .hamburger { display: flex; }
}

/* ---- Mobile Nav Drawer ---- */
.mobile-nav {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  padding: 20px 24px;
  z-index: 99;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  flex-direction: column;
  gap: 8px;
}

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

.mobile-nav a {
  padding: 12px 16px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  font-size: 15px;
  transition: background 0.2s;
}

.mobile-nav a:hover { background: var(--bg-light); }

.mobile-nav .divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

/* ---- Badge ---- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-new    { background: rgba(40,167,69,0.15); color: var(--accent-green); }
.badge-hot    { background: rgba(220,53,69,0.15); color: #dc3545; }
.badge-beta   { background: rgba(0,169,224,0.15); color: var(--accent-blue); }
.badge-coming { background: rgba(113,75,103,0.12); color: var(--primary); }

/* ---- Tooltip ---- */
[data-tooltip] { position: relative; }

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-dark);
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 10;
}

[data-tooltip]:hover::after { opacity: 1; }

/* ---- Scroll Reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ---- Tab Switcher ---- */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-light);
  border-radius: 10px;
  padding: 4px;
  width: fit-content;
  margin: 0 auto 40px;
}

.tab-btn {
  padding: 8px 20px;
  border-radius: 8px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn.active {
  background: var(--bg-white);
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

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

.pricing-card {
  background: var(--bg-white);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  text-align: center;
  position: relative;
  transition: all 0.22s;
}

.pricing-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.pricing-card.featured {
  border-color: var(--primary);
  background: linear-gradient(145deg, rgba(113,75,103,0.04), #fff);
}

.pricing-card .plan-name {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.pricing-card .plan-price {
  font-size: 48px;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1;
  margin-bottom: 4px;
}

.pricing-card .plan-price sup {
  font-size: 22px;
  vertical-align: super;
  font-weight: 600;
}

.pricing-card .plan-period {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.pricing-card .plan-features {
  list-style: none;
  text-align: left;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pricing-card .plan-features li {
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dark);
}

.pricing-card .plan-features li::before {
  content: '✓';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: rgba(40,167,69,0.12);
  color: var(--accent-green);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.popular-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* ---- Progress Bar ---- */
.progress-bar {
  height: 6px;
  background: var(--bg-light);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width 1s ease;
}

/* ---- Notification Toast ---- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1000;
}

.toast {
  background: var(--text-dark);
  color: #fff;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  transform: translateX(120%);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-width: 280px;
}

.toast.show { transform: translateX(0); }

.toast.success { border-left: 4px solid var(--accent-green); }
.toast.error   { border-left: 4px solid #dc3545; }
.toast.info    { border-left: 4px solid var(--accent-blue); }

/* ---- Search Bar ---- */
.search-bar {
  display: flex;
  align-items: center;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 16px;
  gap: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-bar:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(113,75,103,0.1);
}

.search-bar input {
  border: none;
  outline: none;
  font-size: 15px;
  flex: 1;
  background: transparent;
  color: var(--text-dark);
}

.search-bar .search-icon { color: var(--text-muted); font-size: 16px; }

/* ---- DB Structure Card ---- */
.db-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.22s;
}

.db-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.db-card-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.db-card-header .db-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.db-card-header h4 { font-size: 15px; font-weight: 700; }
.db-card-header p  { font-size: 12px; color: var(--text-muted); }

.db-card-body { padding: 16px 20px; }

.db-table-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 13px;
}

.db-table-row:last-child { border-bottom: none; }
.db-table-row .field-name { font-family: 'Courier New', monospace; color: var(--primary); }
.db-table-row .field-type { color: var(--text-muted); font-size: 11px; }

/* ---- Accordion ---- */
.accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 8px;
}

.accordion-header {
  padding: 16px 20px;
  background: var(--bg-white);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 15px;
  transition: background 0.2s;
}

.accordion-header:hover { background: var(--bg-light); }

.accordion-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s;
  font-size: 18px;
  color: var(--primary);
}

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

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.accordion-body-inner {
  padding: 16px 20px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  border-top: 1px solid var(--border);
}

/* =========================================
   Public Website Pages
   ========================================= */
.nav-links a.active { color: var(--primary); }

.page-hero {
  background: var(--bg-light);
  padding: 72px 24px 56px;
  text-align: center;
}
.page-hero h1 {
  font-size: clamp(30px, 4.5vw, 48px);
  font-weight: 800;
  letter-spacing: -1px;
  margin: 16px 0 16px;
}
.page-hero p {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.7;
}

.web-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}
.web-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow .2s, transform .2s;
}
.web-card:hover { box-shadow: 0 10px 30px rgba(0,0,0,0.08); transform: translateY(-3px); }
.web-card .web-card-icon {
  width: 52px; height: 52px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.feature-icon.bg-purple i, .web-card-icon.bg-purple i { color: #714B67; }
.feature-icon.bg-blue i,   .web-card-icon.bg-blue i   { color: #00A9E0; }
.feature-icon.bg-green i,  .web-card-icon.bg-green i  { color: #28A745; }
.feature-icon.bg-orange i, .web-card-icon.bg-orange i { color: #F0A500; }
.feature-icon.bg-red i,    .web-card-icon.bg-red i    { color: #dc3545; }
.feature-icon.bg-teal i,   .web-card-icon.bg-teal i   { color: #20c997; }
.web-card h3 { font-size: 19px; font-weight: 700; margin: 0; }
.web-card p { font-size: 14.5px; color: var(--text-muted); line-height: 1.7; margin: 0; }
.web-card ul { margin: 0; padding-left: 18px; font-size: 14px; color: var(--text-muted); line-height: 1.9; }
.web-card .web-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 8px; }
.web-card .web-card-tag {
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 20px;
  background: var(--bg-light); color: var(--text-muted);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 32px;
  max-width: 1100px;
  margin: 0 auto;
}
.contact-info-item { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 22px; }
.contact-info-item i {
  width: 42px; height: 42px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-light); color: var(--primary); font-size: 16px;
}
.contact-info-item h4 { margin: 0 0 4px; font-size: 15px; }
.contact-info-item p, .contact-info-item a { margin: 0; font-size: 14px; color: var(--text-muted); }
.contact-form textarea.form-input { min-height: 140px; resize: vertical; font-family: inherit; }

.legal-content {
  max-width: 820px;
  margin: 0 auto;
  font-size: 15.5px;
  line-height: 1.8;
  color: var(--text-dark);
}
.legal-content .legal-updated { color: var(--text-muted); font-size: 14px; margin-bottom: 28px; }
.legal-content h2 { font-size: 21px; font-weight: 700; margin: 34px 0 10px; }
.legal-content p, .legal-content li { color: var(--text-muted); }
.legal-content ul { padding-left: 22px; }

/* Login inside the website shell (navbar above, footer below) */
.web-login .auth-split { min-height: calc(100vh - 64px); }
.nav-actions .btn.active { box-shadow: 0 0 0 3px rgba(113,75,103,0.25); }

@media (max-width: 768px) {
  .contact-grid { grid-template-columns: 1fr; }
  .page-hero { padding: 56px 16px 40px; }
}
