﻿:root {
    --bg: #020617;
    --card: #0f172a;
    --accent: #22c55e;
    --accent2: #38bdf8;
    --text: #e5e7eb;
    --text-soft: #9ca3af;
    --border: #1f2937;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #1e293b 0, #020617 55%);
    color: var(--text);
    min-height: 100vh;
    padding: 10px;
}


html, body {
    background: #020617 !important;
    color: white;
    height: 100%;
    margin: 0;
    padding: 0;
}




.app {
    max-width: 960px;
    margin: 0 auto;
    padding: 14px 12px 18px;
    background: radial-gradient(circle at top left, #020617 0, #020617 40%, #020617ee 100%);
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.9);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(15, 23, 42, 0.9);
    position: relative;
    overflow-x: hidden;
    overflow-y: visible; /* ← CLAVE */
}

.header {
    position: sticky;
    top: 0; /* ← más fiable que -10px */
    z-index: 20;
    background: radial-gradient(circle at top, #020617 0, #020617 55%, rgba(2, 6, 23, 0.97) 100%);
    backdrop-filter: blur(10px);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.4rem;
    font-weight: 600;
}

.title-icon {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 0, #38bdf8, #0ea5e9 40%, #0369a1 100%);
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.8), 0 0 12px rgba(56, 189, 248, 0.8);
    font-size: 2em;
}

.subtitle {
    margin-top: 2px;
    font-size: 1.2rem;
    color: var(--text-soft);
}

.pill-row {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pill {
    padding: 2px 7px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    font-size: 1.1rem;
    color: var(--text-soft);
    background: rgba(15, 23, 42, 0.9);
}

.pill-strong {
    border-color: rgba(56, 189, 248, 0.9);
    background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.3), rgba(15, 23, 42, 0.95));
    color: #e0f2fe;
}

.btn-new {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    font-size: 1.2rem;
    border-radius: 999px;
    border: 1px solid rgba(56, 189, 248, 0.95);
    background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 1));
    color: #e0f2fe;
    cursor: pointer;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 1), 0 10px 20px rgba(15, 23, 42, 0.95), 0 0 14px rgba(56, 189, 248, 0.4);
    transition: transform 0.1s ease, box-shadow 0.12s ease, filter 0.1s ease;
    white-space: nowrap;
}

    .btn-new span.icon {
        font-size: 1.4rem;
    }

    .btn-new:hover {
        transform: translateY(-0.5px);
        filter: brightness(1.05);
        box-shadow: 0 14px 26px rgba(15, 23, 42, 1), 0 0 18px rgba(56, 189, 248, 0.65);
    }

    .btn-new:active {
        transform: translateY(1px) scale(0.99);
        box-shadow: 0 7px 14px rgba(15, 23, 42, 1), 0 0 10px rgba(56, 189, 248, 0.55);
    }

.search-row {
    margin-top: 8px;
}

#searchInput {
    width: 100%;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 1.2rem;
    border: 1px solid rgba(51, 65, 85, 0.9);
    background: rgba(15, 23, 42, 0.96);
    color: var(--text);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

    #searchInput::placeholder {
        color: rgba(148, 163, 184, 0.8);
    }

    #searchInput:focus {
        border-color: var(--accent);
        box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.7);
        background: #020617;
    }

.card {
    margin-top: 10px;
    background: radial-gradient(circle at top left, #020617, #020617 45%, #020617 100%);
    border-radius: 14px;
    border: 1px solid rgba(31, 41, 55, 0.95);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.85), inset 0 0 0 1px rgba(15, 23, 42, 0.9);
    padding: 12px;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
}

    .card-title small {
        font-size: 1.1rem;
        color: var(--text-soft);
    }

/* MODAL */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 10px;
    z-index: 50;
}

.modal-card {
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.modal-title-main {
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-title-icon {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 0, #22c55e, #16a34a 50%, #166534 100%);
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.9), 0 0 12px rgba(34, 197, 94, 0.8);
    font-size: 2rem;
}

.modal-title-text {
    font-size: 1.3rem;
    font-weight: 600;
}

.modal-subtitle-text {
    font-size: 1.2rem;
    color: var(--text-soft);
}

.btn-close-modal {
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.9);
    background: rgba(15, 23, 42, 0.95);
    color: var(--text-soft);
    padding: 4px 9px;
    cursor: pointer;
    font-size: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 1), 0 8px 16px rgba(15, 23, 42, 0.9);
}

    .btn-close-modal:hover {
        filter: brightness(1.08);
        border-color: rgba(248, 113, 113, 0.9);
        color: #fecaca;
    }

form {
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) minmax(0, 2.4fr);
    gap: 10px;
}

@media (max-width: 720px) {
    form {
        grid-template-columns: 1fr;
    }
}

label {
    display: block;
    font-size: 1.2rem;
    color: var(--text-soft);
    margin-bottom: 3px;
}

input[type="text"],
input[type="number"], /* ← ESTA LÍNEA ES LA CLAVE */
textarea,
select {
    width: 100%;
    border-radius: 9px;
    padding: 7px 9px;
    font-size: 1.25rem;
    border: 1px solid rgba(51, 65, 85, 0.9);
    background: rgba(15, 23, 42, 0.98);
    color: var(--text);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

    input::placeholder,
    textarea::placeholder {
        color: rgba(148, 163, 184, 0.7);
    }

    input:focus,
    textarea:focus,
    select:focus {
        border-color: var(--accent2);
        box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.6);
        background: #020617;
    }

textarea {
    min-height: 80px;
    resize: vertical;
}

.field-group {
    margin-bottom: 8px;
}

.field-inline {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.file-wrapper {
    padding: 8px 9px 9px;
    border-radius: 10px;
    border: 1px dashed rgba(75, 85, 99, 0.95);
    background: radial-gradient(circle at top, rgba(15, 23, 42, 0.5), rgba(15, 23, 42, 0.95));
    position: relative;
}

.file-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

    .file-main span {
        font-size: 1.2rem;
    }

    .file-main small {
        font-size: 1.1rem;
        color: var(--text-soft);
    }

.file-tip {
    font-size: 1.12rem;
    color: var(--text-soft);
    margin-bottom: 6px;
}

.file-btn-wrap {
    position: relative;
    display: inline-block;
}

.file-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 1.2rem;
    border-radius: 999px;
    border: 1px solid rgba(56, 189, 248, 0.9);
    background: radial-gradient(circle at top left, #0ea5e9, #0369a1);
    color: #ecfeff;
    cursor: pointer;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.9), 0 12px 20px rgba(15, 23, 42, 1), 0 0 16px rgba(56, 189, 248, 0.5);
    transition: transform 0.1s ease, box-shadow 0.12s ease, filter 0.1s ease;
}

    .file-btn:hover {
        transform: translateY(-0.5px);
        filter: brightness(1.05);
        box-shadow: 0 16px 26px rgba(15, 23, 42, 1), 0 0 20px rgba(56, 189, 248, 0.7);
    }

    .file-btn:active {
        transform: translateY(1px) scale(0.99);
        box-shadow: 0 7px 12px rgba(15, 23, 42, 1), 0 0 12px rgba(56, 189, 248, 0.55);
    }

    .file-btn span.icon {
        font-size: 1.4rem;
    }

input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.preview {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
}

.preview-thumb {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.9);
    background: #020617;
    display: none;
}

    .preview-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.preview-text {
    font-size: 1.15rem;
    color: var(--text-soft);
}

.form-footer {
    margin-top: 8px;
    display: flex;
    justify-content: flex-end;
}

.btn-save {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    font-size: 1.25rem;
    border-radius: 999px;
    border: 1px solid rgba(34, 197, 94, 0.9);
    background: radial-gradient(circle at top left, #22c55e, #15803d);
    color: #ecfdf5;
    cursor: pointer;
    font-weight: 500;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 1), 0 14px 26px rgba(22, 163, 74, 0.9), 0 0 16px rgba(45, 212, 191, 0.7);
    transition: transform 0.1s ease, box-shadow 0.12s ease, filter 0.1s ease;
}

    .btn-save:hover {
        transform: translateY(-0.5px);
        filter: brightness(1.06);
        box-shadow: 0 18px 32px rgba(22, 163, 74, 1), 0 0 20px rgba(45, 212, 191, 0.85);
    }

    .btn-save:active {
        transform: translateY(1px) scale(0.99);
        box-shadow: 0 8px 16px rgba(22, 163, 74, 1), 0 0 12px rgba(45, 212, 191, 0.7);
    }

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.count {
    font-size: 1.15rem;
    color: var(--text-soft);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.count-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--accent2);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.8);
}

.empty {
    border-radius: 10px;
    border: 1px dashed rgba(75, 85, 99, 0.95);
    padding: 9px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 1.18rem;
    color: var(--text-soft);
    background: radial-gradient(circle at top left, rgba(24, 35, 52, 0.9), rgba(15, 23, 42, 0.98));
}

    .empty span.icon {
        font-size: 1.5rem;
    }

.badge-small {
    padding: 3px 7px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.9);
    font-size: 1.1rem;
    color: var(--text-soft);
    background: rgba(15, 23, 42, 0.9);
    white-space: nowrap;
}

.groups-wrapper {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.group-cat {
    border-radius: 12px;
    border: 1px solid rgba(55, 65, 81, 0.95);
    background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.95), #020617);
    padding: 8px 9px 9px;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.95), inset 0 0 0 1px rgba(15, 23, 42, 0.95);
}

.group-cat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.group-cat-title {
    font-size: 1.25rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    .group-cat-title span.dot {
        width: 8px;
        height: 8px;
        border-radius: 999px;
        background: rgba(56, 189, 248, 0.8);
        box-shadow: 0 0 12px rgba(56, 189, 248, 0.9);
    }

.group-cat-count {
    font-size: 1.15rem;
    color: var(--text-soft);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.group-sub {
    margin-top: 4px;
    border-radius: 9px;
    border: 1px solid rgba(55, 65, 81, 0.9);
    background: radial-gradient(circle at top left, #020617, rgba(15, 23, 42, 0.95));
    padding: 6px 7px 7px;
}

.group-sub-header {
    font-size: 1.18em;
    font-weight: 500;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
}

    .group-sub-header small {
        font-size: 1.1rem;
        color: var(--text-soft);
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    gap: 8px;
}

.item {
    border-radius: 10px;
    background: radial-gradient(circle at top left, #020617, #020617 70%);
    border: 1px solid rgba(55, 65, 81, 0.95);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.9), inset 0 0 0 1px rgba(15, 23, 42, 0.95);
    position: relative;
    opacity: 1;
    transform: translateY(0) scale(1);
    max-height: 400px;
    transition: opacity 0.23s ease, transform 0.23s ease, max-height 0.25s ease, margin 0.25s ease, padding 0.25s ease, border-width 0.25s ease;
}

.item-hidden {
    opacity: 0;
    transform: translateY(4px) scale(0.97);
    max-height: 0;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-width: 0;
    pointer-events: none;
}

.item-thumb {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #020617;
    overflow: hidden;
}

    .item-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transform-origin: center;
        transition: transform 0.25s ease;
    }

.item:hover .item-thumb img {
    transform: scale(1.03);
}

.item-body {
    padding: 6px 7px 7px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 1.17rem;
}

.item-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-desc {
    font-size: 1.14rem;
    color: var(--text-soft);
    max-height: 3.1em;
    overflow: hidden;
}

.item-meta {
    margin-top: 3px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    font-size: 1.1rem;
    color: rgba(148, 163, 184, 0.95);
    flex-wrap: wrap;
}

.item-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
    gap: 6px;
    font-size: 1.1rem;
}

.btn-del {
    border-radius: 999px;
    border: 1px solid rgba(248, 113, 113, 0.9);
    padding: 2px 8px;
    background: radial-gradient(circle at top left, rgba(248, 113, 113, 0.2), rgba(127, 29, 29, 1));
    color: #fee2e2;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-mini-add {
    border-radius: 999px;
    border: 1px solid rgba(56, 189, 248, 0.9);
    padding: 1px 7px;
    font-size: 1.1rem;
    background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 1));
    color: #e0f2fe;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 1), 0 6px 12px rgba(15, 23, 42, 0.95);
}

    .btn-mini-add span.icon {
        font-size: 1.2rem;
    }

    .btn-mini-add:hover {
        filter: brightness(1.06);
        box-shadow: 0 9px 16px rgba(15, 23, 42, 1), 0 0 10px rgba(56, 189, 248, 0.45);
    }

.footer-strip {
    margin-top: 12px;
    height: 1px;
    border-radius: 999px;
    background: linear-gradient( to right, rgba(56, 189, 248, 0.3), rgba(34, 197, 94, 0.35), rgba(56, 189, 248, 0.25) );
}

/* Logo dentro del header */
.title-logo {
   
    height: 34px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    display: block;
}

/* Alineación PNG + texto dinámico */
.title {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer; /* para abrir menú */
}

#sectionTitle {
    font-size: 1.5em;
    font-weight: 600;
}

.item-price {
    font-size: 1.18rem;
    font-weight: 600;
    color: #86efac; /* verde pastel */
}

.item-qty {
    font-size: 1.17rem;
    color: #60a5fa; /* azul suave */
}

.item-info-row {
    display: flex;
    justify-content: space-between; /* ← fuerza cantidad izquierda + precio derecha */
    align-items: center;
    margin-top: 4px;
    font-size: 1.2rem;
    width: 100%;
}

.item-qty {
    font-weight: 600;
    color: #22c55e;
}

.item-price {
    font-weight: 600;
    color: #38bdf8;
    text-align: right;
    flex-shrink: 0; /* ← evita que se mueva o corte */
}



#sectionTitle {
    cursor: pointer;
    position: relative;
}


.menu-catalogos {
    position: fixed;
    top: 3em;
    left:0;
    right: 12px;
    background: #020617;
    border: 1px solid #1f2937;
    border-radius: 10px;
    padding: 6px 10px;
    z-index: 100000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.45);
}

    .menu-catalogos button {
        width: 180px;
        background: none;
        border: none;
        color: #e5e7eb;
        text-align: left;
        padding: 6px;
        cursor: pointer;
    }

        .menu-catalogos button:hover {
            background: #1e293b;
        }

#sectionTitle {
    cursor: pointer;
}


.switch-toggle {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 22px;
    margin-bottom: 6px;
}

    .switch-toggle input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #ccc;
    border-radius: 22px;
    transition: .3s;
}

    .slider:before {
        content: "";
        position: absolute;
        height: 18px;
        width: 18px;
        left: 2px;
        bottom: 2px;
        background: white;
        border-radius: 50%;
        transition: .3s;
    }

input:checked + .slider {
    background-color: #22c55e; /* verde */
}

    input:checked + .slider:before {
        transform: translateX(20px);
    }




.switch-toggle {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
    margin-left: 8px;
}

    .switch-toggle input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.slider-toggle {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #64748b;
    transition: .3s;
    border-radius: 999px;
}

    .slider-toggle:before {
        position: absolute;
        content: "";
        height: 16px;
        width: 16px;
        left: 2px;
        bottom: 2px;
        background-color: white;
        transition: .3s;
        border-radius: 50%;
    }

.switch-toggle input:checked + .slider-toggle {
    background-color: #22c55e;
}

    .switch-toggle input:checked + .slider-toggle:before {
        transform: translateX(18px);
    }


html {
    font-size: 90%;
}


.item-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-left: -.3em;
}
