*{box-sizing:border-box}
:root{
  --bg:#f4f7fb;--card:#fff;--text:#0f172a;--muted:#64748b;--line:#dbe4f0;
  --navy:#062b5f;--gold:#d69a2d;--green:#0f766e;--red:#b91c1c;--blue:#1d4ed8
}
body{margin:0;background:var(--bg);font-family:Cairo,Arial,sans-serif;color:var(--text)}
.member-app{min-height:100vh;display:grid;grid-template-columns:280px 1fr}
.member-sidebar{background:linear-gradient(180deg,#061b3d,#092f68);color:#fff;padding:20px;position:sticky;top:0;height:100vh}
.member-brand{display:flex;align-items:center;gap:12px;margin-bottom:24px}
.member-brand-logo{width:48px;height:48px;border-radius:16px;background:linear-gradient(135deg,var(--gold),#ffe8a6);color:#111;display:flex;align-items:center;justify-content:center;font-weight:900;font-size:22px}
.member-brand-title{font-weight:900}.member-brand-sub{font-size:12px;opacity:.7}
.member-nav{display:grid;gap:8px}
.member-nav a{color:#e5eefb;text-decoration:none;padding:12px 14px;border-radius:14px;font-weight:800;background:rgba(255,255,255,.06)}
.member-nav a:hover{background:rgba(255,255,255,.13)}
.member-main{padding:24px;min-width:0}
.member-topbar{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:20px}
.member-topbar h1{margin:0;font-size:28px;color:var(--navy)}
.member-topbar p{margin:4px 0 0;color:var(--muted);font-weight:700}
/* Header notifications + announcements quick actions */
.member-topbar-title{min-width:0;flex:1}
.member-header-actions{display:flex;align-items:center;gap:10px;flex-shrink:0}
.member-header-icon{width:44px;height:44px;border-radius:15px;background:#fff;border:1px solid var(--line);display:inline-flex;align-items:center;justify-content:center;position:relative;text-decoration:none;color:var(--navy);box-shadow:0 10px 26px rgba(15,23,42,.08);transition:transform .18s ease,box-shadow .18s ease,background .18s ease}
.member-header-icon:hover{transform:translateY(-1px);box-shadow:0 14px 30px rgba(15,23,42,.12)}
.member-header-icon:active{transform:scale(.96)}
.member-header-icon svg{width:22px;height:22px}
.member-header-horn{color:#f97316;background:linear-gradient(135deg,#fff7ed,#ffffff);border-color:#fed7aa}
.member-header-bell{color:#0f4c8f}
.member-header-badge{position:absolute;top:-7px;right:-7px;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:#ef4444;color:#fff;border:2px solid var(--bg);display:inline-flex;align-items:center;justify-content:center;font-size:11px;font-weight:900;line-height:1}
.member-header-badge-orange{background:#f97316}

.member-user-pill{background:#fff;border:1px solid var(--line);border-radius:999px;padding:10px 14px;font-weight:900;color:var(--navy)}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}
.card{background:var(--card);border:1px solid var(--line);border-radius:22px;padding:18px;box-shadow:0 10px 28px rgba(15,23,42,.05)}
.card h2,.card h3{margin:0 0 10px;color:var(--navy)}
.kpi{font-size:30px;font-weight:900;color:var(--navy)}
.muted{color:var(--muted);font-weight:700}
.form{display:grid;gap:12px;max-width:520px}
.form label{font-weight:900;color:#334155}
.input{width:100%;border:1px solid var(--line);border-radius:14px;padding:13px 14px;font-family:inherit;font-weight:700}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:14px;padding:12px 16px;font-weight:900;font-family:inherit;cursor:pointer;text-decoration:none}
.btn-primary{background:var(--navy);color:#fff}.btn-gold{background:linear-gradient(135deg,var(--gold),#ffe39a);color:#111}
.alert{padding:12px 14px;border-radius:14px;font-weight:800;margin-bottom:12px}
.alert-ok{background:#dcfce7;color:#166534;border:1px solid #86efac}.alert-bad{background:#fee2e2;color:#991b1b;border:1px solid #fecaca}
.table{width:100%;border-collapse:collapse}.table th,.table td{padding:12px;border-bottom:1px solid #eef2f7;text-align:right}.table th{background:#f8fafc;color:#334155}
.member-photo{width:110px;height:110px;border-radius:22px;object-fit:cover;border:3px solid var(--line);background:#f8fafc}
.profile-head{display:flex;gap:16px;align-items:center;flex-wrap:wrap}
.badge{display:inline-flex;padding:6px 10px;border-radius:999px;font-weight:900;font-size:12px}
.badge-green{background:#dcfce7;color:#166534}.badge-blue{background:#dbeafe;color:#1d4ed8}.badge-red{background:#fee2e2;color:#991b1b}.badge-yellow{background:#fef3c7;color:#92400e}
.login-page{min-height:100vh;display:grid;place-items:center;padding:20px;background:radial-gradient(circle at top,#174985,#061b3d 60%)}
.login-card{width:min(460px,100%);background:#fff;border-radius:26px;padding:24px;box-shadow:0 25px 80px rgba(0,0,0,.25)}
.login-card h1{margin:0;color:var(--navy)}.login-card p{color:var(--muted);font-weight:700}

/* Patch 3 add-ons: unread announcements badge + better textarea */
.nav-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:22px;
  height:22px;
  padding:0 7px;
  border-radius:999px;
  background:#d69a2d;
  color:#111;
  font-size:12px;
  font-weight:900;
  margin-inline-start:6px;
}

textarea.input{
  resize:vertical;
  min-height:90px;
}

@media(max-width:900px){.member-app{grid-template-columns:1fr}.member-sidebar{height:auto;position:relative}.member-main{padding:16px}.member-topbar{align-items:flex-start;flex-direction:column}}

/* Member Data Binding PRO */
.member-hero-pro{border-radius:30px;padding:24px;color:#fff;background:linear-gradient(135deg,#062b5f,#0f4c8f);display:flex;justify-content:space-between;gap:16px;align-items:center;box-shadow:0 18px 50px rgba(6,43,95,.22);margin-bottom:16px}
.hero-member-left{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.hero-member-photo{width:92px;height:92px;border-radius:24px;object-fit:cover;border:3px solid rgba(255,255,255,.35);background:#fff}
.hero-eyebrow{display:inline-flex;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.18);border-radius:999px;padding:6px 11px;font-size:12px;font-weight:900}
.member-hero-pro h2{margin:10px 0 6px;font-size:30px}
.member-hero-pro p{margin:0;color:#dbeafe;font-weight:800}
.hero-actions{display:flex;gap:10px;flex-wrap:wrap}
.dashboard-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:14px}
.dash-kpi{background:#fff;border:1px solid #dbe4f0;border-radius:22px;padding:18px;box-shadow:0 10px 28px rgba(15,23,42,.05)}
.dash-kpi span{display:block;color:#64748b;font-weight:800;font-size:13px}
.dash-kpi strong{display:block;margin-top:6px;color:#062b5f;font-size:28px;font-weight:900}
.dash-kpi.success strong{color:#0f766e}.dash-kpi.gold strong{color:#b7791f}
.section-head{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:12px}
.progress{height:13px;background:#e2e8f0;border-radius:999px;overflow:hidden}.progress span{display:block;height:100%;background:linear-gradient(135deg,#d69a2d,#ffe39a);border-radius:999px}
.empty-member-state{padding:22px;border-radius:18px;background:#f8fafc;border:1px dashed #cbd5e1;color:#64748b;font-weight:900;text-align:center}
.mini-voucher-list{display:grid;gap:10px}
.mini-voucher{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:13px;border-radius:16px;background:#f8fafc;border:1px solid #eef2f7}
.mini-voucher span{display:block;color:#64748b;font-size:12px;font-weight:800;margin-top:3px}
.profile-pro-card{background:linear-gradient(135deg,#fff,#f8fafc);border:1px solid #dbe4f0;border-radius:28px;padding:22px;box-shadow:0 10px 28px rgba(15,23,42,.05)}
.profile-pro-head{display:flex;gap:18px;align-items:center;flex-wrap:wrap}
.member-photo.large{width:132px;height:132px;border-radius:28px;object-fit:cover}
.avatar-fallback{display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#d69a2d,#ffe8a6)!important;color:#111!important;font-weight:900;font-size:34px}
.profile-pro-head h2{margin:0 0 8px;color:#062b5f;font-size:28px}
.profile-pro-head p{margin:4px 0;color:#475569;font-weight:800}
.profile-info-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:14px;margin-top:16px}
.profile-info-grid.compact{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}
.profile-info-item{background:#fff;border:1px solid #dbe4f0;border-radius:20px;padding:16px;box-shadow:0 8px 22px rgba(15,23,42,.04)}
.profile-info-item span{display:block;color:#64748b;font-weight:800;font-size:13px;margin-bottom:6px}
.profile-info-item strong{color:#0f172a;font-weight:900}
.member-doc-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:14px}
.member-doc-grid.compact{grid-template-columns:repeat(auto-fit,minmax(180px,1fr));margin-top:14px}
.member-doc-card{background:#fff;border:1px solid #dbe4f0;border-radius:20px;padding:12px;box-shadow:0 8px 22px rgba(15,23,42,.04)}
.member-doc-card span{display:block;color:#64748b;font-weight:900;margin-bottom:8px;font-size:13px}
.member-doc-card img{width:100%;height:190px;object-fit:cover;border-radius:15px;background:#f8fafc;border:1px solid #eef2f7}
.empty-doc{height:190px;border-radius:15px;border:1px dashed #cbd5e1;background:#f8fafc;color:#64748b;display:flex;align-items:center;justify-content:center;font-weight:900}
.dependents-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:16px}
.dependent-card{background:#fff;border:1px solid #dbe4f0;border-radius:26px;padding:18px;box-shadow:0 10px 28px rgba(15,23,42,.05)}
.dependent-head{display:flex;align-items:center;gap:14px}
.dependent-photo{width:86px;height:86px;border-radius:22px;object-fit:cover;background:#f8fafc;border:2px solid #e2e8f0}
.dependent-head h2{margin:0;color:#062b5f;font-size:20px}
.dependent-head p{margin:4px 0;color:#64748b;font-weight:800}
.submission-dependents{display:grid;gap:10px}
.submission-dependent-row{display:grid;grid-template-columns:1.2fr .6fr .8fr;gap:10px;background:#f8fafc;border:1px solid #eef2f7;border-radius:16px;padding:12px}
@media(max-width:760px){.member-hero-pro{display:block}.hero-actions{margin-top:14px}.mini-voucher{display:block}.submission-dependent-row{grid-template-columns:1fr}}

/* MEMBER MOBILE LAYOUT FINAL FIX - 2026-05-01 */
html,body{width:100%;max-width:100%;overflow-x:hidden}body{min-width:0}.member-mobile-bar,.member-sidebar-overlay{display:none}.member-nav a.is-active{background:linear-gradient(135deg,rgba(214,154,45,.95),rgba(255,227,154,.95));color:#111;box-shadow:0 10px 24px rgba(214,154,45,.20)}.member-main,.card,.profile-pro-card,.dash-kpi,.dependent-card,.member-doc-card{min-width:0}.table,table{max-width:100%}
@media(max-width:900px){
:root{--mobile-topbar-h:58px}body{background:var(--bg);padding-top:var(--mobile-topbar-h)}.member-mobile-bar{position:fixed;inset:0 0 auto 0;z-index:10030;height:var(--mobile-topbar-h);display:flex;align-items:center;gap:10px;padding:8px 12px;background:rgba(255,255,255,.94);border-bottom:1px solid var(--line);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);box-shadow:0 8px 28px rgba(15,23,42,.08)}.member-menu-btn{width:42px;height:42px;flex:0 0 42px;display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:14px;background:linear-gradient(135deg,var(--navy),#0f4c8f);color:#fff;font-size:23px;font-weight:900;cursor:pointer;box-shadow:0 8px 20px rgba(6,43,95,.20)}.member-mobile-title{min-width:0;flex:1;color:var(--navy);font-weight:900;font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.member-app{display:block!important;width:100%!important;max-width:100%!important;min-height:auto!important;grid-template-columns:none!important}.member-sidebar{position:fixed!important;top:0!important;bottom:0!important;right:0!important;left:auto!important;z-index:10040!important;width:min(84vw,320px)!important;max-width:320px!important;height:100dvh!important;max-height:100dvh!important;padding:18px 16px!important;overflow-y:auto!important;overscroll-behavior:contain;transform:translateX(110%)!important;transition:transform .25s ease!important;box-shadow:-24px 0 60px rgba(2,6,23,.34)!important;border-radius:0 0 0 26px}body.member-sidebar-open .member-sidebar{transform:translateX(0)!important}.member-sidebar-overlay{position:fixed;inset:0;z-index:10035;display:block;background:rgba(2,6,23,.48);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}.member-sidebar-overlay[hidden]{display:none!important}body.member-sidebar-open{overflow:hidden}.member-brand{margin-bottom:16px!important;padding-inline-end:4px}.member-brand-logo{width:44px!important;height:44px!important;border-radius:14px!important}.member-nav{display:flex!important;flex-direction:column!important;gap:7px!important}.member-nav a{display:flex!important;align-items:center!important;justify-content:space-between!important;width:100%!important;min-height:44px!important;padding:11px 12px!important;border-radius:14px!important;font-size:14px!important}.member-main{width:100%!important;max-width:100%!important;padding:14px 12px 24px!important;margin:0!important;overflow:hidden!important}.member-topbar{display:block!important;margin:0 0 14px!important;padding:0!important}.member-topbar h1{font-size:22px!important;line-height:1.35!important}.member-topbar p{font-size:13px!important;line-height:1.6!important}.grid,.dashboard-kpis,.profile-info-grid,.profile-info-grid.compact,.member-doc-grid,.member-doc-grid.compact,.dependents-grid{grid-template-columns:1fr!important;gap:12px!important}.card,.profile-pro-card,.dash-kpi,.dependent-card,.member-doc-card{width:100%!important;max-width:100%!important;border-radius:18px!important;padding:14px!important}.member-hero-pro{display:block!important;width:100%!important;max-width:100%!important;border-radius:22px!important;padding:16px!important}.hero-member-left,.profile-pro-head,.dependent-head,.section-head{align-items:flex-start!important}.hero-actions,.section-head,.profile-head{display:flex!important;flex-direction:column!important;width:100%!important}.btn,button,input,select,textarea{max-width:100%!important}.btn{width:100%;min-height:44px}.input{font-size:16px}.table{min-width:720px}.card:has(.table),.table-wrap,.table-responsive{overflow-x:auto!important;-webkit-overflow-scrolling:touch}}
@media(max-width:420px){.member-main{padding-inline:10px!important}.member-sidebar{width:88vw!important}.member-topbar h1{font-size:20px!important}.kpi,.dash-kpi strong{font-size:24px!important}}

@media(max-width:900px){.member-topbar{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:10px!important}.member-header-actions{gap:8px!important}.member-header-icon{width:40px!important;height:40px!important;border-radius:13px!important}.member-header-icon svg{width:20px!important;height:20px!important}.member-header-badge{top:-6px!important;right:-6px!important}}
