@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700&display=swap');

:root {
  --app-bg: #f6f7f9;
  --app-surface: #ffffff;
  --app-surface-2: #f9fafb;
  --app-text: #171717;
  --app-muted: #6b7280;
  --app-border: #e5e7eb;
  --app-border-strong: #d1d5db;
  --app-dark: #111111;
  --app-dark-2: #1c1c1c;
  --app-dark-3: #262626;
  --app-success: #16845b;
  --app-warning: #a16207;
  --app-danger: #b42318;
  --app-info: #175cd3;
  --app-radius: 14px;
  --app-radius-sm: 10px;
  --app-shadow: 0 8px 30px rgba(15, 23, 42, .055);
  --app-shadow-lg: 0 18px 50px rgba(15, 23, 42, .10);
  --app-transition: 180ms ease;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  background: var(--app-bg);
  color: var(--app-text);
  font-family: 'Prompt', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
a:hover { color: inherit; }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font-family: inherit; }
code { color: #374151; background: #f3f4f6; border-radius: 6px; padding: .12rem .35rem; }

/* Bootstrap normalization */
.container { width: 100%; }
.row { --bs-gutter-y: 1.25rem; }
.card {
  border: 1px solid var(--app-border) !important;
  border-radius: var(--app-radius) !important;
  background: var(--app-surface);
  box-shadow: var(--app-shadow) !important;
  overflow: hidden;
}
.card-body { background: transparent; }
hr { border-color: var(--app-border); opacity: 1; }
.text-secondary { color: var(--app-muted) !important; }

/* Page shell */
.app-main {
  min-width: 0;
  min-height: 100vh;
  padding: 28px 32px;
}
.app-content { width: 100%; margin-inline: auto; }
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.page-header h1, .page-header h2, .page-header h3 { margin: 0; font-weight: 600; letter-spacing: -.02em; }
.page-header p { margin: 4px 0 0; color: var(--app-muted); }

/* Admin sidebar */
.admin-shell { display: flex; min-height: 100vh; }
.sidebar {
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  z-index: 1030;
  flex: 0 0 252px;
  width: 252px;
  min-height: 100vh;
  padding: 18px 14px;
  background: var(--app-dark);
  color: #fff;
  transition: width var(--app-transition), flex-basis var(--app-transition), transform var(--app-transition);
  overflow: hidden;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 52px;
  padding: 0 10px 18px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,.09);
  text-decoration: none;
  white-space: nowrap;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
  background: #fff;
  color: #111;
  font-size: 13px;
  font-weight: 700;
}
.brand-name { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; }
.sidebar-section { margin: 20px 10px 7px; color: #737373; font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.sidebar a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 42px;
  margin: 3px 0;
  padding: 8px 11px;
  border-radius: 10px;
  color: #c7c7c7;
  text-decoration: none;
  font-size: 13px;
  white-space: nowrap;
  transition: background var(--app-transition), color var(--app-transition);
}
.sidebar a:hover { background: #1f1f1f; color: #fff; }
.sidebar a.is-active { background: #fff; color: #111; font-weight: 500; }
.sidebar a.is-active:hover { background: #f3f4f6; }
.sidebar-icon { width: 20px; flex: 0 0 20px; text-align: center; font-size: 15px; }
.sidebar-toggle {
  position: absolute;
  top: 22px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: #1f1f1f;
  color: #d4d4d4;
  cursor: pointer;
}
.admin-main { flex: 1 1 auto; min-width: 0; }
.sidebar-collapsed .sidebar { flex-basis: 78px; width: 78px; }
.sidebar-collapsed .sidebar .brand-name,
.sidebar-collapsed .sidebar .sidebar-section,
.sidebar-collapsed .sidebar a span:not(.sidebar-icon) { display: none; }
.sidebar-collapsed .sidebar-brand { justify-content: center; padding-inline: 0; }
.sidebar-collapsed .sidebar a { justify-content: center; padding-inline: 0; }
.sidebar-collapsed .sidebar-toggle { right: 24px; }

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 52px;
  margin-bottom: 26px;
}
.admin-topbar .identity { color: var(--app-muted); font-size: 13px; }
.mobile-menu-btn { display: none; }

/* Customer navbar */
.customer-nav {
  position: sticky;
  top: 0;
  z-index: 1020;
  min-height: 64px;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid var(--app-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.customer-nav .container { min-height: 64px; }
.customer-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; }
.customer-links { display: flex; align-items: center; gap: 4px; }
.customer-links a {
  padding: 7px 10px;
  border-radius: 8px;
  color: #525252;
  text-decoration: none;
  font-size: 13px;
  transition: background var(--app-transition), color var(--app-transition);
}
.customer-links a:hover { background: #f3f4f6; color: #111; }
.user-menu { position: relative; }
.user-trigger {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 8px 5px 5px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  transition: background var(--app-transition), border-color var(--app-transition);
}
.user-trigger:hover { background: #f5f5f5; border-color: var(--app-border); }
.avatar {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}
.user-name { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 500; }
.user-chevron { font-size: 11px; color: #737373; }
.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  padding: 6px;
  border: 1px solid var(--app-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--app-shadow-lg);
  display: none;
}
.user-menu.open .user-dropdown { display: block; }
.user-dropdown a { display: block; padding: 8px 10px; border-radius: 8px; text-decoration: none; font-size: 13px; }
.user-dropdown a:hover { background: #f5f5f5; }

/* Buttons */
.btn {
  border-radius: 9px !important;
  font-size: 13px;
  font-weight: 500;
  min-height: 38px;
  padding: .48rem .85rem;
  transition: background var(--app-transition), color var(--app-transition), border-color var(--app-transition);
}
.btn-primary, .btn-dark {
  --bs-btn-bg: #111;
  --bs-btn-border-color: #111;
  --bs-btn-hover-bg: #2a2a2a;
  --bs-btn-hover-border-color: #2a2a2a;
  --bs-btn-active-bg: #000;
  --bs-btn-active-border-color: #000;
  --bs-btn-color: #fff;
  --bs-btn-hover-color: #fff;
  background: #111 !important;
  border-color: #111 !important;
  color: #fff !important;
}
.btn-primary:hover, .btn-dark:hover { background: #2a2a2a !important; border-color: #2a2a2a !important; }
.btn-outline-dark, .btn-outline-secondary, .btn-outline-primary, .btn-outline-success, .btn-outline-danger {
  background: #fff;
  border-color: var(--app-border-strong);
  color: #262626;
}
.btn-outline-dark:hover, .btn-outline-secondary:hover, .btn-outline-primary:hover, .btn-outline-success:hover, .btn-outline-danger:hover {
  background: #f3f4f6;
  border-color: #bfc3c9;
  color: #111;
}
.btn-sm { min-height: 32px; padding: .34rem .65rem; font-size: 12px; }

/* Forms */
.form-label { margin-bottom: 6px; font-size: 12px; font-weight: 500; color: #404040; }
.form-control, .form-select {
  min-height: 42px;
  border: 1px solid var(--app-border-strong);
  border-radius: 9px;
  background: #fff;
  color: #171717;
  font-size: 13px;
  box-shadow: none !important;
}
.form-control:focus, .form-select:focus {
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(17,17,17,.07) !important;
}
.form-control::placeholder { color: #a3a3a3; }
textarea.form-control { min-height: 100px; }
.form-check-input { border-color: #b8bcc2; }
.form-check-input:checked { background-color: #111; border-color: #111; }
.form-check-label { font-size: 13px; }

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table {
  margin-bottom: 0;
  min-width: 640px;
  color: #262626;
  font-size: 12.5px;
  vertical-align: middle;
}
.table > :not(caption) > * > * { padding: 11px 14px; border-bottom-color: var(--app-border); }
.table thead th {
  background: #f8f9fa;
  color: #525252;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 1px solid var(--app-border);
}
.table tbody tr:hover > * { background: #fafafa; }
.table tbody tr:last-child > * { border-bottom: 0; }

/* Status / badges */
.badge { border-radius: 999px !important; padding: .38em .68em; font-weight: 500; font-size: 10.5px; }
.badge.bg-success { background: #ecfdf3 !important; color: var(--app-success) !important; }
.badge.bg-danger { background: #fef3f2 !important; color: var(--app-danger) !important; }
.badge.bg-secondary { background: #f3f4f6 !important; color: #525252 !important; }
.badge.bg-warning { background: #fffaeb !important; color: var(--app-warning) !important; }
.status-active { color: var(--app-success) !important; }
.status-expired { color: var(--app-danger) !important; }
.status-suspended { color: #737373 !important; }

/* Alerts */
.alert {
  border-radius: 10px;
  border-width: 1px;
  font-size: 13px;
  padding: 11px 14px;
}
.alert-success { color: #12633f; background: #ecfdf3; border-color: #bbf7d0; }
.alert-danger { color: #912018; background: #fef3f2; border-color: #fecdca; }
.alert-warning { color: #854d0e; background: #fffaeb; border-color: #fedf89; }
.alert-info { color: #174ea6; background: #eff8ff; border-color: #b2ddff; }

/* Customer website cards */
.website-card { height: 100%; display: flex; flex-direction: column; }
.website-card .website-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.website-domain { font-size: 16px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; word-break: break-word; }
.website-service { margin-top: 3px; color: var(--app-muted); font-size: 12px; }
.website-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.meta-label { color: var(--app-muted); font-size: 11px; }
.meta-value { margin-top: 2px; font-weight: 600; }
.website-actions { margin-top: auto; padding-top: 18px; }

/* Pricing / selection */
.plan-option {
  display: block;
  height: 100%;
  padding: 14px;
  border: 1px solid var(--app-border) !important;
  border-radius: 12px !important;
  background: #fff;
  cursor: pointer;
  transition: border-color var(--app-transition), background var(--app-transition);
}
.plan-option:hover { background: #fafafa; border-color: #c7c7c7 !important; }
.plan-option:has(.plan-radio:checked) { border: 2px solid #111 !important; background: #fafafa; }
.plan-radio { accent-color: #111; }

/* Notification list */
.notification-item { padding: 15px 0; border-bottom: 1px solid var(--app-border); }
.notification-item:last-child { border-bottom: 0; }

/* Payment */
.payment-summary-amount { font-size: clamp(28px, 4vw, 42px); font-weight: 700; letter-spacing: -.03em; }
.bank-box { padding: 18px; border: 1px solid var(--app-border); border-radius: 12px; background: #fafafa; }
.qr-image { display: block; width: min(280px, 100%); margin: 14px auto 0; border-radius: 10px; }

/* Public / login pages */
.public-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 32px 16px;
}
.public-card { width: min(100%, 460px); margin-inline: auto; }
.public-card .card-body { padding: 30px; }
.public-brand { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px; text-decoration: none; font-weight: 600; }
.public-brand .brand-mark { background: #111; color: #fff; }
.hero-shell { width: min(100%, 800px); margin-inline: auto; text-align: center; }
.hero-card { width: min(100%, 680px); margin-inline: auto; }

/* Utility sizing */
.content-narrow { width: min(100%, 820px); }
.content-form { width: min(100%, 760px); }
.content-wide { width: 100%; }
.text-break-anywhere { overflow-wrap: anywhere; word-break: break-word; }

/* Mobile */
@media (max-width: 991.98px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-102%); box-shadow: var(--app-shadow-lg); }
  .sidebar.mobile-open { transform: translateX(0); }
  .sidebar-collapsed .sidebar { width: 252px; flex-basis: 252px; }
  .sidebar-collapsed .sidebar .brand-name,
  .sidebar-collapsed .sidebar .sidebar-section,
  .sidebar-collapsed .sidebar a span:not(.sidebar-icon) { display: inline; }
  .sidebar-collapsed .sidebar-brand { justify-content: flex-start; padding-inline: 10px; }
  .sidebar-collapsed .sidebar a { justify-content: flex-start; padding-inline: 11px; }
  .sidebar-toggle { display: none; }
  .mobile-menu-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--app-border); border-radius: 9px; background: #fff; }
  .app-main { padding: 22px 20px; }
  .admin-topbar { margin-bottom: 20px; }
  .sidebar-backdrop { display: none; position: fixed; inset: 0; z-index: 1025; background: rgba(0,0,0,.35); }
  .sidebar-backdrop.show { display: block; }
}

@media (max-width: 767.98px) {
  body { font-size: 13px; }
  .app-main { padding: 18px 14px 28px; }
  .page-header { align-items: flex-start; flex-direction: column; gap: 6px; margin-bottom: 18px; }
  .page-header h1, .page-header h2 { font-size: 22px; }
  .page-header p { font-size: 12px; }
  .customer-nav, .customer-nav .container { min-height: 58px; }
  .customer-nav .container { padding-inline: 14px; }
  .customer-links { display: none; }
  .user-name { display: none; }
  .user-trigger { padding-right: 3px; }
  .user-dropdown { right: -4px; }
  .customer-nav .navbar-brand { font-size: 14px; }
  .card { border-radius: 12px !important; }
  .card.p-4 { padding: 18px !important; }
  .row { --bs-gutter-x: .8rem; --bs-gutter-y: .8rem; }
  .website-domain { font-size: 15px; }
  .website-meta { gap: 10px; }
  .btn { width: auto; }
  .btn.w-100 { width: 100%; }
  .table { min-width: 680px; }
  .public-page { padding: 18px 12px; }
  .public-card .card-body { padding: 22px 18px; }
  .hero-shell { padding-top: 10px; }
  .hero-shell h1 { font-size: 29px; line-height: 1.3; }
  .hero-shell .lead { font-size: 14px; }
  .hero-shell .btn { width: 100%; margin: 4px 0 !important; }
  .payment-summary-amount { font-size: 32px; }
}

@media (max-width: 420px) {
  .app-main { padding-inline: 11px; }
  .website-head { flex-direction: column; }
  .website-head .badge { align-self: flex-start !important; }
  .website-meta { grid-template-columns: 1fr; }
  .d-flex.justify-content-between { gap: 10px; }
}
