/* تتبع سريع + عقود منتهية + سداد مبكر */

.track-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.track-link { font-weight: 600; color: var(--brand-dark); text-decoration: none; }
.track-link:hover { text-decoration: underline; }
.track-link--sub { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.track-link-static { font-weight: 600; color: var(--text); }

.completed-contracts-shell .completed-summary { margin-bottom: 16px; }

.early-settlement-shell .early-settlement-hint { margin: 0 0 12px; font-size: 13px; }
.early-settlement-contract-card {
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f8fafc;
}
.early-settlement-contract-card__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}
.early-settlement-contract-card__title { font-size: 13px; font-weight: 700; color: var(--text); }
.early-settlement-contract-card__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px 16px;
    margin: 0;
}
.early-settlement-contract-card__item { margin: 0; }
.early-settlement-contract-card__item dt {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0 0 2px;
}
.early-settlement-contract-card__item dd {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}
.early-settlement-hero__savings-note {
    display: block;
    margin-top: 8px;
    font-size: 11px;
    line-height: 1.4;
    color: var(--text-muted);
    font-weight: 500;
}
.early-settlement-hero {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: center;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdfa 55%, #fff 100%);
    border: 1px solid #99f6e4;
}
.early-settlement-hero__label { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.early-settlement-hero__amount { display: block; font-size: 2rem; font-weight: 800; color: #047857; margin: 4px 0; }
.early-settlement-hero__contract { font-size: 13px; color: var(--text-muted); }
.early-settlement-hero__savings {
    text-align: center;
    padding: 16px 20px;
    border-radius: 12px;
    background: #fff;
    border: 1px dashed #14b8a6;
    min-width: 200px;
}
.early-settlement-hero__savings-label { font-size: 12px; color: #0f766e; font-weight: 600; }
.early-settlement-hero__savings-value { display: block; font-size: 1.5rem; font-weight: 800; color: #059669; margin: 4px 0; }
.early-settlement-hero__savings-pct { font-size: 12px; color: var(--text-muted); }
.waiver-preset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}
.waiver-preset-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 10px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, transform 0.1s;
    font-family: inherit;
}
.waiver-preset-btn:hover { border-color: #99f6e4; background: #f0fdfa; }
.waiver-preset-btn.is-active {
    border-color: var(--brand);
    background: #ccfbf1;
    transform: translateY(-1px);
}
.waiver-preset-btn.is-recommended.is-active {
    border-color: #059669;
    background: linear-gradient(180deg, #ecfdf5, #ccfbf1);
}
.waiver-preset-btn__pct { font-size: 18px; font-weight: 800; color: #0f766e; }
.waiver-preset-btn__hint { font-size: 10px; color: var(--text-muted); font-weight: 600; }
.early-settlement-shell .early-settlement-scroll {
    padding: 12px 16px 20px;
}

.early-settlement-shell .early-settlement-picker {
    margin-bottom: 12px;
}

.early-settlement-footer {
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    box-shadow: 0 -6px 24px rgba(15, 23, 42, 0.07);
}

.early-settlement-footer__summary {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.early-settlement-footer__label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.early-settlement-footer__amount {
    font-size: 1.35rem;
    font-weight: 800;
    color: #047857;
    line-height: 1.2;
}

.early-settlement-footer__meta {
    font-size: 12px;
    line-height: 1.4;
}

.early-settlement-footer__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.early-settlement-footer__confirm {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-height: 52px;
    padding: 10px 28px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}

.early-settlement-footer__confirm-amount {
    font-size: 13px;
    font-weight: 800;
    opacity: 0.92;
}

.early-settlement-shell .summary-row {
    margin-bottom: 12px;
}

@media (max-width: 900px) {
    .early-settlement-hero__amount { font-size: 1.65rem; }
    .early-settlement-contract-card__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .early-settlement-hero { grid-template-columns: 1fr; }
    .early-settlement-hero__savings { min-width: 0; }
}

@media (max-width: 640px) {
    .early-settlement-shell .early-settlement-scroll {
        padding: 10px 12px 16px;
    }

    .early-settlement-footer {
        flex-direction: column;
        align-items: stretch;
        padding: 12px 14px;
    }

    .early-settlement-footer__actions {
        flex-direction: column-reverse;
        width: 100%;
    }

    .early-settlement-footer__actions .btn,
    .early-settlement-footer__confirm {
        width: 100%;
        justify-content: center;
    }

    .early-settlement-contract-card__grid {
        grid-template-columns: 1fr;
    }

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