.balance-claims-page {
    --claim-blue: #245f8a;
    --claim-blue-light: #eef6fb;
    --claim-text: #263746;
    --claim-muted: #728293;
    max-width: 1450px;
    margin: 0 auto;
    padding: 26px;
    color: var(--claim-text);
}

.claims-page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
    padding: 26px 30px;
    color: #fff;
    background: linear-gradient(135deg, #173f5f, #2d749f);
    border-radius: 18px;
    box-shadow: 0 12px 32px rgba(23, 63, 95, .16);
}
.claims-page-heading span { color: #bfe8ff; font-size: 12px; font-weight: 700; }
.claims-page-heading h2 { margin: 4px 0 7px; font-size: 26px; font-weight: 800; }
.claims-page-heading p { margin: 0; color: rgba(255,255,255,.76); }
.claims-page-heading .btn { color: #215b82; background: #fff; border-color: #fff; }

.claims-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 20px;
    align-items: start;
}
.claims-card {
    margin-bottom: 18px;
    padding: 23px;
    background: #fff;
    border: 1px solid #e3eaf1;
    border-radius: 16px;
    box-shadow: 0 7px 24px rgba(33, 56, 77, .06);
}
.claims-card-title {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}
.claims-card-title > i {
    display: grid;
    flex: 0 0 39px;
    width: 39px;
    height: 39px;
    place-items: center;
    color: var(--claim-blue);
    background: var(--claim-blue-light);
    border-radius: 10px;
}
.claims-card h3,
.claims-card-title h3 { margin: 0; color: #173f5f; font-size: 18px; font-weight: 800; }
.claims-card-title p { margin: 4px 0 0; color: var(--claim-muted); font-size: 12px; }

.claim-template {
    min-height: 270px !important;
    padding: 17px;
    direction: rtl;
    line-height: 1.9;
    resize: vertical;
}
.claim-variable-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 13px;
}
.claim-variable {
    padding: 8px 10px;
    text-align: right;
    background: #f7fafc;
    border: 1px solid #dce6ed;
    border-radius: 9px;
    cursor: pointer;
}
.claim-variable:hover { background: #edf7fc; border-color: #9dc5dc; }
.claim-variable code { color: #205d87; background: transparent; }
.claim-variable span { display: block; margin-top: 3px; color: var(--claim-muted); font-size: 10px; }

.claim-condition-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.claim-condition { position: relative; cursor: pointer; }
.claim-condition input { position: absolute; opacity: 0; }
.claim-condition > span {
    display: block;
    height: 100%;
    padding: 15px;
    border: 2px solid #e4eaf0;
    border-radius: 11px;
}
.claim-condition input:checked + span { background: #eef7fc; border-color: var(--claim-blue); }
.claim-condition strong { display: block; margin-bottom: 4px; }
.claim-condition small { display: block; color: var(--claim-muted); }
.claim-condition-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 260px));
    gap: 12px;
    margin-top: 14px;
    padding: 15px;
    background: #fff9ed;
    border: 1px solid #f1ddb6;
    border-radius: 10px;
}
.claim-condition-details label,
.claims-field-label { display: block; margin: 14px 0 7px; font-weight: 700; }
.claim-condition-details label { margin-top: 0; }

.claims-enable-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
    padding: 14px;
    background: #f7fafc;
    border-radius: 10px;
}
.claims-enable-row strong,
.claims-enable-row small { display: block; }
.claims-enable-row small { margin-top: 3px; color: var(--claim-muted); font-size: 10px; }
.claim-switch input { display: none; }
.claim-switch span {
    display: block;
    position: relative;
    width: 54px;
    height: 29px;
    background: #c9d3dc;
    border-radius: 99px;
    cursor: pointer;
}
.claim-switch span:after {
    content: '';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 21px;
    height: 21px;
    background: #fff;
    border-radius: 50%;
    transition: .15s;
}
.claim-switch input:checked + span { background: #38a169; }
.claim-switch input:checked + span:after { transform: translateX(-25px); }
.claims-radio-row { display: flex; gap: 20px; }
.claims-radio-row input { margin-left: 5px; }
.claim-day-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.claim-day-grid input { display: none; }
.claim-day-grid span {
    display: block;
    padding: 8px;
    text-align: center;
    border: 1px solid #dce4eb;
    border-radius: 8px;
    cursor: pointer;
}
.claim-day-grid input:checked + span { color: #fff; background: var(--claim-blue); border-color: var(--claim-blue); }
.claim-time-row { display: grid; grid-template-columns: 1fr 44px; gap: 8px; margin-bottom: 8px; }
.claim-next-run {
    margin-top: 16px;
    padding: 12px;
    color: #245f8a;
    background: #edf7fc;
    border-radius: 9px;
}
.claim-next-run span,
.claim-next-run strong { display: block; margin-right: 22px; }
.claim-next-run span { font-size: 11px; }
.claim-save-button { padding: 13px; border-radius: 11px; }
.claim-last-run h4 { margin: 0 0 12px; color: #173f5f; }
.claim-last-run > div { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed #e4eaf0; }

.claims-table-card { padding: 0; overflow: hidden; }
.claims-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 23px;
    border-bottom: 1px solid #e6edf2;
}
.claims-table-toolbar h3 { margin: 0 0 4px; }
.claims-table-toolbar small { color: var(--claim-muted); }
.claim-search { position: relative; width: min(360px, 100%); }
.claim-search i { position: absolute; right: 13px; top: 14px; color: #8b9cab; }
.claim-search input { padding-right: 38px; }
.claims-table-card > .alert { margin: 16px 20px; }
.claims-table-wrap { overflow-x: auto; }
.claims-balance-table { min-width: 1080px; margin-bottom: 0; }
.claims-balance-table thead { color: #fff; background: #245f8a; }
.claims-balance-table th,
.claims-balance-table td { padding: 12px 10px !important; text-align: center; vertical-align: middle !important; white-space: nowrap; }
.claims-balance-table th { padding: 0 !important; }
.claim-sort-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    min-height: 45px;
    padding: 10px;
    color: #fff;
    background: transparent;
    border: 0;
    outline: 0;
    font: inherit;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: background .15s;
}
.claim-sort-button:hover,
.claim-sort-button:focus,
.claim-sort-button.is-active { color: #fff; background: rgba(255,255,255,.13); }
.claim-sort-button:focus { box-shadow: inset 0 0 0 2px rgba(255,255,255,.55); }
.claim-sort-button i { width: 12px; color: rgba(255,255,255,.7); }
.claim-sort-button.is-active i { color: #fff; }
.claims-balance-table td:nth-child(2) { min-width: 170px; text-align: right; white-space: normal; }
.claim-box-number { display: inline-block; padding: 5px 9px; color: #245f8a; background: #eaf4fa; border-radius: 7px; }
.claim-center-location,
.claim-net + small { display: block; margin-top: 4px; color: var(--claim-muted); font-size: 10px; }
.claim-positive { color: #176c50; font-weight: 700; }
.claim-negative { color: #bd3e3e; font-weight: 700; }
.claim-zero { color: #9aa7b2; }
.claim-link-state { display: inline-block; padding: 5px 8px; border-radius: 999px; font-size: 10px; }
.claim-link-state i { margin-left: 4px; }
.claim-link-state.is-linked { color: #176c50; background: #e6f7f0; }
.claim-link-state.is-unlinked { color: #9b4a4a; background: #fff0f0; }
.claim-empty-search { display: none; padding: 25px; text-align: center; color: var(--claim-muted); }

.claims-history-list > div {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    padding: 10px 0;
    border-bottom: 1px dashed #e5ebf0;
}
.claims-history-list > div:last-child { border-bottom: 0; }
.claim-history-status { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; }
.claim-history-status.is-sent { color: #176c50; background: #e6f7f0; }
.claim-history-status.is-failed { color: #b83b3b; background: #ffeded; }
.claims-history-list strong,
.claims-history-list small { display: block; }
.claims-history-list small { margin-top: 3px; color: var(--claim-muted); font-size: 10px; }

@media (max-width: 1000px) {
    .claims-layout { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
    .balance-claims-page { padding: 12px; }
    .claims-page-heading { align-items: flex-start; flex-direction: column; padding: 22px; }
    .claim-condition-grid,
    .claim-condition-details { grid-template-columns: 1fr; }
    .claims-table-toolbar { align-items: stretch; flex-direction: column; }
    .claim-search { width: 100%; }
}
