:root {
  --bg-app: #090c12;
  --bg-card: #111622;
  --bg-card-alt: #182133;
  --bg-input: #0c111a;
  --border-subtle: #232e44;
  --border-strong: #374869;
  --text-main: #f1f5fb;
  --text-muted: #93a3bc;
  --accent: #38bdf8;
  --accent-warm: #f59e0b;
  --gold: #fbbf24;
  --polish: #a855f7;
  --success: #22c55e;
  --danger: #ef4444;
  --radius: 12px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: radial-gradient(circle at top right, #121a2b 0%, var(--bg-app) 45%);
  color: var(--text-main);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  line-height: 1.45;
}

.hidden { display: none !important; }
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

/* TOPBAR */
.topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: rgba(14, 19, 30, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 30;
}

.brand-box { display: flex; align-items: center; gap: 12px; }

.logo-frame {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  background: #ffffff;
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--gold);
  box-shadow: 0 4px 18px rgba(251, 191, 36, 0.22);
  flex-shrink: 0;
}

.logo-img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }

.brand-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.brand-meta h1 { margin: 0; font-size: 1.12rem; letter-spacing: 0.06em; font-weight: 800; }
.brand-subtitle { margin: 2px 0 0; font-size: 0.76rem; color: var(--text-muted); }

.badge-premium {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(251, 191, 36, 0.12));
  color: var(--gold);
  border: 1px solid rgba(251, 191, 36, 0.45);
}

.topbar-actions { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }

/* LAYOUT */
.workspace-grid {
  display: grid;
  grid-template-columns: 315px minmax(0, 1fr) 355px;
  gap: 15px;
  padding: 15px 20px 32px;
  align-items: start;
}

@media (max-width: 1280px) {
  .workspace-grid { grid-template-columns: 295px minmax(0, 1fr); }
  .col-right { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
}

@media (max-width: 860px) {
  .workspace-grid { grid-template-columns: 1fr; padding: 12px; }
  .col-right { grid-template-columns: 1fr; }
}

.panel { display: flex; flex-direction: column; gap: 13px; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
}

.card-highlight {
  border-color: rgba(251, 191, 36, 0.35);
  background: linear-gradient(180deg, #161d2e 0%, #111622 100%);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.card-header h2 { margin: 0; font-size: 0.95rem; font-weight: 700; }
.card-desc { margin: 3px 0 0; font-size: 0.77rem; color: var(--text-muted); }

.tag-gold {
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--gold);
  background: rgba(251, 191, 36, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.32);
  padding: 2px 7px;
  border-radius: 999px;
}

/* FORM */
.form-group { margin-bottom: 9px; }
.form-group label { display: block; font-size: 0.76rem; color: var(--text-muted); margin-bottom: 4px; font-weight: 600; }

input[type="text"],
input[type="number"],
select,
textarea {
  width: 100%;
  background: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 7px 9px;
  font-size: 0.84rem;
  font-family: inherit;
}

input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
textarea { resize: vertical; min-height: 50px; }

.form-row-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.row-gap { display: flex; gap: 6px; align-items: center; }

.switches-stack { display: flex; flex-direction: column; gap: 7px; margin-top: 8px; }
.checkbox-inline {
  display: flex !important;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.75rem !important;
  color: var(--text-main) !important;
  cursor: pointer;
}
.checkbox-inline input { margin-top: 3px; accent-color: var(--accent); }

.transpose-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 5px 8px;
}
.transpose-pill { font-weight: 800; font-size: 0.82rem; color: var(--gold); }
.compact-select { width: auto !important; max-width: 170px; font-size: 0.75rem !important; padding: 5px 8px !important; }

/* BUTTONS */
.btn {
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.79rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.08s ease, background 0.15s ease, border-color 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #05111a; }
.btn-primary:hover:not(:disabled) { background: #7dd3fc; }
.btn-polish {
  background: linear-gradient(135deg, #9333ea 0%, #c084fc 100%);
  color: #ffffff;
  border-color: rgba(216, 180, 254, 0.45);
}
.btn-polish:hover:not(:disabled) { filter: brightness(1.08); }
.btn-secondary { background: var(--bg-card-alt); color: var(--text-main); border-color: var(--border-strong); }
.btn-secondary:hover:not(:disabled) { border-color: var(--accent); }
.btn-ghost { background: transparent; color: var(--text-main); border-color: var(--border-subtle); }
.btn-ghost:hover:not(:disabled) { background: var(--bg-card-alt); }
.btn-play { background: var(--success); color: #04150a; padding: 8px 14px; }
.btn-play:hover:not(:disabled) { background: #4ade80; }
.btn-sm { padding: 5px 9px; font-size: 0.74rem; }
.btn-xs { padding: 3px 7px; font-size: 0.7rem; }
.btn-danger-ghost { background: transparent; color: #fca5a5; border-color: rgba(239, 68, 68, 0.35); }
.btn-danger-ghost:hover:not(:disabled) { background: rgba(239, 68, 68, 0.15); }

/* TRANSPORT & WEB MIDI */
.transport-card {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: linear-gradient(90deg, #131c30 0%, #101622 100%);
}
.transport-left, .transport-right { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.transport-status { display: flex; flex-direction: column; }
#transportPosition { font-weight: 700; font-size: 0.85rem; color: var(--accent); }
.muted-small { font-size: 0.73rem; color: var(--text-muted); }
.mini-slider { display: flex; align-items: center; gap: 6px; font-size: 0.74rem; color: var(--text-muted); }
.mini-slider input { width: 72px; }
.midi-out-box { display: flex; align-items: center; gap: 6px; }

/* PALETTE */
.palette-card { padding: 10px 14px; }
.palette-header { margin-bottom: 8px; font-size: 0.78rem; }
.palette-title strong { color: var(--gold); }
.palette-title code { color: var(--accent); font-family: Consolas, monospace; }
.chord-chips-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chord-chip {
  background: var(--bg-card-alt);
  color: var(--gold);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}
.chord-chip:hover { border-color: var(--gold); background: rgba(251, 191, 36, 0.14); }

/* SECTIONS */
.sections-list { display: flex; flex-direction: column; gap: 10px; }
.section-box {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 11px;
}
.section-box.looping { border-color: var(--success); box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.35); }
.section-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 7px; margin-bottom: 9px; }
.section-badge { font-weight: 800; font-size: 0.85rem; color: var(--accent); }
.section-controls-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 0.73rem; color: var(--text-muted); }
.section-controls-inline select,
.section-controls-inline input[type="number"] { width: auto !important; padding: 3px 6px !important; font-size: 0.73rem !important; }

.chords-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; margin-bottom: 8px; }
.chord-cell { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: 6px; padding: 5px 6px; }
.chord-cell.selected-cell { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.45); }
.chord-cell span { display: block; font-size: 0.64rem; color: var(--text-muted); margin-bottom: 2px; }
.chord-cell input { padding: 4px 5px !important; font-size: 0.8rem !important; font-weight: 700; color: var(--gold) !important; text-align: center; }

/* MATRIX */
.matrix-scroll { overflow-x: auto; }
.matrix-table { width: 100%; border-collapse: collapse; font-size: 0.72rem; }
.matrix-table th, .matrix-table td { border: 1px solid var(--border-subtle); padding: 4px 5px; text-align: center; }
.matrix-table th:first-child, .matrix-table td:first-child { text-align: left; white-space: nowrap; font-weight: 600; background: var(--bg-input); position: sticky; left: 0; }
.toggle-pill { width: 31px; height: 21px; border-radius: 5px; border: 1px solid var(--border-subtle); background: #1a2130; color: var(--text-muted); font-size: 0.65rem; font-weight: 700; cursor: pointer; }
.toggle-pill.active { background: rgba(34, 197, 94, 0.22); border-color: rgba(34, 197, 94, 0.55); color: #86efac; }

/* HUMANIZER */
.slider-group { margin-bottom: 9px; }
.slider-row { display: flex; justify-content: space-between; font-size: 0.76rem; margin-bottom: 2px; }
.slider-row span { color: var(--accent); font-weight: 700; }
input[type="range"] { width: 100%; accent-color: var(--accent); cursor: pointer; }

/* CONSOLA 12 PISTAS */
.tracks-export-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 11px; max-height: 480px; overflow-y: auto; }
.track-export-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 7px 9px;
  font-size: 0.75rem;
}
.track-top-line { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.track-export-meta { display: flex; flex-direction: column; min-width: 0; }
.track-export-meta strong { font-size: 0.77rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-export-meta small { color: var(--text-muted); font-size: 0.67rem; }
.track-controls-line { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.track-controls-line select { width: auto !important; padding: 2px 5px !important; font-size: 0.69rem !important; }
.pill-ms {
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  background: #171e2d;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
}
.pill-ms.muted { background: rgba(239, 68, 68, 0.25); color: #fca5a5; border-color: rgba(239, 68, 68, 0.55); }
.pill-ms.soloed { background: rgba(245, 158, 11, 0.28); color: var(--gold); border-color: rgba(251, 191, 36, 0.65); }

/* SAVED SONGS */
.saved-list { display: flex; flex-direction: column; gap: 6px; max-height: 185px; overflow-y: auto; margin-bottom: 8px; }
.saved-item { display: flex; justify-content: space-between; align-items: center; gap: 6px; background: var(--bg-input); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); padding: 7px 9px; font-size: 0.76rem; }
.saved-item-info { cursor: pointer; flex: 1; min-width: 0; }
.saved-item-info strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.saved-item-info small { color: var(--text-muted); font-size: 0.68rem; }
.upload-json-label { width: 100%; cursor: pointer; }

/* REAPER TIP */
.reaper-tip-box {
  background: rgba(56, 189, 248, 0.07);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  font-size: 0.74rem;
  color: var(--text-muted);
}
.reaper-tip-box strong { color: var(--text-main); display: block; margin-bottom: 4px; }
.reaper-tip-box ol { margin: 0; padding-left: 16px; }
.reaper-tip-box li { margin-bottom: 3px; }
.reaper-tip-box code { color: var(--accent); font-family: Consolas, monospace; }

/* MODALES (CABINA & MAPA PERCUSIÓN) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 14, 0.88);
  backdrop-filter: blur(8px);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 18px;
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
}

.drum-map-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.modal-footer { display: flex; justify-content: flex-end; }

.booth-container {
  width: 100%;
  max-width: 960px;
  height: 90vh;
  background: #0b0f18;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.booth-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: #121826;
  border-bottom: 1px solid var(--border-subtle);
}

.booth-brand { display: flex; align-items: center; gap: 12px; }
.booth-logo { width: 42px; height: 42px; border-radius: 8px; background: #fff; padding: 2px; object-fit: contain; }
.booth-header h2 { margin: 0; font-size: 1.05rem; }

.beat-pulse {
  font-size: 1.3rem;
  color: var(--border-strong);
  transition: transform 0.08s ease, color 0.08s ease;
}
.beat-pulse.lit { color: var(--success); transform: scale(1.3); }

.booth-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 30px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.booth-section {
  background: #111726;
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 16px 20px;
}
.booth-section h3 { margin: 0 0 6px; font-size: 1rem; color: var(--accent); letter-spacing: 0.04em; text-transform: uppercase; }
.booth-chords { font-size: 1.05rem; font-weight: 800; color: var(--gold); margin-bottom: 10px; letter-spacing: 0.03em; }
.booth-lyrics { font-size: 1.38rem; line-height: 1.55; white-space: pre-wrap; color: #f8fafc; }

/* TOAST */
.toast-container { position: fixed; bottom: 18px; right: 18px; z-index: 95; display: flex; flex-direction: column; gap: 8px; }
.toast { background: #172133; color: var(--text-main); border: 1px solid var(--accent); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 0.8rem; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); }

/* === V4 ADDITIVE MODULES (BÓVEDA RFX, TARAREO->MIDI, AUDITOR COMERCIAL) === */
.modal-wide { max-width: 680px; }

.rfx-vault-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 55vh;
  overflow-y: auto;
  margin-bottom: 12px;
}

.rfx-slot-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 0.78rem;
}

.rfx-slot-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.rfx-slot-meta strong { font-size: 0.8rem; }
.rfx-slot-meta small { color: var(--text-muted); font-size: 0.7rem; }
.rfx-slot-meta small.assigned { color: #86efac; font-weight: 600; }

.hum-stage {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
}

.hum-live-readout strong {
  display: block;
  font-size: 2.2rem;
  color: var(--gold);
  margin-top: 4px;
  letter-spacing: 0.04em;
}

.hum-result-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 10px;
  font-size: 0.78rem;
  color: var(--text-main);
  word-break: break-word;
}

.audit-score-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #162138 0%, #101725 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 12px;
}

.audit-score-num { font-size: 2rem; font-weight: 900; color: var(--gold); }

.audit-checks-list { display: flex; flex-direction: column; gap: 8px; }

.audit-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--success);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 0.8rem;
}

.audit-item.warn { border-left-color: var(--accent-warm); }
.audit-item strong { display: block; margin-bottom: 2px; }
.audit-item small { color: var(--text-muted); font-size: 0.75rem; }

/* === V5 ADDITIVE STYLES (SAAS, AI STUDIO, PIANO ROLL IMÁN DE ESCALA) === */
.modal-xl { max-width: 960px; }

.btn-ai {
  background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
  color: #ffffff;
  border-color: rgba(125, 211, 252, 0.45);
}
.btn-ai:hover:not(:disabled) { filter: brightness(1.1); }

.badge-free {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.v5-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.v5-tab {
  flex: 1;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
}
.v5-tab.active {
  background: rgba(56, 189, 248, 0.16);
  border-color: var(--accent);
  color: var(--text-main);
}

.form-row-3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 9px; }

.audio-drop-box {
  background: var(--bg-input);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 18px;
  text-align: center;
}

/* PIANO ROLL */
.riff-studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 14px;
}
@media (max-width: 820px) {
  .riff-studio-grid { grid-template-columns: 1fr; }
}
.riff-lib-panel {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px;
}
.pr-scroll {
  overflow-x: auto;
  max-height: 390px;
  overflow-y: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: #0a0e16;
}
.pr-grid { display: flex; flex-direction: column; min-width: 560px; }
.pr-row { display: flex; border-bottom: 1px solid #172033; }
.pr-header-row { position: sticky; top: 0; background: #131b2c; z-index: 2; font-size: 0.7rem; font-weight: 700; color: var(--accent); }
.pr-note-label {
  width: 72px;
  flex-shrink: 0;
  padding: 4px 6px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  background: #0f1522;
  border-right: 1px solid var(--border-subtle);
}
.pr-note-label.in-scale { color: var(--gold); }
.pr-cells-row { display: grid; grid-template-columns: repeat(16, minmax(26px, 1fr)); flex: 1; }
.pr-head-cell { text-align: center; padding: 4px 0; border-right: 1px solid #1e2940; }
.pr-cell {
  height: 22px;
  border: none;
  border-right: 1px solid #151e30;
  background: transparent;
  cursor: pointer;
}
.pr-cell.beat-start { border-left: 1px solid #2d3d5e; }
.pr-cell:hover { background: rgba(56, 189, 248, 0.22); }
.pr-cell.on { background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%); box-shadow: inset 0 0 0 1px #0b0e14; }

/* PRICING & SAAS */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
@media (max-width: 820px) {
  .pricing-grid { grid-template-columns: 1fr; }
}
.pricing-card {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pricing-card.featured {
  border-color: var(--gold);
  background: linear-gradient(180deg, #171f33 0%, #0e1320 100%);
}
.pricing-card.current { box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.55); }
.pricing-top { display: flex; justify-content: space-between; align-items: center; font-size: 0.9rem; }
.pricing-price { font-size: 1.45rem; font-weight: 900; color: var(--gold); }
.pricing-price small { font-size: 0.72rem; color: var(--text-muted); font-weight: 600; }
.pricing-list { margin: 0; padding: 0; list-style: none; font-size: 0.75rem; color: var(--text-muted); display: flex; flex-direction: column; gap: 4px; flex: 1; }

.saas-admin-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
@media (max-width: 820px) {
  .saas-admin-grid { grid-template-columns: 1fr; }
}
.saas-box {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px;
}
.saas-box h3 { margin: 0 0 9px; font-size: 0.86rem; color: var(--accent); }
.legal-footer-note {
  font-size: 0.73rem;
  color: var(--text-muted);
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
}

/* === V6 ADDITIVE STYLES (CUARTO INDIVIDUAL + ULTRA-HUMANIZADOR V6) === */
.badge-room {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.38);
}

.v6-polish-box {
  margin-top: 10px;
  padding: 10px 11px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.12) 0%, rgba(56, 189, 248, 0.08) 100%);
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: var(--radius-sm);
}

/* === V7 ADDITIVE STYLES (LANDING DE VENTAS, PANEL ADMIN SUSCRIPTORES Y CUOTA) === */
.badge-quota {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.14);
  color: var(--accent);
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.landing-main { max-width: 1120px; margin: 0 auto; padding: 28px 20px 48px; display: flex; flex-direction: column; gap: 34px; }
.landing-hero { display: grid; grid-template-columns: 1.35fr 1fr; gap: 24px; align-items: center; }
@media (max-width: 860px) { .landing-hero { grid-template-columns: 1fr; } }
.hero-copy h2 { font-size: 2rem; line-height: 1.2; margin: 12px 0; }
.hero-copy p { color: var(--text-muted); font-size: 0.96rem; margin: 0; }
.hero-card { background: var(--bg-card); border: 1px solid rgba(251, 191, 36, 0.35); border-radius: 16px; padding: 20px; text-align: center; }
.hero-logo-big { width: 150px; height: auto; background: #fff; padding: 8px; border-radius: 14px; margin-bottom: 12px; }
.hero-bullets { list-style: none; padding: 0; margin: 0; text-align: left; font-size: 0.82rem; color: var(--text-muted); display: flex; flex-direction: column; gap: 6px; }
.landing-h3 { margin: 0 0 14px; font-size: 1.3rem; }
.landing-features-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 760px) { .landing-features-grid { grid-template-columns: 1fr; } }
.landing-features-grid h4 { margin: 0 0 6px; font-size: 0.96rem; color: var(--accent); }
.landing-footer { border-top: 1px solid var(--border-subtle); padding: 18px 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 0.78rem; color: var(--text-muted); }

/* ADMIN SHELL */
.admin-shell { max-width: 1180px; margin: 0 auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.admin-login-grid { display: grid; grid-template-columns: 1.3fr 1.2fr 0.8fr; gap: 12px; }
.admin-stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.admin-create-grid { display: grid; grid-template-columns: 1.1fr 1.3fr 1fr 0.6fr 0.9fr; gap: 10px; }
@media (max-width: 920px) {
  .admin-login-grid, .admin-stats-grid, .admin-create-grid { grid-template-columns: 1fr; }
}
.stat-card { text-align: center; }
.stat-card small { display: block; color: var(--text-muted); font-size: 0.76rem; }
.stat-card strong { display: block; font-size: 1.8rem; color: var(--gold); margin-top: 4px; }
.admin-table-wrap { overflow-x: auto; }

/* === v0.7.1 UX POLISH: EMAIL/PASSWORD DARK FIX, DROPDOWN MENUS, WORKFLOW STRIP === */
input[type="email"],
input[type="password"] {
  width: 100%;
  background: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 7px 9px;
  font-size: 0.84rem;
  font-family: inherit;
}

/* DROPDOWN MENUS EN TOPBAR */
.nav-dropdown { position: relative; display: inline-flex; }
.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  min-width: 245px;
  background: #141b2a;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  padding: 6px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.58);
  z-index: 70;
  flex-direction: column;
  gap: 3px;
}
.dropdown-menu-right { left: auto; right: 0; }
.nav-dropdown.open .dropdown-menu { display: flex; }

.dropdown-label {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 5px 9px 3px;
}

.dropdown-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 4px 4px;
}

.dropdown-item {
  width: 100%;
  text-align: left;
  background: transparent;
  color: var(--text-main);
  border: none;
  border-radius: 7px;
  padding: 8px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: inherit;
  transition: background 0.12s ease;
}
.dropdown-item:hover { background: var(--bg-card-alt); color: #ffffff; }
.dropdown-item.dropdown-danger { color: #fca5a5; }
.dropdown-item.dropdown-danger:hover { background: rgba(239, 68, 68, 0.16); }

/* BARRA DE FLUJO FÁCIL EN 3 PASOS */
.workflow-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  background: rgba(17, 22, 34, 0.82);
  border-bottom: 1px solid var(--border-subtle);
}
.workflow-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.wf-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 4px 11px 4px 5px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease;
}
.wf-step:hover { border-color: var(--accent); background: var(--bg-card-alt); }
.wf-num {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.18);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
}
.wf-arrow { color: var(--border-strong); font-weight: 700; font-size: 0.8rem; }
.workflow-right { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* === v0.7.3 ADDITIVE STYLES (TAP TEMPO, MAPA VISUAL DE ENERGÍA, MODO PRUEBA DOBLE CLIC) === */
.badge-local {
  font-size: 0.64rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(168, 85, 247, 0.2);
  color: #e9d5ff;
  border: 1px solid rgba(192, 132, 252, 0.5);
}

.tap-flash {
  background: rgba(251, 191, 36, 0.28) !important;
  border-color: var(--gold) !important;
  color: var(--gold) !important;
}

.emap-wrapper {
  background: #0a0f18;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-bottom: 12px;
}

.emap-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 7px;
  flex-wrap: wrap;
}

.emap-ribbon {
  display: flex;
  gap: 4px;
  min-height: 46px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.emap-block {
  position: relative;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: #121a2b;
  color: var(--text-main);
  padding: 5px 6px;
  min-width: 66px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-family: inherit;
  transition: transform 0.1s ease, border-color 0.14s ease;
}

.emap-block:hover { transform: translateY(-1px); border-color: var(--accent); }

.emap-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.24;
  pointer-events: none;
}

.emap-coro .emap-fill { background: linear-gradient(180deg, #f59e0b, #d97706); }
.emap-coro { border-color: rgba(245, 158, 11, 0.45); }

.emap-mambo .emap-fill { background: linear-gradient(180deg, #ef4444, #b91c1c); }
.emap-mambo { border-color: rgba(239, 68, 68, 0.45); }

.emap-bridge .emap-fill { background: linear-gradient(180deg, #a855f7, #7e22ce); }
.emap-bridge { border-color: rgba(168, 85, 247, 0.45); }

.emap-verso .emap-fill { background: linear-gradient(180deg, #38bdf8, #0284c7); }
.emap-edge .emap-fill { background: linear-gradient(180deg, #64748b, #334155); }

.emap-label { position: relative; z-index: 1; font-size: 0.7rem; font-weight: 700; white-space: nowrap; }
.emap-meta { position: relative; z-index: 1; font-size: 0.62rem; color: var(--text-muted); }

.emap-focus-pulse {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.45) !important;
}

/* === v0.7.4 FINAL PREMIUM ERGONOMICS (SCROLLBARS DARK, STICKY TRANSPORT, MODO FÁCIL, COMPACT SECTIONS) === */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #0a0f18; border-radius: 6px; }
::-webkit-scrollbar-thumb { background: #26334d; border-radius: 6px; border: 1px solid #0a0f18; }
::-webkit-scrollbar-thumb:hover { background: #3b5078; }

.palette-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Barra de transporte flotante al hacer scroll largo en pantallas grandes */
@media (min-width: 960px) {
  .transport-card {
    position: sticky;
    top: 84px;
    z-index: 20;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.42);
  }
}

.transport-card.is-playing {
  border-color: rgba(34, 197, 94, 0.65);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.35), 0 10px 26px rgba(0, 0, 0, 0.45);
}

/* Modo Fácil: oculta columna derecha (Humanizador/Consola) y Matriz para enfocar 100% en componer fácil */
body.easy-focus-mode .workspace-grid {
  grid-template-columns: 325px minmax(0, 1fr);
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
}
body.easy-focus-mode .col-right { display: none !important; }
body.easy-focus-mode .col-center > .card:last-child { display: none !important; }
@media (max-width: 860px) {
  body.easy-focus-mode .workspace-grid { grid-template-columns: 1fr; }
}

/* Compactar / Expandir secciones */
.section-badge {
  cursor: pointer;
  user-select: none;
  transition: color 0.12s ease;
}
.section-badge:hover { color: var(--gold); }
.section-badge::before {
  content: "▾ ";
  font-size: 0.72rem;
  opacity: 0.65;
}
.sections-compact .section-box:not(.single-expanded) .chords-grid,
.sections-compact .section-box:not(.single-expanded) textarea,
.section-box.single-collapsed .chords-grid,
.section-box.single-collapsed textarea {
  display: none;
}
.sections-compact .section-box:not(.single-expanded) .section-top,
.section-box.single-collapsed .section-top {
  margin-bottom: 0;
}
.sections-compact .section-box:not(.single-expanded) .section-badge::before,
.section-box.single-collapsed .section-badge::before {
  content: "▸ ";
}

/* === v0.7.5 CLEAN STUDIO UI (ZERO-CLUTTER WORKSPACE TABS + PROGRESSIVE DISCLOSURE) === */
.topbar-clean { padding: 9px 18px; gap: 10px; }
.logo-frame-sm { width: 46px; height: 46px; border-radius: 10px; }
.workflow-strip-clean { padding: 6px 18px; }

/* Pestañas de estudio estilo DAW profesional */
.studio-view-tabs {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #0a0f18;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 3px;
}
.studio-tab {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}
.studio-tab:hover { color: var(--text-main); background: rgba(56, 189, 248, 0.08); }
.studio-tab.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(99, 102, 241, 0.2));
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.45);
}

/* Ajuste sticky de barra de transporte para topbar más compacto */
@media (min-width: 960px) {
  .transport-card { top: 68px; padding: 10px 14px; }
}

/* Desplegable elegante de Opciones Avanzadas en Columna Izquierda */
.clean-details {
  margin-top: 8px;
  background: #0a0f18;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
}
.clean-details > summary {
  cursor: pointer;
  font-size: 0.77rem;
  font-weight: 700;
  color: var(--accent);
  user-select: none;
}
.clean-details[open] > summary { margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border-subtle); }

/* --- VISTA 1 (DEFECTO): 🎼 COMPONER — LIMPIA, ANCHA Y SIN MAREO --- */
body.v075-view-compose .workspace-grid {
  grid-template-columns: 320px minmax(0, 1fr);
  max-width: 1360px;
  width: 100%;
  margin: 0 auto;
}
body.v075-view-compose .col-right { display: none !important; }
body.v075-view-compose .card-mix-only { display: none !important; }

/* --- VISTA 2: 🎛 MEZCLA Y 12 PISTAS — CONSOLA ANCHA DE PRODUCTOR --- */
body.v075-view-mix .workspace-grid {
  grid-template-columns: 1fr;
  max-width: 1420px;
  width: 100%;
  margin: 0 auto;
}
body.v075-view-mix .col-left { display: none !important; }
body.v075-view-mix .card-compose-only { display: none !important; }
body.v075-view-mix .col-right {
  display: grid !important;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 15px;
  align-items: start;
}
body.v075-view-mix .tracks-export-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: none;
}
@media (max-width: 1020px) {
  body.v075-view-mix .col-right { grid-template-columns: 1fr; }
  body.v075-view-mix .tracks-export-list { grid-template-columns: 1fr; }
}

/* --- VISTA 3: ⊞ TODO (3 COLUMNAS CLÁSICAS PARA MONITORES GRANDES) --- */
body.v075-view-all .workspace-grid {
  grid-template-columns: 310px minmax(0, 1fr) 350px;
}

@media (max-width: 860px) {
  body.v075-view-compose .workspace-grid,
  body.v075-view-all .workspace-grid {
    grid-template-columns: 1fr;
  }
}

/* Revelación progresiva en tarjetas de sección (oculta controles secundarios hasta pulsar ⚙ Ajustes) */
.section-box .sec-adv-ctrl { display: none !important; }
.section-box.sec-adv-open .sec-adv-ctrl { display: inline-flex !important; }
.section-box.sec-adv-open select.sec-adv-ctrl { display: inline-block !important; }
.btn-sec-more { color: var(--text-muted); }
.section-box.sec-adv-open .btn-sec-more {
  color: var(--gold);
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.1);
}

/* === v0.7.6 MOBILE APP EXPERIENCE (ANDROID/iOS PWA) + LIVE COMMERCIAL METER === */
.badge-offline {
  font-size: 0.64rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.18);
  color: var(--gold);
  border: 1px solid rgba(251, 191, 36, 0.5);
}

.btn-install-ready {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.25), rgba(56, 189, 248, 0.25)) !important;
  border-color: rgba(34, 197, 94, 0.65) !important;
  color: #bbf7d0 !important;
}

.btn-hit-pro {
  background: linear-gradient(135deg, #f59e0b 0%, #eab308 100%);
  color: #090c12;
  font-weight: 800;
  border-color: rgba(251, 191, 36, 0.6);
}
.btn-hit-pro:hover { filter: brightness(1.08); }

.score-pill {
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 800;
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.08s ease;
}
.score-pill:active { transform: scale(0.97); }
.score-pill.score-high { color: #86efac; border-color: rgba(34, 197, 94, 0.55); background: rgba(34, 197, 94, 0.14); }
.score-pill.score-mid  { color: var(--gold); border-color: rgba(251, 191, 36, 0.55); background: rgba(245, 158, 11, 0.14); }
.score-pill.score-low  { color: #fca5a5; border-color: rgba(239, 68, 68, 0.55); background: rgba(239, 68, 68, 0.14); }

/* Barra inferior de App nativa oculta en laptop/desktop */
.mobile-bottom-nav { display: none; }

/* === ADAPTACIÓN PRO PARA CELULARES (ANDROID & iPHONE <= 860px) === */
@media (max-width: 860px) {
  body {
    padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px));
    -webkit-tap-highlight-color: transparent;
  }

  .topbar-clean {
    padding: calc(8px + env(safe-area-inset-top, 0px)) 12px 8px;
    gap: 8px;
  }
  .logo-frame-sm { width: 38px; height: 38px; border-radius: 9px; }
  .brand-meta h1 { font-size: 0.94rem; }
  .brand-subtitle,
  .badge-room,
  .studio-view-tabs,
  .workflow-steps { display: none !important; }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
    gap: 5px;
  }
  .topbar-actions > .btn,
  .topbar-actions > .nav-dropdown > .btn {
    padding: 8px 9px;
    font-size: 0.76rem;
    min-height: 38px;
  }
  .btn-install-top { display: none !important; }

  .workflow-strip-clean {
    padding: 6px 12px;
    justify-content: space-between;
  }
  .workflow-right {
    width: 100%;
    justify-content: space-between;
    gap: 5px;
  }
  #autosavePill { display: none; }

  .workspace-grid {
    padding: 10px 10px 24px !important;
    gap: 11px;
  }
  .card { padding: 12px; }

  /* Evita zoom involuntario de Safari iOS al tocar campos */
  input[type="text"],
  input[type="number"],
  input[type="email"],
  input[type="password"],
  select,
  textarea {
    font-size: 16px !important;
    min-height: 40px;
  }

  /* Botones táctiles cómodos para pulgar */
  .btn { min-height: 38px; }
  .btn-xs { min-height: 34px; padding: 5px 9px; font-size: 0.74rem; }

  /* Transporte móvil compacto */
  .transport-card { padding: 10px 12px; gap: 8px; }
  .transport-left { width: 100%; justify-content: space-between; }
  .transport-right { width: 100%; justify-content: space-between; }
  .midi-out-box { display: none; }

  /* Paleta de acordes deslizable horizontal con el dedo (sin ocupar media pantalla) */
  .chord-chips-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .chord-chip {
    flex: 0 0 auto;
    padding: 8px 14px;
    font-size: 0.85rem;
    min-height: 38px;
  }

  /* Cuadrícula de acordes cómoda de 2 columnas en celular */
  .chords-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }
  .chord-cell input { font-size: 15px !important; min-height: 36px; }

  /* Modales a pantalla cómoda en celular */
  .modal-overlay { padding: 8px; align-items: flex-end; }
  .modal-card {
    max-height: 90dvh;
    border-radius: 16px 16px 12px 12px;
    padding: 15px;
  }
  .booth-container { height: 94dvh; border-radius: 14px; }
  .booth-body { padding: 14px; }
  .booth-lyrics { font-size: 1.2rem; }
  .drum-map-grid, .form-row-3 { grid-template-columns: 1fr; }

  /* Toast encima de la barra inferior móvil */
  .toast-container {
    left: 12px;
    right: 12px;
    bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  }

  /* Barra inferior fija estilo App Nativa */
  .mobile-bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    background: rgba(11, 15, 24, 0.97);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-strong);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    gap: 4px;
  }
  .mob-nav-btn {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.67rem;
    font-weight: 700;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 2px;
    border-radius: 10px;
    min-height: 48px;
    cursor: pointer;
  }
  .mob-ico { font-size: 1.15rem; line-height: 1; }
  .mob-nav-btn.active {
    color: #ffffff;
    background: rgba(56, 189, 248, 0.16);
    box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.42);
  }
  .mob-nav-play {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #04150a !important;
    font-weight: 800;
  }
  .mob-nav-play.is-playing {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: #ffffff !important;
  }
}

/* === v1.0 FINAL COMMERCIAL POLISH (SMART DEVICE PILL + MOBILE DROPDOWN GUARD + TOUCH RESPONSE) === */
button, a, select, input, summary { touch-action: manipulation; }

.device-detect-pill {
  display: inline-block;
  margin: 5px 0 0;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.35);
}

@media (max-width: 860px) {
  .dropdown-menu {
    min-width: 220px;
    max-width: calc(100vw - 24px);
    max-height: 70dvh;
    overflow-y: auto;
  }
  .dropdown-item {
    min-height: 40px;
    font-size: 0.84rem;
  }
  .section-top {
    gap: 6px;
  }
}

/* === v1.0.1 ONE-CLICK SALES SWITCH BANNER === */
.sales-switch-banner {
  background: linear-gradient(135deg, rgba(16, 24, 42, 0.96), rgba(14, 30, 48, 0.92));
  border: 1px solid rgba(56, 189, 248, 0.42);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sales-switch-banner.sales-active {
  border-color: rgba(34, 197, 94, 0.6);
  background: linear-gradient(135deg, rgba(12, 34, 24, 0.92), rgba(14, 24, 40, 0.95));
}
.sales-switch-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.sales-switch-copy { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 220px; }
.sales-switch-copy strong { font-size: 0.88rem; color: var(--gold); }
.sales-switch-banner.sales-active .sales-switch-copy strong { color: #86efac; }
.sales-switch-copy small { font-size: 0.75rem; color: var(--text-muted); }
.sales-share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}
.sales-share-row input {
  flex: 1;
  min-width: 210px;
  font-size: 0.76rem !important;
  color: var(--accent) !important;
}

/* === v1.0.2 FINAL VISUAL POLISH (CELULAR + LAPTOP + SAFARI) === */
.clean-details-plain > summary::-webkit-details-marker { display: none; }
.clean-details-plain > summary::marker { content: ""; }

@media (min-width: 861px) and (max-width: 1380px) {
  .topbar-clean { padding: 8px 14px; gap: 8px; }
  .brand-meta h1 { font-size: 1.02rem; }
  .brand-subtitle { display: none; }
  .studio-tab { padding: 5px 10px; font-size: 0.75rem; }
  .topbar-actions > .btn,
  .topbar-actions > .nav-dropdown > .btn { padding: 5px 8px; font-size: 0.73rem; }
}

@media (max-width: 860px) {
  .topbar-actions { position: relative; }
  .topbar-actions .nav-dropdown { position: static; }
  .topbar-actions .dropdown-menu,
  .topbar-actions .dropdown-menu-right {
    left: 0;
    right: 0;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    top: calc(100% + 8px);
    padding: 8px;
    border-radius: 13px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.72);
  }
  .topbar-actions .dropdown-item {
    min-height: 44px;
    padding: 9px 12px;
    font-size: 0.86rem;
  }
  .sales-share-row { flex-direction: column; align-items: stretch; }
  .sales-share-row .btn { width: 100%; }
}

@media (max-width: 440px) {
  #btnRecoverDraft { display: none; }
  .workflow-right { gap: 4px; }
  .score-pill { font-size: 0.69rem; padding: 3px 8px; }
}

/* === v1.0.5 QUICK-START UPLOAD & LOCAL RADIOGRAPHY CARD === */
.quick-start-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 7px;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid var(--border-subtle);
}
.quick-start-row .btn {
  width: 100%;
  font-size: 0.74rem;
  padding: 7px 8px;
}
.radiography-card {
  margin-top: 12px;
  background: linear-gradient(135deg, rgba(16, 26, 46, 0.96), rgba(14, 34, 44, 0.92));
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.rad-title {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--gold);
  word-break: break-word;
}
.rad-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}
@media (max-width: 640px) {
  .rad-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.rad-stat {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 7px;
  padding: 7px 8px;
  text-align: center;
}
.rad-stat small { display: block; font-size: 0.67rem; color: var(--text-muted); }
.rad-stat strong { display: block; font-size: 0.84rem; color: var(--accent); margin-top: 2px; }
.rad-note { font-size: 0.75rem; color: var(--text-muted); line-height: 1.4; }
