:root {
  --primary-color: #e50914;
  --primary-hover: #c11119;
  --bg-color: #f8f9fa;
  --card-bg: #ffffff;
  --text-main: #222222;
  --text-muted: #737373;
  --border-color: #8c8c8c;
  --border-focus: #0071eb;
  --error-color: #b00020;
  --plan-bg: #f4f4f4;
  --radius-sm: 4px;
  --radius-md: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.container {
  width: 100%;
  max-width: 480px;
}

.form-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 40px 32px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.step-indicator {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.header h1 {
  font-size: 26px;
  font-weight: 700;
  margin: 6px 0 10px;
  line-height: 1.25;
}

.subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

/* Alert Banner */
.alert-banner {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 20px;
}
.alert-banner.error {
  background-color: #fde8e8;
  color: var(--error-color);
  border: 1px solid #f8b4b4;
}
.alert-banner.success {
  background-color: #def7ec;
  color: #03543f;
  border: 1px solid #84e1bc;
}
.hidden {
  display: none !important;
}

/* Form Styles */
.form-group {
  margin-bottom: 16px;
  position: relative;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.input-wrapper {
  position: relative;
}

.input-wrapper input {
  width: 100%;
  height: 56px;
  padding: 20px 40px 6px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 15px;
  outline: none;
  background: #ffffff;
  color: var(--text-main);
  transition: border-color 0.2s ease;
}

.input-wrapper input:focus {
  border-color: var(--border-focus);
  border-width: 2px;
  padding-left: 13px;
}

/* Floating Label Behavior */
.input-wrapper label {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  color: var(--text-muted);
  pointer-events: none;
  transition: all 0.2s ease;
}

.input-wrapper input:focus + label,
.input-wrapper input:not(:placeholder-shown) + label,
.input-wrapper.has-value label {
  top: 14px;
  transform: translateY(0);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.input-wrapper .icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

.card-brand {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, #f8f8f8, #e9eaeb);
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #374151;
  text-transform: uppercase;
}

.card-brand.visa { background: #1a73e8; color: #fff; border-color: #1a73e8; }
.card-brand.mastercard { background: #e53935; color: #fff; border-color: #e53935; }
.card-brand.amex { background: #0e7c86; color: #fff; border-color: #0e7c86; }
.card-brand.discover { background: #f59e0b; color: #fff; border-color: #f59e0b; }
.card-brand.card { background: #f3f4f6; color: #4b5563; }

.error-msg {
  display: none;
  font-size: 12px;
  color: var(--error-color);
  margin-top: 4px;
  padding-left: 2px;
}

.has-error .input-wrapper input {
  border-color: var(--error-color) !important;
}

.has-error .error-msg {
  display: block;
}

/* Plan Summary Card */
.plan-card {
  background-color: var(--plan-bg);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 24px 0 16px;
}

.plan-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.plan-name {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.btn-change-plan {
  background: none;
  border: none;
  color: #0071eb;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.btn-change-plan:hover {
  text-decoration: underline;
}

.disclaimer-text {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

/* Checkbox */
.checkbox-group {
  margin-bottom: 24px;
}

.custom-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.custom-checkbox input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  height: 20px;
  width: 20px;
  min-width: 20px;
  background-color: #fff;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-checkbox input:checked ~ .checkmark {
  background-color: #0071eb;
  border-color: #0071eb;
}

.checkmark::after {
  content: "";
  display: none;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.custom-checkbox input:checked ~ .checkmark::after {
  display: block;
}

.checkbox-text {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.checkbox-text a {
  color: #0071eb;
  text-decoration: none;
}
.checkbox-text a:hover {
  text-decoration: underline;
}

/* Submit Button */
.btn-primary {
  width: 100%;
  height: 56px;
  background-color: var(--primary-color);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-primary:disabled {
  background-color: #e56c70;
  cursor: not-allowed;
}

/* Spinner */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.success-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.blocked-page {
  width: min(92vw, 520px);
  background: rgba(17, 17, 17, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 38px 28px;
  text-align: center;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

.blocked-page .badge {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  background: #d32f2f;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.blocked-page h1 {
  color: #fff;
  font-size: 2.2rem;
  margin: 18px 0 12px;
}

.blocked-page p {
  color: #f3d7d7;
  font-size: 1rem;
  line-height: 1.6;
}

.success-modal {
  background: #fff;
  border-radius: 20px;
  padding: 32px 28px;
  width: min(90vw, 360px);
  text-align: center;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
}

.success-icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: #e8f7ee;
  color: #0f9d58;
  font-size: 42px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}

.success-message {
  font-size: 32px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 8px;
}

.success-modal p {
  color: #4b5563;
  font-size: 14px;
}

@media (max-width: 480px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  .form-card {
    padding: 24px 18px;
  }
}

/* ==========================================================================
   Admin Dashboard Styles
   ========================================================================== */
body.admin-body {
  display: block;
  padding: 0;
  background-color: #f4f6f9;
}

.admin-login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.admin-login-card {
  width: 100%;
  max-width: 420px;
}

.admin-dashboard-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

/* Navbar */
.admin-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  padding: 16px 24px;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin-bottom: 24px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar-brand h2 {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
}

.badge {
  background-color: #def7ec;
  color: #03543f;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.navbar-actions {
  display: flex;
  gap: 12px;
}

.btn-secondary {
  background-color: #ffffff;
  color: #374151;
  border: 1px solid #d1d5db;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background-color: #f9fafb;
  border-color: #fca5a5;
}

/* Pagination Controls */
.pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
  padding-bottom: 20px;
}
.pagination-controls.hidden {
  display: none !important;
}
.pagination-controls #page-info {
  font-size: 14px;
  font-weight: 500;
  color: #c9d1d9;
}

.btn-outline {
  background-color: transparent;
  color: var(--error-color);
  border: 1px solid var(--error-color);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-outline:hover {
  background-color: #fde8e8;
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  background: #ffffff;
  padding: 20px 24px;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border-left: 4px solid var(--border-focus);
}

.metric-title {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.metric-value {
  font-size: 28px;
  font-weight: 700;
  color: #111827;
}

/* Controls & Search */
.table-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 280px;
}

.search-box svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
}

.search-box input {
  width: 100%;
  height: 44px;
  padding-left: 42px;
  padding-right: 14px;
  border: 1px solid #d1d5db;
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  background: #ffffff;
}

.search-box input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(0, 113, 235, 0.1);
}

/* Data Table */
.table-wrapper {
  background: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.data-table th {
  background-color: #f9fafb;
  color: #4b5563;
  font-weight: 600;
  padding: 14px 16px;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #e5e7eb;
  color: #1f2937;
}

.data-table tbody tr:hover {
  background-color: #f9fafb;
}

.col-id {
  font-family: monospace;
  font-weight: 600;
  color: #4b5563;
  font-size: 13px;
}

.col-name {
  font-weight: 600;
  color: #111827;
}

.col-time {
  font-size: 13px;
  color: #6b7280;
  white-space: nowrap;
}

.badge-code {
  background: #f3f4f6;
  color: #374151;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 13px;
}

.btn-delete {
  background: #fee2e2;
  color: #dc2626;
  border: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-delete:hover {
  background: #fca5a5;
  color: #991b1b;
}

.empty-state {
  padding: 40px;
  text-align: center;
  color: #6b7280;
  font-size: 15px;
}

