:root{font-family:system-ui,-apple-system,sans-serif;color:#243c37;background:#f3f6f4;font-size:15px}*{box-sizing:border-box}body{margin:0}header{background:#fff;border-bottom:1px solid #dce5df;padding:24px 5%;display:flex;align-items:center;justify-content:space-between;gap:25px}.brand{display:flex;gap:14px;align-items:center;color:#17624d;font-size:30px;font-weight:750}.brand span{font-size:23px}.brand small{display:block;font-size:12px;font-weight:400;color:#72857d}nav{display:flex;gap:8px}a{color:#17624d;text-decoration:none}nav a{padding:12px 16px;border-radius:8px}nav a.active{background:#e4f1eb;font-weight:650}main{max-width:1250px;margin:auto;padding:35px 24px}.heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:22px}.heading h1{margin:0;font-size:32px}.heading h2{margin:0}.eyebrow{font-size:11px;letter-spacing:2px;color:#6a8479}.heading>span,.muted,footer{color:#708279;font-size:13px}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin-bottom:26px}.stats article,.card{background:#fff;border:1px solid #dfe8e1;border-radius:14px;padding:26px;box-shadow:0 4px 18px #243c3704}.stats strong{display:block;margin-top:14px;font-size:27px}.stats small{color:#6e8178}.stats article:last-child{background:#17624d;color:#fff}.stats article:last-child small{color:#c4e0d2}.card{margin-bottom:24px}h2{font-size:20px;margin-top:0}label{display:flex;flex-direction:column;gap:8px;font-size:13px;font-weight:600}input,select{font:inherit;background:#fff;border:1px solid #cbd9d0;border-radius:7px;padding:11px;min-width:0;color:#243c37}input:focus,select:focus{outline:2px solid #7abda1;outline-offset:1px}.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;align-items:end}button,.button{font:inherit;border:0;border-radius:7px;padding:12px 18px;color:#fff;background:#17624d;cursor:pointer;display:inline-block}button:disabled{opacity:.4;cursor:default}.secondary{background:#edf3ef;color:#31594a;padding:7px 10px}.danger{background:#fff1ed;color:#a3422e;font-size:12px;padding:7px 10px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;margin:15px 0}th{text-align:left;font-size:12px;color:#72847b;background:#f7f9f7;padding:14px}td{padding:16px 14px;border-bottom:1px solid #edf1ee;font-size:14px}.actions{display:flex;align-items:center;gap:14px}.notice{background:#dfefe5;border:1px solid #b6d5c2;padding:16px;border-radius:8px}.error{background:#fff0eb;border-color:#edb9aa}.empty{padding:25px 0;color:#7b8b82}footer{padding:12px 0 30px} @media(max-width:800px){header{flex-direction:column;align-items:flex-start}nav{flex-wrap:wrap}nav a{padding:9px}.stats{grid-template-columns:repeat(2,1fr)}.grid{grid-template-columns:1fr 1fr}.heading{flex-wrap:wrap}}@media(max-width:480px){main{padding:22px 14px}.grid,.stats{grid-template-columns:1fr}.card{padding:18px}.heading h1{font-size:27px}}

[hidden]{display:none!important}.mobile-tools,.exports{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-bottom:20px}.exports span{font-size:13px;color:#708279}input,select{font-size:16px;min-height:46px}button,.button{min-height:44px}.grid>*{min-width:0}.heading form{display:flex;gap:8px;flex-wrap:wrap}.heading input{max-width:100%}td{overflow-wrap:anywhere}
@media(max-width:600px){body{padding-bottom:calc(80px + env(safe-area-inset-bottom))}header{padding:18px 20px}header nav{position:fixed;bottom:0;left:0;right:0;z-index:10;background:#fff;border-top:1px solid #dce5df;display:grid;grid-template-columns:repeat(4,1fr);gap:2px;padding:8px 5px calc(8px + env(safe-area-inset-bottom))}nav a{text-align:center;font-size:12px;padding:12px 3px}.grid{grid-template-columns:1fr}.stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.stats article{padding:16px}.stats strong{font-size:21px}.table-wrap{overflow:visible}table,tbody{display:block}thead,table tr:has(th){display:none}table tr{display:block;border:1px solid #dfe8e1;border-radius:10px;margin:12px 0;padding:10px}table td{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 5px;border-bottom:1px solid #edf1ee;text-align:right}table td::before{content:attr(data-label);font-size:12px;color:#708279;text-align:left;flex-shrink:0}table td:last-child{border:0}table td.actions{flex-wrap:wrap}.exports{gap:7px}.exports span{width:100%}.exports a{flex:1;text-align:center;padding:10px 8px;font-size:13px}.card{padding:18px}.heading{gap:12px}.heading #search{width:100%}}

/* Arabic and RTL layout */
html[dir="rtl"]{font-family:Tahoma,"Geeza Pro",Arial,sans-serif}html[dir="rtl"] body{text-align:right;line-height:1.7}html[dir="rtl"] th{text-align:right}html[dir="rtl"] .eyebrow{letter-spacing:0}html[dir="rtl"] input:not([dir="ltr"]),html[dir="rtl"] select{text-align:right}html[dir="rtl"] input[dir="ltr"]{text-align:left}html[dir="rtl"] .stats strong{font-variant-numeric:tabular-nums}html[dir="rtl"] bdi{unicode-bidi:isolate}html[dir="rtl"] .heading>span{direction:ltr;unicode-bidi:isolate}
@media(max-width:600px){html[dir="rtl"] table td{text-align:left}html[dir="rtl"] table td::before{text-align:right}html[dir="rtl"] header nav a{font-size:13px}html[dir="rtl"] .stats strong{font-size:20px}}

/* Refined visual identity */
:root{--ink:#183e34;--green:#16644e;--gold:#c5a464;--line:#dfebe5;--muted:#71867c;background:#f5f8f5;color:var(--ink)}body{background:radial-gradient(ellipse at 95% 0%,#e5efe8 0,transparent 45%),#f5f8f5}header{padding:18px 4%;border-color:var(--line);box-shadow:0 4px 25px #173f3405}.brand-logo{width:58px;height:58px;object-fit:contain;border-radius:14px;background:#fff}.brand small{font-size:12px}nav a{transition:background .2s,color .2s}nav a:hover{background:#f0f6f2}nav a.active{color:#fff;background:var(--green);box-shadow:0 5px 12px #16644e20}.logout-form button{font-size:12px;white-space:nowrap;border:1px solid var(--line)}main{padding-top:30px}.heading h1{font-size:34px;letter-spacing:-.6px}.eyebrow{color:#8b784f;font-weight:700;margin-bottom:5px}.card{border-color:var(--line);border-radius:20px;box-shadow:0 8px 32px #1a483407;padding:28px}h2{font-size:21px;color:var(--ink)}.grid{gap:22px}.grid label{color:#466459}input,select{border-radius:10px;background:#fbfdfb;border-color:#d9e5dd;padding:12px;transition:border .2s,box-shadow .2s}input:focus,select:focus{outline:none;border-color:#448c6c;box-shadow:0 0 0 4px #16644e0b}button,.button{border-radius:10px;font-weight:600;transition:transform .15s,box-shadow .15s}button:hover,.button:hover{box-shadow:0 4px 14px #173f3412}button:active,.button:active{transform:translateY(1px)}.grid>button{background:var(--green);min-height:49px}.exports{padding:13px 16px;border:1px solid var(--line);border-radius:14px;background:#ffffff99}.exports .secondary{background:#edf4ef;border:1px solid #dce9e0}.stats{gap:18px}.stats article{position:relative;border-radius:19px;border-color:var(--line);padding:24px;overflow:hidden;min-height:152px}.stat-icon{display:flex;justify-content:center;align-items:center;width:37px;height:37px;border-radius:11px;background:#edf5ef;color:#2b7457;font-size:24px;margin-bottom:14px}.stats strong{font-size:28px;line-height:1.4;margin-top:8px}.stats article:last-child{background:linear-gradient(135deg,#1c785c,#124e3c)}.stats article:last-child .stat-icon{background:#ffffff20;color:#e9d6a9}th{background:#f3f7f4;color:#617c6c;padding:16px}td{padding:18px 14px}tbody tr:hover{background:#fafcf9}.notice{border-radius:12px}.mobile-tools .secondary{font-size:12px;background:transparent;border:1px solid #d8e6dc}.muted{line-height:1.8}.auth-page{min-height:100vh;padding:0;background:radial-gradient(circle at 12% 10%,#e1eadc,transparent 45%),#f2f6ef}.auth-layout{max-width:1060px;min-height:100vh;display:grid;grid-template-columns:1fr 1fr;gap:70px;align-items:center;padding:55px 28px}.auth-intro h1{font-size:42px;line-height:1.5;margin:14px 0;color:#1a503b}.auth-intro>p:not(.eyebrow){color:#677e70;font-size:16px}.auth-logo{width:130px;height:130px;object-fit:contain;border-radius:24px;background:#fff;padding:8px;box-shadow:0 12px 30px #204a3310}.auth-tags{display:flex;gap:12px;flex-wrap:wrap;margin-top:30px}.auth-tags span{padding:8px 17px;border:1px solid #d5e1d3;border-radius:100px;color:#4c7059;font-size:13px}.auth-card{background:#fff;border:1px solid #e1e9dc;border-radius:26px;box-shadow:0 20px 75px #19402b0c;padding:38px}.auth-mark{display:inline-block;padding:5px 12px;background:#f3eddf;color:#917444;border-radius:7px;font-size:11px;font-weight:700}.auth-card h2{font-size:27px;margin:18px 0 6px}.auth-form{display:grid;gap:20px;margin-top:26px}.auth-form input{width:100%}.auth-submit{display:flex;justify-content:space-between;align-items:center;background:#1a674d;margin-top:5px;min-height:52px}.auth-foot{font-size:11px;color:#8a9b8e;border-top:1px solid #eef2ea;padding-top:22px;margin-top:25px}.auth-page label{font-size:13px}.auth-page .notice{font-size:13px}
@media(max-width:900px){header{gap:15px;flex-wrap:wrap}.auth-layout{gap:35px}.auth-intro h1{font-size:33px}}
@media(max-width:600px){header{flex-direction:row;align-items:center;justify-content:space-between;padding:14px 18px}.brand-logo{width:45px;height:45px}.brand{gap:10px}.brand span{font-size:21px}.brand small{font-size:10px}.logout-form button{padding:8px 10px;min-height:40px}.heading h1{font-size:28px}.card{padding:20px;border-radius:18px}.stats{gap:12px}.stats article{padding:17px;min-height:147px}.stats strong{font-size:22px}.stat-icon{width:32px;height:32px;font-size:21px}.stats small{font-size:12px}.exports{padding:12px}.exports a{font-size:12px}.auth-page{padding-bottom:0}.auth-layout{display:flex;flex-direction:column;gap:24px;padding:28px 18px;min-height:100vh;justify-content:center}.auth-intro{text-align:center;width:100%}.auth-logo{width:90px;height:90px;border-radius:18px}.auth-intro h1{font-size:25px;line-height:1.5;margin:8px 0}.auth-intro br{display:none}.auth-intro>p:not(.eyebrow){font-size:13px;margin-bottom:0}.auth-intro .eyebrow{display:none}.auth-tags{display:none}.auth-card{width:100%;max-width:440px;padding:25px;border-radius:23px}.auth-card h2{font-size:24px}.auth-form{gap:16px}.auth-foot{margin-bottom:0}header nav{box-shadow:0 -5px 20px #1a48340a;padding-top:10px}header nav a.active{box-shadow:none}.table-wrap table tr{border-radius:14px;background:#fbfdfb}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}

.quick-actions{position:sticky;top:0;z-index:20;display:flex;gap:12px;padding:12px 0;margin-bottom:18px;background:#f5f8f5f5;backdrop-filter:blur(12px);border-bottom:1px solid #dfe8df}.quick-actions .button{display:flex;gap:8px;align-items:center;justify-content:center;min-height:48px;padding:10px 22px}.quick-actions .payment-action{background:#e9efe5;color:#27583d;border:1px solid #ccdcc8}.quick-actions span{font-size:22px;line-height:1}#add-member,#add-payment{scroll-margin-top:95px}@media(max-width:600px){.quick-actions{gap:10px;padding:10px 0}.quick-actions .button{flex:1;padding:10px 8px;font-size:14px;white-space:nowrap}}

.page-export{display:flex;justify-content:flex-end;margin:-8px 0 18px}.page-export .button{font-size:12px;padding:8px 14px;min-height:44px;background:#edf4ef;color:#31594a;border:1px solid #dce9e0}

.month-filter{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 24px}.month-filter h2{margin:0}.month-filter .eyebrow{margin-top:0}.month-filter form{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.month-filter label{font-size:12px}.month-note{margin:-8px 0 24px}@media(max-width:600px){.month-filter{align-items:stretch;flex-direction:column;gap:16px;padding:20px}.month-filter form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}.month-filter label{grid-column:1/-1}.month-filter button{font-size:13px;padding:10px 12px}.month-filter input{width:100%}}
