/* STRELA — страница фонда (светлая / тёмная тема, ru/kz) */
:root {
    --fd-font: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --fd-max: 560px;
    --fd-r: 18px;
    --fd-accent-a: #ff3b6b;
    --fd-accent-b: #ff8c42;
    --fd-grad: linear-gradient(135deg, var(--fd-accent-a) 0%, var(--fd-accent-b) 100%);
}

[data-theme='dark'] {
    --fd-bg: #0d1520;
    --fd-bg2: #111c2e;
    --fd-card: #161f30;
    --fd-text: #f0f4ff;
    --fd-muted: #8292b0;
    --fd-border: rgba(255, 255, 255, 0.08);
    --fd-track: rgba(255, 255, 255, 0.12);
    --fd-pill-bg: rgba(255, 59, 107, 0.15);
}

[data-theme='light'] {
    --fd-bg: #f1f5f9;
    --fd-bg2: #ffffff;
    --fd-card: #ffffff;
    --fd-text: #1e293b;
    --fd-muted: #64748b;
    --fd-border: rgba(0, 0, 0, 0.08);
    --fd-track: #e2e8f0;
    --fd-pill-bg: rgba(255, 59, 107, 0.1);
}

.fond-body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--fd-font);
    background: var(--fd-bg);
    color: var(--fd-text);
    -webkit-font-smoothing: antialiased;
}

.fond-wrap {
    max-width: var(--fd-max);
    margin: 0 auto;
    padding: 12px 16px 100px;
    box-sizing: border-box;
}

.fond-lang {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
}

.fond-lang a {
    color: var(--fd-muted);
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--fd-border);
}

.fond-lang a.is-active {
    color: var(--fd-text);
    border-color: rgba(255, 59, 107, 0.45);
    background: var(--fd-pill-bg);
}

.fond-hero {
    background: var(--fd-card);
    border: 1px solid var(--fd-border);
    border-radius: var(--fd-r);
    padding: 22px 20px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    margin-bottom: 16px;
}

[data-theme='dark'] .fond-hero {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.fond-hero__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.fond-hero__period {
    font-size: 1.75rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.fond-hero__year {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--fd-accent-a);
    margin-top: 4px;
}

.fond-badge {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--fd-pill-bg);
    color: var(--fd-accent-a);
    border: 1px solid rgba(255, 59, 107, 0.35);
}

.fond-mission {
    font-size: 15px;
    line-height: 1.55;
    color: var(--fd-muted);
    margin: 0 0 16px;
}

.fond-mission strong {
    color: var(--fd-text);
    font-weight: 600;
}

.fond-progress-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 10px;
}

.fond-progress-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--fd-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.fond-progress-sum {
    font-size: 1.35rem;
    font-weight: 800;
}

.fond-progress-pct {
    font-size: 1.85rem;
    font-weight: 900;
    background: var(--fd-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
}

.fond-track {
    height: 14px;
    border-radius: 999px;
    background: var(--fd-track);
    overflow: hidden;
    margin-bottom: 14px;
}

.fond-fill {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: var(--fd-grad);
    transition: width 1s cubic-bezier(0.34, 1.3, 0.64, 1);
}

.fond-goal-line {
    font-size: 13px;
    color: var(--fd-muted);
    margin: 0 0 18px;
}

.fond-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px 18px;
    border: none;
    border-radius: 14px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #fff;
    cursor: pointer;
    background: var(--fd-grad);
    box-shadow: 0 6px 22px rgba(255, 59, 107, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fond-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(255, 59, 107, 0.4);
}

.fond-cta:active {
    transform: translateY(1px);
}

.fond-pillars {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 18px;
}

.fond-pillar {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--fd-muted);
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(56, 189, 248, 0.06);
    border: 1px solid var(--fd-border);
}

.fond-pillar i {
    color: #38bdf8;
    margin-top: 2px;
    flex-shrink: 0;
}

.fond-section-title {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--fd-muted);
    margin: 22px 0 12px;
}

.fond-tx {
    background: var(--fd-card);
    border: 1px solid var(--fd-border);
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 10px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.fond-tx__icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e10000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fond-tx__icon img {
    width: 25px;
    height: 25px;
    object-fit: contain;
    display: block;
    line-height: 0;
}

.fond-tx__col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fond-tx__main {
    flex: 1;
    min-width: 0;
}

.fond-tx__admin {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.fond-tx-admin-btn {
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid var(--fd-border);
    background: var(--fd-track);
    color: var(--fd-text);
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.fond-tx-admin-btn:hover:not(:disabled) {
    border-color: rgba(56, 189, 248, 0.45);
    background: rgba(56, 189, 248, 0.1);
}

.fond-tx-admin-btn--del {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.35);
}

.fond-tx-admin-btn--del:hover:not(:disabled) {
    border-color: rgba(239, 68, 68, 0.55);
    background: rgba(239, 68, 68, 0.12);
}

.fond-tx-admin-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.fond-tx__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
}

.fond-tx__name {
    font-weight: 700;
    font-size: 15px;
}

.fond-tx__amt {
    font-weight: 800;
    color: #22c55e;
    white-space: nowrap;
    font-size: 15px;
}

.fond-tx__meta {
    font-size: 12px;
    color: var(--fd-muted);
}

.fond-tx__msg {
    margin-top: 8px;
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--fd-muted);
    border-radius: 0 10px 10px 0;
    border-left: 3px solid var(--fd-accent-a);
    background: rgba(255, 59, 107, 0.06);
}

.fond-empty {
    text-align: center;
    padding: 28px 16px;
    color: var(--fd-muted);
    font-size: 14px;
}

/* Modal */
.fond-modal {
    position: fixed;
    inset: 0;
    z-index: 10060;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    background: rgba(15, 23, 42, 0.72);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.fond-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.fond-modal__sheet {
    width: 100%;
    max-width: var(--fd-max);
    max-height: 92vh;
    overflow-y: auto;
    background: var(--fd-card);
    border-radius: 22px 22px 0 0;
    padding: 22px 20px 28px;
    box-sizing: border-box;
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.34, 1.2, 0.64, 1);
    border: 1px solid var(--fd-border);
}

.fond-modal.is-open .fond-modal__sheet {
    transform: translateY(0);
}

@media (min-width: 520px) {
    .fond-modal {
        align-items: center;
        padding: 24px;
    }
    .fond-modal__sheet {
        border-radius: var(--fd-r);
        transform: translateY(16px) scale(0.96);
        opacity: 0;
    }
    .fond-modal.is-open .fond-modal__sheet {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.fond-modal__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.fond-modal__title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
}

.fond-modal__close {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: var(--fd-track);
    color: var(--fd-text);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.fond-req {
    margin-bottom: 14px;
}

.fond-req__label {
    font-size: 12px;
    font-weight: 600;
    color: var(--fd-muted);
    margin-bottom: 6px;
}

.fond-req__card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--fd-grad);
    color: #fff;
    cursor: pointer;
    border: none;
    width: 100%;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-align: left;
    box-shadow: 0 6px 20px rgba(255, 59, 107, 0.25);
}

.fond-req__card small {
    display: block;
    font-size: 11px;
    font-weight: 600;
    opacity: 0.85;
    margin-bottom: 4px;
    letter-spacing: 0;
}

.fond-kaspi-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    margin-top: 8px;
    border-radius: 14px;
    border: none;
    font-family: inherit;
    font-weight: 800;
    font-size: 15px;
    color: #fff;
    background: #e10000;
    cursor: pointer;
    box-shadow: 0 6px 0 #9f0000;
    transition: transform 0.12s ease;
}

.fond-kaspi-btn:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 #9f0000;
}

.fond-kaspi-btn img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.fond-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    z-index: 10070;
    padding: 12px 20px;
    border-radius: 999px;
    background: var(--fd-text);
    color: var(--fd-bg);
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    transition: transform 0.35s ease, opacity 0.35s ease;
    pointer-events: none;
}

.fond-toast.is-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Админ: запись поступления */
.fond-admin-bar {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--fd-border);
}

.fond-admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid var(--fd-border);
    background: transparent;
    color: var(--fd-muted);
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.fond-admin-btn:hover {
    border-color: rgba(56, 189, 248, 0.45);
    color: var(--fd-text);
    background: rgba(56, 189, 248, 0.08);
}

.fond-modal--admin {
    z-index: 10065;
}

.fond-field {
    margin-bottom: 14px;
}

.fond-field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--fd-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.fond-field input,
.fond-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--fd-border);
    background: var(--fd-bg);
    color: var(--fd-text);
    font-family: inherit;
    font-size: 15px;
}

.fond-field textarea {
    min-height: 88px;
    resize: vertical;
}

.fond-field input:focus,
.fond-field textarea:focus {
    outline: none;
    border-color: rgba(255, 59, 107, 0.45);
}

.fond-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.fond-form-actions button {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    font-family: inherit;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    border: none;
}

.fond-form-submit {
    background: var(--fd-grad);
    color: #fff;
}

.fond-form-cancel {
    background: var(--fd-track);
    color: var(--fd-text);
}

.fond-form-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
