:root {
    --orvia-blue: #123f68;
    --orvia-blue-dark: #0c3153;
    --orvia-green: #20b57a;
    --background: #f5f8fb;
    --surface: #ffffff;
    --text: #172433;
    --text-soft: #6d7a88;
    --border: #dfe7ee;
    --danger: #d94b4b;
    --radius: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--background);
}

a { color: var(--orvia-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, #f8fbfd 0%, #eef6f4 100%);
}

.auth-wrapper { width: 100%; max-width: 430px; }

.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.orvia-logo-auth {
    display: block;
    width: 100%;
    max-width: 330px;
    height: auto;
    object-fit: contain;
}

.auth-card {
    padding: 34px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 15px 45px rgba(27, 58, 82, .08);
}

.auth-card-center { text-align: center; }

.auth-card h1 {
    margin: 0 0 8px;
    color: var(--orvia-blue);
    font-size: 27px;
}

.auth-description {
    margin: 0 0 28px;
    color: var(--text-soft);
    line-height: 1.5;
}

.form-group { margin-bottom: 20px; }

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-size: 14px;
    font-weight: 600;
}

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

.label-row label { margin-bottom: 7px; }

.link-disabled {
    margin-bottom: 7px;
    color: #9aa6b2;
    font-size: 13px;
}

input, select, textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: white;
    color: var(--text);
    font: inherit;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--orvia-green);
    box-shadow: 0 0 0 3px rgba(32, 181, 122, .12);
}

.password-field { position: relative; }
.password-field input { padding-right: 50px; }

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    font-size: 17px;
}

.password-toggle:hover { background: #f2f6f8; }

.field-help {
    margin-top: 7px;
    color: var(--text-soft);
    font-size: 12px;
}

.field-help.is-valid { color: #14875b; }
.field-help.is-invalid { color: var(--danger); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 11px 20px;
    border: 0;
    border-radius: 10px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform .1s, opacity .2s;
    text-decoration: none;
}

.btn:hover { opacity: .94; text-decoration: none; }
.btn:active { transform: scale(.99); }
.btn-primary { background: var(--orvia-green); color: white; }
.btn-secondary { background: var(--orvia-blue); color: white; }
.btn-block { width: 100%; }

.alert {
    margin-bottom: 20px;
    padding: 13px 15px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.45;
}

.alert-error { background: #fff0f0; color: #9f3333; border: 1px solid #f2cccc; }
.alert-info { background: #eef7fb; color: #315e76; border: 1px solid #cfe4ee; }
.alert-success { background: #eefaf5; color: #247456; border: 1px solid #ccebdd; }

.auth-footer {
    margin-top: 25px;
    text-align: center;
    color: var(--text-soft);
    font-size: 14px;
}

.success-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e9f9f2;
    color: var(--orvia-green);
    font-size: 30px;
    font-weight: 800;
}

/* ONBOARDING */

.onboarding-page {
    align-items: flex-start;
}

.onboarding-wrapper {
    width: 100%;
    max-width: 620px;
    margin: 20px auto;
}

.onboarding-card {
    padding: 38px;
}

.onboarding-progress {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin: 0 auto 32px;
    max-width: 350px;
}

.progress-item {
    min-width: 82px;
    text-align: center;
    color: #9aa6b2;
}

.progress-item span {
    width: 34px;
    height: 34px;
    margin: 0 auto 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #edf2f5;
    font-weight: 800;
}

.progress-item small {
    display: block;
    font-size: 11px;
    font-weight: 700;
}

.progress-item.active { color: var(--orvia-blue); }

.progress-item.active span {
    background: var(--orvia-green);
    color: white;
}

.progress-line {
    height: 2px;
    flex: 1;
    margin-top: 16px;
    background: #e2e8ed;
}

.onboarding-step { display: none; }
.onboarding-step.active { display: block; }

.step-kicker {
    margin-bottom: 7px;
    color: var(--orvia-green);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.optional-text {
    color: var(--text-soft);
    font-weight: 400;
}

.logo-upload {
    display: flex !important;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border: 1px dashed #bdcad4;
    border-radius: 14px;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}

.logo-upload:hover {
    border-color: var(--orvia-green);
    background: #f8fcfa;
}

.logo-preview-wrap {
    width: 68px;
    height: 68px;
    flex: 0 0 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 14px;
    background: #f0f5f7;
}

.logo-preview-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-placeholder {
    color: var(--orvia-green);
    font-size: 30px;
    font-weight: 300;
}

.logo-upload-copy {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.logo-upload-copy strong {
    color: var(--orvia-blue);
}

.logo-upload-copy span {
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 400;
}

.file-input-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.step-back {
    margin: 0 0 20px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--orvia-blue);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.business-type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 10px;
}

.business-type-card {
    position: relative;
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    min-height: 150px;
    margin: 0 !important;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 15px;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s, transform .1s;
}

.business-type-card:hover {
    border-color: #9edbc4;
    box-shadow: 0 8px 24px rgba(31, 74, 94, .07);
}

.business-type-card.selected {
    border-color: var(--orvia-green);
    box-shadow: 0 0 0 3px rgba(32, 181, 122, .10);
    background: #fbfffd;
}

.business-type-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.business-type-icon {
    margin-bottom: 10px;
    font-size: 28px;
}

.business-type-card strong {
    margin-bottom: 5px;
    color: var(--orvia-blue);
}

.business-type-card small {
    color: var(--text-soft);
    line-height: 1.35;
}

.onboarding-choice-help {
    margin: 10px 0 22px;
    text-align: center;
}

.onboarding-footnote {
    margin: 18px auto 0;
    max-width: 480px;
    text-align: center;
    color: var(--text-soft);
    font-size: 12px;
    line-height: 1.5;
}

.business-logo-success {
    width: 92px;
    height: 92px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: white;
}

.business-logo-success img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.success-description { margin-bottom: 18px; }

.business-ready-card {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #f7fafb;
    color: var(--text-soft);
    font-size: 13px;
    text-align: left;
}

.business-ready-card strong {
    color: var(--orvia-blue);
    white-space: nowrap;
}

@media (max-width: 520px) {
    .auth-page {
        padding: 20px 15px;
        align-items: flex-start;
    }

    .auth-wrapper { margin-top: 20px; }
    .auth-card { padding: 25px 20px; }
    .orvia-logo-auth { max-width: 280px; }

    .onboarding-wrapper {
        margin-top: 5px;
    }

    .onboarding-card {
        padding: 25px 20px;
    }

    .business-type-grid {
        grid-template-columns: 1fr;
    }

    .business-type-card {
        min-height: 120px;
    }

    .business-ready-card {
        flex-direction: column;
        gap: 5px;
    }
}

/* ORVIA: acciones destructivas con baja lógica */
.delete-inline-form{display:inline-flex;margin-top:10px;margin-left:8px;vertical-align:middle}
.danger-button{appearance:none;border:1px solid #efc5c5;background:#fff;color:#b42318;border-radius:10px;padding:10px 14px;font:inherit;font-weight:700;cursor:pointer}
.danger-button:hover{background:#fff5f5;border-color:#e7a7a7}
.inventory-danger-note{margin:14px 0;padding:12px 14px;border:1px solid #f2c6c6;border-radius:12px;background:#fff7f7;color:#9f1c1c;font-weight:700}
@media(max-width:640px){.delete-inline-form{margin-left:0;margin-top:10px}.danger-button{width:100%;justify-content:center}}

/* ORVIA v0.7 · Pedidos y reservas */
.orders-heading,.order-hero,.orders-toolbar,.order-actions{display:flex;align-items:center;justify-content:space-between;gap:18px}.orders-heading{margin-bottom:22px}.orders-heading h1,.order-hero h1{margin:2px 0 5px;color:var(--orvia-blue)}.orders-toolbar{margin-bottom:20px;align-items:flex-end}.orders-search{display:flex;align-items:center;gap:8px;min-width:280px;background:#fff;border:1px solid var(--border);border-radius:12px;padding:0 12px}.orders-search input{border:0;outline:0;width:100%;padding:11px 0;background:transparent}.orders-filters{display:flex;gap:7px;flex-wrap:wrap}.orders-filters a{padding:8px 11px;border:1px solid var(--border);border-radius:999px;background:#fff;color:var(--text-soft);font-size:13px;font-weight:700}.orders-filters a.active{background:var(--orvia-blue);color:#fff;border-color:var(--orvia-blue)}.orders-list{display:grid;gap:10px}.order-card{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:16px 18px;background:#fff;border:1px solid var(--border);border-radius:16px;color:inherit;text-decoration:none}.order-card:hover{transform:translateY(-1px);box-shadow:0 8px 25px rgba(25,50,80,.07)}.order-card h3{margin:3px 0 5px}.order-card small,.order-card span{color:var(--text-soft)}.order-card>div:last-child{display:flex;align-items:flex-end;flex-direction:column;gap:8px}.order-card>div:last-child strong{font-size:18px;color:var(--orvia-blue)}.order-status{display:inline-flex;padding:6px 10px;border-radius:999px;font-size:12px;font-weight:800;background:#eef2f7;color:#536171}.order-status.preparando{background:#fff4df;color:#9a6500}.order-status.listo{background:#eaf8ef;color:#14733c}.order-status.entregado{background:#eaf3ff;color:#235da7}.order-status.cancelado{background:#fff0f0;color:#a32929}.orders-empty{text-align:center;padding:55px 20px;background:#fff;border:1px dashed var(--border);border-radius:18px}.orders-empty svg{width:42px;height:42px}.order-hero{background:#fff;border:1px solid var(--border);border-radius:18px;padding:22px;margin:15px 0}.order-hero>div:last-child{display:flex;flex-direction:column;align-items:flex-end;gap:10px}.order-hero>div:last-child>strong{font-size:26px;color:var(--orvia-blue)}.order-progress,.order-items,.order-summary,.order-production{background:#fff;border:1px solid var(--border);border-radius:18px;margin:14px 0}.order-progress{padding:18px}.order-progress>div:first-child{display:flex;justify-content:space-between;gap:15px;margin-bottom:10px}.order-progress-bar{height:9px;border-radius:999px;background:#edf1f5;overflow:hidden}.order-progress-bar i{display:block;height:100%;background:#2f8f67;border-radius:inherit}.order-items{overflow:hidden}.order-items-head,.order-item{display:grid;grid-template-columns:minmax(240px,2fr) .6fr 1.2fr .7fr;gap:15px;align-items:center;padding:13px 17px}.order-items-head{background:#f7f9fb;color:var(--text-soft);font-size:12px;font-weight:800;text-transform:uppercase}.order-item{border-top:1px solid var(--border)}.order-item:first-of-type{border-top:0}.order-item small{display:block;margin-top:4px;color:var(--text-soft)}.order-item>strong:last-child{text-align:right}.missing-text{color:#b26a00!important}.ok-text{color:#18794e!important}.order-summary{padding:18px;display:grid;grid-template-columns:1fr minmax(280px,360px);gap:25px}.order-summary>div:last-child{display:grid;gap:9px}.order-summary>div:last-child span,.order-summary>div:last-child>strong{display:flex;justify-content:space-between}.order-summary>div:last-child>strong{padding-top:10px;border-top:1px solid var(--border);font-size:18px}.order-actions{justify-content:flex-end;margin:16px 0;flex-wrap:wrap}.order-production{padding:18px}.order-production>div{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:12px 0;border-top:1px solid var(--border)}.order-production small{display:block;color:var(--text-soft);margin-top:4px}.muted{color:var(--text-soft)}
@media(max-width:760px){.orders-toolbar,.orders-heading,.order-hero{align-items:stretch;flex-direction:column}.orders-search{min-width:0;width:100%}.order-card{align-items:flex-start}.order-items{overflow-x:auto}.order-items-head,.order-item{min-width:700px}.order-summary{grid-template-columns:1fr}.order-actions>*{width:100%}.order-actions button,.order-actions a{width:100%;justify-content:center}.order-production>div{align-items:flex-start;flex-direction:column}.order-hero>div:last-child{align-items:flex-start}}

/* ORVIA v0.7.2 · Cotizaciones flexibles */
.quote-item-flex{display:block!important}.quote-item-main{display:grid;grid-template-columns:minmax(220px,2fr) .65fr .8fr .7fr .8fr 34px;gap:10px;align-items:end}.tier-box{margin:9px 0 2px;padding:9px 12px;background:#f8fafc;border-radius:10px}.tier-list{display:grid;gap:7px;margin-top:6px}.tier-row{display:flex;align-items:center;gap:7px;flex-wrap:wrap;font-size:12px;color:var(--text-soft)}.tier-row input{width:110px;padding:7px 8px}.remove-tier,.remove-spec{border:0;background:transparent;color:#a32929;font-size:20px;cursor:pointer}.dynamic-specs{display:grid;gap:9px}.spec-row{display:grid;grid-template-columns:minmax(140px,.7fr) minmax(220px,2fr) 38px;gap:9px}.quote-spec-view{margin:18px 0;padding:16px;background:#f8fafc;border-radius:12px}.quote-spec-view h3{margin:0 0 9px}.quote-spec-view>div{display:grid;grid-template-columns:180px 1fr;padding:8px 0;border-top:1px solid var(--border)}.quote-tier-view{display:flex;gap:10px;flex-wrap:wrap;padding:6px 17px 11px;background:#fafbfc;font-size:12px;color:var(--text-soft)}
@media(max-width:760px){.quote-item-main{grid-template-columns:1fr 1fr}.quote-item-main .item-desc{grid-column:1/-1}.spec-row{grid-template-columns:1fr 38px}.spec-row input:nth-child(2){grid-column:1/2}.quote-spec-view>div{grid-template-columns:1fr;gap:3px}}

/* ORVIA v0.9.5 - Configuración */
.settings-page{max-width:1180px}.settings-narrow{max-width:900px}.settings-head{margin-bottom:22px}.settings-head .eyebrow{margin:0 0 6px;color:#16a765;font-size:11px;font-weight:800;letter-spacing:.09em}.settings-head h1{margin:0;color:#0b2745;font-size:30px}.settings-head p{margin:7px 0 0;color:#718096}.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.settings-card{display:grid;grid-template-columns:48px 1fr auto;align-items:center;gap:15px;padding:20px;background:#fff;border:1px solid #dfe7ed;border-radius:16px;text-decoration:none;color:#0b2745;box-shadow:0 5px 18px rgba(11,39,69,.04)}.settings-card:hover{border-color:#b9d9ca;transform:translateY(-1px)}.settings-card h2{margin:0 0 4px;font-size:17px}.settings-card p{margin:0;color:#718096;font-size:13px;line-height:1.45}.settings-card>b{color:#16a765;font-size:20px}.settings-icon{display:flex;align-items:center;justify-content:center;width:48px;height:48px;border-radius:13px;background:#eef8f3;color:#168b58;font-weight:900;font-size:20px}.settings-icon svg{width:22px;height:22px}.settings-checks{display:grid;grid-template-columns:1fr 1fr;gap:12px}.settings-checks label{display:flex;align-items:center;gap:10px;padding:13px 14px;border:1px solid #e0e8ee;border-radius:12px;background:#f9fbfc;font-weight:700;color:#344e63}.settings-checks input{width:18px;height:18px}.user-dropdown a{box-sizing:border-box}
@media(max-width:700px){.settings-grid{grid-template-columns:1fr}.settings-head h1{font-size:25px}.settings-card{padding:16px}.settings-checks{grid-template-columns:1fr}}


/* ORVIA v0.11 - pulido de Mi cuenta / Mi negocio */
.settings-form{padding-bottom:24px}.settings-section{overflow:hidden}.settings-section-title{display:flex;align-items:center;gap:13px;margin-bottom:20px;padding-bottom:16px;border-bottom:1px solid #edf1f4}.settings-section-title h2{margin:0 0 3px!important;font-size:18px;color:#173b5b}.settings-section-title p{margin:0;color:#7a8895;font-size:12px;line-height:1.45}.settings-section-icon{width:42px;height:42px;flex:0 0 42px;border-radius:12px;background:#eef8f3;color:#168b58;display:grid;place-items:center;font-size:18px}.settings-section-icon svg{width:20px;height:20px}.settings-section label small{display:block;margin-top:1px;color:#8795a2;font-weight:500;font-size:11px;line-height:1.4}.settings-error{background:#fff0f0;color:#9f3333;border:1px solid #f2cccc}.remove-logo-check{display:flex!important;align-items:center;gap:8px!important;flex:0 0 auto!important;padding:9px 11px;border:1px solid #e4e9ed;border-radius:10px;background:#fafbfc;cursor:pointer}.remove-logo-check input{width:auto!important;margin:0}.remove-logo-check span{white-space:nowrap}.settings-actions{position:sticky;bottom:0;z-index:5;background:rgba(247,249,251,.94);backdrop-filter:blur(8px);padding:12px 0 2px;margin-top:2px}
@media(max-width:600px){.settings-page,.settings-narrow{width:100%;max-width:none}.settings-head{margin-bottom:16px}.settings-head h1{font-size:24px}.settings-head p{font-size:13px;line-height:1.45}.settings-card{grid-template-columns:42px minmax(0,1fr) auto;gap:11px;padding:14px;border-radius:14px}.settings-icon{width:42px;height:42px;border-radius:11px}.settings-card h2{font-size:15px}.settings-card p{font-size:11px}.settings-section{padding:16px;border-radius:15px}.settings-section-title{align-items:flex-start;margin-bottom:16px;padding-bottom:14px}.settings-section-title h2{font-size:16px}.settings-section-title p{font-size:11px}.settings-section .form-grid{gap:13px}.settings-section input,.settings-section select,.settings-section textarea{font-size:16px!important;min-height:46px}.settings-actions{display:grid!important;grid-template-columns:1fr 1.35fr;gap:8px;padding:10px 0 6px}.settings-actions a,.settings-actions button{width:100%;box-sizing:border-box;min-height:46px;display:flex;align-items:center;justify-content:center}.business-logo-editor{gap:12px!important}.remove-logo-check{width:100%;box-sizing:border-box;justify-content:center}}

/* ORVIA v0.11.2 · Respaldo responsive */
.backup-page{max-width:1180px;margin:0 auto;overflow:hidden}.backup-page .settings-head{margin-bottom:18px}.backup-page .settings-head>div{min-width:0}.backup-page .settings-head p{max-width:760px;overflow-wrap:anywhere}.backup-hero{display:flex;align-items:center;justify-content:space-between;gap:22px;padding:22px;margin:0 0 18px;background:#fff;border:1px solid var(--border);border-radius:18px;box-shadow:0 8px 28px rgba(15,23,42,.045)}.backup-hero>div{display:flex;align-items:flex-start;gap:14px;min-width:0}.backup-hero h2,.backup-card h2{margin:0 0 5px;color:var(--orvia-blue);font-size:17px}.backup-hero p,.backup-card p{margin:0;color:var(--text-soft);line-height:1.45;font-size:13px}.backup-lock{display:grid;place-items:center;flex:0 0 46px;height:46px;border-radius:13px;background:#eaf8f1;color:#159665;font-size:24px;font-weight:800}.backup-main-btn{white-space:nowrap;flex:none}.backup-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.backup-card{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:17px 18px;background:#fff;border:1px solid var(--border);border-radius:15px;min-width:0}.backup-card>div{min-width:0}.backup-card .btn{white-space:nowrap;flex:none}.backup-note{margin-top:16px;padding:13px 15px;border:1px solid #e8edf1;border-radius:13px;background:#f8fafc;color:var(--text-soft);font-size:12px;line-height:1.5}
@media(max-width:760px){.backup-page{width:100%;max-width:none}.backup-page .settings-head h1{font-size:25px;line-height:1.15}.backup-page .settings-head p{font-size:13px;line-height:1.45}.backup-hero{align-items:stretch;flex-direction:column;padding:16px;gap:15px}.backup-hero>div{gap:11px}.backup-lock{width:40px;height:40px;flex-basis:40px;border-radius:11px}.backup-main-btn{width:100%;box-sizing:border-box;text-align:center;justify-content:center;min-height:44px}.backup-grid{grid-template-columns:1fr;gap:9px}.backup-card{padding:14px;gap:10px}.backup-card h2{font-size:15px}.backup-card p{font-size:11px}.backup-card .btn{padding:9px 11px;font-size:12px}.backup-note{font-size:11px}}
@media(max-width:430px){.backup-card{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center}.backup-card .btn{width:auto;min-width:105px}.backup-page .settings-head{overflow:hidden}}

/* ORVIA v0.12.0 · Agenda tipo libreta */
.agenda-page{max-width:1320px}.agenda-heading{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-bottom:18px}.agenda-heading h1{margin:.15rem 0}.agenda-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:18px}.agenda-kpis>a,.agenda-kpis>div{background:#fff;border:1px solid #e5ebf1;border-radius:16px;padding:14px 16px;text-decoration:none;color:inherit;display:flex;align-items:baseline;gap:8px}.agenda-kpis strong{font-size:1.55rem;color:#123b5d}.agenda-kpis span{color:#64788a}.agenda-layout{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:20px;align-items:start}.agenda-book{background:#fff;border:1px solid #e3e9ef;border-radius:22px;box-shadow:0 10px 30px rgba(20,52,76,.06);overflow:hidden}.agenda-book-top{display:grid;grid-template-columns:44px 1fr 44px;align-items:center;padding:18px 20px;border-bottom:1px solid #e7edf2;background:linear-gradient(180deg,#fff,#fbfcfd)}.agenda-book-top>a{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;text-decoration:none;font-size:28px;color:#173b59;background:#f0f5f8}.agenda-book-top div{text-align:center}.agenda-book-top h2{margin:3px 0 0;font-size:1.25rem}.book-label{font-size:.72rem;letter-spacing:.13em;font-weight:800;color:#7a8d9d}.agenda-quick{display:flex;gap:8px;padding:12px 18px;border-bottom:1px solid #edf1f4}.agenda-quick a{padding:7px 13px;border-radius:999px;text-decoration:none;color:#526b7e;font-weight:700}.agenda-quick a.active{background:#123b5d;color:#fff}.agenda-lines{padding:8px 18px 24px;background-image:repeating-linear-gradient(to bottom,transparent 0,transparent 43px,rgba(33,78,109,.055) 44px)}.agenda-entry{display:grid;grid-template-columns:72px 1fr;gap:12px;padding:12px 0}.agenda-time{text-align:right;padding-top:12px}.agenda-time strong,.agenda-time span{display:block}.agenda-time strong{color:#173b59}.agenda-time span{font-size:.8rem;color:#8393a0}.agenda-entry-card{position:relative;background:#fff;border:1px solid #e3eaf0;border-left:4px solid #f1b84b;border-radius:15px;padding:14px 16px;box-shadow:0 5px 14px rgba(20,52,76,.05)}.status-confirmada .agenda-entry-card{border-left-color:#2e91b9}.status-en_curso .agenda-entry-card{border-left-color:#8b65c2}.status-completada .agenda-entry-card{border-left-color:#42a56b}.status-cancelada .agenda-entry-card{border-left-color:#a9b3bb;opacity:.72}.agenda-entry-head{display:flex;justify-content:space-between;gap:10px}.agenda-entry-head h3{margin:2px 0;font-size:1.05rem}.agenda-service{font-size:.78rem;font-weight:800;color:#527087;text-transform:uppercase;letter-spacing:.04em}.agenda-status{height:max-content;border-radius:999px;background:#fff4d7;color:#8a6518;padding:5px 9px;font-size:.73rem;font-weight:800}.status-confirmada .agenda-status{background:#e7f5fb;color:#176988}.status-en_curso .agenda-status{background:#f0eafb;color:#65409b}.status-completada .agenda-status{background:#e8f7ed;color:#247243}.status-cancelada .agenda-status{background:#edf0f2;color:#697780}.agenda-meta{display:flex;flex-wrap:wrap;gap:8px 14px;margin-top:8px;font-size:.84rem;color:#607789}.agenda-note{margin:9px 0 0;color:#526a7d}.agenda-actions{display:flex;gap:12px;align-items:center;margin-top:10px}.agenda-actions a,.agenda-actions button{border:0;background:none;padding:0;color:#167aa2;font-weight:800;text-decoration:none;cursor:pointer;font:inherit}.agenda-actions form{margin:0}.agenda-empty{text-align:center;padding:58px 20px}.agenda-empty>div{font-size:2rem}.agenda-empty h3{margin:8px 0}.agenda-empty p{color:#728594}.agenda-side{display:grid;gap:14px}.mini-calendar,.agenda-tip{background:#fff;border:1px solid #e3e9ef;border-radius:18px;padding:16px}.mini-cal-head{display:grid;grid-template-columns:32px 1fr 32px;align-items:center;margin-bottom:14px}.mini-cal-head h3{text-align:center;margin:0;font-size:1rem}.mini-cal-head a{display:grid;place-items:center;text-decoration:none;color:#173b59;font-size:22px}.mini-week,.mini-days{display:grid;grid-template-columns:repeat(7,1fr);gap:5px}.mini-week span{text-align:center;font-size:.7rem;font-weight:800;color:#8b99a4;padding-bottom:5px}.mini-days>a,.mini-days>.blank{aspect-ratio:1;min-width:0}.mini-days>a{position:relative;display:grid;place-items:center;border-radius:10px;text-decoration:none;color:#405a6e;font-size:.82rem}.mini-days>a:hover{background:#f0f5f8}.mini-days>a.today{box-shadow:inset 0 0 0 1px #2b8bb2}.mini-days>a.selected{background:#123b5d;color:#fff}.mini-days>a i{position:absolute;right:2px;bottom:2px;min-width:14px;height:14px;padding:0 3px;border-radius:8px;background:#49a46b;color:#fff;font-size:.57rem;font-style:normal;display:grid;place-items:center}.mini-days>a.has-pending i{background:#e0a528}.calendar-legend{display:flex;flex-wrap:wrap;gap:9px;margin-top:14px;font-size:.72rem;color:#718392}.dot{display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:4px}.dot.pending{background:#e0a528}.dot.busy{background:#49a46b}.agenda-tip p{margin:6px 0 0;color:#687e8f;font-size:.86rem}.agenda-form{display:grid;gap:14px}.agenda-form-card{background:#fff;border:1px solid #e3e9ef;border-radius:18px;padding:18px}.agenda-form-card h2{margin:0 0 14px;font-size:1.05rem}.agenda-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.agenda-form label{display:grid;gap:6px;font-weight:700;color:#365269;font-size:.88rem}.agenda-form input,.agenda-form select,.agenda-form textarea{width:100%;box-sizing:border-box;border:1px solid #ccd7df;border-radius:11px;padding:11px 12px;background:#fff;color:#203b50;font:inherit}.agenda-form textarea{resize:vertical}.agenda-form-card>label{margin-top:14px}.agenda-form .check-row{display:flex;align-items:center;gap:8px;font-weight:600}.agenda-form .check-row input{width:auto}.agenda-form-actions{display:flex;justify-content:flex-end;gap:10px;padding-bottom:20px}
@media(max-width:900px){.agenda-layout{grid-template-columns:1fr}.agenda-side{grid-row:1}.mini-calendar{max-width:420px;width:100%;box-sizing:border-box;margin:auto}.agenda-tip{display:none}}
@media(max-width:640px){.agenda-heading{align-items:stretch;flex-direction:column}.agenda-heading .create-button{justify-content:center}.agenda-kpis{gap:7px}.agenda-kpis>a,.agenda-kpis>div{padding:10px 8px;display:grid;gap:1px;text-align:center}.agenda-kpis strong{font-size:1.25rem}.agenda-kpis span{font-size:.7rem}.agenda-book{border-radius:16px}.agenda-book-top{padding:14px 10px}.agenda-book-top h2{font-size:1.05rem}.agenda-lines{padding:6px 10px 18px}.agenda-entry{grid-template-columns:50px 1fr;gap:7px}.agenda-time{font-size:.8rem}.agenda-entry-card{padding:12px}.agenda-entry-head{display:grid}.agenda-status{justify-self:start}.agenda-meta{display:grid;gap:4px}.agenda-form-grid{grid-template-columns:1fr}.agenda-form-card{padding:15px}.agenda-form input,.agenda-form select,.agenda-form textarea{font-size:16px}.agenda-form-actions{display:grid;grid-template-columns:1fr 1fr}.agenda-form-actions>*{justify-content:center;text-align:center}}

/* ORVIA v0.12.1 · Agenda unificada: citas + entregas */
.agenda-delivery .agenda-entry-card{border-left-color:#ef7f32;background:linear-gradient(90deg,#fffaf6 0,#fff 26%)}
.agenda-delivery .agenda-status{background:#fff0e4;color:#a45117}
.agenda-quote-delivery .agenda-entry-card{border-left-color:#3d86c6;background:linear-gradient(90deg,#f7fbff 0,#fff 26%)}
.agenda-quote-delivery .agenda-status{background:#eaf4fc;color:#276794}
.agenda-time strong:first-child{font-size:1rem}
.dot.delivery{background:#ef7f32}
.mini-days>a.has-delivery{box-shadow:inset 0 -3px 0 #ef7f32}
.mini-days>a.selected.has-delivery{box-shadow:inset 0 -3px 0 #ffb178}
.mini-days>a .delivery-mark{position:absolute;left:4px;bottom:4px;width:5px;height:5px;border-radius:2px;background:#ef7f32}
.mini-days>a.selected .delivery-mark{background:#ffd1b1}
@media(max-width:640px){.calendar-legend{gap:7px 11px}.agenda-delivery .agenda-time span,.agenda-quote-delivery .agenda-time span{font-size:.68rem}}


/* ORVIA v0.12.3 · Activos fijos y mantenimiento */
.asset-fields{margin:18px 0;padding:18px;border:1px solid #dce7ee;border-radius:17px;background:#f8fbfd}
.asset-fields[hidden]{display:none!important}.asset-fields-head h2{margin:2px 0 4px;color:#173b59;font-size:1.08rem}.asset-fields-head p:last-child{margin:0 0 15px;color:#687e8f;font-size:.85rem}
.asset-detail-card{border-top:3px solid #2d8bb3}.asset-maint-form{margin-top:16px;padding-top:15px;border-top:1px solid #e7edf2}.asset-maint-form textarea{width:100%;box-sizing:border-box;border:1px solid #ccd7df;border-radius:11px;padding:11px 12px;font:inherit;resize:vertical}
.maintenance-history{margin-top:18px;padding-top:15px;border-top:1px solid #e7edf2}.maintenance-history h3{font-size:.9rem;margin:0 0 8px;color:#365269}.maintenance-history>div{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid #eef2f5}.maintenance-history span{display:grid;gap:2px;min-width:0}.maintenance-history small{color:#718392;white-space:normal}.maintenance-history b{white-space:nowrap;color:#365269}
.asset-report-split{display:grid;gap:8px;margin:12px 0}.asset-report-split>div{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 10px;padding:10px 12px;background:#f7fafc;border-radius:11px}.asset-report-split span{color:#64788a;font-size:.8rem}.asset-report-split b{color:#173b59}.asset-report-split small{grid-column:1/-1;color:#8393a0}
.attention-item.maintenance-due{background:linear-gradient(90deg,#fffaf2,#fff)}
@media(max-width:640px){.asset-fields{padding:14px;margin:14px 0}.maintenance-history>div{align-items:flex-start}.asset-report-split>div{padding:9px 10px}}

/* ORVIA v0.13.0 · Agenda operativa */
.agenda-kpis-4{grid-template-columns:repeat(4,minmax(0,1fr))}.agenda-kpis .kpi-danger{border-color:#f0c6c2;background:#fff8f7}.agenda-kpis .kpi-danger strong{color:#b5473c}.agenda-toolbar{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:16px;flex-wrap:wrap}.agenda-view-tabs{display:flex;gap:6px;background:#eef3f6;padding:4px;border-radius:13px}.agenda-view-tabs a{padding:8px 14px;border-radius:10px;text-decoration:none;color:#536d80;font-weight:800;font-size:.86rem}.agenda-view-tabs a.active{background:#fff;color:#123b5d;box-shadow:0 2px 8px rgba(20,52,76,.08)}.agenda-filters{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.agenda-filters input,.agenda-filters select{border:1px solid #d4dee5;border-radius:10px;background:#fff;padding:9px 10px;color:#29485e;min-height:39px}.agenda-filters input{min-width:210px}.agenda-filters button{border:0;border-radius:10px;background:#123b5d;color:#fff;padding:10px 14px;font-weight:800;cursor:pointer}.agenda-filters>a{color:#6c7f8e;font-weight:700;text-decoration:none;font-size:.84rem}.agenda-day-separator{margin:12px 0 2px 84px;padding:7px 12px;border-radius:10px;background:#f1f5f7;color:#48657a;font-size:.78rem;font-weight:900;text-transform:uppercase;letter-spacing:.04em}.agenda-actions{flex-wrap:wrap}.agenda-actions .danger-link{color:#b6534a}.agenda-overdue{background:#fff8f7;border:1px solid #efcbc7;border-radius:18px;padding:14px}.agenda-side-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;color:#9e4139}.agenda-side-title span{background:#b84e44;color:#fff;border-radius:999px;min-width:24px;height:24px;display:grid;place-items:center;font-size:.75rem;font-weight:900}.agenda-overdue>a{display:grid;gap:2px;padding:9px 4px;border-top:1px solid #f3ddda;text-decoration:none;color:#365269}.agenda-overdue>a:first-of-type{border-top:0}.agenda-overdue>a span{font-size:.75rem;color:#8a6a67}.dot.delivery{background:#ef7f32}.delivery-mark{position:absolute;width:6px;height:6px;border-radius:50%;background:#ef7f32;left:3px;bottom:3px}
@media(max-width:900px){.agenda-kpis-4{grid-template-columns:repeat(2,minmax(0,1fr))}.agenda-toolbar{align-items:stretch}.agenda-filters{width:100%}.agenda-filters input{flex:1;min-width:180px}}
@media(max-width:640px){.agenda-view-tabs{width:100%;display:grid;grid-template-columns:repeat(3,1fr)}.agenda-view-tabs a{text-align:center}.agenda-filters{display:grid;grid-template-columns:1fr 1fr}.agenda-filters input{grid-column:1/-1;width:100%;min-width:0}.agenda-filters button{width:100%}.agenda-day-separator{margin-left:57px}.agenda-kpis-4{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* ORVIA v0.13.1 - cierre Agenda: responsables y equipo */
.agenda-heading-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.team-create{margin-bottom:16px}.team-create form{align-items:end}.team-submit{display:flex;align-items:end}.team-list{display:grid;gap:10px;margin-bottom:16px}.team-card{display:grid;grid-template-columns:48px minmax(0,1fr) auto;gap:12px;align-items:center;background:#fff;border:1px solid #e3e9ef;border-radius:16px;padding:14px 16px}.team-card.is-inactive{opacity:.62;background:#f8fafb}.team-avatar{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:#e8f3f7;color:#123b5d;font-weight:900;font-size:1.05rem}.team-info{display:grid;gap:2px}.team-info span,.team-info small{color:#718392;font-size:.82rem}.team-actions{display:flex;align-items:center;gap:12px}.team-actions form{margin:0}.team-actions button,.team-actions summary{border:0;background:none;color:#167aa2;font-weight:800;cursor:pointer;font:inherit}.team-actions .danger-link{color:#b34b4b}.team-actions details{position:relative}.team-edit-form{position:absolute;z-index:10;right:0;top:28px;width:260px;padding:12px;background:#fff;border:1px solid #dfe7ed;border-radius:12px;box-shadow:0 12px 30px rgba(20,52,76,.16);display:grid;gap:8px}.team-edit-form input{width:100%;box-sizing:border-box;border:1px solid #ccd7df;border-radius:9px;padding:9px}.team-edit-form button{background:#123b5d;color:#fff;border-radius:9px;padding:9px}.crm-alert.error{background:#fff0f0;color:#9d3838;border:1px solid #f0caca}
@media(max-width:720px){.agenda-heading{display:grid}.agenda-heading-actions{width:100%}.agenda-heading-actions a{flex:1;text-align:center;justify-content:center}.team-card{grid-template-columns:42px 1fr}.team-actions{grid-column:1/-1;justify-content:flex-end;border-top:1px solid #edf1f4;padding-top:10px}.team-edit-form{right:0;max-width:calc(100vw - 64px)}.team-create .agenda-form-grid{grid-template-columns:1fr}.team-submit .create-button{width:100%}}
