.mi-payment-box,
.mi-contract,
.mi-empty {
    direction: rtl;
    text-align: right;
    font-family: inherit;
}

.mi-payment-box [hidden],
.mi-quote [hidden] {
    display: none !important;
}

.mi-payment-box {
    margin: 22px 0;
    padding: 22px;
    border: 1px solid #eadede;
    border-radius: 20px;
    background: linear-gradient(145deg, #fff, var(--mi-cream));
    box-shadow: 0 12px 34px rgba(32, 22, 23, .07);
}

.mi-payment-box h3 { margin: 0 0 15px; color: var(--mi-dark); font-size: 20px; }
.mi-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mi-method, .mi-plan { display: block; cursor: pointer; }
.mi-method input, .mi-plan input { position: absolute; opacity: 0; pointer-events: none; }
.mi-method > span, .mi-plan > span {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 70px;
    padding: 14px 16px;
    border: 1px solid #dfd6d6;
    border-radius: 14px;
    background: #fff;
    transition: .2s ease;
}
.mi-method small, .mi-plan small { color: #756d6d; font-size: 12px; }
.mi-method.is-selected > span, .mi-plan.is-selected > span {
    border-color: var(--mi-primary);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--mi-primary) 14%, transparent);
}
.mi-method.is-selected strong, .mi-plan.is-selected strong { color: var(--mi-primary); }
.mi-plans { margin-top: 18px; }
.mi-label { margin: 0 0 10px; font-weight: 700; }
.mi-plan-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.mi-plan > span { min-height: auto; padding: 11px; text-align: center; }
.mi-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-top: 16px; overflow: hidden; border: 1px solid #eadede; border-radius: 14px; background: #eadede; }
.mi-summary > div { display: flex; justify-content: space-between; gap: 10px; padding: 13px; background: #fff; }
.mi-summary span { color: #746b6b; }
.mi-summary strong { color: var(--mi-dark); }
.mi-note { margin: 12px 0 0; color: #746b6b; font-size: 12px; }

.mi-contract { margin: 0 0 25px; overflow: hidden; border: 1px solid #e5dddd; border-radius: 20px; background: #fff; box-shadow: 0 10px 30px rgba(32, 22, 23, .06); }
.mi-contract > header { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 20px; background: var(--mi-cream); border-bottom: 1px solid #eadede; }
.mi-contract header small { color: var(--mi-primary); font-weight: 700; }
.mi-contract header h3 { margin: 3px 0 0; color: var(--mi-dark); }
.mi-status { padding: 7px 12px; border-radius: 999px; color: #8b5d00; background: #fff1bd; font-size: 12px; font-weight: 700; }
.mi-status-settled { color: #17633a; background: #dff5e8; }
.mi-contract-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 18px 20px; gap: 14px; }
.mi-contract-stats > div { display: flex; flex-direction: column; gap: 5px; }
.mi-contract-stats small { color: #776e6e; }
.mi-progress { height: 7px; margin: 0 20px 20px; overflow: hidden; border-radius: 10px; background: #eee8e8; }
.mi-progress span { display: block; height: 100%; border-radius: inherit; background: var(--mi-primary); }
.mi-table-wrap { overflow-x: auto; }
.mi-table { width: 100%; border-collapse: collapse; min-width: 660px; }
.mi-table th, .mi-table td { padding: 13px 16px; border-top: 1px solid #eee8e8; text-align: right; }
.mi-table th { color: #6f6666; background: #fcfafa; font-size: 12px; }
.mi-pill { display: inline-block; padding: 5px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.mi-pill-paid { color: #17633a; background: #dff5e8; }
.mi-pill-pending { color: #8b5d00; background: #fff1bd; }
.mi-pill-overdue { color: #9e161b; background: #ffe1e2; }
.mi-pay-button { border-color: var(--mi-primary) !important; color: #fff !important; background: var(--mi-primary) !important; border-radius: 999px !important; }
.mi-empty { padding: 34px; border-radius: 20px; background: var(--mi-cream); text-align: center; }
.mi-empty h3 { color: var(--mi-dark); }

@media (max-width: 768px) {
    .mi-payment-box { padding: 16px; border-radius: 16px; }
    .mi-methods, .mi-summary { grid-template-columns: 1fr; }
    .mi-plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mi-contract-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.mi-quote {
    direction: rtl;
    max-width: 1180px;
    margin: 35px auto;
    color: var(--mi-dark);
    font-family: inherit;
}
.mi-quote-intro { margin: 0 auto 24px; max-width: 680px; color: #746b6b; text-align: center; }
.mi-quote-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, .75fr); gap: 22px; align-items: start; }
.mi-quote-form, .mi-quote-result { padding: 24px; border: 1px solid #eadede; border-radius: 22px; background: #fff; box-shadow: 0 14px 40px rgba(32, 22, 23, .07); }
.mi-field { margin-bottom: 20px; }
.mi-field > label:first-child { display: block; margin-bottom: 8px; font-weight: 800; }
.mi-field select { width: 100%; min-height: 48px; padding: 8px 14px; border: 1px solid #ded5d5; border-radius: 12px; background-color: #fff; color: var(--mi-dark); }
.mi-field select:focus { border-color: var(--mi-primary); box-shadow: 0 0 0 2px rgba(212, 20, 26, .10); outline: none; }
.mi-field-help { display: block; margin-top: 6px; color: #8a8181; }
.mi-quote-product { display: flex; align-items: center; gap: 14px; margin: 2px 0 22px; padding: 12px; border: 1px solid transparent; border-radius: 16px; color: inherit; background: var(--mi-cream); text-decoration: none !important; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.mi-quote-product:hover { border-color: var(--mi-primary); color: inherit; box-shadow: 0 8px 22px rgba(32, 22, 23, .09); transform: translateY(-1px); }
.mi-quote-product:focus-visible { outline: 2px solid var(--mi-primary); outline-offset: 3px; }
.mi-quote-product img { width: 92px; height: 76px; border-radius: 12px; object-fit: cover; background: #fff; }
.mi-quote-product div { display: flex; flex-direction: column; gap: 3px; }
.mi-quote-product small { color: #847979; }
.mi-quote-product strong { font-size: 16px; }
.mi-quote-product span { color: var(--mi-primary); font-weight: 800; }
.mi-quote-product em { margin-top: 3px; color: var(--mi-primary); font-size: 12px; font-style: normal; font-weight: 700; }
.mi-quote-result { position: sticky; top: 24px; background: linear-gradient(160deg, var(--mi-cream), #fff); }
.mi-quote-placeholder { display: flex; min-height: 310px; align-items: center; justify-content: center; flex-direction: column; text-align: center; }
.mi-quote-placeholder > span { display: grid; width: 64px; height: 64px; place-items: center; margin-bottom: 12px; border-radius: 18px; color: #fff; background: var(--mi-primary); font-size: 28px; font-weight: 900; }
.mi-quote-placeholder strong { font-size: 20px; }
.mi-quote-placeholder small { max-width: 230px; margin-top: 6px; color: #807575; }
.mi-quote-summary h3 { margin: 0 0 16px; font-size: 21px; }
.mi-quote-summary > div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid #eadede; }
.mi-quote-summary > div span { color: #756b6b; }
.mi-quote-summary .mi-total { margin-top: 5px; padding: 16px 0; border-bottom: 0; }
.mi-quote-summary .mi-total strong { color: var(--mi-primary); font-size: 19px; }
.mi-quote-qty { display: flex; align-items: center; justify-content: space-between; margin: 8px 0 16px; }
.mi-quote-qty input { width: 80px; min-height: 42px; border: 1px solid #ded5d5; border-radius: 10px; text-align: center; }
.mi-quote-submit { width: 100%; min-height: 48px; border: 0 !important; border-radius: 999px !important; color: #fff !important; background: var(--mi-primary) !important; font-weight: 800 !important; }
.mi-quote-submit:disabled { cursor: not-allowed; opacity: .55; }
.mi-quote-message { min-height: 22px; margin: 10px 0 0; text-align: center; font-size: 12px; }
.mi-quote-message.is-error { color: #a4161a; }
.mi-quote-message.is-success { color: #17633a; }

@media (max-width: 900px) {
    .mi-quote-grid { grid-template-columns: 1fr; }
    .mi-quote-result { position: static; }
}

@media (max-width: 560px) {
    .mi-quote { margin: 22px auto; }
    .mi-quote-form, .mi-quote-result { padding: 16px; border-radius: 17px; }
    .mi-quote .mi-plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

