.frpi {
    --frpi-navy: #0b2341;
    --frpi-blue: #0f5f8f;
    --frpi-teal: #07998f;
    --frpi-gold: #e7ad35;
    --frpi-red: #c9484f;
    --frpi-green: #13866f;
    --frpi-ink: #172033;
    --frpi-muted: #5e6878;
    --frpi-line: #dfe7ef;
    --frpi-soft: #f4f8fb;
    color: var(--frpi-ink);
    font-family: inherit;
}

.frpi *, .frpi *::before, .frpi *::after { box-sizing: border-box; }
.frpi h2, .frpi h3, .frpi p { margin-top: 0; }

.frpi-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(240px, .7fr);
    gap: 28px;
    align-items: center;
    padding: clamp(26px, 5vw, 52px);
    margin-bottom: 24px;
    overflow: hidden;
    border-radius: 24px;
    color: #fff;
    background:
        radial-gradient(circle at 86% 8%, rgba(35, 214, 197, .35), transparent 35%),
        linear-gradient(135deg, #071a33 0%, #0b3657 56%, #087d82 100%);
    box-shadow: 0 18px 45px rgba(11, 35, 65, .2);
}

.frpi-kicker {
    display: inline-block;
    margin-bottom: 10px;
    color: #a8fff2;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .11em;
}

.frpi-hero h2 { margin-bottom: 12px; color: #fff; font-size: clamp(30px, 5vw, 50px); line-height: 1.08; }
.frpi-hero p { margin-bottom: 0; max-width: 720px; color: rgba(255, 255, 255, .88); font-size: 17px; line-height: 1.7; }

.frpi-hero-note {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 18px;
    background: rgba(255, 255, 255, .1);
    backdrop-filter: blur(8px);
}
.frpi-hero-note strong { color: #fff; font-size: 16px; }
.frpi-hero-note span { color: rgba(255, 255, 255, .82); font-size: 13px; line-height: 1.55; }

.frpi-notice, .frpi-quality {
    padding: 14px 16px;
    border: 1px solid #9cddd5;
    border-radius: 12px;
    color: #075e58;
    background: #ecfbf8;
}
.frpi-quality-low { border-color: #ecd496; color: #6d4c05; background: #fff8e7; }

.frpi-month {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 12px;
    padding: 16px;
    margin: 0 0 20px;
    border: 1px solid var(--frpi-line);
    border-radius: 15px;
    background: #fff;
}
.frpi-month label { display: grid; gap: 7px; color: var(--frpi-muted); font-size: 13px; font-weight: 700; }

.frpi input, .frpi select {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #cbd7e3;
    border-radius: 10px;
    color: var(--frpi-ink);
    background: #fff;
    font: inherit;
}
.frpi input:focus, .frpi select:focus { outline: 3px solid rgba(7, 153, 143, .16); border-color: var(--frpi-teal); }

.frpi button, .frpi-button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 11px 18px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    background: var(--frpi-navy);
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}
.frpi button:hover, .frpi-button:hover { color: #fff; background: #12385f; }
.frpi-link, .frpi-cancel { margin-left: 12px; font-weight: 700; }

.frpi-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 0 0 18px;
}
.frpi-stats article, .frpi-group-grid article {
    padding: 18px;
    border: 1px solid var(--frpi-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(20, 52, 84, .06);
}
.frpi-stats span, .frpi-group-grid span { display: block; margin-bottom: 7px; color: var(--frpi-muted); font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.frpi-stats strong, .frpi-group-grid strong { display: block; color: var(--frpi-navy); font-size: clamp(21px, 3vw, 29px); line-height: 1.15; }
.frpi-stats small, .frpi-group-grid small { display: block; margin-top: 8px; color: #768092; line-height: 1.4; }
.frpi-stats .frpi-good { color: var(--frpi-green); }

.frpi-layout { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 20px; margin-top: 20px; }
.frpi-card {
    padding: clamp(20px, 4vw, 30px);
    margin: 0 0 20px;
    border: 1px solid var(--frpi-line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(20, 52, 84, .07);
}

.frpi-section-heading { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 20px; }
.frpi-section-heading > span {
    display: inline-flex;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--frpi-teal), var(--frpi-blue));
    font-size: 12px;
    font-weight: 900;
}
.frpi-section-heading h3 { margin: 2px 0 5px; color: var(--frpi-navy); font-size: 21px; }
.frpi-section-heading p { margin: 0; color: var(--frpi-muted); font-size: 13px; line-height: 1.55; }

.frpi-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.frpi-fields label, .frpi-delete label, .frpi-privacy label { display: grid; gap: 7px; color: #344054; font-size: 13px; font-weight: 800; }
.frpi-fields small { color: #7b8492; font-size: 11px; font-weight: 500; }
.frpi-unit-preview { padding: 12px 14px; margin: 16px 0; border-left: 4px solid var(--frpi-gold); border-radius: 8px; color: #4e3a0a; background: #fff8e8; font-weight: 700; }

.frpi-delete { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--frpi-line); }
.frpi-delete summary, .frpi-privacy summary { color: #9a2730; font-weight: 800; cursor: pointer; }
.frpi-delete button, .frpi-danger { margin-top: 10px; background: #a52d36 !important; }

.frpi-chart-wrap { width: 100%; overflow-x: auto; }
.frpi-chart { display: block; width: 100%; min-width: 620px; height: auto; }
.frpi-axis { stroke: #aab7c5; stroke-width: 1; }
.frpi-bar-up { fill: var(--frpi-red); }
.frpi-bar-down { fill: var(--frpi-green); }
.frpi-chart-label { fill: #6d7786; font-size: 11px; }
.frpi-chart-value { fill: #253247; font-size: 10px; font-weight: 800; }
.frpi-legend { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; color: var(--frpi-muted); font-size: 12px; }
.frpi-legend i { display: inline-block; width: 10px; height: 10px; margin-right: 5px; border-radius: 3px; }
.frpi-legend .up { background: var(--frpi-red); }
.frpi-legend .down { background: var(--frpi-green); }

.frpi-group-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.frpi-group-grid strong { font-size: 22px; }

.frpi-table { width: 100%; overflow-x: auto; }
.frpi-table table { width: 100%; min-width: 760px; border-collapse: collapse; }
.frpi-table th { padding: 11px 10px; border-bottom: 2px solid var(--frpi-line); color: var(--frpi-muted); font-size: 11px; letter-spacing: .02em; text-align: left; text-transform: uppercase; }
.frpi-table td { padding: 13px 10px; border-bottom: 1px solid #edf1f5; color: #344054; font-size: 13px; vertical-align: top; }
.frpi-table td small { display: block; margin-top: 4px; color: #7b8492; }
.frpi-table a { font-weight: 800; }
.frpi-pill { display: inline-block; padding: 5px 8px; border-radius: 999px; font-weight: 900; white-space: nowrap; }
.frpi-pill.up { color: #9b252e; background: #fff0f1; }
.frpi-pill.down { color: #096957; background: #eaf9f5; }

.frpi-method { border-left: 5px solid var(--frpi-blue); background: var(--frpi-soft); }
.frpi-method h3, .frpi-privacy h3 { color: var(--frpi-navy); }
.frpi-method p, .frpi-privacy p { color: #4f5b6d; line-height: 1.72; }
.frpi-data-actions { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.frpi-data-actions form { margin: 0; }
.frpi-secondary { color: var(--frpi-navy) !important; border: 1px solid #b9c9d8 !important; background: #fff !important; }
.frpi-empty { padding: 22px; border-radius: 12px; color: var(--frpi-muted); background: var(--frpi-soft); text-align: center; }

.frpi-login { padding: 34px; border-radius: 20px; color: #fff; background: linear-gradient(135deg, #081e39, #087f83); }
.frpi-login h2 { color: #fff; }
.frpi-login p { color: rgba(255,255,255,.88); }
.frpi-login .frpi-link { color: #fff; }

@media (max-width: 980px) {
    .frpi-hero, .frpi-layout { grid-template-columns: 1fr; }
    .frpi-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .frpi-group-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
    .frpi-hero { padding: 24px 20px; border-radius: 18px; }
    .frpi-hero h2 { font-size: 32px; }
    .frpi-stats, .frpi-fields, .frpi-group-grid { grid-template-columns: 1fr; }
    .frpi-card { padding: 18px 15px; border-radius: 16px; }
    .frpi-month { align-items: stretch; }
    .frpi-month label, .frpi-month button { width: 100%; }
    .frpi-link, .frpi-cancel { display: block; margin: 12px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
    .frpi *, .frpi *::before, .frpi *::after { scroll-behavior: auto !important; transition: none !important; }
}



/* 0.2.0 – Çoklu alışveriş girişi */
.frpi-form-card { margin-top: 20px; }
.frpi-entry-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--frpi-line);
    border-radius: 15px;
    background: #fbfdff;
}
.frpi-entry-table {
    width: 100%;
    min-width: 1080px;
    border-collapse: separate;
    border-spacing: 0;
}
.frpi-entry-table th {
    padding: 12px 10px;
    border-bottom: 2px solid var(--frpi-line);
    color: var(--frpi-navy);
    background: #f3f7fb;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .025em;
    line-height: 1.35;
    text-align: left;
    text-transform: uppercase;
    vertical-align: bottom;
}
.frpi-entry-table th:first-child { border-radius: 14px 0 0; }
.frpi-entry-table th:last-child { border-radius: 0 14px 0 0; }
.frpi-entry-table td {
    min-width: 0;
    padding: 12px 8px;
    border-bottom: 1px solid #e9eff5;
    background: #fff;
    vertical-align: top;
}
.frpi-entry-table tr:last-child td { border-bottom: 0; }
.frpi-entry-table td:nth-child(1) { width: 130px; }
.frpi-entry-table td:nth-child(2) { width: 175px; }
.frpi-entry-table td:nth-child(3) { width: 180px; }
.frpi-entry-table td:nth-child(4) { width: 110px; }
.frpi-entry-table td:nth-child(5) { width: 125px; }
.frpi-entry-table td:nth-child(6) { width: 150px; }
.frpi-entry-table td:nth-child(7) { width: 135px; }
.frpi-entry-table td:nth-child(8) { width: 75px; }
.frpi-entry-table input,
.frpi-entry-table select { min-height: 44px; padding: 9px 10px; font-size: 13px; }
.frpi-entry-table td small { display: block; margin-top: 5px; color: #7b8492; font-size: 10px; line-height: 1.35; }
.frpi-row-cost {
    display: flex;
    min-height: 44px;
    align-items: center;
    padding: 9px 10px;
    border: 1px solid #ead8a8;
    border-radius: 10px;
    color: #66501b;
    background: #fff8e8;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
}
.frpi-row-cost.is-ready { border-color: #9cddd5; color: #075e58; background: #ecfbf8; }
.frpi-entry-actions { white-space: nowrap; }
.frpi-entry-actions .frpi-row-add,
.frpi-entry-actions .frpi-row-remove {
    width: 36px;
    min-height: 36px;
    padding: 0;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
}
.frpi-entry-actions .frpi-row-add { background: var(--frpi-teal); }
.frpi-entry-actions .frpi-row-add:hover { background: #067970; }
.frpi-entry-actions .frpi-row-remove { margin-left: 4px; color: #a52d36; border: 1px solid #e3b9bd; background: #fff; }
.frpi-entry-actions .frpi-row-remove:hover { color: #fff; background: #a52d36; }
.frpi-entry-row:only-child .frpi-row-remove { display: none; }
.frpi-entry-row:not(:last-child) .frpi-row-add { visibility: hidden; }
.frpi-row-add:disabled { cursor: not-allowed; opacity: .45; }
.frpi-entry-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 16px; }
.frpi-entry-footer p { margin: 0; color: var(--frpi-muted); font-size: 13px; line-height: 1.5; }
.frpi-entry-footer .frpi-button { flex: 0 0 auto; }

@media (max-width: 900px) {
    .frpi-entry-table-wrap { overflow: visible; border: 0; background: transparent; }
    .frpi-entry-table { display: block; min-width: 0; }
    .frpi-entry-table thead { display: none; }
    .frpi-entry-table tbody { display: grid; gap: 14px; }
    .frpi-entry-table tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        padding: 16px;
        border: 1px solid var(--frpi-line);
        border-radius: 14px;
        background: #f8fbfd;
    }
    .frpi-entry-table td,
    .frpi-entry-table tr:last-child td {
        display: flex;
        width: auto !important;
        min-width: 0;
        flex-direction: column;
        padding: 0;
        border: 0;
        background: transparent;
    }
    .frpi-entry-table td::before {
        content: attr(data-label);
        margin-bottom: 6px;
        color: #344054;
        font-size: 11px;
        font-weight: 900;
        letter-spacing: .02em;
        text-transform: uppercase;
    }
    .frpi-entry-actions {
        grid-column: 1 / -1;
        flex-direction: row !important;
        align-items: center;
        justify-content: flex-end;
    }
    .frpi-entry-actions::before { margin: 0 auto 0 0 !important; }
}

@media (max-width: 620px) {
    .frpi-entry-table tr { grid-template-columns: 1fr; padding: 14px; }
    .frpi-entry-actions { grid-column: auto; }
    .frpi-entry-footer { align-items: stretch; flex-direction: column; }
    .frpi-entry-footer .frpi-button { width: 100%; }
}
