/* ==========================================================
   ANYA design rendszer – alap
   Meleg, otthonos, biztonságot sugárzó, mobil-first
   ========================================================== */

:root {
    /* Színek */
    --bg: #FCF6F0;
    --surface: #FFFFFF;
    --surface-soft: #FFF9F5;
    --ink: #1F2A44;
    --ink-soft: #5E6675;
    --ink-faint: #8F8A87;
    --line: #F1E5DC;

    --peach: #F5B9A1;
    --peach-soft: #FBE4DA;
    --peach-deep: #E98A6E;
    --beige: #F3E8DA;

    --green-deep: #234640;
    --green: #5E9E6E;
    --green-soft: #E2F0DC;

    --coral: #C8503A;
    --danger: #D2483B;
    --danger-soft: #FCE7E4;

    /* Formák */
    --radius-s: 14px;
    --radius-m: 20px;
    --radius-l: 28px;

    --shadow-s: 0 1px 2px rgba(122, 78, 56, .06), 0 4px 12px rgba(122, 78, 56, .05);
    --shadow-m: 0 2px 4px rgba(122, 78, 56, .05), 0 12px 32px rgba(122, 78, 56, .09);

    /* Betű */
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
    color: var(--ink);
    background:
        radial-gradient(90% 45% at 100% -5%, #FADCCD 0%, rgba(250, 220, 205, 0) 70%),
        radial-gradient(70% 40% at -10% 12%, #F4E6D6 0%, rgba(244, 230, 214, 0) 70%),
        var(--bg);
    -webkit-font-smoothing: antialiased;
}

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

h1 {
    font-size: 26px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -.01em;
}

a {
    color: var(--coral);
    font-weight: 600;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

svg {
    display: block;
}

:focus-visible {
    outline: 3px solid rgba(233, 138, 110, .45);
    outline-offset: 2px;
}

/* ---------- Oldalváz (belépés / regisztráció) ---------- */

.auth-page {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: calc(20px + env(safe-area-inset-top)) 20px calc(32px + env(safe-area-inset-bottom));
}

.brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 10px 0 26px;
}

.brand-name {
    margin-top: 10px;
    font-size: 40px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: .06em;
    color: var(--ink);
}

.brand-tagline {
    margin-top: 8px;
    font-size: 15px;
    color: var(--ink-soft);
}

/* ---------- Kártya ---------- */

.card {
    background: var(--surface);
    border-radius: var(--radius-l);
    border: 1px solid rgba(241, 229, 220, .7);
    box-shadow: var(--shadow-m);
    padding: 28px 22px;
}

.lead {
    margin-top: 8px;
    color: var(--ink-soft);
    font-size: 15.5px;
}

/* ---------- Űrlap ---------- */

.form {
    margin-top: 24px;
}

.field + .field {
    margin-top: 18px;
}

.field label {
    display: block;
    margin-bottom: 7px;
    font-size: 14px;
    font-weight: 700;
}

.optional {
    margin-left: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-faint);
}

.input {
    display: block;
    width: 100%;
    height: 52px;
    padding: 0 16px;
    font: inherit;
    font-size: 16px; /* iOS ne nagyítson rá fókuszkor */
    color: var(--ink);
    background: var(--surface-soft);
    border: 1.5px solid var(--line);
    border-radius: 16px;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.input::placeholder {
    color: var(--ink-faint);
}

.input:focus {
    outline: none;
    background: var(--surface);
    border-color: var(--peach-deep);
    box-shadow: 0 0 0 4px rgba(233, 138, 110, .18);
}

.hint {
    margin-top: 6px;
    font-size: 13px;
    color: var(--ink-faint);
}

.field-error {
    margin-top: 6px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--danger);
}

.has-error .input {
    border-color: var(--danger);
}

/* ---------- Gombok ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 54px;
    padding: 0 26px;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .15s ease, background .15s ease;
}

.btn:hover {
    text-decoration: none;
}

.btn:active {
    transform: scale(.985);
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-primary {
    color: #fff;
    background: var(--green-deep);
    box-shadow: 0 8px 20px rgba(35, 70, 64, .22);
}

.btn-primary:hover {
    background: #1C3A35;
}

.btn-soft {
    color: var(--ink);
    background: var(--peach-soft);
}

.form .btn {
    margin-top: 26px;
}

/* ---------- Üzenetek ---------- */

.alert {
    margin-top: 20px;
    padding: 12px 16px;
    border-radius: var(--radius-s);
    font-size: 14.5px;
    font-weight: 600;
}

.alert-error {
    color: #8E2A20;
    background: var(--danger-soft);
}

/* ---------- Kiegészítők ---------- */

.switch-line {
    margin-top: 22px;
    text-align: center;
    font-size: 15px;
    color: var(--ink-soft);
}

.slogan {
    margin-top: 26px;
    text-align: center;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ink-faint);
}

.lang-switch {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

.lang-switch a {
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-soft);
    border-radius: 999px;
}

.lang-switch a:hover {
    text-decoration: none;
    color: var(--ink);
}

.lang-switch a.is-active {
    color: var(--ink);
    background: var(--surface);
    box-shadow: var(--shadow-s);
}

@media (min-width: 600px) {
    .auth-page {
        padding-top: 48px;
    }

    .card {
        padding: 34px 32px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}

/* ==========================================================
   Nyitóoldal
   ========================================================== */

.hero-landing {
    text-align: center;
    margin-bottom: 22px;
}

.hero-landing .lead {
    margin-top: 10px;
}

.feature-list {
    display: grid;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.feature {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--surface);
    border-radius: var(--radius-m);
    box-shadow: var(--shadow-s);
}

.feature-icon {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    color: var(--peach-deep);
    background: var(--peach-soft);
    border-radius: 50%;
}

.feature-title {
    font-size: 15.5px;
    font-weight: 700;
}

.feature-text {
    font-size: 13.5px;
    color: var(--ink-soft);
}

.actions {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

/* ==========================================================
   Alkalmazás (belépett felület)
   ========================================================== */

.app-page {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: calc(16px + env(safe-area-inset-top)) 18px calc(130px + env(safe-area-inset-bottom));
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wordmark {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: .06em;
}

/* Fiók menü (JavaScript nélkül) */

.user-menu {
    position: relative;
}

.user-menu summary {
    list-style: none;
    cursor: pointer;
}

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

.avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    font-weight: 800;
    color: var(--ink);
    background: var(--beige);
    border-radius: 50%;
}

.menu-panel {
    position: absolute;
    right: 0;
    top: 52px;
    z-index: 30;
    min-width: 240px;
    padding: 16px;
    background: var(--surface);
    border-radius: var(--radius-m);
    box-shadow: var(--shadow-m);
}

.menu-name {
    font-weight: 700;
}

.menu-email {
    font-size: 13px;
    color: var(--ink-soft);
    word-break: break-all;
}

.menu-panel .btn {
    margin-top: 14px;
    min-height: 46px;
    font-size: 15px;
}

/* Üdvözlés */

.hero {
    position: relative;
    padding: 26px 0 8px;
    min-height: 170px;
}

.hero-mark {
    position: absolute;
    right: -10px;
    top: 4px;
    opacity: .55;
    pointer-events: none;
}

.hero-copy {
    position: relative;
    max-width: 80%;
}

.hero h1 {
    font-size: 34px;
}

.hero-sub {
    margin-top: 6px;
    font-size: 20px;
    font-weight: 600;
}

.hero-text {
    margin-top: 14px;
    font-size: 15px;
    color: var(--ink-soft);
}

/* Csempék */

.tiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 18px;
}

.tile {
    padding: 14px 12px 16px;
    background: var(--surface);
    border-radius: 22px;
    box-shadow: var(--shadow-s);
}

.tile-icon,
.item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
}

.tile-icon {
    width: 38px;
    height: 38px;
}

.is-peach {
    color: var(--peach-deep);
    background: var(--peach-soft);
}

.is-rose {
    color: var(--coral);
    background: #FBE1E1;
}

.is-green {
    color: var(--green);
    background: var(--green-soft);
}

.tile-num {
    margin-top: 12px;
    font-size: 30px;
    line-height: 1;
    font-weight: 800;
}

.tile-label {
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.3;
    color: var(--ink-soft);
}

/* Lista */

.section-title {
    margin: 30px 2px 14px;
    font-size: 19px;
    font-weight: 800;
}

.item-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--surface);
    border-radius: 22px;
    box-shadow: var(--shadow-s);
}

.item-icon {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
}

.item-body {
    flex: 1 1 auto;
    min-width: 0;
}

.item-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.item-title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 17px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.badge {
    flex: 0 0 auto;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--coral);
}

.badge::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 5px;
    background: var(--coral);
    border-radius: 50%;
}

.item-due {
    font-size: 14.5px;
    color: var(--ink-soft);
}

.item-due.is-urgent {
    color: var(--coral);
}

.item-meta {
    font-size: 13.5px;
    color: var(--ink-faint);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.empty-card {
    text-align: center;
    padding: 30px 22px;
}

.empty-card .anya-mark {
    margin: 0 auto 12px;
}

.empty-card h3 {
    font-size: 18px;
    font-weight: 800;
}

.empty-card p {
    margin-top: 6px;
    font-size: 15px;
    color: var(--ink-soft);
}

/* Alsó navigáció */

.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: end;
    width: 100%;
    max-width: 520px;
    padding: 10px 6px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .94);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 28px 28px 0 0;
    box-shadow: 0 -8px 30px rgba(122, 78, 56, .10);
    transform: translateX(-50%);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 2px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-faint);
    text-decoration: none;
}

.nav-item:hover {
    text-decoration: none;
}

.nav-item.is-active {
    color: var(--ink);
}

.nav-item.is-soon {
    opacity: .5;
    cursor: default;
}

.nav-anya {
    margin-top: -36px;
}

.nav-anya-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 66px;
    height: 66px;
    background: linear-gradient(160deg, #FFEADF, #F9C9B6);
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 10px 24px rgba(233, 138, 110, .40);
}

/* ==========================================================
   Onboarding
   ========================================================== */

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

.steps {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.step-dot {
    width: 8px;
    height: 8px;
    background: var(--line);
    border-radius: 999px;
}

.step-dot.is-current {
    width: 26px;
    background: var(--peach-deep);
}

.step-dot.is-done {
    background: var(--peach);
}

.choice-list {
    display: grid;
    gap: 10px;
    margin-top: 22px;
}

.choice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 22px;
}

.choice-group {
    position: relative;
}

.choice-input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.choice {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--surface-soft);
    border: 1.5px solid var(--line);
    border-radius: var(--radius-m);
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}

.choice-icon {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--peach-deep);
    background: var(--peach-soft);
    border-radius: 50%;
}

.choice-label {
    flex: 1 1 auto;
    font-size: 15.5px;
    font-weight: 700;
}

.choice-check {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: #fff;
    border: 1.5px solid var(--line);
    border-radius: 50%;
}

.choice-check .icon {
    opacity: 0;
}

.choice-input:checked + .choice {
    background: #FFF3EC;
    border-color: var(--peach-deep);
}

.choice-input:checked + .choice .choice-check,
.choice.is-fixed .choice-check {
    background: var(--green-deep);
    border-color: var(--green-deep);
}

.choice-input:checked + .choice .choice-check .icon,
.choice.is-fixed .choice-check .icon {
    opacity: 1;
}

.choice-input:focus-visible + .choice {
    outline: 3px solid rgba(233, 138, 110, .45);
    outline-offset: 2px;
}

.choice.is-fixed {
    cursor: default;
    background: #FFF3EC;
    border-color: var(--peach-deep);
}

/* Név megadása – csak bejelölés után jelenik meg */

.choice-reveal {
    display: none;
    padding: 10px 4px 4px;
}

.choice-input:checked ~ .choice-reveal {
    display: block;
}

.choice-group.has-error .input {
    border-color: var(--danger);
}

/* Csempe változat (mire figyeljek) */

.choice-grid .choice {
    position: relative;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    height: 100%;
    padding: 14px;
}

.choice-grid .choice-label {
    flex: none;
    font-size: 15px;
}

.choice-grid .choice-check {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 22px;
    height: 22px;
}

.choice-grid .choice-group:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.onb-actions {
    display: grid;
    gap: 10px;
    margin-top: 26px;
}

.skip-form {
    margin-top: 14px;
    text-align: center;
}

.btn-link {
    padding: 10px 14px;
    font: inherit;
    font-weight: 600;
    color: var(--ink-soft);
    text-decoration: underline;
    background: none;
    border: 0;
    cursor: pointer;
}

.done {
    text-align: center;
}

.done-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    color: #fff;
    background: var(--green-deep);
    border-radius: 50%;
    box-shadow: var(--shadow-m);
}

/* ==========================================================
   Dokumentumok
   ========================================================== */

.page-head {
    padding: 8px 2px 4px;
}

.page-head h1 {
    font-size: 30px;
}

.page-head .lead {
    margin-top: 6px;
}

.alert-success {
    color: #1E5B36;
    background: var(--green-soft);
}

.alert-list {
    margin: 0;
    padding-left: 18px;
}

.alert-list li + li {
    margin-top: 4px;
}

.alert + .alert {
    margin-top: 10px;
}

.card + .card,
.card + .danger-zone {
    margin-top: 16px;
}

/* Feltöltés */

.upload-card {
    margin-top: 18px;
    padding: 18px;
}

.upload-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 20px 14px 16px;
    text-align: center;
    background: var(--surface-soft);
    border: 2px dashed var(--peach);
    border-radius: var(--radius-m);
}

.upload-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    color: var(--peach-deep);
    background: var(--peach-soft);
    border-radius: 50%;
}

.upload-title {
    margin-top: 6px;
    font-size: 17px;
    font-weight: 800;
}

.upload-picks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
    margin-top: 14px;
}

.pick {
    position: relative;
    overflow: hidden;
    min-height: 50px;
    padding: 0 14px;
    font-size: 15px;
}

.pick input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    font-size: 0;
    opacity: 0;
    cursor: pointer;
}

.pick:focus-within {
    outline: 3px solid rgba(233, 138, 110, .45);
    outline-offset: 2px;
}

.upload-summary {
    margin-top: 12px;
    text-align: center;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--green);
}

.upload-summary:empty {
    display: none;
}

.upload-form .field {
    margin-top: 16px;
}

.upload-submit {
    margin-top: 18px;
}

/* Legördülő */

.select-wrap {
    position: relative;
}

.select-wrap select {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 44px;
}

.select-wrap::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 20px;
    width: 8px;
    height: 8px;
    margin-top: -6px;
    border-right: 2px solid var(--ink-faint);
    border-bottom: 2px solid var(--ink-faint);
    transform: rotate(45deg);
    pointer-events: none;
}

/* Lista */

.item-list a.item {
    color: inherit;
    font-weight: inherit;
    text-decoration: none;
}

.item-arrow {
    flex: 0 0 auto;
    color: var(--ink-faint);
}

/* Részletek */

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 4px 6px 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--ink-soft);
}

.back-link .icon {
    transform: rotate(180deg);
}

.back-link:hover {
    color: var(--ink);
    text-decoration: none;
}

.doc-preview {
    display: block;
    width: 100%;
    max-height: 420px;
    object-fit: contain;
    background: var(--surface-soft);
    border-radius: var(--radius-m);
}

.doc-file-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 26px 14px;
    font-weight: 800;
    color: var(--coral);
    background: #FBE1E1;
    border-radius: var(--radius-m);
}

.doc-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
}

.doc-actions .btn {
    min-height: 48px;
    font-size: 15px;
}

.info {
    margin: 18px 0 0;
}

.info-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 0;
    font-size: 14.5px;
    border-top: 1px solid var(--line);
}

.info-row dt {
    flex: 0 0 auto;
    color: var(--ink-soft);
}

.info-row dd {
    margin: 0;
    font-weight: 600;
    text-align: right;
    word-break: break-word;
}

.danger-zone {
    background: var(--surface);
    border-radius: var(--radius-m);
    box-shadow: var(--shadow-s);
}

.danger-zone summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 18px;
    font-weight: 700;
    color: var(--danger);
    list-style: none;
    cursor: pointer;
}

.danger-zone summary::-webkit-details-marker {
    display: none;
}

.danger-body {
    padding: 0 18px 18px;
}

.danger-body p {
    font-size: 14.5px;
    color: var(--ink-soft);
}

.danger-body .btn {
    margin-top: 14px;
}

.btn-danger {
    color: #fff;
    background: var(--danger);
}

/* ==========================================================
   AI kiolvasás
   ========================================================== */

.ai-card {
    background: linear-gradient(160deg, #EAF5E4 0%, #F7FBF3 100%);
}

.ai-card h2 {
    font-size: 20px;
    font-weight: 800;
}

.ai-card .lead {
    font-size: 14.5px;
}

.ai-card .btn {
    margin-top: 18px;
}

.consent {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 16px;
    padding: 14px;
    font-size: 14px;
    line-height: 1.45;
    background: rgba(255, 255, 255, .75);
    border-radius: var(--radius-s);
    cursor: pointer;
}

.consent input {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    margin: 1px 0 0;
    accent-color: var(--green-deep);
}

.consent-note {
    margin-top: 14px;
    font-size: 13.5px;
    color: var(--ink-soft);
}

.fact + .fact {
    margin-top: 18px;
}

.fact-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 7px;
}

.fact-label {
    font-size: 14px;
    font-weight: 700;
}

.fact-chip {
    flex: 0 0 auto;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 999px;
}

.fact-chip.is-ok {
    color: #1E5B36;
    background: var(--green-soft);
}

.fact-chip.is-high {
    color: #1E5B36;
    background: #EAF5E4;
}

.fact-chip.is-mid {
    color: #8A5A12;
    background: #FCEFD3;
}

.fact-chip.is-low {
    color: var(--coral);
    background: var(--danger-soft);
}

.fact-remove {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 13px;
    color: var(--ink-faint);
    cursor: pointer;
}

.fact-remove input {
    accent-color: var(--danger);
}

.fact.has-error .input {
    border-color: var(--danger);
}

textarea.input {
    height: auto;
    min-height: 96px;
    padding: 12px 16px;
    line-height: 1.4;
    resize: vertical;
}

/* ==========================================================
   Teendők
   ========================================================== */

.item {
    position: relative;
}

.stretched-link {
    color: inherit;
    font-weight: inherit;
    text-decoration: none;
}

.stretched-link:hover {
    text-decoration: none;
}

.stretched-link::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 22px;
}

.task-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

.task-row {
    padding: 14px;
    background: var(--surface-soft);
    border: 1.5px solid var(--line);
    border-radius: var(--radius-m);
}

.task-row.is-closed {
    opacity: .6;
}

.task-title {
    font-size: 15.5px;
    font-weight: 700;
}

.task-due {
    margin-top: 2px;
    font-size: 14px;
    color: var(--ink-soft);
}

.task-due.is-urgent {
    font-weight: 600;
    color: var(--coral);
}

.task-meta {
    margin-top: 2px;
    font-size: 13px;
    color: var(--ink-faint);
}

.task-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
}

.btn-small {
    min-height: 42px;
    padding: 0 16px;
    font-size: 14.5px;
}

/* ==========================================================
   Csengő és push
   ========================================================== */

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: var(--ink);
    background: var(--surface);
    border-radius: 50%;
    box-shadow: var(--shadow-s);
}

.icon-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10.5px;
    font-weight: 800;
    color: #fff;
    background: var(--coral);
    border-radius: 999px;
}

.push-card h2 {
    font-size: 17px;
    font-weight: 800;
}

.push-card .lead {
    margin-top: 4px;
}

.push-card .btn {
    margin-top: 14px;
}

/* ==========================================================
   Integrációk
   ========================================================== */

.integration-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.integration-head h2 {
    font-size: 18px;
    font-weight: 800;
}

.integration-head .lead {
    margin-top: 3px;
    font-size: 14px;
}

.integration-card form {
    margin-top: 14px;
}

.integration-card > .btn {
    margin-top: 16px;
}

.mail-actions {
    margin-top: 10px;
}

.mail-actions .btn:disabled {
    opacity: .5;
    cursor: default;
}

/* ==========================================================
   Család
   ========================================================== */

.expand-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin-top: 16px;
}

.expand-card {
    background: var(--surface);
    border-radius: var(--radius-m);
    box-shadow: var(--shadow-s);
    overflow: hidden;
}

.expand-card summary {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    list-style: none;
    cursor: pointer;
}

.expand-card summary::-webkit-details-marker {
    display: none;
}

.expand-summary-body {
    flex: 1 1 auto;
    min-width: 0;
}

.expand-summary-title {
    font-size: 15.5px;
    font-weight: 700;
}

.expand-summary-meta {
    margin-top: 2px;
    font-size: 13px;
    color: var(--ink-soft);
}

.expand-chevron {
    flex: 0 0 auto;
    color: var(--ink-faint);
    transition: transform .15s ease;
}

.expand-card[open] .expand-chevron {
    transform: rotate(90deg);
}

.expand-body {
    padding: 0 16px 18px;
}

.expand-body .field {
    margin-top: 14px;
}

.expand-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 18px;
}

.add-card summary {
    color: var(--peach-deep);
    font-weight: 700;
}

.badge-you {
    margin-left: 6px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    color: var(--green-deep);
    background: var(--green-soft);
    border-radius: 999px;
    vertical-align: middle;
}

.savings-card {
    background: linear-gradient(160deg, #FFF3EC 0%, #FFFBF8 100%);
}

.savings-card h2 {
    font-size: 20px;
    font-weight: 800;
}

.savings-card .lead {
    font-size: 14.5px;
}

/* ==========================================================
   Előfizetések
   ========================================================== */

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.expand-actions.is-triple {
    grid-template-columns: 1fr 1fr 1fr;
}

.status-badge {
    margin-left: 8px;
    padding: 2px 9px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    vertical-align: middle;
}

.status-badge.is-active {
    color: var(--green-deep);
    background: var(--green-soft);
}

.status-badge.is-cancelled {
    color: var(--ink-faint);
    background: var(--beige);
}

.status-badge.is-unknown {
    color: #8A5A12;
    background: #FCEFD3;
}

.chat-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.chat-log {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 55vh;
    overflow-y: auto;
    padding: 4px 2px;
}

.chat-bubble {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    line-height: 1.4;
    font-size: 15px;
}

.chat-bubble.is-user {
    align-self: flex-end;
    background: var(--anya-rose, #F3B199);
    color: #1F2A44;
    border-bottom-right-radius: 6px;
}

.chat-bubble.is-anya {
    align-self: flex-start;
    background: var(--anya-cream, #FFF5EE);
    color: #1F2A44;
    border-bottom-left-radius: 6px;
}

.chat-form {
    margin-top: 4px;
}

.chat-input-row {
    display: flex;
    gap: 8px;
}

.chat-input-row .input {
    flex: 1;
}

.field-row-split {
    display: flex;
    gap: 12px;
}

.field-row-split .field {
    flex: 1;
}