/* ══════════════════════════════════════════════════════
   Tamkeen 360 — Public Pages CSS (Landing + Login)
   ══════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --p:       #006C35;
  --p-dark:  #004D25;
  --p-mid:   #009449;
  --p-light: #e6f3eb;
  --accent:  #C8973A;
  --accent2: #e8b84b;
  --bg:      #F2F4F7;
  --card:    #FFFFFF;
  --text:    #1A2332;
  --text2:   #64748B;
  --border:  #E1E7EF;
  --danger:  #EF4444;
  --success: #22C55E;
  --shadow:  0 4px 24px rgba(0,108,53,.10);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.12);
  --r:       16px;
  --r-sm:    10px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Cairo', 'Inter', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}
body.ltr { font-family: 'Inter', sans-serif; direction: ltr; }
body.rtl { font-family: 'Cairo', sans-serif; direction: rtl; }

a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }

/* ════════════════════════════════════
   NAVBAR
   ════════════════════════════════════ */
.pub-nav {
  position: fixed; top: 0; inset-inline: 0; z-index: 1000;
  height: 68px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 48px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,108,53,.08);
  box-shadow: 0 2px 20px rgba(0,0,0,.04);
  transition: all .3s;
}
.pub-nav.scrolled {
  box-shadow: 0 4px 30px rgba(0,0,0,.08);
}
.nav-brand {
  display: flex; align-items: center; gap: 12px;
}
.nav-logo {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(135deg, var(--p-dark), var(--p-mid));
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--accent); font-weight: 900; flex-shrink: 0;
}
.nav-title { font-weight: 900; font-size: 18px; color: var(--p-dark); line-height: 1.1; }
.nav-sub   { font-size: 10px; color: var(--text2); font-weight: 400; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-btn {
  padding: 9px 22px; border-radius: 30px; font-size: 13px; font-weight: 700;
  cursor: pointer; border: none; font-family: inherit; transition: all .2s;
  display: inline-flex; align-items: center; gap: 6px;
}
.nav-btn-outline {
  background: transparent; border: 1.5px solid var(--p);
  color: var(--p);
}
.nav-btn-outline:hover { background: var(--p-light); }
.nav-btn-primary {
  background: var(--p); color: #fff;
  box-shadow: 0 4px 14px rgba(0,108,53,.3);
}
.nav-btn-primary:hover { background: var(--p-dark); transform: translateY(-1px); }
.lang-toggle {
  background: var(--p-light); border: none; color: var(--p);
  font-weight: 800; font-size: 12px; padding: 7px 16px;
  border-radius: 20px; cursor: pointer; font-family: inherit;
  transition: all .2s;
}
.lang-toggle:hover { background: var(--p); color: #fff; }

/* ════════════════════════════════════
   HERO
   ════════════════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  background: linear-gradient(150deg, #003d1f 0%, #006C35 45%, #00894a 80%, #00b85e 100%);
  position: relative;
  overflow: hidden;
  padding-top: 68px;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 30% 50%, rgba(200,151,58,.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 70% 20%, rgba(255,255,255,.05) 0%, transparent 50%);
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-content {
  position: relative; z-index: 2;
  max-width: 1280px; margin: 0 auto; padding: 80px 48px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px;
  align-items: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(200,151,58,.2); border: 1px solid rgba(200,151,58,.4);
  color: var(--accent2); padding: 6px 16px; border-radius: 30px;
  font-size: 12px; font-weight: 700; margin-bottom: 22px;
  backdrop-filter: blur(10px);
}
.hero-badge i { font-size: 13px; }
.hero-title {
  font-size: 52px; font-weight: 900; color: #fff;
  line-height: 1.15; margin-bottom: 20px;
}
.hero-title span {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc {
  font-size: 17px; color: rgba(255,255,255,.8);
  line-height: 1.7; margin-bottom: 36px; max-width: 520px;
}
.hero-actions {
  display: flex; gap: 14px; flex-wrap: wrap;
}
.hero-btn {
  padding: 14px 32px; border-radius: 30px; font-size: 15px; font-weight: 800;
  cursor: pointer; border: none; font-family: inherit;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all .25s;
}
.hero-btn-primary {
  background: var(--accent); color: var(--p-dark);
  box-shadow: 0 8px 30px rgba(200,151,58,.4);
}
.hero-btn-primary:hover {
  background: var(--accent2); transform: translateY(-3px);
  box-shadow: 0 14px 40px rgba(200,151,58,.5);
}
.hero-btn-outline {
  background: rgba(255,255,255,.1); color: #fff;
  border: 1.5px solid rgba(255,255,255,.3);
  backdrop-filter: blur(10px);
}
.hero-btn-outline:hover { background: rgba(255,255,255,.2); transform: translateY(-2px); }

/* Hero Stats */
.hero-stats {
  display: flex; gap: 28px; margin-top: 44px; flex-wrap: wrap;
}
.hstat {
  display: flex; flex-direction: column;
  border-right: 1.5px solid rgba(255,255,255,.15);
  padding-right: 28px;
}
body.ltr .hstat { border-right: none; border-left: 1.5px solid rgba(255,255,255,.15); padding-right: 0; padding-left: 28px; }
.hstat:last-child { border: none; padding: 0; }
.hstat-val { font-size: 30px; font-weight: 900; color: #fff; line-height: 1; }
.hstat-lbl { font-size: 12px; color: rgba(255,255,255,.6); margin-top: 4px; }

/* Hero Visual */
.hero-visual {
  display: flex; justify-content: center; align-items: center;
  position: relative;
}
.dashboard-preview {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 20px;
  padding: 20px;
  backdrop-filter: blur(20px);
  width: 100%; max-width: 480px;
  box-shadow: 0 30px 80px rgba(0,0,0,.3);
  animation: floatAnim 4s ease-in-out infinite;
}
@keyframes floatAnim {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}
.dp-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 16px; padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.dp-dots { display: flex; gap: 5px; }
.dp-dot { width: 10px; height: 10px; border-radius: 50%; }
.dp-title { color: rgba(255,255,255,.8); font-size: 13px; font-weight: 700; margin-right: auto; }
body.ltr .dp-title { margin-right: 0; margin-left: auto; }
.dp-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.dp-kpi {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px; padding: 12px;
}
.dp-kpi-label { font-size: 10px; color: rgba(255,255,255,.5); margin-bottom: 4px; }
.dp-kpi-val { font-size: 22px; font-weight: 900; color: #fff; line-height: 1; }
.dp-kpi-trend { font-size: 10px; color: #4ade80; margin-top: 3px; }
.dp-chart { height: 70px; display: flex; align-items: flex-end; gap: 6px; padding: 4px 0; }
.dp-bar {
  flex: 1; border-radius: 4px 4px 0 0;
  background: rgba(255,255,255,.25);
  transition: height .5s ease;
}
.dp-bar.hi { background: var(--accent); }

/* Floating badges */
.float-badge {
  position: absolute;
  background: #fff; border-radius: 12px; padding: 10px 14px;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; color: var(--text);
  animation: floatAnim 5s ease-in-out infinite;
  white-space: nowrap;
}
.float-badge.fb-1 { top: 10%; right: -10%; animation-delay: -1s; }
.float-badge.fb-2 { bottom: 20%; left: -8%; animation-delay: -2.5s; }
body.ltr .float-badge.fb-1 { right: auto; left: -10%; }
body.ltr .float-badge.fb-2 { left: auto; right: -8%; }
.fb-icon { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; }

/* ════════════════════════════════════
   FEATURES
   ════════════════════════════════════ */
.features-section {
  padding: 100px 48px;
  background: #fff;
}
.section-header {
  text-align: center; max-width: 600px; margin: 0 auto 60px;
}
.section-tag {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--p-light); color: var(--p);
  padding: 6px 16px; border-radius: 30px; font-size: 12px; font-weight: 800;
  margin-bottom: 16px;
}
.section-title {
  font-size: 38px; font-weight: 900; color: var(--text);
  line-height: 1.2; margin-bottom: 14px;
}
.section-title span { color: var(--p); }
.section-desc { font-size: 16px; color: var(--text2); line-height: 1.7; }

.features-grid {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}
.feature-card {
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: 20px; padding: 32px 28px;
  transition: all .3s; cursor: pointer; position: relative; overflow: hidden;
}
.feature-card::before {
  content: ''; position: absolute; top: 0; inset-inline-start: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--p), var(--p-mid));
  transform: scaleX(0); transition: transform .3s; transform-origin: left;
}
body.rtl .feature-card::before { transform-origin: right; }
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--p-light); }
.feature-card:hover::before { transform: scaleX(1); }
.feature-icon {
  width: 56px; height: 56px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin-bottom: 20px;
  background: linear-gradient(135deg, var(--p-light), #b6dfc8);
  color: var(--p);
}
.feature-title { font-size: 18px; font-weight: 800; color: var(--text); margin-bottom: 10px; }
.feature-desc  { font-size: 14px; color: var(--text2); line-height: 1.7; }
.feature-link  {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--p); font-size: 13px; font-weight: 700; margin-top: 16px;
  transition: gap .2s;
}
.feature-link:hover { gap: 10px; }

/* ════════════════════════════════════
   ROLES / HOW IT WORKS
   ════════════════════════════════════ */
.roles-section {
  padding: 100px 48px;
  background: linear-gradient(180deg, var(--bg) 0%, #fff 100%);
}
.roles-inner { max-width: 1280px; margin: 0 auto; }
.roles-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; }
.role-card {
  background: var(--card); border: 1.5px solid var(--border);
  border-radius: 20px; padding: 36px 28px;
  text-align: center; transition: all .3s; position: relative; overflow: hidden;
}
.role-card.featured {
  background: linear-gradient(145deg, var(--p-dark), var(--p));
  border-color: var(--p);
  color: #fff;
}
.role-card:not(.featured):hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.role-card.featured::after {
  content: ''; position: absolute; top: -40px; right: -40px;
  width: 120px; height: 120px; border-radius: 50%;
  background: rgba(255,255,255,.06);
}
.role-icon {
  width: 70px; height: 70px; border-radius: 20px; margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center; font-size: 30px;
}
.role-icon.admin-icon { background: var(--p-light); color: var(--p); }
.role-icon.manager-icon { background: rgba(255,255,255,.15); color: var(--accent); }
.role-icon.user-icon { background: #FEF3C7; color: #B45309; }
.role-title { font-size: 20px; font-weight: 900; margin-bottom: 10px; }
.role-card.featured .role-title { color: #fff; }
.role-desc { font-size: 14px; line-height: 1.7; margin-bottom: 24px; }
.role-card:not(.featured) .role-desc { color: var(--text2); }
.role-card.featured .role-desc { color: rgba(255,255,255,.75); }
.role-features { list-style: none; text-align: start; }
.role-features li {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; padding: 5px 0; font-weight: 600;
}
.role-card:not(.featured) .role-features li { color: var(--text); }
.role-card.featured .role-features li { color: rgba(255,255,255,.9); }
.role-features li i { font-size: 11px; width: 18px; text-align: center; }
.role-card:not(.featured) .role-features li i { color: var(--success); }
.role-card.featured .role-features li i { color: var(--accent2); }
.role-btn {
  margin-top: 28px; width: 100%; padding: 12px 20px;
  border-radius: 30px; font-size: 14px; font-weight: 800;
  cursor: pointer; border: none; font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all .2s; text-decoration: none;
}
.role-btn-primary { background: var(--p); color: #fff; }
.role-btn-primary:hover { background: var(--p-dark); transform: translateY(-2px); }
.role-btn-accent { background: var(--accent); color: var(--p-dark); }
.role-btn-accent:hover { background: var(--accent2); transform: translateY(-2px); }
.role-btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text); }
.role-btn-outline:hover { border-color: var(--p); color: var(--p); }

/* ════════════════════════════════════
   STATS SECTION
   ════════════════════════════════════ */
.stats-section {
  padding: 80px 48px;
  background: linear-gradient(135deg, var(--p-dark), var(--p));
  position: relative; overflow: hidden;
}
.stats-section::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 80% at 50% 50%, rgba(200,151,58,.15) 0%, transparent 70%);
}
.stats-inner {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0; position: relative; z-index: 1;
}
.stat-item {
  text-align: center; padding: 20px;
  border-right: 1px solid rgba(255,255,255,.1);
}
body.rtl .stat-item { border-right: none; border-left: 1px solid rgba(255,255,255,.1); }
.stat-item:last-child { border: none; }
.stat-num { font-size: 46px; font-weight: 900; color: #fff; line-height: 1; }
.stat-num span { color: var(--accent2); }
.stat-label { font-size: 14px; color: rgba(255,255,255,.65); margin-top: 8px; font-weight: 500; }

/* ════════════════════════════════════
   CTA SECTION
   ════════════════════════════════════ */
.cta-section {
  padding: 100px 48px;
  background: #fff;
  text-align: center;
}
.cta-inner { max-width: 700px; margin: 0 auto; }
.cta-title { font-size: 40px; font-weight: 900; margin-bottom: 16px; }
.cta-title span { color: var(--p); }
.cta-desc { font-size: 16px; color: var(--text2); line-height: 1.7; margin-bottom: 36px; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.cta-btn {
  padding: 16px 40px; border-radius: 30px; font-size: 16px; font-weight: 800;
  cursor: pointer; border: none; font-family: inherit;
  display: inline-flex; align-items: center; gap: 9px;
  transition: all .25s;
}
.cta-btn-primary {
  background: var(--p); color: #fff;
  box-shadow: 0 8px 30px rgba(0,108,53,.3);
}
.cta-btn-primary:hover { background: var(--p-dark); transform: translateY(-3px); box-shadow: 0 14px 40px rgba(0,108,53,.4); }
.cta-btn-secondary {
  background: var(--bg); color: var(--text);
  border: 1.5px solid var(--border);
}
.cta-btn-secondary:hover { border-color: var(--p); color: var(--p); }

/* ════════════════════════════════════
   FOOTER
   ════════════════════════════════════ */
.pub-footer {
  background: var(--p-dark); color: rgba(255,255,255,.75);
  padding: 50px 48px 28px;
}
.footer-inner {
  max-width: 1280px; margin: 0 auto;
}
.footer-top {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px; margin-bottom: 40px;
}
.footer-brand { display: flex; flex-direction: column; gap: 12px; }
.footer-logo { display: flex; align-items: center; gap: 10px; }
.footer-logo-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--p-mid), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #fff; font-weight: 900;
}
.footer-logo-text { font-size: 16px; font-weight: 900; color: #fff; }
.footer-tagline { font-size: 13px; line-height: 1.7; max-width: 260px; }
.footer-col-title { font-size: 13px; font-weight: 800; color: #fff; margin-bottom: 16px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 13px; color: rgba(255,255,255,.65); transition: color .2s; }
.footer-links a:hover { color: var(--accent2); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 24px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.footer-copy { font-size: 12px; }
.footer-links-inline { display: flex; gap: 20px; }
.footer-links-inline a { font-size: 12px; color: rgba(255,255,255,.5); transition: color .2s; }
.footer-links-inline a:hover { color: rgba(255,255,255,.9); }

/* ════════════════════════════════════
   LOGIN PAGE
   ════════════════════════════════════ */
.login-page {
  min-height: 100vh;
  display: grid; grid-template-columns: 1fr 1fr;
}

/* Left panel — branding */
.login-panel-left {
  background: linear-gradient(150deg, #003d1f 0%, #006C35 50%, #009449 100%);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 50px; position: relative; overflow: hidden;
}
.login-panel-left::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 20% 30%, rgba(200,151,58,.18) 0%, transparent 60%),
    radial-gradient(ellipse 50% 70% at 80% 70%, rgba(255,255,255,.05) 0%, transparent 50%);
}
.login-panel-left .hero-grid { opacity: .4; }
.lp-brand {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 12px;
}
.lp-logo {
  width: 48px; height: 48px; border-radius: 14px;
  background: rgba(200,151,58,.25); border: 1px solid rgba(200,151,58,.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--accent2); font-weight: 900;
}
.lp-title { font-size: 20px; font-weight: 900; color: #fff; }
.lp-sub   { font-size: 11px; color: rgba(255,255,255,.6); }
.lp-content { position: relative; z-index: 2; }
.lp-heading { font-size: 42px; font-weight: 900; color: #fff; line-height: 1.2; margin-bottom: 18px; }
.lp-heading span {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.lp-desc { font-size: 15px; color: rgba(255,255,255,.7); line-height: 1.7; margin-bottom: 36px; }
.lp-features { display: flex; flex-direction: column; gap: 14px; }
.lp-feature {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px; padding: 12px 16px;
  backdrop-filter: blur(10px);
}
.lp-feature-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(200,151,58,.2); color: var(--accent2);
  display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0;
}
.lp-feature-text strong { display: block; font-size: 13px; color: #fff; }
.lp-feature-text span  { font-size: 11px; color: rgba(255,255,255,.55); }
.lp-footer { position: relative; z-index: 2; }
.lp-stats { display: flex; gap: 28px; }
.lp-stat-val { font-size: 26px; font-weight: 900; color: #fff; line-height: 1; }
.lp-stat-lbl { font-size: 11px; color: rgba(255,255,255,.5); }

/* Right panel — form */
.login-panel-right {
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  padding: 50px 60px;
  position: relative;
}
.login-form-wrap { width: 100%; max-width: 420px; }
.login-header { margin-bottom: 36px; }
.login-lang-row {
  display: flex; justify-content: flex-end; margin-bottom: 28px;
}
.login-title { font-size: 28px; font-weight: 900; color: var(--text); margin-bottom: 6px; }
.login-subtitle { font-size: 14px; color: var(--text2); }

/* Demo accounts pill */
.demo-pills {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 14px 16px; margin-bottom: 28px;
}
.demo-pills-label {
  font-size: 10px; font-weight: 800; color: var(--text2);
  text-transform: uppercase; letter-spacing: .07em; margin-bottom: 10px;
}
.demo-pills-row { display: flex; gap: 8px; flex-wrap: wrap; }
.demo-pill {
  padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 700;
  border: 1.5px solid var(--border); background: var(--card); color: var(--text);
  cursor: pointer; transition: all .2s; display: flex; align-items: center; gap: 6px;
  font-family: inherit;
}
.demo-pill:hover { border-color: var(--p); color: var(--p); background: var(--p-light); }
.demo-pill i { font-size: 11px; }

/* Form elements */
.login-form { display: flex; flex-direction: column; gap: 20px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-size: 13px; font-weight: 700; color: var(--text); }
.field-wrap { position: relative; }
.field-wrap i.field-icon {
  position: absolute; top: 50%; transform: translateY(-50%);
  inset-inline-start: 14px; color: var(--text2); font-size: 15px;
  pointer-events: none;
}
.field-wrap input {
  width: 100%; padding: 13px 14px 13px 42px;
  border: 1.5px solid var(--border); border-radius: var(--r-sm);
  font-size: 14px; font-family: inherit; color: var(--text);
  background: var(--bg); outline: none; transition: all .2s;
}
body.rtl .field-wrap input { padding: 13px 42px 13px 14px; }
.field-wrap input:focus { border-color: var(--p); background: #fff; box-shadow: 0 0 0 3px var(--p-light); }
.field-wrap input.error { border-color: var(--danger); }
.eye-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  inset-inline-end: 14px; background: none; border: none;
  color: var(--text2); cursor: pointer; font-size: 15px; padding: 4px;
}

.form-options {
  display: flex; align-items: center; justify-content: space-between;
}
.checkbox-wrap { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.checkbox-wrap input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--p); cursor: pointer; }
.checkbox-wrap span { font-size: 13px; color: var(--text); }
.forgot-link { font-size: 13px; color: var(--p); font-weight: 700; }
.forgot-link:hover { color: var(--p-dark); }

.error-msg {
  background: #FFF5F5; border: 1px solid #FECACA; color: #991B1B;
  border-radius: var(--r-sm); padding: 12px 16px;
  font-size: 13px; display: flex; align-items: center; gap: 8px;
  display: none;
}
.error-msg.show { display: flex; }

.submit-btn {
  width: 100%; padding: 15px 20px;
  background: var(--p); color: #fff;
  border: none; border-radius: var(--r-sm);
  font-size: 15px; font-weight: 800; font-family: inherit;
  cursor: pointer; transition: all .25s;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  box-shadow: 0 6px 20px rgba(0,108,53,.3);
}
.submit-btn:hover { background: var(--p-dark); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,108,53,.4); }
.submit-btn:disabled { opacity: .7; cursor: not-allowed; transform: none; }
.submit-btn .spinner {
  width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.4);
  border-top-color: #fff; border-radius: 50%;
  animation: spin .7s linear infinite; display: none;
}
.submit-btn.loading .spinner { display: block; }
.submit-btn.loading .btn-text { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* MFA Step */
.mfa-step { display: none; }
.mfa-step.show { display: block; }
.login-step { display: block; }
.login-step.hide { display: none; }

.mfa-title { font-size: 20px; font-weight: 900; color: var(--text); margin-bottom: 8px; }
.mfa-desc  { font-size: 14px; color: var(--text2); margin-bottom: 28px; }
.mfa-code-row {
  display: flex; gap: 10px; margin-bottom: 24px; justify-content: center;
}
.mfa-digit {
  width: 54px; height: 60px;
  border: 2px solid var(--border); border-radius: 12px;
  text-align: center; font-size: 24px; font-weight: 900;
  color: var(--text); background: var(--bg); font-family: inherit;
  outline: none; transition: all .2s;
}
.mfa-digit:focus { border-color: var(--p); background: #fff; box-shadow: 0 0 0 3px var(--p-light); }
.mfa-back { background: none; border: none; color: var(--p); font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; }
.mfa-resend { font-size: 13px; color: var(--text2); margin-top: 12px; text-align: center; }
.mfa-resend a { color: var(--p); font-weight: 700; }

.login-divider {
  display: flex; align-items: center; gap: 12px;
  font-size: 12px; color: var(--text2);
}
.login-divider::before, .login-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.login-register {
  text-align: center; font-size: 14px; color: var(--text2);
  margin-top: 8px;
}
.login-register a { color: var(--p); font-weight: 700; }

/* ════════════════════════════════════
   PORTAL PAGE
   ════════════════════════════════════ */
.portal-page { min-height: 100vh; background: var(--bg); }
.portal-header {
  background: linear-gradient(135deg, var(--p-dark), var(--p));
  padding: 0 40px;
  height: 68px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 4px 20px rgba(0,0,0,.15);
}
.portal-brand { display: flex; align-items: center; gap: 12px; }
.portal-brand-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: rgba(200,151,58,.2); border: 1px solid rgba(200,151,58,.35);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; color: var(--accent2);
}
.portal-brand-name { font-size: 16px; font-weight: 900; color: #fff; }
.portal-brand-sub  { font-size: 10px; color: rgba(255,255,255,.6); }
.portal-nav { display: flex; align-items: center; gap: 24px; }
.portal-nav-link {
  color: rgba(255,255,255,.75); font-size: 13px; font-weight: 700;
  transition: color .2s; display: flex; align-items: center; gap: 6px;
}
.portal-nav-link:hover { color: var(--accent2); }
.portal-user {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
}
.portal-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(200,151,58,.25); border: 2px solid rgba(200,151,58,.4);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 14px; color: var(--accent2);
}
.portal-user-name { font-size: 13px; font-weight: 700; color: #fff; }
.portal-user-role { font-size: 11px; color: rgba(255,255,255,.55); }
.portal-logout-btn {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  color: #fff; padding: 7px 16px; border-radius: 20px; font-size: 12px;
  font-weight: 700; cursor: pointer; font-family: inherit; transition: all .2s;
  display: flex; align-items: center; gap: 6px;
}
.portal-logout-btn:hover { background: rgba(255,255,255,.2); }

.portal-hero {
  background: linear-gradient(135deg, var(--p-dark) 0%, var(--p) 100%);
  padding: 50px 40px;
  position: relative; overflow: hidden;
}
.portal-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 40px 40px;
}
.portal-hero-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 30px;
  flex-wrap: wrap; position: relative; z-index: 1;
}
.portal-welcome h1 { font-size: 32px; font-weight: 900; color: #fff; margin-bottom: 6px; }
.portal-welcome p  { font-size: 15px; color: rgba(255,255,255,.7); }
.portal-id-card {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15);
  border-radius: 16px; padding: 18px 24px;
  backdrop-filter: blur(10px);
  display: flex; gap: 20px; align-items: center;
}
.portal-id-avatar {
  width: 60px; height: 60px; border-radius: 16px;
  background: var(--accent); color: var(--p-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 900;
}
.portal-id-name { font-size: 16px; font-weight: 900; color: #fff; margin-bottom: 4px; }
.portal-id-num  { font-size: 12px; color: rgba(255,255,255,.6); }
.portal-id-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(34,197,94,.2); border: 1px solid rgba(34,197,94,.3);
  color: #4ade80; padding: 4px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700; margin-top: 6px;
}

.portal-content { max-width: 1100px; margin: 0 auto; padding: 36px 40px; }
.portal-quick-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 32px;
}
.portal-quick-card {
  background: var(--card); border: 1.5px solid var(--border);
  border-radius: 16px; padding: 22px 20px;
  display: flex; align-items: center; gap: 14px;
  cursor: pointer; transition: all .25s; text-decoration: none; color: inherit;
}
.portal-quick-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--p-light); }
.portal-quick-icon {
  width: 48px; height: 48px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0;
}
.portal-quick-val { font-size: 24px; font-weight: 900; color: var(--text); }
.portal-quick-lbl { font-size: 12px; color: var(--text2); font-weight: 600; }

.portal-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.portal-card {
  background: var(--card); border: 1.5px solid var(--border);
  border-radius: 16px; padding: 24px; margin-bottom: 24px;
}
.portal-card-title {
  font-size: 15px; font-weight: 800; color: var(--text);
  padding-bottom: 16px; border-bottom: 1px solid var(--border);
  margin-bottom: 18px; display: flex; align-items: center;
  justify-content: space-between; gap: 10px;
}
.portal-card-title i { color: var(--p); margin-inline-end: 8px; }

/* ════════════════════════════════════
   RESPONSIVE & PWA MOBILE-FIRST
   ════════════════════════════════════ */
@media (max-width: 1100px) {
  .features-grid { grid-template-columns: 1fr 1fr; }
  .roles-grid    { grid-template-columns: 1fr 1fr; }
  .footer-top    { grid-template-columns: 1fr 1fr; }
  .portal-quick-grid { grid-template-columns: 1fr 1fr; }
  .portal-grid   { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .hero-content  { grid-template-columns: 1fr; text-align: center; }
  .hero-visual   { display: none; }
  .hero-stats    { justify-content: center; }
  .hero-actions  { justify-content: center; }
  .login-page    { grid-template-columns: 1fr; }
  .login-panel-left { display: none; }
  .login-panel-right { padding: 40px 24px; }
  .stats-inner   { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  /* Portal Header Mobilization */
  .portal-header {
    padding: 0 16px;
    height: 60px;
  }
  .portal-brand-sub {
    display: none;
  }
  .portal-user-name, .portal-user-role {
    display: none;
  }
  .portal-avatar {
    margin: 0;
  }
  .portal-logout-btn span {
    display: none; /* Icon-only on mobile */
  }
  .portal-logout-btn {
    padding: 8px 10px;
    border-radius: 50%;
  }
}

@media (max-width: 640px) {
  /* Public Navbar Mobilization */
  .pub-nav {
    padding: 0 16px;
    height: 60px;
  }
  .nav-brand .nav-sub {
    display: none;
  }
  #nav-demo-btn {
    display: none; /* Hide secondary demo call-to-action on tiny navbar */
  }
  .nav-btn {
    padding: 8px 16px;
    font-size: 12px;
  }
  
  /* Hero Content */
  .hero-content {
    padding: 40px 16px;
  }
  .hero-title {
    font-size: 30px;
  }
  .hero-desc {
    font-size: 15px;
  }
  .hero-stats {
    gap: 16px;
  }
  .hstat {
    padding-right: 16px;
  }
  body.ltr .hstat {
    padding-left: 16px;
  }

  /* Grid details */
  .features-section, .roles-section, .cta-section {
    padding: 50px 16px;
  }
  .section-title {
    font-size: 24px;
  }
  .features-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .roles-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  /* Portal Bottom Navigation Bar */
  .portal-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1.5px solid var(--border);
    height: 64px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 999;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
    padding: 0;
  }
  .portal-nav-link {
    flex-direction: column;
    gap: 4px;
    color: var(--text2) !important;
    font-size: 11px;
    font-weight: 700;
  }
  .portal-nav-link i {
    font-size: 18px;
    color: var(--text2);
  }
  .portal-nav-link:hover, .portal-nav-link:active {
    color: var(--p) !important;
  }
  .portal-nav-link:hover i, .portal-nav-link:active i {
    color: var(--p);
  }
  .portal-page {
    padding-bottom: 74px; /* Avoid overlaying content behind bottom navigation */
  }

  /* Layout tweaks */
  .portal-hero {
    padding: 30px 16px;
  }
  .portal-welcome h1 {
    font-size: 24px;
  }
  .portal-id-card {
    width: 100%;
    padding: 14px;
  }
  .portal-content {
    padding: 20px 16px;
  }
  .portal-quick-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .portal-quick-card {
    padding: 14px;
  }
  .portal-card {
    padding: 16px;
  }
  .p-table th, .p-table td {
    padding: 10px 8px;
    font-size: 12px;
  }
  
  /* Demo pill optimizations */
  #demo-creds-grid {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }
  
  /* Footer */
  .pub-footer {
    padding: 40px 16px 80px; /* Padding bottom for public mobile */
  }
  .footer-top {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  .footer-links-inline {
    justify-content: center;
  }
}
