/* TechSupport-Splynx CSS Framework */
/* Replaces Bulma + Tailwind with a single cohesive design system */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: #1f2937;
  background: #f0f2f5;
  min-height: 100vh;
}

/* ── Layout: Sidebar + Main ── */
.page-wrapper {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 240px;
  min-width: 240px;
  background: #fff;
  border-right: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  transition: width 0.2s ease, min-width 0.2s ease;
  overflow: hidden;
  position: relative;
  z-index: 30;
}

.sidebar.collapsed {
  width: 56px;
  min-width: 56px;
}

.sidebar.collapsed .sidebar-label,
.sidebar.collapsed .sidebar-heading {
  display: none;
}

.sidebar.collapsed .sidebar-link {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

.sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 50%;
  cursor: pointer;
  position: absolute;
  top: 16px;
  right: -14px;
  z-index: 31;
  font-size: 14px;
  color: #6b7280;
  transition: background 0.15s;
}

.sidebar-toggle:hover {
  background: #e5e7eb;
  color: #1f2937;
}

.sidebar-nav {
  padding: 16px 8px;
  flex: 1;
  overflow-y: auto;
}

.sidebar-heading {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ca3af;
  padding: 8px 12px 4px;
  margin-top: 12px;
}

.sidebar-heading:first-child {
  margin-top: 0;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  color: #4b5563;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}

.sidebar-link:hover {
  background: #f3f4f6;
  color: #1d4ed8;
}

.sidebar-icon {
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  font-size: 15px;
}

.sidebar-link.is-active {
  background: #eff6ff;
  color: #1d4ed8;
}

.sidebar-link .sidebar-icon {
  flex-shrink: 0;
  width: 20px;
  text-align: center;
  font-size: 16px;
}

/* Main content */
#main-content {
  flex: 1;
  min-width: 0;
  padding: 24px;
  overflow-x: auto;
}

/* ── Container ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ── Box / Card ── */
.box {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  padding: 20px;
  margin-bottom: 16px;
}

.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  margin-bottom: 16px;
}

.card-content {
  padding: 20px;
}

.card-header {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid #e5e7eb;
}

.card-header-title {
  font-weight: 600;
  font-size: 14px;
  color: #1f2937;
}

/* ── Columns / Grid ── */
.columns {
  display: flex;
  flex-wrap: wrap;
  margin: -8px;
}

.column {
  flex: 1;
  padding: 8px;
}

.column.is-half, .column.is-6 { flex: 0 0 50%; max-width: 50%; }
.column.is-third, .column.is-4 { flex: 0 0 33.333%; max-width: 33.333%; }
.column.is-two-thirds, .column.is-8 { flex: 0 0 66.667%; max-width: 66.667%; }
.column.is-quarter, .column.is-3 { flex: 0 0 25%; max-width: 25%; }
.column.is-three-quarters, .column.is-9 { flex: 0 0 75%; max-width: 75%; }
.column.is-full, .column.is-12 { flex: 0 0 100%; max-width: 100%; }
.column.is-2 { flex: 0 0 16.667%; max-width: 16.667%; }

.columns.is-multiline { flex-wrap: wrap; }
.columns.is-gapless { margin: 0; }
.columns.is-gapless > .column { padding: 0; }
.columns.is-vcentered { align-items: center; }
.columns.is-variable { gap: 0; }

@media (max-width: 768px) {
  .column.is-half,
  .column.is-third,
  .column.is-quarter,
  .column.is-two-thirds,
  .column.is-three-quarters,
  .column.is-6,
  .column.is-4,
  .column.is-3 {
    flex: 0 0 100%;
    max-width: 100%;
  }
  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .sidebar-toggle {
    display: none;
  }
  #main-content {
    padding: 16px;
  }
}

/* ── Dashboard Tool Cards ── */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.dashboard-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  text-decoration: none;
  color: #1f2937;
  font-weight: 500;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.dashboard-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 2px 8px rgba(59,130,246,0.1);
  text-decoration: none;
}

.dashboard-card .card-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.dashboard-card .card-icon.tech { background: #dbeafe; color: #2563eb; }
.dashboard-card .card-icon.office { background: #fef3c7; color: #d97706; }
.dashboard-card .card-icon.money { background: #d1fae5; color: #059669; }

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  color: #111827;
}

h1 { font-size: 1.75rem; margin-bottom: 12px; }
h2 { font-size: 1.4rem; margin-bottom: 10px; }
h3 { font-size: 1.2rem; margin-bottom: 8px; }
h4 { font-size: 1.05rem; margin-bottom: 6px; }
h5 { font-size: 0.95rem; }
h6 { font-size: 0.875rem; }

.title {
  font-weight: 600;
  color: #111827;
  margin-bottom: 12px;
}
.title.is-2 { font-size: 1.75rem; }
.title.is-3 { font-size: 1.5rem; }
.title.is-4 { font-size: 1.25rem; }
.title.is-5 { font-size: 1.1rem; }
.title.is-6 { font-size: 0.95rem; }

.subtitle {
  font-size: 1.05rem;
  color: #6b7280;
  margin-bottom: 12px;
}

p { margin-bottom: 8px; }
strong { font-weight: 600; }

hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 16px 0;
}

a {
  color: #2563eb;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  color: #1d4ed8;
}

/* ── Buttons ── */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  background: #fff;
  color: #374151;
}

.button:hover {
  background: #f9fafb;
  text-decoration: none;
}

.button:disabled, .button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.button.is-fullwidth { width: 100%; }

.button.is-small {
  padding: 4px 10px;
  font-size: 13px;
}

.button.is-primary {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}
.button.is-primary:hover { background: #1d4ed8; }

.button.is-link, .button.is-info {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}
.button.is-link:hover, .button.is-info:hover { background: #1d4ed8; }

.button.is-success {
  background: #059669;
  color: #fff;
  border-color: #059669;
}
.button.is-success:hover { background: #047857; }

.button.is-warning {
  background: #f59e0b;
  color: #fff;
  border-color: #f59e0b;
}
.button.is-warning:hover { background: #d97706; }

.button.is-danger {
  background: #dc2626;
  color: #fff;
  border-color: #dc2626;
}
.button.is-danger:hover { background: #b91c1c; }

.button.is-light {
  background: #f9fafb;
  color: #374151;
  border-color: #e5e7eb;
}
.button.is-light:hover { background: #f3f4f6; }

.button.is-inverted {
  background: transparent;
  border-color: currentColor;
}

.button .icon {
  font-size: 0.875em;
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* ── Forms ── */
.field {
  margin-bottom: 16px;
}

.field.is-horizontal {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.field.is-horizontal .field-label {
  flex: 0 0 160px;
  text-align: right;
  padding-top: 8px;
}

.field.is-horizontal .field-body {
  flex: 1;
  min-width: 0;
}

.field.is-grouped {
  display: flex;
  gap: 12px;
}

.label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
  color: #374151;
}

.label.is-small { font-size: 13px; }
.label.is-normal { padding-top: 2px; }

.control {
  position: relative;
}

.control.has-icons-left {
  position: relative;
}

.control.has-icons-left .icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
}

.control.has-icons-left input {
  padding-left: 36px;
}

.control.has-icons-left.has-icons-right .icon.is-left {
  left: 10px;
}

.input, .select select, textarea {
  display: block;
  width: 100%;
  padding: 8px 12px;
  font-size: 14px;
  line-height: 1.5;
  color: #1f2937;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}

.input:focus, .select select:focus, textarea:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

.input.is-small, .select.is-small select {
  padding: 4px 8px;
  font-size: 13px;
}

.input.is-static {
  border: none;
  background: transparent;
  box-shadow: none;
}

.select {
  display: block;
  position: relative;
}

.select select {
  appearance: none;
  padding-right: 32px;
  cursor: pointer;
}

.select::after {
  content: "\25BC";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: #9ca3af;
  pointer-events: none;
}

.select.is-fullwidth { width: 100%; }

textarea {
  resize: vertical;
  min-height: 80px;
}

.help {
  font-size: 13px;
  color: #6b7280;
  margin-top: 4px;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 14px;
}

input[type="checkbox"],
input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: #2563eb;
  cursor: pointer;
}

/* ── Tables ── */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th,
.table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.table th {
  font-weight: 600;
  color: #374151;
  background: #f9fafb;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.table.is-fullwidth { width: 100%; }
.table.is-striped tbody tr:nth-child(even) { background: #f9fafb; }
.table.is-bordered th,
.table.is-bordered td {
  border: 1px solid #e5e7eb;
}
.table.is-narrow th,
.table.is-narrow td {
  padding: 6px 10px;
  font-size: 13px;
}

/* ── Tags ── */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
}

.tag.is-success { background: #d1fae5; color: #065f46; }
.tag.is-warning { background: #fef3c7; color: #92400e; }
.tag.is-danger { background: #fee2e2; color: #991b1b; }
.tag.is-info { background: #dbeafe; color: #1e40af; }

/* ── Notifications ── */
.notification {
  padding: 12px 16px;
  margin-bottom: 12px;
  border-radius: 6px;
  background: #f3f4f6;
  border-left: 4px solid #9ca3af;
  font-size: 14px;
}

.notification.is-success {
  background: #d1fae5;
  border-color: #059669;
  color: #065f46;
}
.notification.is-warning {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
}
.notification.is-danger, .notification.is-danger.is-light {
  background: #fee2e2;
  border-color: #dc2626;
  color: #991b1b;
}
.notification.is-info {
  background: #dbeafe;
  border-color: #2563eb;
  color: #1e40af;
}

/* ── Modals ── */
.modal {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0; top: 0; right: 0; bottom: 0;
  align-items: center;
  justify-content: center;
}

.modal.is-active {
  display: flex;
}

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

.modal-content {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 10px;
  padding: 24px;
  max-width: 640px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #6b7280;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { background: #f3f4f6; color: #1f2937; }

/* ── Pagination ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 16px 0;
  flex-wrap: wrap;
}

.pagination.is-centered { justify-content: center; }

.pagination-previous,
.pagination-next,
.pagination-link {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  font-size: 14px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #374151;
  text-decoration: none;
  cursor: pointer;
}

.pagination-previous:hover,
.pagination-next:hover,
.pagination-link:hover {
  background: #f3f4f6;
  text-decoration: none;
}

.pagination-previous[disabled],
.pagination-next[disabled] {
  opacity: 0.5;
  pointer-events: none;
}

.pagination-link.is-current {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.pagination-list {
  display: flex;
  gap: 4px;
  list-style: none;
}

/* ── Progress ── */
.progress {
  display: block;
  width: 100%;
  height: 8px;
  border: none;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.progress::-webkit-progress-bar { background: #e5e7eb; }
.progress::-webkit-progress-value { background: #2563eb; }
.progress.is-primary::-webkit-progress-value { background: #2563eb; }

/* ── Messages ── */
.message {
  background: #f3f4f6;
  border-radius: 6px;
  border-left: 4px solid #d1d5db;
  margin-bottom: 12px;
}

.message-body {
  padding: 12px 16px;
  font-size: 14px;
}

.message.is-warning {
  background: #fef3c7;
  border-color: #f59e0b;
}

.message.is-info {
  background: #dbeafe;
  border-color: #2563eb;
}

/* ── Level ── */
.level {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.level-left, .level-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Block ── */
.block {
  margin-bottom: 16px;
}

/* ── Spacing Utilities ── */
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-5 { margin-top: 20px; } .mt-6 { margin-top: 24px; }

.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; } .mb-5 { margin-bottom: 20px; } .mb-6 { margin-bottom: 24px; }

.ml-1 { margin-left: 4px; } .ml-2 { margin-left: 8px; } .ml-3 { margin-left: 12px; } .ml-4 { margin-left: 16px; }

.mr-1 { margin-right: 4px; } .mr-2 { margin-right: 8px; } .mr-3 { margin-right: 12px; } .mr-4 { margin-right: 16px; }

.p-1 { padding: 4px; } .p-2 { padding: 8px; } .p-3 { padding: 12px; }
.p-4 { padding: 16px; } .p-5 { padding: 20px; } .p-6 { padding: 24px; }

.pb-3 { padding-bottom: 12px; }
.m-0 { margin: 0; }

/* ── Visibility / Display ── */
.hidden, .is-hidden { display: none !important; }
.is-active { } /* handled contextually */

/* ── Flex Utilities ── */
.is-flex { display: flex; }
.is-align-items-center { align-items: center; }
.is-pulled-right { float: right; }
.is-pulled-left { float: left; }
.is-fixed-bottom { position: sticky; bottom: 0; z-index: 20; }

/* ── Text Utilities ── */
.has-text-centered { text-align: center; }
.has-text-grey { color: #6b7280; }
.has-text-danger { color: #dc2626; }
.is-size-7 { font-size: 0.75rem; color: #6b7280; }

/* ── Delete Button ── */
.delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  color: #6b7280;
  padding: 0;
  line-height: 1;
}
.delete:hover { background: #fee2e2; color: #dc2626; border-color: #fca5a5; }

/* ── Navbar (bottom bar for onboarding) ── */
.navbar {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 -1px 3px rgba(0,0,0,0.04);
}

/* ── Section ── */
.section {
  padding: 24px;
}

/* ── Provider Status Cards ── */
.provider-statuses {
  padding: 20px;
}

.provider-statuses__intro { margin-bottom: 16px; }

.provider-statuses__eyebrow {
  color: #6b7280;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.provider-statuses__copy {
  color: #4b5563;
  margin: 0;
}

.provider-status-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  height: 100%;
  margin-bottom: 0;
  min-height: 185px;
  transition: all 0.2s ease;
  background: #fff;
  padding: 16px;
}

.provider-status-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}

.provider-status-card--good {
  background: #f0fdf4;
  border-color: #86efac;
  border-left: 5px solid #22c55e;
}

.provider-status-card--minor {
  background: #fffbeb;
  border-color: #fcd34d;
  border-left: 5px solid #f59e0b;
  box-shadow: 0 1px 4px rgba(245,158,11,0.1);
}

.provider-status-card--major,
.provider-status-card--critical {
  background: #fef2f2;
  border-color: #fca5a5;
  border-left: 5px solid #ef4444;
  box-shadow: 0 1px 6px rgba(239,68,68,0.12);
  animation: pulse-warning 2s ease-in-out infinite;
}

.provider-status-card--maintenance,
.provider-status-card--unknown {
  background: #f5f6f8;
  border-color: #d1d5db;
  border-left: 5px solid #9ca3af;
}

@keyframes pulse-warning {
  0%, 100% { box-shadow: 0 1px 6px rgba(239,68,68,0.12); }
  50% { box-shadow: 0 3px 14px rgba(239,68,68,0.2); }
}

.provider-status-card__header {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.provider-status-card__header h3 {
  color: #111827 !important;
  margin: 0;
  font-size: 0.95rem;
}

.provider-status-pill {
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.provider-status-pill--good { background: #22c55e; color: #fff; }
.provider-status-pill--minor { background: #f59e0b; color: #fff; }
.provider-status-pill--major,
.provider-status-pill--critical { background: #ef4444; color: #fff; }
.provider-status-pill--maintenance,
.provider-status-pill--unknown { background: #6b7280; color: #fff; }

.provider-status-card__summary {
  color: #374151;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 14px;
}

.provider-status-card__footer {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

.provider-status-card__meta {
  color: #9ca3af;
  font-size: 12px;
}

.provider-status-card__link {
  color: #2563eb;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.provider-status-card__link:hover { color: #1d4ed8; }

@media (max-width: 768px) {
  .provider-status-card { min-height: 0; }
  .provider-status-card__header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── Autocomplete / Search ── */
.autocomplete-suggestions {
  border: 1px solid #d1d5db;
  border-top: none;
  max-height: 200px;
  overflow-y: auto;
  background: #fff;
  position: absolute;
  width: 100%;
  margin-top: 2px;
  z-index: 50;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border-radius: 0 0 6px 6px;
}

.autocomplete-suggestion {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
  color: #374151;
}

.autocomplete-suggestion:hover {
  background: #f3f4f6;
}

/* ── Loading Spinner ── */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #e5e7eb;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ── HTMX Indicator ── */
.htmx-indicator {
  opacity: 0;
  transition: opacity 200ms;
}
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  opacity: 1;
}

/* ── Misc helpers referenced by templates ── */
.is-good { color: #059669; }
.is-bad { color: #dc2626; }

/* Onboarding-specific */
#tc-survey {
  position: sticky;
  top: 16px;
  align-self: flex-start;
}

#form-body > .column, #billing-fields, #mac-result {
  border: 1px solid #d1d5db;
  padding: 20px;
  border-radius: 8px;
}

#form-body div.fillCol {
  border: none;
  border-radius: 0;
  padding: 0;
}

#notifications {
  top: 16px;
  right: 16px;
  position: fixed;
  z-index: 200;
  max-width: 360px;
}

#notifications .notification {
  padding-right: 40px;
}

form#mac_result div.columns {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  margin-bottom: 16px;
}

/* Mobile nav toggle (shown on small screens) */
.mobile-nav-toggle {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 40;
  width: 40px;
  height: 40px;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
  .mobile-nav-toggle {
    display: flex;
  }
}

/* Lightbox for project report */
#lightbox-overlay {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(0,0,0,0.9);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

#lightbox-img {
  max-width: 90%;
  max-height: 90%;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  border-radius: 4px;
}

/* Wizard steps (siteconfig) */
.wizard-card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 20px;
  background: #fff;
  margin-bottom: 16px;
}
.wizard-steps {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.wizard-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #6b7280;
  font-weight: 600;
  font-size: 14px;
}
.wizard-step.is-active {
  background: #1e40af;
  color: #fff;
}
.wizard-step-number {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.2);
  font-size: 13px;
}
.step-panel { display: none; }
.step-panel.is-active { display: block; }

.chooser-grid {
  display: grid;
  grid-template-columns: minmax(0,1.5fr) minmax(0,1fr);
  gap: 12px;
}
.chooser-panel {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
}
.selection-summary {
  border: 1px dashed #d1d5db;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}
.selection-summary.hidden { display: none; }
.is-disabled-button { opacity: 0.5; cursor: not-allowed; }

.autocomplete-container { position: relative; }
.autocomplete-results {
  position: absolute;
  z-index: 20;
  left: 0; right: 0;
  margin-top: 4px;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  max-height: 220px;
  overflow-y: auto;
}
.autocomplete-item {
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  color: #1f2937;
}
.autocomplete-item:hover,
.autocomplete-item.is-active {
  background: #f3f4f6;
}
.autocomplete-results.hidden { display: none; }

.connection-row {
  background: #f9fafb;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 8px;
  border: 1px solid #e5e7eb;
}
.connection-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px,1fr));
  gap: 8px;
  align-items: end;
}
.connection-details:empty { display: none; }
.connection-remove { padding-top: 28px; }

.equipment-section {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  height: 100%;
}
.equipment-summary { color: #6b7280; margin-bottom: 10px; font-size: 14px; }
.equipment-status { font-size: 14px; color: #6b7280; margin-bottom: 10px; }
.equipment-status.hidden { display: none; }
.equipment-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 8px;
}
.equipment-row .field { flex: 1; margin-bottom: 0; }
.equipment-row .button { flex-shrink: 0; }
.result-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
}
.result-list {
  margin: 10px 0 0;
  padding-left: 20px;
}

@media (max-width: 900px) {
  .chooser-grid { grid-template-columns: 1fr; }
  .equipment-row { flex-direction: column; align-items: stretch; }
}

/* ── Customer Detail View ── */
.customer-header {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.customer-header h1 {
  margin: 0;
  font-size: 1.5rem;
}

.customer-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.customer-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #4b5563;
}

.customer-meta-item .meta-label {
  font-weight: 600;
  color: #6b7280;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Info grid: label/value pairs in a scanable grid */
.info-grid {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 12px;
  align-items: baseline;
}

.info-grid .info-label {
  font-weight: 600;
  font-size: 13px;
  color: #6b7280;
  white-space: nowrap;
  text-align: right;
}

.info-grid .info-label::after {
  content: ":";
}

.info-grid .info-value {
  font-size: 14px;
  color: #1f2937;
  word-break: break-word;
  min-width: 0;
}

/* Two-column info grid for equipment/routers */
.info-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
}

.info-grid-2col .info-grid {
  gap: 4px 12px;
}

/* Section cards inside a service */
.customer-section {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-top: 12px;
  overflow: hidden;
}

.customer-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  font-weight: 600;
  font-size: 13px;
  color: #374151;
}

.customer-section-header .fa,
.customer-section-header .fas {
  color: #6b7280;
  font-size: 14px;
}

.customer-section-body {
  padding: 16px;
}

/* Problems alert box */
.customer-problems {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  padding: 12px 16px;
  margin-top: 12px;
}

.customer-problems strong {
  color: #991b1b;
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.customer-problems ul {
  margin: 0;
  padding-left: 20px;
  color: #991b1b;
  font-size: 14px;
}

/* Hardwired badge */
.hardwired-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #dbeafe;
  color: #1e40af;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

/* No-data placeholder */
.no-data {
  color: #9ca3af;
  font-style: italic;
  font-size: 14px;
  padding: 8px 0;
}

/* Problem text (customer.html) */
.problem-text {
  color: #fff;
  background-color: #dc2626;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 13px;
}

.warning-border {
  border: 2px solid #f59e0b;
}

@media (max-width: 768px) {
  .info-grid-2col {
    grid-template-columns: 1fr;
  }
  .customer-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .customer-meta {
    flex-direction: column;
    gap: 8px;
  }
}
