/* ============================================================
   Policy Submission Form - Styles
   ============================================================ */

/* ── HubSpot CMS Overrides ───────────────────────────────────
   HubSpot detects <script> tags in Custom HTML modules and
   wraps them in .hs-embed-wrapper with max-width: 421px,
   treating it as a small embed widget. These rules override
   that behavior so the form uses the full page width.
   ─────────────────────────────────────────────────────────── */

/* THE FIX: HubSpot's embed wrapper caps width at 421px */
.hs-embed-wrapper,
.hs-embed-content-wrapper {
  max-width: 100% !important;
  min-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  overflow: visible !important;
}

/* Override HubSpot wrapper width constraints — scoped to sections containing our module */
.hs_cos_wrapper_type_custom_widget,
.hs_cos_wrapper_type_module {
  max-width: 100% !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.dnd-section:has(.hs-embed-wrapper),
.dnd-column:has(.hs-embed-wrapper),
.dnd-row:has(.hs-embed-wrapper),
.row-fluid:has(.hs-embed-wrapper) .widget-span,
.row-fluid:has(.hs-embed-wrapper) .span12 {
  max-width: 100% !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Prevent HubSpot from overriding grid/flex on form elements */
.form-row,
.form-row-2 {
  display: grid !important;
}

.form-group input,
.form-group select {
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

/* Reset HubSpot's default form styling */
.form-section input[type="text"],
.form-section input[type="email"],
.form-section input[type="date"],
.form-section input[type="password"],
.form-section select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  margin: 0 !important;
}

/* Ensure selects keep their dropdown arrow */
.form-section select {
  -webkit-appearance: menulist !important;
  -moz-appearance: menulist !important;
  appearance: menulist !important;
}

:root {
  --primary: #1a56db;
  --primary-hover: #1648b8;
  --primary-light: #e8effc;
  --success: #059669;
  --success-light: #d1fae5;
  --warning: #d97706;
  --warning-light: #fef3c7;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --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;
  --radius: 8px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --autofill-border: #059669;
  --autofill-bg: #f0fdf4;
}

.auth-gate *,
.auth-card *,
.hub-dashboard *,
.form-container *,
.form-header * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ── Auth Gate ─────────────────────────────────────────────── */
.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a56db 0%, #0f3a8e 100%);
}

.auth-card {
  background: white;
  border-radius: 12px;
  padding: 48px 40px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  text-align: center;
  max-width: 400px;
  width: 100%;
  margin: 0 16px;
}

.auth-icon {
  color: var(--primary);
  margin-bottom: 16px;
}

.auth-card h2 {
  font-size: 22px;
  color: var(--gray-800);
  margin-bottom: 6px;
}

.auth-card > p {
  color: var(--gray-500);
  font-size: 14px;
  margin-bottom: 24px;
}

#authForm {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#authForm input[type="email"],
#authForm input[type="password"],
#authForm input[type="text"] {
  padding: 12px 16px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
  box-sizing: border-box;
}

#authForm input[type="email"] {
  text-align: center;
}

#authForm input[type="email"]:focus,
#authForm input[type="password"]:focus,
#authForm input[type="text"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* Password field with toggle button */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper input {
  padding-right: 44px !important;
  text-align: center;
}

.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-400);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}

.password-toggle:hover {
  color: var(--gray-600);
}

.auth-error {
  color: var(--danger);
  font-size: 13px;
  margin-top: 12px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #ffffff !important;
  color: var(--gray-800);
  line-height: 1.5;
  min-height: 100vh;
}

.container {
  max-width: 960px;
  width: 100% !important;
  margin: 0 auto;
  padding: 24px 16px 48px;
  box-sizing: border-box !important;
}

/* ============================================================
   Header
   ============================================================ */

.form-header {
  text-align: center;
  margin-bottom: 32px;
}

.form-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.form-header .subtitle {
  color: var(--gray-500);
  font-size: 15px;
}

/* ============================================================
   Upload Section
   ============================================================ */

.upload-section {
  margin-bottom: 32px;
}

.drop-zone {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--primary);
  background: var(--primary-light);
}

.drop-zone.drag-over {
  border-style: solid;
}

.upload-icon {
  width: 48px;
  height: 48px;
  color: var(--gray-400);
  margin-bottom: 12px;
}

.drop-zone:hover .upload-icon,
.drop-zone.drag-over .upload-icon {
  color: var(--primary);
}

.drop-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 4px;
}

.drop-subtext {
  font-size: 13px;
  color: var(--gray-400);
}

/* Parse Status */
.parse-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  margin-top: 12px;
  background: var(--primary-light);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--primary);
  font-weight: 500;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--primary-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* Parsed Results */
.parsed-results {
  margin-top: 16px;
}

.parsed-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 8px;
}

.parsed-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.parsed-card-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
}

.parsed-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.parsed-badge.success {
  background: var(--success-light);
  color: var(--success);
}

.parsed-badge.warning {
  background: var(--warning-light);
  color: var(--warning);
}

.parsed-badge.error {
  background: var(--danger-light);
  color: var(--danger);
}

.parsed-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 6px;
  font-size: 13px;
}

.parsed-detail {
  color: var(--gray-600);
}

.parsed-detail strong {
  color: var(--gray-700);
}

.parsed-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

/* ============================================================
   Form Sections
   ============================================================ */

.form-section {
  background: var(--gray-100) !important;
  border: 1px solid var(--gray-200) !important;
  border-radius: 12px !important;
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  box-sizing: border-box !important;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-100);
}

/* Policy section specific */
.policy-section .section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-status {
  font-size: 12px;
  font-weight: 500;
  padding: 2px 10px;
  border-radius: 12px;
}

.section-status.filled {
  background: var(--success-light);
  color: var(--success);
}

.section-status.empty {
  background: var(--gray-100);
  color: var(--gray-400);
}

.policy-section.has-data {
  border-color: var(--success);
  border-width: 1px;
}

/* Form Layout */
.form-row {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 16px !important;
  margin-top: 0;
}

.form-row + .form-row {
  margin-top: 12px;
}

.form-row-2 {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 16px !important;
  margin-top: 12px;
}

/* 5-column row for driver/truck/trailer fields */
.form-row-5 {
  display: grid !important;
  grid-template-columns: repeat(5, 1fr) !important;
  gap: 16px !important;
  margin-top: 0;
}

/* Repeating row (driver/truck/trailer entries) */
.repeating-row {
  position: relative;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-200);
}

.repeating-row:last-child {
  border-bottom: none;
}

.btn-remove-row {
  position: absolute;
  top: 12px;
  right: -8px;
  background: none;
  border: none;
  color: var(--gray-400);
  font-size: 20px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  border-radius: 4px;
}

.btn-remove-row:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.08);
}

.btn-add-row {
  margin-top: 12px;
  background: none;
  border: 1px dashed var(--gray-300);
  color: var(--primary);
  padding: 8px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}

.btn-add-row:hover {
  border-color: var(--primary);
  background: rgba(26, 86, 219, 0.04);
}

/* Tablet: 5-col rows → 3-col, 3-col rows → 2-col, 2-col rows stay 2-col */
@media (max-width: 860px) {
  .form-row {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .form-row-5 {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* Mobile: everything stacks to 1 column */
@media (max-width: 540px) {
  .form-row {
    grid-template-columns: 1fr !important;
  }
  .form-row-2 {
    grid-template-columns: 1fr !important;
  }
  .form-row-5 {
    grid-template-columns: 1fr !important;
  }
  .btn-remove-row {
    top: 4px;
    right: 0;
  }
}

/* ── JotForm Auto Fill Button & Picker ─────────────────────── */
.btn-jotform {
  background: white;
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

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

.btn-jotform:disabled {
  opacity: 0.6;
  cursor: wait;
}

.jotform-picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.jotform-picker {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  max-width: 520px;
  width: 100%;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
}

.jotform-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 12px;
  border-bottom: 1px solid var(--gray-200);
}

.jotform-picker-header h3 {
  font-size: 18px;
  color: var(--gray-800);
  margin: 0;
}

.jotform-picker-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--gray-400);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.jotform-picker-close:hover {
  color: var(--gray-800);
}

.jotform-picker-list {
  overflow-y: auto;
  padding: 8px 0;
}

.jotform-picker-item {
  padding: 12px 24px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-bottom: 1px solid var(--gray-100);
}

.jotform-picker-item:last-child {
  border-bottom: none;
}

.jotform-picker-item:hover {
  background: var(--gray-50);
}

.jotform-picker-item strong {
  font-size: 14px;
  color: var(--gray-800);
}

.jotform-picker-meta {
  font-size: 12px;
  color: var(--gray-500);
}

.form-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 4px;
}

/* Label with inline N/A checkbox (MGA field) */
.label-with-checkbox {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.label-with-checkbox label {
  margin-bottom: 0;
}

.na-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
  user-select: none;
}

.na-checkbox input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--primary);
}

.form-group input:disabled {
  background: var(--gray-100);
  color: var(--gray-400);
  cursor: not-allowed;
}

.form-group input,
.form-group select {
  padding: 8px 12px;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-size: 14px;
  color: var(--gray-800);
  background: white;
  transition: all 0.15s ease;
  height: 38px;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.form-group input.autofilled,
.form-group select.autofilled {
  border-color: var(--autofill-border);
  background: var(--autofill-bg);
}

.form-group .field-note {
  font-size: 11px;
  color: var(--gray-400);
  margin-top: 2px;
}

.required {
  color: var(--danger);
}

/* Policy doc upload within each section */
.policy-doc-upload {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--gray-100);
}

.policy-doc-upload label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  display: block;
  margin-bottom: 6px;
}

.doc-upload-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.doc-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--gray-50);
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-size: 13px;
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.15s ease;
}

.doc-upload-btn:hover {
  background: var(--gray-100);
  border-color: var(--gray-400);
}

.doc-file-name {
  font-size: 13px;
  color: var(--gray-500);
}

.doc-file-name.has-file {
  color: var(--success);
  font-weight: 500;
}

/* Force-hide native file inputs (HubSpot may ignore hidden attribute) */
input[type="file"][hidden],
input[type="file"].hidden,
#pdfFileInput {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  opacity: 0 !important;
  position: absolute !important;
  pointer-events: none !important;
}

/* Section action buttons */
.section-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Verify Data button */
.btn-validate {
  background: var(--warning);
  color: white;
  border: none;
}

.btn-validate:hover {
  background: #b45309;
}

.btn-validated {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid var(--success);
  cursor: default;
}

/* Needs verification status badge */
.section-status.needs-verify {
  background: var(--warning-light);
  color: var(--warning);
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

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

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

.btn-secondary {
  background: white;
  color: var(--gray-600);
  border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
  background: var(--gray-50);
  border-color: var(--gray-400);
}

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}

.btn-danger {
  color: var(--danger);
  border-color: var(--danger);
}

.btn-danger:hover {
  background: var(--danger-light);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  background: #047857;
}

/* ============================================================
   Form Actions
   ============================================================ */

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-200);
}

/* ============================================================
   Modal
   ============================================================ */

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
}

.modal-content {
  position: relative;
  background: white;
  border-radius: var(--radius);
  padding: 32px;
  max-width: 640px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
}

.modal-content h2 {
  font-size: 20px;
  margin-bottom: 16px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-200);
}

/* Summary in modal */
.summary-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-100);
}

.summary-item:last-child {
  border-bottom: none;
}

.summary-item h4 {
  font-size: 14px;
  color: var(--gray-700);
  margin-bottom: 4px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px 16px;
  font-size: 13px;
}

.summary-grid .label {
  color: var(--gray-500);
}

.summary-grid .value {
  color: var(--gray-800);
  font-weight: 500;
}

/* ============================================================
   Utilities
   ============================================================ */

.hidden {
  display: none !important;
}

/* Toast notifications */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: white;
  box-shadow: var(--shadow-md);
  z-index: 2000;
  animation: slideUp 0.3s ease;
}

.toast.success {
  background: var(--success);
}

.toast.error {
  background: var(--danger);
}

.toast.info {
  background: var(--primary);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Submission success state */
.submission-success {
  text-align: center;
  padding: 48px 24px;
}

.submission-success svg {
  width: 64px;
  height: 64px;
  color: var(--success);
  margin-bottom: 16px;
}

.submission-success h2 {
  font-size: 24px;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.submission-success p {
  color: var(--gray-500);
}

/* ============================================================
   Hub Dashboard
   ============================================================ */

.hub-header {
  text-align: center;
  margin-bottom: 40px;
}

.hub-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.hub-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--gray-900);
}

.hub-welcome {
  color: var(--gray-500);
  font-size: 15px;
  text-align: left;
}

/* Hub Card Grid - 3 columns */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Thumbnail card */
.hub-card {
  position: relative;
  background: white;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hub-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.08);
  transform: translateY(-4px);
}

/* Thumbnail area */
.hub-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid var(--gray-200);
  background: var(--gray-50);
}

.hub-thumb-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Coming Soon thumbnail overlay */
.hub-card-thumb-soon .hub-thumb-svg {
  filter: blur(1.5px);
  opacity: 0.5;
}

.hub-thumb-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.4);
}

.hub-thumb-overlay span {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gray-500);
  background: rgba(255, 255, 255, 0.85);
  padding: 8px 20px;
  border-radius: 8px;
  border: 1px solid var(--gray-200);
}

/* Card body (title + description) */
.hub-card-body {
  padding: 20px;
  text-align: left;
}

.hub-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 4px;
}

.hub-card p {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.4;
  margin: 0;
}

/* Disabled / Coming Soon cards */
.hub-card-disabled {
  cursor: default;
  pointer-events: none;
}

.hub-card-disabled .hub-card-body {
  opacity: 0.6;
}

/* Sign Out button */
.btn-signout {
  background: white;
  color: var(--gray-500);
  border: 1px solid var(--gray-300);
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-signout:hover {
  background: var(--gray-50);
  color: var(--gray-700);
  border-color: var(--gray-400);
}

/* Back to Hub link (on sub-pages) */
.form-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.back-to-hub {
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s;
}

.back-to-hub:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* Tablet: hub cards 2 columns */
@media (max-width: 860px) {
  .hub-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile: hub cards stack to single column */
@media (max-width: 540px) {
  .hub-grid {
    grid-template-columns: 1fr;
  }

  .hub-header-top {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .hub-welcome {
    text-align: center;
  }

  .form-header-top {
    flex-direction: column;
    gap: 8px;
  }
}
