/* style.css - تصميم واجهات النظام (متناسق مع صفحة التسويق)
   Light UI (لتركيز أفضل) + Accent Gradient
*/

:root{
  /* Light tokens */
  --bg:#f4f6fb;
  --panel:#ffffff;
  --glass:rgba(255,255,255,.78);
  --card:#ffffff;
  --card2:rgba(15,23,42,.02);
  --stroke:rgba(15,23,42,.10);
  --text:#0f172a;
  --muted:rgba(15,23,42,.65);
  /* Compatibility tokens used by some pages */
  --border: var(--stroke);
  --text-light: var(--muted);
  /* Accent */
  --primary:#1fb9aa;
  --primary2:#3b82f6;
  --danger:#ff6b6b;
  --warning:#ed8936;
  --success:#48bb78;
  --radius:18px;
  --radius-sm:14px;
  --shadow:0 30px 80px rgba(15,23,42,.10);
  --shadow2:0 16px 50px rgba(15,23,42,.08);
  --transition: all .18s ease;

  /* Aliases for older pages (backward compatibility) */
  --primary-color: var(--primary2);
  --success-color: var(--success);
  --danger-color: var(--danger);
  --warning-color: var(--warning);
}

*{margin:0;padding:0;box-sizing:border-box}
html,body{height:100%}
body{
  font-family:'Cairo',system-ui,-apple-system,Segoe UI,Roboto,Arial;
  background:
    radial-gradient(1200px 700px at 15% 10%, rgba(31,185,170,.18), transparent 55%),
    radial-gradient(900px 600px at 85% 20%, rgba(59,130,246,.16), transparent 55%),
    radial-gradient(900px 600px at 50% 110%, rgba(99,102,241,.10), transparent 60%),
    linear-gradient(180deg, #f7f9ff 0%, var(--bg) 100%);
  color:var(--text);
  line-height:1.7;
  direction:rtl;
  text-align:right;
  overflow-x:hidden;
}

a{color:inherit;text-decoration:none}

/* ===== Sidebar ===== */
.sidebar{
  overflow:hidden;
  position:fixed;
  right:0;
  top:0;
  width:280px;
  height:100vh;
  padding:16px 14px;
  z-index:1000;
  background: var(--glass);
  border-left:1px solid var(--stroke);
  backdrop-filter: blur(16px);
}

.sidebar-header{
  padding:10px 10px 16px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.85);
  border-radius:22px;
  box-shadow: var(--shadow2);
}

.sidebar-header h3{
  font-size:15px;
  font-weight:900;
  display:flex;
  align-items:center;
  gap:10px;
}

.sidebar-header h3 i{
  width:38px;height:38px;
  border-radius:16px;
  display:grid;place-items:center;
  background: linear-gradient(135deg, rgba(31,185,170,.95), rgba(59,130,246,.92));
  color:#07101f;
  border:1px solid rgba(15,23,42,.08);
}

.sidebar-header p{font-size:12px;color:var(--muted);margin-top:6px}

/* Brand header (office name + logo) */
.sidebar-header .brand{display:flex;align-items:center;gap:12px}
.sidebar-header .brand-text h3{margin:0;font-size:15px;font-weight:900;line-height:1.2;display:block}
.sidebar-header .brand-text p{margin:4px 0 0;font-size:12px;color:var(--muted)}
.sidebar-header .brand-logo{width:44px;height:44px;object-fit:contain;border:1px solid var(--stroke);border-radius:16px;padding:6px;background:#fff}
.sidebar-header .brand-logo-placeholder{width:44px;height:44px;border:1px solid var(--stroke);border-radius:16px;display:grid;place-items:center;background:linear-gradient(135deg, rgba(31,185,170,.15), rgba(59,130,246,.12));color:rgba(15,23,42,.75);font-size:18px}

.sidebar-menu{list-style:none;margin-top:14px;display:grid;gap:6px
  overflow-y:auto;
  max-height:calc(100vh - 190px);
  padding-bottom:90px;
}

.sidebar-menu a{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 12px;
  border-radius:16px;
  border:1px solid transparent;
  color:rgba(15,23,42,.88);
  transition: var(--transition);
}

.sidebar-menu a i{width:26px;text-align:center;color:rgba(15,23,42,.55)}

.sidebar-menu a:hover{
  background: rgba(15,23,42,.03);
  border-color: rgba(15,23,42,.10);
}

.sidebar-menu a.active{
  background: linear-gradient(135deg, rgba(31,185,170,.14), rgba(59,130,246,.10));
  border-color: rgba(15,23,42,.12);
}

/* ===== Sidebar submenu (admin) ===== */
.has-submenu .submenu-arrow{margin-right:auto; font-size:12px; opacity:.65; transition:transform .2s ease}
.has-submenu .submenu{list-style:none; margin:6px 0 0; padding:0 10px 0 0; display:none}
.has-submenu.open .submenu{display:grid; gap:6px}
.has-submenu.open .submenu-arrow{transform:rotate(180deg)}
.submenu a{
  padding:10px 12px;
  border-radius:14px;
  background: rgba(15,23,42,.02);
  border:1px solid rgba(15,23,42,.08);
  font-size:13px;
}
.submenu a i{width:22px}

.sidebar-footer{position:absolute; right:14px; left:14px; bottom:14px}

.user-info-mini{
  display:flex; align-items:center; gap:10px;
  padding:12px 12px;
  border-radius:18px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.85);
}
.user-avatar-mini{
  width:40px;height:40px;border-radius:16px;
  display:grid;place-items:center;
  background: rgba(15,23,42,.03);
  border:1px solid rgba(15,23,42,.10);
  font-weight:900;
}
.user-info-mini h5{margin:0;font-size:13px}
.user-info-mini small{color:var(--muted);font-size:11px}

/* ===== Main content ===== */
.main-content{
  margin-right:280px;
  padding:18px;
}

.header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  padding:16px 18px;
  border-radius:24px;
  border:1px solid rgba(255,255,255,.10);
  background: var(--glass);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow2);
  margin-bottom:16px;
}

.header-title h1{font-size:20px;margin:0 0 6px;font-weight:900;letter-spacing:.2px}
.header-title p{margin:0;color:var(--muted);font-size:12.5px}

.user-info{display:flex;align-items:center;gap:10px}
.user-avatar{
  width:44px;height:44px;border-radius:18px;
  display:grid;place-items:center;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.12);
  font-weight:900;
}
.user-details h4{margin:0;font-size:13px}
.user-details small{color:var(--muted);font-size:11px}

/* ===== Stats ===== */
.stats-grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap:12px;
  margin: 14px 0 18px;
}

.stat-card{
  border-radius: var(--radius);
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.88);
  padding:14px;
  box-shadow: var(--shadow2);
  display:flex;
  align-items:center;
  gap:12px;
}

.stat-icon{
  width:44px;height:44px;border-radius:18px;
  display:grid;place-items:center;
  border:1px solid rgba(15,23,42,.10);
  background: rgba(15,23,42,.03);
}
.stat-icon.primary{background: rgba(79,209,197,.12)}
.stat-icon.success{background: rgba(72,187,120,.12)}
.stat-icon.warning{background: rgba(237,137,54,.12)}
.stat-icon.danger{background: rgba(255,107,107,.12)}

.stat-info h3{margin:0;font-size:22px;font-weight:900}
.stat-info p{margin:2px 0 0;color:rgba(15,23,42,.88);font-size:12.5px;font-weight:800}
.stat-info small{display:block;margin-top:6px;color:var(--muted);font-size:11px}

/* ===== Grid / Cards ===== */
.grid{display:grid;gap:12px}
.grid-2{grid-template-columns: repeat(2, 1fr)}
.grid-3{grid-template-columns: repeat(3, 1fr)}
/* بعض الصفحات تستخدم grid-4 لإحصائيات/بطاقات أعلى الصفحة */
.grid-4{grid-template-columns: repeat(4, 1fr)}

.card{
  border-radius: var(--radius);
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.88);
  box-shadow: var(--shadow2);
  overflow:hidden;
}

.card-header{
  padding:14px 14px 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border-bottom:1px solid rgba(15,23,42,.08);
  background: rgba(15,23,42,.02);
}

.card-title{font-size:14px;font-weight:900;display:flex;align-items:center;gap:10px}
.card-title i{color: rgba(79,209,197,.95)}

.card-body{padding:14px}

/* ===== Buttons ===== */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.92);
  color:rgba(15,23,42,.92);
  font-weight:900;
  font-size:12px;
  cursor:pointer;
  transition: var(--transition);
}
.btn:hover{transform: translateY(-1px); background: rgba(15,23,42,.03)}

.btn-primary{
  background: linear-gradient(135deg, rgba(79,209,197,.95), rgba(119,183,255,.92));
  color:#07101f;
  border-color: rgba(15,23,42,.10);
}

.btn-danger{background: rgba(255,107,107,.12); border-color: rgba(255,107,107,.35); color: rgba(120,24,24,.95)}
.btn-warning{background: rgba(237,137,54,.12); border-color: rgba(237,137,54,.35); color: rgba(124,45,18,.95)}
.btn-success{background: rgba(72,187,120,.12); border-color: rgba(72,187,120,.35); color: rgba(20,83,45,.95)}
.btn-info{background: rgba(59,130,246,.12); border-color: rgba(59,130,246,.30); color: rgba(30,64,175,.95)}

.btn-outline{background: transparent}

.btn-sm{padding:8px 10px;border-radius:12px;font-size:11px}

/* ===== Tables ===== */
.table-responsive{width:100%;overflow:auto}
.table{width:100%;border-collapse:separate;border-spacing:0}
.table th,.table td{padding:12px 12px;text-align:right;white-space:nowrap}
.table thead th{
  font-size:12px;
  color:rgba(15,23,42,.80);
  background: rgba(15,23,42,.02);
  border-bottom:1px solid rgba(15,23,42,.10);
  position:sticky;
  top:0;
}
.table tbody td{border-bottom:1px solid rgba(15,23,42,.08);color:rgba(15,23,42,.86);font-size:12.5px}
.table tbody tr:hover{background: rgba(15,23,42,.02)}

/* ===== Forms ===== */
.form-group{margin-bottom:12px}
label{display:block;font-size:12px;color:rgba(15,23,42,.78);margin:0 0 6px}
input[type="text"],input[type="email"],input[type="password"],input[type="date"],input[type="number"],select,textarea{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.92);
  color:var(--text);
  outline:none;
  transition: var(--transition);
}
textarea{min-height:110px;resize:vertical}
input:focus,select:focus,textarea:focus{border-color: rgba(79,209,197,.65); box-shadow:0 0 0 4px rgba(79,209,197,.12)}

/* ===== Alerts / Badges ===== */
.alert{
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.92);
  color:rgba(15,23,42,.88);
}
.alert-success{border-color: rgba(72,187,120,.35); background: rgba(72,187,120,.10)}
.alert-danger{border-color: rgba(255,107,107,.45); background: rgba(255,107,107,.10)}
.alert-warning{border-color: rgba(237,137,54,.45); background: rgba(237,137,54,.10)}

.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.92);
  font-size:11px;
  font-weight:900;
  color:rgba(15,23,42,.88);
}
.badge.success{border-color: rgba(72,187,120,.35); background: rgba(72,187,120,.10)}
.badge.danger{border-color: rgba(255,107,107,.45); background: rgba(255,107,107,.10)}
.badge.warning{border-color: rgba(237,137,54,.45); background: rgba(237,137,54,.10)}

/* ===== Modal ===== */
.modal{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.55);
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
  z-index:2000;
}
.modal.show{display:flex}
.modal-content{
  width:min(860px, 100%);
  border-radius:24px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.modal-header{
  padding:14px 16px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  border-bottom:1px solid var(--stroke);
}
.modal-header h3{font-size:14px;font-weight:900}
.modal-body{padding:14px 16px}
.modal-close{cursor:pointer;opacity:.8}
.modal-close:hover{opacity:1}

/* ===== Utilities ===== */
.hr{height:1px;background: rgba(15,23,42,.08);margin:14px 0}
.muted{color:var(--muted)}

/* ===== Responsive ===== */
@media (max-width: 1050px){
  .stats-grid{grid-template-columns: repeat(2, 1fr)}
  .grid-4{grid-template-columns: repeat(2, 1fr)}
  .grid-2{grid-template-columns:1fr}
}

@media (max-width: 860px){
  .sidebar{
  overflow:hidden;width:92vw; max-width:320px; transform: translateX(110%); transition: var(--transition)}
  .sidebar.open{transform: translateX(0)}
  .main-content{margin-right:0}
}

@media (max-width: 520px){
  .header{flex-direction:column; align-items:flex-start}
  .stat-card{flex-direction:column; align-items:flex-start}
  .grid-4{grid-template-columns:1fr}
}

/* =========================
   Tabs (Global)
   ========================= */
.tab-buttons{display:flex;flex-wrap:wrap;gap:10px;margin:14px 0 18px;}
.tab-button{cursor:pointer;border:1px solid rgba(15,23,42,.12);background:rgba(255,255,255,.92);color:rgba(15,23,42,.88);padding:10px 14px;border-radius:14px;font-weight:900;transition:all .15s ease;}
.tab-button:hover{transform:translateY(-1px);box-shadow:0 10px 26px rgba(15,23,42,.10);}
.tab-button.active{background:linear-gradient(135deg, rgba(79,124,255,.14), rgba(168,85,247,.10));border-color:rgba(79,124,255,.28);}
.tab-content{display:none;}
.tab-content.active{display:block;}


/* ===== Case Details: CSS-only Tabs (Radio) ===== */
.tab-container.tab-radio .tab-radio-input{position:absolute;opacity:0;pointer-events:none}
.tab-container.tab-radio .tab-contents .tab-content{display:none}
#tab_desc:checked ~ .tab-contents #description{display:block}
#tab_timeline:checked ~ .tab-contents #timeline{display:block}
#tab_docs:checked ~ .tab-contents #documents{display:block}
#tab_hearings:checked ~ .tab-contents #hearings{display:block}
#tab_invoices:checked ~ .tab-contents #invoices{display:block}
#tab_tasks:checked ~ .tab-contents #tasks{display:block}

#tab_desc:checked ~ .tab-buttons label[for="tab_desc"],
#tab_timeline:checked ~ .tab-buttons label[for="tab_timeline"],
#tab_docs:checked ~ .tab-buttons label[for="tab_docs"],
#tab_hearings:checked ~ .tab-buttons label[for="tab_hearings"],
#tab_invoices:checked ~ .tab-buttons label[for="tab_invoices"],
#tab_tasks:checked ~ .tab-buttons label[for="tab_tasks"]{
  background: rgba(79,124,255,.12);
  border-color: rgba(79,124,255,.35);
  color: rgba(15,23,42,.95);
}

/* ===== Hearings Calendar (Light) ===== */
.calendar-toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between}
.calendar-toolbar .left, .calendar-toolbar .right{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.calendar-toolbar .btn-group{display:flex;gap:8px}
.calendar-title{font-weight:700}
.calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:10px}
.calendar-dow{font-size:.85rem;color:var(--text-light);text-align:center;padding:8px 0;font-weight:700}
.calendar-cell{background:#fff;border:1px solid var(--border);border-radius:14px;min-height:110px;padding:10px;position:relative;overflow:hidden}
.calendar-cell.muted{opacity:.55;background:rgba(255,255,255,.6)}
.calendar-cell .day-num{font-weight:800;color:var(--text);font-size:0.95rem}
.calendar-cell.today{border-color:rgba(52,152,219,.5);box-shadow:0 0 0 3px rgba(52,152,219,.12) inset}
.cal-events{margin-top:8px;display:flex;flex-direction:column;gap:6px}
.cal-event{cursor:pointer;border-radius:10px;padding:6px 8px;border:1px solid rgba(52,152,219,.18);background:rgba(52,152,219,.06)}
.cal-event .t{font-weight:800;font-size:.86rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cal-event .s{font-size:.78rem;color:var(--text-light);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cal-list{display:flex;flex-direction:column;gap:10px}
.cal-list-day{background:#fff;border:1px solid var(--border);border-radius:16px;padding:12px}
.cal-list-day h4{margin:0 0 10px 0;font-size:1rem}
.cal-list-item{display:flex;gap:12px;align-items:flex-start;padding:10px;border-radius:12px;border:1px solid rgba(52,152,219,.14);background:rgba(52,152,219,.04)}
.cal-time{min-width:70px;font-weight:900}
.cal-meta{flex:1}
.cal-meta .line1{font-weight:800}
.cal-meta .line2{color:var(--text-light);font-size:.85rem;margin-top:3px}
@media (max-width:900px){.calendar-grid{gap:8px}.calendar-cell{min-height:95px}}
@media (max-width:600px){.calendar-grid{grid-template-columns:repeat(2,1fr)}.calendar-dow{display:none}}

/* ===== Clients Modern Cards ===== */
.client-card{background:#fff;border:1px solid var(--border);border-radius:18px;overflow:hidden;box-shadow:0 10px 30px rgba(15,23,42,.06);transition:transform .15s ease, box-shadow .15s ease}
.client-card:hover{transform:translateY(-2px);box-shadow:0 18px 45px rgba(15,23,42,.10)}
.client-header{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;background:linear-gradient(135deg, rgba(79,124,255,.10), rgba(168,85,247,.06));border-bottom:1px solid rgba(15,23,42,.06)}
.client-code{font-weight:900;color:rgba(15,23,42,.85)}
.quick-actions{display:flex;gap:8px}
.client-body{padding:14px}
.client-name{margin:0 0 10px 0;font-size:1.05rem}
.client-company{color:var(--text-light);font-weight:700;margin-bottom:10px}
.client-contacts{display:flex;flex-direction:column;gap:6px}
.contact-item{display:flex;gap:8px;align-items:center;color:rgba(15,23,42,.85)}
.client-notes{margin-top:10px;color:var(--text-light)}
.client-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;padding:12px 14px;border-top:1px solid rgba(15,23,42,.06);background:rgba(15,23,42,.02)}
.stat-item{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px}
.stat-value{font-weight:900;font-size:1.1rem}
.stat-label{font-size:.82rem;color:var(--text-light)}

/* ===== Hearings Calendar (Month/Week/Day) ===== */

/* Month grid */
.cal-grid{width:100%}
.cal-grid-month{display:grid;grid-template-columns:repeat(7,1fr);gap:10px}
.cal-dow{background:rgba(15,23,42,.03);border:1px solid var(--stroke);border-radius:14px;padding:10px;text-align:center;font-weight:800;color:rgba(15,23,42,.75)}
.cal-day{background:var(--panel);border:1px solid var(--stroke);border-radius:16px;padding:10px;min-height:120px;display:flex;flex-direction:column;gap:7px;overflow:hidden}
.cal-day.empty{background:transparent;border:0}
.cal-day.today{outline:2px solid rgba(31,185,170,.55);outline-offset:2px}
.cal-day-num{font-weight:900;font-size:12px;color:rgba(15,23,42,.55)}
.cal-event{appearance:none;border:1px solid rgba(59,130,246,.22);background:rgba(59,130,246,.08);border-radius:12px;padding:7px 8px;font-family:inherit;font-size:12px;line-height:1.25;text-align:right;cursor:pointer;transition:transform .12s ease, background .12s ease}
.cal-event:hover{background:rgba(59,130,246,.14);transform:translateY(-1px)}

/* تقويم المكتب: تمييز الجلسات عن المهام */
.cal-event.hearing{border-color:rgba(59,130,246,.28);background:rgba(59,130,246,.10)}
.cal-event.hearing:hover{background:rgba(59,130,246,.16)}
.cal-event.task{border-color:rgba(245,158,11,.35);background:rgba(245,158,11,.12)}
.cal-event.task:hover{background:rgba(245,158,11,.18)}

.cal-list-item.task{border-right:4px solid rgba(245,158,11,.9)}
.cal-list-item.hearing{border-right:4px solid rgba(59,130,246,.9)}
.cal-more{margin-top:auto;font-size:12px;color:rgba(15,23,42,.55)}

/* Week/day list */
.cal-list{display:flex;flex-direction:column;gap:12px}
.cal-list-day{background:var(--panel);border:1px solid var(--stroke);border-radius:18px;padding:14px}
.cal-list-day h4{margin:0 0 10px 0;font-size:14px}
.cal-list-item{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;border:1px solid rgba(15,23,42,.08);border-radius:16px;background:rgba(15,23,42,.02);margin:10px 0}
.cal-list-meta{font-size:13px}
.cal-list-sub{font-size:12px;color:rgba(15,23,42,.6);margin-top:4px}

@media (max-width:1000px){
  .cal-grid-month{gap:8px}
  .cal-day{min-height:105px;padding:8px}
}
@media (max-width:780px){
  .cal-grid-month{gap:6px}
  .cal-day{min-height:95px}
  .cal-list-item{flex-direction:column;align-items:flex-start}
}

/* Notifications (bell + dropdown + page) */
.notif-wrapper{position:relative;display:flex;align-items:center}
.notif-btn{position:relative;border:1px solid rgba(15,23,42,.12);background:rgba(255,255,255,.85);border-radius:14px;padding:10px 12px;cursor:pointer;display:flex;align-items:center;gap:10px;transition:transform .12s ease, background .12s ease}
.notif-btn:hover{background:#fff;transform:translateY(-1px)}
.notif-btn i{font-size:16px;color:rgba(15,23,42,.75)}
.notif-badge{position:absolute;top:-7px;right:-7px;min-width:20px;height:20px;border-radius:999px;background:#ef4444;color:#fff;font-weight:800;font-size:12px;display:flex;align-items:center;justify-content:center;border:2px solid #fff;box-shadow:0 8px 20px rgba(239,68,68,.25)}
.notif-dropdown{position:absolute;top:calc(100% + 10px);right:0;width:360px;max-width:86vw;background:#fff;border:1px solid rgba(15,23,42,.12);border-radius:18px;box-shadow:0 20px 60px rgba(2,6,23,.16);z-index:50;overflow:hidden}
.notif-head{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;background:rgba(15,23,42,.02);border-bottom:1px solid rgba(15,23,42,.08);font-weight:900}
.notif-all{font-size:12px;color:var(--primary);text-decoration:none;font-weight:800}
.notif-list{max-height:360px;overflow:auto}
.notif-item{display:flex;gap:10px;padding:12px 14px;border-bottom:1px solid rgba(15,23,42,.06);text-decoration:none;color:inherit}
.notif-item:hover{background:rgba(15,23,42,.02)}
.notif-dot{width:10px;height:10px;border-radius:999px;margin-top:5px;flex:0 0 10px}
.notif-dot.info{background:#3b82f6}
.notif-dot.success{background:#22c55e}
.notif-dot.warning{background:#f59e0b}
.notif-dot.danger{background:#ef4444}
.notif-title{font-weight:900;font-size:13px;margin:0 0 4px 0}
.notif-body{font-size:12px;color:rgba(15,23,42,.65);margin:0}
.notif-meta{font-size:11px;color:rgba(15,23,42,.5);margin-top:6px}
.notif-item.unread{background:rgba(59,130,246,.05)}

.notifications-page .notif-card{background:var(--panel);border:1px solid var(--stroke);border-radius:20px;padding:16px}
.notifications-page .notif-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:space-between;align-items:center;margin-bottom:12px}
.btn-ghost{border:1px solid rgba(15,23,42,.12);background:rgba(255,255,255,.75);border-radius:14px;padding:10px 12px;cursor:pointer;font-weight:800}
.btn-ghost:hover{background:#fff}

/* Page list polish */
.notifications-page #pageNotifList{display:flex;flex-direction:column;gap:10px}
.notifications-page .notif-item{border:1px solid rgba(15,23,42,.10);border-radius:18px;box-shadow:0 10px 26px rgba(2,6,23,.06);background:#fff}
.notifications-page .notif-item:hover{background:rgba(79,124,255,.04)}
.notifications-page .notif-item.unread{border-color:rgba(79,124,255,.30);background:rgba(79,124,255,.06)}
.notifications-page .notif-title{font-size:14px}
.notifications-page .notif-body{font-size:13px}
.notifications-page .notif-meta{font-size:12px}

/* ===== Mobile sidebar as app drawer ===== */
.mobile-menu-btn{display:none;align-items:center;justify-content:center;gap:8px;border:1px solid rgba(15,23,42,.12);background:rgba(255,255,255,.9);border-radius:14px;padding:10px 12px;cursor:pointer;font-weight:900}
.mobile-menu-btn i{font-size:16px}
.sidebar-overlay{display:none;position:fixed;inset:0;background:rgba(2,6,23,.45);backdrop-filter:blur(6px);z-index:998}

@media (max-width: 900px){
  .sidebar{
  overflow:hidden;position:fixed;top:0;right:0;height:100vh;transform:translateX(110%);transition:transform .18s ease;z-index:999;width:min(86vw,320px);box-shadow:-20px 0 60px rgba(2,6,23,.20)}
  .sidebar.sidebar-open{transform:translateX(0)}
  .sidebar-overlay.show{display:block}
  .main-content{margin-right:0 !important}
  .header{gap:10px;flex-wrap:wrap}
  .mobile-menu-btn{display:inline-flex}
  .sidebar-menu a{padding:14px 14px;border-radius:16px}
  .sidebar-menu i{width:22px;text-align:center}
}

/* تحسينات مرئية للإشعارات (Page + Dropdown) */
.notif-dropdown{backdrop-filter: blur(10px)}
.notif-item{align-items:flex-start}
.notif-item .notif-title{line-height:1.35}
.notif-item.unread{position:relative}
.notif-item.unread::after{content:'';position:absolute;inset:0;border-radius:0;border-left:4px solid rgba(59,130,246,.65)}
.notif-list .notif-item:last-child{border-bottom:0}

.notifications-page #pageNotifList{display:flex;flex-direction:column;border:1px solid rgba(15,23,42,.06);border-radius:18px;overflow:hidden}
.notifications-page #pageNotifList .notif-item{background:rgba(255,255,255,.85)}
.notifications-page #pageNotifList .notif-item:hover{background:#fff}
.notifications-page #pageNotifList .notif-item.unread{background:rgba(59,130,246,.06)}
.notifications-page .header .user-info{gap:12px;flex-wrap:wrap}

/* ===== Mobile Sidebar (App-like) ===== */
.mobile-overlay{position:fixed;inset:0;background:rgba(2,6,23,.35);backdrop-filter: blur(6px);z-index:9998;display:none}
.mobile-fab{position:fixed;bottom:18px;right:18px;z-index:9999;width:54px;height:54px;border-radius:18px;border:1px solid rgba(15,23,42,.12);background:rgba(255,255,255,.9);box-shadow:0 18px 50px rgba(2,6,23,.18);display:none;align-items:center;justify-content:center;cursor:pointer}
.mobile-fab i{color:rgba(15,23,42,.85);font-size:18px}

@media (max-width: 980px){
  .sidebar{
  overflow:hidden;position:fixed;top:0;right:0;height:100vh;transform:translateX(110%);transition:transform .2s ease;z-index:9999;box-shadow:0 30px 90px rgba(2,6,23,.25)}
  .sidebar.active{transform:translateX(0)}
  .main-content{margin-right:0;padding:18px}
  .mobile-overlay.show{display:block}
  .mobile-fab{display:flex}
  .header{position:sticky;top:0;z-index:50;background:rgba(248,250,252,.9);backdrop-filter: blur(10px);border:1px solid rgba(15,23,42,.08);border-radius:18px;margin-bottom:14px}
}


/* Sidebar Scroll (Unified) */
.sidebar{height:100vh;overflow:hidden}
.sidebar-menu{overflow-y:auto;max-height:calc(100vh - 220px);padding-bottom:24px}
.sidebar-menu::-webkit-scrollbar{width:8px}
.sidebar-menu::-webkit-scrollbar-thumb{border-radius:10px;background:rgba(15,23,42,.18)}
.sidebar-menu::-webkit-scrollbar-track{background:transparent}

/* ====== Client Portal helpers ====== */
.timeline{position:relative; padding:8px 0}
.timeline-item{display:flex; gap:14px; padding:10px 0; border-bottom:1px solid rgba(0,0,0,.06)}
.timeline-item:last-child{border-bottom:0}
.timeline-marker{width:12px; height:12px; border-radius:999px; background:var(--primary); margin-top:6px; flex:0 0 12px}
.timeline-marker.marker-task{background:var(--warning)}
.timeline-marker.marker-hearing{background:var(--primary)}
.timeline-content h4{margin:0; display:flex; align-items:center; justify-content:space-between; gap:10px; font-size:14px}
.timeline-content p{margin:6px 0 8px; color:var(--text-muted)}
.timeline-date{font-size:12px; color:var(--text-muted)}

.sidebar .brand-logo{width:38px; height:38px; object-fit:contain; border-radius:12px; border:1px solid var(--stroke); background:#fff}
.sidebar .brand-logo-placeholder{width:38px; height:38px; border-radius:12px; border:1px solid var(--stroke); display:grid; place-items:center; background:#fff}

