:root {
    color-scheme: light;
    --massi-pine: #2F4F4F;
    --massi-pine-dark: #173B3F;
    --massi-pine-soft: #508072;
    --massi-ivory: #F5F3EE;
    --massi-gold: #D4AF37;
    --massi-gold-dark: #8A6714;
    --massi-gold-soft: #E8D79B;
    --massi-ink: #1E2929;
    --massi-muted: #657070;
    --massi-surface: #FFFFFF;
    --massi-border: #DCD8CD;
    --massi-error: #8B332B;
    --massi-success: #286044;
    --massi-focus: #8B6E2F;
    --gradient-gold: linear-gradient(135deg, #B88A1B 0%, #D4AF37 52%, #E8D79B 100%);
    --gradient-pine: linear-gradient(135deg, #173B3F 0%, #2F4F4F 56%, #508072 100%);
    --gradient-service: linear-gradient(115deg, transparent 0 68%, rgba(255, 255, 255, .055) 68% 69%, transparent 69%), linear-gradient(135deg, #173B3F, #2F4F4F);
    --shadow-soft: 0 16px 40px rgba(23, 59, 63, 0.10);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--massi-ivory);
    scroll-behavior: auto;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--massi-ivory);
    color: var(--massi-ink);
    font-size: 16px;
    line-height: 1.5;
}

button,
input,
select,
textarea {
    font: inherit;
}

a {
    color: var(--massi-pine);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--massi-focus);
    outline-offset: 3px;
}

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

.skip-link {
    position: fixed;
    z-index: 100;
    top: 8px;
    left: 8px;
    padding: 10px 14px;
    background: var(--massi-pine-dark);
    color: #fff;
    transform: translateY(-160%);
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header {
    background: var(--massi-pine);
    color: #fff;
}

.header-inner,
.navigation-inner,
.page-shell {
    width: min(100% - 28px, 1120px);
    margin-inline: auto;
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid var(--massi-gold);
    border-radius: 50%;
    color: var(--massi-gold);
    font-family: Georgia, serif;
    letter-spacing: 0;
}

.user-identity {
    display: grid;
    max-width: 55%;
    text-align: right;
}

.user-identity strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-label {
    color: #DDE6E2;
    font-size: 0.75rem;
}

.primary-navigation {
    border-bottom: 1px solid var(--massi-border);
    background: var(--massi-surface);
}

.navigation-inner {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 16px;
}

.navigation-list {
    display: flex;
    align-items: stretch;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.navigation-list a,
.navigation-button {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    padding: 8px 14px;
    border: 0;
    background: transparent;
    color: var(--massi-pine);
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.navigation-list a[aria-current="page"] {
    box-shadow: inset 0 -3px var(--massi-gold);
}

.logout-form {
    display: flex;
}

.navigation-button:hover,
.navigation-list a:hover {
    background: #F1EFE9;
}

.page-shell {
    padding-block: clamp(24px, 5vw, 52px);
}

.auth-page .page-shell {
    display: grid;
    min-height: calc(100vh - 72px);
    place-items: center;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    color: var(--massi-pine-dark);
    line-height: 1.2;
}

h1 {
    margin-bottom: 12px;
    font-size: clamp(1.8rem, 5vw, 2.65rem);
}

h2 {
    margin-bottom: 10px;
    font-size: clamp(1.4rem, 3vw, 1.9rem);
}

.eyebrow {
    margin-bottom: 8px;
    color: #79632F;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.muted,
.field-hint,
.task-card p {
    color: var(--massi-muted);
}

.auth-card,
.form-card,
.welcome-panel,
.task-card {
    border: 1px solid var(--massi-border);
    border-radius: 14px;
    background: var(--massi-surface);
    box-shadow: var(--shadow-soft);
}

.auth-card,
.form-card {
    width: min(100%, 500px);
    padding: clamp(22px, 5vw, 38px);
}

.form-card.narrow {
    margin-inline: auto;
}

.field {
    margin-top: 20px;
}

.field label {
    display: block;
    margin-bottom: 7px;
    color: var(--massi-pine-dark);
    font-weight: 750;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid #929B97;
    border-radius: 8px;
    background: #fff;
    color: var(--massi-ink);
}

.field textarea {
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--massi-focus);
}

.field-hint {
    margin: 7px 0 0;
    font-size: 0.88rem;
}

.button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.button-primary {
    background: var(--massi-pine);
    color: #fff;
}

.button-primary:hover {
    background: var(--massi-pine-dark);
}

.button-secondary {
    border-color: var(--massi-pine);
    background: #fff;
    color: var(--massi-pine);
}

.button-danger {
    background: var(--massi-error);
    color: #fff;
}

.button-small {
    min-height: 40px;
    padding: 7px 12px;
}

.button-full {
    width: 100%;
    margin-top: 24px;
}

.button[disabled] {
    cursor: wait;
    opacity: 0.65;
}

.message-stack {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
}

.message {
    margin: 0;
    padding: 13px 15px;
    border-left: 5px solid var(--massi-gold);
    border-radius: 6px;
    background: #FFF9E9;
}

.message-error {
    border-left-color: var(--massi-error);
    background: #FFF0EE;
    color: #65241F;
}

.message-success {
    border-left-color: var(--massi-success);
    background: #ECF7F0;
    color: #1E5038;
}

.notice-inline {
    padding: 12px 14px;
    border-left: 4px solid var(--massi-gold);
    background: #FFF9E9;
}

.welcome-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: clamp(22px, 5vw, 42px);
}

.profile-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    color: var(--massi-muted);
}

.section-block {
    padding-top: clamp(30px, 6vw, 54px);
    scroll-margin-top: 16px;
}

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

.status-chip {
    padding: 6px 10px;
    border: 1px solid #D2C49F;
    border-radius: 999px;
    background: #FFF9E9;
    color: #6C592C;
    font-size: 0.82rem;
    font-weight: 750;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.task-card {
    min-height: 190px;
    padding: 22px;
    scroll-margin-top: 20px;
}

.task-value {
    display: block;
    margin-bottom: 18px;
    color: var(--massi-gold);
    font-size: 2rem;
    font-weight: 800;
}

.task-card h3 {
    margin-bottom: 8px;
}

.page-heading {
    margin-bottom: 24px;
}

.page-heading h1 {
    margin-bottom: 8px;
}

.filter-card,
.detail-card,
.empty-state,
.action-card {
    border: 1px solid var(--massi-border);
    border-radius: 12px;
    background: var(--massi-surface);
}

.filter-card,
.detail-card,
.empty-state {
    padding: clamp(18px, 4vw, 28px);
}

.small-heading {
    font-size: 1.15rem;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(140px, 1fr));
    gap: 14px;
    align-items: end;
}

.field.compact {
    margin-top: 10px;
}

.filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.order-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.order-card {
    padding: 20px;
    border: 1px solid var(--massi-border);
    border-radius: 12px;
    background: var(--massi-surface);
}

.order-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.order-card h3 {
    margin: 5px 0 16px;
}

.order-identifier {
    color: var(--massi-muted);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.status-badge {
    display: inline-flex;
    padding: 6px 10px;
    border: 1px solid #B9C8C3;
    border-radius: 999px;
    background: #EDF4F1;
    color: var(--massi-pine-dark);
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.status-cancelado,
.status-requiere_correccion {
    border-color: #D9ACA7;
    background: #FFF0EE;
    color: #6E2822;
}

.status-finalizado,
.status-entregado_cliente {
    border-color: #A9CCB8;
    background: #ECF7F0;
    color: #1E5038;
}

.detail-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
    margin: 0;
}

.detail-list div {
    min-width: 0;
}

.detail-list dt {
    color: var(--massi-muted);
    font-size: 0.78rem;
    font-weight: 750;
    text-transform: uppercase;
}

.detail-list dd {
    margin: 3px 0 0;
    overflow-wrap: anywhere;
}

.compact-list {
    margin-bottom: 18px;
}

.empty-state {
    text-align: center;
}

.form-card.wide {
    width: 100%;
    max-width: none;
}

fieldset {
    min-width: 0;
    margin: 0 0 30px;
    padding: 0;
    border: 0;
}

legend {
    padding: 0;
    color: var(--massi-pine-dark);
    font-size: 1.25rem;
    font-weight: 800;
}

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

.two-column-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.product-list {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.product-row {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) minmax(100px, .6fr) minmax(150px, 1fr) auto;
    gap: 12px;
    align-items: end;
    padding: 14px;
    border: 1px solid var(--massi-border);
    border-radius: 10px;
    background: #FBFAF7;
}

.product-row .field {
    margin-top: 0;
}

.text-button {
    min-height: 44px;
    padding: 8px;
    border: 0;
    background: transparent;
    color: var(--massi-error);
    font-weight: 750;
    cursor: pointer;
}

.estimated-total {
    margin: 18px 0 0;
    text-align: right;
}

.optional {
    color: var(--massi-muted);
    font-weight: 400;
}

.detail-grid,
.information-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.detail-card h2 {
    font-size: 1.25rem;
}

.order-observation {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--massi-border);
}

.order-observation h3 {
    font-size: 1rem;
}

.responsive-table {
    overflow-x: auto;
}

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

th,
td {
    padding: 11px 10px;
    border-bottom: 1px solid var(--massi-border);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--massi-pine-dark);
    font-size: 0.82rem;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.action-card {
    padding: 20px;
}

.timeline {
    margin: 0;
    padding: 0;
    list-style: none;
}

.timeline li {
    position: relative;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 12px;
    padding-bottom: 22px;
}

.timeline li:not(:last-child)::before {
    position: absolute;
    top: 14px;
    bottom: -2px;
    left: 6px;
    width: 2px;
    background: #CFC8B5;
    content: "";
}

.timeline-marker {
    position: relative;
    z-index: 1;
    width: 14px;
    height: 14px;
    margin-top: 4px;
    border: 3px solid var(--massi-gold);
    border-radius: 50%;
    background: var(--massi-ivory);
}

.timeline-content h3 {
    margin-bottom: 3px;
    font-size: 1rem;
}

.timeline-content p {
    margin-bottom: 4px;
    color: var(--massi-muted);
}

.timeline-reason {
    padding: 8px 10px;
    border-left: 3px solid var(--massi-gold);
    background: #FFF9E9;
}

.information-grid {
    margin-top: 36px;
}

.placeholder-card {
    color: var(--massi-muted);
    background: #FBFAF7;
}

.file-list,
.payment-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.file-list li,
.payment-list li {
    display: grid;
    gap: 3px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--massi-border);
}

@media (max-width: 820px) {
    .card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .navigation-inner {
        overflow-x: auto;
    }

    .filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-description {
        grid-column: 1 / -1;
    }
}

@media (max-width: 620px) {
    .header-inner {
        min-height: 64px;
    }

    .user-label {
        display: none;
    }

    .navigation-inner {
        display: block;
    }

    .navigation-list {
        overflow-x: auto;
    }

    .navigation-list a,
    .navigation-button {
        min-height: 48px;
        padding-inline: 12px;
        white-space: nowrap;
    }

    .logout-form {
        border-top: 1px solid var(--massi-border);
    }

    .welcome-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .order-list,
    .detail-grid,
    .information-grid,
    .action-grid,
    .two-column-grid,
    .filter-grid,
    .product-row,
    .detail-list {
        grid-template-columns: 1fr;
    }

    .button-full-mobile,
    .filter-actions .button {
        width: 100%;
    }

    .order-card-heading,
    .order-detail-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .product-description {
        grid-column: auto;
    }

    .task-card {
        min-height: auto;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Confirmaciones MASSI */
.modal-open {
    overflow: hidden;
}

.massi-modal[hidden] {
    display: none;
}

.massi-modal {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
}

.massi-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 36, 38, .72);
    backdrop-filter: blur(3px);
}

.massi-modal-card {
    position: relative;
    width: min(100%, 480px);
    padding: 28px;
    border: 1px solid rgba(212, 175, 55, .55);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(10, 29, 31, .35);
}

.massi-modal-card::before {
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    border-radius: 18px 18px 0 0;
    background: var(--gradient-gold);
    content: "";
}

.massi-modal-icon {
    display: grid;
    width: 46px;
    height: 46px;
    margin-bottom: 18px;
    place-items: center;
    border-radius: 50%;
    background: var(--gradient-gold);
    color: #173B3F;
    font-size: 1.35rem;
    font-weight: 900;
}

.massi-modal-card h2 {
    margin-bottom: 10px;
}

.massi-modal-card p:not(.eyebrow) {
    color: var(--massi-muted);
}

.massi-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}

@media (max-width: 620px) {
    .massi-modal-card {
        padding: 24px 20px;
    }

    .massi-modal-actions {
        flex-direction: column-reverse;
    }

    .massi-modal-actions .button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
    }
}

/* Módulos operativos posteriores */
.dashboard-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.conversation-list,
.notification-list,
.note-list {
    display: grid;
    gap: 12px;
}

.conversation-card,
.notification-card {
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 18px;
    border: 1px solid var(--massi-border);
    border-radius: 10px;
    background: var(--massi-surface);
    color: var(--massi-ink);
    text-decoration: none;
}

.conversation-card span,
.conversation-meta,
.notification-card > div {
    display: grid;
    gap: 4px;
}

.conversation-card small,
.notification-card small,
.people-list small {
    color: var(--massi-muted);
}

.unread-badge {
    justify-self: end;
    min-width: 28px;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--massi-gold);
    color: #1f2c29;
    text-align: center;
}

.inline-search {
    display: flex;
    align-items: end;
    gap: 10px;
}

.inline-search .field {
    flex: 1;
}

.people-list {
    display: grid;
    gap: 8px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.people-list li,
.people-list li > span,
.notification-actions,
.note-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.people-list li {
    padding-top: 10px;
    border-top: 1px solid var(--massi-border);
}

.people-list li > span {
    align-items: flex-start;
    flex-direction: column;
}

.chat-panel {
    overflow: hidden;
    border: 1px solid var(--massi-border);
    border-radius: 14px;
    background: #eeeae0;
}

.message-list {
    display: flex;
    min-height: 320px;
    max-height: 62vh;
    overflow-y: auto;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
}

.chat-message {
    align-self: flex-start;
    width: min(88%, 640px);
    padding: 12px 14px;
    border: 1px solid var(--massi-border);
    border-radius: 5px 14px 14px;
    background: #fff;
    overflow-wrap: anywhere;
}

.chat-message.chat-own {
    align-self: flex-end;
    border-radius: 14px 5px 14px 14px;
    background: #edf4f1;
}

.chat-message.chat-system {
    align-self: center;
    border-color: #d2c49f;
    background: #fff9e9;
}

.chat-message header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.chat-message header small {
    color: var(--massi-muted);
    text-align: right;
}

.chat-message p {
    margin: 8px 0;
    white-space: pre-wrap;
}

.chat-message blockquote {
    margin: 8px 0;
    padding: 7px 9px;
    border-left: 3px solid var(--massi-gold);
    color: var(--massi-muted);
}

.event-label {
    color: #6c592c;
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.message-composer {
    padding: 14px 18px 18px;
    border-top: 1px solid var(--massi-border);
    background: var(--massi-surface);
}

.reply-preview {
    padding: 8px 10px;
    border-left: 3px solid var(--massi-gold);
    background: #fff9e9;
}

.note-card h2,
.notification-card h2 {
    margin: 6px 0;
    font-size: 1.05rem;
}

.note-heading {
    display: flex;
    justify-content: space-between;
    gap: 14px;
}

.note-focused,
.notification-unread {
    border-left: 6px solid var(--massi-gold);
}

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

.qr-card img,
.qr-inline img {
    display: block;
    width: min(100%, 340px);
    max-height: 420px;
    margin: 14px auto;
    object-fit: contain;
}

.qr-inline {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--massi-border);
    text-align: center;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.check-list {
    display: grid;
    gap: 8px;
    margin: 14px 0 20px;
}

.check-list label {
    display: flex;
    min-height: 44px;
    align-items: center;
    gap: 9px;
    padding: 8px;
    border: 1px solid var(--massi-border);
    border-radius: 7px;
}

.check-list input {
    width: 20px;
    height: 20px;
}

.credential-once {
    margin-bottom: 20px;
    padding: 20px;
    border: 2px solid var(--massi-gold);
    border-radius: 10px;
    background: #fff9e9;
}

.credential-once code {
    display: block;
    padding: 12px;
    background: #fff;
    font-size: 1.1rem;
    overflow-wrap: anywhere;
}

@media (max-width: 820px) {
    .dashboard-grid,
    .admin-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .dashboard-grid,
    .admin-grid {
        grid-template-columns: 1fr;
    }

    .inline-search,
    .people-list li,
    .notification-card,
    .note-heading,
    .notification-actions,
    .note-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .chat-message {
        width: 96%;
    }

    .chat-message header {
        flex-direction: column;
    }

    .chat-message header small {
        text-align: left;
    }
}

/* Identidad MASSI y optimización táctil */
body {
    background-color: var(--massi-ivory);
    background-image: radial-gradient(circle at 100% 0, rgba(232, 215, 155, .16), transparent 32rem);
}

.site-header {
    background-color: var(--massi-pine);
    background-image: var(--gradient-service);
}

.header-inner {
    min-height: 78px;
}

.brand-logo {
    display: block;
    width: 146px;
    height: 58px;
    object-fit: contain;
    object-position: left center;
}

.brand-mark {
    display: none;
}

.primary-navigation {
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 5px 16px rgba(23, 59, 63, .05);
}

.navigation-list a,
.navigation-button {
    min-height: 54px;
}

.navigation-list a[aria-current="page"] {
    background: linear-gradient(180deg, transparent 58%, rgba(232, 215, 155, .25));
    box-shadow: inset 0 -4px var(--massi-gold);
}

.logout-form {
    padding-left: 8px;
    border-left: 1px solid var(--massi-border);
}

.logout-button {
    gap: 7px;
    color: var(--massi-error);
}

.logout-button svg {
    flex: 0 0 auto;
}

.auth-card,
.form-card,
.welcome-panel {
    position: relative;
    overflow: hidden;
}

.auth-card::before,
.form-card::before,
.welcome-panel::before {
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: var(--gradient-gold);
    content: "";
}

.button {
    border-radius: 10px;
}

.button-primary {
    background-color: var(--massi-pine);
    background-image: var(--gradient-service);
    box-shadow: 0 7px 18px rgba(23, 59, 63, .14);
}

.button-primary:hover {
    background-color: var(--massi-pine-dark);
    filter: brightness(1.07);
}

.task-value {
    color: var(--massi-gold-dark);
}

.conversation-card:hover,
.notification-card:hover {
    border-color: #BDB28F;
    box-shadow: 0 9px 24px rgba(23, 59, 63, .08);
    transform: translateY(-1px);
}

.predictive-list {
    max-height: 420px;
    overflow-y: auto;
    padding-right: 4px;
    overscroll-behavior: contain;
}

.people-list li[hidden] {
    display: none;
}

.empty-filter {
    margin: 18px 0 0;
    padding: 18px;
    border-radius: 10px;
    background: #F7F5EF;
    color: var(--massi-muted);
    text-align: center;
}

@media (max-width: 820px) {
    .primary-navigation {
        position: sticky;
        z-index: 20;
        top: 0;
    }

    .navigation-inner {
        scrollbar-width: thin;
    }

    .navigation-list a,
    .navigation-button {
        min-height: 56px;
        padding-inline: 16px;
        white-space: nowrap;
    }
}

@media (max-width: 620px) {
    .header-inner {
        min-height: 68px;
    }

    .brand-logo {
        width: 122px;
        height: 48px;
    }

    .logout-form {
        padding-left: 0;
        border-left: 0;
    }

    .logout-button {
        width: 100%;
        justify-content: center;
    }
}

/* Catálogo de QR administrado por Caja */
.qr-overview {
    align-items: start;
}

.qr-catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.qr-catalog-card {
    display: grid;
    gap: 16px;
    padding: 18px;
}

.qr-catalog-active {
    border: 2px solid var(--massi-gold);
    box-shadow: 0 14px 34px rgba(184, 138, 27, .15);
}

.qr-catalog-preview {
    position: relative;
    display: grid;
    min-height: 220px;
    place-items: center;
    padding: 12px;
    border-radius: 10px;
    background: #F7F5EF;
}

.qr-catalog-preview img {
    display: block;
    width: 100%;
    height: 230px;
    object-fit: contain;
}

.qr-catalog-preview .status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
}

.status-inactive {
    border-color: var(--massi-border);
    background: #fff;
    color: var(--massi-muted);
}

.qr-catalog-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    padding-top: 14px;
    border-top: 1px solid var(--massi-border);
}

.qr-catalog-actions .field-hint {
    margin: 0;
    font-weight: 700;
}

@media (max-width: 980px) {
    .qr-catalog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

    .qr-catalog-actions form,
    .qr-catalog-actions .button {
        width: 100%;
    }
}
