:root {
    --sage: #bacdc6;
    --powder: #c2dafc;
    --olive: #c2c59c;
    --cream: #e4dcc9;
    --terracotta: #be6343;
    --ink: #25231f;
    --muted: #6c6962;
    --surface: #fff;
    --background: #f7f5f0;
    --border: #ded9cf;
    font-family: "Poppins", system-ui, sans-serif;
    color: var(--ink);
    background: var(--background);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--background); }
.test-environment-banner {
    padding: .55rem 1rem;
    background: #7d2d24;
    color: #fff;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-align: center;
}
a { color: inherit; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.site-header {
    min-height: 84px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 1rem clamp(1rem, 4vw, 3rem);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.brand { display: block; flex: 0 0 auto; line-height: 0; text-decoration: none; }
.brand picture { display: block; }
.brand-logo { display: block; width: clamp(180px, 16vw, 230px); height: auto; }

nav { display: flex; align-items: center; gap: 1.15rem; font-size: .86rem; }
nav a { text-decoration: none; }
nav form { margin: 0; }
.nav-primary-link { font-weight: 600; }
.nav-menu { position: relative; }
.nav-menu > summary {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    min-height: 38px;
    padding: .45rem .75rem;
    border: 1px solid #b9afa4;
    border-radius: 6px;
    background: #fff;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu > summary:hover, .nav-menu[open] > summary { border-color: var(--terracotta); background: #fff7f3; }
.nav-menu > summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--terracotta), transparent 65%); outline-offset: 2px; }
.nav-menu > summary svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s ease; }
.nav-menu[open] > summary svg { transform: rotate(180deg); }
.nav-menu-panel {
    position: absolute;
    z-index: 20;
    top: calc(100% + .55rem);
    right: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(155px, 1fr));
    width: min(620px, calc(100vw - 2rem));
    padding: .7rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 16px 42px rgb(45 35 28 / 18%);
}
.nav-menu-group { min-width: 0; padding: .45rem; }
.nav-menu-group + .nav-menu-group { border-left: 1px solid var(--border); }
.nav-menu-group h2 { margin: 0 .55rem .35rem; color: var(--muted); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
.nav-menu-group a { display: block; padding: .55rem; border-radius: 5px; font-weight: 500; }
.nav-menu-group a:hover, .nav-menu-group a:focus-visible { color: #7d3823; background: #f7eee9; }
.logout-button {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    min-height: 38px;
    padding: .45rem .7rem;
    border: 1px solid #b9afa4;
    border-radius: 6px;
    color: #7d3823;
    background: #fffaf7;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.logout-button:hover { border-color: var(--terracotta); background: #f8e8e1; }
.logout-button:focus-visible { outline: 3px solid color-mix(in srgb, var(--terracotta), transparent 65%); outline-offset: 2px; }
.logout-button svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.page-shell { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: 2.5rem 0 5rem; }
.hero { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin-bottom: 2rem; }
.compact-hero h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
.compact-hero { margin-bottom: 1.5rem; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: .5rem; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.1; }
h2 { margin-bottom: 0; }
.hero p:not(.eyebrow), .calendar-card p { color: var(--muted); }
.eyebrow { margin-bottom: .5rem; color: #8b432a; font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }

.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: .7rem 1.2rem;
    border: 0;
    border-radius: 6px;
    color: #fff;
    background: #93482f;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: .62rem 1rem;
    border: 1px solid #aaa397;
    border-radius: 6px;
    color: var(--ink);
    background: var(--surface);
    font: inherit;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}
.whatsapp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: .62rem 1rem;
    border: 1px solid #117640;
    border-radius: 6px;
    color: #fff;
    background: #168c4f;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}
.whatsapp-button:hover, .whatsapp-button:focus-visible { background: #117640; }
.danger-button {
    display: inline-flex; align-items: center; justify-content: center; min-height: 42px;
    padding: .62rem 1rem; border: 1px solid #8e2f2f; border-radius: 6px;
    color: #fff; background: #8e2f2f; font: inherit; font-weight: 600; cursor: pointer;
}
.button-group { display: flex; flex-wrap: wrap; gap: .6rem; }
.compact-action:disabled { opacity: .45; cursor: not-allowed; }

.payment-result-page { display: grid; grid-template-rows: auto 1fr auto; min-height: 100vh; background: #fff; }
.payment-result-header { display: flex; justify-content: center; padding: 1.25rem; border-bottom: 1px solid var(--border); background: #fff; }
.payment-result-header a { display: block; line-height: 0; }
.payment-result-header img { display: block; width: clamp(190px, 24vw, 280px); height: auto; }
.payment-result-main { width: min(760px, calc(100% - 2rem)); margin: 0 auto; padding: clamp(3rem, 9vw, 6rem) 0; }
.payment-result-kicker { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.8rem; color: var(--ink); font-size: clamp(.82rem, 2vw, 1rem); font-weight: 700; letter-spacing: .22em; text-align: center; text-transform: uppercase; }
.payment-result-kicker::before, .payment-result-kicker::after { content: ""; flex: 1; height: 1px; background: #b8b2a8; }
.payment-result-card { display: grid; grid-template-columns: auto 1fr; gap: 1.5rem; align-items: center; padding: clamp(1.5rem, 5vw, 2.25rem); border-radius: 4px; background: var(--cream); }
.payment-result-card h1 { margin-bottom: .7rem; font-size: clamp(1.35rem, 4vw, 2rem); }
.payment-result-card p { margin-bottom: .45rem; line-height: 1.6; }
.payment-result-icon { display: grid; width: 78px; height: 78px; place-items: center; }
.payment-result-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.payment-result-success .payment-result-icon { color: #286246; }
.payment-result-failed { background: #f5ded9; }
.payment-result-failed .payment-result-icon { color: #8a2f26; }
.payment-result-pending { background: #eee8d8; }
.payment-result-spinner { width: 64px; height: 64px; border: 6px solid rgb(37 35 31 / 16%); border-top-color: #8b432a; border-radius: 50%; animation: payment-result-spin .8s linear infinite; }
@keyframes payment-result-spin { to { transform: rotate(360deg); } }
.payment-result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; margin-top: 2rem; }
.payment-result-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.4rem; padding: 1.5rem; color: #fff; background: #272521; font-size: .82rem; }
.payment-result-footer a { color: #fff; }

.paygold-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin: 1.5rem 0; }
.paygold-metric { padding: 1rem; border: 1px solid var(--border); border-top: 4px solid #8e8980; border-radius: 10px; background: #fff; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.paygold-metric:hover { transform: translateY(-2px); box-shadow: 0 9px 24px rgb(61 46 37 / 9%); }
.paygold-metric span, .paygold-metric small { display: block; color: var(--muted); }
.paygold-metric span { font-size: .72rem; font-weight: 700; text-transform: uppercase; }
.paygold-metric strong { display: block; margin: .2rem 0; font-size: 2rem; line-height: 1; }
.paygold-metric small { font-size: .68rem; }
.paygold-metric-open { border-top-color: #c39224; }
.paygold-metric-paid { border-top-color: #4f855e; }
.paygold-metric-incomplete { border-top-color: #b84d3d; }
.paygold-filter { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; margin: 1.4rem 0 1rem; padding: 1rem; border: 1px solid var(--border); border-radius: 9px; background: #fff; }
.paygold-filter label { display: grid; flex: 1 1 220px; gap: .3rem; color: var(--muted); font-size: .75rem; font-weight: 700; }
.paygold-filter input, .paygold-filter select { min-height: 44px; padding: .6rem .7rem; border: 1px solid #aaa397; border-radius: 6px; background: #fff; font: inherit; }
.paygold-table td { vertical-align: top; }
.paygold-table td > small { display: block; margin-top: .2rem; color: var(--muted); }
.paygold-status-created, .paygold-status-sent { color: #71500b; background: #f5e5be; }
.paygold-status-paid { color: #275a2c; background: #dcebdd; }
.paygold-status-failed { color: #79291f; background: #f8dcd7; }
.paygold-status-expired, .paygold-status-cancelled { color: #666; background: #eee; }

@media (max-width: 560px) {
    .payment-result-card { grid-template-columns: 1fr; justify-items: center; text-align: center; }
    .payment-result-kicker { letter-spacing: .13em; }
    .payment-result-actions { display: grid; }
    .paygold-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.ttlock-action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.ttlock-loading-overlay[hidden] { display: none; }
.ttlock-loading-overlay {
    position: fixed; z-index: 2000; inset: 0; display: grid; place-items: center; padding: 1rem;
    background: rgb(28 24 21 / 72%); backdrop-filter: blur(3px);
}
.ttlock-loading-panel {
    display: grid; width: min(430px, 100%); justify-items: center; padding: 1.7rem;
    border: 1px solid rgb(255 255 255 / 35%); border-radius: 12px; color: #fff;
    background: #312a25; box-shadow: 0 24px 70px rgb(0 0 0 / 38%); text-align: center;
}
.ttlock-loading-panel .eyebrow { margin: .9rem 0 .35rem; color: #e8b8a5; }
.ttlock-loading-panel h2 { color: #fff; font-size: 1.35rem; }
.ttlock-loading-panel p:not(.eyebrow) { margin: .65rem 0; color: #f0e9e3; font-size: .88rem; line-height: 1.5; }
.ttlock-loading-panel small { color: #cfc4ba; font-size: .72rem; }
.ttlock-loading-spinner { width: 48px; height: 48px; border: 5px solid rgb(255 255 255 / 22%); border-top-color: #d77c5d; border-radius: 50%; animation: ttlock-loading-spin .8s linear infinite; }
@keyframes ttlock-loading-spin { to { transform: rotate(360deg); } }
.ttlock-action-grid form, .compact-form { display: grid; gap: .55rem; align-content: start; }
.ttlock-action-grid label, .compact-form label { display: grid; gap: .3rem; font-size: .82rem; font-weight: 600; }
.ttlock-action-grid input, .compact-form input { width: 100%; padding: .58rem; border: 1px solid var(--border); border-radius: 5px; }
.ttlock-badge { display: inline-flex; padding: .25rem .55rem; border-radius: 999px; font-size: .74rem; font-weight: 700; white-space: nowrap; }
.ttlock-type-temporary { color: #1f4f74; background: #dcecf8; }
.ttlock-type-permanent { color: #5d3d08; background: #f7e7ba; }
.ttlock-status-active { color: #17613a; background: #d9f1e3; }
.ttlock-status-pending { color: #73520b; background: #fff0bd; }
.ttlock-status-inactive { color: #5f5d58; background: #e9e7e2; }
.ttlock-status-failed { color: #8a2424; background: #f7d9d9; }
.ttlock-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; align-items: end; }
.ttlock-filters label { display: grid; gap: .3rem; font-size: .78rem; font-weight: 700; }
.ttlock-filters input, .ttlock-filters select { min-height: 42px; padding: .55rem; border: 1px solid var(--border); border-radius: 5px; background: #fff; }
.ttlock-created-result > p { margin: .65rem 0 1rem; color: var(--muted); }
.ttlock-created-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .85rem; }
.ttlock-created-code {
    display: grid; gap: .8rem; padding: 1rem; border: 1px solid color-mix(in srgb, var(--lock-color), var(--border) 55%);
    border-top: 5px solid var(--lock-color); border-radius: 9px;
    background: linear-gradient(145deg, color-mix(in srgb, var(--lock-color), #fff 84%), #fff 70%);
    box-shadow: 0 10px 24px color-mix(in srgb, var(--lock-color), transparent 75%);
}
.ttlock-created-lock { display: grid; gap: .15rem; }
.ttlock-created-lock strong { font-size: 1.05rem; }
.ttlock-created-lock small { color: var(--muted); font-size: .72rem; font-weight: 600; letter-spacing: .05em; }
.ttlock-created-name { display: grid; gap: .1rem; padding: .55rem .7rem; border-left: 4px solid var(--lock-color); border-radius: 5px; background: rgb(255 255 255 / 68%); }
.ttlock-created-name span { color: var(--muted); font-size: .65rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.ttlock-created-name strong { overflow-wrap: anywhere; font-size: .9rem; }
.ttlock-created-value { display: grid; gap: .2rem; padding: .75rem; border-radius: 7px; background: rgb(255 255 255 / 75%); text-align: center; }
.ttlock-created-value span { color: var(--muted); font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.ttlock-created-value code { color: var(--ink); font-size: clamp(1.65rem, 3vw, 2.15rem); font-weight: 800; letter-spacing: .13em; }
.ttlock-copy-button {
    min-height: 44px; padding: .65rem 1rem; border: 1px solid color-mix(in srgb, var(--lock-color), var(--ink) 30%);
    border-radius: 6px; color: #fff; background: color-mix(in srgb, var(--lock-color), var(--ink) 42%);
    font: inherit; font-weight: 700; cursor: pointer;
}
.ttlock-copy-button:hover, .ttlock-copy-button:focus-visible { filter: brightness(.92); }
.ttlock-copy-button.is-copied { border-color: #287548; background: #287548; }
.ttlock-copy-status { min-height: 1.1em; color: #287548; font-size: .72rem; text-align: center; }
.ttlock-new-code-card { padding: clamp(1rem, 2.5vw, 1.6rem); }
.ttlock-new-code-form { display: grid; gap: 1.4rem; }
.ttlock-lock-picker { min-width: 0; margin: 0; padding: 0; border: 0; }
.ttlock-lock-picker legend { margin-bottom: .25rem; font-size: .82rem; font-weight: 700; }
.ttlock-lock-picker > p { margin-bottom: .75rem; color: var(--muted); font-size: .78rem; }
.ttlock-lock-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; }
.ttlock-lock-option {
    display: flex; min-height: 74px; align-items: center; gap: .75rem; padding: .8rem;
    border: 1px solid #aaa397; border-radius: 8px; background: #fff; font-size: .82rem;
    font-weight: 700; cursor: pointer; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.ttlock-lock-option:hover { border-color: var(--terracotta); background: #fff9f6; }
.ttlock-lock-option:has(input:checked) { border-color: var(--terracotta); background: #f8e8e1; box-shadow: 0 0 0 2px rgb(147 72 47 / 13%); }
.ttlock-lock-option:focus-within { outline: 3px solid color-mix(in srgb, var(--terracotta), transparent 65%); outline-offset: 2px; }
.ttlock-lock-option input { width: 24px; height: 24px; flex: 0 0 auto; margin: 0; accent-color: var(--terracotta); }
.ttlock-code-basics { display: grid; grid-template-columns: 1.15fr .75fr 1fr; gap: 1rem; }
.ttlock-validity { padding: 1rem; border: 1px solid var(--border); border-radius: 9px; background: #faf8f4; }
.ttlock-validity-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; }
.ttlock-validity-heading h2 { font-size: 1.05rem; }
.ttlock-validity-heading p { margin: 0; color: var(--muted); font-size: .74rem; }
.ttlock-validity-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.ttlock-date-fields { display: grid; gap: .9rem; }
.ttlock-duration-panel { align-self: start; padding: .9rem; border-radius: 7px; background: #fff; box-shadow: 0 5px 16px rgb(45 35 28 / 7%); }
.ttlock-form-note { margin: .65rem 0 0; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.ttlock-form-guidance { margin: 0; padding: .8rem 1rem; border-left: 4px solid var(--terracotta); border-radius: 5px; color: #514b43; background: #fff7f3; font-size: .8rem; line-height: 1.55; }
.integration-card.ttlock-lock-card {
    border-color: color-mix(in srgb, var(--lock-color), var(--border) 55%);
    border-top-color: var(--lock-color);
    background: linear-gradient(145deg, color-mix(in srgb, var(--lock-color), #fff 84%), #fff 62%);
    box-shadow: 0 16px 34px color-mix(in srgb, var(--lock-color), transparent 68%);
}
.ttlock-lock-card .eyebrow { color: color-mix(in srgb, var(--lock-color), var(--ink) 48%); }
.ttlock-lock-title {
    display: inline-block;
    padding: .32rem .62rem;
    border-left: 5px solid var(--lock-color);
    border-radius: 5px;
    background: color-mix(in srgb, var(--lock-color), #fff 72%);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--lock-color), transparent 75%);
}
.ttlock-lock-card .primary-button {
    background: color-mix(in srgb, var(--lock-color), var(--ink) 38%);
    box-shadow: 0 5px 14px color-mix(in srgb, var(--lock-color), transparent 62%);
}
.ttlock-lock-card .primary-button:hover,
.ttlock-lock-card .primary-button:focus-visible { background: color-mix(in srgb, var(--lock-color), var(--ink) 50%); }
.ttlock-api-usage { margin-bottom: 1rem; }
.ttlock-api-usage progress { width: 100%; height: .8rem; accent-color: var(--terracotta); }
.ttlock-usage-stats { margin-top: .85rem; }
.ttlock-usage-breakdown { margin-top: .85rem; }
.ttlock-usage-breakdown summary { cursor: pointer; font-weight: 700; }
.ttlock-usage-breakdown code { overflow-wrap: anywhere; }
.ttlock-quota-warning { color: #765600; background: #fff0c2; }
.ttlock-quota-critical { color: #872323; background: #f8d7d7; }
.ttlock-real-name { margin: -.35rem 0 .65rem; color: var(--muted); font-size: .78rem; font-weight: 600; letter-spacing: .05em; }
.ttlock-code-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.ttlock-code-toolbar .integration-card-heading { flex: 1; margin: 0; }
.ttlock-selection-actions { display: flex; align-items: center; justify-content: flex-end; gap: .8rem; }
.ttlock-selection-actions > span { color: var(--muted); font-size: .76rem; font-weight: 600; }
.ttlock-select-cell { width: 48px; padding-right: .35rem; padding-left: .7rem; text-align: center; }
.ttlock-select-cell label { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ttlock-select-cell input { width: 22px; height: 22px; margin: 0; accent-color: var(--terracotta); cursor: pointer; }
.ttlock-code-row:has(.ttlock-code-checkbox:checked) td { background-color: color-mix(in srgb, var(--lock-color), #fff 77%); }
.ttlock-code-row td:first-child {
    border-left: 5px solid var(--lock-color);
}
.ttlock-code-row td:nth-child(2) {
    background: color-mix(in srgb, var(--lock-color), #fff 84%);
}
.ttlock-code-row td:nth-child(2) a {
    display: grid; gap: .15rem; padding: .35rem .45rem; border-radius: 5px;
    background: color-mix(in srgb, var(--lock-color), #fff 74%);
    text-decoration: none;
}
.ttlock-code-row td:nth-child(2) small { color: var(--muted); font-size: .72rem; }

.stats-grid, .calendar-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.stats-grid { margin-bottom: 3rem; }
.stat-card, .calendar-card { padding: 1.3rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.stat-card span { display: block; color: var(--muted); font-size: .85rem; }
.stat-card strong { font-size: 2rem; }
.section-heading { display: flex; justify-content: space-between; margin: 2.5rem 0 1rem; }
.section-heading .section-help { margin: .3rem 0 0; color: var(--muted); font-size: .78rem; }
.sync-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 0 3rem; padding: 1.3rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.sync-card h2 { margin-bottom: .35rem; }
.sync-card p:last-child { margin-bottom: 0; color: var(--muted); }
.sync-card .sync-error { color: #a32727; white-space: pre-line; }
.sync-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .7rem; }
.sync-actions form { margin: 0; }
.secondary-button:disabled { cursor: not-allowed; opacity: .5; }
.calendar-card { display: flex; align-items: start; gap: .9rem; border-top: 4px solid var(--calendar-color); }
.calendar-card h3 { margin-bottom: .25rem; }
.calendar-card p { margin-bottom: 0; font-size: .82rem; }
.color-dot { width: 12px; height: 12px; flex: 0 0 auto; margin-top: .4rem; border-radius: 50%; background: var(--calendar-color); border: 1px solid rgb(0 0 0 / 12%); }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: .9rem 1rem; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-size: .72rem; letter-spacing: .07em; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }
.clickable-stay-row { position: relative; background: color-mix(in srgb, var(--apartment-color), #fff 72%); transition: filter .15s ease; }
.clickable-stay-row:hover { filter: saturate(1.18) brightness(.97); }
.clickable-stay-row td { padding: 0; background: transparent; }
.table-cell-link { display: block; min-height: 100%; padding: .9rem 1rem; color: inherit; text-decoration: none; }
.clickable-stay-row td:first-child .table-cell-link { font-weight: 700; }
.clickable-stay-row:focus-within { outline: 3px solid color-mix(in srgb, var(--apartment-color), #000 20%); outline-offset: -3px; }
.actions-cell { text-align: right; }
.inline-form { display: inline; }
.whatsapp-checklist-panel { margin-bottom: 1.2rem; padding: 1.35rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.whatsapp-checklist-panel h2 { margin-bottom: 1rem; }
.whatsapp-checklist { display: grid; gap: .7rem; padding-left: 1.7rem; }
.whatsapp-checklist li { padding-left: .3rem; }
.whatsapp-checklist label { display: grid; grid-template-columns: auto 1fr; gap: .65rem; align-items: start; line-height: 1.45; }
.whatsapp-checklist input { margin-top: .25rem; }
.whatsapp-checklist code { overflow-wrap: anywhere; }
.whatsapp-checklist-ready, .whatsapp-safety-callout { margin-bottom: 1.2rem; padding: 1rem; border-radius: 8px; }
.whatsapp-checklist-ready { background: #e4f1e7; color: #315f3d; }
.whatsapp-safety-callout { border-left: 5px solid #a94f3d; background: #f8e5df; color: #662d24; }
.whatsapp-checklist-ready p, .whatsapp-safety-callout p, .whatsapp-config-warning p { margin: .3rem 0 0; }
.whatsapp-checklist-actions { margin-top: 1.2rem; }
.site-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: .55rem 1.2rem; margin-top: 3rem; padding: 1.5rem max(1rem, calc((100vw - 1180px) / 2)); border-top: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: .78rem; }
.site-footer a { color: inherit; }
.compact-stay { display: block; font-size: .78rem; }
.amount-pending { color: #9b341d; font-weight: 700; }
.status-badge { display: inline-block; padding: .2rem .5rem; border-radius: 999px; background: #e8e6e0; font-size: .72rem; font-weight: 600; }
.status-confirmed { background: #dcebdd; color: #275a2c; }
.status-pending, .status-draft { background: #f5e5be; color: #71500b; }
.status-cancelled { background: #eee; color: #666; }
.status-in-house, .checkin-status-in-house { background: #dceaf3; color: #24536b; }
.dashboard-checkin-cell { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .55rem; }
.checkin-status-pending, .checkin-status-started { background: #f5e5be; color: #71500b; }
.checkin-status-incomplete, .checkin-status-error { background: #f8dcd7; color: #79291f; }
.checkin-status-verification { background: #e9e2f5; color: #533779; }
.checkin-status-ready, .checkin-status-sent, .checkin-status-completed { background: #dcebdd; color: #275a2c; }
.checkin-status-sending { background: #dceaf3; color: #24536b; }
.billing-status-legend { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; color: var(--muted); font-size: .8rem; }
.billing-status-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.billing-status-swatch { width: .85rem; height: .85rem; border: 1px solid rgb(0 0 0 / 14%); border-radius: 3px; }
.billing-status-invoiced, .billing-row-invoiced { background: #dcebdd; }
.billing-status-review, .billing-row-needs-review { background: #fff0bd; }
.billing-status-ready, .billing-row-ready { background: #fff; }

.search-form { display: flex; gap: .65rem; margin-bottom: 1rem; }
.search-form input, .search-form select { min-height: 42px; padding: .55rem .7rem; border: 1px solid #aaa397; border-radius: 6px; background: #fff; font: inherit; }
.search-form input { flex: 1 1 320px; }
.filter-form { flex-wrap: wrap; }

.form-page-heading { display: flex; justify-content: space-between; align-items: start; gap: 1rem; margin-bottom: 1.5rem; }
.form-page-heading h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
.data-form { display: grid; gap: 1.2rem; }
.data-form fieldset { margin: 0; padding: 1.35rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.data-form legend { padding: 0 .4rem; font-size: 1rem; font-weight: 700; }
.fieldset-heading { display: flex; justify-content: space-between; align-items: center; }
.fieldset-heading legend { float: left; }
.fieldset-help { color: var(--muted); font-size: .82rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { min-width: 0; }
.field.full-width, .full-width { grid-column: 1 / -1; }
.field label { display: block; margin-bottom: .3rem; font-size: .78rem; font-weight: 600; }
.field-label { display: flex !important; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .3rem .65rem; }
.field-requirement { display: inline-flex; align-items: center; width: fit-content; padding: .16rem .48rem; border-radius: 999px; font-size: .67rem; font-weight: 700; line-height: 1.25; text-transform: none; letter-spacing: 0; }
.requirement-required { background: #f4d8d1; color: #7b271b; }
.requirement-optional { background: #e8e6e0; color: #59544c; }
.requirement-conditional { background: #dce8ee; color: #24536a; }
.form-requirements-legend { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.form-requirements-legend strong { margin-right: .25rem; }
.form-requirements-legend small { flex-basis: 100%; color: var(--muted); }
.age-requirement-status { margin: .35rem 0 0; color: var(--muted); font-size: .76rem; }
.minor-fields { margin: 0; padding: 1rem; border: 1px solid #b8cdd7; border-radius: 9px; background: #f3f8fa; }
.minor-fields[hidden] { display: none; }
.minor-fields legend { padding: 0 .4rem; color: #24536a; font-size: 1rem; font-weight: 700; }
.minor-fields > p { margin: 0 0 .9rem; color: var(--muted); font-size: .82rem; }
.field input, .field select, .field textarea { width: 100%; min-height: 42px; padding: .55rem .65rem; border: 1px solid #aaa397; border-radius: 5px; background: #fff; font: inherit; }
.field textarea { resize: vertical; }
.field small { display: block; margin-top: .25rem; color: var(--muted); }
.has-error input, .has-error select, .has-error textarea { border-color: #a32727; }
.field-error { margin: .25rem 0 0; color: #a32727; font-size: .76rem; }
.form-actions { display: flex; justify-content: flex-end; gap: .7rem; }
.stay-form-list { display: grid; gap: 1rem; clear: both; padding-top: 1rem; }
.stay-form-card { padding: 1rem; border: 1px solid var(--border); border-left: 5px solid var(--sage); border-radius: 7px; background: #fbfaf7; }
.delete-field { grid-column: 1 / -1; color: #8c2c1b; font-size: .82rem; }

.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.detail-card, .notes-card { padding: 1.2rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.detail-card dl { margin: 0; }
.detail-card dl div { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid var(--border); }
.detail-card dl div:last-child { border: 0; }
.detail-card dt { color: var(--muted); font-size: .8rem; }
.detail-card dd { margin: 0; text-align: right; }
.stay-card-grid { display: grid; gap: 1rem; }
.stay-card { overflow: hidden; border: 1px solid var(--border); border-top: 6px solid color-mix(in srgb, var(--calendar-color), #be6343 38%); border-radius: 13px; background: var(--surface); box-shadow: 0 12px 32px rgb(56 44 34 / 8%); }
.stay-card-heading { display: flex; justify-content: space-between; align-items: center; gap: 1.2rem; padding: 1.25rem 1.4rem; border-bottom: 1px solid var(--border); }
.stay-card-heading h3 { margin-bottom: .2rem; font-size: 1.45rem; }
.stay-card-heading p { margin-bottom: 0; }
.stay-dates { color: var(--muted); font-size: .84rem; }
.stay-summary-pills { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .45rem; }
.stay-summary-pills span { padding: .38rem .65rem; border-radius: 999px; color: #5d554b; background: var(--cream); font-size: .7rem; font-weight: 700; }
.stay-operation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; padding: 1rem; background: #faf8f4; }
.stay-operation-panel { display: flex; min-width: 0; min-height: 350px; flex-direction: column; padding: 1.15rem; border: 1px solid var(--border); border-radius: 11px; background: #fff; }
.stay-operation-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding-bottom: .9rem; border-bottom: 1px solid #eee9e1; }
.stay-operation-title { display: flex; min-width: 0; align-items: center; gap: .7rem; }
.stay-operation-title h4 { margin: 0 0 .15rem; font-size: 1rem; }
.stay-operation-title small { display: block; color: var(--muted); font-size: .7rem; }
.stay-operation-icon { display: grid; width: 40px; height: 40px; flex: 0 0 40px; place-items: center; border-radius: 10px; color: #fff; background: #b75d41; font-size: 1.15rem; font-weight: 700; }
.stay-operation-icon.access-icon { background: #687247; }
.stay-operation-body { flex: 1; padding: 1rem 0; }
.stay-operation-facts { margin: 0; }
.stay-operation-facts div { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid #f0ece5; font-size: .75rem; }
.stay-operation-facts dt { color: var(--muted); }
.stay-operation-facts dd { margin: 0; font-weight: 700; text-align: right; }
.stay-operation-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; padding-top: .9rem; border-top: 1px solid #eee9e1; }
.stay-operation-send-actions { display: contents; }
.stay-operation-button { display: flex; min-width: 0; min-height: 43px; align-items: center; justify-content: center; padding: .5rem .55rem; border: 1px solid #aaa397; border-radius: 7px; color: var(--ink); background: #fff; font: 700 .72rem "Poppins", sans-serif; text-align: center; text-decoration: none; cursor: pointer; }
.stay-operation-button.primary { border-color: #b75d41; color: #fff; background: #b75d41; }
.stay-operation-button.whatsapp { border-color: #58613b; color: #fff; background: #687247; }
.stay-operation-button.wide { grid-column: 1 / -1; }
.stay-operation-button:hover, .stay-operation-button:focus-visible { filter: brightness(.94); }
.booking-access-status { padding: .28rem .55rem; border-radius: 999px; color: #535d39; background: #e9ecd7; font-size: .66rem; font-weight: 700; white-space: nowrap; }
.booking-access-status.is-active { color: #465033; background: #dfe5c6; }
.booking-access-status.is-expired { color: #675e51; background: #e8e4dc; }
.booking-access-status.is-pending { color: #75530c; background: #f5e7bd; }
.stay-access-code { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .75rem; padding: .75rem .9rem; border: 1px solid #c2c59c; border-radius: 8px; background: #f5f6ea; }
.stay-access-code span { color: #667064; font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.stay-access-code output { color: #535d39; font-size: 1.65rem; font-weight: 800; letter-spacing: .15em; }
.stay-access-doors { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .75rem; }
.stay-access-doors span { padding: .28rem .45rem; border: 1px solid #c2c59c; border-radius: 999px; color: #59613f; font-size: .66rem; font-weight: 700; }
.stay-access-doors span::before { margin-right: .2rem; content: "✓"; }
.stay-access-empty { display: grid; min-height: 155px; place-content: center; padding: 1rem; border: 1px dashed #c2c59c; border-radius: 8px; color: #59613f; background: #f8f8ef; text-align: center; }
.stay-access-empty p { margin: .35rem 0 0; color: var(--muted); font-size: .74rem; }
.notes-card { margin-top: 1.5rem; }

.planning-wrap { overflow-x: auto; padding-bottom: .5rem; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.planning { min-width: 1050px; }
.week-planning { min-width: 760px; }
.planning-grid { display: grid; grid-template-columns: var(--planning-columns); position: relative; }
.planning-header { position: sticky; top: 0; z-index: 4; border-bottom: 1px solid var(--border); background: #f4f1eb; }
.planning-row { min-height: 74px; border-bottom: 1px solid var(--border); }
.planning-row:last-child { border-bottom: 0; }
.resource-label { position: sticky; left: 0; z-index: 3; grid-column: 1; display: flex; align-items: center; gap: .55rem; padding: .7rem; border-right: 1px solid var(--border); background: #fff; font-size: .8rem; font-weight: 700; }
.planning-header .resource-label { background: #f4f1eb; }
.day-heading { padding: .35rem .15rem; border-right: 1px solid var(--border); text-align: center; font-size: .66rem; color: var(--muted); }
.day-heading span, .day-heading strong { display: block; }
.day-heading strong { color: var(--ink); font-size: .82rem; }
.day-cell { grid-row: 1; min-width: 42px; border-right: 1px solid #eeeae2; }
.weekend { background: #f7f3eb; }
.planning-event { grid-row: 1; z-index: 2; align-self: center; justify-self: stretch; min-width: 20px; margin: .55rem 0; padding: .45rem .55rem; overflow: hidden; border-left: 5px solid color-mix(in srgb, var(--calendar-color), #000 24%); border-radius: 6px; background: var(--calendar-color); color: #25231f; text-decoration: none; white-space: nowrap; box-shadow: 0 2px 7px rgb(0 0 0 / 10%); }
.planning-event strong, .planning-event span { display: block; overflow: hidden; text-overflow: ellipsis; }
.planning-event strong { font-size: .72rem; }
.planning-event span { font-size: .68rem; }
.planning:not(.week-planning) .planning-event { display: flex; min-height: 48px; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.planning:not(.week-planning) .planning-event strong { width: 100%; font-size: .8rem; line-height: 1.2; }
.planning:not(.week-planning) .planning-event span { width: 100%; line-height: 1.2; }
.planning-event.has-pending { box-shadow: inset 0 -4px 0 #a63820, 0 2px 7px rgb(0 0 0 / 10%); }
.calendar-legend { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: .75rem; color: var(--muted); font-size: .75rem; }
.legend-swatch { display: inline-block; width: 18px; height: 9px; margin-right: .3rem; border-radius: 2px; background: var(--sage); }
.pending-swatch { border-bottom: 3px solid #a63820; }

.calendar-toolbar { display: grid; grid-template-columns: auto minmax(220px, 1fr) auto; gap: 1rem; align-items: end; margin-bottom: 1rem; }
.view-switcher { display: inline-flex; padding: .2rem; border: 1px solid var(--border); border-radius: 8px; background: #ece8df; }
.view-switcher a { padding: .5rem .75rem; border-radius: 6px; font-size: .78rem; font-weight: 600; text-decoration: none; }
.view-switcher a.active { background: #fff; box-shadow: 0 1px 4px rgb(0 0 0 / 12%); }
.calendar-filter { justify-self: center; }
.calendar-filter label { display: block; margin-bottom: .2rem; color: var(--muted); font-size: .68rem; font-weight: 600; text-transform: uppercase; }
.calendar-filter select { min-height: 40px; min-width: 230px; padding: .5rem .65rem; border: 1px solid #aaa397; border-radius: 6px; background: #fff; font: inherit; }
.today { box-shadow: inset 0 3px 0 #93482f; }

.month-calendar { overflow: hidden; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.month-weekdays, .month-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.month-weekdays { border-bottom: 1px solid var(--border); background: #f4f1eb; }
.month-weekdays span { padding: .55rem; border-right: 1px solid var(--border); color: var(--muted); font-size: .7rem; font-weight: 700; text-align: center; text-transform: uppercase; }
.month-weekdays span:last-child { border-right: 0; }
.month-week { position: relative; border-bottom: 1px solid var(--border); }
.month-week:last-child { border-bottom: 0; }
.month-day { grid-row: 1; min-width: 0; min-height: max(102px, calc(54px + var(--month-event-lanes) * 34px)); padding: .45rem; border-right: 1px solid var(--border); background: #fff; }
.month-day:last-child { border-right: 0; }
.month-day > time { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; margin-bottom: .3rem; border-radius: 50%; font-size: .75rem; font-weight: 600; }
.month-day.outside-month { background: #f5f3ee; color: #aaa49a; }
.month-day.today > time { color: #fff; background: #93482f; }
.month-event { min-width: 0; padding: .28rem .35rem; overflow: hidden; border-left: 4px solid color-mix(in srgb, var(--calendar-color), #000 24%); border-radius: 4px; background: var(--calendar-color); color: var(--ink); text-decoration: none; }
.month-event strong, .month-event span { display: block; overflow: hidden; font-size: .62rem; text-overflow: ellipsis; white-space: nowrap; }
.month-event.has-pending { box-shadow: inset 0 -3px 0 #a63820; }
.month-event-bar { grid-row: 1; z-index: 2; align-self: start; justify-self: stretch; display: flex; align-items: center; justify-content: flex-start; gap: .25rem; width: 100%; height: 30px; margin: calc(38px + var(--event-lane) * 34px) 0 0; padding: .3rem .45rem; text-align: left; box-shadow: 0 1px 4px rgb(0 0 0 / 12%); }
.month-event-bar strong, .month-event-bar span { display: block; min-width: 0; line-height: 1.2; }
.month-event-bar strong { font-size: .76rem; }
.month-event-bar span { font-size: .66rem; }
.month-event-bar span::before { content: "·"; margin-right: .25rem; }

.login-card { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 8vw, 7rem); align-items: center; min-height: calc(100vh - 190px); }
.login-card > div > p:last-child { max-width: 44ch; color: var(--muted); }
.stacked-form { padding: 2rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: 0 18px 50px rgb(63 45 32 / 8%); }
.stacked-form label { display: block; margin: 1rem 0 .35rem; font-size: .82rem; font-weight: 600; }
.stacked-form input { width: 100%; min-height: 44px; padding: .65rem .75rem; border: 1px solid #bcb6ab; border-radius: 5px; font: inherit; }
.stacked-form .primary-button { width: 100%; margin-top: 1.25rem; }
.form-error, .messages { padding: .8rem 1rem; border-left: 4px solid #a32727; background: #fae9e7; }
.passkey-login-box p { margin: 0 0 .75rem; }
.passkey-login-box .primary-button { width: 100%; }
.password-login-fallback { margin-top: 1rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.password-login-fallback summary { padding: 1rem 1.25rem; cursor: pointer; font-weight: 600; }
.password-login-fallback[open] summary { border-bottom: 1px solid var(--border); }
.password-login-fallback .stacked-form { border: 0; border-radius: 0 0 12px 12px; box-shadow: none; }
.security-setup-card { max-width: 720px; margin: 1.25rem auto; }
.security-setup-card form { margin-top: 1rem; }
.security-checkbox { display: flex !important; align-items: flex-start; gap: .65rem; }
.security-checkbox input { width: auto; min-height: auto; margin-top: .2rem; }
.security-method-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.security-method-grid .stacked-form { padding: 1.4rem; }
.notice-card { margin-bottom: 1.2rem; padding: .9rem 1rem; border-left: 4px solid #8b7445; background: #f4eedf; color: #574b34; font-size: .86rem; }
.sync-conflict-notice { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.sync-conflict-notice a { margin-left: auto; font-weight: 600; }
.conflict-row { background: color-mix(in srgb, var(--apartment-color), #fff 82%); }
.conflict-row td { white-space: normal; }
.conflict-row small { display: block; max-width: 38rem; margin-top: .2rem; color: var(--muted); }
.conflict-booking-link { display: block; margin-top: .35rem; font-weight: 600; }
.compact-action { padding: .35rem .55rem; border: 1px solid #a99f93; border-radius: 5px; background: #fff; color: var(--ink); font: inherit; font-size: .75rem; cursor: pointer; }
.compact-action:hover { border-color: var(--terracotta); background: #fff7f2; }
.messages p { margin: 0; }

.help-layout { display: grid; grid-template-columns: minmax(210px, 270px) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.help-index { position: sticky; top: 1rem; display: grid; align-items: stretch; gap: .35rem; padding: 1rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.help-index strong { margin-bottom: .35rem; }
.help-index a { padding: .35rem 0; color: #70402f; text-decoration: none; }
.help-index a:hover { text-decoration: underline; }
.help-content { display: grid; gap: 1rem; }
.help-section { scroll-margin-top: 1rem; padding: 1.3rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.help-section h2 { margin-bottom: .7rem; }
.help-section p:last-child { margin-bottom: 0; }
.changelog-hero { align-items: center; }
.changelog-timeline { position: relative; margin-top: 1.5rem; }
.changelog-timeline::before { position: absolute; top: .8rem; bottom: .8rem; left: 7px; width: 2px; background: var(--border); content: ""; }
.changelog-entry { position: relative; display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 1rem; padding-bottom: 1.25rem; }
.changelog-marker { z-index: 1; width: 16px; height: 16px; margin-top: 1.25rem; border: 4px solid #fff; border-radius: 50%; background: var(--terracotta); box-shadow: 0 0 0 1px var(--border); }
.changelog-card { min-width: 0; padding: 1.2rem; border: 1px solid var(--border); border-radius: 11px; background: #fff; }
.changelog-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.changelog-heading time { color: var(--muted); font-size: .72rem; font-weight: 600; }
.changelog-heading h2 { margin: .2rem 0 .55rem; font-size: 1.15rem; }
.changelog-explanation { color: #514b43; }
.changelog-areas { display: flex; flex-wrap: wrap; gap: .4rem; margin: .75rem 0; }
.changelog-areas span { padding: .2rem .5rem; border-radius: 999px; background: #e8eef0; color: #31596a; font-size: .68rem; font-weight: 700; }
.changelog-summary { margin: .75rem 0; padding-left: 1.2rem; color: var(--muted); font-size: .82rem; }
.changelog-summary li + li { margin-top: .3rem; }
.changelog-stats { display: flex; gap: 1rem; color: var(--muted); font-size: .74rem; font-weight: 700; }
.text-success { color: #317341; }
.changelog-files { margin-top: .9rem; padding-top: .75rem; border-top: 1px solid var(--border); }
.changelog-files summary { cursor: pointer; color: var(--terracotta-dark); font-size: .8rem; font-weight: 700; }
.changelog-files .table-wrap { margin-top: .75rem; }
.changelog-files code { overflow-wrap: anywhere; font-size: .7rem; }

.integration-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.integration-card { padding: 1.25rem; border: 1px solid var(--border); border-top: 5px solid var(--terracotta); border-radius: 10px; background: var(--surface); }
.integration-card-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.integration-card-heading h2 { margin-bottom: .65rem; font-size: 1.15rem; }
.integration-card > p { min-height: 5.2rem; color: var(--muted); font-size: .84rem; }
.integration-stats { margin: 1rem 0; }
.integration-stats div { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid var(--border); }
.integration-stats dt { color: var(--muted); font-size: .78rem; }
.integration-stats dd { margin: 0; font-weight: 700; }
.checkin-link-box { margin-bottom: 1.5rem; padding: 1.2rem; border: 2px solid var(--terracotta); border-radius: 10px; background: #fff7f2; }
.checkin-link-box input { width: 100%; padding: .7rem; border: 1px solid var(--border); background: #fff; font: inherit; }
.checkin-form { max-width: 1050px; margin-inline: auto; }
.checkin-progress { margin-bottom: 1rem; padding: .8rem 1rem; border-radius: 7px; background: var(--cream); }
.checkin-complete-form { display: flex; justify-content: center; padding: 2rem; }
.remote-link-form { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.remote-link-form input { min-height: 39px; padding: .45rem .6rem; border: 1px solid var(--border); border-radius: 5px; font: inherit; }
.remote-link-history { grid-column: 1 / -1; margin: 1rem 0; padding: 1rem; border: 1px solid var(--border); border-radius: 9px; background: #f8f6f1; }
.remote-link-history > p { color: var(--muted); font-size: .8rem; }
.remote-link-row { display: grid; grid-template-columns: minmax(190px, .8fr) minmax(280px, 1.5fr); gap: .7rem 1rem; align-items: center; padding: .8rem 0; border-top: 1px solid var(--border); }
.remote-link-meta { min-width: 0; }
.remote-link-meta strong, .remote-link-meta small { display: block; margin-top: .25rem; }
.remote-link-meta small { color: var(--muted); font-size: .7rem; }
.remote-link-row > input { width: 100%; min-height: 39px; padding: .45rem .6rem; border: 1px solid var(--border); border-radius: 5px; background: #fff; font: inherit; font-size: .75rem; }
.remote-link-row .remote-link-form { grid-column: 2; }
.traveller-identification-card { margin-top: 2rem; overflow: hidden; border: 1px solid var(--border); border-radius: 13px; background: #fff; box-shadow: 0 10px 30px rgb(57 48 39 / 6%); }
.traveller-identification-heading { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; padding: 1.35rem; border-bottom: 1px solid #e8e3da; background: #faf8f4; }
.traveller-identification-title { display: flex; min-width: 0; align-items: center; gap: .85rem; }
.traveller-identification-title .eyebrow { margin-bottom: .18rem; }
.traveller-identification-title h2 { margin-bottom: .2rem; }
.traveller-identification-title p:last-child { margin: 0; color: var(--muted); font-size: .78rem; }
.traveller-identification-icon { display: grid; width: 44px; height: 44px; flex: 0 0 44px; place-items: center; border-radius: 11px; color: #fff; background: #b75d41; font-size: .72rem; font-weight: 800; letter-spacing: .04em; }
.traveller-identification-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .7rem; color: var(--muted); font-size: .76rem; }
.traveller-identification-summary strong { color: #59613c; font-size: 1.05rem; }
.traveller-remote-panel { display: grid; grid-template-columns: minmax(180px, .55fr) minmax(0, 1.8fr); gap: 1.25rem; padding: 1.15rem 1.35rem; border-bottom: 1px solid #e8e3da; background: #f2f3ec; }
.traveller-remote-copy h3 { margin-bottom: .25rem; font-size: .95rem; }
.traveller-remote-copy p { margin: 0; color: var(--muted); font-size: .74rem; }
.traveller-remote-form { display: grid; align-items: stretch; gap: .6rem; }
.traveller-recipient-fields, .traveller-remote-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.traveller-remote-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.traveller-action { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; padding: .58rem .8rem; border: 1px solid #aaa397; border-radius: 7px; color: var(--ink); background: #fff; font: 700 .72rem "Poppins", sans-serif; text-align: center; text-decoration: none; cursor: pointer; }
.traveller-action:hover, .traveller-action:focus-visible { filter: brightness(.94); }
.traveller-action-primary, .traveller-action-terracotta { border-color: #b75d41; color: #fff; background: #b75d41; }
.traveller-action-whatsapp { border-color: #58613b; color: #fff; background: #687247; }
.traveller-reuse-option { display: flex; align-items: center; gap: .45rem; color: #59613c; font-size: .7rem; font-weight: 600; }
.traveller-table-wrap { margin: 1.25rem; }
.traveller-table th { background: #f2f3ec; color: #59613c; }
.traveller-table tbody tr { transition: background .15s ease; }
.traveller-table tbody tr:hover { background: #fbf8f4; }
.traveller-table small { color: var(--muted); font-size: .68rem; }
.traveller-state { display: inline-flex; padding: .24rem .55rem; border-radius: 999px; font-size: .68rem; font-weight: 700; }
.traveller-state.is-complete { color: #3f5b2f; background: #e4ead7; }
.traveller-state.is-verified { color: #fff; background: #687247; }
.traveller-state.is-pending { color: #7b4b1f; background: #f5e3c5; }
.traveller-document-link { color: #8b432a; font-size: .72rem; font-weight: 700; }
.traveller-row-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.traveller-row-action { display: inline-flex; min-height: 34px; align-items: center; justify-content: center; padding: .4rem .62rem; border: 1px solid #a99f93; border-radius: 6px; background: #fff; font-size: .7rem; font-weight: 700; text-decoration: none; }
.traveller-row-action.is-primary { border-color: #b75d41; color: #fff; background: #b75d41; }
.traveller-identification-card > .remote-link-history, .traveller-identification-card > .notice-card { margin-right: 1.25rem; margin-left: 1.25rem; }
.ses-stay-table-wrap { margin-top: 1rem; }
.ses-communication-row { box-shadow: inset 5px 0 0 #8e8980; }
.ses-row-status-accepted { box-shadow: inset 5px 0 0 #4f855e; }
.ses-row-status-pending, .ses-row-status-deferred { box-shadow: inset 5px 0 0 #c39224; }
.ses-row-status-processing, .ses-row-status-retry { box-shadow: inset 5px 0 0 #4f8aaa; }
.ses-row-status-rejected, .ses-row-status-failed, .ses-row-status-blocked { box-shadow: inset 5px 0 0 #b84d3d; }
.ses-row-status-discarded { box-shadow: inset 5px 0 0 #77736c; }
.ses-status-pending, .ses-status-deferred { color: #71500b; background: #f5e5be; }
.ses-status-blocked { color: #79291f; background: #f8dcd7; }
.ses-status-discarded { color: #55514b; background: #e6e3de; }
.document-capture { padding: 1rem; border: 1px solid var(--border); border-radius: 9px; background: #f8f6f1; }
.document-capture-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.document-capture-heading h2 { margin-bottom: .45rem; font-size: 1.05rem; }
.document-capture > p { color: var(--muted); font-size: .82rem; }
.document-scan-button { width: 100%; justify-content: center; padding: .85rem 1rem; font-size: 1rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.document-camera[hidden] { display: none; }
.document-camera { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; padding: 1rem; background: rgba(20, 18, 16, .92); }
.document-camera-panel { width: min(760px, 100%); max-height: calc(100vh - 2rem); overflow: auto; padding: 1rem; border-radius: 12px; background: #171512; color: #fff; }
.document-camera-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.document-camera-heading h3 { margin: 0; color: #fff; }
.camera-close { border: 0; background: transparent; color: #fff; font-size: 2rem; cursor: pointer; }
.camera-instruction { margin: .75rem 0; color: #eee4da; font-size: .85rem; }
.document-camera-viewport { position: relative; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 8px; background: #000; }
.document-camera-viewport video { width: 100%; height: 100%; object-fit: cover; }
.document-capture-feedback { position: absolute; z-index: 2; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; background: rgba(20, 18, 16, .76); color: #fff; text-align: center; }
.document-capture-feedback[hidden] { display: none; }
.document-capture-feedback > span { display: grid; width: 3.5rem; height: 3.5rem; place-items: center; border-radius: 50%; background: #3f7b50; font-size: 2rem; font-weight: 800; }
.document-capture-feedback strong { font-size: 1.15rem; }
.document-capture-feedback small { color: #eee4da; }
.document-frame { position: absolute; width: 88%; aspect-ratio: 1.586; top: 50%; left: 50%; translate: -50% -50%; border: 3px solid #fff; border-radius: 10px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(0,0,0,.4); }
.document-frame::before, .document-frame::after { content: ""; position: absolute; inset: -5px; border: 5px solid transparent; border-left-color: var(--terracotta); border-right-color: var(--terracotta); border-radius: 12px; }
.document-frame-label { position: absolute; top: .45rem; left: 50%; translate: -50% 0; padding: .2rem .45rem; border-radius: 4px; background: rgba(0,0,0,.65); color: #fff; font-size: .68rem; white-space: nowrap; }
.mrz-guide { position: absolute; right: 5%; bottom: 6%; left: 5%; height: 27%; border: 1px dashed #fff; background: repeating-linear-gradient(to bottom, transparent 0 25%, rgba(255,255,255,.25) 26% 29%); }
.camera-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: .9rem; }
.camera-file-fallback { position: relative; overflow: hidden; cursor: pointer; }
.camera-file-fallback input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.document-processing { display: grid; justify-items: center; gap: .7rem; padding: 2rem 1rem 1rem; text-align: center; }
.document-processing[hidden] { display: none; }
.document-processing p { max-width: 34rem; margin: 0; color: #eee4da; font-size: .85rem; }
.document-processing-spinner { width: 2.8rem; height: 2.8rem; border: 4px solid rgba(255,255,255,.25); border-top-color: #fff; border-radius: 50%; animation: document-processing-spin .8s linear infinite; }
.document-processing-sides { display: flex; flex-wrap: wrap; justify-content: center; gap: .55rem; }
.document-processing-sides span { padding: .45rem .65rem; border-radius: 999px; background: #294d34; color: #fff; font-size: .78rem; font-weight: 700; }
@keyframes document-processing-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .document-processing-spinner, .ttlock-loading-spinner { animation: none; } }
body.camera-open { overflow: hidden; }
.signature-capture { padding: 1rem; border: 1px solid var(--border); border-radius: 9px; background: #f8f6f1; }
.signature-capture h2 { margin-bottom: .35rem; font-size: 1.05rem; }
.signature-capture > p:not(.eyebrow) { color: var(--muted); font-size: .82rem; }
.signature-preview-button { position: relative; display: block; width: 100%; margin: .75rem 0; padding: 0; overflow: hidden; border: 2px dashed #8f887e; border-radius: 7px; background: #fff; cursor: pointer; }
.signature-preview-button canvas { display: block; width: 100%; aspect-ratio: 900 / 260; }
.signature-preview-button > span { position: absolute; inset: 0; display: grid; place-items: center; padding: 1rem; color: var(--muted); font-weight: 600; }
.signature-modal[hidden] { display: none; }
.signature-modal { position: fixed; z-index: 1100; inset: 0; display: grid; place-items: center; padding: 1rem; background: rgba(20, 18, 16, .94); }
.signature-modal-panel { width: min(980px, 100%); max-height: calc(100vh - 2rem); overflow: auto; padding: 1rem; border-radius: 12px; background: #171512; color: #fff; }
.signature-modal-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.signature-modal-heading h2 { color: #fff; }
.signature-modal-panel > p { color: #eee4da; }
.signature-modal canvas { display: block; width: 100%; height: min(55vh, 520px); margin: .8rem 0; border: 3px solid #fff; border-radius: 8px; background: #fff; touch-action: none; cursor: crosshair; }
.signature-modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .65rem; }
body.signature-open { overflow: hidden; }
.signature-alternative { margin-top: .8rem; padding-top: .7rem; border-top: 1px solid var(--border); }
.signature-alternative summary { margin-bottom: .65rem; cursor: pointer; color: var(--terracotta-dark); font-weight: 600; }
.signature-alternative input { width: 100%; }
.document-ocr-status { margin-top: .75rem; padding: .65rem .75rem; border-radius: 6px; background: #ece8df; color: var(--muted); font-size: .8rem; }
.document-ocr-status.is-working { color: #70402f; }
.document-ocr-status.ocr-success { color: #27633b; background: #e4f1e7; font-weight: 600; }
.document-ocr-status.ocr-warning { color: #8c2c1b; background: #fae9e7; }
.document-preview-card { overflow: hidden; }
.document-preview-image { display: block; width: auto; max-width: 100%; max-height: 72vh; margin: 0 auto; object-fit: contain; }
.document-preview-actions { justify-content: center; margin-top: 1rem; }
.ocr-filled-field { border-color: #3f7b50 !important; background: #f0faf2 !important; }
.ocr-lab-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 1rem; }

/* Centro operativo SES.Hospedajes */
.ses-hero { align-items: center; }
.ses-mode-panel { min-width: 160px; padding: .9rem 1.1rem; border: 1px solid #bcb5a9; border-radius: 12px; background: #fff; box-shadow: 0 8px 24px rgb(61 46 37 / 7%); }
.ses-mode-panel span { display: block; color: var(--muted); font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.ses-mode-panel strong { color: #7d3823; font-size: 1.1rem; }
.ses-alert { margin: 0 0 1rem; padding: .9rem 1.1rem; border: 1px solid; border-radius: 10px; font-size: .88rem; }
.ses-alert strong { margin-right: .25rem; }
.ses-alert-warning { border-color: #d8b665; background: #fff5d9; color: #68490c; }
.ses-alert-danger { border-color: #dfa296; background: #fff0ed; color: #79291f; }
.ses-alert-info { border-color: #9ebbd0; background: #eef7fb; color: #24536b; }
.ses-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .8rem; margin: 1.5rem 0 2.2rem; }
.ses-metric { padding: 1rem; border: 1px solid var(--border); border-top: 4px solid #8e8980; border-radius: 10px; background: #fff; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.ses-metric:hover { transform: translateY(-2px); box-shadow: 0 9px 24px rgb(61 46 37 / 9%); }
.ses-metric span, .ses-metric small { display: block; color: var(--muted); }
.ses-metric span { font-size: .72rem; font-weight: 600; text-transform: uppercase; }
.ses-metric strong { display: block; margin: .2rem 0; font-size: 2rem; line-height: 1; }
.ses-metric small { font-size: .68rem; }
.ses-metric-warning { border-top-color: #c39224; }
.ses-metric-danger { border-top-color: #b84d3d; }
.ses-metric-info { border-top-color: #4f8aaa; }
.ses-metric-success { border-top-color: #4f855e; }
.ses-dashboard-layout { display: grid; grid-template-columns: minmax(0, 1fr) 285px; gap: 1.4rem; align-items: start; }
.ses-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; }
.ses-section-heading .eyebrow { margin-bottom: .2rem; }
.ses-filter { display: flex; flex-wrap: wrap; align-items: end; gap: .65rem; margin-bottom: 1rem; padding: .9rem; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.ses-filter label { flex: 1 1 145px; }
.ses-filter label:first-child { flex-basis: 260px; }
.ses-filter label span { display: block; margin-bottom: .25rem; color: var(--muted); font-size: .68rem; font-weight: 700; text-transform: uppercase; }
.ses-filter input, .ses-filter select { width: 100%; min-height: 42px; padding: .55rem .65rem; border: 1px solid #aaa397; border-radius: 6px; background: #fff; font: inherit; }
.ses-bulk-defer-form > .ses-panel { margin-bottom: .8rem; background: #fff8e8; }
.ses-bulk-defer-form > .ses-panel label { display: block; margin: .55rem 0; }
.ses-bulk-defer-form > .ses-panel input[type="text"] { width: min(100%, 560px); min-height: 42px; padding: .55rem .65rem; border: 1px solid #aaa397; border-radius: 6px; background: #fff; font: inherit; }
.ses-bulk-selector { display: inline-flex; align-items: center; gap: .4rem; margin-bottom: .45rem; color: #70402f; font-size: .72rem; font-weight: 700; }
.ses-queue-list { display: grid; gap: .75rem; }
.ses-queue-item { display: grid; grid-template-columns: 5px minmax(0, 1fr) auto; gap: 1rem; overflow: hidden; padding: 1rem 1rem 1rem 0; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.ses-queue-marker { align-self: stretch; border-radius: 0 4px 4px 0; background: #8e8980; }
.tone-warning .ses-queue-marker, .tone-warning .ses-state-icon, .tone-warning .ses-timeline-dot { background: #c39224; }
.tone-danger .ses-queue-marker, .tone-danger .ses-state-icon, .tone-danger .ses-timeline-dot { background: #b84d3d; }
.tone-info .ses-queue-marker, .tone-info .ses-state-icon, .tone-info .ses-timeline-dot { background: #4f8aaa; }
.tone-success .ses-queue-marker, .tone-success .ses-state-icon, .tone-success .ses-timeline-dot { background: #4f855e; }
.ses-queue-main { min-width: 0; }
.ses-queue-heading { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.ses-queue-heading h3 { margin: .35rem 0 .55rem; font-size: 1rem; }
.ses-queue-heading time { flex: 0 0 auto; color: var(--muted); font-size: .7rem; }
.ses-kind { margin-left: .4rem; color: var(--muted); font-size: .72rem; }
.ses-operational-summary strong { font-size: .88rem; }
.ses-operational-summary p { margin: .2rem 0 .6rem; color: var(--muted); font-size: .78rem; }
.ses-queue-meta { display: flex; flex-wrap: wrap; gap: .35rem 1rem; color: var(--muted); font-size: .7rem; }
.ses-auto-yes { color: #356443; }
.ses-auto-no { color: #934437; }
.ses-next-action { margin: .55rem 0 0; color: #514b43; font-size: .75rem; }
.ses-row-link { align-self: center; padding: .55rem .7rem; color: #83412c; font-size: .76rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.ses-empty-state { padding: 2.2rem 1rem; border: 1px dashed #bcb5a9; border-radius: 10px; color: var(--muted); text-align: center; }
.ses-empty-state p { margin: .3rem 0 0; }
.ses-activity-panel { position: sticky; top: 1rem; padding: 1.1rem; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.ses-activity-panel h2 { margin-bottom: 1rem; font-size: 1.2rem; }
.ses-activity-mini { display: grid; grid-template-columns: 10px 1fr; gap: .65rem; padding: .75rem 0; border-top: 1px solid var(--border); text-decoration: none; }
.ses-activity-dot { width: 9px; height: 9px; margin-top: .3rem; border-radius: 50%; background: #4f8aaa; }
.ses-activity-dot.is-success { background: #4f855e; }
.ses-activity-dot.is-danger { background: #b84d3d; }
.ses-activity-mini strong, .ses-activity-mini small, .ses-activity-mini em { display: block; }
.ses-activity-mini strong { font-size: .76rem; }
.ses-activity-mini small { color: var(--muted); font-size: .65rem; }
.ses-activity-mini em { margin-top: .25rem; color: #514b43; font-size: .68rem; font-style: normal; }
.ses-status-accepted { background: #dcebdd; color: #275a2c; }
.ses-status-retry, .ses-status-processing { background: #dceaf3; color: #24536b; }
.ses-status-failed, .ses-status-rejected { background: #f8dcd7; color: #79291f; }
.breadcrumb { justify-content: flex-start; margin-bottom: 1rem; color: var(--muted); font-size: .75rem; }
.ses-detail-hero { align-items: center; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.ses-detail-hero .status-badge { padding: .45rem .75rem; font-size: .78rem; }
.ses-state-card { display: grid; grid-template-columns: 15px minmax(0, 1fr) auto; gap: 1rem; align-items: center; margin-bottom: 1.2rem; padding: 1.2rem; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.ses-state-icon { width: 14px; height: 100%; min-height: 80px; border-radius: 999px; background: #8e8980; }
.ses-state-card h2 { margin-bottom: .3rem; font-size: 1.35rem; }
.ses-state-card p:not(.eyebrow) { margin-bottom: .4rem; color: var(--muted); }
.ses-retry-indicator { min-width: 145px; padding: .8rem; border-radius: 8px; background: #f4efec; color: #7b3b30; text-align: center; }
.ses-retry-indicator.is-active { background: #e4f1e7; color: #315f3d; }
.ses-retry-indicator span, .ses-retry-indicator small { display: block; font-size: .66rem; }
.ses-retry-indicator strong { display: block; font-size: 1.25rem; }
.ses-detail-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, .8fr); gap: 1.2rem; margin-bottom: 1.2rem; }
.ses-panel { padding: 1.2rem; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.ses-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.2rem; margin: .7rem 0 1.2rem; }
.ses-facts div { min-width: 0; padding: .65rem 0; border-bottom: 1px solid var(--border); }
.ses-facts dt { color: var(--muted); font-size: .67rem; font-weight: 700; text-transform: uppercase; }
.ses-facts dd { overflow-wrap: anywhere; margin: .15rem 0 0; font-size: .86rem; font-weight: 600; }
.text-danger { color: #a32727; }
.ses-actions-panel h2 { margin-bottom: .7rem; }
.ses-mode-note { padding: .6rem .7rem; border-radius: 6px; background: #f0ede6; font-size: .78rem; }
.ses-actions-panel form { margin: 1rem 0; padding-top: 1rem; border-top: 1px solid var(--border); }
.ses-actions-panel form p { margin: .55rem 0 0; color: var(--muted); font-size: .72rem; }
.ses-action-button { width: 100%; }
.ses-history { margin-top: 1.2rem; }
.ses-history .ses-section-heading > span { color: var(--muted); font-size: .72rem; }
.ses-timeline { position: relative; margin-top: 1rem; }
.ses-timeline::before { position: absolute; top: 8px; bottom: 8px; left: 7px; width: 2px; background: var(--border); content: ""; }
.ses-timeline-item { position: relative; display: grid; grid-template-columns: 16px 1fr; gap: .9rem; padding: .25rem 0 1.15rem; }
.ses-timeline-dot { z-index: 1; width: 16px; height: 16px; border: 4px solid #fff; border-radius: 50%; background: #8e8980; box-shadow: 0 0 0 1px var(--border); }
.ses-timeline-heading { display: flex; justify-content: space-between; gap: 1rem; }
.ses-timeline-heading time { color: var(--muted); font-size: .68rem; }
.ses-timeline-item p { margin: .2rem 0; color: #514b43; font-size: .8rem; }
.ses-timeline-item small { color: var(--muted); font-size: .68rem; }
.whatsapp-integration-card { grid-column: 1 / -1; }
.whatsapp-integration-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; margin: 1rem 0; }
.whatsapp-integration-facts div { min-width: 0; padding: .75rem; border: 1px solid var(--border); border-radius: 8px; background: #faf8f4; }
.whatsapp-integration-facts dt { color: var(--muted); font-size: .65rem; font-weight: 700; text-transform: uppercase; }
.whatsapp-integration-facts dd { overflow-wrap: anywhere; margin: .2rem 0 0; font-size: .82rem; font-weight: 700; }
.whatsapp-config-warning, .whatsapp-error { padding: .75rem; border-radius: 7px; background: #fff1cf; color: #684b13; }
.whatsapp-error, .whatsapp-signup-feedback.is-error { background: #f8dcd7; color: #79291f; }
.whatsapp-signup-feedback { min-height: 1.4em; margin: .8rem 0; }
.whatsapp-safety-note { margin-top: .85rem; color: var(--muted); font-size: .72rem; }
.inline-form { display: inline; }

@media (max-width: 720px) {
    .site-header, .hero { align-items: flex-start; }
    .site-header { flex-direction: column; gap: .8rem; }
    .brand-logo { width: min(230px, 68vw); }
    /* El panel absoluto se ancla a la barra cuando <details> pasa a static. */
    nav { position: relative; width: 100%; flex-wrap: wrap; gap: .6rem 1rem; }
    .nav-menu { position: static; }
    .nav-menu-panel { right: 1rem; left: 1rem; grid-template-columns: 1fr; width: auto; max-height: 70vh; overflow-y: auto; }
    .nav-menu-group + .nav-menu-group { border-top: 1px solid var(--border); border-left: 0; }
    .logout-form { margin-left: auto; }
    .hero { flex-direction: column; }
    .login-card { grid-template-columns: 1fr; min-height: auto; }
    .form-grid, .form-grid-3, .detail-grid, .integration-grid { grid-template-columns: 1fr; }
    .ttlock-lock-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ttlock-code-basics, .ttlock-validity-grid { grid-template-columns: 1fr; }
    .ttlock-validity-heading { display: block; }
    .ttlock-validity-heading p { margin-top: .25rem; }
    .ttlock-code-toolbar, .ttlock-selection-actions { align-items: stretch; flex-direction: column; }
    .field.full-width, .full-width { grid-column: auto; }
    .form-page-heading, .calendar-heading { flex-direction: column; }
    .calendar-toolbar { grid-template-columns: 1fr; align-items: stretch; }
    .view-switcher { justify-self: start; }
    .calendar-filter { justify-self: stretch; }
    .calendar-filter select { width: 100%; }
    .period-navigation { justify-content: space-between; }
    .help-layout { grid-template-columns: 1fr; }
    .document-camera { padding: 0; }
    .document-camera-panel { min-height: 100vh; border-radius: 0; }
    .signature-modal { padding: 0; }
    .signature-modal-panel { display: flex; min-height: 100vh; flex-direction: column; border-radius: 0; }
    .signature-modal canvas { flex: 1; min-height: 45vh; }
    .help-index { position: static; }
    .month-day { min-height: 95px; padding: .25rem; }
    .month-event span { display: none; }
    .ses-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ses-dashboard-layout, .ses-detail-grid { grid-template-columns: 1fr; }
    .ses-activity-panel { position: static; }
    .ses-queue-item { grid-template-columns: 5px minmax(0, 1fr); }
    .ses-row-link { grid-column: 2; justify-self: start; padding-left: 0; }
    .ses-queue-heading { display: block; }
    .ses-queue-heading time { display: block; margin-top: .3rem; }
    .ses-state-card { grid-template-columns: 12px minmax(0, 1fr); }
    .ses-retry-indicator { grid-column: 2; text-align: left; }
    .ses-facts { grid-template-columns: 1fr; }
    .whatsapp-integration-facts { grid-template-columns: 1fr; }
    .remote-link-row { grid-template-columns: 1fr; }
    .remote-link-row .remote-link-form { grid-column: 1; }
    .traveller-identification-heading { align-items: flex-start; flex-direction: column; }
    .traveller-identification-summary { justify-content: flex-start; }
    .traveller-remote-panel { grid-template-columns: 1fr; }
    .traveller-recipient-fields, .traveller-remote-actions { grid-template-columns: 1fr; }
    .stay-card-heading { align-items: flex-start; flex-direction: column; }
    .stay-summary-pills { justify-content: flex-start; }
    .stay-operation-grid { grid-template-columns: 1fr; }
    .stay-operation-panel { min-height: 0; }
}
