:root {
    --page: #edf1f1;
    --green: #2f8d76;
    --green-dark: #0e4d43;
    --green-deep: #0d4c42;
    --text: #243142;
    --muted: #6f7c90;
    --muted-soft: #8a97a9;
    --border: #e3e8eb;
    --sub-border: #e4eaee;
    --subtle: #f8fafb;
    --subtle-2: #f7f8fa;
    --white: #ffffff;
    --warning: #b7791f;
    --danger: #b42318;
    --shadow: 0 18px 42px rgba(35, 49, 66, 0.08);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--page);
}

body {
    min-height: 100%;
    margin: 0;
    background: var(--page);
    color: var(--text);
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

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

button {
    cursor: pointer;
}

.hero {
    background: linear-gradient(180deg, #0e4d43 0%, #2f8d76 100%);
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
    color: #fff;
}

.hero__inner {
    width: calc(100% - 40px);
    margin: 0 auto;
    padding: 22px 0 58px;
}

.brand-row,
.hero-copy,
.section-heading,
.lead-main,
.lead-meta,
.lead-actions,
.modal-header {
    display: flex;
}

.brand-row {
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 154px;
    height: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.hero-copy {
    flex-direction: column;
    gap: 8px;
    margin-top: 40px;
}

.eyebrow {
    margin: 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1,
.hero p,
.panel h2,
.lead-row h3 {
    margin: 0;
}

.hero h1 {
    font-size: 26px;
    line-height: 1.12;
    font-weight: 800;
}

.hero-copy > p:last-child {
    max-width: 620px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 15px;
    line-height: 1.55;
}

.app-shell {
    width: calc(100% - 40px);
    margin: -48px auto 104px;
}

.panel {
    background: var(--white);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.label {
    color: var(--muted);
}

.label {
    display: block;
    font-size: 13px;
    font-weight: 700;
}

.panel {
    border-radius: 26px;
    padding: 20px;
}

.leads-panel {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.section-heading {
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.section-heading--stack {
    align-items: flex-end;
}

.section-heading--search {
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 14px;
}

.section-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section-heading h2,
.modal-header h2 {
    margin: 4px 0 0;
    color: var(--text);
    font-size: 20px;
    line-height: 1.2;
}

.hero-action,
.ghost-button,
.primary-button,
.lead-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    border-radius: 999px;
    font-weight: 800;
}

.hero-action {
    border: 1px solid rgba(255, 255, 255, 0.44);
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    padding: 0 16px;
}

.account-menu {
    position: relative;
}

.account-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.44);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    padding: 0 14px;
    font-weight: 800;
}

.account-menu__panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 50;
    width: 270px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    color: var(--text);
    box-shadow: 0 22px 54px rgba(36, 49, 66, 0.18);
    padding: 14px;
}

.account-menu__panel[hidden] {
    display: none;
}

.account-menu__panel strong,
.account-menu__panel small,
.account-menu__panel a,
.account-menu__section-label {
    display: block;
}

.account-menu__panel small {
    margin-top: 3px;
    color: var(--muted);
}

.account-menu__panel hr {
    border: 0;
    border-top: 1px solid var(--sub-border);
    margin: 12px 0;
}

.account-menu__panel a {
    border-radius: 12px;
    color: var(--text);
    padding: 9px 10px;
    font-weight: 800;
    text-decoration: none;
}

.account-menu__panel a:hover {
    background: #f2faf7;
    color: var(--green-deep);
}

.account-menu__section-label {
    margin: 0 0 6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.account-menu__view-link {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.account-menu__view-link.is-active {
    background: #f2faf7;
    color: var(--green-deep);
}

.account-menu__view-link em {
    border-radius: 999px;
    background: var(--green);
    color: #fff;
    padding: 3px 8px;
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
}

.ghost-button {
    border: 1px solid rgba(47, 141, 118, 0.28);
    background: #f2faf7;
    color: var(--green-deep);
    padding: 0 14px;
}

.ghost-button.is-active {
    border-color: var(--green);
    background: var(--green);
    color: #fff;
}

.primary-button {
    width: 100%;
    border: 0;
    background: var(--green-dark);
    color: #fff;
    padding: 0 18px;
}

.primary-button.is-saving,
.primary-button:disabled {
    opacity: 0.62;
    cursor: wait;
}

.icon-button {
    display: inline-grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid var(--sub-border);
    border-radius: 999px;
    background: #fff;
    color: var(--green-deep);
}

.filter-toolbar {
    position: relative;
    z-index: 10;
    display: flex;
    margin: 0;
}

.view-switcher,
.readonly-banner {
    width: 100%;
    border: 1px solid var(--border);
    background: #fff;
    box-shadow: var(--shadow);
}

.view-switcher {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
    border-radius: 22px;
    padding: 14px 16px;
}

.view-switcher__label {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.view-switcher strong {
    display: block;
    margin-top: 3px;
}

.readonly-banner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 12px;
    border-color: rgba(47, 141, 118, 0.25);
    border-radius: 18px;
    background: #f2faf7;
    color: var(--green-deep);
    padding: 12px 14px;
    font-weight: 500;
}

.readonly-banner strong {
    font-weight: 800;
}

.readonly-banner span {
    color: #335f58;
    font-weight: 500;
}

.readonly-banner a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    margin-left: auto;
    border: 1px solid rgba(47, 141, 118, 0.28);
    border-radius: 999px;
    background: #fff;
    color: var(--green-deep);
    padding: 0 12px;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.readonly-banner a:hover {
    background: var(--green);
    color: #fff;
}

.status-chips {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(560px, calc(100vw - 40px));
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 22px 54px rgba(36, 49, 66, 0.14);
    padding: 14px;
}

.status-chips[hidden] {
    display: none;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    border: 1px solid var(--sub-border);
    border-radius: 999px;
    background: var(--subtle);
    color: var(--text);
    padding: 0 14px;
    font-size: 14px;
    font-weight: 800;
}

.status-chip span {
    color: var(--muted);
    font-size: 12px;
}

.status-chip i {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    color: currentColor;
    stroke-width: 2.2;
}

.status-chip-divider {
    flex-basis: 100%;
    height: 1px;
    margin: 2px 0 0;
    background: linear-gradient(90deg, rgba(47, 141, 118, 0.18), rgba(227, 232, 235, 0));
}

.status-chip--contact {
    border-color: rgba(47, 141, 118, 0.2);
    background: #f2faf7;
    color: var(--green-deep);
}

.status-chip--contact span {
    color: #719287;
}

.status-chip.is-active {
    border-color: var(--green);
    background: var(--green);
    color: #fff;
}

.status-chip.is-active span {
    color: rgba(255, 255, 255, 0.84);
}

.workspace-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: start;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 9px;
    width: min(520px, 100%);
    min-height: 44px;
    border: 1px solid var(--sub-border);
    border-radius: 999px;
    background: var(--subtle);
    color: var(--muted);
    padding: 0 14px;
}

.search-box input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 16px;
}

.lead-list {
    display: grid;
    gap: 12px;
}

.lead-row {
    display: grid;
    gap: 14px;
    border: 1px solid var(--sub-border);
    border-radius: 20px;
    background: var(--subtle);
    padding: 16px;
}

.lead-row[hidden] {
    display: none;
}

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

.lead-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 14px;
    border-top: 1px solid var(--sub-border);
    padding-top: 14px;
}

.lead-pagination[hidden] {
    display: none;
}

.lead-pagination p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.lead-pagination__controls,
.lead-pagination__controls > div {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.lead-pagination button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 36px;
    min-height: 36px;
    border: 1px solid rgba(47, 141, 118, 0.22);
    border-radius: 999px;
    background: #fff;
    color: var(--green-deep);
    padding: 0 12px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.lead-pagination button svg {
    width: 16px;
    height: 16px;
}

.lead-pagination button.is-active {
    border-color: var(--green);
    background: var(--green);
    color: #fff;
}

.lead-pagination button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.lead-pagination__gap {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    padding: 0 3px;
}

.lead-empty-state {
    display: grid;
    justify-items: center;
    gap: 10px;
    min-height: 280px;
    border: 1px dashed rgba(47, 141, 118, 0.34);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.55);
    color: var(--text);
    padding: 44px 22px;
    text-align: center;
}

.lead-empty-state[hidden] {
    display: none;
}

.lead-empty-state > svg {
    width: 42px;
    height: 42px;
    color: var(--green-deep);
}

.lead-empty-state h2 {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
}

.lead-empty-state p {
    max-width: 460px;
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.lead-empty-state .primary-button {
    width: auto;
    min-width: 172px;
    margin-top: 6px;
}

.lead-main {
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.lead-row h3 {
    color: var(--text);
    font-size: 17px;
    line-height: 1.25;
}

.lead-note {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.note-summary-line,
.note-detail-line {
    display: block;
}

.note-summary-line + .note-summary-line,
.note-detail-line {
    margin-top: 3px;
}

.note-detail-line strong {
    color: var(--text);
    font-weight: 800;
}

.note-edit-link,
.note-read-more-link {
    margin-left: 8px;
    border: 0;
    background: transparent;
    color: var(--green-deep);
    padding: 0;
    font-size: 14px;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.note-read-more-link {
    margin-left: 4px;
}

.note-edit-link:hover,
.note-read-more-link:hover {
    color: var(--green);
}

.lead-heading {
    min-width: 0;
    width: 100%;
}

.lead-title-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}

.lead-title-row > span,
.lead-title-row > a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.lead-title-row > span::before,
.lead-title-row > a::before {
    content: "·";
    color: var(--muted-soft);
    font-weight: 800;
}

.lead-location {
    color: var(--text);
    font-weight: 800;
}

.lead-location:hover {
    color: var(--green-deep);
}

.lead-location svg {
    width: 15px;
    height: 15px;
    color: var(--green-deep);
}

.medical-badge {
    gap: 6px;
    border: 1px solid rgba(111, 124, 144, 0.18);
    border-radius: 999px;
    background: #fff;
    padding: 4px 9px;
    font-weight: 700;
}

.medical-badge svg {
    width: 14px;
    height: 14px;
}

.medical-badge--yes {
    border-color: rgba(47, 141, 118, 0.28);
    background: #f2faf7;
    color: var(--green-deep);
}

.medical-badge--no {
    border-color: rgba(111, 124, 144, 0.2);
    color: #526071;
}

.medical-badge--unknown {
    border-color: rgba(198, 137, 18, 0.28);
    background: #fff9e8;
    color: #8a5a00;
}

.lead-meta {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.lead-meta a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 26px;
    color: #526071;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.16s ease;
}

.lead-contact-missing {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 26px;
    color: #8a5a00;
    font-size: 13px;
    font-weight: 800;
}

.lead-contact-missing svg {
    width: 15px;
    height: 15px;
}

.lead-meta::before,
.lead-meta a:not(:first-child)::before,
.lead-meta .lead-contact-missing:not(:first-child)::before {
    content: "·";
    color: var(--muted-soft);
    font-weight: 800;
}

.lead-meta a:hover {
    color: var(--green-deep);
}

.lead-delete-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    border: 0;
    background: transparent;
    color: #a53a32;
    padding: 0 2px;
    font-size: 13px;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.lead-delete-link svg {
    width: 15px;
    height: 15px;
}

.lead-delete-link:hover {
    color: #7f271f;
}

.lead-delete-link.is-saving {
    opacity: 0.55;
    pointer-events: none;
}

.lead-delete-link.has-error {
    color: #b42318;
}

.lead-actions {
    flex-wrap: wrap;
    gap: 10px;
}

.lead-actions button {
    min-height: 36px;
    border: 1px solid rgba(47, 141, 118, 0.22);
    background: #fff;
    color: var(--green-deep);
    padding: 0 12px;
    font-size: 13px;
}

.status-dropdown {
    position: relative;
    --status-color: var(--green-deep);
    --status-border: rgba(47, 141, 118, 0.24);
    --status-soft: #f2faf7;
    --status-value-bg: linear-gradient(180deg, #f8fafb 0%, #fff 100%);
}

.status-dropdown__trigger {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    overflow: hidden;
    border: 1px solid var(--status-border);
    border-radius: 999px;
    background: #fff;
    color: var(--status-color);
    padding: 0;
    box-shadow: 0 8px 18px rgba(36, 49, 66, 0.04);
    transition: border-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease;
}

.status-dropdown__type,
.status-dropdown__value {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    font-size: 13px;
    font-weight: 800;
}

.status-dropdown__type {
    justify-content: center;
    color: var(--status-color);
    width: 48px;
    padding: 0;
    flex: 0 0 48px;
}

.brand-icon {
    width: 20px;
    height: 20px;
    fill: none;
}

.brand-icon--whatsapp path:first-child {
    fill: currentColor;
    opacity: 0.14;
    stroke: currentColor;
    stroke-width: 1.4;
}

.brand-icon--whatsapp path:last-child {
    fill: currentColor;
}

.status-dropdown__value {
    min-width: 132px;
    border-left: 1px solid var(--status-border);
    background: var(--status-value-bg);
    color: var(--status-color);
    padding: 0 10px;
}

.status-dropdown__trigger > svg {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    color: var(--status-color);
    transition: transform 0.16s ease;
}

.status-dropdown.is-open .status-dropdown__trigger {
    border-color: var(--status-color);
    box-shadow: 0 0 0 3px var(--status-soft);
}

.status-dropdown--green {
    --status-color: #0f6f5d;
    --status-border: rgba(47, 141, 118, 0.28);
    --status-soft: rgba(47, 141, 118, 0.13);
    --status-value-bg: linear-gradient(180deg, #f3fbf8 0%, #fff 100%);
}

.status-dropdown--yellow {
    --status-color: #a46900;
    --status-border: rgba(198, 137, 18, 0.34);
    --status-soft: rgba(218, 153, 29, 0.16);
    --status-value-bg: linear-gradient(180deg, #fff9e8 0%, #fff 100%);
}

.status-dropdown--orange {
    --status-color: #bf5700;
    --status-border: rgba(207, 101, 20, 0.36);
    --status-soft: rgba(217, 105, 24, 0.16);
    --status-value-bg: linear-gradient(180deg, #fff3e8 0%, #fff 100%);
}

.status-dropdown--red {
    --status-color: #a83228;
    --status-border: rgba(180, 35, 24, 0.35);
    --status-soft: rgba(180, 35, 24, 0.13);
    --status-value-bg: linear-gradient(180deg, #fff0ef 0%, #fff 100%);
}

.status-dropdown.is-saving .status-dropdown__trigger {
    opacity: 0.68;
}

.status-dropdown.has-error .status-dropdown__trigger {
    border-color: #e19a9a;
    box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.1);
}

.status-dropdown.is-disabled {
    opacity: 0.72;
}

.status-dropdown.is-disabled .status-dropdown__trigger {
    cursor: not-allowed;
}

.status-dropdown.is-open .status-dropdown__trigger > svg {
    transform: rotate(180deg);
}

.status-dropdown__menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 30;
    width: max-content;
    min-width: 218px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 20px 45px rgba(36, 49, 66, 0.18);
    padding: 6px;
}

.status-dropdown__menu[hidden] {
    display: none;
}

.status-dropdown__menu button {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 34px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--text);
    padding: 0 10px;
    font-size: 13px;
    font-weight: 700;
    text-align: left;
}

.status-dropdown__menu button:hover {
    background: #f2faf7;
    color: var(--green-deep);
}

.status-dropdown__menu button.is-selected {
    background: var(--green);
    color: #fff;
}

.modal-form input,
.modal-form select,
.modal-form textarea {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--sub-border);
    border-radius: 16px;
    background: #fff;
    color: var(--text);
    outline: 0;
    padding: 11px 13px;
    font-size: 16px;
}

.modal-form textarea {
    resize: vertical;
}

.bottom-tabs {
    position: fixed;
    right: 24px;
    bottom: 20px;
    left: 24px;
    z-index: 20;
    display: none;
    grid-template-columns: repeat(4, 1fr);
    max-width: 520px;
    margin: 0 auto;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 34px rgba(35, 49, 66, 0.14);
    backdrop-filter: blur(14px);
    padding: 6px;
}

.bottom-tabs a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 42px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.bottom-tabs a.is-active {
    background: var(--green);
    color: #fff;
}

.fab {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 21;
    display: grid;
    width: 62px;
    height: 62px;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: var(--green);
    color: #fff;
    box-shadow: 0 18px 30px rgba(47, 141, 118, 0.32);
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: grid;
    place-items: center;
    background: rgba(36, 49, 66, 0.42);
    padding: 22px;
}

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

.lead-modal {
    width: min(680px, 100%);
    max-height: calc(100vh - 44px);
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(36, 49, 66, 0.22);
    padding: 22px;
}

.modal-header {
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.modal-header .eyebrow {
    color: var(--muted);
}

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

.modal-form label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.modal-form__wide {
    grid-column: 1 / -1;
}

.form-error {
    margin: 0;
    border: 1px solid rgba(180, 35, 24, 0.18);
    border-radius: 14px;
    background: #fff0ef;
    color: #a83228;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 700;
}

.modal-open {
    overflow: hidden;
}

.note-popover-backdrop {
    position: fixed;
    inset: 0;
    z-index: 45;
    display: grid;
    place-items: center;
    background: rgba(36, 49, 66, 0.22);
    padding: 20px;
}

.note-popover-backdrop[hidden] {
    display: none;
}

.note-popover {
    width: min(420px, 100%);
    border: 1px solid var(--border);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 24px 58px rgba(36, 49, 66, 0.2);
    padding: 18px;
}

.note-popover__header,
.note-popover__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.note-popover__header {
    margin-bottom: 12px;
}

.note-popover__header h2 {
    margin: 0;
    color: var(--text);
    font-size: 17px;
}

.note-popover__close {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid var(--sub-border);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
}

.note-popover textarea {
    width: 100%;
    min-height: 128px;
    border: 1px solid var(--sub-border);
    border-radius: 16px;
    color: var(--text);
    outline: 0;
    padding: 12px;
    resize: vertical;
}

.note-popover textarea:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(47, 141, 118, 0.12);
}

.note-popover__actions {
    justify-content: flex-end;
    margin-top: 12px;
}

.note-popover__cancel,
.note-popover__save {
    min-height: 38px;
    border-radius: 999px;
    padding: 0 14px;
    font-weight: 800;
}

.note-popover__cancel {
    border: 1px solid var(--sub-border);
    background: #fff;
    color: var(--muted);
}

.note-popover__save {
    border: 0;
    background: var(--green-dark);
    color: #fff;
}

.note-popover__save.is-saving {
    opacity: 0.72;
}

.note-popover__save.has-error {
    background: var(--danger);
}

.note-popover-open {
    overflow: hidden;
}

.auth-body {
    min-height: 100vh;
    background: linear-gradient(180deg, #0e4d43 0%, #2f8d76 45%, #edf1f1 45%, #edf1f1 100%);
}

.auth-shell {
    display: grid;
    min-height: 100vh;
    align-content: center;
    justify-items: center;
    gap: 18px;
    padding: 28px;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 190px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 18px 44px rgba(14, 77, 67, 0.26);
    backdrop-filter: blur(12px);
    padding: 16px 22px;
}

.auth-brand img {
    width: 170px;
    height: auto;
    filter: brightness(0) invert(1);
}

.auth-card {
    width: min(440px, 100%);
    border: 1px solid var(--border);
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(36, 49, 66, 0.2);
    padding: 26px;
}

.auth-card .eyebrow {
    color: var(--muted);
}

.auth-card h1 {
    margin: 6px 0 8px;
    color: var(--text);
}

.auth-copy {
    margin: 0 0 18px;
    color: var(--muted);
    line-height: 1.55;
}

.auth-form {
    display: grid;
    gap: 12px;
}

.auth-form label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.auth-form input {
    min-height: 46px;
    border: 1px solid var(--sub-border);
    border-radius: 16px;
    color: var(--text);
    outline: 0;
    padding: 0 13px;
    font-size: 16px;
}

.auth-form button {
    min-height: 44px;
    border: 0;
    border-radius: 999px;
    background: var(--green-dark);
    color: #fff;
    font-weight: 800;
}

.auth-resend-form {
    margin-top: 12px;
}

.auth-resend-form button {
    border: 0;
    background: transparent;
    color: var(--green-deep);
    padding: 0;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-check {
    display: flex !important;
    grid-template-columns: none;
    align-items: center;
    gap: 8px !important;
}

.auth-check input {
    width: auto;
    min-height: auto;
}

.auth-error,
.auth-dev-code {
    border-radius: 14px;
    padding: 10px 12px;
    font-weight: 800;
}

.auth-error {
    background: #fff1f0;
    color: var(--danger);
}

.auth-dev-code {
    background: #f2faf7;
    color: var(--green-deep);
}

.auth-link {
    display: inline-flex;
    margin-top: 14px;
    color: var(--green-deep);
    font-weight: 800;
}

svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.2;
}

.fab svg {
    width: 26px;
    height: 26px;
}

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

}

@media (max-width: 740px) {
    .hero__inner,
    .app-shell {
        width: min(100% - 28px, 1220px);
    }

    .hero__inner {
        padding-bottom: 68px;
    }

    .brand-row {
        align-items: flex-start;
    }

    .brand-logo {
        width: 134px;
    }

    .hero-action {
        width: 44px;
        min-height: 44px;
        padding: 0;
        font-size: 0;
    }

    .hero-copy {
        margin-top: 32px;
    }

    .modal-form {
        grid-template-columns: 1fr;
    }

    .panel,
    .lead-row {
        border-radius: 24px;
    }

    .section-heading,
    .section-heading--stack,
    .lead-main {
        align-items: stretch;
        flex-direction: column;
    }

    .search-box {
        width: 100%;
    }

    .bottom-tabs {
        display: grid;
    }

    .fab {
        right: 18px;
        bottom: 88px;
        width: 58px;
        height: 58px;
    }
}

@media (max-width: 430px) {
    .bottom-tabs span {
        display: none;
    }

    .bottom-tabs a {
        min-height: 44px;
    }
}
