/* =============================================================
   COMPONENTS.CSS — Reusable UI Components
   Al Buraimi Ministry eServices Web Portal
   ============================================================= */

/* ─────────────────────────────────────────
   BUTTONS
   ───────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.625rem var(--space-6);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-body);
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition-base),
              color var(--transition-base),
              border-color var(--transition-base),
              transform var(--transition-fast),
              box-shadow var(--transition-base);
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible {
  outline: 2px solid var(--color-accent-orange);
  outline-offset: 2px;
}

/* Size Variants */
.btn-sm {
  padding: 0.375rem var(--space-4);
  font-size: var(--text-xs);
}

.btn-lg {
  padding: 0.875rem var(--space-8);
  font-size: var(--text-md);
  border-radius: var(--radius-md);
}

.btn-full {
  width: 100%;
  display: flex;
}

/* Color Variants */
.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}
.btn-primary:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary-light);
  box-shadow: 0 4px 12px rgba(16,28,78,0.3);
}

.btn-accent {
  background: var(--color-accent-orange);
  color: var(--color-white);
  border-color: var(--color-accent-orange);
}
.btn-accent:hover {
  background: #e0961f;
  border-color: #e0961f;
  box-shadow: 0 4px 12px rgba(245,166,35,0.35);
}

.btn-success {
  background: var(--color-accent-green);
  color: var(--color-white);
  border-color: var(--color-accent-green);
}
.btn-success:hover {
  background: #26a689;
  border-color: #26a689;
  box-shadow: 0 4px 12px rgba(46,189,154,0.35);
}

.btn-info {
  background: var(--color-accent-blue);
  color: var(--color-white);
  border-color: var(--color-accent-blue);
}
.btn-info:hover {
  background: #1976d2;
  border-color: #1976d2;
  box-shadow: 0 4px 12px rgba(33,150,243,0.35);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-outline:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-outline-white {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255,255,255,0.6);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--color-white);
}

.btn-link {
  background: none;
  border: none;
  color: var(--color-primary-light);
  font-size: var(--text-sm);
  padding: var(--space-2) 0;
  text-decoration: underline;
  font-weight: 500;
}
.btn-link:hover {
  color: var(--color-primary);
}

.btn-teal {
  background: var(--color-accent-green);
  color: var(--color-white);
  border-color: var(--color-accent-green);
}
.btn-teal:hover {
  background: var(--color-accent-teal);
  border-color: var(--color-accent-teal);
}

/* Disabled state */
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
}

/* Loading state */
.btn--loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}
.btn--loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ─────────────────────────────────────────
   CARDS
   ───────────────────────────────────────── */

.card {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-6);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid var(--color-border);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card--flat {
  box-shadow: none;
  border: 1px solid var(--color-border);
}

/* ─────────────────────────────────────────
   SERVICE ICON CIRCLES
   ───────────────────────────────────────── */

.service-icon-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.service-icon-circle img,
.service-icon-circle svg {
  width: 40px;
  height: 40px;
  filter: brightness(0) invert(1);
}

.service-icon-circle--sm {
  width: 40px;
  height: 40px;
}
.service-icon-circle--sm img,
.service-icon-circle--sm svg {
  width: 20px;
  height: 20px;
}

.service-icon-circle--green       { background: var(--color-accent-green); }
.service-icon-circle--purple      { background: var(--color-accent-purple); }
.service-icon-circle--orange      { background: var(--color-accent-orange); }
.service-icon-circle--navy        { background: var(--color-primary); }
.service-icon-circle--blue        { background: var(--color-accent-blue); }
.service-icon-circle--teal        { background: var(--color-accent-teal); }
.service-icon-circle--light-purple { background: var(--color-accent-light-purple); }

/* ─────────────────────────────────────────
   BADGES
   ───────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  white-space: nowrap;
}

.badge--pending {
  background: #fff3cd;
  color: #856404;
  border-color: #ffc107;
}
.badge--in-progress {
  background: #cce5ff;
  color: #004085;
  border-color: #0056b3;
}
.badge--completed {
  background: #d4edda;
  color: #155724;
  border-color: #28a745;
}
.badge--rejected {
  background: #f8d7da;
  color: #721c24;
  border-color: #dc3545;
}
.badge--draft {
  background: #e2e3e5;
  color: #383d41;
  border-color: #d6d8db;
}
.badge--evaluation {
  background: #fff0d4;
  color: #905a0c;
  border-color: #f5a623;
}

/* ─────────────────────────────────────────
   FORMS
   ───────────────────────────────────────── */

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.form-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}

.required {
  color: var(--color-error);
  margin-inline-start: 2px;
}

.input-field {
  width: 100%;
  padding: 0.625rem var(--space-4);
  font-size: var(--text-base);
  font-family: var(--font-body);
  color: var(--color-text-primary);
  background: var(--color-white);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
  appearance: none;
  -webkit-appearance: none;
  outline: none;
}

.input-field:focus {
  border-color: var(--color-primary-light);
  box-shadow: 0 0 0 3px rgba(16,28,78,0.1);
}

.input-field::placeholder {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.input-field--select {
  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='%236b7394' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  padding-inline-end: var(--space-8);
  cursor: pointer;
}

[dir="rtl"] .input-field--select {
  background-position: left var(--space-3) center;
  padding-inline-end: var(--space-4);
  padding-inline-start: var(--space-8);
}

.input-field--textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.6;
}

.input-field--valid {
  border-color: var(--color-success) !important;
  box-shadow: 0 0 0 3px rgba(39,174,96,0.12);
}

.input-field--error {
  border-color: var(--color-error) !important;
  box-shadow: 0 0 0 3px rgba(231,76,60,0.12);
}

/* Input with icon */
.input-wrapper {
  position: relative;
}

.input-wrapper .input-field {
  padding-inline-start: var(--space-10, 2.5rem);
}

.input-icon {
  position: absolute;
  inset-block-start: 50%;
  transform: translateY(-50%);
  inset-inline-start: var(--space-3);
  color: var(--color-text-muted);
  pointer-events: none;
}

.input-wrapper--otp {
  position: relative;
}

.input-icon--valid {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-end: var(--space-3);
  transform: translateY(-50%);
  color: var(--color-success);
  font-size: var(--text-lg);
  font-weight: 700;
  display: none;
}

/* Form error message */
.form-error-msg {
  font-size: var(--text-xs);
  color: var(--color-error);
  min-height: 1rem;
  display: block;
}

/* File upload */
.file-upload-area {
  position: relative;
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition-base), background var(--transition-base);
  background: #fafbfd;
}

.file-upload-area:hover {
  border-color: var(--color-primary-light);
  background: rgba(16,28,78,0.03);
}

.file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  pointer-events: none;
  color: var(--color-text-secondary);
}

.file-upload-label svg {
  width: 32px;
  height: 32px;
  color: var(--color-text-muted);
}

.file-upload-text {
  font-size: var(--text-sm);
  font-weight: 500;
}

.file-upload-text u {
  color: var(--color-primary);
  cursor: pointer;
}

.file-upload-formats {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Form actions */
.form-actions {
  display: flex;
  gap: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-6);
  flex-wrap: wrap;
}

/* ─────────────────────────────────────────
   LANGUAGE TOGGLE
   ───────────────────────────────────────── */

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-full);
  padding: 0.3rem var(--space-4);
  cursor: pointer;
  transition: background var(--transition-base);
  color: var(--color-white);
  font-size: var(--text-sm);
  font-weight: 500;
  user-select: none;
}

.lang-toggle:hover {
  background: rgba(255,255,255,0.2);
}

.lang-toggle--dark {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-text-primary);
}

.lang-toggle--dark:hover {
  background: var(--color-bg-light);
}

.lang-option {
  cursor: pointer;
  transition: color var(--transition-fast);
}

.lang-option.active {
  color: var(--color-accent-orange);
  font-weight: 700;
}

.lang-divider {
  color: rgba(255,255,255,0.4);
}

.lang-arrow {
  font-size: var(--text-md);
  opacity: 0.7;
}

/* ─────────────────────────────────────────
   STEP PROGRESS BAR
   ───────────────────────────────────────── */

.step-progress {
  display: flex;
  align-items: stretch;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: var(--space-4);
}

.step-progress__item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.65rem var(--space-4);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-white);
  position: relative;
  text-align: center;
  border-inline-end: 1px solid var(--color-border);
}

.step-progress__item:last-child {
  border-inline-end: none;
}

/* Arrow shape */
.step-progress__item::after {
  content: '';
  position: absolute;
  inset-inline-end: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 18px solid transparent;
  border-bottom: 18px solid transparent;
  border-inline-start: 12px solid var(--color-white);
  z-index: 2;
}

.step-progress__item:last-child::after {
  display: none;
}

.step-progress__item--active {
  background: var(--color-accent-green);
  color: var(--color-white);
}

.step-progress__item--active::after {
  border-inline-start-color: var(--color-accent-green);
}

.step-progress__item--completed {
  background: var(--color-primary);
  color: var(--color-white);
}

.step-progress__item--completed::after {
  border-inline-start-color: var(--color-primary);
}

.step-progress__icon {
  font-size: var(--text-sm);
}

/* ─────────────────────────────────────────
   RECORD SEARCH PANEL
   ───────────────────────────────────────── */

.record-search {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-4);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.record-search__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-6);
  background: var(--color-accent-green);
  color: var(--color-white);
  cursor: pointer;
  user-select: none;
}

.record-search__title {
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.record-search__toggle {
  font-size: var(--text-xl);
  line-height: 1;
  transition: transform var(--transition-base);
}

.record-search.collapsed .record-search__toggle {
  transform: rotate(180deg);
}

.record-search__body {
  padding: var(--space-6);
}

.record-search.collapsed .record-search__body {
  display: none;
}

.record-search__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  align-items: end;
}

@media (max-width: 768px) {
  .record-search__grid {
    grid-template-columns: 1fr;
  }
}

.record-search__actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  padding-top: var(--space-2);
}

/* ─────────────────────────────────────────
   SERVICE DETAIL PANEL
   ───────────────────────────────────────── */

.service-detail {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border: 1px solid var(--color-border);
  margin-bottom: var(--space-4);
}

.service-detail__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-6);
  background: var(--color-accent-green);
  color: var(--color-white);
}

.service-detail__title {
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.service-detail__body {
  padding: var(--space-6);
}

.service-detail__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4) var(--space-6);
}

@media (max-width: 768px) {
  .service-detail__grid { grid-template-columns: 1fr; }
}

.service-detail__field-full {
  grid-column: 1 / -1;
}

/* ─────────────────────────────────────────
   DATA TABLE
   ───────────────────────────────────────── */

.data-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.data-table thead th {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 0.65rem var(--space-4);
  text-align: start;
  font-weight: 600;
  white-space: nowrap;
  font-size: var(--text-xs);
  letter-spacing: 0.03em;
}

.data-table thead th:first-child { border-start-start-radius: var(--radius-sm); }
.data-table thead th:last-child  { border-start-end-radius: var(--radius-sm); }

.data-table tbody tr {
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition-fast);
}

.data-table tbody tr:last-child { border-bottom: none; }

.data-table tbody tr:hover {
  background: rgba(16,28,78,0.03);
}

.data-table tbody td {
  padding: 0.65rem var(--space-4);
  color: var(--color-text-secondary);
  vertical-align: middle;
}

.data-table .action-btn {
  color: var(--color-primary);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.data-table .action-btn:hover {
  background: var(--color-bg-light);
}

/* ─────────────────────────────────────────
   MODAL
   ───────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,18,53,0.65);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  transform: scale(0.9) translateY(20px);
  transition: transform var(--transition-slow), opacity var(--transition-slow);
  text-align: center;
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal__icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(46,189,154,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-4);
  font-size: 2rem;
}

.modal__title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}

.modal__ref {
  background: var(--color-bg-light);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.05em;
  margin: var(--space-4) 0;
  display: inline-block;
}

.modal__text {
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  margin-bottom: var(--space-6);
}

.modal__actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
}

/* ─────────────────────────────────────────
   ACCESSIBILITY PANEL
   ───────────────────────────────────────── */

.accessibility-panel {
  position: fixed;
  bottom: var(--space-6);
  inset-inline-start: var(--space-4);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.accessibility-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--color-accent-orange);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-fast), box-shadow var(--transition-base);
  cursor: pointer;
  border: none;
}

.accessibility-btn:hover {
  transform: scale(1.08);
  box-shadow: var(--shadow-lg);
}

.accessibility-btn svg {
  width: 22px;
  height: 22px;
}

.chat-widget-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-primary-dark);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  position: relative;
  cursor: pointer;
  border: none;
  transition: transform var(--transition-fast);
}

.chat-widget-btn:hover {
  transform: scale(1.1);
}

.chat-widget-btn svg {
  width: 22px;
  height: 22px;
}

.chat-widget-badge {
  position: absolute;
  top: -4px;
  inset-inline-end: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-error);
  color: white;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid white;
}

/* ─────────────────────────────────────────
   EMPTY STATE
   ───────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: var(--space-16) var(--space-8);
  background: var(--color-white);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--color-border);
}

.empty-state__icon {
  font-size: 3rem;
  margin-bottom: var(--space-4);
  opacity: 0.6;
}

.empty-state h3 {
  font-size: var(--text-xl);
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}

.empty-state p {
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  margin-bottom: var(--space-6);
}

/* ─────────────────────────────────────────
   LOADING SKELETON
   ───────────────────────────────────────── */

.skeleton {
  background: linear-gradient(90deg, #f0f2f7 25%, #e2e6ef 50%, #f0f2f7 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

.skeleton-text {
  height: 14px;
  margin-bottom: var(--space-2);
}

.skeleton-text--lg {
  height: 20px;
}

/* ─────────────────────────────────────────
   TOAST NOTIFICATION
   ───────────────────────────────────────── */

.toast-container {
  position: fixed;
  top: calc(var(--navbar-height) + var(--space-4));
  inset-inline-end: var(--space-6);
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-width: 340px;
}

.toast {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-6);
  box-shadow: var(--shadow-lg);
  border-inline-start: 4px solid var(--color-success);
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  animation: slideInRight 0.3s ease;
}

.toast--error  { border-inline-start-color: var(--color-error); }
.toast--warning { border-inline-start-color: var(--color-warning); }
.toast--info   { border-inline-start-color: var(--color-info); }

/* ─────────────────────────────────────────
   PAGINATION
   ───────────────────────────────────────── */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-6) 0;
}

.pagination__btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pagination__btn:hover,
.pagination__btn.active {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

.pagination__btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ─────────────────────────────────────────
   DOCUMENT UPLOAD TABLE
   ───────────────────────────────────────── */

.doc-table-header {
  display: grid;
  grid-template-columns: 2fr 3fr 80px 80px;
  gap: 1px;
  background: var(--color-primary);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  overflow: hidden;
}

.doc-table-header span {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 0.5rem var(--space-4);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.doc-table-row {
  display: grid;
  grid-template-columns: 2fr 3fr 80px 80px;
  border: 1px solid var(--color-border);
  border-top: none;
}

.doc-table-row span,
.doc-table-row a {
  padding: 0.5rem var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
}

.doc-table-row a {
  color: var(--color-accent-green);
  cursor: pointer;
}

.doc-table-row a:hover {
  text-decoration: underline;
}

/* ─────────────────────────────────────────
   TOPBAR (Authenticated Pages)
   ───────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 500;
  background: var(--color-primary);
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: var(--space-6);
  box-shadow: 0 2px 8px rgba(10,18,53,0.3);
}

.topbar__center {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.topbar__home {
  color: var(--color-white);
  opacity: 0.85;
  transition: opacity var(--transition-fast);
  display: flex;
  align-items: center;
}

.topbar__home:hover { opacity: 1; }

.topbar__home svg {
  width: 22px;
  height: 22px;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.topbar__action {
  color: var(--color-white);
  opacity: 0.85;
  transition: opacity var(--transition-fast);
  display: flex;
  align-items: center;
}

.topbar__action:hover { opacity: 1; }

.topbar__action svg {
  width: 22px;
  height: 22px;
}

/* ─────────────────────────────────────────
   LOGOS BAR (Authenticated Pages)
   ───────────────────────────────────────── */

.logos-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-8);
  background: transparent;
}

.logos-bar__logo {
  height: 64px;
  width: auto;
  object-fit: contain;
}

.logos-bar__tagline {
  font-size: var(--text-sm);
  color: var(--color-accent-green);
  font-weight: 500;
  text-align: end;
  margin-top: var(--space-1);
}

/* ─────────────────────────────────────────
   PAGE SUPPORT FOOTER (Authenticated)
   ───────────────────────────────────────── */

.page-support {
  text-align: center;
  padding: var(--space-6);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-8);
}

.page-support a {
  color: var(--color-primary);
  text-decoration: underline;
}

.page-support strong {
  color: var(--color-text-primary);
}
