:root {
    --mesada-ink: #263238;
    --mesada-muted: #6c757d;
    --mesada-sky: #31a8ff;
    --mesada-mint: #35c48c;
    --mesada-coral: #ff6b6b;
    --mesada-sun: #ffd166;
    --mesada-lilac: #8d7cf6;
    --mesada-paper: #fffdf8;
    --mesada-line: rgba(38, 50, 56, .1);
}

body {
    color: var(--mesada-ink);
}

.mesada-app .content-wrapper {
    background:
        radial-gradient(circle at 12% 12%, rgba(255, 209, 102, .24), transparent 26rem),
        radial-gradient(circle at 90% 0%, rgba(49, 168, 255, .16), transparent 28rem),
        #f7fbff;
}

.mesada-auth-page {
    min-height: 100vh;
    background:
        linear-gradient(135deg, rgba(49, 168, 255, .18), rgba(53, 196, 140, .12)),
        var(--mesada-paper);
}

.mesada-auth-shell {
    display: grid;
    grid-template-columns: minmax(280px, 460px) minmax(300px, 420px);
    gap: 2rem;
    align-items: center;
    width: min(960px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 3rem 0;
}

.mesada-auth-brand h1,
.mesada-page-header h1 {
    margin: 0;
    font-weight: 800;
    letter-spacing: 0;
}

.mesada-auth-brand p {
    max-width: 34rem;
    margin: 1rem 0 0;
    color: var(--mesada-muted);
    font-size: 1.08rem;
}

.brand-badge {
    display: inline-grid;
    place-items: center;
    width: 78px;
    height: 78px;
    margin-bottom: 1rem;
    border-radius: 24px;
    background: var(--mesada-sun);
    color: #4c3b00;
    font-size: 2rem;
    box-shadow: 0 16px 32px rgba(255, 209, 102, .35);
}

.brand-badge-coral {
    background: var(--mesada-coral);
    color: #fff;
    box-shadow: 0 16px 32px rgba(255, 107, 107, .28);
}

.mini-card-row {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    margin-top: 1.5rem;
}

.mini-card-row span {
    display: inline-flex;
    gap: .4rem;
    align-items: center;
    padding: .6rem .8rem;
    border: 1px solid var(--mesada-line);
    border-radius: 8px;
    background: #fff;
    font-weight: 700;
}

.mesada-auth-card {
    width: 100%;
}

.mesada-auth-card .card {
    border: 0;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(38, 50, 56, .12);
}

.mesada-register-card {
    max-width: 440px;
}

.mesada-navbar,
.mesada-sidebar {
    border-color: var(--mesada-line);
}

.mesada-sidebar .brand-link {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.brand-icon,
.sidebar-avatar {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--mesada-sun);
    color: #4c3b00;
}

.sidebar-avatar {
    background: var(--mesada-sky);
    color: #fff;
    font-weight: 800;
}

.mesada-page-header {
    padding: 1.5rem .5rem .75rem;
}

.mesada-eyebrow {
    margin: 0 0 .25rem;
    color: var(--mesada-muted);
    font-weight: 700;
    text-transform: uppercase;
    font-size: .75rem;
}

.kid-card,
.quick-actions,
.panel-soft {
    height: 100%;
    border: 1px solid var(--mesada-line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(38, 50, 56, .08);
}

.kid-card {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1.25rem;
    border-left: 8px solid var(--mesada-sky);
}

.kid-card-coral {
    border-left-color: var(--mesada-coral);
}

.kid-avatar {
    display: grid;
    place-items: center;
    flex: 0 0 74px;
    width: 74px;
    height: 74px;
    border-radius: 8px;
    background: #e7f6ff;
    color: var(--mesada-sky);
    font-size: 2rem;
    font-weight: 800;
}

.kid-card-coral .kid-avatar {
    background: #fff0f0;
    color: var(--mesada-coral);
}

.kid-label {
    display: inline-block;
    margin-bottom: .25rem;
    color: var(--mesada-muted);
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.kid-card h2,
.quick-actions h2,
.panel-soft h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
}

.kid-card p,
.goal-panel p {
    margin: .3rem 0;
    color: var(--mesada-muted);
}

.kid-card strong {
    font-size: 1.8rem;
}

.quick-actions,
.panel-soft {
    padding: 1.25rem;
}

.quick-actions h2 {
    margin-bottom: 1rem;
}

.quick-actions .btn {
    min-height: 44px;
    font-weight: 700;
}

.panel-soft-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.event-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

.event-grid span {
    display: flex;
    gap: .6rem;
    align-items: center;
    min-height: 48px;
    padding: .8rem;
    border: 1px dashed var(--mesada-line);
    border-radius: 8px;
    background: #fbfdff;
    font-weight: 700;
}

.goal-panel .progress {
    height: 1.5rem;
    border-radius: 8px;
    background: #eef3f7;
}

.period-summary-child + .period-summary-child {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--mesada-line);
}

.period-summary-child h3 {
    margin: 0 0 .5rem;
    font-size: 1rem;
    font-weight: 800;
}

.period-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

.period-summary span {
    display: grid;
    gap: .15rem;
    padding: .8rem;
    border: 1px solid var(--mesada-line);
    border-radius: 8px;
    background: #fff;
}

.period-summary small {
    color: var(--mesada-muted);
    font-weight: 700;
}

.period-summary small:first-child {
    text-transform: uppercase;
}

.period-summary strong {
    font-size: 1.1rem;
}

@media (max-width: 767.98px) {
    .mesada-auth-shell {
        grid-template-columns: 1fr;
        padding: 1.25rem 0;
    }

    .mesada-auth-brand {
        text-align: center;
    }

    .mini-card-row {
        justify-content: center;
    }

    .event-grid {
        grid-template-columns: 1fr;
    }
}
.child-form-panel hr {
    border-top-color: var(--mesada-line);
}

.mesada-color-input {
    height: calc(2.25rem + 2px);
    padding: .2rem;
}

.empty-state {
    display: grid;
    place-items: center;
    min-height: 260px;
    padding: 2rem;
    text-align: center;
    border: 1px dashed var(--mesada-line);
    border-radius: 8px;
    background: #fbfdff;
}

.empty-state i {
    display: grid;
    place-items: center;
    width: 74px;
    height: 74px;
    margin-bottom: 1rem;
    border-radius: 8px;
    background: #fff3cd;
    color: #a06d00;
    font-size: 2rem;
}

.empty-state h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
}

.empty-state p {
    margin: .5rem 0 0;
    color: var(--mesada-muted);
}

.child-list {
    display: grid;
    gap: .75rem;
}

.child-list-item {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    gap: .85rem;
    align-items: center;
    padding: .9rem;
    border: 1px solid var(--mesada-line);
    border-radius: 8px;
    background: #fff;
}

.child-mini-avatar {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 8px;
    color: #fff;
    font-size: 1.35rem;
    font-weight: 800;
}

.child-list-content h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
}

.child-list-content p,
.child-list-money span {
    margin: .15rem 0 0;
    color: var(--mesada-muted);
}

.child-list-money {
    text-align: right;
}

.child-list-money strong {
    display: block;
    font-size: 1.2rem;
}

@media (max-width: 575.98px) {
    .child-list-item {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .child-mini-avatar {
        width: 48px;
        height: 48px;
    }

    .child-list-money {
        grid-column: 2;
        text-align: left;
    }
}

.model-event-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem;
}

.model-event-card {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: .8rem;
    padding: .9rem;
    border: 1px solid var(--mesada-line);
    border-radius: 8px;
    background: #fff;
}

.model-event-card.is-selected {
    background: #f6fff9;
    border-color: rgba(53, 196, 140, .35);
}

.model-event-icon,
.family-event-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 8px;
    color: #fff;
    font-size: 1.25rem;
}

.model-event-title {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    align-items: flex-start;
}

.model-event-title h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
}

.model-event-body p {
    margin: .15rem 0 .65rem;
    color: var(--mesada-muted);
}

.model-event-form .form-control {
    min-width: 0;
}

.family-event-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

.family-event-item {
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr) auto auto;
    gap: .8rem;
    align-items: center;
    padding: .85rem;
    border: 1px solid var(--mesada-line);
    border-radius: 8px;
    background: #fff;
}

.family-event-item.is-disabled {
    opacity: .62;
    background: #f8f9fa;
}

.family-event-icon {
    width: 50px;
    height: 50px;
}

.family-event-item h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
}

.family-event-item p {
    margin: .2rem 0 0;
    color: var(--mesada-muted);
}

.family-event-item strong {
    white-space: nowrap;
}

@media (max-width: 991.98px) {
    .family-event-list,
    .model-event-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .family-event-item {
        grid-template-columns: 44px minmax(0, 1fr) auto;
    }

    .family-event-icon {
        width: 44px;
        height: 44px;
    }

    .family-event-item form {
        grid-column: 3;
    }
}

.compact-empty-state {
    min-height: 220px;
}

.statement-list {
    display: grid;
    gap: .75rem;
}

.statement-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: .9rem;
    border: 1px solid var(--mesada-line);
    border-radius: 8px;
    background: #fff;
}

.statement-item h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
}

.statement-item p {
    margin: .25rem 0 0;
    color: var(--mesada-muted);
}

.statement-item strong {
    white-space: nowrap;
    font-size: 1.1rem;
}

@media (max-width: 575.98px) {
    .statement-item {
        grid-template-columns: 1fr;
    }

    .statement-item strong {
        justify-self: start;
    }
}

.goal-list,
.achievement-grid {
    display: grid;
    gap: .85rem;
}

.goal-card {
    display: grid;
    gap: .85rem;
    padding: 1rem;
    border: 1px solid var(--mesada-line);
    border-radius: 8px;
    background: #fff;
}

.goal-card.is-finished {
    background: #f8f9fa;
}

.goal-card-main {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: .85rem;
    align-items: center;
}

.goal-title-line {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    align-items: flex-start;
}

.goal-title-line h3,
.achievement-card h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
}

.goal-card p,
.achievement-card p {
    margin: .25rem 0 0;
    color: var(--mesada-muted);
}

.goal-progress-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .75rem;
    align-items: center;
}

.goal-progress {
    height: 1.35rem;
    border-radius: 8px;
    background: #eef3f7;
}

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

.achievement-card {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: .85rem;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--mesada-line);
    border-radius: 8px;
    background: #fff;
}

.achievement-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 8px;
    color: #fff;
    font-size: 1.25rem;
}

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

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

    .goal-progress-row {
        grid-template-columns: 1fr;
    }
}

.account-info-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .35rem 1rem;
    margin: 0;
}

.account-info-list dt {
    color: var(--mesada-muted);
    font-weight: 700;
}

.account-info-list dd {
    margin: 0;
    font-weight: 700;
}

.family-member-list {
    display: grid;
    gap: .75rem;
}

.family-member-item {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: .85rem;
    align-items: center;
    padding: .9rem;
    border: 1px solid var(--mesada-line);
    border-radius: 8px;
    background: #fff;
}

.family-member-avatar {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 8px;
    background: var(--mesada-lilac);
    color: #fff;
    font-size: 1.35rem;
    font-weight: 800;
}

.family-member-title {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    align-items: flex-start;
}

.family-member-title h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
}

.family-member-body p {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: .25rem 0 0;
    color: var(--mesada-muted);
}

.family-member-body p span {
    font-weight: 700;
}

.statement-filter {
    margin-bottom: 1rem;
    padding: .9rem;
    border: 1px solid var(--mesada-line);
    border-radius: 8px;
    background: #fbfdff;
}

.statement-filter label {
    font-size: .82rem;
    color: var(--mesada-muted);
}

.statement-filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
}

.statement-filter-actions .btn {
    margin: 0;
}

.statement-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
    margin-bottom: 1rem;
}

.statement-summary span {
    display: grid;
    gap: .15rem;
    padding: .8rem;
    border: 1px solid var(--mesada-line);
    border-radius: 8px;
    background: #fff;
}

.statement-summary small {
    color: var(--mesada-muted);
    font-weight: 700;
    text-transform: uppercase;
}

.statement-summary strong {
    font-size: 1.1rem;
}

@media (max-width: 575.98px) {
    .statement-filter-actions,
    .statement-summary {
        grid-template-columns: 1fr;
    }
}

.icon-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(54px, 1fr));
    gap: 10px;
}

.icon-picker-grid .btn {
    min-height: 48px;
    font-size: 1.2rem;
}

.inner-panel {
    margin: 0 0 12px 54px;
    padding: 16px;
    border: 1px dashed rgba(49, 168, 255, 0.35);
    box-shadow: none;
}

.statement-summary {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

@media (max-width: 767.98px) {
    .inner-panel {
        margin-left: 0;
    }
}
.event-suggestions-panel {
    min-height: 620px;
}

.event-suggestions-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    align-items: start;
}

.event-suggestion-column {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 520px;
    padding: .85rem;
    border: 1px solid var(--mesada-line);
    border-radius: 8px;
    background: #fbfdff;
}

.event-suggestion-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .75rem;
}

.event-suggestion-title h3 {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 800;
}

.event-suggestion-scroll {
    max-height: 470px;
    overflow-y: auto;
    padding-right: .35rem;
}

.event-suggestion-scroll.model-event-grid {
    grid-template-columns: 1fr;
    align-content: start;
}

.event-suggestion-scroll::-webkit-scrollbar {
    width: 8px;
}

.event-suggestion-scroll::-webkit-scrollbar-thumb {
    border-radius: 8px;
    background: rgba(38, 50, 56, .18);
}

.event-suggestion-gain {
    border-color: rgba(53, 196, 140, .28);
}

.event-suggestion-adjust {
    border-color: rgba(255, 138, 76, .3);
}

@media (max-width: 991.98px) {
    .event-suggestions-split {
        grid-template-columns: 1fr;
    }

    .event-suggestion-column {
        min-height: auto;
    }

    .event-suggestion-scroll {
        max-height: 420px;
    }
}
.custom-icon-preview {
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 46px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    font-size: 1.35rem;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35), 0 8px 18px rgba(38, 50, 56, .12);
}

.custom-icon-preview:focus {
    outline: 3px solid rgba(49, 168, 255, .28);
    outline-offset: 2px;
}