/* =========================
   Modal (matches billing page)
   ========================= */

/* Modal overlay: softer, modern */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.55); /* slate-900 w/ opacity */
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 18px;
  z-index: 9999;
}

/* Modal box: same as card system */
.modal-content {
  position: relative;
  width: min(600px, 96vw);
  background: var(--panel, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 16px;
  box-shadow: var(--shadow, 0 10px 30px rgba(0,0,0,0.08));
  overflow: hidden;
}

/* Optional “header” feel */
.modal-content h3 {
  margin: 0;
  padding: 14px 16px;
  background: var(--panel2, #f9fafb);
  border-bottom: 1px solid var(--border, #e5e7eb);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #374151;
}

/* Modal body spacing */
.modal-content .modal-body {
  padding: 16px;
}

/* If you don’t have .modal-body in HTML, this still helps */
.modal-content > :not(h3):not(.close-btn) {
  padding: 16px;
}

/* Labels and inputs (same typography scale as billing page) */
.modal-content label {
  display: block;
  margin-top: 14px;
  font-weight: 650;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #6b7280);
}

.modal-content input,
.modal-content select,
.modal-content textarea {
  width: 100%;
  padding: 10px 12px;
  margin-top: 6px;
  border-radius: 12px;
  border: 1px solid var(--border, #e5e7eb);
  background: #fff;
  color: var(--text, #111827);
  font-size: 14px;
  box-sizing: border-box;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.modal-content textarea {
  resize: vertical;
  min-height: 90px;
}

.modal-content input:focus,
.modal-content select:focus,
.modal-content textarea:focus {
  border-color: rgba(59, 130, 246, 0.65);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.16);
}

/* Modal buttons: match .btn (repair order) */
.modal-content button {
  appearance: none;
  border: 1px solid #93c5fd;
  background: #3b82f6;
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 650;
  font-size: 13px;
  transition: background 140ms ease, transform 140ms ease;
  margin-top: 12px;
}

.modal-content button:hover {
  background: #2563eb;
  transform: translateY(-1px);
}

.modal-content button:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.35);
  outline-offset: 3px;
}

/* Close button: modern “X” */
.close-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: rgba(17, 24, 39, 0.7);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border, #e5e7eb);
  transition: transform 140ms ease, background 140ms ease;
}

.close-btn:hover {
  transform: translateY(-1px);
  background: #ffffff;
}

/* =========================
   Tabs (fixes your active style)
   NOTE: if you’re using .tabs/.tab from health.css, you can delete this.
   ========================= */

.tab-button {
  color: #374151;
  text-decoration: none;
}

.tab-button.active {
  color: #111827; /* readable */
  text-decoration: none;
}

/* =========================
   Tables (avoid fighting your .ro table styles)
   ========================= */

/* If you need a simple table style outside .ro tables, use this class */
.simple-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

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

.simple-table thead tr {
  background: var(--panel2, #f9fafb);
}

.simple-table th {
  border-bottom: 1px solid var(--border, #e5e7eb);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #374151;
}

/* =========================
   Sidebar logo
   ========================= */
.sidebar-logo {
  width: 100%;
  max-width: 140px;
  margin: 0 auto;
  display: block;
}

/* =========================
   Lightbox (match modal/card)
   ========================= */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(17, 24, 39, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  justify-content: center;
  align-items: center;
  padding: 18px;
}

.lightbox-content {
  position: relative;
  width: min(1000px, 96vw);
  background: var(--panel, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow, 0 10px 30px rgba(0,0,0,0.08));
  overflow: hidden;
}

.lightbox iframe {
  width: 100%;
  height: 70vh;
  border: none;
  border-radius: 12px;
  display: block;
}

/* Lightbox close */
.close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 700;
  color: rgba(17, 24, 39, 0.7);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border, #e5e7eb);
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease;
}

.close:hover {
  transform: translateY(-1px);
  background: #ffffff;
}
