:root {
    --green: #01aa01;
    --green-dark: #339e43;
    --green-light: #e8f5ea;
    --green-faint: #f3faf4;
    --pink: #d81473;
    --pink-dark: #b8115f;
    --text: #1D1D1B;
    --text-muted: #666666;
    --border: #CCCCCC;
    --border-light: #ececec;
    --bg: #F5F5F5;
    --white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 6px 20px rgba(0,0,0,0.12);
    --shadow-lg: 0 14px 40px rgba(0,0,0,0.18);

    --primary: var(--green);
    --primary-dark: var(--green-dark);
    --secondary: var(--border-light);
    --accent: #c0392b;
    --black: var(--text);
    --grey: var(--border);
}

* { box-sizing: border-box; }
.ha-zakat-page body,
body {
    background: var(--bg);
    font-family: 'Oakes Grotesk', 'Inter', system-ui, sans-serif;
    color: var(--text);
    padding: 0; margin: 0;
    line-height: 1.5;
}

.container { max-width: 1200px; margin: 0 auto; padding: 40px 20px; }
.main-wrapper { display: flex; gap: 24px; align-items: flex-start; max-width: 1200px; margin: 0 auto; padding: 40px 20px; }
.left-col { flex: 1; min-width: 0; }
.right-col { width: 320px; flex-shrink: 0; }

.form-container { background: var(--white); border-radius: 14px; padding: 40px; box-shadow: var(--shadow-sm); border: 1px solid var(--border-light); }

.progress-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; position: relative; padding: 0 60px; }
.progress-line { position: absolute; top: 20px; left: 80px; right: 80px; height: 2px; background: var(--border-light); z-index: 0; }
.progress-line-fill { position: absolute; top: 0; left: 0; height: 100%; background: var(--green); transition: width .3s ease; }
.step-item { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; background: var(--white); padding: 0 10px; }
.step-circle {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--border-light); color: #999;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; font-weight: 600; transition: all .3s ease; flex-shrink: 0;
}
.step-item.active .step-circle { background: var(--green); color: var(--white); }
.step-item.completed .step-circle { background: var(--green); color: var(--white); position: relative; font-size: 0; }
.step-item.completed .step-circle::after {
    content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900;
    font-size: 14px; color: var(--white);
}
.step-label { font-size: 15px; color: #999; font-weight: 500; white-space: nowrap; }
.step-item.active .step-label { color: var(--text); font-weight: 600; }
.step-item.completed .step-label { color: var(--text); }

.section-card { background: var(--white); border: 1px solid var(--border-light); border-radius: 14px; padding: 30px; margin-bottom: 25px; }
.section-title { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 8px; display: flex; align-items: center; gap: 10px; line-height: 1.3; }
.section-subtitle { font-size: 14px; color: var(--text-muted); margin-bottom: 25px; line-height: 1.5; }

.info-text { font-size: 14px; color: var(--text-muted); margin-top: 12px; display: flex; align-items: center; gap: 8px; }
.nisab-spinner { display: inline-block; width: 13px; height: 13px; border: 2px solid var(--green-light, #e8f5e9); border-top-color: var(--green, #01aa01); border-radius: 50%; animation: nisab-spin 0.7s linear infinite; flex-shrink: 0; }
@keyframes nisab-spin { to { transform: rotate(360deg); } }

.help-icon {
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--green-light); color: var(--green-dark);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; cursor: help; flex-shrink: 0;
    position: relative;
}
.help-icon:hover { background: var(--green); color: var(--white); }
.help-icon .tooltip-text {
    display: none; position: absolute;
    left: 50%; transform: translateX(-50%);
    bottom: calc(100% + 8px);
    background: var(--text); border: none; color: var(--white);
    font-size: 12px; font-weight: 400; padding: 8px 12px;
    border-radius: 8px; width: 220px; line-height: 1.5;
    box-shadow: var(--shadow-md); z-index: 100;
    white-space: normal; pointer-events: none;
}
.help-icon .tooltip-text::after {
    content: ''; position: absolute; top: 100%; left: 50%; margin-left: -5px;
    border: 5px solid transparent; border-top-color: var(--text);
}
.help-icon:hover .tooltip-text { display: block; }

.option-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 0; }
.option-btn {
    border: 1.5px solid var(--border);
    background: var(--white); color: var(--text);
    padding: 9px 22px; border-radius: 999px;
    font-size: 14.5px; font-weight: 500;
    cursor: pointer; font-family: inherit;
    transition: all 0.2s ease;
    display: inline-flex; align-items: center; gap: 6px;
    outline: none !important;
}
.option-btn:focus, .option-btn:active { outline: none !important; box-shadow: none !important; }
@media (hover: hover) {
    .option-btn:hover { background: var(--green-light); border-color: var(--green); color: var(--green); }
}
.option-btn.active { background: var(--green-light); color: var(--green); border-color: var(--green); font-weight: 600; }

.asset-card { background: var(--white); border: 1px solid var(--border-light); border-radius: 14px; padding: 25px; margin-bottom: 20px; }
.asset-card h3 { font-size: 18px; font-weight: 700; color: var(--text); margin: 0 0 6px; }
.asset-card .more-info { font-size: 13px; color: var(--green); margin-bottom: 18px; font-weight: 500; }

.input-grid { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 14px; align-items: flex-end; margin-bottom: 14px; padding-top: 4px; }
.input-group-custom { display: flex; flex-direction: column; gap: 6px; position: relative; }
.input-group-custom > label {
    font-size: 12px; color: var(--text-muted);
    font-weight: 600; padding-right: 32px;
    margin-bottom: 2px;
}
.input-wrapper { display: flex; align-items: center; gap: 10px; }
.input-custom {
    padding: 12px 14px; border: 1.5px solid var(--border);
    background: var(--white); border-radius: 8px;
    font-family: inherit; font-size: 14px; color: var(--text);
    width: 100%; box-sizing: border-box; line-height: 1.4;
    transition: border-color .15s ease;
}
.input-custom:focus { outline: 0; border-color: var(--green); }
.input-custom[readonly] { background: var(--green-faint); color: var(--text-muted); cursor: default; }
.unit-label { font-size: 13px; color: var(--text-muted); white-space: nowrap; }

.add-btn {
    padding: 10px 18px; background: transparent;
    border: 1.5px solid var(--green); color: var(--green);
    border-radius: 999px; font-family: inherit;
    font-size: 14px; font-weight: 600; cursor: pointer;
    transition: all .15s ease;
    display: inline-flex; align-items: center; gap: 8px;
    margin-top: 6px;
}
@media (hover: hover) {
    .add-btn:hover { background: var(--green); color: var(--white); }
}
.add-btn i { font-size: 12px; }

.remove-btn {
    width: 42px; height: 42px; border-radius: 8px;
    background: transparent; border: 1px solid var(--border);
    color: var(--text-muted); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all .15s ease; flex-shrink: 0; margin-bottom: 1px;
}
.remove-btn i { font-size: 14px; }
@media (hover: hover) {
    .remove-btn:hover { background: #fee; color: #c00; border-color: #fcc; }
}

.range-toggle {
    position: absolute; top: 0; right: 0;
    width: 26px; height: 22px; border-radius: 6px;
    background: var(--white); border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 11px; font-weight: 700; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-family: inherit; line-height: 1;
    transition: all .15s ease;
}
.range-toggle:hover { border-color: var(--green); color: var(--green); background: var(--green-faint); }
.range-toggle.active { background: var(--green); color: var(--white); border-color: var(--green); }
.range-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.range-inputs input { padding: 12px 10px; font-size: 13px; }
.range-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; font-style: italic; }

.total-section { background: var(--green-faint); border: 1px solid var(--green-light); border-radius: 12px; padding: 22px 26px; margin-top: 24px; }
.total-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.total-row:last-child { margin-bottom: 0; }
.total-label { font-size: 14px; color: var(--text-muted); font-weight: 500; }
.total-main { font-size: 24px; font-weight: 700; color: var(--green-dark); }

.nav-buttons { display: flex; justify-content: space-between; align-items: center; margin-top: 40px; gap: 14px; }
.btn {
    padding: 12px 28px; border-radius: 999px;
    font-family: inherit; font-size: 15px; font-weight: 600;
    border: 1.5px solid transparent; cursor: pointer;
    transition: all .2s ease;
    display: inline-flex; align-items: center; gap: 8px;
}
.btn i { font-size: 12px; }
.btn-primary { background: var(--green); color: var(--white); border-color: var(--green); outline: none !important; box-shadow: none !important; }
.btn-primary:hover, .btn-primary:active, .btn-primary:focus { background: var(--green-dark) !important; border-color: var(--green-dark) !important; color: var(--white) !important; box-shadow: none !important; outline: none !important; }
.btn-secondary { background: var(--white); color: var(--text); border-color: var(--border); outline: none !important; box-shadow: none !important; }
.btn-secondary:hover, .btn-secondary:active, .btn-secondary:focus { background: var(--bg) !important; border-color: var(--text-muted) !important; color: var(--text) !important; box-shadow: none !important; outline: none !important; }

.result-breakdown { margin-bottom: 30px; }
.result-item { display: flex; justify-content: space-between; padding: 15px 0; border-bottom: 1px solid var(--border-light); }
.result-item:last-child { border-bottom: none; }
.breakdown-row { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--border-light); }
.breakdown-row:last-child { border-bottom: none; }
.breakdown-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.no-zakat-msg { color: var(--text-muted); font-weight: 500; margin: 12px 0; }

.zakat-card {
    background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
    color: var(--white);
    padding: 32px; border-radius: 14px;
    text-align: center; margin: 24px 0;
    box-shadow: var(--shadow-md);
}
.zakat-card > div:first-child { font-size: 13px; letter-spacing: .04em; opacity: .85; margin-bottom: 6px; }
.zakat-amount { font-size: 44px; font-weight: 700; margin: 8px 0; letter-spacing: -.01em; }

.payment-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 24px; }
.payment-card {
    background: var(--white);
    border: 1.5px solid var(--border-light);
    border-radius: 14px;
    padding: 22px; text-align: left; cursor: pointer;
    transition: all .25s ease; text-decoration: none;
    display: flex; align-items: flex-start; gap: 14px;
    color: var(--text);
}
@media (hover: hover) {
    .payment-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--green); }
}
.payment-icon {
    width: 42px; height: 42px; border-radius: 10px;
    background: var(--green-light);
    display: flex; align-items: center; justify-content: center;
    color: var(--green-dark); flex-shrink: 0;
    font-size: 18px;
}
.payment-card .text-wrapper { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.payment-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.payment-desc { font-size: 13px; color: var(--text-muted); }
.payment-card.wide-btn { flex-direction: row; align-items: center; justify-content: flex-start; width: 100%; max-width: none; }

.pay-screen-card {
    background: var(--white);
    border-radius: 14px;
    padding: 44px 40px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    max-width: 520px; margin: 0 auto; text-align: center;
}
.pay-screen-icon {
    width: 64px; height: 64px; border-radius: 50%;
    background: var(--green); color: var(--white);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
    font-size: 24px;
}
.pay-screen-title { font-size: 26px; font-weight: 700; color: var(--text); margin: 0 0 6px; }
.pay-screen-subtitle { font-size: 14px; color: var(--text-muted); margin: 0 0 26px; }

.pay-amount-wrap {
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 14px 18px; margin-bottom: 22px;
    display: flex; align-items: center; gap: 8px;
    background: var(--white);
    transition: border-color .15s ease;
}
.pay-amount-wrap:focus-within { border-color: var(--green); }
.pay-amount-wrap .currency { font-size: 18px; color: var(--text-muted); }
.pay-amount-input { flex: 1; border: 0; background: transparent; font-family: inherit; font-size: 24px; font-weight: 700; color: var(--text); outline: 0; min-width: 0; }
.back-to-calc { display: inline-block; margin-top: 22px; font-size: 14px; color: var(--text-muted); cursor: pointer; text-decoration: none; }
.back-to-calc:hover { color: var(--green); }

.location-label {
    display: block; text-align: left;
    font-size: 13px; color: var(--text-muted);
    font-weight: 600; margin-bottom: 6px;
}
.zakat-region-wrap { margin-bottom: 18px; }
.zakat-region-wrap .ha-custom-select {
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 12px 38px 12px 14px;
    font-size: 15px;
    text-align: left;
}
.zakat-region-wrap .ha-custom-select.open,
.zakat-region-wrap .ha-custom-select:hover { border-color: var(--green); }
.zakat-region-wrap .ha-dropdown { z-index: 200; }

.hidden { display: none !important; }

.landing-card { background: var(--white); border-radius: 14px; padding: 40px; box-shadow: var(--shadow-sm); border: 1px solid var(--border-light); margin-bottom: 24px; }
.ha-zakat-coming-soon-inline { text-align: center; }
.ha-zakat-coming-soon-inline .ha-zakat-coming-soon__title { font-size: 30px; font-weight: 700; color: var(--text); margin: 0 0 16px; line-height: 1.2; }
.ha-zakat-coming-soon-inline .ha-zakat-coming-soon__subtitle { font-size: 15px; color: var(--text-muted); line-height: 1.7; margin: 0; }
.landing-title { font-size: 30px; font-weight: 700; color: var(--text); margin-bottom: 24px; line-height: 1.2; }
.landing-section h3 { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.landing-section p { font-size: 15px; color: var(--text-muted); line-height: 1.7; margin-bottom: 16px; }
.verse-block {
    border-left: 4px solid var(--green);
    background: var(--green-faint);
    padding: 16px 22px; border-radius: 0 10px 10px 0;
    margin: 18px 0;
    font-style: italic; color: var(--text);
    font-size: 15.5px; line-height: 1.6;
}
.landing-buttons { display: flex; flex-direction: column; gap: 14px; margin-top: 28px; max-width: 380px; margin-left: auto; margin-right: auto; }
.btn-landing-primary, .btn-landing-secondary {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 26px; border-radius: 999px;
    font-family: inherit; font-size: 15px; font-weight: 600;
    cursor: pointer; text-decoration: none;
    transition: all .2s ease;
    border: 1.5px solid transparent;
}
.btn-landing-primary { background: var(--pink); color: var(--white) !important; border-color: var(--pink); }
.btn-landing-primary:hover { background: var(--pink-dark); border-color: var(--pink-dark); color: var(--white) !important; }
.btn-landing-secondary { background: var(--white); color: var(--green) !important; border-color: var(--green); }
.btn-landing-secondary:hover { background: var(--green-light); color: var(--green) !important; }

.sidebar-card { background: var(--white); border-radius: 14px; padding: 26px; box-shadow: var(--shadow-sm); border: 1px solid var(--border-light); }
.sidebar-title { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.accordion-item { border-bottom: 1px solid var(--border-light); }
.accordion-item:last-child { border-bottom: none; }
.accordion-trigger {
    width: 100%; padding: 13px 0; background: 0; border: 0; cursor: pointer;
    text-align: left; font-family: inherit; font-size: 14.5px;
    color: var(--text); font-weight: 500;
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.accordion-trigger i { font-size: 14px; color: var(--text-muted); transition: transform .2s ease; }
.accordion-item.open .accordion-trigger i { transform: rotate(180deg); color: var(--green); }
.accordion-item.open .accordion-trigger { color: var(--green); }
.accordion-body { max-height: 0; overflow: hidden; transition: max-height .2s ease; }
.accordion-item.open .accordion-body { max-height: 300px; }
.accordion-body-inner { padding: 0 0 14px 0; font-size: 13.5px; color: var(--text-muted); line-height: 1.55; }
.accordion-trigger:hover, .accordion-trigger:focus, .accordion-trigger:active {
    background: transparent !important; color: var(--text) !important; border: none !important;
}
.accordion-item.open .accordion-trigger:hover { color: var(--green) !important; }

.undo-toast {
    position: fixed; bottom: 24px; left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text); color: var(--white);
    padding: 14px 24px; border-radius: 12px;
    box-shadow: var(--shadow-md);
    z-index: 300; opacity: 0;
    transition: opacity .25s ease, transform .25s ease;
    max-width: calc(100vw - 32px);
    display: flex; align-items: center; gap: 18px;
}
.undo-toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.undo-toast-text { font-size: 14px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.undo-toast-btn { background: transparent; border: 0; color: var(--green-light); font-weight: 700; font-size: 14px; cursor: pointer; padding: 4px 10px; border-radius: 6px; flex-shrink: 0; font-family: inherit; }
.undo-toast-btn:hover { background: rgba(255,255,255,.1); color: var(--white); }

@media (max-width: 991px) {
    .main-wrapper { flex-direction: column; padding: 20px 12px; }
    .right-col { width: 100%; }
    .container { padding: 20px 12px; }
    .form-container { padding: 24px 16px; }
    .landing-card { padding: 28px 22px; }
    .pay-screen-card { padding: 30px 22px; }

    .progress-header { justify-content: center; padding: 0; margin-bottom: 30px; }
    .progress-line, .progress-line-fill { display: none; }
    .step-item { display: none; }
    .step-item.active { display: flex; background: transparent; }
    .step-circle { width: 36px; height: 36px; font-size: 14px; }
    .step-label { font-size: 16px; color: var(--text); font-weight: 600; }

    .section-title { font-size: 19px; }
    .option-btn { padding: 8px 16px; font-size: 13.5px; }

    .input-grid { grid-template-columns: 1fr; gap: 12px; border-bottom: 1px solid var(--border-light); padding-bottom: 14px; margin-bottom: 14px; }
    .input-grid:last-of-type { border-bottom: none; }
    .remove-btn { width: 100%; margin-top: 4px; }

    .nav-buttons { flex-direction: column-reverse; }
    .btn { width: 100%; justify-content: center; }
    .save-indicator { justify-content: center; margin: 6px 0 0; }

    .zakat-amount { font-size: 34px; }
}
@media (max-width: 575px) {
    .section-card { padding: 22px 16px; }
    .section-title { font-size: 17px; }
    .option-btn { padding: 8px 14px; font-size: 13px; }
    .asset-card { padding: 18px 16px; }
    .asset-card h3 { font-size: 16px; }
    .input-custom { font-size: 13px; padding: 10px 12px; }
    .add-btn { padding: 8px 14px; font-size: 13px; }
    .range-inputs input { font-size: 12px; padding: 10px 8px; }
    .zakat-amount { font-size: 28px; }
    .payment-grid { grid-template-columns: 1fr; }
    .total-main { font-size: 22px; }
    .landing-title { font-size: 24px; }
    .undo-toast { bottom: 16px; left: 8px; right: 8px; transform: translateY(120px); max-width: none; }
    .undo-toast.visible { transform: translateY(0); }
}
