:root {
    --sidebar-width: 270px;
    --bg: #f7f5ef;
    --surface: #ffffff;
    --surface-soft: #eef6f3;
    --text: #22302d;
    --muted: #66736f;
    --line: #d9e1dd;
    --primary: #247c6b;
    --primary-strong: #155c50;
    --accent: #9b3154;
    --warning: #9f6b13;
    --danger: #b33a3a;
    --shadow: 0 14px 34px rgba(30, 45, 42, .10);
}

@media (prefers-color-scheme: dark) {
    html[data-theme="system"] {
        --bg: #0b1110;
        --surface: #18211f;
        --surface-soft: #203d37;
        --text: #f8fffc;
        --muted: #d3dfdb;
        --line: #4a5f5a;
        --primary: #39b69e;
        --primary-strong: #76ddc8;
        --shadow: 0 14px 34px rgba(0, 0, 0, .28);
    }
}

html[data-theme="dark"] {
    --bg: #0b1110;
    --surface: #18211f;
    --surface-soft: #203d37;
    --text: #f8fffc;
    --muted: #d3dfdb;
    --line: #4a5f5a;
    --primary: #39b69e;
    --primary-strong: #76ddc8;
    --shadow: 0 14px 34px rgba(0, 0, 0, .28);
}

* {
    box-sizing: border-box;
}

html {
    overflow-x: clip;
    max-width: 100%;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    max-width: 100%;
    overflow-x: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: "Merriweather", Georgia, serif;
    font-size: 16px;
    letter-spacing: 0;
}

a {
    color: var(--primary-strong);
}

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

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 13px 14px;
    background: var(--surface);
    color: var(--text);
}

label {
    display: grid;
    gap: 7px;
    color: var(--text);
    font-weight: 700;
}

.field-label-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.sound-preview-button {
    width: 26px;
    height: 26px;
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface-soft);
    color: var(--primary-strong);
    cursor: pointer;
    font-size: .68rem;
    line-height: 1;
    padding: 0 0 0 2px;
}

.sound-preview-button:hover,
.sound-preview-button:focus-visible {
    border-color: var(--primary);
    background: var(--surface);
}

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

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

th {
    color: var(--muted);
    font-size: .9rem;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    background: var(--surface);
    border-right: 1px solid var(--line);
    padding: 22px 14px 22px 10px;
    display: flex;
    flex-direction: column;
    z-index: 20;
}

.brand img {
    max-width: 125px;
    height: auto;
    filter: drop-shadow(0 4px 10px rgba(255, 255, 255, .65));
}

.brand {
    display: grid;
    justify-items: center;
    gap: 4px;
    text-decoration: none;
}

.brand span,
.public-brand-name {
    color: var(--primary-strong);
    font-size: 1.85rem;
    font-weight: 900;
    letter-spacing: 0;
}

html[data-theme="dark"] .brand img,
html[data-theme="dark"] .public-logo,
html[data-theme="dark"] .mobile-brand-tab img,
html[data-theme="system"] .brand img,
html[data-theme="system"] .public-logo,
html[data-theme="system"] .mobile-brand-tab img {
    filter: drop-shadow(0 0 0 #fff) drop-shadow(0 6px 16px rgba(255, 255, 255, .72));
}

.nav {
    display: grid;
    gap: 6px;
    margin-top: 28px;
}

.nav a {
    color: var(--text);
    text-decoration: none;
    padding: 12px 10px 12px 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 1.2rem;
    line-height: 1.25;
}

.nav a.active,
.nav a:hover {
    background: var(--surface-soft);
    color: var(--primary-strong);
}

.nav a.nav-pro-link {
    color: var(--primary-strong);
    font-weight: 900;
}

.nav a.nav-pro-link.active,
.nav a.nav-pro-link:hover {
    background: var(--surface-soft);
    color: var(--primary-strong);
}

.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    border-radius: 8px;
    padding: 4px 8px;
    background: var(--accent);
    color: #fff;
    font-size: .74rem;
    font-weight: 900;
}

.topbar-pro-badge {
    width: max-content;
    margin-top: 8px;
}

.sidebar-footer {
    margin-top: auto;
    display: grid;
    gap: 12px;
}

.app-shell {
    margin-left: var(--sidebar-width);
    padding: 24px;
    max-width: 1440px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.home-topbar {
    margin-bottom: 12px;
}

.topbar h1,
.public-panel h1 {
    margin: 0;
    font-size: clamp(1.65rem, 2.7vw, 2.6rem);
    line-height: 1.12;
}

.topbar-title-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: nowrap;
}

.topbar-date-form {
    display: grid;
    grid-template-columns: 32px 126px 32px;
    column-gap: 6px;
    align-items: center;
    flex: 0 0 auto;
}

.topbar-date-form input[type="date"] {
    width: 126px;
    min-height: 32px;
    padding: 5px 6px;
    font-size: .82rem;
}

.topbar-date-form .today-date-arrow {
    width: 32px;
    height: 32px;
    min-height: 32px;
    font-size: 1rem;
    margin: 0;
    line-height: 1;
}

.topbar-disclaimer {
    max-width: 760px;
    margin: 8px 0 0;
    color: var(--muted);
    font-size: .9rem;
    line-height: 1.55;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--muted);
    font-size: .82rem;
    text-transform: uppercase;
    font-weight: 900;
}

.actor-chip {
    position: relative;
    min-width: 0;
    display: grid;
    gap: 0;
    padding: 18px 0 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    overflow: visible;
}

.actor-chip-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 10px 12px 12px;
}

.actor-chip-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.actor-plan-badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    max-width: calc(100% - 24px);
}

.actor-chip strong {
    min-width: 0;
    overflow: hidden;
    font-size: .95rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.actor-chip small {
    min-width: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: .78rem;
    line-height: 1.25;
    text-overflow: clip;
    white-space: normal;
}

.actor-chip small span {
    display: block;
}

.actor-chip img,
.actor-avatar-fallback {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.actor-chip img {
    object-fit: cover;
}

.actor-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-soft);
    color: var(--primary-strong);
    font-size: .82rem;
    font-weight: 900;
}

.actor-avatar-fallback[hidden] {
    display: none;
}

.sidebar-actor-chip {
    display: none;
}

.mobile-actor-chip {
    display: none;
}

.actor-settings-link {
    width: 100%;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 9px 12px;
    border-top: 1px solid var(--line);
    border-radius: 0 0 8px 8px;
    background: var(--surface-soft);
    color: var(--primary-strong);
    text-decoration: none;
    font-size: .82rem;
    font-weight: 900;
    line-height: 1.15;
    text-align: center;
}

.actor-settings-link:hover {
    border-color: var(--primary);
    background: var(--surface);
}

.profile-photo-preview {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: .86rem;
    font-weight: 700;
}

.profile-photo-preview img,
.profile-photo-preview .actor-avatar-fallback {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-photo-field {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

.profile-photo-field .profile-photo-preview {
    flex: 0 0 auto;
}

.profile-file-picker {
    flex: 1 1 auto;
    min-width: 0;
}

.custom-file-control {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}

.custom-file-button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--primary);
    background: var(--surface);
    color: var(--primary-strong);
    font-weight: 900;
}

.custom-file-name {
    min-width: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: .9rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.native-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.logout-link {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 13px;
    border: 1px solid rgba(179, 58, 58, .5);
    border-radius: 8px;
    color: var(--danger);
    text-decoration: none;
    font-weight: 900;
}

.logout-link:hover {
    background: rgba(179, 58, 58, .1);
}

.menu-button {
    display: none;
}

.mobile-app-header,
.mobile-top-brand {
    display: none;
}

.public-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(36, 124, 107, .10), rgba(155, 49, 84, .08)),
        var(--bg);
}

.public-panel {
    width: min(560px, 100%);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 34px;
}

.public-shell-content {
    align-items: start;
    justify-items: center;
    padding-top: 58px;
}

.public-content-entry {
    position: relative;
    width: min(980px, 100%);
    min-width: 0;
    padding-top: 104px;
    overflow-wrap: anywhere;
}

.public-content-entry > h1 {
    overflow-wrap: normal;
}

.public-back-link {
    position: fixed;
    top: 24px;
    left: 16px;
    z-index: 35;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 9px 13px;
    border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface-soft) 86%, white);
    color: var(--primary-strong);
    box-shadow: 0 10px 22px rgba(30, 45, 42, .10);
    text-decoration: none;
    font-size: .9rem;
    font-weight: 900;
}

.public-back-link:hover {
    background: var(--surface);
}

.public-shell-landing {
    place-items: stretch;
    padding: 0;
    background:
        linear-gradient(135deg, transparent 0 72%, rgba(36, 124, 107, .08) 72%),
        linear-gradient(180deg, #fffcf4 0%, var(--bg) 100%);
}

.public-shell-landing:has(.login-landing-page) {
    background:
        linear-gradient(135deg, rgba(36, 124, 107, .08) 0 12%, transparent 12%),
        linear-gradient(135deg, transparent 0 72%, rgba(36, 124, 107, .08) 72%),
        linear-gradient(180deg, #fffcf4 0%, var(--bg) 100%);
}

.landing-entry {
    width: 100%;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    background: transparent;
}

.landing-entry .auth-brand-tab {
    max-width: calc(100% - 24px);
    margin: 18px auto 0;
}

.landing-entry:has(.login-landing-page) .auth-brand-tab {
    display: none;
}

.login-landing-page {
    position: relative;
    isolation: isolate;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.login-landing-page::before {
    content: none;
}

.login-landing-page > * {
    position: relative;
    z-index: 1;
}

.landing-hero,
.landing-section {
    box-sizing: border-box;
    width: min(1460px, calc(100% - 44px));
    margin: 0 auto;
}

.landing-hero {
    position: relative;
    min-height: min(650px, 84vh);
    display: grid;
    grid-template-columns: minmax(300px, .74fr) minmax(590px, 1fr) minmax(300px, 360px);
    align-items: center;
    gap: clamp(16px, 2vw, 36px);
    margin-top: 40px;
    padding: 72px 0 42px;
}

.landing-showcase {
    min-width: 0;
    display: contents;
}

.landing-copy {
    display: grid;
    grid-column: 2;
    gap: 16px;
    align-content: center;
}

.landing-copy-brand {
    position: absolute;
    top: 0;
    left: 50%;
    z-index: 3;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: max-content;
    max-width: calc(100% - 32px);
    min-height: 66px;
    padding: 9px 20px 10px 14px;
    border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
    border-radius: 999px;
    background: #eef6f3;
    box-shadow: 0 14px 30px rgba(30, 45, 42, .12);
    color: var(--primary-strong);
    font-size: clamp(1.6rem, 2vw, 2rem);
    font-weight: 900;
    line-height: 1;
}

.landing-copy-brand img {
    width: 76px;
    height: auto;
    filter: drop-shadow(0 6px 14px rgba(30, 45, 42, .12));
}

.landing-copy h1 {
    margin: 0;
    max-width: 16ch;
    color: #073f39;
    font-size: clamp(2.15rem, 3.25vw, 3.75rem);
    line-height: 1.03;
}

.landing-copy h1 span {
    display: block;
}

.landing-copy p:not(.eyebrow) {
    position: relative;
    z-index: 2;
    max-width: 56ch;
    margin: 0;
    color: var(--text);
    font-size: 1.02rem;
    line-height: 1.64;
}

.landing-benefits {
    display: grid;
    grid-template-columns: minmax(178px, 1fr) minmax(164px, .92fr) minmax(212px, 1.16fr);
    gap: 10px;
    width: 100%;
    min-width: 0;
}

.landing-benefit-card {
    min-height: 60px;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    align-items: center;
    align-content: center;
    gap: 8px;
    padding: 6px 10px;
    border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
    border-radius: 8px;
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 10px 24px rgba(30, 45, 42, .08);
}

.landing-benefit-card strong {
    min-width: 0;
    font-size: .93rem;
    line-height: 1.28;
    overflow-wrap: normal;
}

.landing-benefit-icon {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--primary-strong);
}

.landing-benefit-icon img {
    display: block;
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.landing-hero-actions {
    margin-top: 6px;
}

.landing-illustration {
    grid-column: 1;
    grid-row: 1;
    width: min(118%, 640px);
    margin: 0;
    align-self: center;
    justify-self: end;
    overflow: visible;
    transform: translateX(72px);
}

.landing-illustration img {
    display: block;
    width: 100%;
    height: auto;
    max-width: none;
    filter: saturate(.98) drop-shadow(0 18px 28px rgba(30, 45, 42, .12));
}

.landing-login {
    display: grid;
    gap: 10px;
    grid-column: 3;
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
    border-radius: 12px;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 16px 42px rgba(30, 45, 42, .12);
}

.auth-layer {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    overflow: hidden;
}

.auth-layer summary {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    color: var(--primary-strong);
    cursor: pointer;
    font-weight: 900;
    list-style: none;
}

.auth-layer summary::-webkit-details-marker {
    display: none;
}

.auth-layer summary::after {
    content: "+";
    color: var(--muted);
    font-size: 1.15rem;
    line-height: 1;
}

.auth-layer[open] summary {
    border-bottom: 1px solid var(--line);
    background: var(--surface-soft);
}

.auth-layer[open] summary::after {
    content: "-";
}

.auth-layer form,
.auth-layer .public-copy,
.auth-layer .small-note {
    margin: 12px;
}

html[data-theme="dark"] .public-shell-landing {
    background:
        linear-gradient(135deg, transparent 0 72%, rgba(57, 182, 158, .10) 72%),
        var(--bg);
}

html[data-theme="dark"] .public-shell-landing:has(.login-landing-page) {
    background:
        linear-gradient(135deg, rgba(57, 182, 158, .10) 0 12%, transparent 12%),
        linear-gradient(135deg, transparent 0 72%, rgba(57, 182, 158, .10) 72%),
        var(--bg);
}

html[data-theme="dark"] .landing-copy h1 {
    color: var(--text);
}

html[data-theme="dark"] .landing-intent {
    background: var(--surface);
}

html[data-theme="dark"] .landing-how-strip {
    background: var(--surface);
}

html[data-theme="dark"] .landing-how-copy h2 {
    color: var(--text);
}

html[data-theme="dark"] .landing-intent h2 {
    color: var(--text);
}

html[data-theme="dark"] .landing-benefit-card,
html[data-theme="dark"] .landing-login,
html[data-theme="dark"] .landing-copy-brand {
    background: var(--surface);
}

@media (prefers-color-scheme: dark) {
    html[data-theme="system"] .public-shell-landing {
        background:
            linear-gradient(135deg, transparent 0 72%, rgba(57, 182, 158, .10) 72%),
            var(--bg);
    }

    html[data-theme="system"] .public-shell-landing:has(.login-landing-page) {
        background:
            linear-gradient(135deg, rgba(57, 182, 158, .10) 0 12%, transparent 12%),
            linear-gradient(135deg, transparent 0 72%, rgba(57, 182, 158, .10) 72%),
            var(--bg);
    }

    html[data-theme="system"] .landing-copy h1 {
        color: var(--text);
    }

    html[data-theme="system"] .landing-intent {
        background: var(--surface);
    }

    html[data-theme="system"] .landing-how-strip {
        background: var(--surface);
    }

    html[data-theme="system"] .landing-how-copy h2 {
        color: var(--text);
    }

    html[data-theme="system"] .landing-intent h2 {
        color: var(--text);
    }

    html[data-theme="system"] .landing-benefit-card,
    html[data-theme="system"] .landing-login,
    html[data-theme="system"] .landing-copy-brand {
        background: var(--surface);
    }
}

.landing-login h2,
.landing-section h2 {
    margin: 0;
}

.landing-section {
    padding: 42px 0;
}

.landing-intent {
    width: 100%;
    max-width: none;
    display: grid;
    grid-template-columns: minmax(260px, .48fr) minmax(0, .92fr);
    gap: clamp(28px, 4vw, 64px);
    align-items: center;
    margin-top: 24px;
    margin-bottom: 22px;
    padding: clamp(30px, 4vw, 48px) max(22px, calc((100vw - 1180px) / 2));
    border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    background:
        linear-gradient(135deg, rgba(238, 246, 243, .96), rgba(255, 255, 255, .78)),
        var(--surface-soft);
    box-shadow: 0 14px 34px rgba(30, 45, 42, .07);
}

.landing-intent h2 {
    max-width: 14ch;
    color: #073f39;
    font-size: clamp(1.7rem, 2.2vw, 2.25rem);
    line-height: 1.12;
}

.landing-intent p:last-child {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    font-size: 1.03rem;
    line-height: 1.72;
}

.landing-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.landing-feature-item {
    min-height: 104px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.landing-feature-item span {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--surface-soft);
    color: var(--primary-strong);
    font-weight: 900;
}

.landing-feature-item strong {
    line-height: 1.35;
}

.landing-how-strip {
    width: 100%;
    max-width: none;
    margin-top: 10px;
    margin-bottom: 12px;
    padding: clamp(34px, 4vw, 54px) max(22px, calc((100vw - 1180px) / 2));
    border: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
    border-right: 0;
    border-left: 0;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .92), rgba(238, 246, 243, .92)),
        var(--surface-soft);
}

.landing-how-inner {
    display: grid;
    grid-template-columns: minmax(280px, .52fr) minmax(0, 1fr);
    gap: clamp(20px, 3vw, 42px);
    align-items: center;
}

.landing-how-copy {
    display: grid;
    gap: 12px;
}

.landing-how-copy h2 {
    max-width: 13ch;
    color: #073f39;
    font-size: clamp(1.9rem, 3vw, 3.1rem);
    line-height: 1.05;
}

.landing-how-copy p:not(.eyebrow) {
    margin: 0;
    max-width: 58ch;
    color: var(--text);
    line-height: 1.7;
}

.landing-how-actions {
    margin-top: 4px;
}

.landing-how-carousel {
    --landing-how-duration: 18s;
    position: relative;
    min-width: 0;
    max-width: 100%;
    min-height: clamp(290px, 32vw, 480px);
    overflow: hidden;
}

.landing-how-slide {
    position: absolute;
    inset: 6px 4px 48px;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    min-width: 0;
    margin: 0;
    border: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
    overflow: hidden;
    opacity: 0;
    transform: translateX(34px) scale(.985);
    animation: landingHowSlide var(--landing-how-duration) ease-in-out infinite;
    animation-delay: calc(var(--slide-index) * (var(--landing-how-duration) / 4));
}

.landing-how-carousel:hover .landing-how-slide,
.landing-how-carousel:focus-within .landing-how-slide,
.landing-how-carousel:hover .landing-how-dots span,
.landing-how-carousel:focus-within .landing-how-dots span {
    animation-play-state: paused;
}

.landing-how-slide img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
    object-position: top left;
}

.landing-how-slide figcaption,
.landing-how-placeholder {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 12px;
    background: var(--surface);
    color: var(--primary-strong);
    font-weight: 900;
}

.landing-how-placeholder {
    min-height: 230px;
    justify-content: center;
    border-bottom: 1px dashed var(--line);
    background: var(--surface-soft);
    color: var(--muted);
}

.landing-how-dots {
    position: absolute;
    right: 4px;
    bottom: 8px;
    left: 4px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.landing-how-dots span {
    width: 34px;
    height: 6px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary) 18%, transparent);
    overflow: hidden;
    animation: landingHowDot var(--landing-how-duration) ease-in-out infinite;
    animation-delay: calc(var(--dot-index) * (var(--landing-how-duration) / 4));
}

@keyframes landingHowSlide {
    0%,
    24% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }

    28%,
    100% {
        opacity: 0;
        transform: translateX(-28px) scale(.99);
    }
}

@keyframes landingHowDot {
    28%,
    100% {
        width: 34px;
        background: color-mix(in srgb, var(--primary) 18%, transparent);
    }

    0%,
    24% {
        width: 58px;
        background: var(--primary);
    }
}

@media (prefers-reduced-motion: reduce) {
    .landing-how-slide,
    .landing-how-dots span {
        animation: none;
    }

    .landing-how-slide {
        display: none;
    }

    .landing-how-slide:first-child {
        display: grid;
        opacity: 1;
        transform: none;
    }

    .landing-how-dots span:first-child {
        width: 58px;
        background: var(--primary);
    }
}

.landing-pricing {
    margin-bottom: 12px;
}

.landing-note {
    margin: 0;
    color: var(--muted);
    text-align: center;
}

.auth-brand-tab {
    margin: -12px auto 26px;
    padding: 14px 18px 12px;
    border-radius: 8px;
    background: var(--surface-soft);
    box-shadow: 0 10px 24px rgba(30, 45, 42, .08);
    display: grid;
    justify-items: center;
    gap: 2px;
}

.public-content-entry .auth-brand-tab {
    position: absolute;
    top: 0;
    left: 50%;
    z-index: 3;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: max-content;
    max-width: calc(100% - 32px);
    min-height: 66px;
    margin: 0;
    padding: 9px 20px 10px 14px;
    border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
    border-radius: 999px;
    background: #eef6f3;
    box-shadow: 0 14px 30px rgba(30, 45, 42, .12);
}

.public-logo {
    width: 172px;
    margin: 0;
}

.public-content-entry .public-logo {
    width: 76px;
    height: auto;
    filter: drop-shadow(0 6px 14px rgba(30, 45, 42, .12));
}

.public-brand-name {
    margin-bottom: 0;
    text-align: center;
}

.public-content-entry .public-brand-name {
    color: var(--primary-strong);
    font-size: clamp(1.6rem, 2vw, 2rem);
    font-weight: 900;
    line-height: 1;
}

.public-copy,
.muted,
.small-note {
    color: var(--muted);
}

.small-note {
    font-size: .9rem;
}

.status-grid,
.metric-grid,
.list-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.today-status-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

.metric-grid {
    grid-template-columns: repeat(6, minmax(112px, 1fr));
    gap: 10px;
    overflow-x: auto;
}

.hero-status,
.mini-status,
.metric-card,
.panel,
.item-card,
.empty-state,
.notice-band {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.hero-status {
    grid-column: auto;
    padding: 14px;
}

.today-status-grid .mini-status:nth-child(-n+2) {
    grid-column: span 3;
}

.today-status-grid .mini-status:nth-child(n+3) {
    grid-column: span 2;
}

.today-status-grid .mini-status {
    min-height: 76px;
    padding: 0;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    overflow: hidden;
}

.today-status-grid .mini-status strong {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 8px 6px;
    font-size: clamp(1.7rem, 3.5vw, 2.35rem);
    line-height: 1;
}

.today-status-grid .mini-status span {
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 8px;
    border-top: 1px solid var(--line);
    background: var(--surface-soft);
    color: var(--primary-strong);
    font-size: .83rem;
    font-weight: 900;
    line-height: 1.2;
    text-align: center;
}

.today-status-grid.today-status-grid-compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.today-status-grid-compact .mini-status:nth-child(-n+4),
.today-status-grid-compact .mini-status:nth-child(n+1) {
    grid-column: auto;
}

.today-status-grid-compact .mini-status {
    min-height: 70px;
}

.today-status-grid-compact .mini-status strong {
    min-height: 44px;
    font-size: 1.8rem;
}

.today-status-grid-compact .mini-status span {
    min-height: 26px;
    padding: 5px 6px;
    font-size: .78rem;
}

.today-completion-band {
    --today-completion: 0%;
    --today-completion-label-space: 5.2rem;
    grid-column: 1 / -1;
    display: grid;
    gap: 6px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.today-completion-title {
    color: var(--primary-strong);
    font-size: .9rem;
    font-weight: 900;
    line-height: 1.1;
}

.today-completion-meter {
    position: relative;
    min-height: 22px;
}

.today-completion-percent {
    position: absolute;
    top: 50%;
    left: calc(100% + 8px);
    min-width: 4.2rem;
    padding: 0 2px;
    transform: translateY(-50%);
    background: var(--surface);
    color: var(--text);
    font-size: 1.35rem;
    line-height: 1;
    text-align: left;
    white-space: nowrap;
}

.today-completion-track {
    position: absolute;
    inset: 50% var(--today-completion-label-space) auto 0;
    height: 6px;
    overflow: visible;
    border-radius: 999px;
    background: var(--surface-soft);
    transform: translateY(-50%);
}

.today-completion-track [data-today-progress] {
    position: relative;
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--primary);
    transition: width .2s ease;
}

.today-completion-complete-icon {
    position: absolute;
    top: 50%;
    left: 0;
    z-index: 1;
    width: 26px;
    height: 26px;
    display: none;
    align-items: center;
    justify-content: center;
    border: 1px solid color-mix(in srgb, var(--primary) 52%, var(--line));
    border-radius: 50%;
    background: var(--surface);
    color: var(--primary-strong);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--surface) 70%, transparent);
    transform: translateY(-50%);
}

.today-completion-complete-icon svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.today-completion-band.is-complete .today-completion-complete-icon {
    display: inline-flex;
}

.completion-sticky-source {
    visibility: hidden;
}

.completion-sticky-clone {
    z-index: 41;
    margin: 0;
    pointer-events: none;
    box-shadow: 0 10px 24px rgba(30, 45, 42, .16);
}

.hero-status strong {
    display: block;
    font-size: 2rem;
    line-height: 1;
    color: var(--primary-strong);
}

.mini-status,
.metric-card {
    padding: 12px;
    min-height: 82px;
}

.mini-status strong,
.metric-card strong {
    display: block;
    font-size: 1.55rem;
    color: var(--primary-strong);
}

.metric-card span,
.mini-status span {
    font-size: .95rem;
}

.metric-card small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: .72rem;
}

.metric-card-date {
    max-width: calc(100% - 2px);
    line-height: 1.15;
}

.metric-card .metric-card-date span {
    display: block;
    font-size: inherit;
}

.metric-card {
    position: relative;
    padding-right: 40px;
    padding-bottom: 34px;
}

.metric-add-badge {
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 34px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-right: 0;
    border-bottom: 0;
    border-radius: 8px 0 8px 0;
    background: var(--surface-soft);
    color: var(--primary-strong);
    font-weight: 900;
    text-decoration: none;
}

.metric-add-badge:hover,
.metric-add-badge:focus-visible {
    background: var(--primary);
    color: white;
    outline: 0;
}

.metric-card .eyebrow,
.mini-status .eyebrow {
    font-size: .7rem;
}

.toolbar-band,
.notice-band {
    padding: 16px;
    margin-bottom: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}

.notice-band.warning {
    border-color: rgba(159, 107, 19, .5);
    background: rgba(159, 107, 19, .12);
}

.welcome-coupon-band {
    border-color: rgba(63, 207, 142, .68);
    background:
        linear-gradient(135deg, rgba(63, 207, 142, .24), rgba(255, 184, 77, .16)),
        var(--surface);
}

.welcome-coupon-band > div {
    display: grid;
    gap: 5px;
}

.welcome-coupon-band strong {
    color: var(--text);
}

.welcome-coupon-band span {
    color: var(--muted);
}

.welcome-coupon-progress {
    width: min(320px, 100%);
    height: 18px;
    margin-top: 2px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
    position: relative;
}

.welcome-coupon-progress::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--progress, 0%);
    border-radius: inherit;
    background: linear-gradient(90deg, #35d49d, #72f0c4 55%, #ffb84d);
}

.welcome-coupon-progress span {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 18px;
    padding: 1px 8px;
    border: 1px solid rgba(255, 255, 255, .42);
    border-radius: 999px;
    background: rgba(28, 45, 40, .82);
    color: #fff;
    font-size: .72rem;
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .35);
    transform: translate(-50%, -50%);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
}

.coupon-code-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 4px 10px;
    border: 1px solid rgba(63, 207, 142, .72);
    border-radius: 8px;
    background: rgba(63, 207, 142, .22);
    color: var(--primary-strong);
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
}

a.coupon-code-chip:hover {
    outline: 2px solid color-mix(in srgb, var(--primary) 34%, transparent);
}

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

.panel,
.item-card,
.empty-state {
    padding: 20px;
}

.panel h2,
.item-card h2,
.empty-state h2 {
    margin-top: 0;
}

.narrow-panel {
    max-width: 720px;
}

.stack-form {
    display: grid;
    gap: 14px;
}

.stack-form.compact {
    gap: 10px;
}

.turnstile-honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.cartela-turnstile {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    min-height: 65px;
    overflow: visible;
}

@media (max-width: 340px) {
    .cartela-turnstile {
        min-height: 120px;
    }
}

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

.inline-form label {
    min-width: 170px;
}

.today-date-form {
    align-items: end;
}

.today-date-form label {
    min-width: 190px;
}

.today-date-arrow {
    flex: 0 0 auto;
    font-size: 1.25rem;
}

.today-date-arrow.disabled {
    cursor: not-allowed;
    opacity: .45;
}

.grid-2,
.grid-3,
.grid-4 {
    display: grid;
    gap: 12px;
}

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

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

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

.check-row,
.weekday-row,
.button-row,
.panel-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.check-row input,
.weekday-row input {
    width: auto;
}

.weekday-row {
    padding: 10px;
    border-radius: 8px;
    background: rgba(36, 124, 107, .08);
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

.weekday-row label {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 7px 4px;
    border-radius: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    cursor: pointer;
    font-size: .78rem;
    min-width: 0;
}

.weekday-row label:has(input:checked) {
    background: var(--surface);
    border-color: var(--primary);
    color: var(--primary-strong);
    box-shadow: inset 0 0 0 2px var(--primary);
}

.weekday-row input {
    accent-color: var(--primary);
}

input[type="color"] {
    min-height: 48px;
    padding: 6px;
    cursor: pointer;
}

.primary-button,
.secondary-button,
.danger-button,
.mark-button,
.icon-button {
    border: 0;
    border-radius: 8px;
    padding: 13px 16px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    font-weight: 900;
}

.primary-button,
.mark-button.taken {
    background: var(--primary);
    color: white;
}

.secondary-button {
    background: var(--surface-soft);
    color: var(--primary-strong);
}

.secondary-button.cancel-renewal-button {
    min-height: 44px;
    gap: 10px;
    padding: 10px 13px;
    border: 1px solid rgba(179, 58, 58, .5);
    background: transparent;
    color: var(--danger);
}

.secondary-button.cancel-renewal-button:hover {
    background: rgba(179, 58, 58, .1);
}

.danger-button,
.mark-button.skipped {
    background: rgba(179, 58, 58, .12);
    color: var(--danger);
}

.mark-button.clear {
    background: color-mix(in srgb, var(--surface) 72%, #d4d7da 28%);
    color: var(--primary-strong);
}

.icon-button {
    width: 42px;
    height: 42px;
    padding: 0;
    background: var(--surface-soft);
    color: var(--text);
}

.edit-mark-button {
    font-size: 0;
}

.edit-mark-button::before {
    content: "";
    width: 22px;
    height: 22px;
    display: block;
    background: url("../img/ic_lapis.png") center / contain no-repeat;
}

.timeline {
    display: grid;
    gap: 12px;
}

.timeline-item {
    --timeline-item-shadow: 0 8px 18px rgba(18, 38, 34, .16);
    position: relative;
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 8px solid var(--accent);
    border-radius: 8px;
    box-shadow: var(--timeline-item-shadow);
}

.timeline-item time {
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--primary-strong);
}

.timeline-content h2 {
    margin: 0 0 5px;
    font-size: 1.5rem;
}

.timeline-content p {
    margin: 0;
    color: var(--muted);
}

.timeline-content small {
    display: block;
    margin-top: 6px;
}

.one-tap-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

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

.cancel-edit-mark-button {
    min-height: 46px;
    background: #fff;
    color: #5b2a86;
}

.is-hidden {
    display: none !important;
}

.timeline-item.taken {
    background: color-mix(in srgb, var(--surface) 92%, var(--primary) 8%);
}

.timeline-item.skipped {
    background: color-mix(in srgb, var(--surface) 92%, var(--danger) 8%);
}

.timeline-item.missed {
    background: color-mix(in srgb, var(--surface) 91%, var(--warning) 9%);
}

.timeline-item.is-ad-hoc {
    background: color-mix(in srgb, var(--surface) 80%, #1f8f62 20%);
    border-left-color: #1f8f62;
}

.ad-hoc-edge-badge {
    position: absolute;
    top: -4px;
    left: 50%;
    z-index: 1;
    transform: translateX(-50%);
    padding: 4px 12px;
    border: 1px solid color-mix(in srgb, #1f8f62 72%, var(--line));
    border-radius: 999px;
    background: #1f8f62;
    color: #fff;
    font-size: .75rem;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 6px 14px rgba(31, 143, 98, .24);
}

.ad-hoc-clear-button {
    background: transparent;
    border-color: transparent;
    color: var(--danger);
    font-size: 1.85rem;
    font-weight: 900;
    line-height: 1;
}

.timeline-item.is-ad-hoc .edit-mark-button {
    background: transparent;
    border-color: transparent;
}

.timeline-item.is-ad-hoc .one-tap-actions {
    gap: 2px;
}

.mark-feedback {
    will-change: transform, box-shadow, background;
}

.mark-feedback-pulse {
    animation: markPulse .42s ease-out;
}

.mark-feedback-lift {
    animation: markLift .42s ease-out;
}

.mark-feedback-glow {
    animation: markGlow .48s ease-out;
}

.mark-feedback-nudge {
    animation: markNudge .38s ease-out;
}

.mark-feedback-settle {
    animation: markSettle .42s ease-out;
}

.mark-feedback-taken {
    --mark-feedback-color: rgba(36, 124, 107, .36);
}

.mark-feedback-skipped {
    --mark-feedback-color: rgba(179, 58, 58, .34);
}

@keyframes markPulse {
    0% { transform: scale(1); }
    45% { transform: scale(1.025); }
    100% { transform: scale(1); }
}

@keyframes markLift {
    0% { transform: translateY(0); }
    42% { transform: translateY(-5px); }
    100% { transform: translateY(0); }
}

@keyframes markGlow {
    0% { box-shadow: var(--timeline-item-shadow); }
    45% { box-shadow: 0 0 0 4px var(--mark-feedback-color), var(--timeline-item-shadow); }
    100% { box-shadow: var(--timeline-item-shadow); }
}

@keyframes markNudge {
    0% { transform: translateX(0); }
    32% { transform: translateX(5px); }
    64% { transform: translateX(-2px); }
    100% { transform: translateX(0); }
}

@keyframes markSettle {
    0% { transform: scale(.985); }
    55% { transform: scale(1.018); }
    100% { transform: scale(1); }
}

@keyframes markBadgeShine {
    0% {
        opacity: 0;
        transform: translateX(-120%);
    }
    34% { opacity: 1; }
    100% {
        opacity: 0;
        transform: translateX(120%);
    }
}

.timeline-item.appointment {
    border-left-color: var(--warning);
}

.timeline-item.vaccine {
    border-left-color: var(--primary);
}

.routine-list {
    margin-top: 14px;
}

.compact-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.compact-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-top: 4px solid var(--accent);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 10px;
    min-width: 0;
}

.compact-card-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
}

.medicine-card-tools {
    display: grid;
    justify-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.compact-card h2 {
    margin: 0 0 2px;
    font-size: 1.7rem;
    line-height: 1.25;
}

.compact-card p {
    margin: 0;
    font-size: .8rem;
    color: var(--muted);
}

.compact-card.is-plan-blocked {
    opacity: .82;
    filter: grayscale(.12);
}

.compact-card.is-plan-blocked .color-dot {
    opacity: .55;
}

.plan-blocked-note {
    margin: 8px 0 !important;
    padding: 8px;
    border: 1px dashed rgba(106, 82, 45, .28);
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: .82rem;
    line-height: 1.35;
}

.blocked-maintenance-form {
    margin-top: 8px;
}

.compact-meta {
    margin: 8px 0 !important;
    overflow-wrap: anywhere;
}

.inline-modal-trigger {
    width: max-content;
    max-width: 100%;
    margin-top: 8px;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
    color: var(--primary-strong);
    font-weight: 900;
    font-size: .84rem;
    line-height: 1.35;
    text-align: left;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.color-dot {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    border-radius: 50%;
    border: 3px solid var(--line);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .38), 0 8px 16px rgba(30, 45, 42, .1);
}

.medicine-stock-button {
    position: relative;
    width: 54px;
    height: 58px;
    min-height: 58px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--primary-strong);
    cursor: pointer;
}

.medicine-stock-button img {
    display: block;
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.medicine-stock-button span {
    position: absolute;
    right: 0;
    bottom: 6px;
    min-width: 24px;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 6px;
    border: 2px solid var(--surface);
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--primary-strong);
    box-shadow: 0 8px 18px rgba(30, 45, 42, .16);
    font-size: .78rem;
    font-weight: 900;
    line-height: 1;
}

.medicine-stock-button:hover span,
.medicine-stock-button:focus-visible span {
    background: var(--primary);
    color: white;
}

.medicine-stock-modal .inventory-control-fields {
    gap: 12px;
}

.warning-pill {
    background: rgba(159, 107, 19, .14);
    color: var(--warning);
}

.compact-routines {
    margin-top: 10px;
    font-size: .8rem;
}

.routine-list-badge {
    margin-bottom: 4px;
    width: max-content;
}

.routine-pill {
    border-top: 1px solid var(--line);
    padding: 7px 0;
}

.routine-pill-trigger {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font-weight: 800;
    line-height: 1.35;
    text-align: left;
}

.routine-pill-trigger span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.routine-pill-trigger em {
    color: var(--primary-strong);
    font-size: .72rem;
    font-style: normal;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.routine-pill-trigger em img {
    width: 22px;
    height: 22px;
    display: block;
    object-fit: contain;
}

.routine-pill-trigger em span {
    color: var(--muted);
}

.routine-pill-trigger:hover em span,
.routine-pill-trigger:focus-visible em span {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.routine-pill-disabled {
    display: block;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.routine-edit-form {
    padding: 8px;
    border-radius: 8px;
    background: var(--surface-soft);
}

.routine-communication-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.compact-weekdays {
    padding: 6px;
}

.compact-choice {
    padding: 10px;
}

.routine-delete-form {
    display: flex;
    justify-content: flex-end;
}

.item-card {
    border-top: 5px solid var(--accent);
}

.low-stock {
    border-color: rgba(179, 58, 58, .6);
}

.status-pill,
.plan-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 8px;
    padding: 6px 10px;
    background: var(--surface-soft);
    color: var(--primary-strong);
    font-weight: 900;
}

.timeline-item .status-pill[data-mark-badge] {
    position: relative;
    gap: 0;
    font-size: .9rem;
}

.timeline-item .status-pill[data-mark-badge]::before {
    width: 24px;
    height: 24px;
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-size: .9rem;
    line-height: 1;
    margin-right: 5px;
}

.timeline-item .status-pill[data-mark-badge].taken::before {
    content: "\2713";
    background: #1f9b7f;
}

.timeline-item .status-pill[data-mark-badge].skipped::before {
    content: "\21B7";
    background: #b97817;
}

.timeline-item .status-pill[data-mark-badge].missed::before {
    content: "!";
    background: #9f6b13;
}

.mark-badge-label,
.mark-badge-actor {
    min-width: 0;
}

.mark-badge-label {
    margin-right: .25em;
}

.mark-badge-actor {
    margin-left: 0;
}

.medicine-action-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 18px;
}

.medicine-action-card {
    position: relative;
    min-height: 156px;
    display: grid;
    align-content: center;
    justify-items: stretch;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 36px 14px 18px;
    background: var(--surface);
    color: var(--primary-strong);
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.medicine-action-card:hover,
.medicine-action-card:focus-visible {
    border-color: var(--primary);
    background: var(--surface-soft);
    transform: translateY(-1px);
    outline: 0;
}

.medicine-action-card strong {
    max-width: none;
    line-height: 1.35;
}

.medicine-action-card small {
    color: var(--warning);
    line-height: 1.45;
    font-weight: 700;
}

.medicine-action-card.disabled {
    color: var(--muted);
    cursor: not-allowed;
    opacity: .78;
}

.medicine-action-card:disabled,
.medicine-action-card[aria-disabled="true"] {
    color: var(--muted);
    cursor: not-allowed;
    opacity: .78;
}

.medicine-action-card.disabled:hover,
.medicine-action-card:disabled:hover,
.medicine-action-card[aria-disabled="true"]:hover {
    border-color: var(--line);
    background: var(--surface);
    transform: none;
}

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

.today-action-panel .medicine-action-card {
    min-height: 112px;
    padding: 34px 10px 12px;
    gap: 8px;
}

.today-action-panel .medicine-action-card strong {
    max-width: none;
    font-size: .85rem;
}

.medicine-action-icon {
    position: absolute;
    top: 0;
    left: 50%;
    width: 34px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 0 50% 50%;
    background: var(--surface-soft);
    color: var(--primary-strong);
    font-size: .9rem;
    font-weight: 900;
    transform: translateX(-50%);
}

.app-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 130;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(7, 15, 13, .66);
}

.app-modal {
    position: relative;
    width: min(760px, 100%);
    max-height: min(86vh, 780px);
    max-height: min(86dvh, 780px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .36);
    overflow: hidden;
}

.app-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
}

.app-modal-head h2 {
    margin: 0;
    font-size: 1.25rem;
}

.app-modal-body {
    padding: 18px;
    overflow: auto;
}

.profile-delete-modal-body {
    display: grid;
    gap: 14px;
}

.profile-delete-modal-body > p,
.profile-delete-modal-body > dl {
    margin: 0;
}

.profile-delete-plan {
    margin: 0;
}

.profile-delete-plan > div {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.profile-delete-plan dt,
.profile-delete-plan dd {
    margin: 0;
}

.profile-delete-plan dt {
    font-weight: 900;
}

.profile-delete-plan dd {
    color: var(--muted);
}

.profile-delete-ack {
    min-height: 0;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--text);
    cursor: pointer;
    line-height: 1.35;
}

.profile-delete-ack:has(input:checked) {
    border-color: color-mix(in srgb, var(--primary) 70%, var(--line));
    background: color-mix(in srgb, var(--surface) 82%, var(--primary) 18%);
}

.profile-delete-ack input {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    margin: 1px 0 0;
}

.profile-delete-ack span {
    min-width: 0;
    font-weight: 800;
}

.pro-contract-modal {
    width: min(560px, 100%);
    border-color: color-mix(in srgb, var(--primary) 44%, var(--line));
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--surface-soft) 52%, transparent), transparent 42%),
        var(--surface);
}

.pro-contract-modal-head {
    align-items: flex-start;
    border-bottom-color: color-mix(in srgb, var(--primary) 34%, var(--line));
    background: color-mix(in srgb, var(--surface-soft) 78%, var(--surface));
}

.pro-contract-modal-head .eyebrow {
    margin: 0 0 5px;
    color: var(--primary-strong);
}

.pro-contract-modal-head h2 {
    font-size: clamp(1.45rem, 4vw, 2rem);
    line-height: 1.15;
}

.pro-contract-modal-body {
    display: grid;
    gap: 16px;
    padding: 22px;
}

.pro-contract-seal {
    width: max-content;
    box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 18%, transparent);
}

.pro-contract-lead {
    margin: 0;
    color: var(--text);
    font-size: 1.02rem;
    line-height: 1.65;
}

.pro-contract-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.pro-contract-feature-grid span {
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #e3c982;
    border-radius: 8px;
    background: wheat;
    color: #5d4612;
    font-size: .9rem;
    font-weight: 900;
    line-height: 1.25;
}

html[data-theme="dark"] .pro-contract-feature-grid span {
    border-color: #8f7330;
    background: #4a3715;
    color: #f7e4ad;
}

@media (prefers-color-scheme: dark) {
    html[data-theme="system"] .pro-contract-feature-grid span {
        border-color: #8f7330;
        background: #4a3715;
        color: #f7e4ad;
    }
}

.pro-contract-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 2px;
}

.pro-contract-actions .primary-button,
.pro-contract-actions .secondary-button {
    min-height: 44px;
}

.guided-modal {
    max-height: min(88vh, 780px);
    max-height: min(88dvh, 780px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
}

.guided-wizard {
    min-height: 0;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
}

.guided-wizard-body {
    min-height: 0;
}

.guided-wizard-actions {
    margin: 0;
    display: grid;
    grid-template-columns: minmax(130px, auto) minmax(180px, max-content);
    align-items: center;
}

.guided-wizard-actions .button-row {
    justify-content: flex-end;
}

.guided-wizard-final-note {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--muted);
    font-size: .88rem;
    line-height: 1.45;
}

.choice-fieldset {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.choice-fieldset legend {
    padding: 0 6px;
    font-weight: 900;
}

.choice-fieldset label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.choice-fieldset input {
    width: auto;
}

.field-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.field-row.spread {
    justify-content: space-between;
}

.quiet-button {
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--primary-strong);
    cursor: pointer;
    font-weight: 900;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ai-feature-bar {
    display: grid;
    gap: 8px;
    margin: -10px 0 18px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.ai-feature-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ai-badge,
.ai-action-badge,
.ai-icon-button {
    min-height: 36px;
    border: 0;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.ai-badge {
    padding: 7px 10px;
    font-size: .78rem;
}

.ai-badge-pro {
    background: var(--accent);
    color: #fff;
}

.ai-badge-ia {
    background: rgba(36, 124, 107, .14);
    color: var(--primary-strong);
    gap: 5px;
}

.ai-generative-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .82rem;
    line-height: 1;
}

.ai-action-badge {
    padding: 7px 12px;
    background: var(--surface-soft);
    color: var(--primary-strong);
    cursor: pointer;
}

.ai-action-badge:not(:disabled):hover,
.ai-icon-button:not(:disabled):hover {
    outline: 2px solid color-mix(in srgb, var(--primary) 38%, transparent);
}

.ai-action-badge:disabled,
.ai-icon-button:disabled {
    opacity: .58;
    cursor: not-allowed;
}

.ai-icon-button {
    width: 36px;
    padding: 0;
    background: var(--surface-soft);
    color: var(--text);
    cursor: pointer;
}

.ai-icon-button[data-ai-history] {
    border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--line));
    background: color-mix(in srgb, var(--surface) 88%, var(--primary) 12%);
    color: var(--primary-strong);
}

.ai-icon-button[data-ai-history]:not(:disabled):hover {
    background: color-mix(in srgb, var(--surface) 78%, var(--primary) 22%);
}

.ai-history-icon {
    width: 24px;
    height: 24px;
    display: inline-block;
    background: url("../img/ic_historico.png") center / contain no-repeat;
}

.calendar-icon {
    position: relative;
    width: 15px;
    height: 15px;
    display: inline-block;
    border: 2px solid currentColor;
    border-radius: 4px;
}

.calendar-icon::before {
    content: "";
    position: absolute;
    left: -2px;
    right: -2px;
    top: 3px;
    border-top: 2px solid currentColor;
}

.calendar-icon::after {
    content: "";
    position: absolute;
    left: 3px;
    top: -4px;
    width: 7px;
    height: 4px;
    border-left: 2px solid currentColor;
    border-right: 2px solid currentColor;
}

.ai-feature-note {
    margin: 0;
    color: var(--muted);
    font-size: .86rem;
}

.ai-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 140;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(7, 15, 13, .66);
}

.ai-modal {
    position: relative;
    width: min(760px, 100%);
    max-height: min(82vh, 760px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .36);
    overflow: hidden;
}

.ai-modal-head,
.ai-modal-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
}

.ai-modal-head h2 {
    margin: 0;
    font-size: 1.25rem;
}

.ai-modal-actions {
    justify-content: flex-end;
    border-top: 1px solid var(--line);
    border-bottom: 0;
}

.ai-modal-body {
    padding: 18px;
    overflow: auto;
    background:
        linear-gradient(180deg, rgba(36, 124, 107, .08), transparent 150px),
        var(--surface);
}

.ai-info-copy p {
    margin-top: 0;
    line-height: 1.65;
}

.ai-consent-copy {
    display: grid;
    gap: 14px;
    line-height: 1.6;
}

.ai-consent-copy p,
.ai-consent-points {
    margin: 0;
}

.ai-consent-points {
    display: grid;
    gap: 8px;
    padding-left: 22px;
}

.ai-consent-notice {
    padding: 12px 14px;
    border: 1px solid color-mix(in srgb, var(--primary) 45%, var(--line));
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface) 84%, var(--primary) 16%);
    color: var(--text);
    font-weight: 800;
}

.ai-consent-copy a,
.profile-ai-consent a {
    color: var(--primary-strong);
    font-weight: 900;
}

.ai-chatgpt-footer {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding-top: 12px;
    color: var(--muted);
    border-top: 1px solid var(--line);
}

.ai-chatgpt-mark {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--text);
    color: var(--surface);
    font-size: .68rem;
    font-weight: 900;
}

.ai-progress {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.ai-progress ol {
    margin: 0;
    padding-left: 22px;
    display: grid;
    gap: 10px;
}

.ai-progress li {
    color: var(--muted);
}

.ai-progress li.active {
    color: var(--primary-strong);
    font-weight: 900;
}

.ai-progress li.done {
    color: var(--text);
}

.ai-result-text {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.ai-result-text h3 {
    margin: 18px 0 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--line);
    color: var(--primary-strong);
    font-size: 1.05rem;
}

.ai-result-text h3:first-child {
    margin-top: 0;
}

.ai-result-text strong {
    color: var(--primary-strong);
    font-weight: 900;
}

.ai-result-text em {
    color: var(--muted);
}

.ai-result-text ul {
    margin: 10px 0;
    padding: 0;
    display: grid;
    gap: 8px;
    list-style: none;
}

.ai-result-text li {
    position: relative;
    padding: 9px 10px 9px 30px;
    border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
    border-radius: 8px;
    background: var(--surface);
}

.ai-result-text li::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 1.2em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary);
}

.ai-result-text p:first-child {
    margin-top: 0;
}

.ai-result-text p:last-child {
    margin-bottom: 0;
}

.ai-error-text {
    color: var(--danger);
    font-weight: 900;
}

.ai-history-list {
    display: grid;
    gap: 10px;
}

.ai-history-item {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
    overflow: hidden;
}

.ai-history-item summary {
    min-height: 46px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
}

.ai-history-item summary span {
    color: var(--muted);
    font-size: .82rem;
}

.ai-history-item .ai-result-text {
    padding: 14px;
    border-top: 1px solid var(--line);
    background: var(--surface);
}

.actor-chip .plan-pill {
    width: max-content;
    padding: 4px 8px;
    font-size: .72rem;
    font-style: normal;
    text-align: center;
    white-space: nowrap;
}

.field-hint {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 400;
}

.time-picker-field {
    min-width: 0;
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
}

.time-picker-field legend {
    margin: 0 0 7px;
    padding: 0;
    color: var(--text);
    font-weight: 700;
}

.time-picker-controls {
    display: grid;
    grid-template-columns: 80px 80px 48px;
    align-items: end;
    justify-content: start;
    gap: 8px;
    min-width: 0;
}

.time-picker-select {
    min-width: 0;
    gap: 5px;
    font-size: .82rem;
}

.time-picker-select select {
    min-width: 0;
    min-height: 48px;
    padding: 10px 12px;
}

.time-picker-add {
    width: 48px;
    height: 48px;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--primary);
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    font-size: 1.5rem;
    font-weight: 900;
    line-height: 1;
}

.time-picker-add:hover,
.time-picker-add:focus-visible {
    background: var(--primary-strong);
}

.time-picker-add:disabled {
    cursor: not-allowed;
    opacity: .5;
}

.time-picker-list {
    min-width: 0;
    min-height: 46px;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    align-items: center;
    gap: 7px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
    overflow-wrap: anywhere;
}

.time-picker-chip {
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 7px 6px 10px;
    border: 1px solid color-mix(in srgb, var(--primary) 54%, var(--line));
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font-size: .86rem;
    font-weight: 900;
    white-space: nowrap;
}

.time-picker-chip button {
    width: 24px;
    height: 24px;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(179, 58, 58, .12);
    color: var(--danger);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1;
}

.time-picker-chip button:hover,
.time-picker-chip button:focus-visible {
    background: rgba(179, 58, 58, .22);
}

.time-picker-empty,
.time-picker-count {
    color: var(--muted);
    font-size: .8rem;
    font-weight: 400;
}

.time-picker-count {
    justify-self: end;
}

.time-picker-error {
    margin: 0;
    color: var(--danger);
    font-size: .82rem;
    font-weight: 700;
}

.required-label-text {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
}

.required-marker {
    color: var(--danger);
    font-weight: 900;
}

body.onboarding-open {
    overflow: hidden;
}

.onboarding-overlay {
    position: fixed;
    inset: 0;
    z-index: 160;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(7, 15, 13, .68);
}

.onboarding-panel {
    position: relative;
    width: min(680px, 100%);
    max-height: min(88vh, 780px);
    max-height: min(88dvh, 780px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .36);
    overflow: hidden;
}

.onboarding-head,
.onboarding-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
}

.onboarding-head {
    border-bottom: 1px solid var(--line);
}

.onboarding-head h2,
.onboarding-step h3 {
    margin: 0;
}

.onboarding-body {
    padding: 18px;
    overflow: auto;
}

.onboarding-step {
    display: grid;
    gap: 14px;
}

.onboarding-step p {
    margin: 0;
    line-height: 1.6;
}

.onboarding-actions {
    border-top: 1px solid var(--line);
    background: var(--surface);
}

@media (max-height: 820px) {
    .onboarding-overlay,
    #medicine-guided-modal.app-modal-overlay {
        align-items: start;
        overflow-y: auto;
    }
}

.danger-icon {
    color: var(--danger);
}

.pro-wall {
    position: absolute;
    inset: 24px;
    z-index: 5;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin: 0;
    padding: 30px;
    background: linear-gradient(135deg, rgba(32, 61, 55, .96), rgba(155, 49, 84, .92));
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 8px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .35);
    color: #fff;
}

.inventory-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.inventory-guide {
    display: grid;
    grid-template-columns: minmax(220px, .78fr) minmax(0, 1.22fr);
    gap: 18px;
    align-items: start;
    margin-bottom: 18px;
}

.inventory-guide.collapsible-panel {
    display: block;
}

.inventory-guide h2,
.inventory-guide p {
    margin-top: 0;
}

.inventory-guide-steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.inventory-guide-steps article {
    display: grid;
    gap: 6px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

.inventory-guide-steps span {
    color: var(--muted);
    font-size: .86rem;
    line-height: 1.5;
}

.inventory-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.inventory-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-top: 5px solid var(--primary);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.inventory-card.low-stock {
    border-top-color: var(--danger);
}

.inventory-card-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.inventory-card-head h2,
.inventory-card-head p {
    margin: 0;
}

.inventory-card-head p {
    margin-top: 4px;
    color: var(--muted);
    font-size: .88rem;
}

.inventory-stock-display {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 2px 10px;
    align-items: end;
    padding: 12px;
    border-radius: 8px;
    background: var(--surface-soft);
}

.inventory-stock-display strong {
    color: var(--primary-strong);
    font-size: 2rem;
    line-height: 1;
}

.inventory-stock-display span {
    font-weight: 900;
}

.inventory-stock-display small {
    grid-column: 1 / -1;
    color: var(--muted);
    line-height: 1.45;
}

.inventory-details {
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.inventory-details summary {
    min-height: 44px;
    padding: 11px 13px;
    background: var(--surface);
    color: var(--primary-strong);
    cursor: pointer;
    font-weight: 900;
}

.inventory-details[open] summary {
    border-bottom: 1px solid var(--line);
    background: var(--surface-soft);
}

.inventory-details form {
    padding: 13px;
}

.inventory-settings-form .check-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    flex-wrap: nowrap;
}

.inventory-settings-form .check-row label {
    display: block;
    min-width: 0;
}

.collapsible-panel {
    padding: 0;
    overflow: hidden;
    align-self: start;
}

.collapsible-panel summary {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    cursor: pointer;
    color: var(--primary-strong);
    font-weight: 900;
    list-style: none;
}

.collapsible-panel summary h2 {
    margin: 0;
    font-size: 1.5rem;
}

.collapsible-panel summary::-webkit-details-marker {
    display: none;
}

.collapsible-panel .summary-plus {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    font-size: 1.35rem;
    line-height: 1;
}

.collapsible-panel[open] .summary-plus {
    transform: rotate(45deg);
}

.metric-create-panel > form {
    padding: 0 16px 16px;
}

.metrics-history-panel .metrics-history-heading,
.metrics-history-panel .table-wrap,
.inventory-guide-body {
    padding: 0 16px 16px;
}

.metrics-history-panel .metrics-history-heading {
    justify-content: flex-end;
}

.metric-disclaimer {
    line-height: 1.45;
}

[data-metric-unit-label] {
    color: var(--muted);
    font-size: .86rem;
    font-weight: 700;
}

.compact-datetime-field {
    max-width: 260px;
}

.metrics-history-heading {
    justify-content: space-between;
    margin-bottom: 12px;
}

.inventory-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.inventory-summary-grid .mini-status,
.inventory-summary-grid .mini-status:nth-child(-n+2),
.inventory-summary-grid .mini-status:nth-child(n+3) {
    grid-column: auto;
}

.inventory-guide-body {
    display: grid;
    gap: 14px;
}

.companions-limit-row {
    margin: -12px 0 10px;
}

.companions-limit-badge {
    width: max-content;
    max-width: 100%;
    background: var(--surface-soft);
    white-space: normal;
    line-height: 1.35;
    text-align: left;
}

.companions-grid {
    margin-bottom: 10px;
}

.companions-grid + .narrow-panel {
    margin-top: 0;
}

.agenda-form input,
.agenda-form select,
.agenda-form textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.agenda-form .compact-datetime-field {
    max-width: none;
}

.agenda-layout,
.agenda-layout .panel,
.agenda-form,
.agenda-form label,
.agenda-compact-grid {
    min-width: 0;
}

.pro-wall h2 {
    margin: 0 0 8px;
    font-size: 1.45rem;
}

.pro-wall p:last-child {
    margin-bottom: 0;
    color: rgba(255, 255, 255, .82);
}

.pro-wall .eyebrow {
    color: rgba(255, 255, 255, .78);
}

.pro-feature-frame {
    position: relative;
}

.pro-feature-frame.is-locked {
    min-height: 340px;
}

.pro-feature-frame.is-locked .pro-content {
    filter: none;
    opacity: .72;
    pointer-events: none;
    user-select: none;
}

.pro-preview-card {
    opacity: .86;
}

footer.main-footer {
    background: var(--surface);
    color: var(--muted);
    padding: 1rem;
    margin-top: 5rem;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    border-radius: 8px;
    border: 1px solid var(--line);
}

.landing-entry:has(.login-landing-page) + footer.main-footer {
    margin-top: .75rem;
}

.login-landing-page .landing-section:last-child {
    padding-bottom: 16px;
}

footer.main-footer .footer-logo {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text);
    font-weight: 900;
}

footer.main-footer .footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

footer.main-footer .footer-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: .95rem;
    font-weight: 700;
}

footer.main-footer .footer-links a:hover {
    color: var(--primary-strong);
}

footer.main-footer .footer-links a.footer-pro-link,
footer.main-footer .footer-links a.footer-pro-link:hover {
    color: var(--primary-strong);
    font-weight: 900;
}

footer.main-footer .copyright {
    font-size: .85rem;
    opacity: .7;
}

footer.main-footer .piisk-credit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    color: var(--muted);
    font-size: .85rem;
    font-weight: 700;
}

footer.main-footer .piisk-credit a {
    display: inline-flex;
    align-items: center;
    padding: 4px;
    border-radius: 6px;
}

footer.main-footer .piisk-credit a:hover {
    background-color: rgba(255, 255, 255, .08);
}

footer.main-footer .piisk-credit img {
    display: block;
    width: auto;
    height: 42px;
    filter: none;
}

html[data-theme="dark"] footer.main-footer {
    background: #203d37;
    color: #94a3b8;
}

html[data-theme="dark"] footer.main-footer .footer-logo {
    color: #ffffff;
}

html[data-theme="dark"] footer.main-footer .footer-links a {
    color: #94a3b8;
}

html[data-theme="dark"] footer.main-footer .footer-links a.footer-pro-link {
    color: var(--primary-strong);
}

html[data-theme="dark"] footer.main-footer .piisk-credit img {
    filter: invert(1) brightness(2);
}

@media (prefers-color-scheme: dark) {
    html[data-theme="system"] footer.main-footer {
        background: #203d37;
        color: #94a3b8;
    }

    html[data-theme="system"] footer.main-footer .footer-logo {
        color: #ffffff;
    }

    html[data-theme="system"] footer.main-footer .footer-links a {
        color: #94a3b8;
    }

    html[data-theme="system"] footer.main-footer .footer-links a.footer-pro-link {
        color: var(--primary-strong);
    }

    html[data-theme="system"] footer.main-footer .piisk-credit img {
        filter: invert(1) brightness(2);
    }
}

.status-pill.skipped {
    background: color-mix(in srgb, var(--surface) 88%, var(--danger) 12%);
    color: var(--danger);
}

.status-pill.taken {
    background: color-mix(in srgb, var(--surface) 86%, var(--primary) 14%);
}

.status-pill.missed {
    background: color-mix(in srgb, var(--surface) 86%, var(--warning) 14%);
    color: var(--warning);
}

.profile-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.profile-panel-head h2 {
    margin: 0;
}

.profile-alert-grid,
.alert-channel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
}

.medication-communication-section {
    display: grid;
    gap: 9px;
    padding-top: 4px;
}

.medication-communication-section + .medication-communication-section {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.medication-communication-section h4 {
    margin: 0;
    color: var(--text);
    font-size: 1rem;
    line-height: 1.25;
}

.medication-review-highlight {
    color: var(--primary-strong);
    font-weight: 900;
}

.inventory-communication-section {
    padding-bottom: 2px;
}

.inventory-control-fields {
    display: grid;
    gap: 8px;
}

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

.inventory-control-toggle {
    width: auto;
    min-width: max-content;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-strong);
    font-size: .92rem;
    font-weight: 900;
    cursor: pointer;
}

.inventory-control-toggle input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.inventory-control-disclaimer {
    margin: 0;
    padding: 7px 9px;
    border: 1px solid #e3c982;
    border-radius: 8px;
    background: wheat;
    color: #3b2a06;
    font-size: .74rem;
    line-height: 1.35;
    text-align: center;
}

.inventory-control-details {
    display: grid;
    gap: 10px;
}

.inventory-control-details.is-hidden {
    display: none;
}

.inventory-control-grid {
    gap: 10px;
}

.profile-alert-option,
.alert-channel-option {
    height: 148px;
    min-width: 0;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 8px;
    padding: 12px 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--text);
    text-align: center;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.profile-alert-option:hover,
.profile-alert-option:focus-within,
.alert-channel-option:hover,
.alert-channel-option:focus-within {
    border-color: color-mix(in srgb, var(--primary) 55%, var(--line));
    box-shadow: 0 10px 22px rgba(30, 45, 42, .08);
}

.profile-alert-option:has(input:checked),
.alert-channel-option:has(input:checked) {
    border-color: color-mix(in srgb, var(--primary) 70%, var(--line));
    background: color-mix(in srgb, var(--surface) 82%, var(--primary) 18%);
}

.profile-alert-option:has(input:disabled),
.alert-channel-option:has(input:disabled) {
    cursor: not-allowed;
    opacity: .68;
}

.profile-alert-option input,
.alert-channel-option input {
    width: 20px;
    height: 20px;
    margin: 0;
}

.profile-alert-option img,
.alert-channel-option img {
    width: 54px;
    height: 54px;
    object-fit: contain;
}

.profile-alert-option span,
.alert-channel-option span {
    max-width: 100%;
    font-size: .8rem;
    font-weight: 900;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.profile-ai-consent {
    display: grid;
    gap: 7px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

.profile-ai-consent-option {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    cursor: pointer;
}

.profile-ai-consent-option input {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    margin: 2px 0 0;
}

.profile-ai-consent-option span {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.profile-ai-consent-option strong {
    color: var(--text);
    line-height: 1.3;
}

.profile-ai-consent-option small {
    color: var(--muted);
    font-size: .82rem;
    line-height: 1.45;
}

.profile-ai-consent .field-hint {
    margin: 0 0 0 31px;
}

.compact-alert-channel-grid {
    gap: 8px;
}

.compact-alert-channel-grid .alert-channel-option {
    height: 112px;
    gap: 5px;
    padding: 8px 6px;
}

.compact-alert-channel-grid .alert-channel-option input {
    width: 16px;
    height: 16px;
}

.compact-alert-channel-grid .alert-channel-option img {
    width: 42px;
    height: 42px;
}

.compact-alert-channel-grid .alert-channel-option span {
    font-size: .68rem;
    line-height: 1.12;
}

.profile-alert-device-hint,
.alert-channel-device-hint {
    grid-column: 2;
    margin: 0;
    padding: 7px 8px;
    border-radius: 8px;
    background: wheat;
    color: #3b2a06;
    text-align: center;
    font-size: .78rem;
    line-height: 1.35;
}

.profile-push-permission {
    grid-column: 2;
    width: 100%;
}

.profile-push-permission[hidden] {
    display: none;
}

html[data-theme="dark"] .profile-alert-option img,
html[data-theme="dark"] .alert-channel-option img {
    filter:
        drop-shadow(0 0 1px rgba(118, 221, 200, .95))
        drop-shadow(0 0 7px rgba(118, 221, 200, .42));
}

html[data-theme="dark"] .profile-alert-device-hint,
html[data-theme="dark"] .alert-channel-device-hint {
    border: 1px solid rgba(255, 224, 153, .72);
    background: #f0d08a;
    color: #2b1b04;
    box-shadow: 0 10px 22px rgba(0, 0, 0, .18);
}

html[data-theme="dark"] .inventory-control-disclaimer {
    border-color: rgba(255, 224, 153, .72);
    background: #f0d08a;
    color: #2b1b04;
}

@media (prefers-color-scheme: dark) {
    html[data-theme="system"] .profile-alert-option img,
    html[data-theme="system"] .alert-channel-option img {
        filter:
            drop-shadow(0 0 1px rgba(118, 221, 200, .95))
            drop-shadow(0 0 7px rgba(118, 221, 200, .42));
    }

    html[data-theme="system"] .profile-alert-device-hint,
    html[data-theme="system"] .alert-channel-device-hint {
        border: 1px solid rgba(255, 224, 153, .72);
        background: #f0d08a;
        color: #2b1b04;
        box-shadow: 0 10px 22px rgba(0, 0, 0, .18);
    }

    html[data-theme="system"] .inventory-control-disclaimer {
        border-color: rgba(255, 224, 153, .72);
        background: #f0d08a;
        color: #2b1b04;
    }
}

.profile-plan-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: .92rem;
    font-weight: 700;
}

.profile-plan-stack {
    display: grid;
    gap: 8px;
    max-width: 100%;
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--surface-soft);
}

.profile-plan-renewal {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: .82rem;
    line-height: 1.45;
}

.profile-plan-renewal p {
    margin: 0;
}

.profile-plan-valid-until {
    margin: 0;
    color: var(--primary-strong);
    font-size: .86rem;
    font-weight: 900;
}

.profile-cancel-recurring-button {
    min-height: 28px;
    padding: 4px 9px;
    font-size: .74rem;
}

.profile-plan-inline strong {
    color: var(--primary-strong);
}

.profile-pro-badge {
    text-decoration: none;
}

.profile-receipts-button {
    min-height: 30px;
    padding: 5px 10px;
    border: 1px solid #111;
    border-radius: 999px;
    font-size: .78rem;
    transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.profile-receipts-button:hover,
.profile-receipts-button:focus-visible {
    border-color: #111;
    background: rgba(36, 124, 107, .1);
    color: var(--primary-strong);
}

.profile-billing-modal {
    width: min(860px, 100%);
}

.profile-billing-body {
    display: grid;
    gap: 14px;
}

.billing-receipt-card {
    display: grid;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

.billing-receipt-card-head,
.billing-renewal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.billing-receipt-card h3 {
    margin: 2px 0 0;
}

.billing-receipt-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
    margin: 0;
}

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

.billing-receipt-grid div {
    min-width: 0;
}

.billing-receipt-grid dt {
    margin-bottom: 3px;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.billing-receipt-grid dd {
    margin: 0;
    overflow-wrap: anywhere;
    font-weight: 800;
}

.billing-receipt-grid .billing-cancelled-highlight {
    padding: 10px 12px;
    border: 1px solid color-mix(in srgb, #7f1d3a 70%, #fff 30%);
    border-radius: 8px;
    background: #7f1d3a;
}

.billing-receipt-grid .billing-cancelled-highlight dt,
.billing-receipt-grid .billing-cancelled-highlight dd {
    color: #fff;
}

.billing-renewal-list {
    display: grid;
    gap: 10px;
}

.billing-renewal-item {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.collapsible-panel-body {
    padding: 0 16px 16px;
}

.collapsible-panel-body .stack-form {
    padding: 0;
}

.profile-side-column,
.profile-actions-column {
    display: grid;
    align-content: start;
    gap: 12px;
}

.profile-side-column > .panel,
.profile-actions-column > .panel {
    width: 100%;
    min-width: 0;
}

.profile-action-panel {
    min-height: 84px;
}

.profile-action-panel summary {
    min-height: 84px;
    padding: 20px;
}

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

.table-wrap.has-open-filter {
    padding-bottom: 280px;
}

.data-table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 10px 0;
    flex-wrap: wrap;
}

.data-table-controls button,
.data-table-controls span {
    min-height: 38px;
}

.export-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.export-actions .secondary-button {
    min-height: 38px;
    padding: 9px 12px;
    font-size: .86rem;
}

.history-calendar-panel {
    display: grid;
    gap: 14px;
}

.history-calendar-panel,
.history-calendar-panel + .panel,
.history-calendar-panel + .panel + .panel {
    margin-bottom: 26px;
}

.history-calendar-heading {
    margin-bottom: 0;
}

.history-calendar-heading .muted {
    margin: 4px 0 0;
}

.history-calendar-nav {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-strong);
}

.history-calendar-nav strong {
    min-width: 156px;
    text-align: center;
}

.history-calendar-nav .icon-button {
    width: 38px;
    height: 38px;
    font-size: 1.45rem;
    text-decoration: none;
}

.history-calendar-nav .icon-button.is-disabled {
    opacity: .36;
    pointer-events: none;
}

.history-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
}

.history-calendar-weekday {
    padding: 0 4px;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 900;
    text-align: center;
    text-transform: uppercase;
}

.history-calendar-blank {
    min-height: 82px;
}

.history-calendar-day {
    min-width: 0;
    min-height: 82px;
    display: grid;
    justify-items: center;
    align-content: space-between;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 8px 16px rgba(30, 45, 42, .08);
}

a.history-calendar-day {
    color: inherit;
    text-decoration: none;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

a.history-calendar-day:hover,
a.history-calendar-day:focus-visible {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 18%, transparent), 0 8px 16px rgba(30, 45, 42, .08);
    transform: translateY(-1px);
}

.history-calendar-day.is-weekend {
    background: color-mix(in srgb, var(--surface) 84%, wheat 16%);
}

.history-calendar-day time {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    color: var(--text);
    font-size: 1.28rem;
    font-weight: 900;
}

.history-calendar-badge {
    box-sizing: border-box;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: .72rem;
    font-weight: 900;
    line-height: 1.1;
    text-align: center;
}

.history-calendar-badge.is-percent {
    width: 52px;
    padding-right: 0;
    padding-left: 0;
    white-space: nowrap;
}

.history-calendar-day.has-progress .history-calendar-badge {
    background: color-mix(in srgb, var(--surface) 84%, var(--warning) 16%);
    color: var(--warning);
}

.history-calendar-day.is-complete .history-calendar-badge {
    background: color-mix(in srgb, var(--surface) 82%, var(--primary) 18%);
    color: var(--primary-strong);
}

.history-calendar-day.is-today {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 22%, transparent), 0 8px 16px rgba(30, 45, 42, .08);
}

.history-calendar-day.is-today time {
    background: var(--primary);
    color: #fff;
}

.history-calendar-day.is-locked {
    opacity: .48;
}

.history-calendar-day.is-locked .history-calendar-badge {
    background: var(--surface-soft);
    color: var(--muted);
}

.data-table th {
    cursor: pointer;
    white-space: nowrap;
}

.data-table thead th {
    background: var(--surface-soft);
    color: var(--text);
}

.data-table thead tr:first-child th {
    border-bottom: 0;
}

.data-table thead tr:first-child th:first-child {
    border-top-left-radius: 8px;
}

.data-table thead tr:first-child th:last-child {
    border-top-right-radius: 8px;
}

.data-sort-label {
    vertical-align: middle;
}

.data-sort-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    margin-left: 6px;
    color: var(--primary-strong);
    font-size: .82rem;
    line-height: 1;
}

.data-table-filter th {
    padding-top: 0;
    border-top: 0;
    position: relative;
    overflow: visible;
    cursor: default;
}

.data-table-inline-scroll-row th {
    height: 18px;
    padding: 2px 0 0;
    border-top: 0;
    background: var(--surface-soft);
    cursor: default;
}

.data-table-inline-scroll {
    position: sticky;
    left: 0;
    height: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-color: var(--primary) var(--line);
    scrollbar-width: auto;
}

.data-table-inline-scroll::-webkit-scrollbar {
    height: 12px;
}

.data-table-inline-scroll::-webkit-scrollbar-track {
    border-radius: 999px;
    background: var(--line);
}

.data-table-inline-scroll::-webkit-scrollbar-thumb {
    border: 2px solid var(--line);
    border-radius: 999px;
    background: var(--primary);
}

.data-table-inline-scroll-spacer {
    height: 1px;
}

.data-filter-menu {
    position: relative;
    min-width: 136px;
}

.data-filter-menu summary {
    width: 100%;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    font-size: .82rem;
    font-weight: 700;
    list-style: none;
}

.data-filter-menu summary::-webkit-details-marker {
    display: none;
}

.data-filter-menu summary::after {
    content: "v";
    color: var(--muted);
}

.data-filter-menu[open] summary {
    border-color: var(--primary);
}

.data-filter-options {
    position: absolute;
    z-index: 18;
    top: calc(100% + 6px);
    left: 0;
    width: max(220px, 100%);
    max-height: 260px;
    overflow: auto;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.data-filter-clear {
    width: 100%;
    min-height: 34px;
    margin-bottom: 6px;
    border: 0;
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--primary-strong);
    cursor: pointer;
    font-weight: 900;
    text-align: left;
    padding: 7px 8px;
}

.data-filter-clear:hover {
    background: color-mix(in srgb, var(--surface-soft) 82%, var(--primary));
}

.data-filter-options label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 7px 6px;
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
}

.data-filter-options label:hover {
    background: var(--surface-soft);
}

.data-filter-options input {
    width: auto;
    margin-top: 2px;
    accent-color: var(--primary);
}

.admin-tabs,
.admin-subtabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 18px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.admin-tabs a,
.admin-subtabs a {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    font-weight: 900;
}

.admin-tabs a.active,
.admin-tabs a:hover,
.admin-subtabs a.active,
.admin-subtabs a:hover {
    background: var(--surface-soft);
    color: var(--primary-strong);
}

.admin-subtabs {
    width: max-content;
    max-width: 100%;
    box-shadow: none;
}

.admin-row-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.admin-navigation-preview {
    display: grid;
    gap: 18px;
}

.admin-preview-shell {
    max-width: 560px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.admin-preview-browser-bar {
    display: flex;
    gap: 6px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-soft);
}

.admin-preview-browser-bar span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--primary) 42%, var(--line));
}

.admin-preview-page {
    min-height: 132px;
    display: grid;
    align-content: center;
    gap: 8px;
    padding: 22px;
    color: var(--muted);
}

.admin-preview-page strong {
    color: var(--primary-strong);
    font-size: 1.2rem;
}

.admin-preview-page p {
    max-width: 420px;
    margin: 0;
    line-height: 1.55;
}

.integration-status-grid {
    margin-bottom: 18px;
}

.integration-checks-panel {
    display: grid;
    gap: 18px;
}

.integration-env-tabs {
    margin: 0;
}

.integration-check-group {
    display: grid;
    gap: 10px;
}

.integration-check-group h3 {
    margin: 0;
    color: var(--primary-strong);
    font-size: 1.08rem;
}

.integration-check-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
    font-size: .9rem;
}

.integration-check-table th,
.integration-check-table td {
    padding: 10px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
    text-align: left;
}

.integration-check-table thead th {
    background: var(--surface-soft);
    color: var(--primary-strong);
    font-size: .78rem;
    text-transform: uppercase;
}

.integration-check-detail {
    max-width: 320px;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.compact-button {
    min-height: 34px;
    padding: 7px 10px;
    font-size: .82rem;
}

.admin-profile-button {
    min-height: 42px;
    padding: 10px 12px;
}

.admin-deleted-user-row > td {
    background: color-mix(in srgb, var(--surface) 78%, #d6d8da 22%);
}

.admin-profile-row:not(.is-hidden) {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(15, 23, 42, .34);
}

.admin-profile-row > td {
    display: block;
    width: min(980px, calc(100vw - 36px));
    max-height: calc(100vh - 36px);
    padding: 0;
    overflow: auto;
    background: transparent;
    border: 0;
}

.admin-profile-card {
    display: grid;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.admin-profile-card-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.admin-profile-identity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-profile-avatar {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    display: inline-grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface-soft);
}

.admin-profile-avatar img,
.admin-profile-avatar .actor-avatar-fallback {
    width: 100%;
    height: 100%;
}

.admin-profile-avatar img {
    object-fit: cover;
}

.admin-profile-card-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.admin-profile-card-head h3 {
    margin: 0 0 4px;
}

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

.admin-profile-onboarding {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

.admin-profile-onboarding h4 {
    margin: 0 8px 0 0;
}

.admin-profile-timeline {
    display: grid;
    grid-template-columns: repeat(8, minmax(120px, 1fr));
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.admin-profile-timeline article {
    position: relative;
    min-height: 94px;
    display: grid;
    align-content: start;
    gap: 6px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.admin-profile-timeline article::before {
    content: "";
    position: absolute;
    top: 19px;
    right: calc(100% - 2px);
    width: 16px;
    height: 2px;
    background: var(--line);
}

.admin-profile-timeline article:first-child::before {
    display: none;
}

.admin-profile-timeline article > span {
    width: 14px;
    height: 14px;
    border: 2px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
}

.admin-profile-timeline article.is-complete > span {
    border-color: var(--primary);
    background: var(--primary);
}

.admin-profile-timeline strong {
    color: var(--primary-strong);
    font-size: .82rem;
    line-height: 1.2;
}

.admin-profile-timeline small {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 800;
}

.admin-profile-timeline .admin-traffic-button {
    width: fit-content;
    min-height: 30px;
    padding: 6px 9px;
    font-size: .72rem;
    line-height: 1;
}

.admin-billing-traffic-modal {
    max-width: min(980px, calc(100vw - 28px));
}

.admin-billing-traffic-body {
    display: grid;
    gap: 14px;
}

.admin-billing-traffic-entry {
    display: grid;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

.admin-billing-traffic-entry header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.admin-billing-traffic-entry header div {
    display: grid;
    gap: 2px;
}

.admin-billing-traffic-entry header small {
    color: var(--muted);
    font-weight: 800;
}

.admin-billing-traffic-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
    margin: 0;
}

.admin-billing-traffic-meta div {
    display: grid;
    gap: 3px;
}

.admin-billing-traffic-meta dt,
.admin-billing-traffic-entry h4 {
    margin: 0;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.admin-billing-traffic-meta dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.admin-billing-traffic-entry details {
    display: grid;
    gap: 8px;
}

.admin-billing-traffic-entry summary {
    cursor: pointer;
    color: var(--primary-strong);
    font-weight: 900;
}

.admin-billing-traffic-entry pre {
    max-height: 320px;
    margin: 8px 0 0;
    padding: 10px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font-size: .78rem;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.admin-profile-grid h4 {
    margin: 0 0 8px;
}

.admin-profile-grid p {
    margin: 0 0 7px;
}

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

.admin-profile-list li {
    display: grid;
    gap: 2px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

.admin-profile-list span {
    color: var(--muted);
    font-size: .9rem;
}

.admin-push-resend-list li {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.admin-log-actions-panel,
.admin-coupon-settings-panel,
.admin-coupons-split {
    margin-bottom: 22px;
}

.admin-log-actions-panel summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    list-style: none;
}

.admin-log-actions-panel summary::-webkit-details-marker {
    display: none;
}

.admin-log-actions-panel summary h2,
.admin-log-actions-panel summary p {
    margin: 0;
}

.admin-log-actions-panel summary::after {
    content: "Abrir";
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--primary-strong);
    font-weight: 900;
}

.admin-log-actions-panel[open] summary {
    margin-bottom: 14px;
}

.admin-log-actions-panel[open] summary::after {
    content: "Fechar";
}

.admin-log-action-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.admin-log-action-grid .check-row {
    align-items: flex-start;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

.admin-log-action-grid strong,
.admin-log-action-grid small {
    display: block;
}

.admin-log-action-grid small {
    margin-top: 3px;
    color: var(--muted);
    font-size: .74rem;
    overflow-wrap: anywhere;
}

.admin-coupon-modal {
    width: min(860px, calc(100vw - 28px));
}

.admin-mp-layout {
    align-items: start;
}

.admin-mp-help-list {
    display: grid;
    gap: 8px;
    margin: 12px 0 0;
    padding-left: 20px;
}

.admin-mp-results {
    display: grid;
    gap: 12px;
}

.admin-mp-result-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

.admin-mp-result-card.error {
    border-color: rgba(179, 58, 58, .32);
    background: rgba(179, 58, 58, .08);
}

.admin-mp-result-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-mp-result-head h3 {
    margin: 2px 0 0;
    overflow-wrap: anywhere;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .92rem;
}

.admin-mp-error {
    margin: 0;
    color: var(--danger);
    font-weight: 800;
    overflow-wrap: anywhere;
}

.admin-mp-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
    margin: 0;
}

.admin-mp-summary div {
    min-width: 0;
}

.admin-mp-summary dt {
    margin-bottom: 3px;
    color: var(--muted);
    font-size: .76rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.admin-mp-summary dd {
    margin: 0;
    overflow-wrap: anywhere;
    font-weight: 800;
}

.admin-mp-diagnostics {
    display: grid;
    gap: 7px;
    padding: 12px;
    border: 1px solid rgba(36, 124, 107, .24);
    border-radius: 8px;
    background: rgba(36, 124, 107, .08);
}

.admin-mp-diagnostics h4,
.admin-mp-diagnostics p {
    margin: 0;
}

.admin-mp-diagnostics h4 {
    color: var(--primary-strong);
    font-size: .9rem;
}

.admin-log-json summary {
    cursor: pointer;
    color: var(--primary-strong);
    font-weight: 900;
}

.admin-log-json pre {
    max-width: 520px;
    max-height: 260px;
    margin: 8px 0 0;
    overflow: auto;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
    font-size: .78rem;
    white-space: pre-wrap;
}

.admin-mp-raw summary {
    cursor: pointer;
    color: var(--primary-strong);
    font-weight: 900;
}

.admin-mp-raw pre {
    max-height: 420px;
    margin: 10px 0 0;
    overflow: auto;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    font-size: .82rem;
    white-space: pre-wrap;
}

.push-status,
.device-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    color: var(--muted);
    font-weight: 800;
    font-size: .84rem;
}

.notification-monitor-panel {
    display: grid;
    gap: 18px;
    margin-bottom: 22px;
}

.notification-monitor-summary {
    grid-template-columns: repeat(6, minmax(110px, 1fr));
}

.notification-monitor-section {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    overflow: hidden;
}

.notification-monitor-section > summary {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 17px;
    cursor: pointer;
    background: var(--surface-soft);
}

.notification-monitor-section > .table-wrap {
    margin: 0;
    border-radius: 0;
}

.monitor-status {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--line) 55%, transparent);
    color: var(--text);
    font-size: .78rem;
    font-weight: 900;
    white-space: nowrap;
}

.monitor-status-scheduled,
.monitor-status-accepted,
.monitor-status-delivered,
.monitor-status-clicked {
    background: color-mix(in srgb, var(--primary) 16%, transparent);
    color: var(--primary-strong);
}

.monitor-status-queued,
.monitor-status-pending,
.monitor-status-processing,
.monitor-status-partial {
    background: color-mix(in srgb, var(--warning) 17%, transparent);
    color: var(--warning);
}

.monitor-status-blocked,
.monitor-status-failed,
.monitor-status-expired {
    background: color-mix(in srgb, var(--danger) 15%, transparent);
    color: var(--danger);
}

.notification-device-details {
    min-width: 185px;
}

.notification-device-details > summary {
    cursor: pointer;
    color: var(--primary-strong);
    font-weight: 900;
    white-space: nowrap;
}

.notification-device-list {
    display: grid;
    gap: 10px;
    width: min(620px, 78vw);
    margin-top: 10px;
}

.notification-device-item {
    display: grid;
    gap: 9px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-soft);
}

.notification-device-item > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.notification-device-item dl {
    display: grid;
    grid-template-columns: repeat(4, minmax(95px, 1fr));
    gap: 8px;
    margin: 0;
}

.notification-device-item dl > div {
    display: grid;
    gap: 2px;
}

.notification-device-item dt {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 800;
}

.notification-device-item dd {
    margin: 0;
    font-size: .78rem;
}

@media (max-width: 900px) {
    .notification-monitor-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .notification-monitor-section > summary {
        display: grid;
    }

    .notification-device-item dl {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.push-status > span {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--line);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--line) 38%, transparent);
}

.push-status-on {
    color: var(--primary-strong);
}

.push-status-on > span {
    background: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent);
}

.device-icon {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    color: var(--primary-strong);
}

.device-icon-desktop::before {
    content: "";
    position: absolute;
    inset: 3px 2px 7px;
    border: 2px solid currentColor;
    border-radius: 3px;
}

.device-icon-desktop::after {
    content: "";
    position: absolute;
    left: 6px;
    right: 6px;
    bottom: 3px;
    height: 2px;
    background: currentColor;
    box-shadow: 3px -2px 0 -1px currentColor, -3px -2px 0 -1px currentColor;
}

.device-icon-smartphone::before,
.device-icon-tablet::before {
    content: "";
    position: absolute;
    border: 2px solid currentColor;
    border-radius: 5px;
}

.device-icon-smartphone::before {
    inset: 2px 6px;
}

.device-icon-tablet::before {
    inset: 2px 4px;
}

.device-icon-smartphone::after,
.device-icon-tablet::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 4px;
    width: 4px;
    height: 2px;
    border-radius: 99px;
    background: currentColor;
    transform: translateX(-50%);
}

.device-icon-unknown::before {
    content: "?";
    position: absolute;
    inset: 1px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 900;
}

.panel-heading.spread {
    justify-content: space-between;
}

.admin-settings-layout {
    display: grid;
    gap: 18px;
}

.admin-price-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 14px;
    border: 1px solid rgba(36, 124, 107, .22);
    border-radius: 8px;
    background: rgba(36, 124, 107, .08);
}

.admin-price-summary div {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.admin-price-summary span {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.admin-price-summary strong {
    color: var(--primary-strong);
    font-size: 1.35rem;
}

.admin-price-summary small {
    color: var(--muted);
    font-weight: 800;
}

.admin-pricing-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.admin-pricing-card {
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

.admin-pricing-card h3,
.admin-pricing-card p {
    margin: 0;
}

.admin-pricing-card .check-row {
    align-self: start;
    white-space: nowrap;
}

.admin-pricing-final {
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(36, 124, 107, .22);
    border-radius: 8px;
    background: rgba(36, 124, 107, .08);
}

.admin-pricing-final span {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.admin-pricing-final strong {
    color: var(--primary-strong);
    font-size: 1.28rem;
    line-height: 1.15;
}

.admin-pricing-final small {
    color: var(--muted);
    font-weight: 800;
}

.admin-provider-section {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

.admin-provider-section h3,
.admin-provider-section p {
    margin: 0;
}

.admin-provider-cycle-checks {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-provider-cycle-checks .check-row {
    white-space: nowrap;
}

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

.admin-animation-preview-card {
    box-shadow: none;
}

.admin-animation-preview-card .timeline-content h2 {
    font-size: 1.2rem;
}

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

    .admin-profile-timeline {
        grid-template-columns: repeat(8, minmax(132px, 1fr));
    }

    .admin-log-action-grid {
        grid-template-columns: 1fr;
    }

    .admin-push-resend-list li {
        grid-template-columns: 1fr;
    }

    .admin-animation-preview-grid {
        grid-template-columns: 1fr;
    }
}

.template-form {
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

#toast-region {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 80;
    display: grid;
    gap: 10px;
}

.page-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(247, 245, 239, .66);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.page-loading-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.page-loading-card {
    min-width: min(260px, calc(100vw - 48px));
    display: grid;
    justify-items: center;
    gap: 14px;
    padding: 24px 26px;
    border: 1px solid rgba(36, 124, 107, .26);
    border-radius: 8px;
    background: rgba(255, 255, 255, .92);
    color: var(--primary-strong);
    box-shadow: 0 22px 58px rgba(30, 45, 42, .22);
}

.page-loading-pill {
    position: relative;
    width: 82px;
    height: 34px;
    border: 3px solid #eaf8f4;
    border-radius: 999px;
    background:
        linear-gradient(90deg, #fff 0 48%, #d7efe9 48% 52%, #2f9f8a 52% 100%);
    box-shadow:
        0 0 0 2px rgba(118, 221, 200, .44),
        0 12px 24px rgba(36, 124, 107, .24);
    animation: page-loading-pill-spin .9s linear infinite;
}

.page-loading-pill::before {
    content: "";
    position: absolute;
    inset: 4px 8px auto;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .68);
}

.page-loading-text {
    color: var(--text);
    font-size: .98rem;
    font-weight: 900;
    text-align: center;
}

@keyframes page-loading-pill-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .page-loading-pill {
        animation-duration: 1.8s;
    }
}

.modal-toast-region {
    position: absolute;
    right: 14px;
    bottom: 14px;
    left: 14px;
    z-index: 8;
    display: grid;
    justify-items: end;
    gap: 10px;
    pointer-events: none;
}

.toast {
    width: min(360px, calc(100vw - 36px));
    padding: 14px 16px;
    border-radius: 8px;
    background: var(--text);
    color: var(--surface);
    box-shadow: var(--shadow);
}

.modal-toast-region .toast {
    width: min(360px, 100%);
    pointer-events: auto;
}

.toast.error {
    background: var(--danger);
    color: white;
}

.toast.warning {
    background: var(--warning);
    color: white;
}

.medicine-action-toast {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    gap: 14px;
    overflow: hidden;
    white-space: nowrap;
    border: 1px solid rgba(36, 124, 107, .22);
    background: rgba(240, 250, 246, .88);
    color: #155c50;
    box-shadow: 0 18px 44px rgba(30, 45, 42, .16);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.medicine-action-toast::before {
    content: "\2713";
    width: 32px;
    height: 32px;
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: #1f9b7f;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .34), 0 8px 18px rgba(31, 155, 127, .25);
}

.medicine-action-toast::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(115deg, transparent 18%, rgba(255, 255, 255, .42) 42%, transparent 66%);
    opacity: 0;
    transform: translateX(120%);
}

.medicine-action-toast.is-shining::after {
    animation: markBadgeShine .68s ease-out forwards;
}

.medicine-action-toast.taken {
    border-color: rgba(36, 124, 107, .34);
    background: linear-gradient(135deg, rgba(234, 252, 245, .9), rgba(36, 124, 107, .2));
    color: #155c50;
}

.medicine-action-toast.skipped {
    border-color: rgba(159, 107, 19, .34);
    background: linear-gradient(135deg, rgba(255, 249, 230, .9), rgba(245, 177, 68, .24));
    color: #7a4d09;
}

.medicine-action-toast.skipped::before {
    content: "\21B7";
    background: #b97817;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .34), 0 8px 18px rgba(185, 120, 23, .24);
}

.medicine-action-toast.pending {
    border-color: rgba(179, 58, 58, .32);
    background: linear-gradient(135deg, rgba(255, 241, 241, .94), rgba(179, 58, 58, .18));
    color: #8b1f1f;
}

.medicine-action-toast.pending::before {
    content: "\00d7";
    background: #b33a3a;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .34), 0 8px 18px rgba(179, 58, 58, .24);
}

.medicine-action-toast-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.medicine-action-toast-stack {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

.medicine-action-toast-dot {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: -10px;
    border: 3px solid rgba(255, 255, 255, .82);
    border-radius: 999px;
    color: white;
    font-size: .9rem;
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .22);
    box-shadow: 0 8px 16px rgba(30, 45, 42, .12);
}

.medicine-action-toast-dot:first-child {
    margin-left: 0;
}

html[data-theme="dark"] .medicine-action-toast.taken {
    border-color: rgba(118, 221, 200, .55);
    background: linear-gradient(135deg, rgba(18, 83, 72, .98), rgba(43, 161, 136, .58));
    color: #eafff8;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 14px 34px rgba(0, 0, 0, .28);
}

html[data-theme="dark"] .medicine-action-toast.skipped {
    border-color: rgba(255, 204, 113, .52);
    background: linear-gradient(135deg, rgba(91, 61, 11, .98), rgba(188, 121, 23, .58));
    color: #fff4d2;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 14px 34px rgba(0, 0, 0, .28);
}

html[data-theme="dark"] .medicine-action-toast.pending {
    border-color: rgba(255, 145, 145, .5);
    background: linear-gradient(135deg, rgba(92, 21, 21, .98), rgba(179, 58, 58, .58));
    color: #ffecec;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 14px 34px rgba(0, 0, 0, .28);
}

html[data-theme="dark"] .medicine-action-toast-dot {
    border-color: rgba(8, 14, 13, .8);
}

html[data-theme="dark"] .page-loading-overlay {
    background: rgba(11, 17, 16, .72);
}

html[data-theme="dark"] .page-loading-card {
    border-color: rgba(118, 221, 200, .42);
    background: rgba(24, 33, 31, .94);
    box-shadow: 0 24px 62px rgba(0, 0, 0, .45);
}

html[data-theme="dark"] .page-loading-pill {
    border-color: #dff7f0;
    box-shadow:
        0 0 0 2px rgba(118, 221, 200, .62),
        0 0 22px rgba(118, 221, 200, .36),
        0 14px 28px rgba(0, 0, 0, .34);
}

html[data-theme="dark"] .page-loading-text {
    color: var(--text);
}

@media (prefers-color-scheme: dark) {
    html[data-theme="system"] .medicine-action-toast.taken {
        border-color: rgba(118, 221, 200, .55);
        background: linear-gradient(135deg, rgba(18, 83, 72, .98), rgba(43, 161, 136, .58));
        color: #eafff8;
        text-shadow: 0 1px 1px rgba(0, 0, 0, .28);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 14px 34px rgba(0, 0, 0, .28);
    }

    html[data-theme="system"] .medicine-action-toast.skipped {
        border-color: rgba(255, 204, 113, .52);
        background: linear-gradient(135deg, rgba(91, 61, 11, .98), rgba(188, 121, 23, .58));
        color: #fff4d2;
        text-shadow: 0 1px 1px rgba(0, 0, 0, .3);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 14px 34px rgba(0, 0, 0, .28);
    }

    html[data-theme="system"] .medicine-action-toast.pending {
        border-color: rgba(255, 145, 145, .5);
        background: linear-gradient(135deg, rgba(92, 21, 21, .98), rgba(179, 58, 58, .58));
        color: #ffecec;
        text-shadow: 0 1px 1px rgba(0, 0, 0, .3);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 14px 34px rgba(0, 0, 0, .28);
    }

    html[data-theme="system"] .medicine-action-toast-dot {
        border-color: rgba(8, 14, 13, .8);
    }

    html[data-theme="system"] .page-loading-overlay {
        background: rgba(11, 17, 16, .72);
    }

    html[data-theme="system"] .page-loading-card {
        border-color: rgba(118, 221, 200, .42);
        background: rgba(24, 33, 31, .94);
        box-shadow: 0 24px 62px rgba(0, 0, 0, .45);
    }

    html[data-theme="system"] .page-loading-pill {
        border-color: #dff7f0;
        box-shadow:
            0 0 0 2px rgba(118, 221, 200, .62),
            0 0 22px rgba(118, 221, 200, .36),
            0 14px 28px rgba(0, 0, 0, .34);
    }

    html[data-theme="system"] .page-loading-text {
        color: var(--text);
    }
}

.pwa-install-banner {
    position: fixed;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    left: 10px;
    z-index: 78;
    display: none;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(126, 90, 10, .36);
    border-radius: 12px;
    background: rgba(255, 243, 190, .96);
    color: #26342f;
    box-shadow: 0 18px 44px rgba(92, 70, 22, .12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.pwa-install-summary {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 0 34px 0 0;
    border: 0;
    background: transparent;
    color: #26342f;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.pwa-install-summary span {
    min-width: 0;
    font-size: .9rem;
    font-weight: 900;
    line-height: 1.3;
}

.pwa-install-summary strong {
    color: #087d6b;
    font-size: .82rem;
    white-space: nowrap;
}

.pwa-install-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(8, 125, 107, .34);
    border-radius: 50%;
    background: #0f5f53;
    color: #fff;
    cursor: pointer;
    font-weight: 900;
}

.pwa-install-details {
    display: grid;
    gap: 8px;
    padding: 2px 2px 0;
}

.pwa-install-details[hidden] {
    display: none;
}

.pwa-install-details h2 {
    margin: 0;
    color: #087d6b;
    font-size: 1.02rem;
}

.pwa-install-details p,
.pwa-install-details ol {
    margin: 0;
    color: #34443f;
}

.pwa-install-details ol {
    display: grid;
    gap: 5px;
    padding-left: 20px;
    font-size: .88rem;
    line-height: 1.4;
}

.pwa-install-details .small-note {
    color: #34443f;
}

.pwa-install-native {
    width: 100%;
    margin-top: 2px;
}

.pwa-install-native[hidden] {
    display: none !important;
}

body.has-pwa-install-banner {
    padding-bottom: 92px;
}

body.has-pwa-install-banner.pwa-install-banner-expanded {
    padding-bottom: 260px;
}

@media (max-width: 760px) and (pointer: coarse) {
    .pwa-install-banner {
        display: grid;
    }
}

.confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(7, 15, 13, .62);
}

.confirm-box {
    position: relative;
    width: min(420px, 100%);
    padding: 22px;
    border-radius: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .35);
}

.confirm-box h2 {
    margin: 0 0 8px;
}

.confirm-box p {
    color: var(--muted);
}

.quiet-link {
    color: var(--muted);
}

.pricing-hero,
.legal-content,
.info-list,
.checkout-panel {
    max-width: 980px;
}

.pricing-hero {
    padding: 22px 0 10px;
}

.pricing-hero h2 {
    margin: 0 0 8px;
    font-size: clamp(1.8rem, 3vw, 3rem);
}

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

.pricing-grid-two {
    grid-template-columns: minmax(260px, .9fr) minmax(320px, 1.35fr);
}

.plan-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: linear-gradient(145deg, #fff 0%, #f1f3f2 100%);
    box-shadow: var(--shadow);
}

.plan-card.pro {
    border-top: 5px solid #9b3154;
    background: linear-gradient(145deg, #f1f3f2 0%, rgba(155, 49, 84, .2) 100%);
}

.plan-card.current {
    outline: 2px solid rgba(36, 124, 107, .35);
}

.current-badge,
.plan-badge {
    align-self: flex-start;
    border-radius: 8px;
    padding: 6px 10px;
    background: var(--surface-soft);
    color: var(--primary-strong);
    font-size: .78rem;
    font-weight: 900;
}

.plan-card > .current-badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    box-shadow: 0 8px 18px rgba(30, 45, 42, .12);
}

.plan-badge {
    background: var(--accent);
    color: #fff;
}

.plan-card h2 {
    margin: 0;
}

.pro-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: auto;
}

.pro-options-single {
    grid-template-columns: minmax(0, 1fr);
}

.pro-option {
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    gap: 10px;
    align-content: start;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

.pro-option .primary-button,
.pro-option .secondary-button {
    align-self: end;
}

.pro-option .plan-price {
    font-size: 1.55rem;
}

.payment-provider-actions {
    display: grid;
    gap: 8px;
}

.checkout-provider-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0 10px;
}

.checkout-provider-card {
    display: grid;
    grid-template-rows: 68px auto;
    gap: 14px;
    align-items: center;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.checkout-provider-card-link {
    color: inherit;
    text-decoration: none;
}

.checkout-provider-card button,
.checkout-provider-card .primary-button {
    width: 100%;
    min-height: 48px;
}

.billing-provider-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 64px;
    justify-self: center;
}

.billing-provider-logo-img {
    display: block;
    width: auto;
    max-width: min(100%, 230px);
    max-height: 58px;
    object-fit: contain;
}

.billing-provider-logo-img-asaas {
    max-width: 172px;
    max-height: 34px;
}

.checkout-provider-summary {
    display: grid;
    grid-template-columns: 1fr 36px;
    grid-template-rows: 58px auto;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    min-width: 220px;
    margin: 0 0 6px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
    overflow: hidden;
}

.checkout-panel h2 + .checkout-provider-summary {
    margin-top: -4px;
}

.checkout-provider-summary img {
    grid-column: 1;
    grid-row: 1;
    justify-self: center;
    width: auto;
    max-width: 108px;
    max-height: 28px;
    object-fit: contain;
}

.checkout-provider-info-button {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    width: 30px;
    height: 30px;
    border-color: rgba(36, 124, 107, .24);
    color: var(--primary-strong);
    font-family: Georgia, serif;
    font-style: italic;
}

.checkout-provider-caption {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    padding: 6px 10px;
    border-top: 1px solid rgba(36, 124, 107, .18);
    background: rgba(255, 255, 255, .34);
    color: var(--muted);
    font-size: .72rem;
    font-weight: 900;
    line-height: 1.15;
    text-align: center;
    text-transform: uppercase;
}

.checkout-provider-info-card {
    width: min(430px, 100%);
}

.checkout-provider-info-card .app-modal-body p {
    margin: 0;
    line-height: 1.6;
}

.checkout-coupon-box {
    display: grid;
    gap: 8px;
    margin-top: -2px;
}

.checkout-coupon-form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto;
    align-items: end;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

.checkout-coupon-form label {
    margin: 0;
}

.checkout-coupon-applied {
    display: inline-grid;
    align-items: center;
    width: fit-content;
    max-width: 100%;
}

.checkout-coupon-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 44px;
    padding: 11px 38px 11px 16px;
    border-radius: 8px 8px 0 0;
    background: linear-gradient(135deg, #9b3154, #247c6b);
    color: #fff;
    font-weight: 900;
}

.checkout-coupon-badge span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.checkout-coupon-badge a {
    position: absolute;
    top: 5px;
    right: 6px;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
    color: #fff;
    text-decoration: none;
    line-height: 1;
}

.checkout-coupon-caption {
    display: block;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 8px 8px;
    background: rgba(102, 115, 111, .14);
    color: var(--muted);
    font-size: .72rem;
    font-weight: 900;
    line-height: 1.15;
    text-align: center;
    text-transform: uppercase;
}

.coupon-error-band {
    border-color: rgba(179, 58, 58, .28);
    background: rgba(179, 58, 58, .1);
    color: var(--danger);
    font-weight: 900;
}

.checkout-price-summary {
    position: relative;
    display: grid;
    gap: 10px;
    margin: -2px 0 8px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.checkout-price-summary.has-coupon-badge {
    margin-top: 42px;
    padding-top: 46px;
    overflow: visible;
}

.checkout-price-summary > .checkout-coupon-applied {
    position: absolute;
    top: 0;
    left: 50%;
    z-index: 1;
    transform: translate(-50%, -44px);
}

.checkout-price-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    color: var(--muted);
}

.checkout-price-row strong {
    color: var(--text);
    white-space: nowrap;
}

.checkout-price-row.discount strong {
    color: var(--primary-strong);
}

.checkout-price-row.renewal {
    padding-top: 2px;
    font-size: .92rem;
}

.checkout-price-row.renewal strong {
    color: var(--muted);
}

.checkout-price-row.total {
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
    color: var(--text);
    font-weight: 900;
}

.checkout-price-row.total strong {
    color: var(--primary-strong);
    font-size: 1.28rem;
}

.checkout-panel .stack-form {
    gap: 18px;
}

.checkout-asaas-fields {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(240px, 1.6fr) minmax(108px, .65fr) minmax(150px, .9fr);
    gap: 12px;
    margin: 6px 0 2px;
    padding: 14px;
    border: 1px solid rgba(159, 107, 19, .24);
    border-radius: 8px;
    background: rgba(159, 107, 19, .08);
    font-size: .9rem;
}

.checkout-asaas-fields label,
.checkout-asaas-fields .grid-2 {
    margin: 0;
}

.checkout-asaas-fields > .checkout-asaas-disclaimer {
    grid-column: 1 / -1;
}

.checkout-asaas-fields > label:nth-of-type(1) {
    grid-column: 1;
    grid-row: 2;
}

.checkout-asaas-fields > label:nth-of-type(2) {
    grid-column: 2;
    grid-row: 2;
}

.checkout-asaas-fields > .grid-2 {
    display: contents;
}

.checkout-asaas-fields > .grid-2:first-of-type > label:first-child {
    grid-column: 3;
    grid-row: 2;
}

.checkout-asaas-fields > .grid-2:first-of-type > label:last-child {
    grid-column: 2;
    grid-row: 3;
}

.checkout-asaas-fields > label:nth-of-type(3) {
    grid-column: 1;
    grid-row: 3;
}

.checkout-asaas-fields > label:nth-of-type(4) {
    grid-column: 3;
    grid-row: 3;
}

.checkout-asaas-fields > .grid-2:last-of-type > label:first-child {
    grid-column: 1;
    grid-row: 4;
}

.checkout-asaas-fields > .grid-2:last-of-type > label:last-child {
    grid-column: 2 / -1;
    grid-row: 4;
}

.checkout-asaas-disclaimer {
    margin: 0;
    display: grid;
    gap: 5px;
    padding: 11px 12px;
    border: 1px solid rgba(159, 107, 19, .2);
    border-radius: 8px;
    background: rgba(255, 244, 203, .72);
    color: var(--muted);
    font-size: .84rem;
    line-height: 1.45;
}

.checkout-asaas-disclaimer strong {
    color: var(--warning);
    font-size: .9rem;
}

.checkout-asaas-disclaimer span {
    display: block;
}

html[data-theme="dark"] .checkout-asaas-disclaimer {
    border-color: rgba(229, 177, 82, .42);
    background: rgba(78, 55, 18, .82);
    color: #fff2d2;
}

html[data-theme="dark"] .checkout-asaas-disclaimer strong {
    color: #ffd27a;
}

@media (prefers-color-scheme: dark) {
    html[data-theme="system"] .checkout-asaas-disclaimer {
        border-color: rgba(229, 177, 82, .42);
        background: rgba(78, 55, 18, .82);
        color: #fff2d2;
    }

    html[data-theme="system"] .checkout-asaas-disclaimer strong {
        color: #ffd27a;
    }
}

.plan-price {
    display: grid;
    gap: 4px;
    color: var(--primary-strong);
    font-size: 2rem;
}

.plan-price small {
    color: var(--muted);
    font-size: .9rem;
}

.plan-price small.old-price {
    text-decoration: line-through;
}

.disabled-link {
    opacity: .75;
    pointer-events: none;
}

.feature-list {
    margin: 0 0 8px;
    padding-left: 20px;
    color: var(--text);
    line-height: 1.7;
}

.feature-list li + li {
    margin-top: 8px;
}

html[data-theme="dark"] .plan-card {
    background: linear-gradient(145deg, var(--surface) 0%, #222b29 100%);
}

html[data-theme="dark"] .plan-card.pro {
    background: linear-gradient(145deg, #222b29 0%, rgba(155, 49, 84, .42) 100%);
}

@media (prefers-color-scheme: dark) {
    html[data-theme="system"] .plan-card {
        background: linear-gradient(145deg, var(--surface) 0%, #222b29 100%);
    }

    html[data-theme="system"] .plan-card.pro {
        background: linear-gradient(145deg, #222b29 0%, rgba(155, 49, 84, .42) 100%);
    }
}

.project-unique-points ul,
.legal-content ul,
.info-list ul {
    line-height: 1.7;
}

.info-list {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.info-list article,
.legal-content {
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    overflow-wrap: anywhere;
}

.info-list h2,
.legal-content h2 {
    margin-top: 0;
    color: var(--primary-strong);
}

.function-page {
    display: grid;
    gap: 34px;
}

.function-hero {
    display: grid;
    grid-template-columns: minmax(280px, .72fr) minmax(420px, 1.08fr);
    gap: 26px;
    align-items: center;
}

.function-hero-copy {
    display: grid;
    gap: 14px;
    align-content: center;
}

.function-hero-copy h1 {
    margin: 0;
    max-width: 15ch;
    font-size: clamp(2rem, 3.2vw, 3.35rem);
    line-height: 1.08;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
    text-wrap: balance;
}

.function-hero-copy .public-copy {
    margin: 0;
    max-width: 58ch;
    line-height: 1.72;
}

.function-hero-media,
.function-step-media {
    min-width: 0;
}

.function-screenshot-frame {
    min-width: 0;
    margin: 0;
    border: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.function-screenshot-frame img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: top left;
}

.function-screenshot-placeholder {
    min-height: 280px;
    display: grid;
    place-items: center;
    gap: 8px;
    padding: 24px;
    border-style: dashed;
    background: var(--surface-soft);
    color: var(--muted);
    text-align: center;
}

.function-screenshot-placeholder strong {
    color: var(--primary-strong);
    font-size: 1.2rem;
}

.function-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.function-summary span {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--primary-strong);
    font-size: .92rem;
    font-weight: 900;
}

.function-steps {
    display: grid;
    gap: 30px;
}

.function-step {
    display: grid;
    grid-template-columns: minmax(260px, .68fr) minmax(420px, 1.12fr);
    gap: 28px;
    align-items: center;
    padding-top: 30px;
    border-top: 1px solid var(--line);
}

.function-step:nth-child(even) {
    grid-template-columns: minmax(420px, 1.12fr) minmax(260px, .68fr);
}

.function-step:nth-child(even) .function-step-media {
    order: -1;
}

.function-step-copy {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.function-step-copy h2 {
    margin: 0;
    color: var(--primary-strong);
    font-size: clamp(1.55rem, 2.5vw, 2.55rem);
    line-height: 1.12;
}

.function-step-copy p {
    margin: 0;
    color: var(--text);
    line-height: 1.72;
}

.function-step-copy ul {
    display: grid;
    gap: 8px;
    margin: 2px 0 0;
    padding: 0;
    list-style: none;
}

.function-step-copy li {
    position: relative;
    padding-left: 24px;
    color: var(--muted);
    line-height: 1.45;
}

.function-step-copy li::before {
    content: "";
    position: absolute;
    top: .55em;
    left: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
}

.function-install-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    align-items: start;
    gap: 22px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

.function-install-copy {
    display: grid;
    gap: 8px;
    max-width: 70ch;
}

.function-install-guides {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.function-install-guides figure {
    min-width: 0;
    margin: 0;
    border: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.function-install-guides img {
    display: block;
    width: 100%;
    height: auto;
}

.function-install-panel .primary-button {
    justify-self: end;
    align-self: center;
    white-space: nowrap;
}

.function-install-panel h2,
.function-install-panel p {
    margin: 0;
}

.function-install-panel h2 {
    color: var(--primary-strong);
}

.function-install-panel p:not(.eyebrow) {
    line-height: 1.65;
}

.last-update {
    color: var(--muted);
    font-size: .9rem;
}

.checkout-panel {
    margin: 0 auto 18px;
    display: grid;
    gap: 10px;
}

.checkout-panel > h2 {
    margin-bottom: 0;
}

.qr-image {
    display: block;
    width: min(260px, 100%);
    margin: 18px auto;
    border-radius: 8px;
    border: 1px solid var(--line);
}

.pix-code {
    word-break: break-all;
    user-select: all;
    padding: 14px;
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--text);
    font-family: Consolas, Monaco, monospace;
    font-size: .9rem;
    margin-bottom: 12px;
}

.payment-waiting {
    display: grid;
    justify-items: center;
    gap: 8px;
    margin-top: 22px;
    color: var(--muted);
}

.loader {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 4px solid var(--line);
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.receipt-page {
    display: grid;
    justify-items: center;
    padding: 32px 18px;
    background: #f8fafc;
    color: #1e293b;
    font-family: Arial, sans-serif;
}

.receipt-card {
    width: min(620px, 100%);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 20px 44px rgba(15, 23, 42, .08);
}

.receipt-header,
.receipt-amount,
.receipt-details,
.receipt-footer {
    padding: 28px;
}

.receipt-header {
    text-align: center;
    border-bottom: 1px dashed #cbd5e1;
}

.receipt-header img {
    width: 150px;
}

.receipt-amount {
    display: grid;
    justify-items: center;
    gap: 8px;
    background: #f8fafc;
}

.receipt-amount strong {
    font-size: 2.4rem;
    color: #155c50;
}

.receipt-amount em {
    padding: 6px 12px;
    border-radius: 8px;
    background: #dcfce7;
    color: #15803d;
    font-style: normal;
    font-weight: 900;
}

.receipt-details dl {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 12px;
}

.receipt-details dt {
    color: #64748b;
}

.receipt-details dd {
    margin: 0;
    font-weight: 700;
    text-align: right;
    overflow-wrap: anywhere;
}

.receipt-footer {
    border-top: 1px solid #e2e8f0;
    color: #64748b;
    text-align: center;
    font-size: .88rem;
}

.receipt-actions {
    width: min(620px, 100%);
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

@media print {
    .receipt-actions {
        display: none;
    }

    .receipt-page {
        padding: 0;
        background: #fff;
    }

    .receipt-card {
        box-shadow: none;
        border: 0;
    }
}

@media (max-width: 980px) {
    .sidebar {
        top: 76px;
        bottom: 0;
        height: auto;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform .2s ease;
        z-index: 32;
    }

    body.menu-open .sidebar {
        transform: translateX(0);
        z-index: 45;
    }

    .sidebar .brand {
        display: none;
    }

    .sidebar .nav {
        margin-top: 0;
    }

    .topbar-actor-chip {
        display: none;
    }

    .sidebar-actor-chip {
        display: grid;
        width: 100%;
    }

    .app-shell {
        margin-left: 0;
        padding: 92px 18px 18px;
    }

    .menu-button {
        display: inline-flex;
        width: 48px;
        height: 48px;
        align-items: center;
        justify-content: center;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: var(--surface);
        color: var(--text);
        font-size: 1.4rem;
    }

    .mobile-app-header {
        position: fixed;
        inset: 0 0 auto 0;
        z-index: 42;
        display: grid;
        grid-template-columns: 52px minmax(0, 1fr) 52px;
        align-items: center;
        gap: 8px;
        padding: 10px 14px;
        background: color-mix(in srgb, var(--bg) 92%, transparent);
        border-bottom: 1px solid var(--line);
        backdrop-filter: blur(12px);
    }

    .mobile-app-header .menu-button {
        grid-column: 1;
    }

    .mobile-brand-tab {
        grid-column: 2;
        justify-self: center;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        min-width: 0;
        padding: 8px 16px;
        text-decoration: none;
    }

    .mobile-brand-tab img {
        width: 70px;
        height: auto;
        filter: drop-shadow(0 4px 10px rgba(255, 255, 255, .65));
    }

    .mobile-brand-tab span {
        color: var(--primary-strong);
        font-size: 2rem;
        font-weight: 900;
    }

    .status-grid,
    .list-grid,
    .split-layout,
    .pricing-grid,
    .landing-hero,
    .landing-intent {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .landing-hero {
        min-height: auto;
        grid-template-columns: 1fr;
        margin-top: 34px;
        padding-top: 74px;
    }

    .landing-intent {
        width: auto;
        margin-left: -18px;
        margin-right: -18px;
        padding-right: 0;
        padding-left: 0;
    }

    .landing-intent > div,
    .landing-intent > p {
        padding-right: clamp(34px, 8vw, 72px);
        padding-left: clamp(34px, 8vw, 72px);
    }

    .landing-how-inner {
        grid-template-columns: 1fr;
    }

    .landing-how-copy h2 {
        max-width: 16ch;
    }

    .landing-showcase {
        display: grid;
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .landing-copy,
    .landing-login,
    .landing-illustration {
        grid-column: 1;
    }

    .landing-illustration {
        grid-row: auto;
        justify-self: center;
        width: min(100%, 560px);
        transform: none;
    }

    .function-hero,
    .function-step,
    .function-step:nth-child(even) {
        grid-template-columns: 1fr;
    }

    .function-step:nth-child(even) .function-step-media {
        order: 0;
    }

    .function-install-panel {
        grid-template-columns: 1fr;
    }

    .function-install-panel .primary-button {
        justify-self: start;
    }

    .landing-login {
        width: min(100%, 460px);
        justify-self: center;
    }

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

    .today-status-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .metric-grid {
        grid-template-columns: repeat(6, minmax(92px, 1fr));
    }

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

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

    .inventory-summary-grid,
    .inventory-guide,
    .inventory-list,
    .inventory-grid {
        grid-template-columns: 1fr;
    }

    .inventory-guide-steps {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .topbar,
    .toolbar-band,
    .welcome-coupon-band,
    .timeline-item {
        align-items: stretch;
    }

    .topbar,
    .toolbar-band,
    .welcome-coupon-band,
    .timeline-item {
        flex-direction: column;
    }

    .topbar {
        display: flex;
        align-items: stretch;
        gap: 12px;
    }

    .topbar-title-row {
        align-items: center;
        justify-content: center;
        gap: 8px;
        flex-wrap: nowrap;
        width: 100%;
    }

    .topbar-date-form {
        flex: 0 0 auto;
        justify-content: center;
    }

    .actor-chip {
        width: 100%;
    }

    .onboarding-overlay {
        align-items: start;
        padding: 10px;
        overflow-y: auto;
    }

    .onboarding-panel {
        max-height: 92vh;
    }

    .onboarding-head,
    .onboarding-actions {
        padding: 12px;
    }

    .onboarding-actions {
        display: grid;
        justify-items: stretch;
    }

    .onboarding-actions .button-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .onboarding-actions .primary-button,
    .onboarding-actions .secondary-button,
    .onboarding-actions .quiet-button {
        width: 100%;
    }

    .guided-wizard-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
    }

    .guided-wizard-actions .button-row {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .guided-wizard-final-note {
        grid-column: 1 / -1;
        font-size: .78rem;
    }

    .today-date-form {
        display: grid;
        grid-template-columns: 30px 112px 30px;
        column-gap: 6px;
        align-items: center;
        width: max-content;
        max-width: 100%;
    }

    .today-date-form label {
        min-width: 0;
    }

    .today-date-form input[type="date"] {
        width: 112px;
        min-height: 30px;
        padding: 4px 5px;
        font-size: .76rem;
    }

    .today-date-form .today-date-arrow {
        width: 30px;
        height: 30px;
        min-height: 30px;
        font-size: .9rem;
        justify-self: center;
    }

    .list-grid,
    .split-layout,
    .pricing-grid,
    .landing-hero,
    .landing-intent,
    .grid-2,
    .grid-3,
    .grid-4,
    .admin-price-summary,
    .admin-pricing-card-grid,
    .checkout-provider-grid {
        grid-template-columns: 1fr;
    }

    .profile-photo-field {
        align-items: flex-start;
    }

    .custom-file-control {
        grid-template-columns: 1fr;
    }

    .landing-hero,
    .landing-section {
        width: calc(100% - 16px);
        max-width: 1180px;
    }

    .landing-intent {
        width: auto;
        margin-left: -8px;
        margin-right: -8px;
        gap: 14px;
        padding: 28px 0;
        margin-top: 12px;
        margin-bottom: 12px;
    }

    .landing-intent > div,
    .landing-intent > p {
        padding-right: 38px;
        padding-left: 38px;
    }

    .landing-intent h2 {
        max-width: 100%;
        font-size: 1.45rem;
    }

    .landing-hero {
        gap: 18px;
        margin-top: 30px;
        padding: 66px 0 24px;
    }

    .landing-copy-brand {
        min-height: 56px;
        padding: 8px 16px 8px 12px;
        font-size: 1.55rem;
    }

    .landing-copy-brand img {
        width: 58px;
    }

    .landing-showcase {
        display: grid;
        grid-template-columns: 1fr;
        gap: 14px;
        min-width: 0;
        max-width: 100%;
    }

    .landing-copy {
        grid-column: 1;
        gap: 12px;
        min-width: 0;
        max-width: 100%;
    }

    .landing-copy h1 {
        max-width: 100%;
        font-size: 29px;
        overflow-wrap: anywhere;
    }

    .landing-copy h1 span {
        display: block;
    }

    .landing-copy p:not(.eyebrow) {
        max-width: 100%;
        font-size: .95rem;
        line-height: 1.6;
        overflow-wrap: anywhere;
    }

    .landing-benefits {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .landing-benefit-card {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        min-height: 60px;
        grid-template-columns: 54px minmax(0, 1fr);
        align-items: center;
        align-content: center;
        padding: 6px 10px;
    }

    .landing-benefit-card strong {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .landing-hero-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, .72fr);
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .landing-hero-actions .primary-button,
    .landing-hero-actions .secondary-button {
        width: 100%;
        min-width: 0;
        padding-right: 12px;
        padding-left: 12px;
        white-space: normal;
    }

    .landing-illustration {
        grid-column: 1;
        grid-row: auto;
        width: min(100%, 360px);
        transform: none;
    }

    .landing-illustration img {
        width: 100%;
        height: auto;
        transform: none;
    }

    .landing-login {
        grid-column: 1;
        padding: 16px;
    }

    .landing-section {
        padding: 26px 0;
    }

    .landing-feature-grid {
        grid-template-columns: 1fr;
    }

    .landing-feature-item {
        min-height: 78px;
        padding: 12px;
    }

    .landing-how-strip {
        margin-top: 0;
        padding: 28px 18px;
    }

    .landing-how-copy h2 {
        max-width: 100%;
        font-size: 1.8rem;
    }

    .landing-how-copy p:not(.eyebrow) {
        max-width: 100%;
        font-size: .96rem;
    }

    .landing-how-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .landing-how-actions .primary-button {
        width: 100%;
    }

    .landing-how-carousel {
        min-height: 270px;
    }

    .landing-how-slide figcaption,
    .landing-how-placeholder {
        min-height: 40px;
        padding: 9px 10px;
        font-size: .9rem;
    }

    .function-page {
        gap: 24px;
    }

    .function-hero {
        gap: 18px;
    }

    .function-hero-copy h1 {
        font-size: 2.05rem;
    }

    .function-install-panel .primary-button {
        width: 100%;
    }

    .function-install-guides {
        grid-template-columns: 1fr;
    }

    .function-summary {
        gap: 8px;
        padding: 10px;
    }

    .function-summary span {
        flex: 1 1 150px;
        justify-content: center;
        min-height: 34px;
        padding: 7px 10px;
        font-size: .82rem;
        text-align: center;
    }

    .function-step {
        gap: 16px;
        padding-top: 22px;
    }

    .function-step-copy h2 {
        font-size: 1.55rem;
    }

    .function-install-panel {
        padding: 16px;
    }

    .routine-date-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .routine-date-grid input {
        padding: 10px 8px;
        min-height: 42px;
        font-size: .86rem;
    }

    .today-status-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 6px;
    }

    .today-status-grid.today-status-grid-compact {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
    }

    .today-status-grid-compact .mini-status {
        min-height: 64px;
    }

    .today-status-grid-compact .mini-status strong {
        min-height: 38px;
        padding: 6px 4px 4px;
        font-size: 1.45rem;
    }

    .today-status-grid-compact .mini-status span {
        min-height: 26px;
        padding: 4px 3px;
        font-size: .66rem;
        line-height: 1.1;
        overflow-wrap: anywhere;
    }

    .today-completion-band {
        padding: 10px;
    }

    .metric-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .ai-feature-bar {
        padding: 9px;
    }

    .ai-feature-actions {
        display: grid;
        grid-template-columns: auto auto minmax(0, 1fr) auto auto;
        align-items: center;
        gap: 4px;
    }

    .ai-badge,
    .ai-action-badge,
    .ai-icon-button {
        min-height: 32px;
        height: 32px;
        border-radius: 7px;
        font-size: .62rem;
    }

    .ai-badge {
        padding: 5px 7px;
    }

    .ai-action-badge {
        flex: initial;
        min-width: 0;
        width: 100%;
        padding: 3px 6px;
        overflow: hidden;
        text-align: center;
        white-space: normal;
        overflow-wrap: anywhere;
        line-height: 1.05;
        font-size: .7rem;
        font-weight: 800;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .ai-icon-button {
        flex: initial;
        width: 32px;
    }

    .ai-feature-note {
        font-size: .76rem;
    }

    .pro-contract-modal-body {
        padding: 18px;
    }

    .pro-contract-feature-grid {
        grid-template-columns: 1fr;
    }

    .pro-contract-actions {
        display: grid;
    }

    .panel-heading.spread {
        align-items: flex-start;
    }

    .export-actions {
        width: 100%;
        margin-top: 8px;
        margin-bottom: 12px;
    }

    .export-actions .secondary-button {
        flex: 1 1 132px;
    }

    .history-calendar-heading {
        display: grid;
        gap: 12px;
    }

    .history-calendar-nav {
        width: 100%;
        justify-content: space-between;
    }

    .history-calendar-nav strong {
        min-width: 0;
        flex: 1;
        font-size: .95rem;
    }

    .history-calendar-grid {
        gap: 4px;
    }

    .history-calendar-weekday {
        font-size: .66rem;
    }

    .history-calendar-blank,
    .history-calendar-day {
        min-height: 64px;
    }

    .history-calendar-day {
        position: relative;
        gap: 4px;
        align-content: start;
        padding: 6px 3px 24px;
        overflow: hidden;
    }

    .history-calendar-day time {
        width: 30px;
        height: 30px;
        font-size: 1.05rem;
    }

    .history-calendar-badge {
        min-height: 22px;
        padding: 4px 6px;
        font-size: .62rem;
        overflow-wrap: normal;
        white-space: nowrap;
    }

    .history-calendar-badge.is-percent {
        position: absolute;
        right: 5px;
        bottom: 4px;
        left: 5px;
        width: calc(100% - 10px);
        min-height: 20px;
        padding: 4px 0;
        border-radius: 6px;
        padding-right: 0;
        padding-left: 0;
        justify-self: center;
        font-size: .6rem;
        line-height: 1;
    }

    .metrics-history-heading {
        display: grid;
        gap: 10px;
        margin-bottom: 12px;
    }

    .metric-grid + .split-layout,
    .metric-grid + .split-layout .panel,
    .metric-grid + .split-layout label {
        min-width: 0;
    }

    .metric-grid + .split-layout input,
    .metric-grid + .split-layout select,
    .metric-grid + .split-layout textarea {
        max-width: 100%;
        min-width: 0;
        font-size: 16px;
    }

    .metric-grid + .split-layout input[type="datetime-local"] {
        padding-left: 8px;
        padding-right: 8px;
    }

    .profile-actions-column {
        gap: 8px;
    }

    .compact-datetime-field {
        max-width: 220px;
    }

    .compact-datetime-field input[type="datetime-local"] {
        min-height: 40px;
        padding: 9px 8px;
        font-size: .9rem;
    }

    .agenda-form .grid-2 {
        gap: 8px;
    }

    .agenda-layout .panel,
    .agenda-form label,
    .agenda-form .compact-datetime-field {
        max-width: 100%;
    }

    .agenda-form input,
    .agenda-form select,
    .agenda-form textarea {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        padding: 10px 9px;
        min-height: 42px;
        font-size: .92rem;
    }

    .pro-options {
        grid-template-columns: 1fr;
    }

    .ai-modal-overlay {
        padding: 12px;
    }

    .app-modal-overlay {
        padding: 12px;
    }

    .billing-receipt-grid,
    .billing-receipt-grid.compact,
    .admin-mp-summary {
        grid-template-columns: 1fr;
    }

    .app-modal {
        max-height: 90vh;
    }

    .ai-modal {
        max-height: 88vh;
    }

    .mini-status,
    .metric-card {
        padding: 8px;
        min-height: 70px;
    }

    .mini-status strong,
    .metric-card strong {
        font-size: 1.55rem;
    }

    .metric-card .eyebrow,
    .mini-status .eyebrow {
        font-size: .7rem;
    }

    .metric-card span,
    .mini-status span {
        font-size: .95rem;
    }

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

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

    .medicine-action-card {
        min-height: 98px;
        justify-items: center;
        text-align: center;
        align-items: stretch;
        align-content: center;
        padding: 32px 8px 10px;
        gap: 7px;
    }

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

    .today-action-panel .medicine-action-card {
        min-height: 98px;
        padding: 32px 8px 10px;
        justify-items: center;
        text-align: center;
        gap: 7px;
    }

    .today-action-panel .medicine-action-icon {
        width: 32px;
        height: 26px;
        font-size: .82rem;
    }

    .today-action-panel .medicine-action-card strong {
        font-size: .85rem;
        line-height: 1.25;
    }

    .medicine-action-card strong {
        font-size: .82rem;
        line-height: 1.25;
    }

    .medicine-action-card strong,
    .medicine-action-card small {
        max-width: 100%;
    }

    .timeline-item {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 10px 12px 0;
        overflow: hidden;
    }

    .one-tap-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: stretch;
        gap: 0;
        margin: 2px -12px 0;
        border-top: 1px solid var(--line);
    }

    .timeline-item.is-ad-hoc .one-tap-actions {
        grid-template-columns: minmax(0, 1fr) 44px 44px;
        gap: 0;
    }

    .timeline-item.is-ad-hoc {
        padding-top: 18px;
    }

    .timeline-item.is-ad-hoc .ad-hoc-edge-badge {
        top: 4px;
    }

    .timeline-item time {
        font-size: 1.75rem;
    }

    .timeline-content h2 {
        font-size: 1.5rem;
        margin-bottom: 2px;
    }

    .timeline-content p,
    .timeline-content small {
        font-size: .8rem;
    }

    .timeline-item .status-pill {
        max-width: none;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: .74rem;
        padding: 12px;
        border-radius: 0;
        justify-content: center;
    }

    .timeline-item .status-pill[data-mark-badge] {
        position: relative;
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1px;
        font-size: .9rem;
        line-height: 1.05;
        min-height: 48px;
        padding: 8px 10px 8px 50px;
        white-space: normal;
        text-align: center;
    }

    .timeline-item .status-pill[data-mark-badge]::before {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        margin-right: 0;
    }

    .timeline-item .status-pill[data-mark-badge] .mark-badge-label,
    .timeline-item .status-pill[data-mark-badge] .mark-badge-actor {
        display: block;
        max-width: 100%;
    }

    .timeline-item .status-pill[data-mark-badge] .mark-badge-label {
        margin-right: 0;
    }

    .timeline-item .status-pill[data-mark-badge] .mark-badge-actor {
        margin-left: 0;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    .timeline-item .edit-mark-button {
        width: 52px;
        height: 48px;
        border-radius: 0;
        border-left: 1px solid var(--line);
    }

    .timeline-item.is-ad-hoc .edit-mark-button,
    .timeline-item.is-ad-hoc .ad-hoc-clear-button {
        width: 44px;
        height: 48px;
        border-left: 1px solid var(--line);
        border-radius: 0;
    }

    .correction-actions {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0;
    }

    .correction-actions.has-cancel-action {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 48px;
    }

    .mark-button {
        width: 100%;
        min-height: 48px;
        padding: 12px 10px;
        border-radius: 0;
        font-size: .84rem;
    }

    .mark-button + .mark-button {
        border-left: 1px solid rgba(255, 255, 255, .42);
    }

    .cancel-edit-mark-button {
        width: 48px;
        height: 48px;
        min-height: 48px;
        border-radius: 0;
        border-left: 1px solid var(--line);
        font-size: 1.2rem;
    }

    .weekday-row {
        grid-template-columns: repeat(7, minmax(0, 1fr));
        gap: 4px;
        padding: 6px;
    }

    .weekday-row label {
        padding: 5px 1px;
        font-size: .62rem;
        gap: 2px;
    }

    .weekday-row input {
        transform: scale(.74);
    }

    .public-panel {
        padding: 22px;
    }

    .public-shell-content {
        padding: 36px 8px 18px;
    }

    .public-content-entry {
        width: min(100%, 980px);
        padding-top: 104px;
    }

    .public-content-entry .auth-brand-tab {
        position: absolute;
        top: 0;
        left: 50%;
        z-index: 3;
        transform: translate(-50%, -50%);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 9px;
        width: max-content;
        max-width: calc(100% - 24px);
        min-height: 56px;
        margin: 0;
        padding: 8px 16px 8px 12px;
        border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
        border-radius: 999px;
        background: #eef6f3;
        box-shadow: 0 14px 30px rgba(30, 45, 42, .12);
    }

    .public-content-entry .public-logo {
        width: 58px;
    }

    .public-content-entry .public-brand-name {
        color: var(--primary-strong);
        font-size: 1.55rem;
        font-weight: 900;
        line-height: 1;
    }

    .public-back-link {
        top: 82px;
        left: 8px;
        min-height: 36px;
        padding: 8px 11px;
        font-size: .82rem;
    }

    .auth-brand-tab {
        margin-top: -4px;
        padding: 12px 14px 10px;
    }

    .public-logo {
        width: 150px;
    }

    .pro-wall {
        inset: 0;
        display: grid;
        align-content: start;
        gap: 10px;
        padding: 16px;
        min-height: 100%;
        max-height: none;
        overflow: auto;
    }

    .pro-wall h2 {
        font-size: 1.05rem;
        margin-bottom: 4px;
    }

    .pro-wall p {
        margin: 0 0 8px;
        font-size: .82rem;
    }

    .pro-wall .primary-button {
        width: 100%;
        min-height: 40px;
        padding: 10px 12px;
        font-size: .86rem;
    }

    .pro-feature-frame.is-locked {
        min-height: 320px;
    }

    .inventory-adjust-form {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .inventory-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .inventory-card {
        padding: 13px;
    }

    .inventory-card-head {
        display: grid;
    }

    .inventory-stock-display strong {
        font-size: 1.55rem;
    }
}

@media (max-width: 760px) {
    .profile-alert-grid,
    .alert-channel-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .profile-alert-option,
    .alert-channel-option {
        height: 114px;
        gap: 6px;
        padding: 9px 4px;
    }

    .profile-alert-option input,
    .alert-channel-option input {
        width: 16px;
        height: 16px;
    }

    .profile-alert-option img,
    .alert-channel-option img {
        width: 38px;
        height: 38px;
    }

    .profile-alert-option span,
    .alert-channel-option span {
        font-size: .58rem;
        line-height: 1.1;
    }

    .profile-alert-device-hint,
    .alert-channel-device-hint {
        font-size: .68rem;
    }

    .medication-communication-section + .medication-communication-section {
        margin-top: 14px;
        padding-top: 13px;
    }

    .inventory-control-head {
        align-items: flex-start;
        gap: 8px;
    }

    .inventory-control-toggle {
        font-size: .84rem;
    }

    .inventory-control-disclaimer {
        font-size: .68rem;
    }

    .compact-alert-channel-grid .alert-channel-option {
        height: 96px;
        gap: 4px;
        padding: 7px 3px;
    }

    .compact-alert-channel-grid .alert-channel-option img {
        width: 32px;
        height: 32px;
    }

    .compact-alert-channel-grid .alert-channel-option span {
        font-size: .54rem;
    }

    .checkout-coupon-form {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .checkout-coupon-form .secondary-button {
        width: 100%;
    }

    .checkout-price-row {
        display: grid;
        gap: 2px;
    }

    .checkout-asaas-fields {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 14px;
    }

    .checkout-asaas-fields > label:nth-of-type(n),
    .checkout-asaas-fields > .checkout-asaas-disclaimer,
    .checkout-asaas-fields > .grid-2 {
        grid-column: 1 / -1;
        grid-row: auto;
        min-width: 0;
    }

    .checkout-asaas-fields > .grid-2 {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .checkout-asaas-fields > .grid-2:first-of-type > label:first-child,
    .checkout-asaas-fields > .grid-2:first-of-type > label:last-child,
    .checkout-asaas-fields > .grid-2:last-of-type > label:first-child,
    .checkout-asaas-fields > .grid-2:last-of-type > label:last-child {
        grid-column: 1 / -1;
        grid-row: auto;
        min-width: 0;
    }

    .checkout-asaas-fields label {
        min-width: 0;
    }

    .checkout-asaas-fields input {
        width: 100%;
        min-width: 0;
    }

    .checkout-asaas-disclaimer {
        font-size: .82rem;
        line-height: 1.55;
    }

    .checkout-asaas-disclaimer strong {
        font-size: .86rem;
    }

    .public-shell-landing:has(.login-landing-page) {
        background:
            linear-gradient(135deg, rgba(36, 124, 107, .08) 0 5%, transparent 5%),
            linear-gradient(135deg, transparent 0 72%, rgba(36, 124, 107, .08) 72%),
            linear-gradient(180deg, #fffcf4 0%, var(--bg) 100%);
    }

    html[data-theme="dark"] .public-shell-landing:has(.login-landing-page) {
        background:
            linear-gradient(135deg, rgba(57, 182, 158, .10) 0 5%, transparent 5%),
            linear-gradient(135deg, transparent 0 72%, rgba(57, 182, 158, .10) 72%),
            var(--bg);
    }

    @media (prefers-color-scheme: dark) {
        html[data-theme="system"] .public-shell-landing:has(.login-landing-page) {
            background:
                linear-gradient(135deg, rgba(57, 182, 158, .10) 0 5%, transparent 5%),
                linear-gradient(135deg, transparent 0 72%, rgba(57, 182, 158, .10) 72%),
                var(--bg);
        }
    }

    html.is-ios,
    html.is-ios body,
    html.is-ios .public-shell-landing,
    html.is-ios .landing-entry,
    html.is-ios .login-landing-page {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    html.is-ios .landing-hero,
    html.is-ios .landing-section {
        width: calc(100% - 24px);
        max-width: calc(100% - 24px);
        margin-right: auto;
        margin-left: auto;
    }

    html.is-ios .landing-intent {
        width: auto;
        max-width: none;
        margin-right: -12px;
        margin-left: -12px;
    }

    html.is-ios .landing-copy,
    html.is-ios .landing-benefits,
    html.is-ios .landing-benefit-card,
    html.is-ios .landing-hero-actions {
        min-width: 0;
        max-width: 100%;
    }
}
