/* ===== CSS Variables ===== */
:root {
  --red-50: #fef2f2;
  --red-100: #fee2e2;
  --red-200: #fecaca;
  --red-300: #fca5a5;
  --red-400: #f87171;
  --red-500: #ef4444;
  --red-600: #dc2626;
  --red-700: #b91c1c;
  --red-800: #991b1b;
  --red-900: #7f1d1d;

  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 40px -10px rgba(220, 38, 38, 0.15), 0 10px 20px -8px rgba(0, 0, 0, 0.06);
  --shadow-red: 0 8px 30px rgba(220, 38, 38, 0.25);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: linear-gradient(135deg, var(--red-50) 0%, var(--white) 40%, var(--red-50) 100%);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.bg-pattern {
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(220, 38, 38, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(220, 38, 38, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.8) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.container {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

/* ===== Glass Card ===== */
.glass-card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

/* ===== Header ===== */
.page-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(220, 38, 38, 0.08);
  color: var(--red-700);
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
  border: 1px solid rgba(220, 38, 38, 0.15);
}

.header-badge i {
  font-size: 0.9rem;
}

.page-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, var(--gray-900) 0%, var(--red-700) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--gray-500);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ===== Plan Cards ===== */
.plans-section {
  margin-bottom: 2.5rem;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.plan-card {
  position: relative;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 2px solid rgba(220, 38, 38, 0.1);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
  outline: none;
}

.plan-card:hover {
  transform: translateY(-4px);
  border-color: rgba(220, 38, 38, 0.3);
  box-shadow: var(--shadow-lg);
}

.plan-card:focus-visible {
  outline: 2px solid var(--red-500);
  outline-offset: 2px;
}

.plan-card.selected {
  border-color: var(--red-600);
  box-shadow: var(--shadow-xl), var(--shadow-red);
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-4px);
}

.plan-card.selected::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 28px;
  height: 28px;
  background: var(--red-600);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.plan-popular {
  border-color: rgba(220, 38, 38, 0.25);
}

.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--red-600), var(--red-700));
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.85rem;
  border-radius: 100px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: var(--shadow-red);
}

.plan-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--red-100), var(--red-50));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--red-600);
  font-size: 1.25rem;
}

.plan-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 1rem;
}

.plan-features {
  list-style: none;
}

.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--gray-600);
  padding: 0.3rem 0;
}

.plan-features li i {
  color: var(--red-500);
  font-size: 0.7rem;
  margin-top: 0.35rem;
  flex-shrink: 0;
}

/* ===== Form ===== */
.enquiry-form {
  padding: 2rem 2.25rem;
}

.form-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(220, 38, 38, 0.08);
}

.form-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 1.25rem;
}

.section-title i {
  color: var(--red-600);
  font-size: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.form-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.form-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700);
}

.required {
  color: var(--red-600);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 0.9rem;
  color: var(--gray-400);
  font-size: 0.85rem;
  pointer-events: none;
  transition: var(--transition);
  z-index: 1;
}

.input-wrapper input,
.input-wrapper select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 0.9rem 0.75rem 2.5rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: 0.9rem;
  color: var(--gray-800);
  background: rgba(255, 255, 255, 0.9);
  transition: var(--transition);
}

.form-group textarea {
  padding: 0.85rem 1rem;
  resize: vertical;
  min-height: 80px;
}

.input-wrapper input:focus,
.input-wrapper select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--red-400);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
  background: var(--white);
}

.input-wrapper input:focus + .input-icon,
.input-wrapper:focus-within .input-icon,
.select-wrapper:focus-within .input-icon {
  color: var(--red-500);
}

.input-wrapper input.error,
.input-wrapper select.error {
  border-color: var(--red-500);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.select-wrapper select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.5rem;
}

.error-message {
  font-size: 0.75rem;
  color: var(--red-600);
  margin-top: 0.15rem;
}

.conditional-field {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.25s ease;
}

.conditional-field.active {
  max-height: 200px;
  opacity: 1;
  overflow: visible;
}

.mt-16 {
  margin-top: 1rem;
}

/* ===== Feature Cards ===== */
.feature-card {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(220, 38, 38, 0.08);
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: var(--transition);
}

.feature-card:hover {
  border-color: rgba(220, 38, 38, 0.15);
  box-shadow: var(--shadow-sm);
}

.feature-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: rgba(254, 242, 242, 0.5);
  border-bottom: 1px solid rgba(220, 38, 38, 0.06);
}

.feature-header h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-800);
}

.feature-header h3 i {
  color: var(--red-500);
  font-size: 0.9rem;
}

.feature-body {
  padding: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
}

.feature-body.active {
  max-height: 600px;
  opacity: 1;
  padding: 1.25rem;
  overflow: visible;
}

/* ===== Toggle Switch ===== */
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  user-select: none;
}

.toggle input {
  display: none;
}

.toggle-slider {
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--gray-300);
  border-radius: 100px;
  transition: var(--transition);
  flex-shrink: 0;
}

.toggle-slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: var(--white);
  border-radius: 50%;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.toggle input:checked + .toggle-slider {
  background: var(--red-600);
}

.toggle input:checked + .toggle-slider::after {
  transform: translateX(20px);
}

.toggle-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-600);
  white-space: nowrap;
}

.toggle input:checked ~ .toggle-label {
  color: var(--red-700);
}

.toggle-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ===== Checkboxes & Radios ===== */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.6rem;
}

.checkbox-item,
.radio-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  background: rgba(255, 255, 255, 0.8);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.85rem;
  color: var(--gray-700);
}

.checkbox-item:hover,
.radio-item:hover {
  border-color: var(--red-300);
  background: var(--red-50);
}

.checkbox-item input,
.radio-item input {
  accent-color: var(--red-600);
  width: 16px;
  height: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-item:has(input:checked),
.radio-item:has(input:checked) {
  border-color: var(--red-400);
  background: var(--red-50);
  color: var(--red-800);
  font-weight: 500;
}

.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ===== Submit Button ===== */
.submit-section {
  margin-top: 2rem;
  text-align: center;
}

.submit-error {
  color: var(--red-600);
  background: var(--red-50);
  border: 1px solid var(--red-200);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  max-width: 400px;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--red-600), var(--red-700));
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-red);
  letter-spacing: 0.01em;
}

.btn-submit:hover {
  background: linear-gradient(135deg, var(--red-700), var(--red-800));
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(220, 38, 38, 0.35);
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  padding: 1rem;
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal {
  max-width: 440px;
  width: 100%;
  padding: 2.5rem 2rem;
  text-align: center;
  transform: scale(0.9) translateY(20px);
  transition: var(--transition);
}

.modal-overlay.show .modal {
  transform: scale(1) translateY(0);
}

.modal-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--red-100), var(--red-50));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 2rem;
  color: var(--red-600);
}

.modal h2 {
  font-size: 1.4rem;
  color: var(--gray-900);
  margin-bottom: 0.75rem;
}

.modal p {
  color: var(--gray-500);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.btn-modal-close {
  max-width: 200px;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .plans-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto;
  }

  .form-grid,
  .form-grid-3,
  .form-grid-2 {
    grid-template-columns: 1fr;
  }

  .enquiry-form {
    padding: 1.5rem 1.25rem;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 1.25rem 1rem 3rem;
  }

  .feature-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .toggle-group {
    flex-direction: column;
    width: 100%;
  }

  .checkbox-grid {
    grid-template-columns: 1fr;
  }

  .radio-group {
    flex-direction: column;
  }

  .radio-item {
    width: 100%;
  }
}

@media (min-width: 601px) and (max-width: 900px) {
  .plans-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: none;
  }

  .plan-card {
    padding: 1.25rem 1rem;
  }

  .plan-features li {
    font-size: 0.78rem;
  }
}

/* ===== Sales Portal ===== */
.container-narrow {
  max-width: 640px;
}

.sales-card {
  padding: 2rem;
}

.sales-card .btn-submit {
  width: 100%;
  max-width: none;
  margin-top: 0.5rem;
}

.link-result {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(220, 38, 38, 0.1);
}

.link-result-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.link-result-header i {
  color: var(--red-600);
  font-size: 1.25rem;
}

.link-result-header h2 {
  font-size: 1.15rem;
  color: var(--gray-900);
}

.link-result p {
  color: var(--gray-500);
  font-size: 0.92rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.link-box {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.link-box input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: 0.85rem;
  background: var(--white);
  color: var(--gray-700);
}

.btn-copy {
  width: 48px;
  border: 1.5px solid var(--red-300);
  background: var(--red-50);
  color: var(--red-700);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}

.btn-copy:hover {
  background: var(--red-100);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-700);
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover {
  border-color: var(--red-300);
  color: var(--red-700);
  background: var(--red-50);
}

.invalid-card {
  text-align: center;
  padding: 3rem 2rem;
}

.invalid-card h1 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--gray-900);
}

.invalid-card p {
  color: var(--gray-500);
}

/* ===== Admin Panel ===== */
.container-wide {
  max-width: 1200px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  text-align: left;
}

.admin-header .subtitle {
  margin: 0.35rem 0 0;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-card {
  padding: 1.5rem;
}

.admin-search {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  align-items: center;
}

.admin-search .input-wrapper {
  flex: 1;
  min-width: 220px;
}

.btn-sm {
  width: auto !important;
  max-width: none !important;
  padding: 0.7rem 1rem !important;
  font-size: 0.85rem !important;
  white-space: nowrap;
}

.table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.admin-table th,
.admin-table td {
  padding: 0.85rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid rgba(220, 38, 38, 0.08);
  vertical-align: top;
}

.admin-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-500);
  font-weight: 700;
  background: rgba(254, 242, 242, 0.5);
}

.admin-table tbody tr:hover {
  background: rgba(254, 242, 242, 0.35);
}

.btn-view {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--red-700);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.btn-view:hover {
  color: var(--red-800);
}

.muted {
  color: var(--gray-500);
  font-size: 0.8rem;
  font-weight: 400;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--gray-500);
}

.empty-state i {
  font-size: 2rem;
  color: var(--red-400);
  margin-bottom: 0.75rem;
}

.empty-state h2 {
  color: var(--gray-800);
  margin-bottom: 0.4rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.detail-list {
  display: grid;
  gap: 0.85rem;
}

.detail-list > div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(220, 38, 38, 0.06);
}

.detail-list span {
  font-size: 0.78rem;
  color: var(--gray-500);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.detail-list strong {
  color: var(--gray-900);
  font-weight: 600;
}

.feature-chips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.feature-chip {
  background: var(--red-50);
  border: 1px solid var(--red-100);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.9rem;
}

.feature-chip .chip-label {
  display: block;
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-bottom: 0.2rem;
}

.feature-chip strong {
  color: var(--red-800);
  font-size: 0.9rem;
}

.notes-block {
  white-space: pre-wrap;
  color: var(--gray-700);
  line-height: 1.7;
}

@media (max-width: 900px) {
  .admin-header {
    flex-direction: column;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }
}

