@import url('https://fonts.googleapis.com/css2?family=Noto+Kufi+Arabic:wght@400;600;700;800&family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&family=Cairo:wght@400;600;700&display=swap');

:root{
  --bg:#f6f7fb;
  --ink:#1d2b6f;
  --muted:#5c678f;
  --primary:#1d2b6f;
  --primary-dark:#0f1f5b;
  --accent:#2c7dbe;
  --surface:#ffffff;
  --surface-2:#f7f9ff;
  --border:#e7ecf5;
  --shadow:0 18px 36px rgba(20,30,60,.08);
  --shadow-soft:0 10px 24px rgba(20,30,60,.07);
}

*{ box-sizing:border-box; }
body{
  margin:0;
  font-family:"Cairo","IBM Plex Sans Arabic","Segoe UI",sans-serif;
  background:
    radial-gradient(600px 260px at 8% -10%, rgba(44,125,190,.18), transparent 70%),
    radial-gradient(520px 260px at 92% -10%, rgba(27,170,111,.12), transparent 70%),
    linear-gradient(120deg, rgba(255,255,255,.65), rgba(255,255,255,.15)),
    var(--bg);
  color:var(--ink);
  padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
}
img{ max-width:100%; display:block; }
a{ color:inherit; }

.container{ width:min(1200px,92vw); margin:0 auto; }
.section{ padding:52px 0; }
.section-title{
  font-family:"Noto Kufi Arabic","IBM Plex Sans Arabic",sans-serif;
  font-size:clamp(1.5rem,2.6vw,2.3rem);
  margin:0 0 12px;
  color:#1d2b6f;
}
.section-sub{
  color:var(--muted);
  margin:0 0 20px;
  max-width:760px;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border-radius:999px;
  padding:10px 22px;
  border:1px solid transparent;
  text-decoration:none;
  font-weight:800;
  letter-spacing:.2px;
  cursor:pointer;
  transition:transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn-primary{
  background:linear-gradient(180deg,#1d2b6f,#0f1f5b);
  color:#fff;
  box-shadow:0 14px 30px rgba(29,43,111,.2);
}
.btn-primary:hover{ transform:translateY(-1px); }
.btn-outline{
  background:#fff;
  color:var(--ink);
  border-color:var(--border);
}
.btn-ghost{
  background:transparent;
  border-color:rgba(12,139,139,.2);
  color:var(--primary-dark);
}
.btn-danger{
  background:linear-gradient(180deg,#c2410c,#9a3412);
  color:#fff;
  box-shadow:0 12px 24px rgba(194,65,12,.2);
}
.btn-danger:hover{ transform:translateY(-1px); }

.chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  background:#eef3ff;
  color:#1d2b6f;
  padding:6px 14px;
  border-radius:999px;
  font-weight:700;
  font-size:.9rem;
}
.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 12px;
  border-radius:12px;
  background:#eef3ff;
  color:#1d2b6f;
  font-weight:700;
  font-size:.85rem;
}

/* Header */
.site-header{
  position:sticky;
  top:0;
  z-index:50;
  background:#ffffff;
  border-bottom:1px solid var(--border);
  box-shadow:0 12px 30px rgba(15,23,42,.08);
}
.navbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:16px 0;
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color:var(--ink);
  font-weight:900;
  letter-spacing:.2px;
}
.brand img{ width:40px; height:40px; }

/* Hero */
.hero{
  display:grid;
  grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr);
  gap:24px;
  align-items:center;
}
.hero-card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:28px;
  padding:30px;
  box-shadow:var(--shadow);
  position:relative;
  overflow:hidden;
}
.hero-card:after{
  content:"";
  position:absolute;
  inset:-60px -120px auto auto;
  width:200px;
  height:200px;
  background:radial-gradient(circle, rgba(29,43,111,.2), transparent 65%);
}
.hero-title{
  font-family:"Noto Kufi Arabic","IBM Plex Sans Arabic",sans-serif;
  font-size:clamp(1.9rem,3.4vw,2.9rem);
  margin:0 0 10px;
}
.hero-text{ color:var(--muted); line-height:1.9; }
.hero-actions{ display:flex; gap:12px; flex-wrap:wrap; margin-top:18px; }
.hero-side{
  display:grid;
  gap:14px;
}
.stat-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.stat{
  background:#fff;
  border:1px solid var(--border);
  border-radius:18px;
  padding:16px;
  text-align:center;
  box-shadow:var(--shadow-soft);
}
.stat strong{ font-size:1.4rem; }
.stat span{ color:var(--muted); font-weight:600; display:block; margin-top:4px; }
.hero-panel{
  background:linear-gradient(120deg,#0b7f7f,#0eae6d);
  color:#fff;
  border-radius:22px;
  padding:22px;
  box-shadow:var(--shadow);
}
.hero-panel h3{ margin:0 0 6px; font-size:1.1rem; }
.hero-panel p{ margin:0; color:rgba(255,255,255,.85); line-height:1.7; }

/* Cards */
.grid{ display:grid; gap:18px; grid-template-columns:repeat(3,1fr); }
.card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:22px;
  padding:18px;
  box-shadow:var(--shadow-soft);
  display:flex;
  flex-direction:column;
  gap:10px;
}
.card h3{ margin:0; font-size:1.05rem; }
.card p{ margin:0; color:var(--muted); line-height:1.7; }
.card .meta{ font-size:.9rem; color:var(--primary); font-weight:700; }
.card .meta-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  color:var(--muted);
  font-size:.9rem;
}
.card-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:8px;
}
.card-actions form{ margin:0; }
.post-card-image{
  width:100%;
  height:170px;
  object-fit:cover;
  border-radius:16px;
  border:1px solid var(--border);
}
.card-link{
  text-decoration:none;
  color:inherit;
  transition:transform .2s ease, box-shadow .2s ease;
}
.card-link:hover{
  transform:translateY(-2px);
  box-shadow:var(--shadow);
}

/* Lists */
.list{ display:grid; gap:16px; }
.list-item{
  background:#fff;
  border:1px solid var(--border);
  border-radius:20px;
  padding:18px;
  display:flex;
  flex-direction:column;
  gap:10px;
  box-shadow:var(--shadow-soft);
}
.list-item .title{ font-weight:800; font-size:1.05rem; }
.list-item .info{ color:var(--muted); font-size:.95rem; }
.list-item .meta{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  color:var(--primary-dark);
  font-weight:700;
}

/* Forms */
.form-card{
  background:#fff;
  border:1px solid var(--border);
  border-radius:24px;
  padding:26px;
  box-shadow:var(--shadow);
}
.field{ display:flex; flex-direction:column; gap:6px; margin-bottom:14px; }
.label{ font-weight:700; }
.input,
.textarea{
  border:1px solid var(--border);
  border-radius:14px;
  padding:12px 14px;
  font-family:inherit;
  transition:border .2s ease, box-shadow .2s ease;
  background:#fbfdff;
}
.input:focus,
.textarea:focus{
  outline:none;
  border-color:rgba(12,139,139,.6);
  box-shadow:0 0 0 3px rgba(12,139,139,.15);
}
.textarea{ min-height:140px; resize:vertical; }
.helper{ color:var(--muted); font-size:.9rem; }
.alert{
  background:#fff7ea;
  border:1px solid #f1d8a8;
  color:#6f4a0a;
  padding:12px 14px;
  border-radius:14px;
  font-weight:700;
}

/* Utility */
.split{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:20px;
  align-items:center;
}
.soft{
  background:var(--surface-2);
  border:1px solid var(--border);
  border-radius:22px;
  padding:18px;
}
.profile-hero{
  display:grid;
  grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr);
  gap:20px;
  align-items:stretch;
  margin-bottom:20px;
}
.profile-card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:22px;
  padding:22px;
  box-shadow:var(--shadow);
}
.profile-header{
  display:flex;
  gap:14px;
  align-items:center;
}
.profile-avatar{
  width:56px;
  height:56px;
  border-radius:16px;
  background:linear-gradient(135deg,#0c8b8b,#22c55e);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
}
.profile-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:16px;
}
.profile-stats{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
  margin-top:16px;
}
.stat-mini{
  background:#f8fbff;
  border:1px solid var(--border);
  border-radius:14px;
  padding:12px;
  text-align:center;
}
.stat-mini span{
  color:var(--muted);
  font-size:.85rem;
  display:block;
  margin-top:4px;
}
.post-grid{
  display:grid;
  grid-template-columns:minmax(0,2.2fr) minmax(0,1fr);
  gap:20px;
  align-items:start;
}
.post-title{
  margin:0;
  font-size:clamp(1.4rem,2.4vw,2rem);
}
.post-content{
  color:var(--ink);
  line-height:1.9;
  margin-top:12px;
  font-size:1.05rem;
  
}
.post-content img{
  width:min(100%, 500px);
  max-width:100%;
  height:auto;
  display:block;
  margin:12px auto;
  border-radius:14px;
  border:1px solid var(--border);
  box-shadow:var(--shadow-soft);
}
.post-media{
  border-radius:16px;
  border:1px solid var(--border);
  box-shadow:var(--shadow-soft);
  margin-top:14px;
}
.post-media-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
  margin-top:14px;
}
.post-media-grid .post-media{
  margin-top:0;
}
.post-form .input{
  border-radius:16px;
}
.post-editor{
  border-radius:18px;
  overflow:hidden;
  border:1px solid #dfe6f5;
  background:#fff;
  box-shadow:0 10px 22px rgba(20,30,60,.06);
}
.post-editor .ql-toolbar{
  border:0;
  border-bottom:1px solid #eef2f8;
  background:#f5f8ff;
}
.post-editor .ql-container{
  border:0;
  min-height:180px;
  font-family:"Cairo","IBM Plex Sans Arabic",sans-serif;
}
.post-editor .ql-editor{
  direction:rtl;
  text-align:right;
}
.post-images-editor{
  margin-top:12px;
}
.post-images-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:12px;
}
.post-image-card{
  background:#fff;
  border:1px solid var(--border);
  border-radius:16px;
  padding:10px;
  display:flex;
  flex-direction:column;
  gap:8px;
  box-shadow:var(--shadow-soft);
}
.post-image-card img{
  width:100%;
  height:160px;
  object-fit:cover;
  border-radius:12px;
}
@media (max-width: 640px){
  .post-images-grid{ grid-template-columns:1fr; }
  .post-image-card img{ height:auto; }
}
.reaction-bar{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:16px;
}

.post-share-row{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
  margin-top:6px;
}

.post-share-row .copy-link-btn{
  --btn-border:#0f172a;
  border:1px solid rgba(15,23,42,.25);
  border-radius:999px;
  padding:0.55rem 1.3rem;
  font-weight:600;
  text-transform:none;
  background:
    radial-gradient(circle at 15% 10%, rgba(15,23,42,.12), transparent 40%),
    linear-gradient(135deg, rgba(15,23,42,.06), rgba(15,23,42,0));
  color:#0f172a;
  box-shadow:0 10px 26px rgba(15,23,42,.12);
  transition:transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.post-share-row .copy-link-btn:hover,
.post-share-row .copy-link-btn:focus{
  transform:translateY(-1px);
  box-shadow:0 14px 32px rgba(15,23,42,.18);
  background:
    radial-gradient(circle at 15% 10%, rgba(59,130,246,.18), transparent 35%),
    linear-gradient(135deg, rgba(59,130,246,.15), rgba(15,23,42,0));
}

.post-share-row .copy-link-btn::after{
  content:"";
  display:inline-block;
  width:14px;
  height:14px;
  margin-left:8px;
  border-radius:4px;
  border:2px solid currentColor;
  border-top:none;
  border-right:none;
  transform:rotate(-45deg);
}

.post-share-row .copy-feedback{
  font-size:13px;
  color:rgba(15,23,42,.7);
}
.react-btn{
  border:1px solid var(--border);
  background:#fff;
   color:#0e0e0e;
  border-radius:999px;
  padding:8px 14px;
  font-weight:800;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:6px;
  transition:transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.react-btn:hover{ transform:translateY(-1px); }
.react-btn.is-active{
  background:#0c8b8b;
  color:#fff;
  border-color:#0c8b8b;
  box-shadow:0 10px 22px rgba(12,139,139,.2);
}
.react-btn.dislike{
  color:#8b2f2f;
  border-color:#f1c1c1;
  background:#fff5f5;
}
.react-btn.dislike.is-active{
  background:#c2410c;
  border-color:#c2410c;
}
.comment-list{
  display:grid;
  gap:12px;
  margin-top:16px;
}
.comment-item{
  background:#fff;
  border:1px solid var(--border);
  border-radius:16px;
  padding:14px;
  box-shadow:var(--shadow-soft);
}
.comment-item p{
  margin:6px 0 0;
  color:var(--muted);
  line-height:1.7;
}
.comment-item .meta-row{
  font-size:.85rem;
  color:var(--muted);
}
.profile-settings{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:18px;
  margin-top:16px;
}
.profile-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:12px;
}
.member-theme{
  font-family:"Cairo","IBM Plex Sans Arabic",sans-serif;
}
.member-title{
  text-align:center;
  color:#1d2b6f;
  font-weight:800;
}
.member-subtitle{
  color:#1d2b6f;
  font-weight:800;
}
.member-panel{
  background:#fff;
  border-radius:26px;
  border:1px solid #e7ecf5;
  box-shadow:0 18px 36px rgba(20,30,60,.08);
}
.member-panel.member-panel-accent{
  border-top:5px solid #1d2b6f;
  background:linear-gradient(180deg,#ffffff 0%, #f8fafc 100%);
}
.member-panel h3{
  color:#1f2d5c;
}
.member-kpi{
  border-radius:22px;
  background:#fff;
  border:1px solid #e6ecf8;
  box-shadow:0 10px 24px rgba(20,30,60,.08);
  position:relative;
  overflow:hidden;
}
.member-kpi:before{
  content:"";
  position:absolute;
  inset:0 auto auto 0;
  width:100%;
  height:5px;
  background:#2c7dbe;
}
.member-kpi.tone-green:before{ background:#1baa6f; }
.member-kpi.tone-indigo:before{ background:#4f5bd5; }
.member-kpi.tone-blue:before{ background:#2c7dbe; }
.member-kpi strong{
  font-size:1.5rem;
  color:#1d2b6f;
}
.member-settings-nav{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:8px 0 18px;
}
.member-toggle-btn{
  border-radius:999px;
  font-weight:800;
}
.member-toggle-btn.is-active{
  background:linear-gradient(180deg,#1d2b6f,#0f1f5b);
  color:#fff;
  border-color:transparent;
}
.is-hidden{ display:none; }
.member-settings-shell{
  background:#fff;
  border-radius:22px;
  border:1px solid #e7ecf5;
  box-shadow:0 18px 36px rgba(20,30,60,.08);
  overflow:hidden;
}
.member-settings-header{
  padding:16px 18px;
  border-bottom:1px solid #eef2f8;
}
.member-settings-header h3{
  margin:0;
  color:#1d2b6f;
  font-size:1.15rem;
}
.member-tabs{
  display:flex;
  gap:14px;
  padding:0 18px;
  border-bottom:1px solid #eef2f8;
}
.member-tab{
  background:transparent;
  border:none;
  padding:14px 6px 12px;
  font-weight:800;
  color:#5c678f;
  cursor:pointer;
  border-bottom:2px solid transparent;
  transition:color .2s ease, border-color .2s ease;
}
.member-tab.is-active{
  color:#1d2b6f;
  border-color:#1d2b6f;
}
.member-tab-panels{
  padding:18px;
}
.member-section-card{
  border:1px solid #e7ecf5;
  border-radius:18px;
  background:#fbfcff;
  margin-bottom:14px;
  overflow:hidden;
}
.member-section-head{
  background:#edf3fb;
  padding:12px 14px;
  font-weight:800;
  color:#1d2b6f;
}
.member-photo-box{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
  padding:18px;
}
.member-photo-field{
  grid-column:1 / -1;
  text-align:center;
  padding:0;
}
.member-photo-circle{
  width:120px;
  height:120px;
  border-radius:50%;
  border:2px solid #1d2b6f;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  color:#1d2b6f;
  cursor:pointer;
  background:#fff;
  text-align:center;
  font-weight:800;
  position:relative;
  overflow:hidden;
}
.member-photo-circle img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.member-photo-circle input{
  position:absolute;
  inset:0;
  opacity:0;
  cursor:pointer;
}
.member-photo-plus{
  font-size:1.6rem;
  line-height:1;
}
.member-photo-text{
  font-size:.85rem;
}
.member-form-actions{
  padding:0 14px 14px;
  display:flex;
  justify-content:flex-end;
}
.member-modal{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  z-index:200;
}
.member-modal.is-open{ display:flex; }
.member-modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(15,23,42,.35);
}
.member-modal-dialog{
  position:relative;
  z-index:1;
  width:min(940px,94vw);
  max-height:90vh;
  overflow:auto;
  border-radius:22px;
}
.member-modal-content{
  padding:0 1.5rem 1.5rem;
}
.member-modal .member-settings-shell{
  margin:0;
}
.member-modal .member-settings-header{
  display:none;
}
.member-modal-tabs{
  display:flex;
  gap:0.75rem;
  border-bottom:1px solid #e8ecf4;
  padding-bottom:0.75rem;
  margin:0 0 1.25rem;
}
.member-modal-tab{
  border:none;
  padding:0.65rem 1.2rem;
  border-radius:999px;
  background:#f1f5fb;
  color:#1d2b6f;
  font-weight:700;
  cursor:pointer;
  transition:background .2s ease, color .2s ease;
}
.member-modal-tab.is-active{
  background:#1d2b6f;
  color:#fff;
  box-shadow:0 10px 20px rgba(20,30,60,.25);
}
.member-modal-panel{
  margin-bottom:1rem;
}
.member-modal-panel.is-hidden{
  display:none;
}
.member-modal-dialog{
  background: linear-gradient(180deg, #ffffff 0%, #f3f6ff 100%);
  padding: 0;
}
.member-modal-content{
  border-radius: 0 0 22px 22px;
  background: #eef1ff;
  padding: 1.5rem;
}
.member-modal-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 18px;
  margin:0;
  border-bottom:1px solid #eef2f8;
  background:#fff;
}
.member-section-card{
  background:#fff;
  border-radius:18px;
  padding:1.5rem;
  box-shadow:0 35px 80px rgba(15,23,42,0.18);
  border:1px solid rgba(17,33,72,0.08);
}
.member-section-card h3{
  margin-top:0;
  margin-bottom:1rem;
  color:#0f1e42;
  font-size:1.2rem;
}
.member-form-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(220px,1fr));
  gap:1rem;
}
.member-form-grid--stacked{
  grid-template-columns:1fr;
}
.member-field{
  display:flex;
  flex-direction:column;
  gap:0.4rem;
  font-size:0.95rem;
  color:#1c2440;
}
.member-field-label{
  font-weight:600;
}
.member-field--wide{
  grid-column:1 / -1;
}
.member-field input,
.member-field select,
.member-field textarea{
  padding:0.9rem 1rem;
  border-radius:14px;
  border:1px solid #e0e4f0;
  background:#fff;
  box-shadow:inset 0 1px 3px rgba(15,23,42,0.08);
  transition:border .2s ease, box-shadow .2s ease;
}
.member-field textarea{
  min-height:120px;
  resize:vertical;
}
.member-field input:focus,
.member-field select:focus,
.member-field textarea:focus{
  border-color:#5a6bff;
  box-shadow:0 0 0 3px rgba(90,107,255,0.25);
  outline:none;
}
.form-actions{
  margin-top:1.25rem;
}
.form-actions--right{
  display:flex;
  justify-content:flex-end;
}
.form-actions button{
  padding:0.85rem 1.8rem;
  border-radius:999px;
  border:none;
  background:#1d2b6f;
  color:#fff;
  font-weight:700;
  box-shadow:0 20px 40px rgba(29,43,111,0.35);
  cursor:pointer;
  transition:transform .2s ease;
}
.form-actions button:hover{
  transform:translateY(-2px);
}
.member-modal-close{
  border:1px solid #d6deef;
  background:#fff;
  color:#1d2b6f;
  width:36px;
  height:36px;
  border-radius:50%;
  font-size:20px;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
body.modal-open{ overflow:hidden; }
.reveal{ animation:rise .6s ease both; }
.reveal.delay{ animation-delay:.15s; }
@keyframes rise{ from{ opacity:0; transform:translateY(10px);} to{ opacity:1; transform:translateY(0);} }

/* Members directory */
.member-directory-hero{
  padding:22px 24px;
  margin-bottom:22px;
  background:linear-gradient(135deg,#ffffff 0%, #f6f7ff 100%);
}
.member-directory-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  flex-wrap:wrap;
}
.member-directory-tools{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.member-directory-search-form{
  margin:0;
  display:flex;
}
.member-directory-search{
  border:1px solid var(--border);
  border-radius:999px;
  padding:10px 18px;
  min-width:min(320px, 82vw);
  background:#fbfdff;
  font-family:inherit;
  transition:border .2s ease, box-shadow .2s ease;
}
.member-directory-search-form .member-directory-search{
  width:100%;
}
.member-directory-search:focus{
  outline:none;
  border-color:rgba(79,91,213,.5);
  box-shadow:0 0 0 3px rgba(79,91,213,.15);
}
.member-directory-count{
  background:#f4f7ff;
  border:1px solid #e7ecf5;
  border-radius:999px;
  padding:8px 14px;
  font-weight:800;
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:#1d2b6f;
}
.member-directory-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:22px;
}
.member-directory-card{
  background:#fff;
  border:1px solid #eef2fb;
  border-radius:26px;
  padding:22px 22px 20px;
  box-shadow:0 14px 30px rgba(30,64,175,.08);
  display:flex;
  flex-direction:column;
  gap:14px;
  transition:transform .2s ease, box-shadow .2s ease;
  cursor:pointer;
}
.member-directory-card:hover{
  transform:translateY(-2px);
  box-shadow:0 18px 36px rgba(30,64,175,.12);
}
.member-card-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
}
.member-card-info{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.member-card-avatar{
  width:72px;
  height:72px;
  border-radius:50%;
  background:linear-gradient(135deg,#0ea5e9,#6366f1);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  font-size:1.25rem;
  overflow:hidden;
  border:3px solid #e6f0ff;
  box-shadow:0 8px 18px rgba(37,99,235,.2);
}
.member-card-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.member-card-name{
  font-weight:900;
  font-size:1.2rem;
  color:#0f2a6a;
  letter-spacing:.2px;
}
.member-card-role{
  color:#0f7493;
  font-weight:700;
  font-size:.95rem;
}
.member-pill{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  border-radius:16px;
  padding:10px 14px;
  font-weight:800;
  color:#1f2d5c;
  background:#eef2ff;
}
.member-pill-level{
  color:#1f2d5c;
}
.member-pill-points{
  background:#e9fff6;
  color:#16a34a;
}
.member-progress{
  width:100%;
  height:10px;
  border-radius:999px;
  background:#edf2ff;
  overflow:hidden;
  box-shadow:inset 0 1px 2px rgba(15,23,42,.06);
}
.member-progress-bar{
  height:100%;
  border-radius:999px;
  transition:width .6s ease;
}
.member-remaining{
  text-align:center;
  color:#8aa0b8;
  font-weight:700;
  font-size:.95rem;
}
.member-card-extra{
  border-top:1px dashed #e6edf8;
  padding-top:12px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.member-card-label{
  font-weight:800;
  color:#1d2b6f;
  font-size:.9rem;
}
.member-card-text{
  margin:0;
  color:var(--muted);
  line-height:1.7;
}
.member-card-text.is-muted{
  color:#94a3b8;
}
.member-card-tags{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.member-tag{
  background:#eef3ff;
  color:#1d2b6f;
  padding:6px 12px;
  border-radius:999px;
  font-weight:700;
  font-size:.85rem;
}
.member-tag.is-empty{
  background:#f8fafc;
  color:#94a3b8;
}

.member-details-modal{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  z-index:99999;
}
.member-details-modal.is-open{ display:flex; }
.member-details-dialog{
  background:#fff;
  border-radius:22px;
  width:min(880px,94vw);
  max-height:90vh;
  overflow:auto;
  padding:22px;
  box-shadow:var(--shadow);
  position:relative;
}
.member-details-close{
  position:absolute;
  top:12px;
  inset-inline-end:12px;
  width:36px;
  height:36px;
  border-radius:50%;
  border:1px solid #d6deef;
  background:#fff;
  cursor:pointer;
  font-size:20px;
}
.member-details-header{
  display:flex;
  gap:14px;
  align-items:center;
  margin-bottom:12px;
}
.member-details-avatar{
  width:70px;
  height:70px;
  border-radius:50%;
  background:linear-gradient(135deg,#0ea5e9,#6366f1);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  overflow:hidden;
}
.member-details-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.member-details-name{
  margin:0 0 4px;
  font-size:1.25rem;
  color:#0f2a6a;
}
.member-details-role{
  color:#0f7493;
  font-weight:700;
}
.member-details-stats{
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:12px;
  margin:12px 0 16px;
}
.member-details-stat{
  background:#f8fbff;
  border:1px solid #e7ecf5;
  border-radius:16px;
  padding:12px;
  text-align:center;
  font-weight:800;
}
.member-details-stat span{
  display:block;
  margin-top:4px;
  color:#7483b3;
  font-weight:700;
  font-size:.9rem;
}
.member-details-stat#memberDetailsLevel{
  display:flex;
  align-items:center;
  justify-content:center;
}
.member-details-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:12px;
  margin-bottom:16px;
}
.member-details-item{
  background:#fbfcff;
  border:1px solid #e7ecf5;
  border-radius:14px;
  padding:10px 12px;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.member-details-item span{
  color:#6c7aa8;
  font-weight:700;
  font-size:.85rem;
}
.member-details-item strong{
  color:#1f2d5c;
  font-weight:800;
}
.member-details-section{
  margin-bottom:12px;
}
.member-details-label{
  font-weight:800;
  color:#1d2b6f;
  margin-bottom:6px;
}
.member-details-text{
  margin:0;
  color:var(--muted);
  line-height:1.7;
}
.member-details-tags{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

/* Footer */
.site-footer{
  background:#0b1324;
  color:#fff;
  padding:10px 0;
  margin-top:20px;
}
.site-footer .footer-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
.site-footer a{ color:#fff; text-decoration:none; }
.site-footer .meta{ color:#a7b4d6; }

@media (max-width: 980px){
  .hero{ grid-template-columns:1fr; }
  .stat-grid{ grid-template-columns:repeat(2,1fr); }
  .grid{ grid-template-columns:repeat(2,1fr); }
  .member-directory-grid{ grid-template-columns:1fr; }
  .split{ grid-template-columns:1fr; }
  .profile-hero{ grid-template-columns:1fr; }
  .post-grid{ grid-template-columns:1fr; }
  .profile-stats{ grid-template-columns:repeat(2,1fr); }
  .profile-settings{ grid-template-columns:1fr; }
  .profile-grid{ grid-template-columns:1fr; }
  .site-footer .footer-grid{ grid-template-columns:1fr; }
}
@media (max-width: 640px){
  .grid{ grid-template-columns:1fr; }
  .stat-grid{ grid-template-columns:1fr; }
  .nav-toggle{ display:inline-flex; }
  .nav-links{
    width:100%;
    flex-direction:column;
    background:#fff;
    border:1px solid var(--border);
    border-radius:16px;
    padding:10px;
    box-shadow:var(--shadow-soft);
    max-height:0;
    overflow:hidden;
    opacity:0;
    transform:translateY(-8px);
    transition:max-height .3s ease, opacity .25s ease, transform .25s ease;
  }
  
  .nav-actions{ gap:8px; }
  .nav-actions .btn{ padding:8px 14px; font-size:.9rem; }
  .navbar{ flex-wrap:wrap; gap:10px; }
  .brand{ font-size:.95rem; }
  .brand img{ width:34px; height:34px; }
  .profile-stats{ grid-template-columns:1fr; }
  .post-media-grid{ grid-template-columns:1fr; }
  .section{ padding:36px 0; }
  .card, .list-item, .form-card{ border-radius:18px; padding:16px; }
  .member-modal-dialog{ width:min(96vw, 720px); }
  .member-tabs{ overflow:auto; }
  .member-tab{ white-space:nowrap; }
  .member-tab-panels{ padding:14px; }
  .member-photo-circle{ width:96px; height:96px; }
  .member-directory-grid{ grid-template-columns:1fr; }
  .member-directory-tools{ width:100%; justify-content:flex-start; }
  .member-directory-search{ width:100%; }
  .member-details-stats{ grid-template-columns:1fr; }
  .member-details-grid{ grid-template-columns:1fr; }
}
@media (max-width: 480px){
  .navbar{ align-items:flex-start; }
  .nav-actions{ width:100%; justify-content:space-between; }
  .nav-actions .btn{ flex:1; }
  .nav-actions .btn + .btn{ margin-inline-start:8px; }
  .section-title{ font-size:1.35rem; }
  .section-sub{ font-size:.95rem; }
  .btn{ padding:9px 16px; }
  .input, .textarea{ padding:10px 12px; }
  .member-modal-dialog{ max-height:88vh; }
}

.footer-file-trigger{\n  position:fixed;\n  bottom:90px;\n  right:18px;\n  z-index:1200;\n  display:flex;\n  justify-content:center;\n}\n.footer-file-toggle{\n  border:none;\n  border-radius:999px;\n  padding:12px 18px;\n  font-weight:800;\n  display:flex;\n  align-items:center;\n  gap:8px;\n  background:linear-gradient(180deg,#1d2b6f,#0c4a8a);\n  color:#fff;\n  box-shadow:0 20px 35px rgba(15,23,42,.3);\n  cursor:pointer;\n}\n.footer-file-overlay{\n  position:fixed;\n  inset:0;\n  display:none;\n  align-items:flex-end;\n  justify-content:center;\n  z-index:1300;\n}\n.footer-file-overlay.is-open{\n  display:flex;\n}\n.footer-file-backdrop{\n  position:absolute;\n  inset:0;\n  background:rgba(15,23,42,.45);\n}\n.footer-file-panel{\n  position:relative;\n  width:min(420px, 92vw);\n  max-height:90vh;\n  background:#fff;\n  border-radius:26px 26px 0 0;\n  padding:18px 20px 26px;\n  box-shadow:0 20px 45px rgba(15,23,42,.25);\n  overflow:auto;\n  z-index:2;\n}\n.footer-file-header{\n  display:flex;\n  justify-content:space-between;\n  align-items:center;\n  margin-bottom:12px;\n}\n.footer-file-close{\n  border:none;\n  background:#f3f4ff;\n  border-radius:50%;\n  width:32px;\n  height:32px;\n  font-size:22px;\n  cursor:pointer;\n}\n.footer-file-section{\n  margin-bottom:16px;\n}\n.footer-file-section-title{\n  font-weight:900;\n  margin-bottom:10px;\n}\n.footer-file-actions{\n  display:flex;\n  flex-wrap:wrap;\n  gap:8px;\n}\n.footer-file-action{\n  flex:1;\n  min-width:120px;\n  padding:10px 14px;\n  border-radius:14px;\n  border:1px solid rgba(13,27,63,.1);\n  background:#f8f9ff;\n  font-weight:700;\n  text-transform:none;\n  cursor:pointer;\n  color:#0f1e42;\n}\n.footer-file-action:hover{\n  border-color:#1d2b6f;\n}\n.footer-file-social-links{\n  display:flex;\n  gap:8px;\n}\n.footer-file-social-links a{\n  flex:1;\n  padding:8px;\n  border-radius:12px;\n  background:#f3f4ff;\n  text-align:center;\n  font-weight:700;\n}\n

.footer-file-btn{
  border:none;
  padding:0;
  background:transparent;
  text-align:center;
  color:inherit;
}
.footer-file-overlay{display:none;}
.footer-file-overlay.is-open{display:flex;}


.footer-file-overlay{position:fixed;inset:0;display:none;align-items:flex-end;justify-content:center;z-index:1500;}
.footer-file-overlay.is-open{display:flex;}
.footer-file-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.45);}
.footer-file-panel{position:relative;width:min(420px,92vw);max-height:90vh;background:#fff;border-radius:26px 26px 0 0;padding:18px;box-shadow:0 12px 30px rgba(15,23,42,.25);overflow:auto;}
.footer-file-section{margin-bottom:16px;}
.footer-file-section-title{font-weight:900;margin-bottom:8px;}
.footer-file-actions{display:flex;flex-wrap:wrap;gap:8px;}
.footer-file-action{flex:1;min-width:120px;padding:10px 14px;border-radius:14px;border:1px solid rgba(13,27,63,.1);background:#f8f9ff;font-weight:700;color:#0f1e42;text-transform:none;}
.footer-file-social-links{display:flex;gap:8px;}
.footer-file-social-links a{flex:1;padding:10px 0;border-radius:12px;background:#f3f4ff;text-align:center;font-weight:700;}
.footer-file-close{border:none;background:#f3f4ff;border-radius:50%;width:32px;height:32px;font-size:20px;cursor:pointer;}

.footer-file-overlay {
  align-items:flex-end;
  justify-content:center;
}

.footer-file-panel{
  position:relative;
  width:min(420px, 92vw);
  max-height:90vh;
  background:#fff;
  border-radius:26px 26px 0 0;
  padding:18px 20px 26px;
  box-shadow:0 20px 45px rgba(15,23,42,.25);
  overflow:auto;
  z-index:2;
}

@media (min-width: 900px){
  .footer-file-overlay{
    align-items:stretch;
    justify-content:flex-end;
    padding:0;
  }
  .footer-file-panel{
    width:360px;
    max-height:100vh;
    height:100vh;
    border-radius:0;
    box-shadow:-18px 0 45px rgba(15,23,42,.25);
    padding:26px;
  }
}

.footer-card{
  border-radius:22px;
  border:1px solid #eff2ff;
  background:#fff;
  box-shadow:0 10px 30px rgba(15,23,42,.08);
  margin-bottom:16px;
  overflow:hidden;
}

@media (min-width: 900px){
  .footer-file-overlay{
    align-items:center;
    padding:32px;
  }
  .footer-file-panel{
    width:min(520px, 70vw);
    max-height:80vh;
    border-radius:24px;
  }
}
.footer-file-overlay-center{
  align-items:center;
}
.footer-card-head{
  padding:16px;
  border-bottom:1px solid #f3f5ff;
  font-weight:900;
  display:flex;
  justify-content:space-between;
  align-items:center;
}
.footer-card-body{
  padding:0 16px 16px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.footer-card-item{
  width:100%;
  border:none;
  border-radius:14px;
  padding:12px 16px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  background:#f8f9ff;
  font-weight:800;
  cursor:pointer;
}
.footer-card-line{
  width:100%;
  border:none;
  background:transparent;
  padding:10px 0;
  display:flex;
  justify-content:space-between;
  font-weight:700;
  color:#0f1e42;
  border-bottom:1px solid #f3f4ff;
  cursor:pointer;
}
.footer-card-line:last-child{ border-bottom:none; }
.footer-card-icon,.footer-card-dot{
  width:32px;
  height:32px;
  border-radius:12px;
  background:#eef2ff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
}
.footer-card-action{
  display:block;
  width:100%;
  text-align:center;
  border-radius:14px;
  padding:12px;
  background:linear-gradient(180deg,#1d2b6f,#4c1d95);
  color:#fff;
  font-weight:700;
}
.footer-card-social .footer-file-social-links a{
  justify-content:center;
}

.mobile-profile-page{padding:60px 0;background:#f5f7ff;min-height:100vh;}
.mobile-profile-shell{max-width:420px;margin:0 auto;padding:0 16px 60px;}
.mobile-profile-card{border-radius:24px;background:#fff;padding-bottom:16px;margin-bottom:18px;box-shadow:0 20px 40px rgba(15,23,42,.1);}
.mobile-profile-card header{display:flex;justify-content:space-between;align-items:center;padding:18px 16px 8px;font-weight:900;}
.mobile-profile-body{display:flex;flex-direction:column;gap:8px;padding:0 16px 16px;}
.mobile-profile-action,.mobile-profile-link{border:none;background:#f5f7ff;border-radius:16px;padding:12px 14px;display:flex;justify-content:space-between;align-items:center;font-weight:800;cursor:pointer;transition:background .2s ease;}
.mobile-profile-action:hover,.mobile-profile-link:hover{background:#eef2ff;}
.mobile-profile-tag{width:32px;height:32px;border-radius:12px;background:#e9e8ff;display:flex;align-items:center;justify-content:center;font-weight:800;color:#4c1d95;}
.mobile-profile-cta{display:block;margin:8px 0 0;border-radius:18px;padding:14px 0;text-align:center;background:linear-gradient(180deg,#1d1d5f,#5121b0);color:#fff;font-size:1rem;font-weight:700;text-decoration:none;}
.mobile-profile-social a{flex:1;padding:12px 0;border-radius:14px;text-align:center;background:#f3f4ff;font-weight:700;color:#1d1d5f;}


.mobile-social-card {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  background:#fff;
  border-radius:18px;
  padding:12px 18px;
  border:1px solid var(--border);
  box-shadow:var(--shadow-soft);
  margin:0 16px 0;
}
.mobile-social-icons{
  display:flex;
  gap:10px;
}
.mobile-social-btn{
  width:44px;
  height:44px;
  border-radius:14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-weight:700;
  text-decoration:none;
  box-shadow:0 15px 30px rgba(15,23,42,.15);
  transition:transform .2s ease;
}
.mobile-social-btn:hover{
  transform:translateY(-2px);
}
.mobile-social-btn span{
  font-size:0.9rem;
}
.mobile-social-btn--whatsapp{background:#25d366;}
.mobile-social-btn--instagram{background:linear-gradient(145deg,#f09433,#e6683c 40%,#cc2d7a 80%,#5b1e8d);}
.mobile-social-btn--facebook{background:#1d64d3;}
.mobile-social-label{
  flex:1;
  text-align:right;
  font-weight:800;
  color:var(--ink);
  font-size:1rem;
  white-space:nowrap;
}

.mobile-language-panel{
  position:relative;
  width:100%;
}
.mobile-language-trigger{
  width:100%;
}
.mobile-language-options{
  position:absolute;
  inset:auto 12px 0;
  right:0;
  left:0;
  margin-top:6px;
  background:#fff;
  border-radius:18px;
  border:1px solid var(--border);
  box-shadow:0 18px 34px rgba(15,23,42,.15);
  display:none;
  flex-direction:column;
  overflow:hidden;
  z-index:40;
}
.mobile-language-options.is-open{
  display:flex;
}
.mobile-language-option{
  padding:12px 18px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-weight:800;
  text-decoration:none;
  color:var(--ink);
  transition:background .2s ease;
}
.mobile-language-option:hover{
  background:#f5f7ff;
}
.mobile-language-option.is-active{
  background:#eef3ff;
}
.mobile-language-check{
  color:#1d2b6f;
}


.mobile-profile-link{width:100%;text-decoration:none;color:#0f1e42;}
.mobile-profile-link span:last-child{font-weight:900;}


@media (max-width: 900px) {
  .section {
    padding: 18px 16px;
  }
  .grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
  .card {
    padding: 16px;
  }
  .meta-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .meta-row span {
    width: 100%;
  }
  .split {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }
  .mh-panel,
  .panel {
    padding: 16px;
  }
  .notifications-list .list-item {
    padding: 16px;
  }
  .notifications-list .list-item-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .notifications-list .list-item-actions,
  .notifications-list .list-item-actions .btn {
    width: 100%;
  }
  .app-bottom-nav {
    padding-bottom: 18px;
  }
}
.footer-file-overlay{
  background:rgba(14,17,39,.45);
  backdrop-filter:blur(3px);
  -webkit-backdrop-filter:blur(3px);
}

@media (min-width: 900px){
  .footer-file-overlay{
    align-items:stretch;
    justify-content:flex-end;
    padding:0;
  }
  .footer-file-panel{
    width:min(400px, 45vw);
    max-height:100vh;
    height:100vh;
    border-radius:0;
    padding:28px 24px;
    box-shadow:-18px 0 45px rgba(15,23,42,.25);
  }
}
/* =========================
   Auth / Login page fixes (Mobile-first)
   ضع هذا آخر ملف CSS
   ========================= */

/* امنع التداخل مع شريط التنقل السفلي */
body{
  padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
}

/* قلل الحشو العمودي المبالغ فيه عند صفحات الدخول */
.section{
  padding: 24px 0;
}
@media (max-width: 640px){
  .section{
    padding: 18px 0;
  }
}

/* اجعل الحاوية مناسبة للموبايل */
.container{
  width: min(1100px, 92vw);
}

/* إن كانت عندك صفحة دخول داخل .section/.container */
.form-card{
  width: min(420px, 92vw);
  margin: 0 auto;
  padding: 18px;
  border-radius: 22px;
}

/* العناوين أعلى الفورم */
.section-title{
  text-align: center;
  margin-bottom: 8px;
}
.section-sub{
  text-align: center;
  margin: 0 auto 14px;
  max-width: 520px;
}

/* الحقول والأزرار: Full width */
.field{ margin-bottom: 12px; }
.input, .textarea{
  width: 100%;
  max-width: 100%;
}

/* ✅ إصلاح خطأ عرض حقل كلمة المرور (كان ثابت 300px) */
.password-field .input{
  width: 100% !important;
  padding-right: 44px; /* إذا عندك زر إظهار/إخفاء */
}

/* زر الدخول: يملى عرض الكارد على الموبايل */
.form-card .btn,
.form-card button.btn,
.form-card input[type="submit"].btn{
  width: 100%;
}

/* تذكرني + نسيت كلمة المرور */
.form-card .row,
.form-card .form-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}
.form-card a{
  font-weight: 800;
}

/* تحسين ظل ومرونة الكارد على الموبايل */
@media (max-width: 480px){
  .form-card{
    padding: 16px;
    border-radius: 20px;
  }
  .btn{
    padding: 10px 16px;
  }
}

/* إذا عندك bottom nav ثابت، خلّي المحتوى ما ينضغط */
.app-bottom-nav + .section,
.section.has-bottom-nav{
  padding-bottom: calc(24px + 84px);
}

