/* ==========================
   Root Variables – Ultra-Luxury Diamond House (Dark Theme)
========================== */
:root {
  --bg: #0f0d0b;
  --panel: #161412;
  --panel-2: #1d1a17;
  --text: #f5f0e8;
  --muted: #a89f8f;
  --line: #2e2a26;

  --brand: #cbbf9c;
  --brand-strong: #d6c9a8;
  --brand-2: #8b7b5c;

  --danger: #c98a7a;
  --success: #8a9b7e;

  --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-soft: 0 8px 18px rgba(203, 191, 156, 0.15);

  --radius-lg: 28px;
  --radius: 18px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --radius-pill: 999px;

  --gap: 16px;
  --gap-sm: 10px;

  --transition: all 0.2s ease;
}

/* ==========================
   Base Styles
========================== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top, #1c1814 0%, var(--bg) 55%, #0a0806 100%);
}

.page-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 18px 48px;
}

/* ==========================
   Hero Section
========================== */
.hero {
  display: flex;
  align-items: center;
  gap: 24px;
  background: linear-gradient(135deg, #0a0806 0%, var(--brand) 55%, var(--brand-2) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
}

.hero p {
  margin: 0;
  max-width: 900px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
  }
  .hero .dbn-logo img {
    margin: 0 auto 8px auto;
    width: 160px;
    height: auto;
  }
}

/* ==========================
   Sections
========================== */
.section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 18px;
  backdrop-filter: blur(8px);
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--gap-sm);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.section-header h2 {
  margin: 0;
  font-size: 1.2rem;
}

.section-header .hint {
  margin: 0;
  font-size: 0.94rem;
  color: var(--muted);
}

.form-instructions {
  background: linear-gradient(180deg, #1f1b17 0%, var(--panel) 100%);
  border: 1px solid #3a322a;
}

/* ==========================
   Grid System
========================== */
[class^="grid-"] {
  display: grid;
  gap: var(--gap);
}

.grid-1 { grid-template-columns: repeat(1, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.instructions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

/* ==========================
   Cards
========================== */
.instruction-card,
.check-card,
.preview-box {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
}

.instruction-card {
  padding: 14px 16px;
}

.instruction-card strong {
  display: block;
  margin-bottom: 6px;
}

.instruction-card span {
  font-size: 0.94rem;
  color: var(--muted);
  line-height: 1.45;
}

.subtle-box {
  background: var(--panel-2);
  border: 1px dashed #4a4138;
  border-radius: var(--radius-md);
  padding: 14px;
}

/* ==========================
   Forms
========================== */
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}

label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--muted);
}

.req {
  color: var(--danger);
  margin-left: 4px;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #2a2622;
  font: inherit;
  color: var(--text);
  transition: var(--transition);
}

textarea {
  min-height: 110px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(203, 191, 156, 0.65);
  box-shadow: 0 0 0 4px rgba(203, 191, 156, 0.12);
}

:disabled {
  background: var(--panel-2);
  color: #6b6256;
  cursor: not-allowed;
}

/* ==========================
   Toggles
========================== */
.toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-sm);
}

.toggle-btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--panel);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  color: var(--text);
}

.toggle-btn:hover {
  transform: translateY(-1px);
}

.toggle-btn.active {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-strong) 100%);
  color: #0a0806;
  border-color: transparent;
  box-shadow: var(--shadow-soft);
}

/* ==========================
   Buttons
========================== */
.btn {
  padding: 13px 18px;
  border-radius: var(--radius-md);
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-strong) 100%);
  color: #0a0806;
  box-shadow: var(--shadow-soft);
}

.btn-secondary {
  background: #2e2a26;
  color: #f5f0e8;
}

.add-member-btn {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.add-member-btn span {
  font-size: 1.2rem;
  line-height: 1;
  font-weight: 600;
}

.add-member-btn.btn-secondary {
  background: transparent;
  border: 1.5px dashed var(--muted);
  color: var(--text);
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
}

.add-member-btn.btn-secondary:hover {
  background: rgba(203, 191, 156, 0.1);
  border-color: var(--brand);
  color: var(--brand);
}

/* ==========================
   Preview Boxes
========================== */
.preview-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.preview-box {
  width: 210px;
  height: 210px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel-2);
}

.preview-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.preview-box.clickable,
.preview-box.signature {
  cursor: pointer;
  transition: var(--transition);
}

.preview-box.clickable:hover,
.preview-box.signature:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  box-shadow: 0 6px 18px rgba(203, 191, 156, 0.25);
}

.placeholder-text {
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
}

.preview-box.signature {
  width: 240px;
  height: 100px;
  border-radius: 10px;
}

/* ==========================
   Checkbox Grid (Section 7 + roles)
========================== */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 4px;
}

#coreInterestsField,
#serviceRequirementsField {
  gap: 12px;
}

@media screen and (max-width: 640px) {
  .checkbox-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.check-card {
  padding: 7px;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
}

.check-card input {
  position: absolute;
  opacity: 0;
}

.check-card div {
  font-size: 0.79rem;
  width: 100%;
}

.check-card:hover {
  border-color: rgba(203, 191, 156, 0.35);
  background: rgba(203, 191, 156, 0.04);
}

.check-card:active {
  transform: scale(0.97);
}

.check-card:has(input:checked),
.check-card.selected {
  background: #3a352e;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(203, 191, 156, 0.08);
}

/* ==========================
   Client Support Grid
========================== */
.client-support-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px 12px;
  font-size: 0.85rem;
  align-items: start;
}

.client-support-grid label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  white-space: nowrap;
  color: var(--text);
}

.client-support-grid label input[type="checkbox"] {
  margin: 0;
  width: auto;
  flex-shrink: 0;
}

/* ==========================
   Tables (Generic)
========================== */
.client-org-member-table-wrapper,
.beneficiary-individuals-table-wrapper,
.beneficiary-groups-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  background: var(--panel-2);
  border: 1px solid var(--line);
  margin: 20px 0;
}

.client-org-member-table,
.beneficiary-individuals-table,
.beneficiary-groups-table,
.summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.client-org-member-table thead tr,
.beneficiary-individuals-table thead tr,
.beneficiary-groups-table thead tr,
.summary-table thead tr {
  background: #1a1714;
  border-bottom: 2px solid var(--brand);
}

.client-org-member-table th,
.beneficiary-individuals-table th,
.beneficiary-groups-table th,
.summary-table th {
  padding: 16px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--brand);
  background: #1a1714;
  border: none;
}

.client-org-member-table td,
.beneficiary-individuals-table td,
.beneficiary-groups-table td,
.summary-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  vertical-align: middle;
}

.client-org-member-table tbody tr:nth-child(even),
.beneficiary-individuals-table tbody tr:nth-child(even),
.beneficiary-groups-table tbody tr:nth-child(even),
.summary-table tbody tr:nth-child(even) {
  background: rgba(29, 26, 23, 0.4);
}

.client-org-member-table tbody tr:hover,
.beneficiary-individuals-table tbody tr:hover,
.beneficiary-groups-table tbody tr:hover,
.summary-table tbody tr:hover {
  background: rgba(203, 191, 156, 0.06);
}

.remove-row-btn {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 1.3rem;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  opacity: 0.6;
  font-weight: 300;
}

.remove-row-btn:hover {
  background: rgba(201, 138, 122, 0.15);
  opacity: 1;
  transform: scale(1.05);
}

.client-org-member-table input,
.client-org-member-table select,
.beneficiary-individuals-table input,
.beneficiary-individuals-table select,
.beneficiary-groups-table input,
.beneficiary-groups-table select,
.summary-table input,
.summary-table select {
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #2a2622;
  color: var(--text);
  font-size: 0.85rem;
  transition: var(--transition);
}

.client-org-member-table input:focus,
.client-org-member-table select:focus,
.beneficiary-individuals-table input:focus,
.beneficiary-individuals-table select:focus,
.beneficiary-groups-table input:focus,
.beneficiary-groups-table select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(203, 191, 156, 0.2);
  outline: none;
}

.client-org-member-table input[readonly],
.beneficiary-individuals-table input[readonly],
.beneficiary-groups-table input[readonly] {
  background: #201d1a;
  color: var(--muted);
  cursor: default;
  border-color: transparent;
}

.no-data {
  text-align: center;
  color: var(--muted);
  font-style: italic;
  padding: 20px;
}

/* ==========================
   Key Personnel / Executive Cards
========================== */
.key-personnel-card,
.executive-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: var(--transition);
}

/* ==========================
   Utilities
========================== */
.hidden { display: none !important; }

.inline-note {
  font-size: 0.92rem;
  color: var(--muted);
}

/* ==========================
   Alerts / Messages
========================== */
.error-summary {
  display: none;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  background: #2a1f1c;
  border: 1px solid #7a4c40;
  color: #e6cfc5;
}

.error-summary.show { display: block; }

.mini-banner {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
}

/* ==========================
   Footer / Misc
========================== */
.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.footer-note {
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 18px;
}

.signature-line {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
}

.auto-date {
  background: var(--panel-2);
  font-weight: 600;
  color: var(--text);
}

.json-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  background: var(--panel-2);
  color: var(--brand);
  border: 1px solid var(--line);
}

/* ==========================
   Representative Blocks (Individual & Corporate)
========================== */
/* Individual block – warmer brown */
.rep-block {
  border: 1px solid #5c4a36;
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
  background: #3b2e22;
}

.rep-header {
  background: #3b2e22;
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  border-bottom: 1px solid #5c4a36;
  font-weight: 600;
  color: var(--text);
  transition: background 0.15s;
}

.rep-header:hover { background: #4d3c2e; }
.rep-header.active {
  background: #2c2219;
  border-left: 4px solid var(--brand);
}

.rep-summary {
  margin-left: 12px;
  flex: 1;
  font-style: italic;
  color: var(--muted);
  font-weight: 400;
  font-size: 0.9rem;
}

.rep-chevron {
  margin-right: 12px;
  transition: transform 0.2s;
  display: inline-block;
  font-size: 0.75rem;
  color: var(--muted);
}

.rep-body {
  padding: 16px;
  background: #2c2219;
  display: block;
  color: var(--text);
}

.rep-body .field label { color: var(--text); }
.rep-body input,
.rep-body select,
.rep-body textarea {
  background: #3b2e22;
  color: var(--text);
  border: 1px solid #5c4a36;
}

/* Corporate block – cooler slate brown */
.corp-block {
  border: 1px solid #4a4a3c;
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
  background: #2f3129;
}

.corp-header {
  background: #2f3129;
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  border-bottom: 1px solid #4a4a3c;
  font-weight: 600;
  color: #e8e4d8;
  transition: background 0.15s;
}

.corp-header:hover { background: #3b3d32; }
.corp-header.active {
  background: #20221b;
  border-left: 4px solid var(--brand-2);
}

.corp-summary {
  margin-left: 12px;
  flex: 1;
  font-style: italic;
  color: #b8a05e;
  font-weight: 400;
  font-size: 0.9rem;
}

.corp-chevron {
  margin-right: 12px;
  transition: transform 0.2s;
  display: inline-block;
  font-size: 0.75rem;
  color: #b8a05e;
}

.corp-body {
  padding: 16px;
  background: #20221b;
  display: block;
  color: #d8d4c8;
}

.corp-body .field label { color: #d8d4c8; }
.corp-body input,
.corp-body select,
.corp-body textarea {
  background: #2f3129;
  color: #e8e4d8;
  border: 1px solid #4a4a3c;
}

/* Role buttons inside representative blocks */
.role-btn {
  background: #334155;
  border: 1px solid #475569;
  color: #cbd5e1;
  padding: 6px 12px;
  margin: 2px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s;
}

.role-btn.selected {
  background: var(--brand);
  color: #0a0806;
  border-color: var(--brand);
}

.role-btn.hidden-role { display: none; }

/* Add buttons row in management section */
.add-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

/* Service input group (dynamic service details) */
.service-input-group {
  margin-bottom: 16px;
}

.service-input-group label {
  color: var(--text);
  font-weight: 600;
}

.service-input-group textarea {
  background: #2a2622;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  min-height: 80px;
  resize: vertical;
}

.service-input-group textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(203, 191, 156, 0.12);
}

/* ==========================
   Slider Styles
========================== */
.custom-slider-field {
  margin-bottom: 28px;
}

.slider-inline-container {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 12px 0;
}

.slider-min-label,
.slider-current-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brand);
  background: var(--panel-2);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  min-width: 60px;
  text-align: center;
  white-space: nowrap;
}

.slider-current-value {
  background: rgba(203, 191, 156, 0.2);
  box-shadow: 0 0 6px rgba(226, 214, 181, 0.4);
}

.custom-slider {
  position: relative;
  flex: 1;
  height: 44px;
  cursor: pointer;
  touch-action: none;
}

.slider-track {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 100%;
  height: 6px;
  background: var(--line);
  border-radius: 6px;
  pointer-events: none;
}

.slider-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-strong) 100%);
  border-radius: 6px;
  pointer-events: none;
  transition: width 0.05s linear;
}

.slider-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  background: var(--brand);
  border-radius: 50%;
  cursor: grab;
  box-shadow: 0 0 12px rgba(203, 191, 156, 0.6);
  transition: transform 0.1s ease, background 0.2s, box-shadow 0.2s;
  z-index: 2;
}

.slider-thumb:hover {
  transform: translate(-50%, -50%) scale(1.15);
  background: var(--brand-strong);
  box-shadow: 0 0 18px rgba(214, 201, 168, 0.8);
}

.slider-thumb:active {
  cursor: grabbing;
  transform: translate(-50%, -50%) scale(1.05);
}

@media screen and (max-width: 640px) {
  .slider-inline-container {
    flex-wrap: wrap;
    gap: 12px;
  }

  .slider-min-label,
  .slider-current-value {
    min-width: unset;
    flex: 0 0 auto;
  }

  .custom-slider {
    order: 1;
    width: 100%;
    height: 52px;
  }

  .slider-track {
    height: 8px;
  }

  .slider-thumb {
    width: 32px;
    height: 32px;
  }
}

/* ==========================
   Banking Section
========================== */
.bank-block {
  border: 1px solid #5c4a36;
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
  background: #3b2e22;
}

.bank-header {
  background: #3b2e22;
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  border-bottom: 1px solid #5c4a36;
  font-weight: 600;
  color: #f5ede0;
  transition: background 0.15s;
}

.bank-header:hover { background: #4d3c2e; }
.bank-header.active {
  background: #2c2219;
  border-left: 4px solid var(--brand);
}

.bank-summary {
  margin-left: 12px;
  flex: 1;
  font-style: italic;
  color: #c1a781;
  font-weight: 400;
  font-size: 0.9rem;
}

.bank-chevron {
  margin-right: 12px;
  transition: transform 0.2s;
  display: inline-block;
  font-size: 0.75rem;
  color: #c1a781;
}

.bank-body {
  padding: 16px;
  background: #2c2219;
  display: block;
  color: #e8ddd0;
}

.bank-body .field label { color: #e8ddd0; }
.bank-body input,
.bank-body select {
  background: #3b2e22;
  color: #f5ede0;
  border: 1px solid #5c4a36;
}

/* ==========================
   Tax / AML Toggles
========================== */
.tax-registered-toggle .toggle-btn.active,
.tax-exemption-toggle .toggle-btn.active,
.aml-kyc-toggle .toggle-btn.active,
.aml-officer-toggle .toggle-btn.active,
.aml-review-toggle .toggle-btn.active,
.aml-suspicious-toggle .toggle-btn.active,
.aml-govunit-toggle .toggle-btn.active {
  background-color: var(--brand);
  color: #0a0806;
  border-color: var(--brand);
}

/* ==========================
   Access Link Status (Added for prelimform.php)
========================== */
.access-status-banner {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 3px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.access-status-banner .status-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.access-status-banner .status-value {
  font-weight: 600;
  margin-top: 2px;
}

.access-status-banner .status-value.active { color: var(--success); }
.access-status-banner .status-value.expired { color: var(--danger); }
.access-status-banner .status-value.pending { color: #f0c040; }
.access-status-banner .status-value.extended { color: #4ea5b3; }

.access-status-banner .status-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ==========================
   Extension UI (for access_login.php)
========================== */
.extension-request-section {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.extension-request-section .info-text {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.extension-request-section .btn-extension {
  background: transparent;
  border: 1px solid var(--brand);
  color: var(--brand);
  padding: 8px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.8rem;
  transition: all 0.2s;
}

.extension-request-section .btn-extension:hover {
  background: rgba(203, 191, 156, 0.1);
  border-color: var(--brand-strong);
  color: var(--brand-strong);
}

.extension-request-section .btn-extension:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ==========================
   Appointment Management (Admin)
========================== */
.appointment-details {
  display: grid;
  gap: 6px;
  margin: 8px 0;
  font-size: 0.9rem;
}

.appointment-details .detail-row {
  display: flex;
  gap: 8px;
}

.appointment-details .detail-label {
  color: var(--muted);
  min-width: 120px;
}

.appointment-status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.appointment-status-badge.pending { background: rgba(184,134,11,0.15); color: #f0c040; }
.appointment-status-badge.confirmed { background: rgba(74,124,79,0.15); color: #8cbf8f; }
.appointment-status-badge.rescheduled { background: rgba(139,123,92,0.2); color: #cbbf9c; }
.appointment-status-badge.declined { background: rgba(155,74,74,0.15); color: #e6a0a0; }

.appointment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.appointment-actions .btn-sm {
  padding: 6px 14px;
  font-size: 0.7rem;
}

.appointment-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.appointment-fields .field { margin-bottom: 0; }
.appointment-fields .field label { font-size: 0.7rem; color: var(--muted); display: block; margin-bottom: 2px; }
.appointment-fields .field input,
.appointment-fields .field select,
.appointment-fields .field textarea {
  width: 100%;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  font-size: 0.8rem;
}

.appointment-fields .field textarea { resize: vertical; min-height: 50px; }

/* ==========================
   Responsive
========================== */
@media (max-width: 1024px) {
  .checkbox-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 980px) {
  .grid-2,
  .grid-3,
  .grid-4,
  .instructions-grid,
  .signature-line {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 640px) {
  .client-support-grid { grid-template-columns: 1fr; }

  .client-org-member-table,
  .beneficiary-individuals-table,
  .beneficiary-groups-table,
  .summary-table {
    display: block;
  }

  .client-org-member-table thead,
  .beneficiary-individuals-table thead,
  .beneficiary-groups-table thead,
  .summary-table thead {
    display: none;
  }

  .client-org-member-table tr,
  .beneficiary-individuals-table tr,
  .beneficiary-groups-table tr,
  .summary-table tr {
    display: block;
    margin-bottom: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 16px;
    background: var(--panel);
  }

  .client-org-member-table td,
  .beneficiary-individuals-table td,
  .beneficiary-groups-table td,
  .summary-table td {
    display: flex;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
  }

  .slider-inline-container {
    flex-wrap: wrap;
    gap: 12px;
  }
  .custom-slider {
    order: 1;
    width: 100%;
  }

  .access-status-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .appointment-fields {
    grid-template-columns: 1fr;
  }
}

/* Hide service requirement cards that don't match selected core interests */
.check-card.hidden-card {
  display: none !important;
}

.gem-card {
  border: 1px solid #36270e;
  border-radius: 12px;
  padding: 16px;
  margin-top: 16px;
  background: #120c07;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.tier-big {
  font-size: 1rem;
  font-weight: 600;
  display: block;
}

.tier-small {
  font-size: 0.75rem;
  font-weight: 400;
  color: #bfba5a;
  display: block;
}

.gem-card .check-card {
  padding: 6px 8px;
  min-height: 33px;
}

.gem-card .check-card div {
  font-size: 0.63rem;
}

.gem-card .check-card:hover {
  border-color: #38311d;
  background: rgba(203,191,156,0.15);
}

/* ==========================
   Role Buttons – Unique grid layout
========================== */
.role-group {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

@media screen and (max-width: 640px) {
  .role-group {
    grid-template-columns: repeat(2, 1fr);
  }
}

.role-btn {
  background: #2c2620;
  border: 1px solid #5a5040;
  color: #cbbf9c;
  padding: 10px 6px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 600;
  text-align: center;
  transition: var(--transition);
  line-height: 1.3;
}

.role-btn:hover {
  background: #3b332b;
  border-color: var(--brand);
  color: var(--brand-strong);
}

.role-btn.selected {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-strong) 100%);
  color: #0a0806;
  border-color: transparent;
  box-shadow: var(--shadow-soft);
  font-weight: 600;
}

.role-btn.hidden-role {
  display: none;
}

.role-btn.role-disabled {
  opacity: 0.5;
  pointer-events: none;
  text-decoration: line-through;
}

.initiator-block,
.registrant-block,
.partner-block {
  border: 1px solid var(--border, #2d3748);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  background: var(--panel-1, #1a202c);
}

.initiator-header,
.registrant-header,
.partner-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  color: #f1f5f9;
  font-weight: 600;
  margin-bottom: 12px;
}

.initiator-body,
.registrant-body,
.partner-body {
  display: block;
}

.btn-outline-danger {
  background: transparent;
  border: 1px solid #ef4444;
  color: #ef4444;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
}

.btn-outline-danger:hover {
  background: rgba(239,68,68,0.1);
}

.cover-letter-box {
  border: 2px dashed #d4af37;
  background: rgba(212,175,55,0.05);
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 21px;
}

.cover-letter-box .field {
  margin-bottom: 0;
}

/* ==========================
   Access Link Status Section (index.html)
========================== */
.access-status-section {
  background: var(--charcoal-warm);
  color: var(--soft-white);
  padding: 2.2rem;
  border-radius: 2px;
  text-align: center;
}

.access-status-section h3 {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 400;
  margin-bottom: 0.7rem;
  letter-spacing: 0.03em;
  color: var(--gold);
}

.access-status-section p {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 300;
  opacity: 0.85;
  margin-bottom: 1.3rem;
  line-height: 1.7;
}

.access-status-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
  align-items: center;
  max-width: 600px;
  margin: 0 auto;
}

.access-status-form input {
  flex: 1 1 220px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-subtle);
  background: var(--obsidian);
  color: var(--platinum);
  border-radius: 2px;
  font-size: 0.9rem;
}

.access-status-form input:focus {
  border-color: var(--gold);
  outline: none;
}

.access-status-form button {
  padding: 0.75rem 1.8rem;
  background: var(--gold);
  color: var(--obsidian);
  border: none;
  border-radius: 2px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.3s;
}

.access-status-form button:hover {
  background: var(--gold-pale);
}

.access-status-result {
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(255,255,255,0.04);
  border-radius: 4px;
  display: none;
  text-align: left;
}

.access-status-result .status-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--stone);
}

.access-status-result .status-value {
  font-weight: 600;
  font-size: 1rem;
  margin: 0.2rem 0 0.6rem 0;
}

.access-status-result .status-value.active { color: #8cbf8f; }
.access-status-result .status-value.expired { color: #e6a0a0; }
.access-status-result .status-value.pending { color: #f0c040; }

.access-status-result .btn-extension {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 0.4rem 1.2rem;
  border-radius: 2px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.8rem;
  transition: background 0.3s;
  margin-top: 0.5rem;
}

.access-status-result .btn-extension:hover {
  background: rgba(184,151,75,0.1);
}

.access-status-result .btn-extension:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.access-status-error {
  color: var(--danger);
  font-size: 0.9rem;
  margin-top: 0.5rem;
  display: none;
}

/* ===== EYE‑CATCHING FILE META – SUCCESS GREEN ===== */
.file-meta {
    display: inline-block;
    background: rgba(46, 200, 120, 0.15);
    color: #5ae0a0;
    border: 2px solid #4ccf8a;
    border-radius: 8px;
    padding: 6px 18px 6px 14px;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    box-shadow: 0 0 20px rgba(46, 200, 120, 0.15);
    margin-top: 6px;
}

.file-meta::before {
    content: "✅ ";
    font-weight: 400;
}

.file-meta .file-name {
    color: #e0fff0;
    font-weight: 800;
}

.file-meta .uploaded-from {
    color: #8acfaa;
    font-weight: 400;
    font-size: 0.7rem;
    margin-left: 8px;
    opacity: 0.7;
}

/* ============================================================
   WIZARD STYLES – Glassmorphism (exact replica, stretched)
   ============================================================ */

/* ----- Desktop: evenly stretched glass cards ----- */
.wizard-progress {
  display: flex;
  justify-content: stretch;
  margin-top: 24px;
  margin-bottom: 24px;
  padding: 0;
  list-style: none;
  counter-reset: step;
  gap: 12px;
}

.wizard-progress li {
  flex: 1 1 0%;                     /* stretch equally */
  text-align: center;
  padding: 16px 12px;
  border-radius: 12px;
  /* Glassmorphism base */
  background: rgba(29, 26, 23, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(203,191,156,0.2);
  cursor: default;
  transition: all 0.3s ease;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 500;
  line-height: 1.3;
}

/* Step number */
.wizard-progress li::before {
  counter-increment: step;
  content: counter(step);
  display: block;
  margin: 0 auto 8px;
  font-size: 1.6rem;
  font-weight: normal;
  color: inherit;
  line-height: 1;
  background: none;
  border: none;
  width: auto;
  height: auto;
  border-radius: 0;
}

/* Active card – deeper glass, gold border, lift */
.wizard-progress li.active {
  background: rgba(203,191,156,0.15);
  backdrop-filter: blur(16px);
  border-color: var(--brand);
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

/* Completed card – greenish border and subtle background */
.wizard-progress li.completed {
  border-color: rgba(138,155,126,0.4);
  background: rgba(138,155,126,0.1);
}

/* Completed checkmark */
.wizard-progress li.completed::before {
  content: '✓';
  color: var(--success);
  font-size: 1.4rem;
}

/* ----- Step containers & navigation (unchanged) ----- */
.form-step { display: none; }
.form-step.active { display: block; }

.wizard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.wizard-nav button {
  min-width: 110px;
}

/* ----- Mobile step‑name label (hidden on desktop) ----- */
.current-step-label-mobile {
  display: none;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand);
  margin: 8px 0 12px;
  line-height: 1.3;
}

/* ----- Mobile: glass pills (no text) + centred label ----- */
@media (max-width: 640px) {
  .wizard-progress {
    gap: 4px;
    margin-top: 12px;
    margin-bottom: 0;
  }

  .wizard-progress li {
    flex: 1 1 0%;
    padding: 10px 0 8px;
    font-size: 0;                     /* hide label text */
    border-radius: 10px;
    background: rgba(29, 26, 23, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(203,191,156,0.2);
  }

  .wizard-progress li::before {
    font-size: 1rem;
    margin: 0 auto;
    font-weight: normal;
    color: var(--muted);
  }

  .wizard-progress li.active {
    background: rgba(203,191,156,0.15);
    backdrop-filter: blur(16px);
    border-color: var(--brand);
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    transform: translateY(-3px);
  }

  .wizard-progress li.completed {
    border-color: rgba(138,155,126,0.4);
    background: rgba(138,155,126,0.1);
  }

  .wizard-progress li.completed::before {
    content: '✓';
    color: var(--success);
  }

  .current-step-label-mobile {
    display: block;
  }
}