:root {
  --sh-bg: #07141b;
  --sh-bg-soft: #0d1d26;
  --sh-panel: rgba(13, 29, 38, 0.88);
  --sh-panel-strong: #102431;
  --sh-panel-muted: #132b39;
  --sh-line: rgba(167, 196, 211, 0.18);
  --sh-line-strong: rgba(231, 192, 84, 0.28);
  --sh-text: #e9f3f7;
  --sh-text-soft: #9fb8c6;
  --sh-brand: #1aa38d;
  --sh-brand-strong: #13816f;
  --sh-gold: #e0b54d;
  --sh-danger: #ef6b6b;
  --sh-danger-bg: rgba(239, 107, 107, 0.14);
  --sh-success: #4fd099;
  --sh-success-bg: rgba(79, 208, 153, 0.14);
  --sh-warning: #f1cb62;
  --sh-warning-bg: rgba(241, 203, 98, 0.14);
  --sh-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

body.sh-admin-theme {
  margin: 0;
  color: var(--sh-text) !important;
  font-family: "Poppins", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background:
    radial-gradient(circle at top left, rgba(26, 163, 141, 0.18), transparent 34%),
    radial-gradient(circle at top right, rgba(224, 181, 77, 0.16), transparent 28%),
    linear-gradient(180deg, #061017 0%, #0b1720 46%, #081219 100%) !important;
  min-height: 100vh;
}

body.sh-admin-theme::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.02)),
    linear-gradient(120deg, rgba(255, 255, 255, 0.015) 0, rgba(255, 255, 255, 0) 40%);
  opacity: 0.9;
}

body.sh-admin-theme,
body.sh-admin-theme p,
body.sh-admin-theme li,
body.sh-admin-theme label,
body.sh-admin-theme small,
body.sh-admin-theme td,
body.sh-admin-theme th,
body.sh-admin-theme div,
body.sh-admin-theme span {
  color: inherit;
}

body.sh-admin-theme a {
  color: #7ee9d7;
}

body.sh-admin-theme a:hover {
  color: #b8f8ef;
}

body.sh-admin-theme header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(6, 16, 23, 0.84) !important;
  border-bottom: 1px solid var(--sh-line) !important;
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

body.sh-admin-theme header > div,
body.sh-admin-theme header .container {
  position: relative;
  z-index: 1;
}

body.sh-admin-theme header > div[style*="width:min"] {
  width: min(1080px, calc(100% - 40px)) !important;
}

body.sh-admin-theme .brand,
body.sh-admin-theme header div[style*="font-weight:900"] {
  color: #f4f8fa !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em;
  text-shadow: none !important;
}

body.sh-admin-theme main.container,
body.sh-admin-theme .wa-send-page,
body.sh-admin-theme .container {
  position: relative;
  width: min(1080px, calc(100% - 40px)) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

body.sh-admin-theme .card,
body.sh-admin-theme .summary-card,
body.sh-admin-theme .stat-card,
body.sh-admin-theme .table-wrap,
body.sh-admin-theme .table-box,
body.sh-admin-theme .sync-box,
body.sh-admin-theme .integration-card,
body.sh-admin-theme .integration-box,
body.sh-admin-theme .hero,
body.sh-admin-theme .machine-shell,
body.sh-admin-theme .history-card,
body.sh-admin-theme .page-card,
body.sh-admin-theme .invite-box,
body.sh-admin-theme .wa-chat-box,
body.sh-admin-theme .modal-card,
body.sh-admin-theme .admin-shell,
body.sh-admin-theme details.card,
body.sh-admin-theme .login-card,
body.sh-admin-theme .panel,
body.sh-admin-theme .box,
body.sh-admin-theme .status-card,
body.sh-admin-theme .summary-shell {
  background: linear-gradient(180deg, rgba(18, 36, 49, 0.95) 0%, rgba(11, 25, 34, 0.96) 100%) !important;
  color: var(--sh-text) !important;
  border: 1px solid var(--sh-line) !important;
  box-shadow: var(--sh-shadow) !important;
}

body.sh-admin-theme .hero,
body.sh-admin-theme .page-head,
body.sh-admin-theme .header,
body.sh-admin-theme .card-head {
  color: var(--sh-text) !important;
}

body.sh-admin-theme .muted,
body.sh-admin-theme .hint,
body.sh-admin-theme .subtext,
body.sh-admin-theme .desc,
body.sh-admin-theme .footer,
body.sh-admin-theme footer,
body.sh-admin-theme .integration-note,
body.sh-admin-theme .empty-message,
body.sh-admin-theme .table-meta,
body.sh-admin-theme .help-text {
  color: var(--sh-text-soft) !important;
}

body.sh-admin-theme h1,
body.sh-admin-theme h2,
body.sh-admin-theme h3,
body.sh-admin-theme h4,
body.sh-admin-theme .summary-value,
body.sh-admin-theme .stat-value {
  color: #f7fbfc !important;
}

body.sh-admin-theme .summary-label,
body.sh-admin-theme .stat-label,
body.sh-admin-theme .section-label,
body.sh-admin-theme .table-title,
body.sh-admin-theme .integration-box-title {
  color: #c7dbe4 !important;
}

body.sh-admin-theme .btn,
body.sh-admin-theme button,
body.sh-admin-theme input[type="submit"],
body.sh-admin-theme input[type="button"],
body.sh-admin-theme .page-link,
body.sh-admin-theme header a {
  min-height: 36px !important;
  padding: 0 12px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  border-radius: 12px !important;
  border: 1px solid transparent !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

body.sh-admin-theme .btn:hover,
body.sh-admin-theme button:hover,
body.sh-admin-theme input[type="submit"]:hover,
body.sh-admin-theme input[type="button"]:hover,
body.sh-admin-theme .page-link:hover,
body.sh-admin-theme header a:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
}

body.sh-admin-theme .btn,
body.sh-admin-theme button:not(.btn-light):not(.btn-ghost):not(.btn-outline):not(.btn-outline-secondary):not(.btn-danger):not(.btn-outline-danger):not(.btn-link),
body.sh-admin-theme input[type="submit"],
body.sh-admin-theme input[type="button"],
body.sh-admin-theme .btn-primary,
body.sh-admin-theme .btn-success,
body.sh-admin-theme .page-link.active,
body.sh-admin-theme header a[href*="logout.php"],
body.sh-admin-theme header a[href*="wa-send.php"] {
  background: linear-gradient(135deg, var(--sh-brand) 0%, var(--sh-brand-strong) 100%) !important;
  color: #f7fffd !important;
  border-color: rgba(77, 221, 197, 0.18) !important;
}

body.sh-admin-theme .btn-gold,
body.sh-admin-theme .btn-warning,
body.sh-admin-theme .btn[href*="members.php"],
body.sh-admin-theme .btn[href*="broadcast.php"],
body.sh-admin-theme .btn[href*="settings.php?section=integrations"],
body.sh-admin-theme .nav-actions .btn-gold {
  background: linear-gradient(135deg, #e0b54d 0%, #b78621 100%) !important;
  color: #111923 !important;
  border-color: rgba(224, 181, 77, 0.2) !important;
}

body.sh-admin-theme .hero-nav a:not(.is-active),
body.sh-admin-theme .panel-subnav a:not(.is-active),
body.sh-admin-theme .settings-subnav a:not(.is-active) {
  background: rgba(10, 23, 31, 0.92) !important;
  color: #dbeaf1 !important;
  border-color: rgba(150, 177, 190, 0.22) !important;
  box-shadow: none !important;
}

body.sh-admin-theme .btn-light,
body.sh-admin-theme .btn-outline,
body.sh-admin-theme .btn-outline-secondary,
body.sh-admin-theme .btn-ghost,
body.sh-admin-theme .page-link,
body.sh-admin-theme header a {
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--sh-text) !important;
  border-color: var(--sh-line) !important;
}

body.sh-admin-theme .btn-danger,
body.sh-admin-theme .btn-outline-danger,
body.sh-admin-theme .danger {
  background: var(--sh-danger-bg) !important;
  color: #ffd0d0 !important;
  border-color: rgba(239, 107, 107, 0.32) !important;
}

body.sh-admin-theme .btn-link {
  background: transparent !important;
  color: #8aeedc !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

body.sh-admin-theme input,
body.sh-admin-theme select,
body.sh-admin-theme textarea,
body.sh-admin-theme .form-control,
body.sh-admin-theme .form-select,
body.sh-admin-theme .search-form input,
body.sh-admin-theme .search-form select {
  background: rgba(5, 14, 20, 0.72) !important;
  color: var(--sh-text) !important;
  border: 1px solid rgba(156, 181, 194, 0.18) !important;
  border-radius: 12px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

body.sh-admin-theme input::placeholder,
body.sh-admin-theme textarea::placeholder {
  color: #7f9baa !important;
}

body.sh-admin-theme input:focus,
body.sh-admin-theme select:focus,
body.sh-admin-theme textarea:focus,
body.sh-admin-theme .form-control:focus,
body.sh-admin-theme .form-select:focus {
  outline: none;
  border-color: rgba(126, 233, 215, 0.62) !important;
  box-shadow: 0 0 0 4px rgba(26, 163, 141, 0.16) !important;
}

body.sh-admin-theme table,
body.sh-admin-theme .table,
body.sh-admin-theme .member-table {
  color: var(--sh-text) !important;
}

body.sh-admin-theme thead,
body.sh-admin-theme thead tr,
body.sh-admin-theme .table thead th {
  background: rgba(224, 181, 77, 0.08) !important;
}

body.sh-admin-theme th,
body.sh-admin-theme td {
  border-color: var(--sh-line) !important;
}

body.sh-admin-theme tbody tr,
body.sh-admin-theme .table tbody tr {
  background: transparent !important;
}

body.sh-admin-theme tbody tr:nth-child(even),
body.sh-admin-theme .table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.025) !important;
}

body.sh-admin-theme tbody tr:hover,
body.sh-admin-theme .table tbody tr:hover {
  background: rgba(126, 233, 215, 0.055) !important;
}

body.sh-admin-theme .alert,
body.sh-admin-theme .error-box,
body.sh-admin-theme .warning-box,
body.sh-admin-theme .flash {
  border-radius: 14px !important;
  border: 1px solid var(--sh-line) !important;
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.18) !important;
}

body.sh-admin-theme .alert.ok,
body.sh-admin-theme .ok,
body.sh-admin-theme .flash-success,
body.sh-admin-theme .success-box {
  background: var(--sh-success-bg) !important;
  color: #c6ffdf !important;
  border-color: rgba(79, 208, 153, 0.26) !important;
}

body.sh-admin-theme .alert.err,
body.sh-admin-theme .err,
body.sh-admin-theme .error-box,
body.sh-admin-theme .flash-error {
  background: var(--sh-danger-bg) !important;
  color: #ffd2d2 !important;
  border-color: rgba(239, 107, 107, 0.28) !important;
}

body.sh-admin-theme .warning-box,
body.sh-admin-theme .flash-warn {
  background: var(--sh-warning-bg) !important;
  color: #ffe7a5 !important;
  border-color: rgba(241, 203, 98, 0.26) !important;
}

body.sh-admin-theme .status-badge,
body.sh-admin-theme .pill,
body.sh-admin-theme .badge,
body.sh-admin-theme .countdown-badge {
  border: 1px solid transparent !important;
  box-shadow: none !important;
}

body.sh-admin-theme .status-active,
body.sh-admin-theme .pill.on,
body.sh-admin-theme .badge.bg-success,
body.sh-admin-theme .countdown-badge {
  background: rgba(79, 208, 153, 0.16) !important;
  color: #bff6d4 !important;
  border-color: rgba(79, 208, 153, 0.24) !important;
}

body.sh-admin-theme .status-inactive,
body.sh-admin-theme .pill.off,
body.sh-admin-theme .badge.bg-danger {
  background: rgba(239, 107, 107, 0.14) !important;
  color: #ffd2d2 !important;
  border-color: rgba(239, 107, 107, 0.22) !important;
}

body.sh-admin-theme .status-pending,
body.sh-admin-theme .status-null,
body.sh-admin-theme .badge.bg-warning,
body.sh-admin-theme .countdown-badge.due {
  background: rgba(241, 203, 98, 0.14) !important;
  color: #ffe39a !important;
  border-color: rgba(241, 203, 98, 0.22) !important;
}

body.sh-admin-theme .settings-subnav,
body.sh-admin-theme .filter-tabs,
body.sh-admin-theme .table-head,
body.sh-admin-theme .table-tools,
body.sh-admin-theme .nav-actions,
body.sh-admin-theme .actions {
  gap: 10px;
}

body.sh-admin-theme .settings-subnav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px !important;
  padding: 0 12px !important;
  text-decoration: none;
  border-radius: 10px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: 0.01em !important;
  background: rgba(10, 23, 31, 0.92) !important;
  color: #dbeaf1 !important;
  border: 1px solid rgba(150, 177, 190, 0.22) !important;
  box-shadow: none !important;
}

body.sh-admin-theme details.card > summary,
body.sh-admin-theme summary {
  color: var(--sh-text) !important;
}

body.sh-admin-theme .card summary {
  min-height: 34px !important;
  padding: 0 12px !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: var(--sh-line) !important;
  box-shadow: none !important;
}

body.sh-admin-theme .card summary::before {
  display: none !important;
}

body.sh-admin-theme .card summary h2 {
  color: inherit !important;
  font-size: 12px !important;
}

body.sh-admin-theme .card[open] summary,
body.sh-admin-theme .settings-subnav a.is-active {
  background: linear-gradient(135deg, #475569 0%, #1f2937 100%) !important;
  color: #f8fafc !important;
  border-color: rgba(148, 163, 184, 0.34) !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.32) !important;
}

body.sh-admin-theme .hero-nav a.is-active,
body.sh-admin-theme .panel-subnav a.is-active {
  background: linear-gradient(135deg, #475569 0%, #1f2937 100%) !important;
  color: #f8fafc !important;
  border-color: rgba(148, 163, 184, 0.34) !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.32) !important;
}

body.sh-admin-theme .settings-subnav a:hover {
  background: rgba(16, 37, 49, 0.96) !important;
  color: #ffffff !important;
  border-color: rgba(126, 233, 215, 0.34) !important;
}

body.sh-admin-theme .settings-subnav a.is-active:hover {
  background: linear-gradient(135deg, #475569 0%, #1f2937 100%) !important;
  color: #f8fafc !important;
}

body.sh-admin-theme .hero-nav a.is-active:hover,
body.sh-admin-theme .panel-subnav a.is-active:hover {
  background: linear-gradient(135deg, #475569 0%, #1f2937 100%) !important;
  color: #f8fafc !important;
}

body.sh-admin-theme .settings-hero,
body.sh-admin-theme .settings-sections,
body.sh-admin-theme .card-body,
body.sh-admin-theme .integration-note,
body.sh-admin-theme .integration-card,
body.sh-admin-theme .integration-box,
body.sh-admin-theme .sync-box,
body.sh-admin-theme .invite-box,
body.sh-admin-theme .invite-meta,
body.sh-admin-theme .invite-foot,
body.sh-admin-theme .invite-log {
  background: linear-gradient(180deg, rgba(12, 26, 35, 0.96) 0%, rgba(8, 18, 26, 0.98) 100%) !important;
  color: var(--sh-text) !important;
  border-color: var(--sh-line) !important;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.26) !important;
}

body.sh-admin-theme .settings-sections {
  padding: 12px !important;
}

body.sh-admin-theme .card-body {
  padding: 18px !important;
}

body.sh-admin-theme .settings-title,
body.sh-admin-theme .integration-box strong,
body.sh-admin-theme .integration-box h3,
body.sh-admin-theme .integration-card strong {
  color: #f5fbfd !important;
}

body.sh-admin-theme .integration-card .meta,
body.sh-admin-theme .log-meta,
body.sh-admin-theme .invite-phone,
body.sh-admin-theme .invite-result {
  color: var(--sh-text-soft) !important;
}

body.sh-admin-theme code {
  background: rgba(5, 14, 20, 0.84) !important;
  color: #b8dff3 !important;
  border-color: rgba(156, 181, 194, 0.18) !important;
}

body.sh-admin-theme .data-table th,
body.sh-admin-theme tr[style*="#fff8df"] {
  background: rgba(224, 181, 77, 0.1) !important;
  color: #f3d27b !important;
}

body.sh-admin-theme .card-body div[style*="background:#fff"],
body.sh-admin-theme .card-body div[style*="background: #fff"] {
  background: rgba(12, 26, 35, 0.96) !important;
  color: var(--sh-text) !important;
  border-color: var(--sh-line) !important;
}

body.sh-admin-theme .footer a,
body.sh-admin-theme footer a {
  color: #8beedc !important;
}

body.sh-admin-theme .admin-icon {
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.26));
}

body.sh-admin-theme .card,
body.sh-admin-theme .summary-card,
body.sh-admin-theme .stat-card {
  border-radius: 20px !important;
}

body.sh-admin-theme .table-wrap,
body.sh-admin-theme .table-box,
body.sh-admin-theme .wa-chat-box,
body.sh-admin-theme .invite-box {
  border-radius: 22px !important;
}

body.sh-admin-theme .header,
body.sh-admin-theme .page-head,
body.sh-admin-theme .hero {
  margin-bottom: 22px;
}

body.sh-admin-theme .table-wrap,
body.sh-admin-theme .table-box,
body.sh-admin-theme .card,
body.sh-admin-theme .hero {
  overflow: hidden;
}

body.sh-admin-theme .table-responsive {
  border-radius: 18px;
}

body.sh-admin-theme hr,
body.sh-admin-theme .divider {
  border-color: var(--sh-line) !important;
}

@media (max-width: 760px) {
  body.sh-admin-theme header > div[style*="width:min"] {
    width: min(100%, calc(100% - 20px)) !important;
  }

  body.sh-admin-theme main.container,
  body.sh-admin-theme .wa-send-page,
  body.sh-admin-theme .container {
    width: min(100%, calc(100% - 20px)) !important;
  }
}
