/* Paneles profesionales con el mismo estilo que klinpass.com: oscuro por defecto y claro con el
   botón sol/luna (theme.js comparte la elección con la web). */
:root {
  --bg: #0b1220;
  --band: radial-gradient(900px 320px at 50% -60px, rgba(124, 92, 255, 0.22), transparent 70%);
  --surface: #121a2c;
  --input-bg: #0b1220;
  --header: rgba(18, 26, 44, 0.92);
  --header-text: #e2e8f0;
  --header-muted: #94a3b8;
  --header-border: #334155;
  --header-chip: #1e293b;
  --header-chip-hover: #334155;
  --border: #1e293b;
  --border-strong: #334155;
  --text: #e2e8f0;
  --text-2: #cbd5e1;
  --muted: #94a3b8;
  --accent: #22d3ee;
  --eyebrow: #22d3ee;
  --link: #a78bfa;
  --primary: #7c5cff;
  --primary-bg: linear-gradient(135deg, #7c5cff, #22d3ee);
  --secondary-bg: #1e293b;
  --secondary-text: #e2e8f0;
  --hover: #1e293b;
  --shadow: rgba(0, 0, 0, 0.45);
  --card-shadow: none;
  --ok: #22c55e;
  --fail: #f87171;
  --error-bg: #451a1a;
  --error-text: #fecaca;
  --notice-bg: rgba(124, 92, 255, 0.12);
  --notice-border: rgba(124, 92, 255, 0.35);
  --radius-btn: 999px;
  --radius-card: 16px;
  --sun: block;
  --moon: none;
  color-scheme: dark;
}
:root[data-theme='light'] {
  --bg: #f4f6fa;
  --band: linear-gradient(#0b1d3a, #0b1d3a);
  --surface: #ffffff;
  --input-bg: #ffffff;
  --header: rgba(11, 29, 58, 0.97);
  --header-text: #ffffff;
  --header-muted: #9fb3d1;
  --header-border: rgba(255, 255, 255, 0.18);
  --header-chip: rgba(255, 255, 255, 0.08);
  --header-chip-hover: rgba(255, 255, 255, 0.16);
  --border: #e2e7ef;
  --border-strong: #c9d2df;
  --text: #0b1d3a;
  --text-2: #334155;
  --muted: #5b6b82;
  --accent: #3b2f9e;
  --eyebrow: #7dd3fc;
  --link: #3b2f9e;
  --primary: #3b2f9e;
  --primary-bg: #3b2f9e;
  --secondary-bg: #ffffff;
  --secondary-text: #0b1d3a;
  --hover: #eef1f6;
  --shadow: rgba(15, 23, 42, 0.16);
  --card-shadow: 0 1px 2px rgba(11, 29, 58, 0.04), 0 10px 28px rgba(11, 29, 58, 0.07);
  --ok: #15803d;
  --fail: #b91c1c;
  --error-bg: #fef2f2;
  --error-text: #991b1b;
  --notice-bg: #eceafb;
  --notice-border: #c7c1f0;
  --radius-btn: 10px;
  --radius-card: 14px;
  --sun: none;
  --moon: block;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    sans-serif;
  line-height: 1.5;
  background:
    var(--band) top / 100% 220px no-repeat,
    var(--bg);
  color: var(--text);
}
header {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  background: var(--header);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--header-border);
  color: var(--header-text);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.wordmark {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.accent {
  color: var(--accent);
}
header .accent {
  color: #22d3ee;
}
.section {
  color: var(--header-muted);
  font-size: 14px;
  padding-left: 12px;
  border-left: 1px solid var(--header-border);
}
.who {
  color: var(--muted);
  font-size: 14px;
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--header-border);
  border-radius: 10px;
  background: var(--header-chip);
  color: var(--header-text);
}
.theme-toggle:hover {
  background: var(--header-chip-hover);
  filter: none;
}
.theme-toggle svg {
  width: 20px;
  height: 20px;
}
.theme-toggle .sun {
  display: var(--sun);
}
.theme-toggle .moon {
  display: var(--moon);
}
main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 32px 16px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  padding: 24px 28px;
  margin-bottom: 24px;
}
h1,
h2 {
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
h2 {
  font-size: 22px;
}
.muted {
  color: var(--muted);
}
label {
  display: block;
  margin: 16px 0;
  color: var(--muted);
  font-size: 14px;
}
input,
textarea {
  display: block;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--input-bg);
  color: var(--text);
  font-size: 16px;
}
#code {
  font-family: ui-monospace, monospace;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
button {
  padding: 11px 20px;
  border: 0;
  border-radius: var(--radius-btn);
  background: var(--primary-bg);
  white-space: nowrap;
  color: #fff;
  font-weight: 600;
  font-family: inherit;
  font-size: 15px;
  cursor: pointer;
}
button:not(:disabled):hover {
  filter: brightness(1.08);
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
button.link {
  background: none;
  color: var(--link);
  padding: 6px 8px;
}
button.danger {
  background: none;
  border: 1px solid var(--fail);
  color: var(--fail);
  padding: 6px 12px;
}
table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 20px;
}
th,
td {
  padding: 10px 8px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
tbody tr:hover {
  background: var(--hover);
}
.panel td:not(:first-child),
.panel th:not(:first-child) {
  text-align: center;
}
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
}
.clear {
  background: #22c55e;
}
.review {
  background: #f59e0b;
}
.reactive {
  background: var(--fail);
}
.holder {
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 12px 16px;
  margin: 0 0 16px;
}

.holder legend {
  padding: 0 6px;
  color: var(--muted);
}

label.check {
  display: flex;
  gap: 8px;
  align-items: center;
}

label.check input {
  width: auto;
}

.photo {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.photo video,
.photo img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--input-bg);
}

.photo-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label.file {
  position: relative;
  margin: 0;
  padding: 12px 20px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--border-strong);
  background: var(--secondary-bg);
  color: var(--secondary-text);
  font-weight: 600;
  font-size: 15px;
  text-align: center;
  cursor: pointer;
}
label.file:hover {
  filter: brightness(1.08);
}
label.file:focus-within {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}
label.file input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

button.secondary {
  background: var(--secondary-bg);
  color: var(--secondary-text);
  border: 1px solid var(--border-strong);
}

.error {
  background: var(--error-bg);
  color: var(--error-text);
  padding: 12px 16px;
  border-radius: 12px;
}
.result {
  font-weight: 600;
}
.result.ok {
  color: var(--ok);
}
.result.fail {
  color: var(--fail);
}

.order-results {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.order-results label {
  margin: 0;
}

.profile-tests {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}

.profile-tests label.check {
  margin: 6px 0;
}

#profile-form input:not([type='checkbox']) {
  width: 100%;
  max-width: 420px;
  box-sizing: border-box;
}
.legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  padding: 24px 16px 40px;
  font-size: 14px;
}
.legal-links a {
  color: var(--muted);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
}

.filters label {
  margin: 0 0 16px;
}

td a {
  color: var(--link);
}

.filters select,
.approve select {
  display: block;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
}

.approve {
  margin: 0 0 16px;
  padding: 16px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
}

.approve input,
.approve select {
  width: 100%;
  max-width: 420px;
  box-sizing: border-box;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 12px;
}
.actions label {
  margin: 12px 0;
}
.account {
  position: relative;
}
.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--header-border);
  background: var(--header-chip);
  color: var(--header-text);
}
.avatar:hover,
.avatar[aria-expanded='true'] {
  background: var(--header-chip-hover);
}
.menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  min-width: 240px;
  max-width: calc(100vw - 32px);
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 12px 32px var(--shadow);
}
.menu-panel .who {
  margin: 4px 8px 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  overflow-wrap: anywhere;
}
.menu-panel button,
.menu-panel a {
  display: block;
  width: 100%;
  padding: 10px 8px;
  border-radius: 8px;
  background: none;
  color: var(--text);
  font-weight: 500;
  font-size: 15px;
  text-align: left;
  text-decoration: none;
}
.menu-panel button:hover,
.menu-panel a:hover,
.menu-panel button:focus-visible,
.menu-panel a:focus-visible {
  background: var(--border);
}
/* Las pestañas van sobre su propia tarjeta: en claro quedan encima de la franja azul marino. */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  padding: 0 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
}
.tabs [role='tab'] {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
}
.tabs [role='tab'][aria-selected='true'] {
  border-bottom-color: var(--accent);
  color: var(--text);
}
.tabs [role='tab']:not([aria-selected='true']):hover {
  color: var(--text);
  filter: none;
}
.tabs [role='tab'][hidden] {
  display: none;
}
.badge {
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
}
.badge[hidden] {
  display: none;
}
@media (max-width: 640px) {
  header .section {
    display: none;
  }
  main {
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }
  header {
    padding: 12px 16px;
  }
  .card {
    padding: 20px 16px;
  }
  table {
    display: block;
    overflow-x: auto;
  }
  .tabs {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    margin: 0;
    padding: 0 0 env(safe-area-inset-bottom);
    border: 0;
    border-top: 1px solid var(--border);
    border-radius: 0;
    box-shadow: none;
    background: var(--surface);
  }
  .tabs [role='tab'] {
    flex: 1;
    border-radius: 0;
    justify-content: center;
    padding: 14px 4px;
    border-bottom: 0;
    border-top: 2px solid transparent;
    font-size: 14px;
  }
  .tabs [role='tab'][aria-selected='true'] {
    border-top-color: var(--accent);
  }
}

.receipt-brand {
  font-weight: 800;
  font-size: 18px;
}
.receipt-note {
  font-size: 12px;
  color: #475569;
  margin-top: 24px;
}
@media print {
  body.printing-receipt {
    background: #fff;
    color: #0f172a;
  }
  body.printing-receipt > header,
  body.printing-receipt > footer,
  body.printing-receipt main > :not(.receipt) {
    display: none !important;
  }
  body.printing-receipt .receipt:not([hidden]) {
    display: block !important;
  }
  .receipt th,
  .receipt td {
    border-bottom: 1px solid #cbd5e1;
    color: #0f172a;
  }
  .receipt .accent {
    color: #0e7490;
  }
}

.notice {
  background: var(--notice-bg);
  border: 1px solid var(--notice-border);
  padding: 12px 16px;
  border-radius: 12px;
}
h3 {
  margin: 20px 0 8px;
  font-size: 15px;
}
.shoot-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.shoot-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  margin-bottom: 8px;
}
.shoot-list li.open {
  border-color: var(--primary);
}
.shoot-list li > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
button.link.danger-link {
  color: var(--fail);
}
