
:root {
    --bg: #0e0f13;
    --fg: #eaeaea;
    --muted: #9aa4b2;
    --card: #141721;
    --accent: #6ee7ff;
    --ok: #22c55e;
    --warn: #f59e0b;
    --bad: #ef4444;
    --line: #232637;
}

/* ====== Reset y básicos ====== */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, Segoe UI, Inter, Arial;
    background: linear-gradient(180deg, #0d0f14, #0b0c11);
    color: var(--fg);
}

header {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #0e0f13d9;
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(8px);
}

.wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}

.between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 10px 30px #0006;
}

.pad {
    padding: 16px;
}

.title {
    font-size: 20px;
    font-weight: 700;
}

.btn {
    appearance: none;
    border: 1px solid var(--line);
    background: #171a24;
    color: #fff;
    padding: 10px 14px;
    border-radius: 12px;
    cursor: pointer;
}

.btn:hover {
    filter: brightness(1.1);
}

.btn.accent {
    border-color: #2c3b44;
    background: #0d1b20;
    color: #c9f4ff;
}

.btn.good {
    border-color: #123219;
    background: #0f1f14;
    color: #d0fbe0;
}

.btn.ghost {
    background: transparent;
}

input,
select {
    width: 100%;
    background: #0f121a;
    border: 1px solid var(--line);
    color: var(--fg);
    padding: 8px;
    border-radius: 8px;
}

.grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
}

@media(max-width:900px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

.product {
    display: grid;
    grid-template-columns: 80px 1fr 150px 100px 120px;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.product img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--line);
}

.product[data-pack] {
    grid-template-columns: 80px 1fr 100px 120px;
}

.divider {
    height: 1px;
    background: var(--line);
    margin: 12px 0;
}

.cart-item {
    display: grid;
    grid-template-columns: 1fr 80px 60px 100px 40px;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.total {
    font-size: 22px;
    font-weight: 800;
}

.tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.tabs button {
    padding: 8px 16px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #171a24;
    color: #fff;
    cursor: pointer;
}

.tabs button.active {
    background: #0d1b20;
    color: #c9f4ff;
    border-color: var(--accent);
}

.empty {
    padding: 24px;
    border: 1px dashed var(--line);
    border-radius: 12px;
    color: var(--muted);
    text-align: center;
}

/* ====== Scroll compartido ====== */
.scrollable {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 8px;
    -webkit-overflow-scrolling: touch;
}

.scrollable * {
    pointer-events: auto;
}

.scrollable::-webkit-scrollbar {
    width: 8px;
}

.scrollable::-webkit-scrollbar-thumb {
    background-color: #555;
    border-radius: 4px;
}

.scrollable::-webkit-scrollbar-track {
    background: #0f121a;
    border-radius: 4px;
}

/* ====== Ticket ====== */
#ticketDlg {
    background: #1b1f2a;
    color: var(--fg);
    border-radius: 16px;
    border: 1px solid var(--line);
    width: 600px;
    padding: 24px;
}

#ticketDlg .pad .title {
    color: var(--accent);
    font-size: 22px;
    font-weight: 700;
}

#ticket {
    background: #0f121a;
    color: var(--fg) !important;
    border-radius: 12px;
    padding: 16px;
    font-family: monospace;
}

#ticket h2 {
    text-align: center;
    color: var(--accent);
    margin-top: 0;
}

#ticket table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

#ticket th,
#ticket td {
    border: 1px solid var(--line);
    padding: 6px;
    font-size: 14px;
    text-align: left;
}

#ticket .right {
    text-align: right;
}

/* ====== Login / Registro ====== */
#loginDlg {
    display:none;
    position: fixed;
    top:0; left:0; right:0; bottom:0;
    background: rgba(0,0,0,0.5);
    justify-content:center;
    align-items:center;
}

#loginContent {
    background: var(--card);
    color: var(--fg);
    border-radius: 16px;
    border: 1px solid var(--line);
    padding: 24px;
    width: 300px;
    display: flex;
    flex-direction: column;
}

#loginContent h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--accent);
    margin-top: 0;
}


#loginContent input {
    background: #0f121a;
    color: var(--fg);
    border: 1px solid var(--line);
    padding: 8px;
    border-radius: 8px;
    margin-top: 8px;
}


#loginContent button {
    margin-top: 12px;
    width: 100%;
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 700;
    cursor: pointer;
}

#loginContent .btn.good {
    border-color: #123219;
    background: #0f1f14;
    color: #d0fbe0;
}

#loginContent .btn.ghost {
    background: transparent;
}

#errorMsg, #loginError, #registerError {
    color: var(--warn);
    font-size: 13px;
    margin-top: 6px;
    min-height: 18px;
}


/* ====== Método de Pago ====== */
#paymentDlg {
    background: var(--card);
    color: var(--fg);
    border-radius: 16px;
    border: 1px solid var(--line);
    width: 600px;
    padding: 24px;
}

#paymentDlg .pad .title {
    color: var(--accent);
    font-size: 22px;
    font-weight: 700;
}

#paymentDlg select {
    width: 100%;
    background: #0f121a;
    border: 1px solid var(--line);
    color: var(--fg);
    padding: 8px;
    border-radius: 12px;
    font-size: 14px;
}

#paymentDlg #paymentInfo {
    margin-top: 12px;
    padding: 12px;
    background: #0f121a;
    border: 1px solid var(--line);
    border-radius: 12px;
    font-family: monospace;
    font-size: 14px;
    color: var(--fg);
}

/* Tarjetas de método de pago */
.payment-options {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.payment-option {
    background: #0f121a;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: 0.2s;
}

.payment-option:hover {
    background: #171a24;
    border-color: var(--accent);
}

.payment-option.active {
    border-color: var(--accent);
    box-shadow: 0 0 12px #6ee7ff33;
}

.payment-option .title {
    font-weight: 700;
    color: #c9f4ff;
}

.payment-option .details {
    margin-top: 6px;
    font-size: 14px;
    color: var(--muted);
}

.payment-option img.qr {
    width: 100px;
    height: 100px;
    margin-top: 6px;
}


