/* Base */
:root {
  --brand-bg: #ffffff;
  --brand-fg: var(--color-primary, #2563eb);
  --text: var(--color-text, #111827);
  --muted: #6b7280;
  --border: #e5e7eb;
  --surface: #ffffff;
  --font-size-base: 14px;
}
html, body {
  height: 100%;
}
body {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;
  font-size: var(--font-size-base);
  color: var(--text);
  background-color: var(--color-bg, #f3f4f6);
}
a { text-decoration: none; }
a { color: var(--brand-fg); }
a:hover { color: #1d4ed8; }

/* Global inputs/buttons for consistency */
input, select, textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--surface);
  color: var(--text);
}
.dark input, .dark select, .dark textarea {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  cursor: pointer;
  background: #e5e7eb;
  color: #111827;
}
.dark button { background: #374151; color: #e5e7eb; }

/* App Shell */
.app-container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Navigation */
.app-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.nav-logo {
  height: 48px;
  width: auto;
  max-width: 180px;
  border-radius: 0.25rem;
  object-fit: contain;
}

.rights-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  column-gap: 8px;
  row-gap: 6px;
}
.rights-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.875rem;
}
.nav-title {
  font-weight: 700;
  font-size: 1.125rem;
}

/* Tables */
table.clean {
  width: 100%;
  border-collapse: collapse;
}
table.clean thead th {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--muted);
  background: #f9fafb;
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1rem;
}
table.clean tbody td {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
}
table.clean tbody tr:hover {
  background: #f9fafb;
}

/* Forms */

/* Centralized action icon/link styles */
.action {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  padding: 0.25rem 0.375rem;
  border-radius: 0.375rem;
}
.action i { margin-right: 0.25rem; }
.action-blue { color: #2563eb; }
.action-blue:hover { color: #1e40af; }
.action-green { color: #16a34a; }
.action-green:hover { color: #15803d; }
.action-red { color: #dc2626; }
.action-red:hover { color: #b91c1c; }
.action-yellow { color: #ca8a04; }
.action-yellow:hover { color: #a16207; }
.action-purple { color: #7c3aed; }
.action-purple:hover { color: #5b21b6; }

/* Modals */
.modal-overlay {
  background-color: rgba(0, 0, 0, 0.5);
}
.modal-content {
  max-height: 90vh;
  overflow-y: auto;
}

/* Utilities moved from inline */
input[type="checkbox"]:checked {
  background-color: #3b82f6;
  border-color: #3b82f6;
}
.form-check {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}
.form-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  vertical-align: middle;
}
.btn-sm {
  padding: 0.375rem 0.625rem;
  font-size: 0.875rem;
}
.btn-icon {
  padding: 0.375rem 0.5rem;
}
.btn-muted {
  background: #f3f4f6;
  color: #374151;
  border-color: #e5e7eb;
}
.btn-muted:hover { background: #e5e7eb; }
.password-input-wrapper {
  position: relative;
}
.password-toggle-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #6b7280;
}

/* Metrics */
.metric-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--surface);
}
.metric-card .metric-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  color: #fff;
}
.metric-card .metric-label {
  font-size: 0.875rem;
  color: var(--muted);
}
.metric-card .metric-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}
.metric-card.is-green .metric-icon { background: #22c55e; }
.metric-card.is-gray .metric-icon { background: #6b7280; }
.metric-card.is-yellow .metric-icon { background: #eab308; }
.metric-card.is-red .metric-icon { background: #ef4444; }
.subs-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1.5rem 1rem 2rem;
  transition: opacity 0.7s ease-out;
}
.subs-theme-classic .subs-shell {
}
.subs-theme-hero .subs-shell {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}
.subs-theme-split #bg-slider {
  background-color: #020617;
}
.subs-panel {
  width: 100%;
  max-width: 380px;
  border-radius: 1.75rem;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.60);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  color: #e5e7eb;
}
.subs-shell-preview {
  min-height: 420px;
  padding: 1.25rem 0.75rem 1.5rem;
}
.subs-theme-hero .subs-panel {
  max-width: 360px;
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.32), transparent 55%), rgba(15, 23, 42, 0.78);
  border-color: rgba(56, 189, 248, 0.7);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.85);
}
.subs-theme-split .subs-panel {
  max-width: 420px;
  background: #f9fafb;
  border-color: #e5e7eb;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.55);
  color: #111827;
}
.subs-panel-inner {
  padding: 1.25rem 1.25rem 1.25rem;
}
.subs-theme-hero .subs-panel-inner {
  padding-top: 1.75rem;
  padding-bottom: 1.75rem;
}
.subs-theme-split .subs-panel-inner {
  padding: 1.75rem 1.75rem 1.5rem;
}
.subs-logo-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.subs-pill-tabs {
  display: inline-flex;
  padding: 0.25rem;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.5);
}
.subs-pill-btn {
  font-size: 0.78rem;
  padding: 0.45rem 0.95rem;
  border-radius: 9999px;
  border: none;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.2s ease;
}
.subs-pill-btn-active {
  background: linear-gradient(135deg, #f97316, #ec4899);
  color: #f9fafb;
  box-shadow: 0 8px 20px rgba(236, 72, 153, 0.35);
}
.subs-theme-hero .subs-pill-tabs {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(56, 189, 248, 0.6);
}
.subs-theme-hero .subs-pill-btn-active {
  background: linear-gradient(135deg, #0ea5e9, #22c55e);
  box-shadow: 0 10px 22px rgba(14, 165, 233, 0.5);
}
.subs-theme-split .subs-pill-tabs {
  background: #e5e7eb;
  border-color: #d1d5db;
}
.subs-theme-split .subs-pill-btn {
  color: #4b5563;
}
.subs-theme-split .subs-pill-btn-active {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #f9fafb;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.4);
}
.subs-helper-text {
  font-size: 0.78rem;
  color: #cbd5f5;
}
.subs-theme-split .subs-helper-text {
  color: #4b5563;
}
.subs-input {
  width: 100%;
  padding: 0.6rem 0.9rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.9);
  background: rgba(15, 23, 42, 0.75);
  color: #f9fafb;
  outline: none;
}
.subs-theme-split .subs-input {
  background: #ffffff;
  color: #111827;
  border-color: #d1d5db;
}
.subs-input::placeholder {
  color: #6b7280;
}
.subs-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.7);
}
.subs-theme-hero .subs-input:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.8);
}
.subs-theme-split .subs-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.7);
}
.subs-phone-grid {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 0.5rem;
  width: 100%;
}
.subs-select {
  appearance: none;
}
.subs-checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #e5e7eb;
}
.subs-checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
}
.subs-primary-btn {
  width: 100%;
  border-radius: 9999px;
  padding: 0.75rem 1rem;
  border: none;
  font-weight: 600;
  font-size: 0.9rem;
  color: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f97316, #ec4899);
  box-shadow: 0 12px 26px rgba(236, 72, 153, 0.45);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.subs-theme-hero .subs-primary-btn {
  background: linear-gradient(135deg, #0ea5e9, #22c55e);
  box-shadow: 0 14px 30px rgba(14, 165, 233, 0.55);
}
.subs-theme-split .subs-primary-btn {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.55);
}
.subs-primary-btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(236, 72, 153, 0.5);
}
.subs-primary-btn:active {
  transform: translateY(0);
  box-shadow: 0 10px 22px rgba(236, 72, 153, 0.4);
}
.subs-login-btn {
  max-width: 60%;
  margin: 0 auto;
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}
.subs-preview-device {
  border-radius: 1.75rem;
  background: #111827;
  padding: 0.75rem 0.5rem;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.65);
  width: 260px;
  margin: 0 auto;
}
.subs-preview-device-inner {
  border-radius: 1.5rem;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
.subs-preview-input {
  font-size: 0.72rem;
}
.subs-preview-checkbox {
  font-size: 0.7rem;
}
.subs-preview-button {
  font-size: 0.8rem;
}
.subs-preview-toolbar {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}
.subs-preview-toolbar button {
  border-radius: 9999px;
  border: 1px solid #d1d5db;
  padding: 0.25rem 0.5rem;
  font-size: 0.7rem;
  background: #f9fafb;
  cursor: pointer;
}
.subs-preview-toolbar button.subs-preview-active {
  background: #111827;
  color: #f9fafb;
  border-color: #111827;
}
.subs-preview-device.size-tablet {
  width: 340px;
}
.subs-preview-device.size-laptop {
  width: 420px;
}
.subs-footer {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.9);
}
.subs-theme-split .subs-footer {
  color: #6b7280;
}
