/* =====================================================================
   SSBAPP — مقياس الخطوط والجداول (يُحمَّل أخيرًا)
   خط أكبر وأعرض في كل التطبيق، توسيط محتوى الخانات، حدود جداول غامقة،
   وألوان حالة أوضح. شاشة فقط — قواعد التقارير المطبوعة في الأسفل.
   ===================================================================== */
:root{
  --grid-line:#5f6f6a;      /* خطوط الخانات */
  --grid-line-strong:#1f2f2b;/* الإطار الخارجي */
  --paid-bg:#cbe9d6;  --paid-ink:#14532d;
  --unpaid-bg:#f8d8ce;--unpaid-ink:#7f1d1d;
  --other-bg:#d6e7f3; --other-ink:#1d4b6b;
  --sum-bg:#f3e1b6;   --sum-ink:#5c3d0b;
  --tone-blue:#dceaf5;--tone-green:#d8eee2;
}
@media screen{

/* ---------- الأساس ---------- */
#loginView,#appView,.modal,.toast,.biometric-lock-overlay{font-size:15px;font-weight:600;}
#appView button,.modal button,#loginView button{font-size:15px;font-weight:800;}
#appView input:not([type=checkbox]):not([type=radio]),#appView select,.modal input:not([type=checkbox]):not([type=radio]),.modal select,.modal textarea,#loginView input:not([type=checkbox]){font-size:15px;font-weight:700;}
.muted{font-weight:600;}

/* ---------- القائمة الجانبية ---------- */
.side .nav-item,.side .side-btn{font-size:15.5px!important;font-weight:700!important;min-height:46px;}
.side .nav-item.active{font-weight:800!important;}
.side-brand b{font-size:17px;}
.side-brand small{font-size:12.5px;}
.side-label{font-size:12.5px;font-weight:800;}
.side-account-row{font-size:13px;}
.side-account-row b{font-size:13px;}

/* ---------- الترويسة والشريط العلوي ---------- */
.al-name{font-size:28px;}
.al-sub{font-size:14.5px;font-weight:600;}
.al-chip{font-size:13.5px;}
.main-head .head-title h1{font-size:25px;font-weight:800;}
.year-box label{font-size:14.5px;font-weight:800;}
.year-box select{font-size:17px!important;height:40px;min-width:110px;}
.year-box button{height:40px;font-size:14px!important;}
#saveBtn{font-size:16px!important;height:50px;}
.view-tabs .nav-item{font-size:15.5px!important;padding:10px 20px;}
.main .app-status-footer{font-size:13.5px;}
#dirtyBanner{font-size:15px;}

/* ---------- البطاقات ولوحة المتابعة ---------- */
.main .cards .card{font-size:15px;font-weight:800;color:var(--ink-2);min-height:108px;}
.main .cards .c-bal{color:var(--pine-200);}
.main .cards .card b{font-size:28px;font-weight:800;}
.smart-dashboard-kicker{font-size:13px;}
.smart-dashboard-head h2{font-size:22px;}
.smart-dashboard-year{font-size:16px;}
.smart-metric span{font-size:15px;font-weight:800;color:var(--ink-2);}
.smart-metric b{font-size:34px;}
.smart-metric small{font-size:13px;font-weight:600;}
.smart-alert{font-size:15px;font-weight:700;}
.panel-head h3,.panel-title h3{font-size:20px;}
.panel-head p{font-size:14.5px;font-weight:600;}
.lg{font-size:13.5px;font-weight:800;padding:5px 12px;}
.quick-link b{font-size:17px;}
.quick-link span{font-size:14px;font-weight:600;}

/* ---------- جداول التطبيق: خط أكبر، توسيط، حدود غامقة ---------- */
.table-wrap{border:2px solid var(--grid-line-strong)!important;border-radius:12px;}
.table-wrap table{border-collapse:collapse;}
.table-wrap th{
  font-size:14.5px!important;font-weight:800!important;
  padding:11px 6px!important;
  background:var(--pine-800)!important;color:#fff!important;
  border:1px solid #0b2b28!important;border-bottom:3px solid var(--brass)!important;
  text-align:center!important;vertical-align:middle;
}
.table-wrap td{
  font-size:15px!important;font-weight:800!important;
  padding:5px!important;
  border:1px solid var(--grid-line)!important;
  text-align:center!important;vertical-align:middle;
  color:var(--ink);
}
.table-wrap td input{
  text-align:center!important;
  font-size:15px!important;font-weight:800!important;
  padding:8px 4px!important;
  background:transparent!important;
  border:1px solid transparent!important;
  color:inherit!important;
}
.table-wrap td input:hover{background:rgba(255,255,255,.45)!important;border-color:rgba(31,47,43,.25)!important;}
.table-wrap td input:focus{background:#fff!important;border-color:var(--pine-600)!important;box-shadow:0 0 0 3px rgba(28,106,96,.2)!important;}
.table-wrap td button.danger{font-size:18px!important;padding:5px 12px!important;}

/* مدفوعات السكان */
#paymentsWrap table{min-width:1500px;}
#paymentsWrap col.name-col{width:180px;}
#paymentsWrap col.month-col{width:78px;}
#paymentsWrap col.total-col{width:100px;}
#paymentsWrap col.note-col{width:170px;}
#paymentsWrap col.action-col{width:64px;}
#paymentsWrap .name-cell{background:#eef1ec!important;}
#paymentsWrap .name-cell input{text-align:center!important;color:var(--pine-900)!important;}
#paymentsWrap .pay-cell.month-paid{background:var(--paid-bg)!important;color:var(--paid-ink);}
#paymentsWrap .pay-cell.month-unpaid{background:var(--unpaid-bg)!important;color:var(--unpaid-ink);}
#paymentsWrap .pay-cell.other-payment-cell{background:var(--other-bg)!important;color:var(--other-ink);}
#paymentsWrap .sum-cell{background:var(--sum-bg)!important;color:var(--sum-ink)!important;font-size:16px!important;}
#paymentsWrap .note-cell{background:#fff!important;}
#paymentsWrap .note-cell input{font-weight:700!important;}
#paymentsWrap .month-total-row td{
  background:#cfe4da!important;color:var(--pine-950)!important;font-size:15.5px!important;
  border-top:3px solid var(--pine-800)!important;
}
#paymentsWrap .month-total-row td:first-child{background:var(--pine-800)!important;color:#fff!important;}
.resident-account-btn{font-size:12px!important;padding:4px 7px!important;}

/* مصروفات العمارة */
#expensesWrap .expense-table{min-width:760px;}
#expensesWrap .expense-table tbody tr.expense-tone-blue td{background:var(--tone-blue)!important;}
#expensesWrap .expense-table tbody tr.expense-tone-green td{background:var(--tone-green)!important;}
#expensesWrap .expense-table tbody tr.expense-tone-neutral td{background:#f3f4f2!important;}
#expensesWrap .expense-table tbody tr td input{background:transparent!important;}
#expensesWrap .expense-table tbody tr td input[type=date]{direction:ltr;}
.view #paymentsWrap,.view #expensesWrap{max-height:none!important;}

/* نموذج إضافة مصروف */
.expense-form input{font-size:15px!important;height:46px;}
.expense-form button{height:46px;}

/* ---------- جداول النوافذ (السجل، المستخدمون، حساب الساكن، المراقبة) ---------- */
.receipts-ledger-table-wrap,.monitor-table-wrap,#usersModal .table-wrap,.resident-history-wrap{border:2px solid var(--grid-line-strong)!important;}
.receipts-ledger-table th,#usersModal .users-table thead th,.resident-history-table th,.monitor-users-table th{
  background:var(--pine-800)!important;color:#fff!important;
  font-size:14px!important;font-weight:800!important;text-align:center!important;
  border:1px solid #0b2b28!important;border-bottom:3px solid var(--brass)!important;padding:11px 7px!important;
}
.receipts-ledger-table td,#usersModal .users-table td,.resident-history-table td,.monitor-users-table td{
  font-size:14.5px!important;font-weight:700!important;text-align:center!important;vertical-align:middle;
  border:1px solid var(--grid-line)!important;padding:9px 7px!important;
}
.monitor-users-table td:first-child{text-align:center!important;}
.receipt-status-active,.receipt-status-voided,.email-verification-badge,.user-status-badge,.user-plan-badge,.monitor-status{font-size:12.5px!important;font-weight:800!important;}

/* ---------- النوافذ ---------- */
.modal-box>h2:first-child{font-size:21px!important;font-weight:800;}
.field label{font-size:14px!important;font-weight:800!important;}
.backup-center-card h3{font-size:17px;}
.backup-center-card p{font-size:13.5px;font-weight:600;}
.backup-last-info,.backup-warning-box{font-size:14px;}
.backup-history-title{font-size:15.5px;}
.backup-history-meta{font-size:13.5px;}
.subscription-plan h3{font-size:20px;}
.subscription-plan p{font-size:14.5px;}
.subscription-steps{font-size:15px;}
.email-security-card .security-title{font-size:17px;}
.email-security-card .security-note{font-size:13.5px;}
.resident-account-head h2{font-size:26px!important;}
.resident-account-cards span{font-size:13.5px!important;}
.resident-account-cards b{font-size:23px!important;}
.resident-month span{font-size:12.5px!important;}
.resident-month b{font-size:16px!important;}
.resident-month small{font-size:11px!important;}
.resident-month.paid{background:var(--paid-bg)!important;border-color:#8fcfa6!important;}
.resident-month.unpaid{background:var(--unpaid-bg)!important;border-color:#eba796!important;}
.resident-account-section h3{font-size:17px;}
.receipts-ledger-tools input,.receipts-ledger-tools select{height:44px;}
.toast{font-size:15px;}

/* ---------- شاشة التقارير: نفس تصميم التطبيق ---------- */
#reportsModal .modal-box{width:min(1320px,97vw)!important;}
#reportsModal .actions{gap:10px;}
#reportsModal .actions select{height:44px;font-size:15px!important;font-weight:800!important;min-width:150px;}
#reportsModal .actions button{height:44px;padding:0 18px;}
#reportRoot{padding:18px!important;background:#fff;}
#reportRoot .report-year{padding:0!important;}
#reportRoot .report-title{font-size:26px!important;color:var(--pine-900);}
#reportRoot .report-sub{font-size:16px!important;font-weight:700;}
#reportRoot .resident-report-name{font-size:22px!important;}
#reportRoot .report-cards{gap:10px!important;}
#reportRoot .report-card{font-size:14.5px!important;font-weight:800!important;padding:12px 8px!important;border-width:1.5px!important;border-radius:12px!important;}
#reportRoot .report-card b{display:inline-block;margin-top:4px;font-size:21px;}
#reportRoot h3{font-size:19px!important;color:var(--pine-900);margin:18px 0 8px!important;}
#reportRoot table{min-width:0!important;}
#reportRoot .report-year th,#reportRoot .report-year td{font-size:13.5px!important;font-weight:800!important;padding:7px 3px!important;line-height:1.35;}
} /* end @media screen */

/* =====================================================================
   التقارير (شاشة + طباعة + PDF المأخوذ من HTML): حدود غامقة ورأس أخضر
   ===================================================================== */
.report-year table{border-collapse:collapse!important;border:2px solid #1f2f2b!important;}
.report-year th,.report-year td{
  border:1px solid #475569!important;
  text-align:center!important;vertical-align:middle!important;
  font-weight:800!important;color:#0f172a;
  -webkit-print-color-adjust:exact;print-color-adjust:exact;
}
.report-year thead th,
.resident-report-year-summary thead th,
.resident-report-summary-table thead th{
  background:#0f3a36!important;color:#ffffff!important;
  border-color:#0b2b28!important;border-bottom:3px solid #b8862f!important;
}
.report-year tbody tr:nth-child(even) td{background:#f6f8f7;}
.report-payments-table td.rp-paid{background:#d5ecdd!important;color:#14532d!important;}
.report-payments-table td.rp-unpaid{background:#f9e0d9!important;color:#7f1d1d!important;}
.report-payments-table td.rp-other{background:#e1edf5!important;color:#1d4b6b!important;}
.report-payments-table td.rp-total{background:#f7ecd5!important;color:#5c3d0b!important;}
.report-payments-total-row th,.report-expenses-total-row th,.resident-report-year-summary tfoot th{
  background:#f3e1b6!important;color:#3d2a07!important;border-top:3px solid #0f3a36!important;font-weight:900!important;
}
.report-expenses-table tbody tr.report-expense-tone-blue td{background:#e4eff7!important;}
.report-expenses-table tbody tr.report-expense-tone-green td{background:#e3f1ea!important;}
.report-expense-month-label{border-color:#0f3a36!important;color:#0f3a36!important;font-size:9px;}
.resident-report-summary-table tbody th{background:#0f3a36!important;color:#fff!important;}
.resident-report-year>h3{background:#0f3a36!important;color:#fff!important;border-radius:6px;}
.report-card{border-width:1.5px!important;font-weight:800!important;}
.report-card-prev{border-color:#a78bfa!important;}
.report-card-pay{border-color:#4ade80!important;}
.report-card-exp{border-color:#f87171!important;}
.report-card-income{border-color:#e7b54a!important;}
.report-card-balance{border-color:#60a5fa!important;}

/* عرض أعمدة جداول الأشهر في التقارير: أعمدة الأشهر أعرض حتى لا تنكسر الأرقام */
.report-payments-table .report-name-col{width:10%!important;}
.report-payments-table .report-month-col{width:5.57%!important;}
.report-payments-table .report-other-col{width:7%!important;}
.report-payments-table .report-total-col{width:7.6%!important;}
.report-payments-table .report-notes-col{width:8.56%!important;}
.report-payments-table td,.report-payments-table th{white-space:nowrap;}
/* جدول ملخص السنوات في حساب الساكن: يظهر كاملًا دون تمرير أفقي */
.resident-history-wrap table.resident-history-table{min-width:0!important;table-layout:auto;}
