:root {
    --accent: #8a6d3b;
    --accent-dark: #5c4826;
    --bg: #faf8f5;
    --card-bg: #ffffff;
    --border: #ddd4c7;
    --text: #2a2420;
    --text-muted: #70665a;
    --danger-bg: #fff4e5;
    --danger-border: #e0a940;
    --radius: 10px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    padding: 16px;
    padding-bottom: 48px;
}

.wrap {
    max-width: 480px;
    margin: 0 auto;
}

header.topbar {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}

.lang-switch {
    display: flex;
    justify-content: center;
    gap: 6px;
    font-size: 0.85rem;
    margin-bottom: 10px;
    color: var(--text-muted);
}

.lang-switch a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 2px 4px;
}

.lang-switch a.active {
    color: var(--accent);
    font-weight: 700;
    text-decoration: underline;
}

.estilo-thumb {
    width: 140px;
    height: 140px;
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin: 0 auto 10px;
    display: block;
}

.estilo-nombre {
    text-align: center;
    font-weight: 700;
    font-size: 1.05rem;
    margin: 0 0 18px;
}

header.topbar h1 {
    font-size: 1.3rem;
    margin: 4px 0 2px;
}

header.topbar p {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.9rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 14px;
}

.estilo-link {
    display: block;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card-bg);
    text-decoration: none;
    color: var(--text);
}

.estilo-link strong {
    display: block;
    font-size: 1.05rem;
}

.estilo-link.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.badge {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

fieldset {
    border: none;
    padding: 0;
    margin: 0 0 18px;
}

legend {
    font-weight: 600;
    margin-bottom: 8px;
    padding: 0;
}

label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    font-size: 0.92rem;
}

.req::after {
    content: " *";
    color: #b8401a;
}

input[type="text"],
input[type="tel"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 14px;
    background: #fff;
    color: var(--text);
}

input[readonly] {
    background: #f0f0f0;
    color: var(--text-muted);
}

textarea {
    min-height: 70px;
    resize: vertical;
}

.talla-box {
    background: var(--danger-bg);
    border: 1.5px solid var(--danger-border);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 18px;
}

.talla-box label {
    margin-bottom: 8px;
}

.talla-box select {
    margin-bottom: 0;
}

.hint {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin: -10px 0 14px;
}

.crest-fijo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.82rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    margin: 0;
}

.crest-star {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    fill: #000;
    stroke: #000;
    stroke-width: 0.5;
}

button.submit {
    width: 100%;
    padding: 15px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 600;
}

button.submit:active {
    background: var(--accent-dark);
}

.coleccion-header {
    font-size: 1rem;
    margin: 22px 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

.coleccion-header:first-of-type {
    margin-top: 4px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 8px;
}

.photo-card {
    display: block;
    text-decoration: none;
    color: var(--text);
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.photo-card .thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: #fff;
    display: block;
}

.photo-card .label {
    padding: 8px 10px 10px;
}

.photo-card .label strong {
    display: block;
    font-size: 0.86rem;
    line-height: 1.2;
}

.photo-card .badge {
    margin-top: 2px;
}

.photo-card.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.buscar-form {
    display: flex;
    gap: 8px;
}

.buscar-form input {
    flex: 1;
    margin-bottom: 0;
}

.buscar-form button {
    width: auto;
    padding: 0 16px;
}

.orden-item {
    display: block;
    text-decoration: none;
    color: var(--text);
}

.orden-item strong {
    display: block;
}

.orden-item span {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.edit-link {
    display: inline-block;
    margin-top: 16px;
    padding: 12px 18px;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
}

.confirm-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.confirm-actions .edit-link,
.confirm-actions .submit-link {
    margin-top: 0;
    flex: 1 1 160px;
    text-align: center;
    padding: 12px 18px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
}

.confirm-actions .edit-link {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.confirm-actions .submit-link {
    background: var(--accent);
    color: #fff;
}

@media (max-width: 480px) {
    .confirm-actions {
        flex-direction: column;
    }
}

.token-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.confirm-box {
    text-align: center;
    padding: 28px 16px;
}

.confirm-box .check {
    font-size: 2.6rem;
    margin-bottom: 8px;
}

.estilo-talla {
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--accent);
    margin: 14px 0 0;
}

.ficha {
    text-align: left;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 12px;
    background: #f4f4f4;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 18px;
}

.ficha dt {
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.ficha dd {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-muted);
    text-align: right;
}

.resumen {
    text-align: left;
}

.resumen dt {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 10px;
}

.resumen dd {
    margin: 0;
    font-size: 1rem;
}

.texto-piedra-confirm {
    text-align: center;
    margin: 14px 0;
}

.texto-piedra-confirm-label {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.texto-piedra-confirm-valor {
    font-size: 1.1rem;
    font-weight: 600;
}

.laterales-layout {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    text-align: left;
    margin: 14px 0;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.lateral-col {
    flex: 1;
}

.lateral-col.lateral-col-der {
    text-align: right;
}

.lateral-col.lateral-col-der .lateral-thumb-confirm {
    margin-left: auto;
}

.lateral-col-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 6px;
}

.lateral-col-texto {
    font-size: 1rem;
    font-weight: 600;
}

.lateral-col-nombre {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.foto-cliente-badge {
    font-style: italic;
    color: var(--accent);
}

.lateral-thumb-confirm {
    display: block;
    width: 70px;
    height: 70px;
    object-fit: contain;
    background: #000;
    border-radius: 6px;
    margin: 6px 0;
}

.foto-cliente-img {
    width: 160px;
    height: 160px;
    object-fit: cover;
    background: #f0f0f0;
    cursor: zoom-in;
}

.resumen dt.resumen-seccion {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
    margin-top: 16px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

/* Selector de laterales (Forma 2) */

.lateral-picker {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px;
    margin-bottom: 4px;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    text-align: left;
    font-size: 0.95rem;
    color: var(--text);
}

.lateral-picker.lateral-picker-error {
    border-color: #b8401a;
}

.lateral-preview-img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    background: #fafafa;
    border-radius: 6px;
    flex-shrink: 0;
}

.foto-propia {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
}

.foto-propia label {
    font-weight: 600;
    font-size: 0.9rem;
}

.foto-propia-preview {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
    display: block;
    margin: 6px 0;
}

.foto-input-row {
    position: relative;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 4px;
}

.foto-input-oculto {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.foto-input-button {
    font-size: 0.85rem;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card-bg);
    color: var(--text);
    cursor: pointer;
}

.foto-input-oculto:focus + .foto-input-button {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.foto-input-button:hover,
.foto-input-button:active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.foto-input-filename {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.lateral-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 50;
    padding: 16px;
}

.lateral-modal.abierto {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lateral-modal-inner {
    background: var(--bg);
    border-radius: var(--radius);
    width: 100%;
    max-width: 640px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.lateral-modal-header {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid var(--border);
    background: var(--card-bg);
}

.lateral-modal-header input {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
}

.lateral-modal-header button {
    padding: 0 14px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
}

.lateral-grid {
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 8px;
}

.lateral-cat-header {
    grid-column: 1 / -1;
    margin: 4px 0;
    font-size: 0.95rem;
    overflow-wrap: break-word;
}

.lateral-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px;
    text-align: center;
    min-width: 0;
}

.lateral-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: #fafafa;
    display: block;
    margin-bottom: 4px;
}

.lateral-card span {
    font-size: 0.72rem;
    line-height: 1.2;
    display: block;
    overflow-wrap: break-word;
}

.lateral-clave {
    font-size: 0.62rem;
    color: var(--text-muted);
    display: block;
    margin-top: 2px;
}

.lateral-sin-resultados {
    text-align: center;
    color: var(--text-muted);
    padding: 20px;
}

.estado-orden,
.locked-message {
    padding: 10px 12px;
    border-radius: 8px;
    background: #f4f1e8;
    font-weight: 700;
}

.estado-aprobada { background: #e5f5e9; color: #23663a; }
.estado-cancelada { background: #f9e3e0; color: #8b2924; }
.estado-pendiente_tienda,
.estado-pendiente_joyero { background: #fff2cd; color: #755514; }

.estado-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 700;
    margin: 3px 0;
    background: #f4f1e8;
}
.estado-badge.estado-aprobada { background: #e5f5e9; color: #23663a; }
.estado-badge.estado-cancelada { background: #f9e3e0; color: #8b2924; }
.estado-badge.estado-pendiente_tienda,
.estado-badge.estado-pendiente_joyero { background: #fff2cd; color: #755514; }

.breadcrumbs {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 4px 0;
}

.tienda-logo {
    display: block;
    width: min(100%, 620px);
    max-height: 122px;
    object-fit: contain;
    object-position: left center;
    margin: 4px 0 12px;
    border-radius: 10px;
}

.tienda-logo-form {
    width: min(100%, 460px);
    max-height: 92px;
    margin-bottom: 16px;
}

.tienda-hero {
    color: #17202a;
    background:
        radial-gradient(circle at 82% 22%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 31%),
        linear-gradient(145deg, #ffffff 0%, #f8f6f0 68%, #efe8d6 100%);
    border-bottom: 5px solid var(--accent);
}

.tienda-hero-inner {
    width: min(1060px, calc(100% - 36px));
    margin: 0 auto;
    padding: 38px 0 42px;
}

.tienda-logo-hero {
    width: min(100%, 700px);
    max-height: 138px;
    margin-bottom: 22px;
    mix-blend-mode: multiply;
}

.tienda-kicker,
.tienda-seccion-label {
    color: #74601c;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.tienda-aviso {
    display: inline-block;
    margin: 8px 0 0;
    padding: 6px 12px;
    color: #fff;
    background: #17202a;
    border-left: 5px solid var(--accent);
    border-radius: 5px;
    font-size: .78rem;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.tienda-contacto-hero {
    display: grid;
    grid-template-columns: minmax(210px, .8fr) minmax(480px, 1.7fr);
    gap: 18px;
    align-items: stretch;
    margin: 20px 0 34px;
    padding: 14px;
    background: #17202a;
    border-bottom: 4px solid var(--accent);
    border-radius: 13px;
    box-shadow: 0 12px 28px rgba(23, 32, 42, .14);
}

.tienda-contacto-identidad {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 7px 10px;
    color: #fff;
}

.tienda-contacto-identidad strong {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.08rem;
    font-style: italic;
}

.tienda-contacto-identidad span {
    margin-top: 5px;
    color: #cdd1d4;
    font-size: .78rem;
    line-height: 1.4;
}

.tienda-contacto-acciones {
    display: grid;
    grid-template-columns: 1.1fr 1.55fr .75fr;
    gap: 8px;
}

.contacto-accion {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 10px 12px;
    color: #17202a;
    background: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-size: .82rem;
    font-weight: 750;
    overflow-wrap: anywhere;
}

.contacto-accion > span:first-child { color: #8d7419; font-size: 1.2rem; }
.contacto-accion small {
    display: block;
    margin-bottom: 2px;
    color: #777;
    font-size: .63rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.contacto-accion-principal {
    background: var(--accent);
    font-size: .95rem;
}

.contacto-accion-principal > span:first-child { color: #17202a; }
.contacto-accion-principal small { color: #55470f; }
.contacto-accion:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.16); }

.tienda-hero h1 {
    max-width: 700px;
    margin: 8px 0 12px;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(2rem, 5vw, 3.7rem);
    line-height: 1.05;
}

.tienda-mensaje {
    max-width: 650px;
    color: #4a5057;
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.65;
}

.tienda-cta {
    display: inline-block;
    margin-top: 12px;
    padding: 13px 24px;
    color: #fff;
    background: #17202a;
    border: 2px solid #17202a;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 800;
}

.tienda-cta:hover {
    color: #17202a;
    background: var(--accent);
    border-color: var(--accent);
}

.tienda-catalogo-header { padding-top: 28px; }
.tienda-catalogo-header h2 { margin: 4px 0; font-size: 1.8rem; }

.catalogo-oculto { display: none; }

@media (max-width: 600px) {
    .tienda-hero-inner { padding: 24px 0 30px; }
    .tienda-logo-hero { margin-bottom: 12px; }
    .tienda-contacto-hero { grid-template-columns: 1fr; margin-bottom: 26px; }
    .tienda-contacto-acciones { grid-template-columns: 1fr; }
    .contacto-accion { padding: 12px 14px; }
}

@media (min-width: 601px) and (max-width: 900px) {
    .tienda-contacto-hero { grid-template-columns: 1fr; }
}

.breadcrumbs a {
    color: var(--text-muted);
    text-decoration: underline;
}

.breadcrumbs strong {
    color: var(--text);
}

.breadcrumb-sep {
    margin: 0 6px;
}

.carpeta-lista {
    display: flex;
    flex-direction: column;
}

.carpeta-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 4px;
    border-top: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
}

.carpeta-item:first-child {
    border-top: none;
}

.carpeta-icono {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.carpeta-nombre {
    flex: 1;
    font-weight: 600;
    min-width: 0;
    overflow-wrap: break-word;
}

.carpeta-badge {
    font-size: 0.78rem;
    color: var(--text-muted);
    background: #f4f1e8;
    padding: 3px 10px;
    border-radius: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}

.carpeta-badge.carpeta-badge-pendiente {
    background: #fff2cd;
    color: #755514;
    font-weight: 700;
}

.panel-actions,
.order-tools form {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 8px;
}

.panel-actions form { margin: 0; }
.panel-actions input { width: auto; margin: 0; }

.link-button {
    border: 0;
    background: none;
    padding: 0;
    color: var(--accent);
    text-decoration: underline;
    cursor: pointer;
}

.link-button.danger { color: #a52d27; }

.gabriel-orden-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
}

.gabriel-orden-thumb {
    width: 60px;
    height: 60px;
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    flex-shrink: 0;
}

.gabriel-orden-specs {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.phone-link {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
}

.phone-link:hover { text-decoration: underline; }

.copy-phone-btn {
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 6px;
    padding: 1px 8px;
    font-size: 0.78rem;
    color: var(--text-muted);
    cursor: pointer;
    margin-left: 2px;
}

.order-tools {
    margin-top: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #f8f7f3;
}

.order-tools summary { cursor: pointer; font-weight: 700; }
.order-tools textarea { min-height: 65px; margin: 8px 0; }
.history-list { margin: 10px 0 0; padding-left: 20px; color: var(--text-muted); }

.admin-security-wrap { max-width: 1100px; }
.admin-security-header { text-align: left; }
.eyebrow { margin: 0 0 6px; color: #9a711c; font-size: .72rem; font-weight: 800; letter-spacing: .13em; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 20px; }
.admin-nav a, .admin-nav strong { color: var(--text); }
.admin-nav strong { padding-bottom: 3px; border-bottom: 3px solid var(--accent); }
.admin-main-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 28px; padding: 7px; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 3px 14px rgba(45,39,25,.04); }
.admin-main-nav a { padding: 10px 15px; color: var(--text); border-radius: 8px; font-weight: 700; text-decoration: none; }
.admin-main-nav a:hover { background: #f4f1e8; }
.admin-main-nav a.active { color: #fff; background: #263d55; }
.admin-home-wrap { max-width: 1180px; }
.admin-page-header { padding-top: 28px; }
.admin-page-header h1 { margin: 3px 0 6px; }
.admin-page-header p { margin: 0; color: var(--text-muted); }
.admin-stat-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-bottom: 20px; }
.admin-stat { display: grid; gap: 5px; min-height: 120px; padding: 18px; color: var(--text); background: #fff; border: 1px solid var(--border); border-top: 4px solid #263d55; border-radius: 12px; text-decoration: none; }
.admin-stat.attention { border-top-color: #d49b25; background: #fffbf0; }
.admin-stat > span { color: var(--text-muted); font-size: .75rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.admin-stat strong { font-size: 2rem; line-height: 1; }
.admin-stat small { color: var(--text-muted); line-height: 1.35; }
.admin-home-columns { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; }
.admin-home-card { margin: 0; }
.card-heading h2 { margin: 4px 0 16px; }
.quick-action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-action-grid a { display: grid; gap: 3px; padding: 14px; color: var(--text); background: #f8f7f3; border: 1px solid var(--border); border-radius: 9px; text-decoration: none; }
.quick-action-grid a:hover { border-color: #d3a63c; background: #fff8e6; }
.quick-action-grid span, .alert-list small { color: var(--text-muted); font-size: .78rem; }
.alert-list { display: grid; }
.alert-list > div { display: grid; grid-template-columns: auto 1fr auto; gap: 9px; align-items: center; padding: 11px 0; border-top: 1px solid var(--border); }
.alert-list > div:first-child { border-top: 0; }
.health-dot { width: 10px; height: 10px; background: #aaa; border-radius: 50%; }
.health-dot.rojo { background: #c94b43; }
.health-dot.amarillo { background: #d49b25; }
.empty-positive { padding: 14px; color: #22633c; background: #e4f5e9; border-radius: 8px; }
.security-alert { margin: 18px 0; padding: 14px 18px; border-radius: 10px; font-weight: 700; }
.security-alert-ok { color: #22633c; background: #e4f5e9; border: 1px solid #acd8b9; }
.security-alert-error { color: #8b2924; background: #f9e3e0; border: 1px solid #e5aaa4; }
.security-section { margin-top: 34px; }
.security-section-title { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 14px; }
.security-section-title h2, .security-card h2, .security-card h3 { margin: 4px 0; }
.security-section-title > p { max-width: 520px; color: var(--text-muted); }
.security-type { color: #9a711c; font-size: .7rem; font-weight: 800; letter-spacing: .12em; }
.security-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.security-card { padding: 20px; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 3px 14px rgba(45, 39, 25, .04); }
.security-card-primary { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; align-items: start; border-top: 4px solid #d3a63c; }
.security-form { display: grid; gap: 10px; }
.security-form label { font-size: .82rem; font-weight: 700; }
.security-form input { margin: 5px 0 0; }
.security-form.compact { margin-top: 12px; }
.account-heading { display: flex; gap: 12px; align-items: center; }
.account-heading span { color: var(--text-muted); font-size: .78rem; }
.account-avatar { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; color: #fff; background: #263d55; border-radius: 50%; font-weight: 800; }
.account-avatar.store { color: #563d09; background: #f2d58b; border-radius: 11px; }
.account-link { color: var(--text-muted); font-size: .78rem; overflow-wrap: anywhere; }
.security-card details { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.security-card summary { color: #735719; cursor: pointer; font-weight: 700; }
.login-narrow { max-width: 540px; }
.account-manage-button { display: inline-block; padding: 9px 13px; color: #563d09; background: #fff2cd; border: 1px solid #e2c36d; border-radius: 8px; font-weight: 700; text-decoration: none; }
.security-card:target { outline: 3px solid #e2bd5b; outline-offset: 3px; }
.account-tree-root { display: grid; gap: 14px; }
.tree-node { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 14px 16px; background: #fff; border: 1px solid var(--border); border-radius: 10px; }
.tree-node strong { display: block; font-size: 1.05rem; }
.tree-node > span { color: var(--text-muted); font-size: .8rem; }
.tree-admin { color: #fff; background: #263d55; border-color: #263d55; }
.tree-admin > span { color: #d9e2ea; }
.tree-branch { position: relative; margin-left: 28px; padding-left: 24px; border-left: 2px solid #d9c48c; }
.tree-branch::before { content: ""; position: absolute; top: 25px; left: 0; width: 24px; border-top: 2px solid #d9c48c; }
.tree-designer { background: #fff8e6; border-color: #e2c36d; }
.tree-children { display: grid; gap: 10px; margin: 10px 0 0 24px; }
.tree-jeweler { padding-left: 18px; border-left: 2px solid #d8dee5; }
.tree-jeweler > summary { list-style: none; cursor: pointer; }
.tree-jeweler > summary::-webkit-details-marker { display: none; }
.tree-jeweler-summary::before { content: "▶"; color: #8a681c; font-size: .8rem; transition: transform .15s ease; flex: 0 0 auto; }
.tree-jeweler[open] > .tree-jeweler-summary::before { transform: rotate(90deg); }
.tree-jeweler-summary:hover { border-color: #cda83e; background: #fffcf3; }
.tree-jeweler-identity { flex: 1; }
.tree-jeweler-identity strong { display: block; font-size: 1.05rem; color: var(--text); }
.tree-jeweler-count { color: var(--text-muted); font-size: .8rem; }
.tree-jeweler-content { padding: 2px 0 4px 18px; }
.tree-stores { display: grid; gap: 7px; padding: 8px 0 0 18px; }
.tree-store { padding: 9px 12px; background: #f8f7f3; border: 1px solid var(--border); border-radius: 9px; }
.tree-store-label { display: flex; gap: 8px; align-items: center; }
.tree-store-label span { color: #9a711c; }
.tree-store-label small { margin-left: auto; color: var(--text-muted); }
.tree-empty { padding: 9px 14px; color: var(--text-muted); font-size: .82rem; font-style: italic; }
.tree-account-actions { margin: 6px 0 0; font-size: .82rem; }
.tree-account-controls { margin: 7px 0; padding: 7px 10px; background: #fff; border: 1px solid var(--border); border-radius: 8px; }
.tree-account-controls > summary { color: #735719; cursor: pointer; font-weight: 700; }
.tree-control-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; padding-top: 10px; }
.tree-control-grid section { padding: 12px; background: #f8f7f3; border-radius: 8px; }
.tree-control-grid h4 { margin: 0 0 8px; }
.tree-control-grid form { display: grid; gap: 7px; margin: 0; }
.tree-control-grid input { margin: 0; }
.tree-control-grid .danger-zone { border: 1px solid #e8b7b2; background: #fff5f4; }
.admin-account-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 0; }
.admin-account-actions form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.admin-account-actions input { width: 220px; margin: 0; }
.managed-account-list { display: grid; gap: 8px; }
.managed-account { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--border); }
.managed-account:first-child { border-top: 0; }
.managed-account strong, .managed-account span { display: block; }
.managed-account > div > span { color: var(--text-muted); font-size: .8rem; }
.account-status { padding: 4px 9px; color: #22633c; background: #e4f5e9; border-radius: 12px; font-size: .75rem; font-weight: 700; }
.account-status-off { color: #8b2924; background: #f9e3e0; }
.inline-create-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
.inline-create-form label { font-size: .82rem; font-weight: 700; }
.inline-create-form input { margin: 5px 0 0; }
.inline-create-form .submit { margin: 0; width: auto; white-space: nowrap; }
.hierarchy-create-card { border-top: 4px solid #d3a63c; }
.credential-card code { display: block; padding: 12px; background: #f4f1e8; border-radius: 8px; overflow-wrap: anywhere; user-select: all; }
.temporary-password { padding: 14px; color: #fff; background: #263d55; border-radius: 8px; font: 800 1.35rem monospace; letter-spacing: .04em; user-select: all; }
.button-link { display: inline-block; box-sizing: border-box; text-align: center; text-decoration: none; }
.muted { color: var(--text-muted); }
@media (max-width: 760px) { .inline-create-form, .tree-control-grid { grid-template-columns: 1fr; } .tree-node { align-items: flex-start; flex-direction: column; gap: 5px; } .tree-branch { margin-left: 10px; } .tree-children { margin-left: 5px; } .admin-stat-grid, .admin-home-columns, .quick-action-grid { grid-template-columns: 1fr; } .admin-main-nav { overflow-x: auto; flex-wrap: nowrap; box-shadow: 0 3px 14px rgba(45,39,25,.04), inset -16px 0 12px -12px rgba(0,0,0,.18); } .admin-main-nav a { white-space: nowrap; } .tree-store-label { align-items: flex-start; flex-wrap: wrap; } .tree-store-label small { width: 100%; margin-left: 22px; } }
@media (min-width: 761px) and (max-width: 1000px) { .admin-stat-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .security-grid, .security-card-primary { grid-template-columns: 1fr; } .security-section-title { align-items: start; flex-direction: column; gap: 4px; } }
.button-link { display:inline-block; width:auto; text-decoration:none; padding:10px 18px; }
.landing-admin-card { margin-bottom:24px; }
.landing-admin-list { display:grid; gap:10px; }
.landing-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.landing-fields label { display:grid; gap:5px; font-weight:700; }
.landing-fields input,.landing-fields textarea { width:100%; box-sizing:border-box; }
.landing-fields .wide { grid-column:1/-1; }
.landing-fields div.wide { display:grid; gap:5px; }
.landing-fields .wide-caption { font-weight:700; }
.landing-fields small { font-weight:400; color:var(--muted); }
.landing-variations { display:grid; grid-template-columns:repeat(5,minmax(180px,1fr)); gap:14px; overflow-x:auto; padding:4px 2px 12px; }
.landing-variation { min-height:285px; box-sizing:border-box; border:2px solid #ddd; border-radius:14px; padding:14px; display:flex; flex-direction:column; gap:8px; cursor:pointer; background:white; color:#231f1b; transition:.15s ease; }
.landing-variation:has(input:checked) { border-color:var(--brand); box-shadow:0 0 0 3px color-mix(in srgb,var(--brand) 18%,transparent); transform:translateY(-2px); }
.landing-variation input { position:absolute; opacity:0; pointer-events:none; }
/* La acción real (elegir esta tarjeta) va arriba, con el mismo peso visual que un
   botón de verdad — para que no compita con "Elegir mi anillo" de la vista previa
   de abajo, que no hace nada al tocarlo. */
.variation-check { text-align:center; background:#fff; border:2px solid var(--brand); color:var(--brand); padding:9px; border-radius:7px; font-weight:700; }
.landing-variation:has(input:checked) .variation-check { background:var(--brand); color:white; }
.variation-check-elegido { display:none; }
.landing-variation:has(input:checked) .variation-check-elegir { display:none; }
.landing-variation:has(input:checked) .variation-check-elegido { display:inline; }
.variation-nombre { display:block; }
.variation-preview-label { margin:4px 0 0; font-size:.72rem; text-transform:uppercase; letter-spacing:.04em; color:var(--text-muted); }
.variation-preview { border:1px dashed #d8d2c4; border-radius:10px; padding:10px; display:flex; flex-direction:column; gap:8px; background:#fdfcfa; }
.variation-logo { font-size:1.3rem; font-weight:800; color:var(--brand); }
.variation-rule { height:3px; width:45px; background:var(--brand); }
.variation-button { margin-top:auto; text-align:center; background:var(--brand); color:white; padding:9px; border-radius:7px; font-weight:700; opacity:.85; }
.theme-editorial { border-radius:0; text-align:left; font-family:Georgia,serif; }
.theme-editorial .variation-logo { font-size:1.55rem; }
.theme-boutique { background:var(--brand-soft); border-radius:22px; text-align:center; }
.theme-boutique .variation-rule { margin-inline:auto; }
.theme-moderna { border-radius:4px; background:linear-gradient(145deg,#fff 62%,var(--brand-soft)); }
.theme-moderna .variation-button { border-radius:0; text-transform:uppercase; font-size:.8rem; letter-spacing:.08em; }
.theme-lujo { background:#171512; color:#f7f1e7; border-color:#171512; }
.theme-lujo .variation-logo,.theme-lujo .variation-nombre { color:var(--brand); }
.theme-lujo .variation-preview { background:#211d18; border-color:#3a342c; }
.landing-publish { max-width:520px; margin:18px auto 8px; display:block; }
.landing-live-link { text-align:center; }

/* Las cinco variantes publicadas reutilizan el mismo contenido y no llaman a la IA. */
.landing-theme-editorial .tienda-hero-inner { text-align:left; font-family:Georgia,"Times New Roman",serif; }
.landing-theme-editorial .tienda-hero { border-radius:0; }
.landing-theme-boutique .tienda-hero { background:var(--accent-soft); }
.landing-theme-boutique .tienda-hero-inner { text-align:center; border-radius:28px; }
.landing-theme-moderna .tienda-hero-inner { text-align:left; background:linear-gradient(135deg,#fff 55%,var(--accent-soft)); border-radius:4px; }
.landing-theme-moderna .tienda-cta { border-radius:0; text-transform:uppercase; letter-spacing:.08em; }
.landing-theme-lujo { background:#141311; color:#f5efe5; }
.landing-theme-lujo .tienda-hero { background:#141311; }
.landing-theme-lujo .tienda-hero-inner { background:#1e1b17; color:#f5efe5; border-color:var(--accent); }
.landing-theme-lujo .wrap,.landing-theme-lujo .topbar { color:#f5efe5; }

@media (max-width:800px) {
  .landing-fields { grid-template-columns:1fr; }
  .landing-fields .wide { grid-column:auto; }
  .landing-variations { grid-template-columns:repeat(5,230px); }
}
.transfer-admin-list { display:grid; gap:12px; min-width:0; }
.transfer-admin-row { display:grid; grid-template-columns:minmax(180px,1fr) minmax(260px,2fr); gap:18px; align-items:end; padding:14px; border:1px solid var(--border); border-radius:10px; }
.transfer-admin-row small { display:block; color:var(--text-muted); margin-top:4px; }
.transfer-admin-row form { display:grid; grid-template-columns:1fr auto; gap:10px; align-items:end; }
.transfer-admin-row label { display:grid; gap:5px; }
.transfer-admin-row .submit { width:auto; margin:0; }
.sms-table { width:100%; border-collapse:collapse; }
.sms-table th,.sms-table td { text-align:left; padding:10px; border-bottom:1px solid var(--border); white-space:nowrap; }
.table-scroll { overflow-x:auto; }
.narrow { max-width:560px; }
@media (max-width:760px) {
    .transfer-admin-row,.transfer-admin-row form { grid-template-columns:1fr; }
    .sms-table { font-size:.82rem; }
    .table-scroll { box-shadow: inset -16px 0 12px -12px rgba(0,0,0,.18); }
}
