:root {
  --bg: #f6f7fb;
  --surface: rgba(255,255,255,0.86);
  --surface-strong: #ffffff;
  --text: #1f2240;
  --muted: #707690;
  --line: rgba(114,122,147,0.18);
  --orange: #ff8a1f;
  --orange-soft: #fff1e0;
  --purple: #7153ff;
  --purple-soft: #efebff;
  --gray: #eef1f6;
  --shadow: 0 20px 55px rgba(39, 45, 77, 0.08);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255,138,31,0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(113,83,255,0.16), transparent 25%),
    linear-gradient(180deg, #ffffff 0%, #f6f7fb 100%);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }

.site-shell { max-width: 1240px; margin: 0 auto; padding: 18px; }
.navbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 18px; border: 1px solid var(--line); border-radius: 22px;
  margin-top: 6px; z-index: 20;
}
.sticky { position: sticky; top: 10px; backdrop-filter: blur(16px); }
.glass { background: var(--surface); box-shadow: var(--shadow); }
.strong-shadow { box-shadow: 0 24px 70px rgba(33, 37, 66, 0.12); }
.brand-wrap { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
  width: 50px; height: 50px; border-radius: 18px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--orange), var(--purple)); color: #fff; font-weight: 800;
  box-shadow: 0 16px 28px rgba(113,83,255,0.22);
}
.brand-title { font-size: 1rem; font-weight: 800; }
.brand-sub { color: var(--muted); font-size: .86rem; }
.nav-links { display: flex; gap: 10px; align-items: center; }
.nav-links a { padding: 10px 14px; border-radius: 12px; color: var(--muted); }
.nav-links a:hover { background: rgba(113,83,255,0.06); color: var(--text); }
.mobile-nav-btn {
  display: none; border: 1px solid var(--line); background: white; border-radius: 12px;
  width: 44px; height: 44px; font-size: 1.1rem;
}
.mobile-nav-panel {
  display: none; margin-top: 10px; padding: 12px; background: white; border-radius: 20px;
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.mobile-nav-panel.open { display: grid; gap: 8px; }
.mobile-nav-panel a { padding: 12px 10px; border-radius: 12px; }
.mobile-nav-panel a:hover { background: var(--gray); }

.hero { padding: 48px 8px 24px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 28px; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px;
  border-radius: 999px; background: linear-gradient(90deg, var(--orange-soft), var(--purple-soft));
  color: var(--text); font-size: .84rem; font-weight: 700; border: 1px solid rgba(113,83,255,0.08);
}
.hero h1 { font-size: clamp(2rem, 4vw, 4rem); line-height: 1.04; margin: 18px 0 12px; }
.lead { color: var(--muted); font-size: 1.05rem; line-height: 1.7; max-width: 760px; }
.hero-actions { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.btn {
  border: none; display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 12px 18px; border-radius: 14px; font-weight: 700; transition: .25s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--orange), #ff9b43 45%, var(--purple)); color: #fff;
  box-shadow: 0 18px 28px rgba(255,138,31,0.18);
}
.btn-secondary { background: #fff; color: var(--text); border: 1px solid var(--line); }
.btn-large { padding: 14px 22px; }
.btn-full { width: 100%; }
.hero-metrics, .preview-card-grid, .stats-grid, .cards-3, .cards-4, .cards-2, .grid { display: grid; gap: 18px; }
.hero-metrics { grid-template-columns: repeat(3, minmax(0,1fr)); margin-top: 26px; }
.metric-card, .info-card, .panel, .role-card, .summary-card, .export-box {
  background: rgba(255,255,255,0.9); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.metric-card { padding: 16px; }
.metric-card strong { display: block; margin-bottom: 6px; }
.metric-card span { color: var(--muted); font-size: .93rem; }
.hero-side { position: relative; }
.dashboard-preview { border-radius: 32px; padding: 22px; border: 1px solid var(--line); }
.preview-head { display: flex; gap: 8px; margin-bottom: 16px; }
.dot { width: 11px; height: 11px; border-radius: 999px; display: inline-block; }
.dot.orange { background: var(--orange); } .dot.purple { background: var(--purple); } .dot.gray { background: #ced3e4; }
.preview-card-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
.mini-card { padding: 18px; min-height: 98px; border-radius: 22px; color: white; display: flex; flex-direction: column; justify-content: end; }
.mini-card small { opacity: .8; margin-bottom: 6px; }
.gradient-orange { background: linear-gradient(135deg, #ff8a1f, #ffb86d); }
.gradient-purple { background: linear-gradient(135deg, #7153ff, #9c86ff); }
.gradient-silver { background: linear-gradient(135deg, #8e96a8, #cbd4e4); }
.gradient-dark { background: linear-gradient(135deg, #2f365b, #515c8d); }
.preview-bars { display: flex; gap: 12px; align-items: flex-end; margin-top: 24px; height: 130px; }
.preview-bars span { flex: 1; border-radius: 16px 16px 8px 8px; background: linear-gradient(180deg, rgba(255,138,31,.9), rgba(113,83,255,.72)); animation: pulseBars 2.8s infinite ease-in-out; }
.preview-bars span:nth-child(1){height:50%}.preview-bars span:nth-child(2){height:78%}.preview-bars span:nth-child(3){height:64%}.preview-bars span:nth-child(4){height:100%}.preview-bars span:nth-child(5){height:72%}
@keyframes pulseBars { 50% { opacity: .72; transform: translateY(4px); } }

.section { padding: 28px 8px; }
.section-head { margin-bottom: 18px; }
.section-head h2 { font-size: clamp(1.4rem, 2.6vw, 2.3rem); margin: 12px 0 0; }
.cards-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.cards-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.cards-2, .split-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.info-card, .panel, .role-card { padding: 20px; transition: transform .25s ease, box-shadow .25s ease; }
.info-card:hover, .role-card:hover, .panel:hover { transform: translateY(-3px); }
.package-card { padding: 22px; position: relative; overflow: hidden; }
.package-card:before {
  content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255,138,31,.08), rgba(113,83,255,.07)); opacity: 0;
  transition: .25s ease;
}
.package-card:hover:before { opacity: 1; }
.package-card h3 { margin-top: 6px; }
.package-price { font-size: 1.7rem; font-weight: 800; margin: 12px 0; }
.package-specs { color: var(--muted); line-height: 1.7; min-height: 74px; white-space: pre-line; }
.package-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; }
.tag { display: inline-flex; padding: 7px 11px; border-radius: 999px; background: var(--gray); color: var(--text); font-size: .83rem; font-weight: 700; }
.testimonial { padding: 22px; }
.testimonial p { color: var(--muted); line-height: 1.75; }
.faq-item { background: white; border: 1px solid var(--line); border-radius: 18px; margin-bottom: 12px; overflow: hidden; }
.faq-question { width: 100%; background: transparent; border: none; padding: 18px 18px; text-align: left; font-weight: 800; color: var(--text); }
.faq-answer { padding: 0 18px 18px; color: var(--muted); display: none; }
.faq-item.open .faq-answer { display: block; }
.cta-panel { display: flex; justify-content: space-between; align-items: center; gap: 20px; background: linear-gradient(135deg, #fff, #f8f2ff); border: 1px solid var(--line); border-radius: 28px; padding: 24px; }
.footer { display: flex; justify-content: space-between; gap: 16px; padding: 30px 8px 44px; color: var(--muted); }
.footer-links { display: flex; gap: 14px; align-items: center; }

.login-body, .app-body { min-height: 100vh; }
.login-wrap { max-width: 980px; margin: 0 auto; padding: 24px; min-height: 100vh; display: grid; place-items: center; }
.back-link { color: var(--muted); display: inline-block; margin-bottom: 14px; }
.login-card { width: 100%; padding: 28px; border-radius: 30px; }
.centered { text-align: center; }
.login-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; margin-top: 20px; }
.role-card { text-align: left; border: 1px solid var(--line); }
.role-admin { background: linear-gradient(135deg, rgba(255,138,31,.10), rgba(255,255,255,.94)); }
.role-customer { background: linear-gradient(135deg, rgba(113,83,255,.10), rgba(255,255,255,.94)); }
.role-badge { display: inline-flex; padding: 8px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: .8rem; font-weight: 800; }
.login-note { margin-top: 18px; color: var(--muted); text-align: center; }

.app-layout { display: grid; grid-template-columns: 280px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; background: rgba(255,255,255,0.9); border-right: 1px solid var(--line);
  padding: 18px; backdrop-filter: blur(14px); display: flex; flex-direction: column; gap: 16px;
}
.sidebar-brand { display: flex; gap: 12px; align-items: center; }
.sidebar-nav { display: grid; gap: 8px; }
.sidebar-nav button {
  text-align: left; border: 1px solid transparent; background: transparent; padding: 12px 14px; border-radius: 14px; color: var(--muted); font-weight: 700;
}
.sidebar-nav button.active, .sidebar-nav button:hover { background: linear-gradient(135deg, rgba(255,138,31,.12), rgba(113,83,255,.12)); color: var(--text); border-color: rgba(113,83,255,.10); }
.sidebar-footer { margin-top: auto; }
.compact-scroll { overflow-y: auto; }
.main-panel { padding: 20px; }
.topbar {
  padding: 18px 20px; border-radius: 22px; border: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 18px;
}
.topbar h1 { margin: 0; font-size: 1.45rem; }
.muted { color: var(--muted); }
.topbar-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.dashboard-section { display: none; }
.dashboard-section.active { display: block; animation: fadeUp .35s ease; }
.stats-grid { grid-template-columns: repeat(4, minmax(0,1fr)); margin-bottom: 18px; }
.stat-card { padding: 20px; border-radius: 22px; border: 1px solid var(--line); background: white; box-shadow: var(--shadow); }
.stat-card small { color: var(--muted); display: block; margin-bottom: 8px; }
.stat-card strong { font-size: 1.8rem; }
.panel { padding: 18px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.panel-head h3 { margin: 0; }
.form-grid { display: grid; gap: 14px; }
.two-col { grid-template-columns: repeat(2, minmax(0,1fr)); }
label { display: block; font-weight: 700; margin-bottom: 8px; }
input, select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: #fff; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: rgba(113,83,255,0.5); box-shadow: 0 0 0 4px rgba(113,83,255,0.08); }
textarea { resize: vertical; }
.flex-end { display: flex; justify-content: flex-end; }
.col-span-2 { grid-column: span 2; }
.gap-lg { gap: 20px; }
.addon-list { display: grid; gap: 10px; max-height: 220px; overflow: auto; padding-right: 4px; }
.addon-item { display: flex; align-items: center; gap: 10px; background: white; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.summary-card { padding: 16px; color: var(--muted); line-height: 1.75; }
.notification-item, .ticket-item, .log-item, .badge-row {
  padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: white; margin-bottom: 12px;
}
.notification-item strong, .ticket-item strong { display: block; margin-bottom: 6px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.status-pill { display: inline-flex; padding: 6px 10px; border-radius: 999px; font-size: .78rem; font-weight: 800; }
.status-active, .status-paid, .status-verified, .status-approved, .status-open { background: #e7fbef; color: #12703e; }
.status-pending, .status-unpaid { background: #fff5e8; color: #b46b11; }
.status-suspend, .status-inactive { background: #f2f3f7; color: #566077; }
.status-expired, .status-rejected, .status-cancelled, .status-closed { background: #ffe8ea; color: #b4233c; }
.table-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.table-actions .btn { padding: 8px 12px; border-radius: 10px; font-size: .84rem; }
.report-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.export-box { margin-top: 16px; padding: 16px; min-height: 120px; white-space: pre-wrap; overflow: auto; }

.toast-container { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 10px; z-index: 999; }
.toast {
  min-width: 260px; max-width: 360px; background: rgba(31,34,64,.96); color: #fff; padding: 14px 16px;
  border-radius: 16px; box-shadow: 0 24px 40px rgba(0,0,0,.18); animation: slideIn .35s ease;
}
.toast.success { background: linear-gradient(135deg, #1e8f56, #29a86d); }
.toast.error { background: linear-gradient(135deg, #af2b44, #d2415f); }
.toast.info { background: linear-gradient(135deg, #5d45d1, #846ef2); }

.skeleton-card {
  min-height: 180px; border-radius: 22px; background: linear-gradient(90deg, #f2f3f6 25%, #fafbfc 50%, #f2f3f6 75%);
  background-size: 220% 100%; animation: skeleton 1.2s infinite linear;
}
.placeholder-text { color: var(--muted); line-height: 1.7; }
.fade-up { animation: fadeUp .6s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes skeleton { from { background-position: 200% 0; } to { background-position: -20% 0; } }
@keyframes slideIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1100px) {
  .hero-grid, .split-2, .cards-4, .stats-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .nav-links { display: none; }
  .mobile-nav-btn { display: inline-grid; place-items: center; }
  .hero-grid, .cards-3, .cards-2, .split-2, .two-col, .hero-metrics, .stats-grid { grid-template-columns: 1fr; }
  .cta-panel, .footer, .topbar { flex-direction: column; align-items: stretch; }
  .app-layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: -310px; width: 280px; z-index: 50; transition: .25s ease; box-shadow: 0 0 0 999px rgba(19,24,44,0);
  }
  .sidebar.open { left: 0; box-shadow: 0 0 0 999px rgba(19,24,44,0.25); }
  .main-panel { padding: 14px; }
  .login-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .site-shell, .login-wrap { padding: 14px; }
  .navbar, .login-card, .topbar, .panel, .package-card { border-radius: 18px; }
  .brand-sub { display: none; }
  .table-wrap.responsive-table table, .table-wrap.responsive-table thead, .table-wrap.responsive-table tbody, .table-wrap.responsive-table th, .table-wrap.responsive-table td, .table-wrap.responsive-table tr {
    display: block;
  }
  .table-wrap.responsive-table thead { display: none; }
  .table-wrap.responsive-table tr {
    border: 1px solid var(--line); border-radius: 16px; padding: 8px 10px; margin-bottom: 12px; background: white; box-shadow: var(--shadow);
  }
  .table-wrap.responsive-table td {
    border-bottom: 1px dashed rgba(112,118,144,.18); padding: 10px 6px 10px 46%; position: relative; min-height: 40px;
  }
  .table-wrap.responsive-table td:last-child { border-bottom: none; }
  .table-wrap.responsive-table td:before {
    content: attr(data-label); position: absolute; left: 6px; width: 40%; color: var(--muted); font-weight: 800; font-size: .8rem;
  }
  .col-span-2 { grid-column: span 1; }
}
