:root{color-scheme:light;--ink:#18382f;--muted:#52665e;--green:#145745;--paper:#f7f6f0;--edge:#dce4db;--white:#fff;font-family:"Segoe UI",Tahoma,Arial,sans-serif;color:var(--ink);background:var(--paper)}
*{box-sizing:border-box}
body{margin:0}
html[dir=rtl]{font-family:"Jameel Noori Nastaleeq","Jameel Noori Nastaliq","Noori Nastaleeq","Noori Nastaliq","Noto Nastaliq Urdu","Urdu Typesetting","Segoe UI",Tahoma,sans-serif;line-height:2}
.shell{max-width:1240px;margin:auto;padding-inline:clamp(16px,4vw,48px)}
.masthead{background:#103e33;color:white;border-bottom:4px solid #b89b64}
.mast-content,.brand,.heading,.toolbar,.actions,footer,.dialog-head{display:flex;align-items:center;gap:14px}
.mast-content,.heading,footer,.dialog-head{justify-content:space-between}
.mast-content{padding-block:22px}
.mark{font-family:Georgia,serif;display:grid;place-items:center;border:1px solid #d8bf87;color:#f5dba4;border-radius:12px;width:48px;height:48px;font-size:27px;flex:none}
h1,h2,h3,p{margin:0}
h1{font-size:clamp(19px,3vw,29px)}
h2{font-size:clamp(23px,4vw,34px);letter-spacing:-.025em}
.brand p{color:#e5dfcc;margin-top:3px}
.heading{margin-block:34px 22px}
.heading p,footer,#notice,.muted{color:var(--muted)}
.summary{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:22px}
.card,.panel{background:white;border:1px solid var(--edge);border-radius:14px}
.card{padding:16px 18px;border-top:3px solid #a7bdaa}
.card:last-child{border-top-color:#b89b64}
.card span{display:block;font-size:.9rem;color:var(--muted)}
.card strong{font-size:clamp(18px,2.5vw,26px)}
.toolbar{padding:15px;flex-wrap:wrap;border-bottom:1px solid var(--edge)}
.toolbar input[type=search]{flex:1;min-width:190px}
.toolbar input[type=number]{width:96px}
button,input,select,textarea{font:inherit;color:inherit}
input,select,textarea,button{border:1px solid #bbcbbf;border-radius:8px;padding:8px 11px;background:white}
button{cursor:pointer;font-weight:600}
button:hover{background:#edf4ee}
button.primary{background:var(--green);color:white;border-color:var(--green)}
button.primary:hover{background:#0e4436}
button.light{background:transparent;color:#fff;border-color:#819b8b}
:focus-visible{outline:3px solid #b48a32;outline-offset:2px}
.table-wrap{overflow:auto}
table{width:100%;border-collapse:collapse;text-align:start}
th,td{padding:12px 14px;text-align:start;border-bottom:1px solid var(--edge);vertical-align:middle}
th{background:#eef3ec;font-size:.88rem}
td small{display:block;color:var(--muted)}
tr:last-child td{border-bottom:0}
.money{white-space:nowrap;direction:ltr;unicode-bidi:isolate}
.badge{display:inline-block;background:#e8f2e9;border-radius:20px;padding:3px 9px;white-space:nowrap}
.badge.warn{background:#fff0d8;color:#704c14}
.empty{text-align:center;padding:46px 18px;color:var(--muted)}
.empty h3{color:var(--ink);margin-bottom:5px}
footer{padding-block:18px;flex-wrap:wrap;font-size:.88rem}
.actions{flex-wrap:wrap}
#notice{min-height:1.5em;padding-bottom:14px}
dialog{width:min(920px,calc(100% - 24px));max-height:92vh;border:1px solid var(--edge);border-radius:16px;color:var(--ink);padding:0}
dialog::backdrop{background:#0c271f99}
.dialog-head{padding:18px 22px;background:#edf3ed;border-bottom:1px solid var(--edge)}
.tabs{display:flex;gap:8px;margin-bottom:16px;flex-wrap:wrap}
.dialog-body{padding:18px 22px}
.fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.fields label{display:grid;gap:4px}
.fields input,.fields select,.fields textarea{width:100%;min-width:0}
.wide{grid-column:1/-1}
fieldset{border:1px solid var(--edge);border-radius:10px;margin:18px 0;padding:14px}
legend{font-weight:700;padding-inline:5px}
.photo{display:block;width:170px;height:110px;object-fit:cover;border-radius:8px;margin-bottom:12px}
.file-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-block:6px}
.form-actions{margin-top:18px}
.error{color:#982d28;margin-top:8px}
.ledger input[type=number]{width:110px}
.ledger input[type=date]{width:145px}
.ledger th,.ledger td{padding:8px}
@media(max-width:680px){.summary{grid-template-columns:repeat(2,1fr)}.heading{align-items:flex-start;flex-direction:column}.fields{grid-template-columns:1fr}.dialog-body,.dialog-head{padding:12px}.mast-content{gap:8px}.brand{gap:8px}}

:root{
  --ink:#182d29;
  --green:#14634f;
  --paper:#f2f5f1;
  --edge:#dce6df;
}
.masthead{
  background:radial-gradient(ellipse at 85% -30%,#40725c 0%,transparent 65%),linear-gradient(115deg,#102a25,#144a3d);
  border-bottom:3px solid #c9aa70;
}
.mast-content{padding-block:25px}
.mark{background:#ffffff0d;width:53px;height:53px;border-radius:15px}
.heading{margin-block:36px 24px}
.heading p{margin-top:5px}
.card,.panel{box-shadow:0 7px 22px #153f2d08}
.card{padding:19px 20px;border-top:1px solid var(--edge);border-inline-start:4px solid #62a88a}
.card:nth-child(2){border-inline-start-color:#8d9fbc}
.card:nth-child(3){border-inline-start-color:#379475}
.card:last-child{border-top-color:var(--edge);border-inline-start-color:#c7a15b}
.card strong{display:block;margin-top:5px;font-variant-numeric:tabular-nums}
.toolbar{background:#fbfcfb;border-radius:14px 14px 0 0}
tbody tr:nth-child(even){background:#f9fbf9}
tbody tr:hover{background:#eef6f0}
.primary{box-shadow:0 2px 4px #193e3420}
th{background:#edf3ee}
.file-row small{font-size:.85rem}
.file-row button,.toolbar label{white-space:nowrap}
@media(max-width:680px){
  .heading{margin-block:24px 18px}
  .card{padding:12px 14px}
  .mast-content{padding-block:16px}
  .mark{width:42px;height:42px}
}
.workspace{display:grid;grid-template-columns:230px minmax(0,1fr);min-height:calc(100vh - 105px);max-width:1540px;margin-inline:auto}
.sidebar{background:#f8fbf9;border-inline-end:1px solid #dbe8e2;padding:24px 14px}
.sidebar nav{position:sticky;top:18px;display:grid;gap:5px}
.nav-label{font-size:.8rem;font-weight:700;color:#526c63;margin:15px 10px 3px}
.nav-label:first-child{margin-top:0}
.sidebar button{background:transparent;text-align:start;border-color:transparent;font-size:.9rem}
.sidebar button:hover{background:#eff5f1}
.sidebar button[aria-pressed=true]{background:#dfeee6;border-color:#d6e8dd;color:#194e3d}
.main-content{min-width:0;padding-inline:clamp(16px,3vw,46px)}
.masthead .shell{max-width:1540px}
.view-section{border:1px solid var(--edge);border-radius:12px;padding:15px;margin-bottom:14px;background:#fbfdfb}
.view-section h3{margin-bottom:10px}
.view-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr));gap:12px;margin:0 0 8px}
.view-grid div{background:#f0f6f2;border-radius:8px;padding:9px 12px;min-width:0}
.view-grid dt{color:var(--muted);font-size:.85rem}
.view-grid dd{margin:3px 0 0;white-space:pre-wrap;overflow-wrap:anywhere;font-weight:600}
.fields label[hidden]{display:none}
.table-wrap button{white-space:nowrap}
@media(max-width:850px){
  .workspace{grid-template-columns:1fr}
  .sidebar{border-inline-end:0;border-bottom:1px solid var(--edge);padding:10px 14px}
  .sidebar nav{display:flex;flex-wrap:wrap;gap:4px}
  .sidebar nav .nav-label{display:none}
  .sidebar button{border-color:var(--edge)}
}
[hidden]{display:none!important}
:root{--paper:#f3f7f7;--edge:#dce8e8;--ink:#223b3d;--green:#276963}
.masthead{background:linear-gradient(115deg,#274d4f,#396964);border-bottom-color:#d9c8a4}
.sidebar{background:#eef5f5}
.sidebar button[aria-pressed=true]{background:#deebeb;border-color:#d4e5e4;color:#234f50}
.view-grid div,.view-section{background:#f4f8f8}
.access-card{max-width:650px;margin:35px auto;padding:clamp(16px,4vw,32px)}
.account-screen{padding-inline:16px}
.access-card h2,.access-card p,.access-card form,.access-card .fields{margin-bottom:14px}
.access-card select{width:100%;margin-block:7px 12px}
.location-filters{justify-content:flex-start;gap:9px 15px;background:#f6fafa}
.location-filters label{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:.88rem}
.location-filters select{max-width:190px}
.map-link{color:var(--green);font-weight:600}
.receipt-sheet{margin-bottom:14px}
.receipt-sheet h3{margin-bottom:10px}
.allocation-list{display:grid;gap:5px;max-height:230px;overflow:auto;background:#f4f8f8;border:1px solid var(--edge);border-radius:8px;margin-block:12px;padding:9px}
.allocation-list label{display:block;padding:4px;overflow-wrap:anywhere}
.allocation-list small{display:block;color:var(--muted);margin-inline-start:24px}
button:disabled{cursor:default;opacity:.6}

/* Talimat classic */
:root{--ink:#233d35;--muted:#596e63;--green:#2f7a5f;--paper:#f6f8f5;--edge:#e4ece6;font:14px/1.6 system-ui,sans-serif}
html[dir=rtl]{font:18px/1.9 Urdu,Georgia,serif}
.masthead{background:linear-gradient(110deg,#f3f8f4 0%,#e7f1eb 55%,#f6f1e2 100%);color:#1f4a3b;border-bottom:2px solid #e2d3a6;box-shadow:0 1px 10px #1f4a3b0f}
.masthead .shell{max-width:none;padding:14px 4%;gap:16px}
.brand h1{font-size:26px;line-height:1.8}
.brand p{font:600 clamp(13px,1.2vw,17px)/1.45 system-ui,sans-serif;color:#365c4e;margin:3px 0}
html[dir=rtl] .brand p{font:400 clamp(18px,1.7vw,24px)/1.65 Urdu,Georgia,serif}
.mark{display:block;width:67px;height:67px;object-fit:contain;background:#fff;border:0;border-radius:50%;box-shadow:0 0 0 3px #fff,0 0 0 4px #e2d3a6}
.masthead button.light{padding:6px 12px;background:#fff;color:#2b6150;border-color:#cfe0d6;font:14px/1.6 system-ui,sans-serif}
.masthead button.light:hover{background:#eef6f1}
.masthead #logout{font-weight:600;white-space:nowrap}
html[dir=rtl] .masthead #logout{font:400 19px/1.35 Urdu,Georgia,serif}
.workspace{max-width:none;grid-template-columns:265px minmax(0,1fr)}
.sidebar{background:#fbfcfa;color:#2b4a3e;border-color:#e3ebe5;padding:20px 12px}
.sidebar .nav-label{color:#60796d;border-block-end:1px solid #e6ede8;padding:0 4px 5px}
.sidebar button{font-size:1em;line-height:1.8;color:#36564a;border-radius:6px;padding:8px 9px}
.sidebar button:hover{background:#eef5f0;color:#1f4a3b}
.sidebar button[aria-pressed=true]{background:#e3f0e8;color:#1d5a44;border:0;border-inline-start:3px solid #d6bd7c;font-weight:700}
.sidebar button[aria-current=page]{background:#e3f0e8;color:#1d5a44;border-color:#d7e6dc;border-inline-start:3px solid #d6bd7c;font-weight:700}
.main-content{padding:24px 28px}
.heading{margin:0 0 20px}
.heading h2{font-size:28px;line-height:1.65;letter-spacing:normal;color:#174d3b}
.heading p{margin:0}
.summary{margin-bottom:18px}
.card,.panel{border-color:var(--edge);box-shadow:0 1px 6px #1f4a3b0a}
.card{border:0;border-radius:12px;padding:16px;color:#102d25;background:linear-gradient(135deg,#5aa184,#3f8a6d);min-width:0}
.card:nth-child(2){background:linear-gradient(135deg,#7fa8b8,#5f8fa3)}
.card:nth-child(3){background:linear-gradient(135deg,#d39a98,#bf7d7c)}
.card:last-child{background:linear-gradient(135deg,#d2b574,#bb9a55)}
.card span{color:#102d25;font-size:1em}
.card strong{font:700 clamp(16px,2vw,26px)/1.35 system-ui,sans-serif;overflow-wrap:anywhere}
.register-panel{overflow:hidden}
.toolbar,.location-filters{background:#fbfcfa;border-radius:0}
.year-control{display:inline-flex;align-items:center;gap:8px;white-space:nowrap;color:var(--muted)}
.year-control input{width:92px;direction:ltr}
.action-panel{padding:16px}
.action-panel h3{margin:0 0 10px;color:#174d3b}
.action-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr));gap:10px}
.action-grid button{display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:start;min-height:48px;background:#fbfcfa}
.action-grid button:hover{background:#eef5f0}
.action-grid button strong{font:700 19px system-ui,sans-serif;color:#1d5a44}
.register-number{color:#1d5a44;white-space:nowrap}
.register-address{min-width:145px;overflow-wrap:anywhere}
.sidebar .mobile-menu{display:none}
.document-actions output{color:var(--muted);font-weight:600}
.document-status:not(:empty){padding:9px 14px;color:#1d5a44;background:#eef5f0}
.document-file{display:flex;align-items:center;gap:9px;overflow-wrap:anywhere}
.document-file input{width:18px;height:18px;flex:none;accent-color:var(--green)}
.document-preview{display:block;max-width:100%;max-height:70vh;margin:auto;object-fit:contain}
#documents-page .toolbar select{max-width:min(310px,62vw)}
@media(max-width:850px){
  .sidebar .mobile-menu{display:inline-flex;align-items:center;gap:9px;min-height:44px;margin:0;padding:5px 14px;background:#e3f0e8;border-color:#d7e6dc}
  .sidebar nav{display:none}
  .sidebar.menu-open nav{display:grid;gap:5px;margin-block-start:8px}
  .sidebar.menu-open nav .nav-label{display:block}
}
input,select,textarea,button{border-color:#d9e3dd;border-radius:10px}
button{color:#1a5142}
button:hover{background:#e9f2ec}
button.primary{background:#2f7a5f;border-color:#2f7a5f;box-shadow:none}
button.primary:hover{background:#286a52;border-color:#286a52}
th{background:#eef5f0;color:#2e5546}
tbody tr:nth-child(even){background:#fbfcfa}
tbody tr:hover{background:#f0f7f2}
.badge{color:#1d5a44;background:#e3f0e8}
.badge.warn{color:#7a561c;background:#fbf1dc}
dialog{border:0;border-radius:16px;box-shadow:0 12px 40px #122d2455}
.dialog-head{position:sticky;top:0;z-index:1;background:#eef5f0;border-bottom-color:#e2d3a6}
.dialog-head h3{color:#174d3b;overflow-wrap:anywhere}
.tabs{padding-block-end:10px;border-block-end:1px solid var(--edge)}
.view-section{background:#fbfcfa}
.view-grid div{background:#eef5f0}
.receipt-brand{display:flex;align-items:center;gap:12px;margin-block-end:14px;padding-block-end:10px;border-block-end:1px solid #e2d3a6}
.receipt-brand h3{margin:0}
.receipt-brand img{object-fit:contain;border-radius:50%;flex:none}
.account-screen{padding:32px 16px}
.access-card{margin:0 auto;background:#fff;border-radius:18px}
body:has(#account-screen:not([hidden]) #login-form){background:#f6f1e2 var(--talimat-login-pattern) repeat}
body:has(#account-screen:not([hidden]) #login-form) .masthead{position:absolute;inset:0 0 auto;background:none;border:0;box-shadow:none;pointer-events:none}
body:has(#account-screen:not([hidden]) #login-form) .masthead .brand{display:none}
body:has(#account-screen:not([hidden]) #login-form) .mast-content{max-width:430px;margin:auto;padding:0 28px;justify-content:flex-end}
body:has(#account-screen:not([hidden]) #login-form) #language{margin-top:238px;pointer-events:auto;position:relative;z-index:1;font-size:12px;padding:2px 10px}
#login-form{max-width:430px;padding:28px 30px 26px;border-top:6px solid #b08d3c;box-shadow:0 18px 50px #5a46142e}
#login-form .access-mark{display:block;width:92px;height:92px;object-fit:contain;border-radius:50%;margin:0 auto 12px;padding:4px;box-shadow:0 0 0 3px #c5a868,0 6px 18px #0000001f}
#login-form .login-brand{min-height:105px;text-align:center;color:#174d3b}
#login-form .login-brand h2{font-size:24px;line-height:1.65;margin:0}
#login-form .login-brand p{margin:0;color:#6d5732;font-size:16px}
html[dir=rtl] #login-form .login-brand p{font:400 21px/1.65 Urdu,Georgia,serif}
#login-form>h2{text-align:center;font-size:20px;color:#174d3b;margin-top:18px}
#login-form .fields{grid-template-columns:1fr;gap:12px}
#login-form input{min-height:45px;background:#f7faf7}
#login-form button.primary{width:100%;background:#8a6a2a;border-color:#8a6a2a}
#login-form .error:empty{display:none}
@media(max-width:850px){
  .workspace{grid-template-columns:minmax(0,1fr)}
  .sidebar{padding:10px 12px}
  .sidebar nav{position:static}
  .main-content{padding:18px 12px}
  .masthead .shell{padding:10px 12px}
}
@media(max-width:600px){
  .brand{gap:9px;min-width:0}
  .brand h1{font-size:19px}
  .brand p{font-size:12px}
  html[dir=rtl] .brand p{font-size:17px}
  .mark{width:44px;height:44px}
  .masthead button.light{font-size:12px;padding:4px 8px}
  html[dir=rtl] .masthead #logout{font-size:17px}
  .heading h2{font-size:23px}
  .card{padding:11px}
  .toolbar input[type=search]{min-width:0;flex-basis:100%}
}

@media print{
  body:has(.receipt-sheet) > :not(dialog),body:has(.receipt-sheet) dialog button{display:none!important}
  body:has(.receipt-sheet) dialog{position:static;max-height:none;width:100%;border:0;margin:0}
  body:has(.receipt-sheet) dialog::backdrop{display:none}
}
