/* Krea2 WebUI — tema oscuro estilo AUTOMATIC1111 */
:root { color-scheme: dark; }

html, body { height: 100%; }
body { font-size: 16px; }

/* ── Letras más grandes (pedido del usuario) ── */
.input { font-size: 14px; }
.btn-ghost { font-size: 14px; }
.btn-secondary, .btn-primary { font-size: 14px; }
.acc > summary { font-size: 14px; }
.nav-item { font-size: 14px; }
.mono { font-size: 12.5px; }
.badge { font-size: 11px; }
/* Overrides de utilidades Tailwind diminutas → más grandes */
.text-\[10px\] { font-size: 12px !important; }
.text-\[11px\] { font-size: 13px !important; }
.text-\[12px\] { font-size: 13.5px !important; }
.text-\[13px\] { font-size: 14.5px !important; }
.text-xs { font-size: 13.5px !important; }
.text-sm { font-size: 15px !important; }
label { font-size: 13.5px; }


.xs\:block { display: none; }
@media (min-width: 380px) { .xs\:block { display: block; } }

/* ── Scrollbars ── */
* { scrollbar-width: thin; scrollbar-color: #4b4b4b transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: #4b4b4b; border-radius: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; }

/* ── Paneles / inputs ── */
.panel { background: #262626; border: 1px solid #3d3d3d; border-radius: 10px; }
.input {
  background: #1f1f1f; border: 1px solid #3d3d3d; border-radius: 8px;
  padding: 6px 10px; font-size: 13px; color: #d4d4d4; width: 100%;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: #7c3aed; box-shadow: 0 0 0 2px rgba(124,58,237,.25); }
.input[type="number"] { font-variant-numeric: tabular-nums; }
textarea.input { resize: vertical; line-height: 1.45; }

.btn-primary {
  background: linear-gradient(90deg, #7c3aed, #ea580c);
  color: #fff; font-weight: 600; padding: 8px 16px; border-radius: 9px;
  transition: filter .15s, transform .05s; box-shadow: 0 4px 18px rgba(124,58,237,.35);
}
.btn-primary:hover { filter: brightness(1.15); }
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { filter: grayscale(.5) brightness(.7); cursor: not-allowed; box-shadow: none; }
.btn-secondary {
  background: #333; color: #d4d4d4; font-weight: 500; padding: 8px 16px; border-radius: 9px;
  border: 1px solid #4b4b4b; transition: background .15s;
}
.btn-secondary:hover { background: #3d3d3d; }
.btn-ghost { color: #b9b9b9; padding: 6px 10px; border-radius: 8px; font-size: 13px; transition: background .15s, color .15s; }
.btn-ghost:hover { background: #333; color: #fff; }
.btn-danger { color: #f87171; }
.btn-danger:hover { background: rgba(248,113,113,.12); color: #fca5a5; }

/* ── Estado dots ── */
.dot { width: 9px; height: 9px; border-radius: 9999px; display: inline-block; transition: background .3s; }
.dot.pulse { animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ── Accordion (estilo A1111) ── */
.acc { border: 1px solid #3d3d3d; border-radius: 10px; background: #262626; overflow: hidden; }
.acc > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; font-weight: 600; font-size: 13px; user-select: none;
  transition: background .15s;
}
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary:hover { background: #2e2e2e; }
.acc > summary .chev { transition: transform .2s; margin-left: auto; color: #8a8a8a; }
.acc[open] > summary .chev { transform: rotate(180deg); }
.acc > .acc-body { padding: 10px 12px 12px; border-top: 1px solid #333; }

/* ── Sliders (range) ── */
input[type="range"] {
  -webkit-appearance: none; appearance: none; height: 5px; border-radius: 9999px;
  background: linear-gradient(90deg, #7c3aed, #ea580c); outline: none; cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 15px; height: 15px; border-radius: 9999px;
  background: #fff; border: 2px solid #7c3aed; box-shadow: 0 1px 4px rgba(0,0,0,.5);
}
input[type="range"]::-moz-range-thumb {
  width: 15px; height: 15px; border-radius: 9999px; background: #fff; border: 2px solid #7c3aed;
}
input[type="range"]:disabled { opacity: .4; cursor: not-allowed; }

/* ── Toggles (checkbox switches) ── */
.toggle { position: relative; width: 34px; height: 19px; background: #3d3d3d; border-radius: 9999px; cursor: pointer; transition: background .2s; flex-shrink: 0; }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 9999px; background: #cfcfcf; transition: transform .2s, background .2s; }
input.toggle-check { display: none; }
input.toggle-check:checked + .toggle { background: #7c3aed; }
input.toggle-check:checked + .toggle::after { transform: translateX(15px); background: #fff; }

/* ── Spinner ── */
.spinner { width: 18px; height: 18px; border: 3px solid rgba(255,255,255,.25); border-top-color: #fff; border-radius: 9999px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Barra de progreso indeterminada ── */
.progress-ind {
  height: 6px; border-radius: 9999px; overflow: hidden; background: #3d3d3d; position: relative;
}
.progress-ind::after {
  content: ""; position: absolute; inset: 0; width: 40%;
  background: linear-gradient(90deg, #7c3aed, #ea580c);
  animation: ind 1.4s ease-in-out infinite;
}
@keyframes ind { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }

/* ── Masonry ── */
.columns-2, .columns-3, .columns-4, .columns-5 { column-gap: .75rem; }
.card-img { break-inside: avoid; margin-bottom: .75rem; }

/* ── Imagen de resultado / galería ── */
.img-fit { width: 100%; height: auto; display: block; border-radius: 8px; }
.card-img .thumb { transition: filter .2s, transform .2s; }
.card-img:hover .thumb { filter: brightness(1.1); }

/* ── Badge host ── */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; padding: 2px 7px; border-radius: 6px; border: 1px solid #4b4b4b; background: #1f1f1f; }

/* ── Modal ── */
.modal-panel { animation: pop .18s ease-out; max-height: 90vh; }
@keyframes pop { from { transform: scale(.96) translateY(6px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }

/* ── Tab activo en sidebar ── */
.nav-item { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 9px; font-size: 13px; color: #a8a8a8; cursor: pointer; transition: background .15s, color .15s; white-space: nowrap; }
.nav-item:hover { background: #2e2e2e; color: #fff; }
.nav-item.active { background: linear-gradient(90deg, rgba(124,58,237,.28), rgba(234,88,12,.22)); color: #fff; box-shadow: inset 0 0 0 1px rgba(124,58,237,.45); }

/* ── Tabla hover ── */
tbody tr:hover { background: #2a2a2a; }

/* ── Link / copia ── */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; }
