/* admin/admin.css — AppleStore CMS · línea visual tipo App Store Connect (dark) */
:root {
  --bg: #1a1b1e;
  --bg2: #202127;
  --card: #26272e;
  --card2: #2d2e36;
  --line: rgba(255,255,255,.09);
  --line2: rgba(255,255,255,.16);
  --text: #f5f5f7;
  --muted: #98989f;
  --accent: #0a84ff;
  --accent-soft: rgba(10,132,255,.16);
  --ok: #30d158;
  --warn: #ffd60a;
  --warn-dim: #ff9f0a;
  --danger: #ff453a;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(0,0,0,.28);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.45);
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
code {
  background: var(--bg2); padding: 1px 7px; border-radius: 6px;
  font-size: 12px; border: 1px solid var(--line);
}
h1, h2, h3 { letter-spacing: -0.01em; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 5px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- auth ---------- */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(10,132,255,.14), transparent 60%),
    radial-gradient(900px 500px at 90% 110%, rgba(94,92,230,.10), transparent 60%),
    var(--bg);
}
.auth-card {
  width: 380px; background: rgba(38,39,46,.85); border: 1px solid var(--line);
  border-radius: 18px; padding: 34px; box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
}
.auth-card h1 {
  margin: 0 0 4px; font-size: 27px; font-weight: 700;
  display: flex; align-items: center; gap: 10px;
}
.brand-icon { width: 28px; height: 28px; border-radius: 22.3%; flex-shrink: 0; }
.auth-card h2 { margin: 20px 0 10px; font-size: 17px; font-weight: 600; }
.auth-card input {
  width: 100%; margin: 6px 0; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg2); color: var(--text);
}
.auth-card input:focus { outline: 2px solid var(--accent); border-color: transparent; }
.auth-switch { text-align: center; font-size: 13px; }
.auth-switch a { color: var(--accent); }
.auth-msg { margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: var(--bg2); }
.auth-msg.err { border: 1px solid rgba(255,69,58,.5); color: var(--danger); }
.auth-msg.ok { border: 1px solid rgba(48,209,88,.5); color: var(--ok); }

/* ---------- shell ---------- */
#view-main { display: flex; min-height: 100vh; }
.sidebar {
  width: 212px; background: rgba(32,33,39,.8); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 20px 12px;
  position: sticky; top: 0; height: 100vh; backdrop-filter: blur(18px);
  transition: width .16s ease, padding .16s ease;
}
.brand {
  font-size: 16.5px; font-weight: 700; margin-bottom: 24px; padding: 2px 10px;
  letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 9px;
}
.brand .brand-icon { width: 20px; height: 20px; }
.nav-btn {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  background: none; border: 0; color: var(--muted); padding: 8px 10px;
  border-radius: 9px; cursor: pointer; font-size: 13.5px; margin-bottom: 2px;
  font-weight: 500;
}
.nav-btn svg { width: 16px; height: 16px; flex-shrink: 0; opacity: .8; }
.nav-btn:hover { background: var(--card2); color: var(--text); }
.nav-btn.active { background: var(--accent); color: #fff; }
.nav-btn.active svg { opacity: 1; }
.sidebar-foot { margin-top: auto; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 0 8px; }
.side-toggle {
  position: absolute; top: 22px; right: -13px; z-index: 5;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--card2); border: 1px solid var(--line2); color: var(--muted);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: transform .18s ease, color .12s;
}
.side-toggle:hover { color: var(--text); border-color: rgba(255,255,255,.3); }
.sidebar.collapsed { width: 56px; padding: 20px 6px; }
.sidebar.collapsed .nav-lb { display: none; }
.sidebar.collapsed .brand { justify-content: center; padding: 2px 0; }
.sidebar.collapsed .nav-btn { justify-content: center; padding: 8px 0; }
.sidebar.collapsed .nav-btn svg { opacity: .9; }
.sidebar.collapsed .sidebar-foot { flex-direction: column; align-items: stretch; padding: 0; }
.sidebar.collapsed .sidebar-foot #me-label { display: none; }
.sidebar.collapsed .sidebar-foot .btn { padding: 4px 0; font-size: 10px; }
.sidebar.collapsed .side-toggle { transform: rotate(180deg); }
.content { flex: 1; padding: 28px 34px; min-width: 0; }

.page-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h2 { margin: 0; font-size: 21px; font-weight: 700; flex: 1; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- botones ---------- */
.btn {
  background: var(--card2); border: 1px solid var(--line2); color: var(--text);
  padding: 7px 14px; border-radius: 9px; cursor: pointer; font-size: 13px;
  font-weight: 500; transition: background .12s, border-color .12s, transform .05s;
}
.btn:hover { background: #35363f; border-color: rgba(255,255,255,.24); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); border-color: transparent; color: #fff; }
.btn-primary:hover { background: #3395ff; border-color: transparent; }
.btn-danger { background: var(--danger); border-color: transparent; color: #fff; }
.btn-danger:hover { background: #ff5f54; }
.btn-sm { padding: 4px 11px; font-size: 12px; border-radius: 8px; }
.btn-block { width: 100%; margin-top: 12px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.danger { background: transparent; color: var(--danger); border-color: rgba(255,69,58,.4); }
.btn.danger:hover { background: rgba(255,69,58,.12); }

/* ---------- banner / leyenda ---------- */
.banner {
  padding: 11px 15px; border-radius: var(--radius); margin-bottom: 14px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  font-size: 13px;
}
.banner.warn { border-color: rgba(255,159,10,.45); color: var(--warn-dim); background: rgba(255,159,10,.07); }
.banner.err { border-color: rgba(255,69,58,.45); color: var(--danger); background: rgba(255,69,58,.07); }
.legend { display: flex; gap: 18px; margin-bottom: 14px; font-size: 12px; color: var(--muted); }
.cell-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: middle; }
.cell-dot.ok { background: var(--ok); }
.cell-dot.pending { background: var(--warn-dim); }
.cell-dot.empty { background: var(--line2); }
.cell-dot.na { background: transparent; border: 1px dashed var(--line2); }
.cell-dot.verified { background: #4da3ff; box-shadow: 0 0 6px rgba(77,163,255,.55); }
.loc-tab .vdot { color: #4da3ff; }

/* ---------- tablas ---------- */
.tbl {
  width: 100%; border-collapse: collapse; background: var(--card);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.tbl th, .tbl td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: 13px; }
.tbl th {
  background: var(--bg2); color: var(--muted); font-weight: 600;
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em;
}
.tbl tbody tr { transition: background .1s; }
.tbl tbody tr:hover { background: rgba(255,255,255,.025); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td .btn { margin-right: 4px; }

/* ---------- matriz ---------- */
.matrix-wrap { overflow-x: auto; border-radius: var(--radius); }
.matrix { border-collapse: separate; border-spacing: 0; min-width: 100%; background: var(--card); }
.matrix th, .matrix td {
  border-bottom: 1px solid var(--line); border-right: 1px solid var(--line);
  padding: 6px 8px; font-size: 12px; text-align: center;
}
.matrix th { background: var(--bg2); color: var(--muted); position: sticky; top: 0; z-index: 3; font-size: 11px; font-weight: 600; }
.matrix td.app-name { text-align: left; font-weight: 600; white-space: nowrap; background: var(--bg2);
  position: sticky; left: 0; z-index: 2; cursor: pointer; }
.matrix td.app-name:hover { color: var(--accent); }
.matrix th:first-child { left: 0; z-index: 4; }
.matrix td.app-name small { display: block; color: var(--muted); font-weight: 400; }
.matrix td.ver-col, .matrix th:last-child {
  position: sticky; right: 0; background: var(--bg2); white-space: nowrap;
}
.matrix th:last-child { z-index: 4; }
.matrix td.ver-col { z-index: 2; }
.matrix tr.row-review td.app-name { box-shadow: inset 3px 0 0 var(--warn-dim); }
.cell {
  width: 30px; height: 30px; border-radius: 7px; cursor: pointer; margin: 0 auto;
  display: flex; align-items: center; justify-content: center; font-size: 10px; color: #fff;
}
.cell.ok { background: var(--ok); }
.cell.verified { background: #4da3ff; box-shadow: 0 0 6px rgba(77,163,255,.45); }
.cell.live { background: #00b377; box-shadow: 0 0 6px rgba(0,214,143,.5); }
.cell.pending { background: var(--warn-dim); }
.cell.empty { background: var(--card2); }
.cell.na { background: transparent; cursor: default; }
.cell:hover { outline: 2px solid var(--accent); }

/* ---------- apps (tarjetas estilo ASC) ---------- */
.apps-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}
.app-card {
  display: flex; align-items: center; gap: 14px; padding: 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  cursor: pointer; transition: border-color .15s, transform .12s, box-shadow .15s;
  box-shadow: var(--shadow);
}
.app-card:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.app-card.inactive { opacity: .5; }
.app-card.inactive:hover { opacity: .85; }
.app-icon {
  width: 56px; height: 56px; border-radius: 13px; flex-shrink: 0;
  border: 1px solid var(--line); object-fit: cover; background: var(--bg2);
}
.app-icon.sm { width: 32px; height: 32px; border-radius: 8px; }
.app-icon.xs { width: 22px; height: 22px; border-radius: 6px; vertical-align: middle; margin-right: 8px; }
.app-card-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.app-card-info b { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-card-info .muted { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-card-acts { display: flex; flex-direction: column; gap: 4px; }
.app-card-acts .btn { padding: 2px 8px; font-size: 12px; }

/* ---------- editor ---------- */
.loc-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 12px; }
.loc-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); font-size: 12.5px; cursor: pointer;
  font-weight: 500; transition: all .12s;
}
.loc-tab:hover { border-color: var(--accent); }
.loc-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.loc-tab .cell-dot { margin-left: 2px; }
.sales-subtabs { margin: 10px 0 10px; }
.sales-subtabs .loc-tab { font-size: 11px; padding: 4px 10px; opacity: .92; }

/* ---------- selector de idiomas ---------- */
.loc-picker {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  max-height: 55vh; overflow-y: auto; padding-right: 4px;
}
.loc-pick {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 11px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg2); cursor: pointer; font-size: 12.5px;
  transition: border-color .12s, background .12s;
}
.loc-pick:hover { border-color: var(--accent); }
.loc-pick.on { border-color: var(--accent); background: var(--accent-soft); }
.loc-pick input { accent-color: var(--accent); margin: 0; flex-shrink: 0; }
.loc-pick .loc-flag { font-size: 16px; flex-shrink: 0; }
.loc-pick .loc-name {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.loc-pick .loc-tag {
  font-size: 10.5px; color: var(--muted); background: var(--bg);
  border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; flex-shrink: 0;
  font-family: ui-monospace, monospace;
}
.loc-pick .loc-web { flex-shrink: 0; font-size: 13px; }
@media (max-width: 900px) { .loc-picker { grid-template-columns: repeat(2, 1fr); } }

/* ---------- modal traducir ---------- */
.tr-row {
  display: grid; grid-template-columns: 130px 1fr; gap: 10px;
  align-items: start; margin-top: 12px;
}
.tr-row > label { color: var(--muted); font-size: 12px; padding-top: 6px; }
.tr-opts { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.chip-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg2); font-size: 12.5px; cursor: pointer; user-select: none;
  transition: all .12s;
}
.chip input { display: none; }
.chip:hover { border-color: var(--accent); }
.chip.on { border-color: var(--accent); background: var(--accent-soft); }
.chip.dim { opacity: .45; }
.chip.dim:hover { opacity: .8; }
.chip i { font-style: normal; font-size: 10.5px; color: var(--muted); }
.modal input[type="text"]:not(.mini), .modal input:not([type]):not(.mini),
.modal input[type="date"]:not(.mini), .modal textarea:not(.mini), .modal select:not(.mini):not(.sel-btn) {
  width: 100%; padding: 9px 11px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--bg2); color: var(--text); font-family: inherit; font-size: 13px;
}
.modal input:focus, .modal textarea:focus, .modal select:focus {
  outline: 2px solid var(--accent); border-color: transparent;
}

/* ---------- ficha de idioma ---------- */
.locale-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; margin-bottom: 12px; box-shadow: var(--shadow);
}
.locale-head {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; user-select: none;
}
.locale-head:hover { background: rgba(255,255,255,.02); }
.locale-head .loc-code { font-weight: 700; min-width: 80px; font-size: 14px; }
.locale-head .loc-status { font-size: 12px; }
.locale-body { padding: 4px 16px 16px; border-top: 1px solid var(--line); }
.field-row { display: grid; grid-template-columns: 175px 1fr 78px; gap: 12px; align-items: start; margin-top: 12px; }
.field-row > * { min-width: 0; }
.field-row label { color: var(--muted); font-size: 12px; padding-top: 9px; font-weight: 500; }
.field-row input, .field-row textarea, .field-row select,
.panel-card input:not(.mini):not([type="checkbox"]):not([type="radio"]),
.panel-card textarea:not(.mini), .panel-card select:not(.mini):not(.sel-btn) {
  width: 100%; padding: 9px 11px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--bg2); color: var(--text); font-family: inherit; font-size: 13px;
  transition: border-color .12s, box-shadow .12s;
}
.field-row input:focus, .field-row textarea:focus, .field-row select:focus {
  outline: 2px solid var(--accent); border-color: transparent;
}
.field-row textarea { resize: vertical; min-height: 64px; }
.char-count { font-size: 11px; color: var(--muted); text-align: right; padding-top: 9px; font-variant-numeric: tabular-nums; }
.char-count.over { color: var(--danger); font-weight: 700; }
.field-issues { grid-column: 2; font-size: 12px; color: var(--danger); }
.field-issues .warn { color: var(--warn-dim); }
.apple-mirror {
  grid-column: 2; font-size: 11.5px; color: var(--muted); background: var(--bg2);
  border-radius: 8px; padding: 7px 10px; margin-top: -4px; overflow-wrap: anywhere;
  border: 1px solid var(--line);
}
.apple-mirror summary { cursor: pointer; font-weight: 500; }
/* pre-wrap: el texto espejo de Apple conserva sus saltos de línea */
.apple-mirror .mirror-text { white-space: pre-wrap; margin-top: 6px; }
.apple-mirror .mirror-diff {
  white-space: pre-wrap; margin-top: 6px; padding-top: 6px;
  border-top: 1px dashed var(--line); font-size: 11px;
}
.apple-mirror .mirror-diff del { background: rgba(255, 90, 90, .22); text-decoration: line-through; border-radius: 3px; }
.apple-mirror .mirror-diff ins { background: rgba(90, 220, 140, .22); text-decoration: none; border-radius: 3px; }
.apple-mirror .mirror-copy { margin-top: 7px; }
/* Badge "⚠ Apple difiere" junto al label del campo */
.diff-badge {
  display: inline-block; font-size: 10px; font-weight: 600; line-height: 1.4;
  color: var(--warn-dim); border: 1px solid currentColor; border-radius: 6px;
  padding: 0 6px; margin-left: 7px; vertical-align: middle; white-space: nowrap;
}
.loc-actions { display: flex; gap: 8px; margin-top: 14px; align-items: center; }

/* ---------- panel cards ---------- */
.panel-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px; margin-bottom: 16px; max-width: 780px; box-shadow: var(--shadow);
}
.panel-card.wide { max-width: none; }
#view-settings .panel-card { max-width: 1180px; }
.panel-card h3 { margin: 0 0 12px; font-size: 15.5px; font-weight: 700; }
.panel-card label { display: block; margin: 10px 0; font-size: 13px; color: var(--muted); }
.panel-card label input, .panel-card label select, .panel-card label textarea { margin-top: 4px; }
.cred-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px; }
.cred-grid > * { min-width: 0; }
.cred-row {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 12px;
}
.cred-row .cred-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cred-row .cred-label small { display: block; color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
.cred-row .cred-pill { max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-shrink: 1; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.check input { width: auto; accent-color: var(--accent); }

details.panel-card summary { cursor: pointer; font-size: 14px; list-style: none; font-weight: 600; }
details.panel-card summary::-webkit-details-marker { display: none; }
details.panel-card summary::before { content: '▸ '; color: var(--muted); }
details.panel-card[open] summary::before { content: '▾ '; }
details.panel-card summary + * { margin-top: 12px; }

/* ---------- modales ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(10,10,14,.6); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: blur(10px);
}
.modal {
  background: var(--card); border: 1px solid var(--line2); border-radius: 16px;
  width: 720px; max-width: 100%; max-height: 88vh; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.modal-sm { width: 420px; }
.modal-lg { width: 880px; }
.modal-xl { width: 1100px; }

.gen-btn {
  margin-left: 8px; padding: 2px 9px; font-size: 11px; border-radius: 999px;
  border: 1px solid var(--accent); background: transparent; color: var(--accent);
  cursor: pointer; vertical-align: middle; font-weight: 600;
}
.gen-btn:hover { background: var(--accent); color: #fff; }

.prompt-box { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; overflow: hidden; }
.prompt-box-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 13px; background: rgba(255,255,255,.04); font-size: 12px; color: var(--muted);
  font-weight: 600;
}
.prompt-box pre {
  margin: 0; padding: 13px; max-height: 220px; overflow: auto;
  font-size: 11.5px; line-height: 1.55; white-space: pre-wrap; word-break: break-word;
  color: var(--text); background: rgba(0,0,0,.28);
}

/* ===== editor lateral estilo ASC ===== */
.editor-layout { display: grid; grid-template-columns: 200px 1fr; gap: 22px; align-items: start; }
.editor-side {
  position: sticky; top: 70px; display: flex; flex-direction: column; gap: 2px;
}
.side-group {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em;
  color: var(--muted); padding: 14px 10px 5px; font-weight: 600;
}
.side-btn {
  display: flex; align-items: center; gap: 9px;
  text-align: left; background: none; border: 0; color: var(--muted);
  padding: 8px 10px; border-radius: 9px; cursor: pointer; font-size: 13.5px; font-weight: 500;
}
.side-btn svg { width: 16px; height: 16px; opacity: .8; flex-shrink: 0; }
.side-btn:hover { background: var(--card2); color: var(--text); }
.side-btn.active { background: var(--accent); color: #fff; font-weight: 600; }
.side-btn.active svg { opacity: 1; }
.side-check { margin-left: auto; font-size: 11px; flex-shrink: 0; }
.side-check.sc-green { color: var(--ok, #30d158); }
.side-check.sc-amber { color: var(--warn-dim, #ff9f0a); }
.side-check.sc-red { color: var(--danger, #ff453a); }

/* ===== capturas ===== */
.shot-type {
  margin-bottom: 18px; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 16px; box-shadow: var(--shadow);
}
.shot-type h4 { margin: 0 0 12px; font-size: 13.5px; display: flex; gap: 8px; align-items: center; font-weight: 700; }
.shot-type h4 .muted { font-weight: 400; }
.shot-strip { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.shot { position: relative; width: 112px; flex-shrink: 0; }
.shot img {
  width: 112px; border-radius: 10px; border: 1px solid var(--line); display: block;
  box-shadow: 0 3px 12px rgba(0,0,0,.3);
}
.shot-tools {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 3px;
  justify-content: space-between; padding: 5px; border-radius: 0 0 10px 10px;
  background: linear-gradient(transparent, rgba(0,0,0,.75)); opacity: 0; transition: opacity .15s;
}
.shot:hover .shot-tools { opacity: 1; }
.shot-tools button {
  background: rgba(0,0,0,.55); border: 0; color: #fff; border-radius: 6px;
  cursor: pointer; font-size: 11px; padding: 2px 7px; backdrop-filter: blur(6px);
}
.shot-add {
  width: 112px; height: 198px; border: 1.5px dashed var(--line2); border-radius: 10px;
  display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center;
  color: var(--muted); cursor: pointer; font-size: 26px; background: none; flex-shrink: 0;
}
.shot-add small { font-size: 10.5px; }
.shot-add:hover { border-color: var(--accent); color: var(--accent); }
.shot-badge { position: absolute; top: 5px; left: 5px; }

/* ===== productos ===== */
.subgroup {
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
  margin-bottom: 14px; background: var(--bg2);
}
.subgroup-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.subgroup-head b { font-size: 14px; }
.td-actions { white-space: nowrap; text-align: right; }
.td-actions .btn { padding: 4px 10px; }
.prod-state { font-weight: 600; font-size: 11px; }
.prod-state.ok { color: var(--ok); }
.prod-state.warn { color: var(--warn-dim); }
.prod-state.gray { color: var(--muted); }

.modal-head { display: flex; align-items: center; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; flex: 1; font-size: 16px; font-weight: 700; }
.modal-x { background: none; border: 0; color: var(--muted); font-size: 24px; cursor: pointer; line-height: 1; }
.modal-x:hover { color: var(--text); }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { padding: 13px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; align-items: center; }

/* ---------- modal de progreso ---------- */
#modal-progress .modal { border-color: rgba(10,132,255,.28); box-shadow: var(--shadow-lg), 0 0 0 1px rgba(10,132,255,.08), 0 24px 80px rgba(0,0,0,.55); }
#modal-progress .modal-head { padding: 16px 22px; }
#modal-progress .modal-head h3 { display: flex; align-items: center; gap: 10px; }
.progress-track { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.progress-bar { flex: 1; height: 8px; background: var(--bg2); border-radius: 999px; overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,.4); }
#progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), #5eb0ff); box-shadow: 0 0 10px rgba(10,132,255,.55); transition: width .3s ease; border-radius: 999px; }
.progress-pct { font-size: 11.5px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; min-width: 36px; text-align: right; }
#progress-status { font-size: 12px; margin: 2px 0 8px; min-height: 16px; }
.log {
  background: #0d0e12; border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; height: 240px; overflow-y: auto; font-size: 12px;
  line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere;
  font-family: ui-monospace, "SF Mono", monospace;
}
.log > div { padding: 1px 0; }
.log .ts { color: var(--muted); opacity: .55; font-size: 10.5px; margin-right: 6px; }
.log .ok { color: var(--ok); }
.log .err { color: var(--danger); }
.log .muted { color: var(--muted); }
.log .failhdr { color: var(--danger); font-weight: 700; margin-top: 10px; border-top: 1px solid rgba(255,69,58,.3); padding-top: 8px; }

.diff-tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.diff-tbl th, .diff-tbl td { border: 1px solid var(--line); padding: 6px 9px; vertical-align: top; overflow-wrap: anywhere; }
.diff-tbl th { background: var(--bg2); }
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.tag.same { background: var(--card2); color: var(--muted); }
.tag.push { background: var(--accent); color: #fff; }
.tag.create { background: var(--ok); color: #fff; }
.tag.push_conflict { background: var(--danger); color: #fff; }
.tag.absent { background: transparent; color: var(--muted); }

/* ---------- misc ---------- */
.pill { padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; display: inline-block; }
.pill.green { background: rgba(48,209,88,.14); color: var(--ok); }
.pill.amber { background: rgba(255,159,10,.14); color: var(--warn-dim); }
.pill.red { background: rgba(255,69,58,.14); color: var(--danger); }
.pill.blue { background: rgba(77,163,255,.14); color: #4da3ff; }
.pill.cyan { background: rgba(100,210,255,.14); color: #64d2ff; }
.pill.purple { background: rgba(191,90,242,.14); color: #bf5af2; }
.pill.gray { background: var(--card2); color: var(--muted); }
/* Grupos de estado en la matriz + toggle agrupar/todas. */
.seg { display:inline-flex; background:var(--card2); border:1px solid var(--line2);
  border-radius:9px; padding:2px; gap:2px; vertical-align:middle; }
.seg button { background:transparent; border:0; color:var(--muted); font:inherit;
  font-size:11.5px; font-weight:600; padding:4px 10px; border-radius:7px; cursor:pointer; }
.seg button.on { background:var(--accent); color:#fff; }
.matrix tr.grp-head td { background:var(--card2); font-size:11px;
  font-weight:700; letter-spacing:.4px; text-transform:uppercase; color:var(--muted); }
.matrix tr.grp-head td.grp-name { text-align:left; padding:5px 10px; cursor:default;
  background:var(--card2); color:var(--muted); }
.matrix tr.grp-head td.grp-name:hover { color:var(--muted); }
.matrix tr.grp-head .grp-dot { display:inline-block; width:8px; height:8px;
  border-radius:50%; margin-right:7px; vertical-align:1px; }
.matrix tr.grp-head .grp-n { font-weight:600; opacity:.7; margin-left:6px;
  text-transform:none; letter-spacing:0; }
/* Latido del badge "en revisión" — pulso sutil cada ~2.4s. */
@keyframes pillBeat {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,159,10,.22); }
  10% { transform: scale(1.025); }
  20% { transform: scale(1); }
  30% { transform: scale(1.018); }
  48% { transform: scale(1); box-shadow: 0 0 0 4px rgba(255,159,10,0); }
}
.pill.beat { animation: pillBeat 2.4s ease-out infinite; transform-origin: center; }
select.mini, input.mini {
  background: var(--card2); color: var(--text); border: 1px solid var(--line2);
  border-radius: 8px; padding: 5px 9px; font-size: 12.5px;
  font-family: inherit; color-scheme: dark;
}
input.mini:focus, select.mini:focus { outline: 2px solid var(--accent); border-color: transparent; }
/* Todos los campos dentro de tarjetas operativas llevan el mismo estilo. */
.ops-card input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
.ops-card textarea, .ops-card select,
.ops-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.ops-toolbar input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.ops-form select, .ops-toolbar select {
  background: var(--card2); color: var(--text); border: 1px solid var(--line2);
  border-radius: 8px; padding: 6px 10px; font-size: 12.5px; font-family: inherit;
}
.ops-card input:focus, .ops-card textarea:focus, .ops-card select:focus,
.ops-form input:focus, .ops-toolbar input:focus,
.ops-form select:focus, .ops-toolbar select:focus {
  outline: 2px solid var(--accent); border-color: transparent;
}
.ops-card textarea { resize: vertical; }
/* textarea dentro de un label suelto de tarjeta → ancho completo, como en
   .ops-grid/.ops-form (las "Notas para el revisor" y similares). */
.ops-card label > textarea { display: block; width: 100%; margin-top: 4px;
  box-sizing: border-box; min-height: 90px; }
.ops-card label:has(> textarea) { display: block; margin-top: 10px;
  font-size: 11.5px; color: var(--muted); }
.ops-grid label { display: block; margin: 0; font-size: 11.5px; color: var(--muted); }
.ops-grid label input, .ops-grid label select, .ops-grid label textarea {
  display: block; margin-top: 4px; width: 100%;
}
.ops-card input[type="checkbox"] { accent-color: var(--accent); }
/* Select con formato de botón — barras de acciones (cabecera editor, etc.) */
.sel-btn {
  appearance: none; -webkit-appearance: none;
  background: var(--card2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238e8e96' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 11px center;
  border: 1px solid var(--line2); color: var(--text);
  padding: 7px 30px 7px 14px; border-radius: 9px; cursor: pointer;
  font-size: 13px; font-weight: 500; max-width: 260px;
  transition: background .12s, border-color .12s;
}
.sel-btn:hover { background-color: #35363f; border-color: rgba(255,255,255,.24); }
.sel-btn:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---------- combo buscable custom (territorios, price points…) ---------- */
.combo { position: relative; }
.combo > input.mini { width: 100%; box-sizing: border-box; }
.combo-list {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 60;
  background: var(--card2); border: 1px solid var(--line2); border-radius: 10px;
  max-height: 220px; overflow-y: auto; box-shadow: var(--shadow);
  display: none;
}
.combo-list.open { display: block; }
.combo-list.up { top: auto; bottom: calc(100% + 4px); }
.combo-item {
  padding: 7px 11px; font-size: 12.5px; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
}
.combo-item:hover, .combo-item.hot { background: var(--accent-soft); }
.combo-item .muted { margin-left: auto; font-size: 10.5px; }

/* ---------- paneles operativos (admin_ops.js) ---------- */
.ops-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.ops-card > h3 { margin: 0 0 4px; font-size: 15.5px; font-weight: 700; }
.ops-card > .ops-sub { color: var(--muted); font-size: 12.5px; margin: 0 0 14px; }
.ops-stats { display: flex; gap: 12px; flex-wrap: wrap; margin: 14px 0; }
.ops-stat {
  background: var(--bg2); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 18px; min-width: 130px; flex: 0 0 auto;
}
.ops-stat b { display: block; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ops-stat span { font-size: 11px; color: var(--muted); }
.ops-toolbar { display: flex; gap: 10px 14px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.ops-toolbar label { display: block; margin: 0; font-size: 11.5px; color: var(--muted); }
.ops-toolbar label input, .ops-toolbar label select { display: block; margin-top: 4px; min-width: 150px; }
.ops-item {
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
  margin-bottom: 10px; background: var(--bg2);
}
.ops-item-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ops-item-head b { font-size: 14px; }
.ops-item-head .spacer { flex: 1; }
.ops-item-meta { font-size: 11.5px; color: var(--muted); }
.ops-item-body { margin-top: 8px; font-size: 13px; }
.ops-empty {
  text-align: center; padding: 26px 12px; color: var(--muted); font-size: 13px;
  border: 1px dashed var(--line2); border-radius: 12px;
}
.ops-form { display: flex; gap: 12px 14px; flex-wrap: wrap; align-items: flex-end; margin-top: 12px;
  padding-top: 12px; border-top: 1px solid var(--line); }
.ops-form label { display: block; margin: 0; font-size: 11.5px; color: var(--muted);
  flex: 1 1 150px; max-width: 320px; }
.ops-form label.check { flex: 0 0 auto; max-width: none; align-self: center; padding-bottom: 4px; }
.ops-form label input, .ops-form label select, .ops-form label textarea {
  display: block; margin-top: 4px; width: 100%; box-sizing: border-box;
}
.ops-form .btn { flex: 0 0 auto; }
.ops-reply {
  border-left: 3px solid var(--accent); background: var(--accent-soft);
  border-radius: 0 10px 10px 0; padding: 10px 14px; margin-top: 10px; font-size: 12.5px;
}
.ops-reply .muted { font-size: 11px; }
.ops-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.ops-chart { display: flex; align-items: flex-end; gap: 2px; height: 100px;
  border-bottom: 1px solid var(--line2); margin-top: 14px; }
.ops-chart div { flex: 1; background: var(--accent); opacity: .75; border-radius: 2px 2px 0 0;
  min-height: 1px; transition: opacity .1s; }
.ops-chart div:hover { opacity: 1; }
.editor-body .ops-card .tbl, .page .ops-card .tbl { width: 100%; }

/* ---- webhook notifications ---- */
.wh-badge {
  display: inline-block; min-width: 16px; height: 16px; padding: 0 5px;
  border-radius: 8px; background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
  vertical-align: middle; margin-left: 4px;
}
.wh-unread td { background: color-mix(in srgb, var(--warn) 8%, transparent); }
.wh-unread td:first-child { border-left: 2px solid var(--warn); }
.chip-x {
  border: 0; background: none; color: var(--muted); cursor: pointer;
  font-size: 13px; padding: 0 2px; line-height: 1;
}
.chip-x:hover { color: var(--danger); }

/* ---------- actividad / tarea en curso ---------- */
#loadbar {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 400;
  pointer-events: none; opacity: 0; transition: opacity .3s;
}
#loadbar.active { opacity: 1; }
#loadbar i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent), #5e5ce6);
  box-shadow: 0 0 8px rgba(10,132,255,.5);
  border-radius: 0 2px 2px 0; transition: width .35s ease;
}
#loadbar.active:not(.done) i { animation: lb-trickle 8s ease-out forwards; }
#loadbar.done i { width: 100% !important; animation: none; transition: width .2s; }
@keyframes lb-trickle {
  0% { width: 12%; } 30% { width: 45%; } 70% { width: 72%; } 100% { width: 86%; }
}

.task-overlay {
  position: fixed; inset: 0; z-index: 300; display: flex;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(10,10,16,.55); backdrop-filter: blur(12px);
}
.task-card {
  width: 340px; max-width: 92vw; text-align: center;
  background: rgba(38,39,46,.92); border: 1px solid var(--line2);
  border-radius: 18px; padding: 28px 26px 22px; box-shadow: var(--shadow-lg);
  animation: taskPop .22s ease-out;
}
@keyframes taskPop {
  from { opacity: 0; transform: scale(.94) translateY(6px); }
  to   { opacity: 1; transform: none; }
}
.task-spin {
  width: 46px; height: 46px; margin: 0 auto 16px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.12); border-top-color: var(--accent);
  animation: taskspin .8s linear infinite;
  box-shadow: 0 0 20px rgba(10,132,255,.18);
}
@keyframes taskspin { to { transform: rotate(360deg); } }
.mini-spin {
  display: inline-block; width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.18); border-top-color: var(--accent);
  animation: taskspin .8s linear infinite; vertical-align: -1px;
}
.spin-line { display: flex; align-items: center; gap: 7px; }
.task-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.task-status {
  font-size: 12.5px; color: var(--muted); min-height: 18px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.task-bar {
  height: 6px; margin-top: 14px; border-radius: 4px; overflow: hidden;
  background: var(--bg2); position: relative;
}
.task-bar i {
  display: block; height: 100%; width: 0; border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), #5e5ce6);
  box-shadow: 0 0 10px rgba(10,132,255,.4); transition: width .25s ease;
}
.task-bar.indet i { width: 38%; animation: taskslide 1.15s ease-in-out infinite; }
@keyframes taskslide {
  0%   { transform: translateX(-105%); }
  55%  { transform: translateX(160%); }
  100% { transform: translateX(268%); }
}
.task-elapsed {
  margin-top: 10px; font-size: 11px; color: var(--muted);
  font-variant-numeric: tabular-nums; min-height: 14px;
}
.progress-bar.indet #progress-fill {
  width: 38% !important; animation: taskslide 1.15s ease-in-out infinite;
}
#progress-spin { margin-right: 8px; }

/* ---------- bandeja de procesos en segundo plano ---------- */
.modal-head-btns { display: flex; gap: 6px; }
#proc-tray {
  position: fixed; right: 18px; bottom: 18px; z-index: 90;
  display: flex; flex-direction: column; gap: 8px; max-width: 340px;
}
.proc-chip {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 9px 10px 9px 9px;
  box-shadow: var(--shadow-lg, 0 12px 40px rgba(0,0,0,.5));
  cursor: pointer; animation: slideUp .25s ease;
}
.proc-chip.queued { opacity: .75; cursor: default; }
.proc-chip.done.fail { border-color: rgba(255,69,58,.45); }
.proc-ring {
  --p: 0;
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--bg2) 0);
  display: flex; align-items: center; justify-content: center;
}
.proc-ring.indet {
  background: conic-gradient(var(--accent) 0 25%, var(--bg2) 25% 100%);
  animation: spin 1s linear infinite;
}
.proc-ring i {
  font-style: normal; font-size: 9.5px; font-weight: 700;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--panel); display: flex; align-items: center; justify-content: center;
  animation: spin 1s linear infinite reverse; /* anula el giro del anillo */
}
.proc-ring:not(.indet) i { animation: none; }
.proc-chip.done .proc-ring i { color: var(--ok); font-size: 14px; }
.proc-chip.done.fail .proc-ring i { color: var(--danger); }
.proc-chip-txt { min-width: 0; flex: 1; }
.proc-chip-txt b {
  display: block; font-size: 12px; font-weight: 600; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 230px;
}
.proc-chip-txt span { font-size: 10.5px; color: var(--muted); }
.proc-chip-x {
  background: none; border: 0; color: var(--muted); font-size: 15px;
  cursor: pointer; padding: 4px 6px; border-radius: 6px;
}
.proc-chip-x:hover { color: #fff; background: var(--bg2); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes slideUp { from { transform: translateY(14px); opacity: 0; } }

/* Bloque legal: vista previa del texto que se concatena a la descripción */
.legal-preview {
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 12px; margin: 0;
  font-size: 11.5px; line-height: 1.55; white-space: pre-wrap;
  word-break: break-word; color: var(--text, #ddd);
}

/* ============ Onboarding ASC / Paywall / i18n (SaaS) ============ */
.onboard-card, .paywall-card { max-width: 560px; }
.ob-progress {
  height: 6px; background: var(--bg2); border-radius: 4px;
  overflow: hidden; margin: 12px 0 18px;
}
.ob-progress i { display: block; height: 100%; width: 25%; background: var(--accent); border-radius: 4px; transition: width .3s; }
.ob-step .ob-list { margin: 10px 0 14px 18px; line-height: 1.9; }
.ob-field { display: block; margin-bottom: 16px; }
.ob-field input { width: 100%; margin-top: 6px; }
.ob-field .muted { display: block; font-size: 11.5px; margin-top: 6px; line-height: 1.5; }
.ob-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; }

.pw-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.pw-plan {
  background: var(--bg2); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 14px; text-align: center; position: relative;
}
.pw-plan h3 { margin: 0 0 6px; font-size: 14px; }
.pw-price { font-size: 24px; font-weight: 700; margin: 4px 0; }
.pw-price small { font-size: 11px; font-weight: 400; color: var(--muted); }
.pw-plan .muted { font-size: 11px; min-height: 28px; }
.pw-featured { border-color: var(--accent); }
.pw-badge {
  position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; font-size: 10px; padding: 2px 10px;
  border-radius: 10px; white-space: nowrap;
}
.pw-foot { text-align: center; font-size: 11px; margin-top: 14px; }

.i18n-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  padding: 8px 10px; border-bottom: 1px solid var(--line); align-items: center;
}
.i18n-src { font-size: 12px; color: var(--muted); line-height: 1.4; word-break: break-word; }
.i18n-val { width: 100%; }

/* Tabla de idiomas instalados (esquema net-analyzer) */
.i18n-langs-table { margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.i18n-lang-row {
  display: grid; align-items: center; gap: 10px;
  /* Cada fila es un grid independiente: anchos fijos en todas las
     columnas variables (acciones con/sin ✕) o las filas no se alinean. */
  grid-template-columns: 26px 30px minmax(140px, 1fr) 64px 96px 100px 104px 158px;
  padding: 7px 12px; border-bottom: 1px solid var(--line); font-size: 12.5px;
}
.i18n-lang-row > span:last-child { display: flex; gap: 6px; justify-content: flex-end; }
.i18n-lang-row:last-child { border-bottom: 0; }
.i18n-lang-row.off { opacity: .55; }
.i18n-lang-row.head { color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .4px; }
.i18n-flag { font-size: 18px; text-align: center; }
.flag-icon { width: 20px; height: 13px; border-radius: 2px; vertical-align: -2px; display: inline-block; }
.combo-item .flag-icon { width: 17px; height: 11px; }
.flag-icon { width: 22px; height: auto; border-radius: 2px; vertical-align: middle;
  box-shadow: 0 0 0 1px var(--line2); }
.i18n-flag .flag-icon { width: 24px; }
.i18n-name { background: none; border: 0; color: var(--text); font: inherit; text-align: left;
  cursor: pointer; padding: 0; }
.i18n-name:hover { color: var(--accent); }
.i18n-lang-row code { font-size: 11px; }
.i18n-lang-row .ok { color: var(--ok, #3fb950); }
.i18n-lang-row .warn { color: var(--warn, #d29922); }
.i18n-lang-row .mini-btn {
  background: var(--bg2); border: 1px solid var(--line); color: var(--text);
  border-radius: 7px; padding: 4px 9px; font-size: 11px; cursor: pointer; white-space: nowrap;
}
.i18n-lang-row .mini-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.i18n-lang-row .mini-btn:disabled { opacity: .45; cursor: default; }
.i18n-lang-row .mini-btn.danger:hover { border-color: var(--danger); color: var(--danger); }
.i18n-lang-row .mini-btn.on { border-color: var(--ok, #3fb950); color: var(--ok, #3fb950); }
@media (max-width: 900px) {
  /* Se ocultan Traducidas y Estado: quedan 6 celdas visibles. */
  .i18n-lang-row { grid-template-columns: 24px 26px minmax(100px, 1fr) 48px 76px 130px; gap: 8px; }
  .i18n-lang-row .hide-sm { display: none; }
}
@media (max-width: 700px) { .pw-plans { grid-template-columns: 1fr; } .i18n-row { grid-template-columns: 1fr; } }

/* ---------- Herramientas de Marketing y Mockups App Store ---------- */
.mkt-subtabs { margin: 12px 0 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.mkt-hero-banner {
  background: linear-gradient(135deg, rgba(88,166,255,0.12) 0%, rgba(13,17,23,0.85) 100%);
  border: 1px solid rgba(88,166,255,0.3); border-radius: 14px; padding: 18px 22px;
  margin-bottom: 18px; display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.mkt-hero-info h3 { margin: 0 0 6px; font-size: 16px; color: #fff; display: flex; align-items: center; gap: 8px; }
.mkt-hero-info p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.45; }

/* Barra superior de configuración */
.mkt-toolbar {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 18px; margin-bottom: 16px; box-shadow: var(--shadow);
  display: grid; grid-template-columns: minmax(280px, 1.4fr) 130px 1fr; gap: 14px; align-items: flex-end;
}
@media (max-width: 900px) {
  .mkt-toolbar { grid-template-columns: 1fr; }
}
.mkt-toolbar .mkt-field { display: flex; flex-direction: column; gap: 6px; }
.mkt-toolbar .mkt-field label { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.mkt-toolbar .mkt-field select,
.mkt-toolbar .mkt-field input {
  width: 100%; box-sizing: border-box; background: var(--card2); color: var(--text);
  border: 1px solid var(--line2); border-radius: 8px; padding: 8px 12px; font-size: 13px;
  font-family: inherit; color-scheme: dark;
}
.mkt-toolbar select.mkt-select {
  appearance: none; -webkit-appearance: none; max-width: none;
  background: var(--card2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238e8e96' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  padding-right: 32px; cursor: pointer;
}

.mkt-agent-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 18px; margin-top: 14px; align-items: start; }
@media (max-width: 1100px) { .mkt-agent-grid { grid-template-columns: 1fr; } }

.mkt-agent-panel {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px;
  display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow);
}
.mkt-panel-head {
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 2px;
}
.mkt-panel-head b { font-size: 14px; color: #fff; }

/* Contenedor y campos del formulario de marketing */
.mkt-form-container { display: flex; flex-direction: column; gap: 12px; }
.mkt-form-field { display: flex; flex-direction: column; gap: 5px; }
.mkt-form-field label {
  font-size: 12px; color: var(--muted); font-weight: 500;
  display: flex; justify-content: space-between; align-items: baseline;
}
.mkt-form-field label .mkt-counter {
  font-size: 11px; font-weight: 400; color: #8b949e;
}
.mkt-form-field input,
.mkt-form-field textarea,
.mkt-form-field select {
  width: 100%; box-sizing: border-box; background: var(--card2); color: var(--text);
  border: 1px solid var(--line2); border-radius: 8px; padding: 8px 12px;
  font-size: 13px; font-family: inherit; line-height: 1.4; color-scheme: dark;
  transition: border-color .15s, box-shadow .15s;
}
.mkt-form-field input:focus,
.mkt-form-field textarea:focus,
.mkt-form-field select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(88,166,255,0.2);
}
.mkt-form-field textarea {
  resize: vertical; min-height: 56px;
}
.mkt-points-list { display: flex; flex-direction: column; gap: 6px; }
.mkt-point-row { display: flex; align-items: center; gap: 8px; }
.mkt-point-row span.num {
  font-size: 11px; font-weight: 700; color: var(--muted); width: 14px; text-align: center;
}
.mkt-point-row input { flex: 1; }
.mkt-chips-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }

.mkt-mockup-preview {
  background: #000; border: 1px solid rgba(255,255,255,0.12); border-radius: 16px;
  padding: 20px; box-shadow: 0 12px 36px rgba(0,0,0,0.45); position: sticky; top: 16px; overflow: hidden;
}
.mkt-mockup-header-card {
  background: linear-gradient(145deg, #161b22 0%, #0d1117 100%);
  border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 18px;
}
.mkt-mockup-badge {
  display: inline-block; background: var(--accent); color: #fff; font-size: 10.5px;
  font-weight: 700; text-transform: uppercase; padding: 2px 8px; border-radius: 999px;
  margin-bottom: 8px; letter-spacing: 0.5px;
}
.mkt-mockup-headline { font-size: 18px; font-weight: 700; color: #fff; margin: 0 0 6px; line-height: 1.25; }
.mkt-mockup-subheadline { font-size: 13px; color: #8b949e; margin: 0 0 12px; line-height: 1.4; }
.mkt-mockup-points { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; padding: 0; list-style: none; }
.mkt-mockup-points li { font-size: 12px; color: #c9d1d9; display: flex; align-items: center; gap: 6px; }
.mkt-mockup-points li::before { content: "✓"; color: #3fb950; font-weight: bold; }
.mkt-mockup-search-card {
  background: #161b22; border: 1px solid rgba(255,255,255,0.08); border-radius: 14px;
  padding: 16px; display: flex; flex-direction: column; gap: 12px;
}
.mkt-mockup-app-row { display: flex; align-items: center; gap: 12px; }
.mkt-mockup-app-icon { width: 48px; height: 48px; border-radius: 10px; background: #21262d; object-fit: cover; }
.mkt-mockup-app-meta { flex: 1; min-width: 0; }
.mkt-mockup-app-meta b { display: block; font-size: 13.5px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mkt-mockup-app-meta span { display: block; font-size: 11.5px; color: #8b949e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mkt-mockup-btn-get {
  background: #21262d; color: var(--accent); border: 0; border-radius: 999px;
  font-weight: 700; font-size: 11.5px; padding: 6px 14px; cursor: pointer; text-transform: uppercase;
}
.mkt-mockup-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mkt-mockup-chip {
  background: rgba(88,166,255,0.12); color: #58a6ff; font-size: 11px;
  padding: 3px 8px; border-radius: 6px; border: 1px solid rgba(88,166,255,0.2);
}
.mkt-api-doc-card {
  background: #0d1117; border: 1px solid rgba(255,255,255,0.1); border-radius: 12px;
  padding: 14px 18px; font-family: ui-monospace, SFMono-Regular, monospace; font-size: 12px;
  color: #c9d1d9; overflow-x: auto; line-height: 1.5;
}

/* Biblioteca de Activos y Banners de Marketing */
.mkt-upload-dropzone {
  border: 2px dashed rgba(88, 166, 255, 0.4); border-radius: 14px;
  background: rgba(13, 17, 23, 0.6); padding: 26px 20px; text-align: center;
  transition: all 0.2s ease; cursor: pointer; margin-bottom: 20px;
}
.mkt-upload-dropzone:hover, .mkt-upload-dropzone.dragover {
  border-color: #58a6ff; background: rgba(88, 166, 255, 0.08);
}
.mkt-assets-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px;
}
.mkt-asset-card {
  background: #161b22; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px;
  overflow: hidden; display: flex; flex-direction: column; transition: transform 0.2s, border-color 0.2s;
}
.mkt-asset-card:hover {
  border-color: #58a6ff; transform: translateY(-2px);
}
.mkt-asset-card.active-asset {
  border-color: #3fb950; box-shadow: 0 0 12px rgba(63, 185, 80, 0.25);
}
.mkt-asset-thumb {
  width: 100%; height: 140px; object-fit: cover; background: #0d1117; display: block;
}
.mkt-asset-body {
  padding: 12px 14px; flex: 1; display: flex; flex-direction: column; gap: 6px;
}
.mkt-asset-title {
  font-weight: 600; font-size: 13.5px; color: #fff; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mkt-asset-meta {
  font-size: 11.5px; color: #8b949e; display: flex; justify-content: space-between; align-items: center;
}
.mkt-asset-actions {
  display: flex; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Pestañas idénticas a Apple Store Connect: Encabezado y Capturas */
.mkt-apple-tabs {
  display: flex; gap: 24px; border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin: 10px 0 16px; padding-bottom: 0;
}
.mkt-apple-tab {
  background: none; border: 0; border-bottom: 2px solid transparent;
  color: #8b949e; font-size: 13.5px; font-weight: 500; padding: 6px 4px 10px;
  cursor: pointer; transition: all .15s ease;
}
.mkt-apple-tab:hover { color: #fff; }
.mkt-apple-tab.active {
  color: var(--accent); border-bottom-color: var(--accent); font-weight: 600;
}
.mkt-component-box {
  background: #161b22; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 12px;
  min-height: 220px; display: flex; flex-direction: column; justify-content: space-between;
  overflow: hidden; margin-bottom: 20px;
}
.mkt-component-empty {
  display: flex; align-items: center; justify-content: center; text-align: center;
  flex: 1; padding: 48px 20px; color: #8b949e; font-size: 13px;
}
.mkt-component-preview {
  position: relative; width: 100%; height: 210px; background: #0d1117;
  display: flex; align-items: flex-end; padding: 16px; box-sizing: border-box;
}
.mkt-component-bar {
  display: flex; justify-content: space-between; align-items: center;
  background: #0d1117; padding: 12px 18px; border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12.5px; color: #8b949e;
}
.mkt-component-links {
  display: flex; gap: 14px;
}
.mkt-component-links a {
  color: var(--accent); text-decoration: none; cursor: pointer; font-weight: 500;
}
.mkt-component-links a:hover { text-decoration: underline; }

/* Campo de texto promocional en tema oscuro */
#comp-promo-text, textarea.mkt-textarea {
  background: #161b22 !important;
  color: #c9d1d9 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 8px !important;
  padding: 10px 12px !important;
  font-family: inherit !important;
  font-size: 13.5px !important;
  line-height: 1.45 !important;
  box-sizing: border-box !important;
  width: 100% !important;
  resize: vertical !important;
  transition: border-color 0.15s, box-shadow 0.15s !important;
}
#comp-promo-text:focus, textarea.mkt-textarea:focus {
  outline: none !important;
  border-color: var(--accent, #58a6ff) !important;
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.18) !important;
  background: #1c2128 !important;
  color: #fff !important;
}
