* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f6f8;
    color: #222;
}

.topbar {
    background: #b31717;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    flex-wrap: wrap;
    gap: 10px;
}

.brand {
    font-weight: 800;
    letter-spacing: 1px;
}

.menu-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.menu-links a {
    color: white;
    text-decoration: none;
    font-weight: 700;
}

.container {
    max-width: 1150px;
    margin: 30px auto;
    padding: 0 18px;
}

.container.small {
    max-width: 650px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin: 25px 0;
}

.card,
.form-card {
    background: white;
    padding: 22px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
}

.big-number {
    font-size: 40px;
    font-weight: bold;
    margin: 15px 0;
}

.btn,
button {
    display: inline-block;
    background: #b31717;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 11px 16px;
    text-decoration: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: bold;
}

button:hover,
.btn:hover {
    opacity: .9;
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.form-card label {
    display: block;
    margin-top: 14px;
    margin-bottom: 6px;
    font-weight: bold;
}

.form-card input,
.form-card select,
.form-card textarea {
    width: 100%;
    padding: 11px;
    border: 1px solid #bbb;
    border-radius: 7px;
    font-size: 16px;
}

.form-card button {
    margin-top: 20px;
    width: 100%;
}

.table-wrap {
    overflow-x: auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    text-align: left;
    white-space: nowrap;
}

th {
    background: #eee;
}

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: #232323;
    padding: 20px;
}

.login-box {
    width: 100%;
    max-width: 420px;
    background: white;
    padding: 30px;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0,0,0,.3);
}

.login-box h1 {
    margin-top: 0;
}

.login-box label {
    display: block;
    margin-top: 14px;
    margin-bottom: 6px;
    font-weight: bold;
}

.login-box input {
    width: 100%;
    padding: 12px;
    border: 1px solid #bbb;
    border-radius: 7px;
    font-size: 16px;
}

.login-box button {
    width: 100%;
    margin-top: 20px;
}

.alert {
    background: #ffe1e1;
    border: 1px solid #d88;
    color: #8b0000;
    padding: 10px;
    border-radius: 7px;
    margin: 15px 0;
}

.quick-actions {
    margin-top: 25px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

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

    .topbar {
        padding: 12px 15px;
    }

    .menu-links {
        width: 100%;
        justify-content: space-between;
    }
}

/* LIFEGUARD V2 */
.topbar{background:#111214;border-bottom:4px solid #f47721}
.brand-logo img{display:block;width:300px;max-width:45vw;height:70px;object-fit:contain;object-position:left center}
.menu-links a:hover{color:#ffca28}.btn,button{background:#e72d32}.card{border-top:4px solid #f47721}
.cards.four{grid-template-columns:repeat(4,1fr)}.detail{line-height:1.9}.login-body{background:#111214}.login-box{border-top:6px solid #f47721}
@media(max-width:900px){.cards.four{grid-template-columns:repeat(2,1fr)}}@media(max-width:600px){.cards.four{grid-template-columns:1fr}.brand-logo img{width:210px;max-width:80vw;height:55px}.topbar{justify-content:center}}

/* LIFEGUARD V3 */
.catalog-card{background:#fff;padding:18px;margin:16px 0;border-radius:12px;box-shadow:0 2px 10px rgba(0,0,0,.07);border-left:5px solid #f47721}
.catalog-title{font-size:20px;margin-bottom:12px}
.price-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:12px}
.price-grid label,.order-head-grid label{display:block;font-weight:700;margin-bottom:5px}
.price-grid input,.order-head-grid input,.order-head-grid select{width:100%;padding:10px;border:1px solid #bbb;border-radius:7px}
.order-head-grid{display:grid;grid-template-columns:2fr 1fr 1fr;gap:15px}
.line-table-wrap{overflow-x:auto}
#lineas select,#lineas input{width:100%;min-width:120px;padding:9px;border:1px solid #bbb;border-radius:6px}
#lineas .qty{min-width:80px}
.remove-btn{background:#444;padding:6px 11px;font-size:20px}
.btn.secondary{background:#555}
.order-total{text-align:right;font-size:28px;font-weight:800;margin:20px 0;color:#b31717}
.okbox{background:#e8f7e8;border:1px solid #8bc48b;padding:10px;border-radius:8px;margin:12px 0}
.money{font-size:30px}
@media(max-width:800px){
 .price-grid{grid-template-columns:1fr 1fr}
 .order-head-grid{grid-template-columns:1fr}
}
@media(max-width:520px){.price-grid{grid-template-columns:1fr}}
