/* Kuzey SRC v0.2: primary Excel-inspired course ledger */
.ledger-title{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:18px}
.ledger-title h1{font-size:27px;margin-bottom:6px}.ledger-title p{color:#77869c;font-size:12px;margin:0}
.ledger-actions{display:flex;flex-wrap:wrap;align-items:center;gap:7px;justify-content:flex-end}
.ledger-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:14px}
.ledger-kpis>div{background:#fff;border:1px solid #e1e7f0;border-radius:11px;padding:14px 18px;box-shadow:0 2px 7px #10214008;min-width:0}
.ledger-kpis span{display:block;font-size:11px;color:#78859a;margin-bottom:6px}.ledger-kpis b{font-size:20px;letter-spacing:-.4px;overflow-wrap:anywhere}
.ledger-filter{display:flex;gap:9px;align-items:end;flex-wrap:wrap;margin-bottom:15px;background:#fff;border:1px solid #e1e6ed;padding:13px;border-radius:11px}
.ledger-filter label{font-size:11px;color:#6e7e91;font-weight:750;display:grid;gap:5px;min-width:155px}
.ledger-filter select,.ledger-filter input{height:36px;border-radius:7px;border:1px solid #d4dfea;padding:6px 11px;background:#fff;color:#1b2e47;font-size:12px;min-width:0}
.ledger-filter .ledger-search{flex:1;min-width:210px}.ledger-filter .btn{height:36px}
.ledger-card{background:#fff;border:1px solid #dce4ee;border-radius:13px;overflow:hidden;box-shadow:0 4px 20px #172c4a0b}
.ledger-strip{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 15px;background:#f6f8fc;border-bottom:1px solid #e4eaf2;color:#50607a}
.ledger-strip strong{font-size:11px;letter-spacing:.8px}.ledger-strip span{font-size:10px;color:#8895a7}
.ledger-scroll{max-height:calc(100vh - 335px);min-height:390px;overflow:auto;scrollbar-color:#bbcadc #f2f5fa}
.ledger-table{border-collapse:separate;border-spacing:0;min-width:1750px;width:100%;font-size:11px;color:#2e3d55}
.ledger-table th{position:sticky;top:0;z-index:7;text-align:left;color:#fff;background:#552b87;padding:12px 10px;font-size:10px;line-height:1.35;font-weight:800;border-right:1px solid #76529a;white-space:nowrap}
.ledger-table th:first-child{left:0;z-index:9;min-width:190px}
.ledger-table td{padding:10px 11px;border-right:1px solid #e5ebf3;border-bottom:1px solid #e9edf3;vertical-align:middle;background:#fff;max-width:250px;white-space:nowrap}
.ledger-table .student-record:hover td,.ledger-table .student-record:focus td{background:#f1f6ff;cursor:pointer}
.ledger-table .student-record:focus{outline:2px solid #3d79bc;outline-offset:-2px}
.ledger-table td.ledger-name{position:sticky;left:0;z-index:3;background:white;min-width:190px}
.ledger-table .student-record:hover td.ledger-name{background:#f1f6ff}
.ledger-table .ledger-name a{display:grid;gap:3px;color:#113663}.ledger-table .ledger-name b{font-size:11.5px}.ledger-table .ledger-name small{color:#8c96aa;font-size:10px}
.ledger-table .period-head td{background:#f0e7ff;position:static;font-size:12px;padding:11px 15px;border-bottom:1px solid #d8c5ef}
.ledger-table .period-head td span{font-weight:850;color:#4a267c}.ledger-table .period-head small{margin-left:13px;color:#78649a}
.ledger-table .group-head td{background:#fbed97;font-size:11px;padding:9px 15px;border-bottom:1px solid #e4d779;color:#443c10}
.ledger-table .group-head td div,.ledger-table .waiting-head td div{display:flex;justify-content:space-between;align-items:center;gap:12px}
.ledger-table .group-head span,.ledger-table .waiting-head span{font-size:10px;font-weight:650;opacity:.8}
.ledger-table .waiting-head td{background:#fbea42;font-size:12px;text-align:left;color:#332d0c;padding:10px 15px}
.ledger-table .empty-group{color:#919daf;font-style:italic;text-align:left;padding:11px 16px}.ledger-table .empty-group a{color:#274e8a;font-weight:700}
.ledger-table .no-rows{text-align:center;white-space:normal;padding:65px 15px}.ledger-table .no-rows p{color:#8895a7;margin:8px auto;max-width:430px}
.ledger-table .mono{font-variant-numeric:tabular-nums}.ledger-table .money{font-variant-numeric:tabular-nums;text-align:right}
.ledger-table .balance-owed{color:#ac3d36;font-weight:750}.ledger-table .balance-zero{color:#14845c;font-weight:750}
.ledger-table .small-col{max-width:150px;overflow:hidden;text-overflow:ellipsis}
.ledger-table .subtext{display:block;color:#8b97a8;margin-top:3px;font-size:10px}.status-mini{display:inline-block;padding:3px 7px;background:#edf0f8;border-radius:5px;font-size:10px;font-weight:650}
.status-mini.ok{color:#126448;background:#e1f7e8}.status-mini.warn{color:#a56b12;background:#fdf3d8}
.drawer-backdrop{position:fixed;inset:0;z-index:50;display:flex;justify-content:flex-end;align-items:stretch}
.drawer-overlay{position:absolute;inset:0;background:rgba(10,20,37,.54);cursor:default}
.drawer{position:relative;z-index:2;width:min(100%,600px);height:100%;display:flex;flex-direction:column;background:#f8faff;box-shadow:-15px 0 40px #080f2270;overflow:hidden}
.drawer-wide{width:min(100%,880px)}.drawer-header{background:#fff;padding:22px 27px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #e2e7ee;flex:none;gap:15px}
.drawer-header h2{font-size:22px;margin:0}.drawer-header .eyebrow{margin-bottom:5px}.drawer-close{font-size:28px;font-weight:300;background:#f3f6fa;width:35px;height:35px;text-align:center;line-height:31px;border-radius:9px;color:#57667d}
.drawer-close:hover{background:#e1e8f3}.drawer-body{padding:22px 27px 38px;overflow:auto;flex:1}
.drawer-body .form-grid{gap:13px 17px}.drawer-body .form-section-title{margin:17px 0 0;font-size:14px;color:#173c71}
.drawer-body .field label{font-size:11px}.drawer-body .field input,.drawer-body .field select,.drawer-body .field textarea{padding:10px 11px;font-size:12px}
.drawer-section{border:1px solid #dce5ef;border-radius:12px;background:#fff;margin:14px 0;overflow:hidden}
.drawer-section summary{padding:15px 16px;font-size:13px;font-weight:800;cursor:pointer;background:#f9fbff;list-style:none;position:relative}
.drawer-section summary::after{content:'⌄';position:absolute;right:16px;font-size:20px;top:8px}
.drawer-section[open] summary{border-bottom:1px solid #e5ebf1}.drawer-section[open] summary::after{content:'⌃'}
.drawer-section-body{padding:17px}.drawer-section-body>p{font-size:12px;color:#5d6c80}
.detail-actions{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:15px}.detail-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
.detail-summary>div{background:#eaf1fc;padding:13px 10px;border-radius:9px;min-width:0}.detail-summary small{display:block;font-size:10px;color:#627791;margin-bottom:8px}.detail-summary strong{font-size:15px;word-break:break-word}
.mini-table{width:100%;border-collapse:collapse;font-size:11px;margin-bottom:15px;table-layout:auto}.mini-table td,.mini-table th{border-bottom:1px solid #edf0f5;text-align:left;padding:9px 7px;vertical-align:top}.mini-table th{background:#f4f7fa;color:#65748c}
.compact-form{background:#f7f9fc;border:1px solid #e7edf5;padding:14px;border-radius:10px;margin-top:14px}.compact-form .check-tile{font-size:12px;font-weight:600}
.doc-line{display:grid;grid-template-columns:100px 130px 1fr auto;gap:8px;align-items:center;margin-bottom:8px;font-size:11px}.doc-line select,.doc-line input{height:34px;min-width:0;border:1px solid #d4e0ee;border-radius:7px;padding:6px;font-size:11px}
.student-empty{max-width:650px;margin:35px auto;text-align:center;padding:34px}.student-empty p{color:#64748b;margin:16px 0}
@media(max-width:1200px){.ledger-kpis{grid-template-columns:repeat(2,1fr)}.ledger-title{align-items:start;flex-direction:column}.ledger-actions{justify-content:flex-start}.ledger-scroll{max-height:65vh}}
@media(max-width:650px){.ledger-kpis{grid-template-columns:repeat(2,1fr)}.ledger-kpis b{font-size:16px}.ledger-filter label{flex:1}.ledger-filter .ledger-search{flex:1 0 100%}.drawer-body{padding:15px}.drawer-header{padding:16px}.drawer-body .form-grid{grid-template-columns:1fr}.drawer-body .field,.drawer-body .form-section-title{grid-column:1/-1}.detail-summary{grid-template-columns:repeat(2,1fr)}.doc-line{grid-template-columns:1fr 1fr}.doc-line input{grid-column:1/-1}.doc-line button{grid-column:1/-1}.ledger-strip{flex-direction:column;align-items:flex-start}.ledger-scroll{min-height:380px;max-height:65vh}}
