@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&display=swap');
:root{--ink:#1d302e;--muted:#7a8985;--line:#e8eeeb;--bg:#f5f7f5;--green:#1c5148;--mint:#dcece5;--gold:#d6ae69;--white:#fff;--red:#b9574f;--shadow:0 12px 36px #183c3210}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:'Cairo',Tahoma,sans-serif}button,input,select,textarea{font:inherit}button{cursor:pointer}.hidden{display:none!important}.muted{color:var(--muted)}.tiny{font-size:11px}.eyebrow{font-size:11px;color:#8b9a94;margin:0 0 5px;font-weight:700;letter-spacing:.2px}.auth-wrap{min-height:100dvh;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at 15% 15%,#dcece5 0,transparent 33%),radial-gradient(circle at 90% 85%,#f0e7d6 0,transparent 28%),#f7f8f6}.auth-card{width:min(100%,420px);background:white;border:1px solid var(--line);border-radius:24px;padding:32px;box-shadow:var(--shadow);text-align:center}.brand-mark{width:58px;height:58px;border-radius:19px;background:var(--green);color:#f3dfb8;display:grid;place-items:center;font-size:34px;font-weight:800;margin:auto}.auth-card h1{font-size:31px;margin:0}.auth-sub{margin:0 0 24px}.auth-tabs{display:flex;background:#f2f5f3;border-radius:12px;padding:4px;margin-bottom:20px}.tab{flex:1;border:0;background:transparent;padding:9px;border-radius:9px;color:var(--muted)}.tab.active{background:white;color:var(--green);box-shadow:0 2px 8px #0000000b;font-weight:700}.stack{display:grid;gap:13px;text-align:right}.stack label,.salary-form label,.modal-form label{font-size:12px;font-weight:700;color:#51625c;display:grid;gap:6px}.stack input,.salary-form input,.modal-form input,.modal-form select,.modal-form textarea{width:100%;border:1px solid #e2e9e5;border-radius:11px;background:#fbfcfb;padding:11px 12px;outline:0;color:var(--ink)}input:focus,select:focus,textarea:focus{border-color:#75a596!important;box-shadow:0 0 0 3px #dcece5}.btn{border:0;border-radius:11px;padding:10px 17px;font-size:12px;font-weight:700;transition:.15s}.btn.primary{background:var(--green);color:white}.btn.primary:hover{background:#143f37}.btn.secondary{background:#e8f0eb;color:var(--green)}.btn.full{width:100%;padding:12px}.error{color:var(--red);font-size:12px;min-height:16px;margin:0}.app{min-height:100dvh}.sidebar{position:fixed;right:0;top:0;bottom:0;width:245px;background:#fff;border-left:1px solid var(--line);padding:28px 18px;display:flex;flex-direction:column;z-index:5}.brand{display:flex;align-items:center;gap:11px;padding:0 8px 30px}.brand-mark.small{width:42px;height:42px;border-radius:14px;font-size:25px;margin:0}.brand b{display:block;font-size:18px}.brand small{font-size:10px;color:var(--muted)}.side-nav{display:grid;gap:7px}.nav-link{border:0;background:transparent;text-align:right;padding:12px 14px;border-radius:11px;color:#81908a;display:flex;gap:12px;align-items:center;font-size:18px}.nav-link span{font-size:12px;font-weight:700}.nav-link.active{background:#eaf2ed;color:var(--green)}.side-bottom{margin-top:auto}.sync-state{font-size:10px;color:#668078;display:flex;align-items:center;gap:7px;padding:12px}.sync-state i{width:7px;height:7px;border-radius:50%;background:#48a47b;box-shadow:0 0 0 4px #e6f3eb}.logout{border:0;background:transparent;color:#9a625c;font-size:11px;padding:12px}.main{margin-right:245px;padding:28px 36px 30px;max-width:1500px}.topbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}.topbar h2{margin:0;font-size:23px}.user-chip{display:flex;align-items:center;gap:9px;font-size:11px;font-weight:700}.avatar{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#e5eee8;color:var(--green);font-size:15px}.welcome{background:linear-gradient(110deg,#1a4941,#285e51);border-radius:19px;padding:24px 28px;color:white;display:flex;justify-content:space-between;align-items:center;overflow:hidden;position:relative}.welcome-kicker{font-size:10px;color:#c1d9cf;margin:0}.welcome h3{font-size:20px;margin:4px 0}.welcome p:last-child{font-size:11px;color:#d5e4dc;margin:0}.welcome-art{width:86px;height:86px;border:1px solid #ffffff35;border-radius:30px;display:grid;place-items:center;font-size:52px;color:#ead6ae;transform:rotate(-9deg);background:#ffffff0c}.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;margin:16px 0}.stat-card{background:white;border:1px solid var(--line);border-radius:15px;padding:17px;min-height:120px;box-shadow:0 5px 20px #1d302e05}.stat-card span,.stat-card small{display:block;color:#84918c;font-size:10px}.stat-card strong{display:block;font-size:22px;margin:8px 0 3px;letter-spacing:-.5px}.stat-card.dark{background:#e9f1ec;border-color:#e9f1ec}.stat-card.dark strong{color:var(--green)}.stat-card.accent{background:#f4eddf;border-color:#f4eddf}.stat-card.accent strong{color:#85652f}.content-grid{display:grid;grid-template-columns:1.3fr .7fr;gap:14px}.panel{background:white;border:1px solid var(--line);border-radius:16px;padding:19px;box-shadow:0 5px 20px #1d302e05}.panel-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px}.panel-head h3,.section-toolbar h3{font-size:14px;margin:0}.panel-head p,.section-toolbar p{font-size:10px;color:var(--muted);margin:3px 0 0}.text-btn{border:0;background:transparent;color:var(--green);font-size:10px;font-weight:700}.empty-state{font-size:11px;color:#9aa6a1;text-align:center;padding:25px 8px}.quick-actions{display:flex;gap:9px;margin-top:15px}.debt-preview{display:grid;gap:10px}.preview-row{display:flex;justify-content:space-between;align-items:center;padding:9px 0;border-bottom:1px solid #f0f3f1}.preview-row:last-child{border:0}.preview-row b{font-size:11px}.preview-row small{display:block;font-size:9px;color:var(--muted)}.preview-row strong{font-size:12px}.breakdown{display:grid;gap:13px}.break-row{display:flex;justify-content:space-between;font-size:10px}.bar{height:7px;border-radius:8px;background:#edf1ee;overflow:hidden;margin-top:6px}.bar i{height:100%;display:block;background:#6b9d87;border-radius:8px}.section-toolbar{display:flex;justify-content:space-between;align-items:center;margin:5px 0 17px}.debt-list,.deduction-list{display:grid;gap:12px}.debt-card{background:white;border:1px solid var(--line);border-radius:16px;padding:17px 19px;box-shadow:0 5px 20px #1d302e05}.debt-card-top{display:flex;justify-content:space-between;gap:10px}.debt-title{display:flex;gap:10px;align-items:center}.debt-icon{width:38px;height:38px;border-radius:12px;background:#edf3ef;display:grid;place-items:center;color:var(--green);font-size:17px}.debt-title h4{font-size:13px;margin:0}.debt-title p{font-size:10px;color:var(--muted);margin:2px 0}.debt-remaining{text-align:left}.debt-remaining strong{font-size:15px;display:block}.debt-remaining small{font-size:9px;color:var(--muted)}.progress{height:6px;background:#edf1ee;border-radius:10px;overflow:hidden;margin:15px 0 8px}.progress i{height:100%;display:block;background:#72a28c;border-radius:10px}.debt-meta{display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px;color:#89958f;font-size:9px}.card-actions{display:flex;gap:7px;margin-top:13px}.mini-btn{border:1px solid var(--line);background:white;color:#52645d;border-radius:8px;padding:6px 10px;font-size:10px}.mini-btn.pay{background:#e9f2ec;color:var(--green);border-color:#e9f2ec}.budget-top{display:grid;grid-template-columns:1fr .7fr;gap:14px;margin-bottom:24px}.salary-form{display:flex;gap:10px;align-items:end}.salary-form label{flex:1}.net-panel{background:#e8f0e9;border-color:#e8f0e9;display:flex;flex-direction:column;justify-content:center}.net-panel span,.net-panel small{font-size:10px;color:#71877b}.net-panel strong{font-size:27px;color:var(--green);margin:3px 0}.deduction-card{background:white;border:1px solid var(--line);border-radius:13px;padding:14px 16px;display:flex;justify-content:space-between;align-items:center}.deduction-card h4{font-size:12px;margin:0}.deduction-card p{font-size:9px;color:var(--muted);margin:3px 0}.deduction-amount{font-size:13px;font-weight:700}.note-panel{margin-top:18px;background:#f8f6f0}.note-panel b{font-size:11px}.note-panel p{font-size:10px;color:#77847e;line-height:1.9;margin:6px 0 0}.footer-note{text-align:center;color:#a2ada7;font-size:9px;padding:28px 0 5px}.mobile-nav{display:none}.modal-layer{position:fixed;inset:0;background:#12252180;z-index:20;display:grid;place-items:center;padding:18px}.modal{width:min(100%,520px);max-height:90dvh;overflow:auto;background:white;border-radius:20px;padding:22px;box-shadow:0 20px 80px #0003}.modal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}.modal-head h3{margin:0;font-size:17px}.icon-btn{border:0;background:#f1f4f2;border-radius:10px;width:32px;height:32px;font-size:22px;color:#718078}.modal-form{display:grid;grid-template-columns:1fr 1fr;gap:12px}.modal-form .wide{grid-column:1/-1}.modal-form .form-actions{grid-column:1/-1;display:flex;gap:8px;justify-content:flex-start;margin-top:6px}.toast{position:fixed;bottom:22px;left:22px;background:#203f38;color:white;border-radius:10px;padding:11px 16px;font-size:11px;z-index:50;opacity:0;transform:translateY(10px);transition:.2s;pointer-events:none}.toast.show{opacity:1;transform:translateY(0)}
@media(max-width:1000px){.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.content-grid{grid-template-columns:1fr}.main{padding:24px}.sidebar{width:215px}.main{margin-right:215px}}
@media(max-width:650px){.sidebar{display:none}.main{margin:0;padding:19px 15px 100px}.topbar{margin-bottom:17px}.topbar h2{font-size:20px}.user-chip{font-size:0}.welcome{padding:19px;border-radius:16px}.welcome h3{font-size:16px}.welcome-art{width:62px;height:62px;font-size:39px;border-radius:22px}.stats-grid{gap:9px;margin:11px 0}.stat-card{padding:13px;min-height:105px}.stat-card strong{font-size:18px}.stat-card span,.stat-card small{font-size:9px}.content-grid{gap:10px}.panel{padding:15px}.quick-actions{flex-wrap:wrap}.quick-actions .btn{flex:1}.section-toolbar{align-items:flex-start;gap:8px}.section-toolbar .btn{white-space:nowrap;padding:9px 11px}.budget-top{grid-template-columns:1fr}.salary-form{align-items:stretch;flex-direction:column}.mobile-nav{display:flex;position:fixed;bottom:0;right:0;left:0;background:#ffffffed;backdrop-filter:blur(12px);border-top:1px solid var(--line);padding:8px 12px calc(8px + env(safe-area-inset-bottom));justify-content:space-around;z-index:10}.mobile-nav button{border:0;background:transparent;color:#89958f;display:grid;gap:2px;justify-items:center;font-size:18px;min-width:70px}.mobile-nav button small{font-size:9px}.mobile-nav button.active{color:var(--green);font-weight:800}.modal{padding:17px}.modal-form{grid-template-columns:1fr}.modal-form .wide,.modal-form .form-actions{grid-column:auto}.debt-meta{font-size:8px}}
.toolbar-actions{display:flex;gap:8px;align-items:center}
@media(max-width:650px){.toolbar-actions{flex-direction:column;align-items:stretch}.toolbar-actions .btn{white-space:nowrap;padding:8px 10px}}

/* Readability and financial detail improvements */
body{font-size:15px;line-height:1.75}
.eyebrow{font-size:13px}
.stack label,.salary-form label,.modal-form label{font-size:14px;gap:8px}
.stack input,.salary-form input,.modal-form input,.modal-form select,.modal-form textarea{font-size:15px;min-height:46px;padding:11px 14px}
.modal-form textarea{min-height:88px}
.btn{font-size:14px;min-height:43px}
.main{max-width:1600px}
.topbar h2{font-size:27px}
.panel-head h3,.section-toolbar h3{font-size:18px}
.panel-head p,.section-toolbar p{font-size:13px;line-height:1.7}
.stat-card span,.stat-card small{font-size:13px}
.stat-card strong{font-size:25px}
.welcome-kicker{font-size:13px}.welcome h3{font-size:23px}.welcome p:last-child{font-size:14px}
.preview-row b{font-size:14px}.preview-row small{font-size:12px}.preview-row strong{font-size:15px}
.break-row{font-size:13px}
.debt-card{padding:21px 22px;border-radius:19px}
.debt-title h4{font-size:17px}.debt-title p{font-size:13px}
.debt-icon{width:44px;height:44px;font-size:20px}
.debt-remaining strong{font-size:19px}.debt-remaining small{font-size:12px}
.debt-meta{font-size:12px;line-height:1.8}
.progress{height:10px;margin:17px 0 4px}.progress-caption{display:flex;justify-content:space-between;color:#718078;font-size:12px;font-weight:700;margin-bottom:12px}
.mini-btn{font-size:13px;padding:8px 12px;min-height:36px}
.deduction-card h4{font-size:15px}.deduction-card p{font-size:12px}.deduction-amount{font-size:15px}
.modal{width:min(100%,780px);padding:26px;border-radius:22px}.modal-head h3{font-size:21px}.icon-btn{width:40px;height:40px;font-size:25px;display:grid;place-items:center;line-height:1;flex:0 0 auto}
.modal-form{gap:15px}.modal-form .wide{grid-column:1/-1}
.modal-form select,.stack select,.salary-form select{appearance:none;-webkit-appearance:none;background-color:#fbfcfb;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23556c62' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:left 14px center;padding-left:42px;cursor:pointer}
.modal-form select:focus{background-color:white}
.form-section{background:#f7faf8;border:1px solid #e7eeea;border-radius:15px;padding:16px;display:grid;gap:12px}
.form-section h4{font-size:16px;margin:0;color:var(--green)}
.form-section p{font-size:12px;color:var(--muted);margin:0;line-height:1.8}
.repeat-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;background:white;border:1px solid #e8eeeb;border-radius:12px;padding:12px;margin-bottom:10px;position:relative}
.repeat-row label{font-size:12px!important}
.repeat-row input,.repeat-row select{min-height:40px!important;font-size:13px!important}
.remove-row{position:absolute;top:8px;left:8px;border:0;background:#f8eae8;color:#a34e47;border-radius:8px;width:29px;height:29px;font-size:20px;line-height:1}
.inline-check{display:flex!important;align-items:center;gap:9px!important}.inline-check input{width:19px;height:19px;min-height:auto!important;accent-color:var(--green)}
.creditor-group{background:#edf3ef;border:1px solid #e0e9e3;border-radius:19px;padding:10px;margin-bottom:15px}
.creditor-heading{width:100%;border:0;background:transparent;display:flex;align-items:center;gap:12px;padding:10px 12px;color:var(--ink);text-align:right}
.creditor-chevron{font-size:22px;color:var(--green);transition:transform .2s}.creditor-chevron.rotated{transform:rotate(180deg)}
.creditor-name{font-size:17px;font-weight:800}.creditor-count{font-size:12px;color:var(--muted);background:#fff;border-radius:30px;padding:3px 10px}.creditor-heading strong{margin-right:auto;font-size:14px;color:var(--green)}
.creditor-content{display:grid;gap:11px;padding:6px}.creditor-content.collapsed{display:none}
.installment-details{margin-top:15px;border-top:1px solid #edf1ee;padding-top:11px}
.installment-details summary{cursor:pointer;color:var(--green);font-size:14px;font-weight:800;padding:5px 0}
.installment-list{display:grid;gap:7px;margin-top:9px}
.installment-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;background:#fafcfb;border:1px solid #edf1ee;border-radius:12px}
.installment-row.is-paid{background:#eef6f0;border-color:#dcebe0}
.installment-check{display:flex;align-items:center;gap:11px;cursor:pointer;flex:1}
.installment-check input{width:20px;height:20px;accent-color:var(--green);flex:0 0 auto}
.installment-check b{display:block;font-size:14px;color:var(--ink)}.installment-check small{display:block;font-size:12px;color:var(--muted)}
.installment-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.installment-actions .mini-btn{font-size:11px;min-height:31px;padding:5px 9px}
.debt-note{font-size:13px;color:#6e7c76;margin:12px 0 0;line-height:1.8}
.attachment-links{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.attachment-links a{font-size:12px;color:var(--green);background:#eef5f0;border-radius:9px;padding:6px 10px;text-decoration:none}
.attachment-existing{display:flex!important;align-items:center;gap:8px;font-size:12px!important;background:#f7faf8;padding:8px 10px;border-radius:9px}.attachment-existing input{width:17px;min-height:auto!important}
.manual-payments{margin-top:12px;padding:11px 13px;background:#fafcfb;border-radius:11px}.manual-payments>b{font-size:13px}.manual-payments>div{display:flex;gap:12px;align-items:center;justify-content:space-between;font-size:12px;padding-top:6px}.manual-payments a{color:var(--green)}
.deduction-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.icon-btn{margin-inline-start:10px}
@media(max-width:700px){body{font-size:14px}.main{padding:17px 13px 100px}.topbar h2{font-size:23px}.welcome h3{font-size:18px}.stat-card span,.stat-card small{font-size:11px}.stat-card strong{font-size:19px}.section-toolbar h3{font-size:16px}.section-toolbar p{font-size:12px}.debt-card{padding:15px}.debt-title h4{font-size:15px}.debt-meta{font-size:11px}.creditor-name{font-size:15px}.creditor-heading{gap:7px;padding:8px 5px}.creditor-heading strong{font-size:12px}.creditor-count{font-size:10px;padding:2px 7px}.repeat-row{grid-template-columns:1fr;padding:12px}.modal-layer{padding:8px;align-items:end}.modal{width:100%;max-height:94dvh;padding:18px;border-radius:20px 20px 0 0}.modal-form{grid-template-columns:1fr}.modal-form .wide{grid-column:auto}.installment-row{align-items:flex-start;flex-direction:column}.installment-actions{width:100%;padding-right:30px}.card-actions{flex-wrap:wrap}.deduction-card{align-items:flex-start;gap:10px;flex-direction:column}.deduction-controls{width:100%}}
.modal-head{position:relative;padding-right:52px;min-height:42px}.modal-head .icon-btn{position:absolute;right:0;top:0;margin:0}


/* Refined controls, dates, arrows and compact installment areas */
:root{color-scheme:light}
select,input[type="date"],input[type="month"]{direction:rtl;text-align:right;color-scheme:light}
select{appearance:none;-webkit-appearance:none;-moz-appearance:none;min-height:46px;padding:10px 14px 10px 46px!important;border:1px solid #dfe8e3!important;border-radius:12px!important;background-color:#fbfcfb!important;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%231c5148' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")!important;background-repeat:no-repeat!important;background-position:left 15px center!important;background-size:17px!important;cursor:pointer;transition:border-color .18s,box-shadow .18s,background-color .18s}
select:hover,input[type="date"]:hover,input[type="month"]:hover{border-color:#a9c5b8!important;background-color:#fff!important}
select:focus,input[type="date"]:focus,input[type="month"]:focus{outline:none;border-color:#6d9d8b!important;box-shadow:0 0 0 3px #e1eee7!important}
select option{padding:10px;background:#fff;color:#1d302e;font-family:'Cairo',Tahoma,sans-serif}
input[type="date"],input[type="month"]{min-height:46px;padding:10px 13px;border:1px solid #dfe8e3;border-radius:12px;background:#fbfcfb;font-size:14px}
input[type="date"]::-webkit-calendar-picker-indicator,input[type="month"]::-webkit-calendar-picker-indicator{cursor:pointer;opacity:.78;filter: invert(25%) sepia(17%) saturate(1040%) hue-rotate(112deg);margin-inline-start:8px;padding:4px}
input[type="checkbox"]{accent-color:var(--green)}
.creditor-chevron{display:inline-grid;place-items:center;width:24px;height:24px;flex:0 0 24px;border-radius:8px;background:#edf4ef;color:var(--green);font-size:16px;line-height:1;transition:transform .2s}
.creditor-chevron.rotated{transform:rotate(180deg)}
.installment-list{max-height:270px;overflow-y:auto;overscroll-behavior:contain;padding:4px 2px 4px 8px;scrollbar-width:thin;scrollbar-color:#b7cbbf #f1f5f2}
.installment-list::-webkit-scrollbar,.salary-installments-list::-webkit-scrollbar{width:7px}
.installment-list::-webkit-scrollbar-track,.salary-installments-list::-webkit-scrollbar-track{background:#f1f5f2;border-radius:10px}
.installment-list::-webkit-scrollbar-thumb,.salary-installments-list::-webkit-scrollbar-thumb{background:#b7cbbf;border-radius:10px}
.installment-details summary{cursor:pointer;display:flex;align-items:center;gap:8px;color:var(--green);font-weight:800;font-size:13px;padding:10px 0;list-style:none}
.installment-details summary::-webkit-details-marker{display:none}
.installment-details summary:after{content:'⌄';font-size:17px;transition:transform .2s}
.installment-details[open] summary:after{transform:rotate(180deg)}
.debt-card{overflow:hidden}
.modal{scrollbar-width:thin;scrollbar-color:#b7cbbf #f6f8f6}
.modal-head .icon-btn{right:0;left:auto;display:grid;place-items:center;font-size:21px;line-height:1}
.payment-help{padding:11px 13px;border-radius:12px;background:#eef5f0;color:#49665b;font-size:12px;line-height:1.8}
.salary-installments-panel{margin-bottom:20px}
.salary-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:12px}
.salary-summary-item{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px 14px;border-radius:12px;background:#f5f8f6;font-size:12px;color:#63736c}
.salary-summary-item strong{font-size:14px;color:var(--ink);white-space:nowrap}
.salary-summary-item.paid{background:#eaf4ed}.salary-summary-item.paid strong{color:#216348}
.salary-summary-item.pending{background:#fbf4e8}.salary-summary-item.pending strong{color:#8a642e}
.salary-installments-list{display:grid;gap:7px;max-height:320px;overflow:auto;padding:2px 2px 2px 6px;scrollbar-width:thin;scrollbar-color:#b7cbbf #f1f5f2}
.salary-installment-row{display:grid;grid-template-columns:22px minmax(0,1fr) auto auto;align-items:center;gap:10px;padding:11px 12px;border:1px solid var(--line);border-radius:12px;background:#fff;cursor:pointer}
.salary-installment-row.is-paid{background:#f4faf6;border-color:#dcece2}
.salary-installment-row input{width:19px;height:19px;margin:0;accent-color:var(--green)}
.salary-installment-main{min-width:0}.salary-installment-main b{display:block;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.salary-installment-main small{display:block;font-size:11px;color:var(--muted);margin-top:2px}
.salary-installment-row>strong{font-size:13px;white-space:nowrap}
.salary-installment-status{font-size:10px;color:#7c8983;white-space:nowrap}.salary-installment-row.is-paid .salary-installment-status{color:#28704e;font-weight:700}
.salary-hint{font-size:11px;line-height:1.8;color:var(--muted);margin:12px 0 0}
@media(max-width:700px){.salary-summary{grid-template-columns:1fr}.salary-installment-row{grid-template-columns:22px minmax(0,1fr) auto;gap:8px}.salary-installment-status{grid-column:2/-1;padding-right:1px}.installment-list{max-height:250px}}

.month-chip{display:inline-flex;align-items:center;padding:6px 11px;border-radius:999px;background:#edf4ef;color:#376451;font-size:11px;font-weight:700;white-space:nowrap}

/* Fully custom dropdowns and date picker: consistent across browsers */
.custom-select{position:relative;width:100%;min-width:0}
.custom-select-source{position:absolute!important;width:1px!important;height:1px!important;min-height:1px!important;opacity:0!important;pointer-events:none!important;inset:auto auto 0 0;padding:0!important;border:0!important}
.custom-select-trigger,.custom-date-trigger{width:100%;min-height:46px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 14px;border:1px solid #dfe8e3;border-radius:12px;background:linear-gradient(180deg,#fff,#fbfcfb);color:var(--ink);font-size:14px;font-weight:600;text-align:right;transition:border-color .18s,box-shadow .18s,background .18s}
.custom-select-trigger:hover,.custom-date-trigger:hover{border-color:#a9c5b8;background:#fff}
.custom-select.open .custom-select-trigger,.custom-date:focus-within .custom-date-trigger{border-color:#6d9d8b;box-shadow:0 0 0 3px #e1eee7;background:#fff}
.custom-select-trigger i,.custom-date-trigger i{width:9px;height:9px;flex:0 0 9px;border-left:2px solid #376b5b;border-bottom:2px solid #376b5b;transform:rotate(-45deg);margin-inline:3px 2px;transition:transform .18s}
.custom-select.open .custom-select-trigger i{transform:rotate(135deg)}
.custom-select-menu{position:absolute;z-index:80;top:calc(100% + 7px);right:0;left:0;max-height:245px;overflow:auto;padding:6px;background:#fff;border:1px solid #dfe9e3;border-radius:14px;box-shadow:0 16px 38px #193b3026;display:none;scrollbar-width:thin;scrollbar-color:#b7cbbf #f1f5f2}
.custom-select.open .custom-select-menu{display:grid;gap:3px}
.custom-select-option{width:100%;border:0;border-radius:9px;background:transparent;color:#314641;padding:10px 12px;text-align:right;font-size:13px;font-weight:600;min-height:39px}
.custom-select-option:hover{background:#f1f6f2;color:var(--green)}
.custom-select-option.selected{background:#e8f2ec;color:#1c5148;font-weight:800}
.custom-select-option:disabled{opacity:.4;cursor:not-allowed}
.custom-date{position:relative;width:100%;min-width:0}
.custom-date-trigger{font-weight:500}
.custom-date-trigger i{width:17px;height:16px;border:1.7px solid #56816e;border-radius:4px;transform:none;margin:0;position:relative}
.custom-date-trigger i:before{content:'';position:absolute;right:0;left:0;top:4px;border-top:1.5px solid #56816e}
.custom-date-trigger i:after{content:'';position:absolute;width:3px;height:3px;right:3px;top:-3px;border-radius:2px;background:#56816e;box-shadow:-7px 0 #56816e}
.custom-date-popup{position:absolute;z-index:90;top:calc(100% + 7px);right:0;width:min(310px,calc(100vw - 48px));padding:13px;background:#fff;border:1px solid #dfe9e3;border-radius:16px;box-shadow:0 18px 42px #193b3029;direction:rtl}
.custom-date-popup[hidden]{display:none!important}
.calendar-head{display:grid;grid-template-columns:38px 1fr 38px;align-items:center;gap:8px;margin-bottom:12px}
.calendar-head strong{text-align:center;font-size:14px;color:#25443b}
.calendar-head button,.calendar-foot button{border:0;border-radius:9px;background:#f0f5f1;color:#285a49;min-height:34px;font-size:19px;font-weight:700}
.calendar-weekdays,.calendar-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;text-align:center}
.calendar-weekdays{margin-bottom:6px;color:#82918a;font-size:10px;font-weight:700}
.calendar-day{min-width:0;aspect-ratio:1;border:0;border-radius:9px;background:transparent;color:#344a43;font-size:12px}
.calendar-day:hover{background:#eef5f0}
.calendar-day.selected{background:#1c5148;color:#fff;font-weight:800}
.calendar-day.today:not(.selected){box-shadow:inset 0 0 0 1px #7eaa94;color:#1c5148;font-weight:800}
.calendar-empty{aspect-ratio:1}
.calendar-foot{display:flex;justify-content:space-between;gap:10px;margin-top:10px;padding-top:9px;border-top:1px solid #edf1ee}
.calendar-foot button{padding:0 12px;font-size:11px;min-height:31px}
/* Geometric chevrons instead of font glyphs, aligned consistently in RTL */
.creditor-chevron{font-size:0!important;position:relative}
.creditor-chevron:before{content:'';width:7px;height:7px;border-left:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(-45deg);margin-top:-4px;transition:transform .2s}
.creditor-chevron.rotated:before{transform:rotate(135deg);margin-top:4px}
.installment-details summary:after{content:''!important;width:7px;height:7px;flex:0 0 7px;border-left:2px solid #376b5b;border-bottom:2px solid #376b5b;transform:rotate(-45deg);margin-top:-4px;transition:transform .18s}
.installment-details[open] summary:after{transform:rotate(135deg);margin-top:4px}
@media(max-width:700px){.custom-date-popup{width:min(300px,calc(100vw - 36px))}.custom-select-menu{max-height:210px}.custom-select-trigger,.custom-date-trigger{min-height:44px;font-size:13px}}


/* Polished Arabic file picker and date-picker icon */
.custom-date-trigger{direction:rtl;}
.custom-date-label{flex:1;min-width:0;text-align:right;}
.date-picker-icon{width:19px;height:19px;flex:0 0 19px;stroke:#477763;stroke-width:1.7;fill:none;stroke-linecap:round;stroke-linejoin:round;}
.custom-date-trigger:hover .date-picker-icon{stroke:#1c5148;}
.custom-file{position:relative;width:100%;min-width:0;}
.custom-file-source{position:absolute!important;width:1px!important;height:1px!important;min-width:1px!important;min-height:1px!important;padding:0!important;margin:0!important;opacity:0!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important;}
.custom-file-row{display:flex;align-items:center;gap:10px;min-height:48px;padding:6px 8px 6px 12px;border:1px solid #dfe8e3;border-radius:12px;background:linear-gradient(180deg,#fff,#fbfcfb);transition:border-color .18s,box-shadow .18s;}
.custom-file:focus-within .custom-file-row,.custom-file.has-files .custom-file-row{border-color:#9bbba9;box-shadow:0 0 0 3px #e8f1eb;}
.custom-file-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:34px;padding:7px 12px;border:0;border-radius:9px;background:#eaf2ed;color:#1c5148;font-size:12px;font-weight:800;white-space:nowrap;}
.custom-file-button:hover{background:#dcebe1;}
.file-button-icon{display:grid;place-items:center;width:18px;height:18px;border-radius:6px;background:#fff;font-size:16px;line-height:1;}
.custom-file-status{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#7a8985;font-size:12px;font-weight:500;text-align:right;}
.custom-file.has-files .custom-file-status{color:#315e4b;font-weight:700;}
.custom-file-clear{border:0;background:transparent;color:#a65b53;font-size:11px;font-weight:700;padding:6px 5px;white-space:nowrap;}
.custom-file-clear[hidden]{display:none!important;}
.custom-file-names{font-size:10px;color:#82918a;line-height:1.7;padding:4px 3px 0;overflow-wrap:anywhere;}
.custom-file-names:empty{display:none;}
@media(max-width:700px){.custom-file-row{min-height:46px}.custom-file-button{font-size:11px;padding-inline:10px}.custom-file-status{font-size:11px}}

/* Debt cards: clearer hierarchy, calmer spacing and compact payment summary */
.debt-list{gap:16px}
.creditor-group{padding:12px 13px 13px;border-radius:20px;background:linear-gradient(145deg,#f0f5f1,#eaf1ec);border-color:#e1ebe4;box-shadow:0 7px 22px #173b3008}
.creditor-heading{min-height:54px;padding:7px 9px 13px;gap:10px}
.creditor-name{font-size:18px;letter-spacing:-.2px}
.creditor-count{background:#fff;border:1px solid #e7eee9;padding:5px 11px;font-size:11px}
.creditor-heading strong{font-size:14px;font-weight:800;color:#245a49}
.creditor-content{gap:13px;padding:0 2px}
.debt-card{padding:20px 22px 16px;border:1px solid #e6ede8;border-radius:17px;box-shadow:0 5px 18px #193b3008;transition:box-shadow .18s,border-color .18s}
.debt-card:hover{border-color:#cbded2;box-shadow:0 9px 24px #193b3010}
.debt-card-head{display:flex;align-items:center;justify-content:space-between;gap:18px}
.debt-title{min-width:0;gap:13px}
.debt-icon{width:46px;height:46px;flex:0 0 46px;border-radius:14px;background:linear-gradient(145deg,#e8f2ec,#dcebe2);font-size:20px}
.debt-heading-copy{min-width:0}
.debt-title h4{font-size:17px;line-height:1.45;font-weight:800;color:#203b34}
.debt-title p{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-top:4px;font-size:11px;color:#84928b}
.debt-title p i{width:3px;height:3px;border-radius:50%;background:#aab8b0}
.debt-balance{min-width:150px;text-align:left;padding:9px 13px;border-radius:13px;background:#f3f7f4}
.debt-balance small{display:block;color:#819088;font-size:10px;font-weight:700;margin-bottom:2px}
.debt-balance strong{display:block;color:#1c5148;font-size:19px;font-weight:800;white-space:nowrap;letter-spacing:-.3px}
.debt-progress-block{margin-top:18px;padding:13px 14px 11px;border-radius:13px;background:#fafcfb;border:1px solid #edf2ee}
.debt-progress-heading,.debt-progress-foot{display:flex;justify-content:space-between;align-items:center;gap:12px}
.debt-progress-heading{font-size:11px;color:#728179;font-weight:700}
.debt-progress-heading strong{color:#28644f;font-size:12px}
.debt-progress-heading strong small{font-size:10px;font-weight:600;color:#809188}
.debt-card .progress{height:9px;margin:9px 0 7px;background:#e8efea}
.debt-card .progress i{background:linear-gradient(90deg,#6b9f86,#2e735b);border-radius:10px}
.debt-progress-foot{font-size:10px;color:#89968f}
.debt-progress-foot b{color:#43584e;font-weight:800}
.debt-info-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin-top:12px}
.debt-info-item{min-width:0;padding:10px 12px;border:1px solid #edf1ee;border-radius:11px;background:#fff}
.debt-info-item>span{display:block;color:#89958f;font-size:10px;font-weight:600;margin-bottom:4px}
.debt-info-item>strong{display:block;color:#334940;font-size:12px;font-weight:800;line-height:1.65;overflow-wrap:anywhere}
.debt-info-item>strong small{font-size:10px;color:#87958d;font-weight:600}
.debt-extra-line{display:flex;gap:16px;flex-wrap:wrap;padding:9px 2px 0;color:#829087;font-size:10px}
.debt-extra-line b{color:#50665a}
.next-installment{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:11px;padding:9px 12px;border-radius:10px;background:#f5f8f5;color:#75847c;font-size:10px}
.next-installment-dot{width:7px;height:7px;flex:0 0 7px;border-radius:50%;background:#c99b51;box-shadow:0 0 0 3px #f4ead9}
.next-installment strong{margin-inline-start:auto;color:#315a49;font-size:12px}
.next-installment small{color:#87948d;font-size:10px}
.debt-note{padding:9px 12px;border-right:3px solid #d7e7dc;background:#f8faf8;border-radius:8px;font-size:11px}
.debt-card .installment-details{margin-top:13px;padding-top:7px;border-top:1px solid #edf1ee}
.debt-card .installment-details summary{min-height:38px;padding:6px 3px;font-size:12px}
.installment-count-badge{display:inline-flex;align-items:center;border-radius:30px;background:#eef4ef;color:#5c7969;padding:3px 9px;font-size:10px}
.debt-card .installment-details summary:after{margin-inline-start:auto}
.debt-card .installment-list{max-height:260px}
.debt-card .installment-row{padding:10px 12px;background:#fbfcfb}
.debt-card .installment-row.is-paid{background:#f1f8f3}
.debt-card .card-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:14px;padding-top:12px;border-top:1px solid #f0f3f1}
.debt-card .card-actions .mini-btn{min-height:36px;padding:7px 13px;font-size:11px;font-weight:700}
.debt-card .card-actions .mini-btn.pay{margin-inline-end:auto;background:#e8f2eb;border-color:#e0ede4}
.debt-card .card-actions .danger-action{color:#a75b53;background:#fff;border-color:#f0e4e2}
.debt-card.is-settled .debt-balance{background:#edf6ef}
.debt-card.is-settled .debt-balance strong{color:#31734f}
@media(max-width:700px){
 .creditor-group{padding:9px;border-radius:16px}
 .creditor-heading{min-height:48px;gap:7px;padding:5px 4px 11px;flex-wrap:wrap}
 .creditor-name{font-size:15px}
 .creditor-count{font-size:10px;padding:3px 8px}
 .creditor-heading strong{font-size:11px}
 .debt-card{padding:14px 13px 12px;border-radius:14px}
 .debt-card-head{align-items:flex-start;gap:8px}
 .debt-title{gap:9px}
 .debt-icon{width:38px;height:38px;flex-basis:38px;border-radius:11px;font-size:17px}
 .debt-title h4{font-size:14px}
 .debt-title p{font-size:10px}
 .debt-balance{min-width:0;padding:7px 9px;border-radius:10px}
 .debt-balance small{font-size:9px}
 .debt-balance strong{font-size:14px}
 .debt-progress-block{margin-top:13px;padding:10px}
 .debt-progress-foot{font-size:9px}
 .debt-info-grid{grid-template-columns:1fr 1fr;gap:7px;margin-top:9px}
 .debt-info-item{padding:8px 9px}
 .debt-info-item:last-child{grid-column:1/-1}
 .debt-info-item>span{font-size:9px}
 .debt-info-item>strong{font-size:11px}
 .next-installment{gap:6px;padding:8px 9px}
 .debt-card .card-actions{gap:6px}
 .debt-card .card-actions .mini-btn{min-height:34px;padding:6px 9px;font-size:10px}
 .debt-card .card-actions .mini-btn.pay{margin-inline-end:0;flex:1 1 100%}
}

/* Payment confirmation dialog */
.confirm-layer{position:fixed;inset:0;z-index:35;background:rgba(16,35,30,.58);backdrop-filter:blur(4px);display:grid;place-items:center;padding:18px}
.confirm-dialog{width:min(100%,430px);background:#fff;border:1px solid #e7eee9;border-radius:22px;padding:27px 25px 23px;box-shadow:0 24px 80px #10231e35;text-align:center;animation:confirm-in .18s ease-out}
.confirm-icon{width:54px;height:54px;border-radius:18px;margin:0 auto 13px;background:#e8f2ec;color:#1c5148;display:grid;place-items:center;font-size:27px;font-weight:800}
.confirm-dialog h3{font-size:20px;margin:0 0 7px;color:#1d302e}
.confirm-dialog>p{font-size:14px;line-height:1.8;color:#718078;margin:0 auto 17px;max-width:340px}
.confirm-payment-details{display:grid;gap:0;background:#f7faf8;border:1px solid #e8efeb;border-radius:14px;padding:5px 14px;margin-bottom:19px;text-align:right}
.confirm-payment-details>div{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid #e9efeb}
.confirm-payment-details>div:last-child{border-bottom:0}
.confirm-payment-details span{font-size:12px;color:#84918b}
.confirm-payment-details strong{font-size:13px;color:#24483f;text-align:left}
.confirm-actions{display:flex;gap:9px;justify-content:center}
.confirm-actions .btn{flex:1;min-height:46px}
.confirm-actions .btn:disabled{opacity:.6;cursor:wait}
@keyframes confirm-in{from{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}
@media(max-width:520px){.confirm-layer{align-items:end;padding:10px}.confirm-dialog{width:100%;padding:23px 18px calc(19px + env(safe-area-inset-bottom));border-radius:22px 22px 16px 16px}.confirm-actions{flex-direction:column-reverse}.confirm-dialog h3{font-size:19px}}


/* Dashboard month view, setup library and debt detail sheet */
.custom-select-source{display:none!important;visibility:hidden!important;}
.overview-stats{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:0}
.monthly-overview-panel{margin-top:12px;padding:20px 22px}
.monthly-panel-head{align-items:center;gap:12px}
.month-navigation{display:flex;align-items:center;gap:9px}
.month-navigation .btn{min-height:36px;padding:7px 15px}
.monthly-debts-list{display:grid;gap:9px}
.monthly-debt-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:16px;padding:13px 14px;border:1px solid #e9efeb;border-radius:13px;background:#fff}
.monthly-debt-row.is-paid{background:#f4faf6;border-color:#deece2}
.monthly-debt-company{display:flex;align-items:center;gap:11px;min-width:0}
.monthly-company-icon{width:38px;height:38px;flex:0 0 38px;border-radius:12px;background:#edf4ef;color:#245a49;display:grid;place-items:center;font-size:17px}
.monthly-debt-company b{display:block;font-size:13px;color:#24463b}
.monthly-debt-company small{display:block;font-size:10px;color:#87938d;margin-top:3px}
.monthly-debt-amount{font-size:13px;white-space:nowrap;color:#294d40}
.monthly-debt-actions{display:flex;gap:7px;align-items:center}
.monthly-debt-actions .mini-btn{min-width:64px;min-height:34px;font-weight:700}
.monthly-debt-actions .paid-state{background:#eaf4ed;color:#2d7250;border-color:#dcebe1;cursor:default}
.monthly-debt-actions .pay{background:#1c5148;color:white;border-color:#1c5148}
.monthly-debt-actions .pay:hover{background:#143f37}
.setup-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}
.setup-panel{min-width:0}
.setup-list{display:grid;gap:8px}
.setup-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 12px;border:1px solid #e9efeb;border-radius:12px;background:#fbfcfb}
.setup-row b{display:block;font-size:12px;color:#28483d}
.setup-row small{display:block;font-size:10px;color:#89958e;margin-top:3px}
.setup-row>div:last-child{display:flex;gap:6px;flex-wrap:wrap}
.setup-row .mini-btn{min-height:31px}
.detail-summary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:15px}
.detail-summary-grid>div{padding:11px;border:1px solid #e8efea;border-radius:11px;background:#f8faf8;min-width:0}
.detail-summary-grid span{display:block;color:#87948d;font-size:10px;margin-bottom:5px}
.detail-summary-grid b{display:block;color:#254c3e;font-size:12px;overflow-wrap:anywhere}
.detail-section{padding:12px 0;border-top:1px solid #edf1ee}
.detail-section h4{margin:0 0 9px;font-size:13px;color:#285744}
.detail-section p{font-size:12px;line-height:1.8;color:#687971;margin:0}
.detail-line{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:7px 0;font-size:12px;color:#6c7c73;border-bottom:1px dashed #edf1ee}
.detail-line:last-child{border-bottom:0}
.detail-line b{color:#284b3f;white-space:nowrap}
.detail-attachment{display:inline-flex;margin:3px 6px 3px 0;padding:7px 10px;border-radius:9px;background:#edf4ef;color:#245a49;text-decoration:none;font-size:11px}
.details-modal-form{display:block}
.details-modal-form .form-actions{margin-top:15px}
.product-row{grid-template-columns:1fr 1fr}
@media(max-width:800px){.setup-grid{grid-template-columns:1fr}}
@media(max-width:700px){
 .overview-stats{grid-template-columns:1fr 1fr}
 .monthly-overview-panel{padding:14px}
 .monthly-panel-head{align-items:flex-start}
 .monthly-panel-head .panel-head{align-items:flex-start}
 .monthly-debt-row{grid-template-columns:minmax(0,1fr) auto;gap:9px;padding:11px}
 .monthly-debt-company{grid-column:1/-1}
 .monthly-debt-amount{grid-column:1;grid-row:2}
 .monthly-debt-actions{grid-column:2;grid-row:2;justify-content:flex-end}
 .monthly-debt-company b{font-size:12px}
 .monthly-debt-actions .mini-btn{min-width:58px;padding:6px 8px;font-size:10px}
 .month-navigation{gap:5px}
 .month-navigation .btn{padding:6px 10px;font-size:11px}
 .setup-row{align-items:flex-start;flex-direction:column}
 .setup-row>div:last-child{width:100%}
 .detail-summary-grid{grid-template-columns:1fr}
 .product-row{grid-template-columns:1fr}
 .mobile-nav button{min-width:0;flex:1;font-size:16px}
}

/* v11 dashboard, modal sizing, repeat-row close control */
.modal{width:min(100%,620px)!important}
.modal-layer{padding:22px}
.remove-row{top:9px;right:9px;left:auto;width:27px;height:27px;border-radius:9px;display:grid;place-items:center;font-size:18px;z-index:2}
.repeat-row{padding-top:46px}
.salary-deduction-overview{margin:0 0 14px;padding:17px 20px}
.salary-deduction-head,.salary-deduction-foot{display:flex;align-items:center;justify-content:space-between;gap:12px}
.salary-deduction-head h3{font-size:14px;margin:0;color:#28483d}
.salary-deduction-head p{font-size:11px;color:var(--muted);margin:3px 0 0}
.salary-deduction-head>strong{font-size:19px;color:var(--green);white-space:nowrap}
.salary-deduction-track{height:10px;background:#edf2ee;border-radius:99px;overflow:hidden;margin:13px 0 8px}
.salary-deduction-track i{height:100%;display:block;border-radius:99px;background:linear-gradient(90deg,#79a991,#1c5148);transition:width .25s}
.salary-deduction-foot{font-size:10px;color:#7b8982}
.salary-deduction-foot b{color:#315c4c;font-size:11px}
@media(max-width:700px){.modal-layer{padding:8px}.modal{width:100%!important}.salary-deduction-overview{padding:14px}.salary-deduction-head>strong{font-size:16px}.salary-deduction-foot{align-items:flex-start;flex-direction:column;gap:4px}.repeat-row{padding-top:46px}}

/* Compact spacing between creditor groups */
.debt-list{gap:8px}
.creditor-group{margin-bottom:0;padding-top:9px;padding-bottom:9px}
.creditor-heading{padding-bottom:7px;min-height:46px}
.creditor-content{gap:9px}
@media(max-width:700px){
  .debt-list{gap:7px}
  .creditor-group{margin-bottom:0;padding-top:7px;padding-bottom:7px}
  .creditor-heading{min-height:42px;padding-bottom:5px}
}
