/* ============================================================
   UNHCR Portal — Unified stylesheet (public + panel + admin)
   RTL/LTR aware via logical properties. Brand: #0072BC
   ============================================================ */
:root {
  --blue: #0072BC;
  --blue-dark: #005A96;
  --blue-deep: #003D66;
  --blue-soft: #E8F3FA;
  --blue-border: #B8D8EE;
  --navy: #10293E;
  --text: #1A2B3C;
  --muted: #5C6F82;
  --line: #E3EAF2;
  --bg: #F5F8FB;
  --white: #FFFFFF;
  --green: #1E9E6A;
  --green-soft: #E3F5ED;
  --amber: #D98E1F;
  --amber-soft: #FCF3E2;
  --red: #D64545;
  --red-soft: #FBE9E9;
  --purple: #7C5CBF;
  --purple-soft: #F0EAF9;
  --teal: #0EA5A5;
  --teal-soft: #E2F5F5;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(16, 41, 62, 0.07), 0 4px 14px rgba(16, 41, 62, 0.05);
  --font: 'Vazirmatn', Vazir, Tahoma, 'Segoe UI', Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-size: 14.5px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }
h1, h2, h3, h4 { font-weight: 800; line-height: 1.4; }
.container { width: min(1180px, 92%); margin-inline: auto; }
.container-fluid { width: 100%; padding-inline: 22px; }
.narrow { max-width: 860px; }
.mt-3 { margin-top: 14px; } .mt-4 { margin-top: 22px; } .mb-3 { margin-bottom: 14px; } .mb-4 { margin-bottom: 22px; }
.muted { color: var(--muted); } .small { font-size: 12.5px; }
.center { text-align: center; }
.mono { font-family: 'Courier New', monospace; letter-spacing: 1px; font-weight: 700; }
.text-danger { color: var(--red) !important; } .text-success { color: var(--green) !important; }
.icon { vertical-align: -4px; }
.link { color: var(--blue); font-weight: 600; }
.flip:dir(rtl), [dir='rtl'] .flip { transform: scaleX(-1); }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 18px; border-radius: var(--radius-sm); border: 1.5px solid transparent;
  font-family: var(--font); font-size: 14px; font-weight: 700; cursor: pointer;
  transition: all 0.18s ease; white-space: nowrap; line-height: 1.5;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); color: #fff; }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: #178a5a; color: #fff; }
.btn-outline { background: #fff; border-color: var(--blue-border); color: var(--blue); }
.btn-outline:hover { background: var(--blue-soft); }
.btn-outline-light { background: transparent; border-color: rgba(255,255,255,0.7); color: #fff; }
.btn-outline-light:hover { background: rgba(255,255,255,0.14); color: #fff; }
.btn-light { background: #fff; color: var(--blue); }
.btn-light:hover { background: var(--blue-soft); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: rgba(16,41,62,0.06); }
.btn-sm { padding: 5px 12px; font-size: 13px; border-radius: 7px; }
.btn-lg { padding: 13px 26px; font-size: 15.5px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-icon { padding: 9px 12px; }
.icon-btn { background: transparent; border: none; cursor: pointer; color: var(--text); padding: 6px; border-radius: 8px; }
.icon-btn:hover { background: rgba(16,41,62,0.07); }
.inline-form { display: inline; }

/* ============ Header (public) ============ */
.public-body { background: var(--white); display: flex; flex-direction: column; min-height: 100vh; }
.public-body main { flex: 1; }
.site-header { position: sticky; top: 0; z-index: 120; background: #fff; border-bottom: 1px solid var(--line); }
.site-header.scrolled { box-shadow: var(--shadow); }
.topbar { background: var(--blue-deep); color: #cfe4f4; font-size: 12.5px; }
.topbar-in { display: flex; align-items: center; gap: 18px; padding: 5px 0; }
.topbar-item { display: inline-flex; align-items: center; gap: 5px; }
.topbar-motto { margin-inline-start: auto; opacity: 0.85; }
.header-in { display: flex; align-items: center; gap: 18px; padding: 12px 0; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand-logo { width: 46px; height: 46px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.35; }
.brand-text strong { font-size: 14.5px; color: var(--blue-dark); }
.brand-text small { font-size: 10.5px; color: var(--muted); }
.main-nav { display: flex; align-items: center; gap: 2px; margin-inline-start: 12px; flex-wrap: wrap; }
.main-nav > a { padding: 8px 11px; border-radius: 8px; color: var(--text); font-weight: 600; font-size: 13.8px; }
.main-nav > a:hover { background: var(--blue-soft); color: var(--blue-dark); }
.main-nav .nav-cta { background: var(--blue); color: #fff; }
.main-nav .nav-cta:hover { background: var(--blue-dark); color: #fff; }
.header-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }
.lang-switch { display: flex; gap: 3px; background: var(--bg); border: 1px solid var(--line); padding: 3px; border-radius: 99px; }
.lang-item { padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; color: var(--muted); }
.lang-item.active { background: var(--blue); color: #fff; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; color: var(--text); }
.avatar-s { width: 30px; height: 30px; border-radius: 50%; background: var(--blue); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; overflow: hidden; }
.avatar-s img { width: 100%; height: 100%; object-fit: cover; }
.avatar-l { width: 74px; height: 74px; border-radius: 50%; background: var(--blue-soft); color: var(--blue-dark); display: inline-flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 800; overflow: hidden; }
.avatar-l img { width: 100%; height: 100%; object-fit: cover; }
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); min-width: 190px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow);
  padding: 6px; display: none; z-index: 130;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 7px; color: var(--text); font-size: 13.5px; }
.dropdown-menu a:hover { background: var(--blue-soft); }
.dropdown-label { display: block; padding: 4px 10px; color: var(--muted); }
.dropdown-end { inset-inline-end: 0; }

/* ============ Hero ============ */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background: linear-gradient(135deg, var(--blue-deep) 0%, var(--blue) 60%, #2E9BDD 100%);
}
.hero-pattern {
  position: absolute; inset: 0; opacity: 0.10;
  background-image: radial-gradient(circle at 20% 30%, #fff 2px, transparent 2.5px), radial-gradient(circle at 70% 65%, #fff 2px, transparent 2.5px);
  background-size: 90px 90px, 130px 130px;
}
.hero-in { position: relative; display: grid; grid-template-columns: 1.35fr 1fr; gap: 30px; padding: 74px 0 58px; }
.hero-eyebrow { display: inline-block; background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.3); padding: 4px 14px; border-radius: 99px; font-size: 12.5px; margin-bottom: 16px; }
.hero h1 { font-size: 34px; margin-bottom: 14px; }
.hero p { font-size: 16px; opacity: 0.92; max-width: 56ch; }
.hero-cta { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.hero-stats { display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.hero-stat { background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.22); backdrop-filter: blur(3px); border-radius: var(--radius); padding: 14px 20px; display: flex; align-items: baseline; gap: 10px; }
.hero-stat strong { font-size: 24px; }
.hero-stat span { font-size: 13px; opacity: 0.9; }

/* ============ Sections ============ */
.section { padding: 54px 0; }
.section-alt { background: var(--bg); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 34px; }
.section-head h2 { font-size: 26px; color: var(--blue-deep); margin-bottom: 8px; }
.section-head p { color: var(--muted); }
.section-head-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; gap: 12px; }
.section-head-row h2 { font-size: 23px; color: var(--blue-deep); }
.grid { display: grid; gap: 18px; }
.grid-2-wrap { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; align-items: start; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3c { grid-template-columns: repeat(3, 1fr); }

/* ============ Cards ============ */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-head h3 { font-size: 16.5px; color: var(--blue-deep); }
.card-title { font-size: 16px; color: var(--blue-deep); margin-bottom: 14px; }
.narrow-card { max-width: 720px; }

.service-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; transition: all 0.2s; box-shadow: var(--shadow); }
.service-card:hover { transform: translateY(-4px); border-color: var(--blue-border); }
.service-icon { width: 54px; height: 54px; border-radius: 14px; background: var(--blue-soft); color: var(--blue); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.service-card h3 { font-size: 16px; margin-bottom: 8px; }
.service-card p { color: var(--muted); font-size: 13.5px; margin-bottom: 12px; }
.service-link { font-weight: 700; font-size: 13.5px; display: inline-flex; align-items: center; gap: 5px; }

.post-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.post-thumb { position: relative; display: block; aspect-ratio: 16/9; overflow: hidden; background: var(--blue-soft); }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.post-card:hover .post-thumb img { transform: scale(1.05); }
.badge-img { position: absolute; top: 12px; inset-inline-start: 12px; }
.post-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-body h3 { font-size: 15.5px; }
.post-body h3 a { color: var(--text); }
.post-body h3 a:hover { color: var(--blue); }
.post-body p { color: var(--muted); font-size: 13.5px; flex: 1; }
.post-date { color: var(--muted); font-size: 12.5px; display: inline-flex; align-items: center; gap: 5px; }
.post-tags { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: 12.5px; }
.post-tags span { display: inline-flex; align-items: center; gap: 4px; }

.progress { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--blue), #2E9BDD); border-radius: 99px; }
.progress-lg { height: 12px; }

.page-hero { background: linear-gradient(120deg, var(--blue-deep), var(--blue)); color: #fff; padding: 46px 0 40px; }
.page-hero h1 { font-size: 28px; margin-bottom: 6px; }
.page-hero p { opacity: 0.9; max-width: 70ch; }
.post-meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; opacity: 0.92; margin-top: 10px; }
.post-meta span { display: inline-flex; align-items: center; gap: 5px; }
.breadcrumbs { font-size: 13px; margin-bottom: 8px; opacity: 0.85; }
.breadcrumbs a { color: #fff; }
.breadcrumbs-light span { margin: 0 6px; opacity: 0.7; }

.post-full { padding: 0; overflow: hidden; }
.post-full-img { width: 100%; max-height: 430px; object-fit: cover; }
.post-content { padding: 26px 28px; font-size: 15px; line-height: 2; }
.project-facts { display: flex; gap: 14px; padding: 20px 28px 0; flex-wrap: wrap; }
.fact { background: var(--blue-soft); border-radius: 10px; padding: 10px 18px; display: flex; flex-direction: column; min-width: 120px; }
.fact span { font-size: 12px; color: var(--muted); }
.fact strong { color: var(--blue-dark); font-size: 17px; }
.post-content .progress { margin: 14px 0; }

.event-list { display: flex; flex-direction: column; gap: 14px; }
.event-list.compact { gap: 10px; }
.event-row { display: flex; align-items: center; gap: 18px; }
.event-row.compact { padding: 12px 16px; box-shadow: none; }
.event-date { background: var(--blue); color: #fff; border-radius: 10px; padding: 12px 16px; text-align: center; min-width: 108px; font-weight: 700; font-size: 13px; }
.event-info { flex: 1; }
.event-info h3, .event-info h4 { font-size: 15.5px; margin-bottom: 3px; }
.event-info p { color: var(--muted); font-size: 13px; }
.event-side h3 { margin-bottom: 14px; color: var(--blue-deep); }

/* ============ Forms ============ */
label { font-weight: 700; font-size: 13px; display: block; margin-bottom: 5px; }
input, select, textarea {
  width: 100%; font-family: var(--font); font-size: 14px; color: var(--text);
  padding: 9px 13px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; transition: border 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,114,188,0.13); }
input.invalid { border-color: var(--red); }
input:disabled { background: var(--bg); color: var(--muted); }
textarea { resize: vertical; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-group { margin-bottom: 14px; }
.form-group-full { grid-column: 1 / -1; }
.form-row-between { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 16px; }
.choice { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.choice input { width: auto; }
.choice-row { display: flex; gap: 18px; flex-wrap: wrap; }
.choice-single { font-weight: 600; }
.file-input small { display: block; margin-top: 4px; }
.face-upload {
  display: flex; align-items: center; gap: 16px; border: 2px dashed var(--blue-border);
  background: var(--blue-soft); padding: 16px; border-radius: var(--radius); cursor: pointer; font-weight: 400;
}
.face-upload:hover { border-color: var(--blue); }
.face-preview { width: 76px; height: 76px; border-radius: 50%; background: #fff; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--muted); flex-shrink: 0; }
.face-preview img { width: 100%; height: 100%; object-fit: cover; }
.face-hint { color: var(--muted); font-size: 12.5px; }
.form-msg.err { color: var(--red); font-size: 12.5px; margin: 8px 0; }
.form-actions { display: flex; gap: 10px; margin-top: 8px; }
.search-form { display: flex; gap: 10px; margin-bottom: 22px; }
.thumb-preview { width: 110px; border-radius: 10px; margin: 6px 0 12px; border: 1px solid var(--line); }

/* ============ Badges & alerts ============ */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 11px; border-radius: 99px; font-size: 12px; font-weight: 700; line-height: 1.7; white-space: nowrap; }
.badge-submitted, .badge-info, .badge-pending { background: var(--blue-soft); color: var(--blue-dark); border: 1px solid var(--blue-border); }
.badge-under_review { background: var(--amber-soft); color: var(--amber); border: 1px solid #F0D9AC; }
.badge-need_info { background: var(--purple-soft); color: var(--purple); border: 1px solid #DCCEF2; }
.badge-approved, .badge-active { background: var(--green-soft); color: var(--green); border: 1px solid #B9E5D0; }
.badge-completed, .badge-ongoing { background: var(--teal-soft); color: var(--teal); border: 1px solid #A8E3E3; }
.badge-rejected, .badge-inactive { background: var(--red-soft); color: var(--red); border: 1px solid #F2C6C6; }
.badge-draft, .badge-closed, .badge-planned, .badge-finished { background: #EEF1F5; color: var(--muted); border: 1px solid var(--line); }
.badge-upcoming { background: var(--blue-soft); color: var(--blue-dark); border: 1px solid var(--blue-border); }
.badge-role-super_admin { background: var(--purple-soft); color: var(--purple); }
.badge-role-admin { background: var(--blue-soft); color: var(--blue-dark); }
.badge-role-editor { background: var(--teal-soft); color: var(--teal); }
.badge-role-moderator { background: var(--amber-soft); color: var(--amber); }
.badge-role-user { background: #EEF1F5; color: var(--muted); }

.alert { display: flex; gap: 9px; align-items: flex-start; padding: 12px 15px; border-radius: 10px; font-size: 13.8px; margin: 12px 0; }
.alert .icon { flex-shrink: 0; margin-top: 3px; }
.alert-danger { background: var(--red-soft); color: #A03030; border: 1px solid #F2C6C6; }
.alert-success { background: var(--green-soft); color: #157248; border: 1px solid #B9E5D0; }
.alert-warning { background: var(--amber-soft); color: #A66A0F; border: 1px solid #F0D9AC; }
.alert-info { background: var(--blue-soft); color: var(--blue-deep); border: 1px solid var(--blue-border); }

/* ============ Flash ============ */
.flash-wrap { position: fixed; top: 18px; inset-inline-end: 18px; z-index: 500; display: flex; flex-direction: column; gap: 10px; max-width: 380px; }
.flash { display: flex; align-items: flex-start; gap: 9px; background: #fff; border-radius: 10px; padding: 12px 14px; box-shadow: 0 6px 24px rgba(16,41,62,0.18); border-inline-start: 4px solid var(--blue); font-size: 13.5px; animation: slideIn 0.25s ease; }
.flash-error { border-inline-start-color: var(--red); }
.flash-success { border-inline-start-color: var(--green); }
.flash-close { background: none; border: none; cursor: pointer; color: var(--muted); font-size: 17px; margin-inline-start: auto; line-height: 1; }
@keyframes slideIn { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ============ Tables ============ */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.8px; }
.table th { text-align: start; color: var(--muted); font-size: 12.3px; font-weight: 700; padding: 10px 12px; border-bottom: 2px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:hover { background: #FAFCFE; }
.table tbody tr:last-child td { border-bottom: none; }
.compact-table th, .compact-table td { padding: 7px 10px; }
.cell-user { display: flex; align-items: center; gap: 9px; }
.cell-user small { display: block; }
.cell-actions { white-space: nowrap; text-align: end; }
.detail-table { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-bottom: 10px; }
.detail-table td { border: 1px solid var(--line); padding: 8px 12px; }
.detail-table td.k { background: var(--bg); font-weight: 700; width: 38%; }

/* ============ Pagination ============ */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.page-link { min-width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--text); font-weight: 700; font-size: 13.5px; }
.page-link.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.page-link:hover:not(.active) { background: var(--blue-soft); }

/* ============ Auth ============ */
.auth-body { background: linear-gradient(140deg, var(--blue-deep) 0%, var(--blue) 55%, #2E9BDD 100%); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 26px 14px; }
.auth-wrap { width: min(470px, 100%); }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 22px; color: #fff; font-size: 16px; }
.auth-brand img { width: 52px; }
.auth-card { background: #fff; border-radius: 16px; padding: 30px 28px; box-shadow: 0 18px 50px rgba(0,20,40,0.35); }
.auth-title { font-size: 20px; color: var(--blue-deep); margin-bottom: 4px; }
.auth-sub { color: var(--muted); font-size: 13.5px; margin-bottom: 20px; }
.auth-alt { text-align: center; margin-top: 16px; font-size: 13.5px; color: var(--muted); }
.auth-foot { text-align: center; color: rgba(255,255,255,0.85); font-size: 12.5px; margin-top: 18px; }

/* ============ Panel & Admin shells ============ */
.panel-body { background: var(--bg); }
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 252px; background: #fff; border-inline-end: 1px solid var(--line);
  position: sticky; top: 0; height: 100vh; overflow-y: auto; flex-shrink: 0; z-index: 200;
  display: flex; flex-direction: column;
}
.side-dark { background: var(--navy); border-inline-end: none; }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 12px; }
.side-dark .brand-text strong { color: #fff; }
.side-dark .brand-text small { color: #9db4c8; }
.side-close { display: none; background: none; border: none; font-size: 22px; cursor: pointer; color: var(--muted); }
.side-nav { padding: 8px 12px 20px; display: flex; flex-direction: column; gap: 3px; }
.side-link {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px;
  color: var(--text); font-weight: 600; font-size: 13.8px; transition: background 0.15s;
}
.side-link:hover { background: var(--blue-soft); color: var(--blue-dark); }
.side-dark .side-link { color: #C7D6E4; }
.side-dark .side-link:hover { background: rgba(255,255,255,0.08); color: #fff; }
.side-link.active { background: var(--blue); color: #fff !important; }
.side-sep { height: 1px; background: var(--line); margin: 10px 4px; }
.side-dark .side-sep { background: rgba(255,255,255,0.12); }
.menu-badge { background: var(--red); color: #fff; border-radius: 99px; font-size: 10.5px; padding: 1px 7px; margin-inline-start: auto; }
.side-overlay { display: none; position: fixed; inset: 0; background: rgba(10,25,40,0.5); z-index: 190; }
.side-overlay.show { display: block; }
.shell-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar-panel {
  display: flex; align-items: center; gap: 14px; background: #fff; border-bottom: 1px solid var(--line);
  padding: 12px 22px; position: sticky; top: 0; z-index: 150;
}
.topbar-title { font-size: 16.5px; color: var(--blue-deep); }
.topbar-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }
.lang-compact .lang-item { padding: 2px 8px; font-size: 11px; }
.breadcrumbs { background: #fff; border-bottom: 1px solid var(--line); padding: 9px 0; margin: 0; opacity: 1; }
.breadcrumbs .container-fluid { color: var(--muted); font-size: 12.8px; }
.breadcrumbs a { color: var(--muted); }
.crumb-sep { margin: 0 7px; opacity: 0.5; }
.shell-content { padding: 22px; flex: 1; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13.5px; margin-bottom: 14px; }

.panel-welcome { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.panel-welcome h2 { font-size: 20px; color: var(--blue-deep); }
.stat-grid { margin-bottom: 20px; }
.stat-card { display: flex; flex-direction: column; gap: 3px; padding: 16px 18px; position: relative; }
.stat-card strong { font-size: 22px; color: var(--blue-deep); }
.stat-card > span:last-child { color: var(--muted); font-size: 12.8px; }
.stat-icon { position: absolute; inset-inline-end: 14px; top: 14px; width: 40px; height: 40px; background: var(--blue-soft); color: var(--blue); border-radius: 11px; display: flex; align-items: center; justify-content: center; }

.page-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.page-toolbar h2 { font-size: 19px; color: var(--blue-deep); }
.toolbar-actions { display: flex; gap: 8px; align-items: center; }
.filter-bar { display: flex; gap: 10px; align-items: end; margin-bottom: 14px; flex-wrap: wrap; }
.filter-item { min-width: 150px; }
.filter-item.grow { flex: 1; min-width: 200px; }
.filter-item label { margin-bottom: 4px; }
.content-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; border-bottom: 2px solid var(--line); padding-bottom: 0; }
.tab-link { padding: 9px 16px; border-radius: 10px 10px 0 0; font-weight: 700; color: var(--muted); font-size: 13.8px; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tab-link.active { color: var(--blue-dark); border-bottom-color: var(--blue); background: var(--blue-soft); }
.report-grid { margin-top: 6px; }
.report-card { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--blue-dark); font-weight: 700; text-align: center; padding: 22px 12px; }
.report-card:hover { border-color: var(--blue-border); transform: translateY(-3px); }
.report-card small { color: var(--muted); font-weight: 400; }

.list-simple { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: none; }
.empty-state { text-align: center; padding: 46px 16px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty-state.small { padding: 26px 12px; }
.code-404 { font-size: 64px; color: var(--blue-border); font-weight: 900; line-height: 1; }
.file-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.file-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--bg); border: 1px solid var(--line); padding: 6px 12px; border-radius: 99px; font-size: 12.8px; color: var(--text); font-weight: 600; }
.file-chip:hover { border-color: var(--blue-border); color: var(--blue-dark); }

/* ============ Messages / conversation ============ */
.msgs { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.msg { max-width: 82%; padding: 11px 14px; border-radius: 13px; font-size: 13.8px; }
.msg-head { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 4px; font-size: 12px; }
.msg-head small { color: var(--muted); }
.msg-user { background: var(--bg); border: 1px solid var(--line); align-self: flex-start; }
.msg-admin { background: var(--blue-soft); border: 1px solid var(--blue-border); align-self: flex-end; }
.msg-form textarea { margin-bottom: 9px; }

/* ============ Wizard ============ */
.wizard { padding: 24px; }
.wizard-progress { margin-bottom: 22px; }
.wizard-bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin-bottom: 10px; }
.wizard-bar-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), #2E9BDD); border-radius: 99px; transition: width 0.3s ease; }
.wizard-steps-labels { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11.8px; color: var(--muted); }
.wizard-steps-labels span.active { color: var(--blue-dark); font-weight: 700; }
.wiz-title { font-size: 17px; color: var(--blue-deep); margin-bottom: 16px; padding-inline-start: 10px; border-inline-start: 4px solid var(--blue); }
.wizard-nav { display: flex; align-items: center; gap: 12px; margin-top: 18px; border-top: 1px solid var(--line); padding-top: 18px; }
.wiz-counter { color: var(--muted); font-size: 13px; margin-inline-start: auto; }
.review-list h4.review-step { color: var(--blue-dark); margin: 14px 0 6px; font-size: 14px; }
.review-table { width: 100%; border-collapse: collapse; font-size: 13.3px; }
.review-table td { border: 1px solid var(--line); padding: 7px 11px; }
.review-table td:first-child { background: var(--bg); font-weight: 700; width: 42%; }

.success-card { text-align: center; padding: 44px 26px; }
.success-icon { color: var(--green); margin-bottom: 10px; }
.success-card h1 { font-size: 23px; color: var(--blue-deep); margin-bottom: 6px; }
.code-box { background: var(--blue-soft); border: 2px dashed var(--blue-border); border-radius: 12px; padding: 18px; margin: 20px auto; max-width: 430px; }
.code-label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.code-value { font-size: 26px; letter-spacing: 3px; color: var(--blue-dark); display: block; margin-bottom: 8px; font-weight: 900; }
.success-actions { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }

.track-form { margin-bottom: 16px; }
.track-input { display: flex; gap: 10px; }
.track-input input { font-size: 17px; letter-spacing: 2px; text-align: center; font-weight: 700; }
.track-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.track-meta { display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.track-meta span { display: inline-flex; align-items: center; gap: 5px; }
.timeline { display: flex; gap: 6px; margin: 14px 0; flex-wrap: wrap; }
.timeline.vertical { flex-direction: column; }
.tl-item { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 600; }
.tl-item.done { background: var(--green-soft); border-color: #B9E5D0; color: var(--green); }
.timeline.vertical .tl-item { border-radius: 10px; }
.tl-dot { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid var(--line); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tl-item.done .tl-dot { background: var(--green); border-color: var(--green); color: #fff; }

/* ============ Chat widget ============ */
.chat-widget { position: fixed; bottom: 20px; inset-inline-end: 20px; z-index: 400; }
.chat-fab {
  width: 58px; height: 58px; border-radius: 50%; border: none; background: var(--blue); color: #fff;
  cursor: pointer; box-shadow: 0 8px 26px rgba(0,90,150,0.45); display: flex; align-items: center; justify-content: center;
  position: relative; transition: transform 0.2s;
}
.chat-fab:hover { transform: scale(1.07); }
.chat-fab.active { background: var(--blue-dark); }
.chat-fab-badge { position: absolute; top: -3px; inset-inline-end: -3px; background: var(--red); color: #fff; border-radius: 99px; min-width: 20px; height: 20px; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.chat-panel { position: absolute; bottom: 72px; inset-inline-end: 0; width: min(370px, calc(100vw - 40px)); background: #fff; border-radius: 16px; box-shadow: 0 16px 50px rgba(10,30,50,0.3); overflow: hidden; border: 1px solid var(--line); }
.chat-head { background: linear-gradient(120deg, var(--blue-dark), var(--blue)); color: #fff; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; }
.chat-head-info small { opacity: 0.85; font-size: 11px; display: block; }
.chat-min { background: rgba(255,255,255,0.18); border: none; color: #fff; width: 28px; height: 28px; border-radius: 8px; cursor: pointer; font-size: 16px; }
.chat-form { padding: 16px; }
.chat-form-note { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.chat-form .form-grid { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.chat-body { display: flex; flex-direction: column; height: 400px; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.cmsg { max-width: 85%; padding: 8px 12px; border-radius: 12px; font-size: 13.5px; display: flex; flex-direction: column; gap: 2px; word-break: break-word; }
.cmsg small { opacity: 0.65; font-size: 10px; }
.cmsg.me { background: var(--blue); color: #fff; align-self: flex-end; border-end-end-radius: 3px; }
.cmsg.admin { background: #fff; border: 1px solid var(--line); align-self: flex-start; border-end-start-radius: 3px; }
.cmsg.sys { background: transparent; color: var(--muted); align-self: center; font-size: 12px; text-align: center; border: 1px dashed var(--line); }
.cmsg.deleted { color: var(--muted); font-style: italic; background: var(--bg); border: 1px dashed var(--line); }
.chat-status { font-size: 12px; color: var(--amber); padding: 4px 14px; }
.chat-input { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.chat-close-link { background: none; border: none; color: var(--muted); font-size: 11.5px; cursor: pointer; padding: 4px 14px 10px; text-align: start; }
.chat-close-link:hover { color: var(--red); }

/* ============ Admin chat console ============ */
.chat-console { display: grid; grid-template-columns: 320px 1fr; gap: 16px; align-items: start; }
.session-list { display: flex; flex-direction: column; max-height: 560px; overflow-y: auto; }
.session-item { position: relative; display: flex; flex-direction: column; gap: 1px; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--text); }
.session-item:hover { background: var(--blue-soft); }
.session-item.active { background: var(--blue-soft); border-inline-start: 3px solid var(--blue); }
.session-item strong { font-size: 13.5px; }
.session-item small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 210px; }
.session-item.unread strong::after { content: ''; }
.unread-badge { position: absolute; inset-inline-end: 26px; top: 50%; transform: translateY(-50%); background: var(--red); color: #fff; font-size: 10.5px; font-weight: 800; border-radius: 99px; min-width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; }
.sess-state { position: absolute; inset-inline-end: 8px; top: 10px; font-size: 9px; }
.sess-state.open { color: var(--green); } .sess-state.closed { color: var(--muted); }
.chat-window { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.chat-window-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line); background: #fff; }
.console-msgs { min-height: 430px; max-height: 60vh; }
.cmsg-del { position: absolute; top: -8px; inset-inline-end: -6px; background: var(--red); border: none; color: #fff; width: 19px; height: 19px; border-radius: 50%; font-size: 10px; cursor: pointer; opacity: 0; transition: opacity 0.15s; }
.cmsg:hover .cmsg-del { opacity: 1; }
.console-actions { display: flex; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--line); justify-content: flex-end; }
.face-review { display: flex; gap: 16px; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 12px 0; }
.face-review img { width: 84px; height: 84px; border-radius: 12px; object-fit: cover; }
.step-h { margin: 18px 0 8px; color: var(--blue-deep); font-size: 14.5px; padding-inline-start: 8px; border-inline-start: 3px solid var(--blue); }
.step-card .step-num { display: inline-flex; width: 24px; height: 24px; background: var(--blue); color: #fff; border-radius: 7px; align-items: center; justify-content: center; font-size: 12.5px; margin-inline-end: 4px; }
.addfield-details summary { list-style: none; display: inline-flex; cursor: pointer; }
.addfield-details summary::-webkit-details-marker { display: none; }
.file-crumbs { display: flex; gap: 4px; flex-wrap: wrap; font-size: 13px; margin-bottom: 14px; color: var(--muted); }
.file-ico { color: var(--blue); }

/* ============ Notifications panel ============ */
.notif-list { display: flex; flex-direction: column; gap: 10px; }
.notif-item { display: flex; gap: 12px; padding: 14px 16px; }
.notif-item .notif-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); margin-top: 8px; flex-shrink: 0; }
.notif-item.unread { border-inline-start: 3px solid var(--blue); }
.notif-item.unread .notif-dot { background: var(--blue); }
.notif-body strong { font-size: 14px; }
.notif-body p { color: var(--muted); font-size: 13.2px; }

/* ============ Modal ============ */
.modal-overlay { position: fixed; inset: 0; background: rgba(10,25,40,0.55); z-index: 450; display: none; align-items: center; justify-content: center; padding: 16px; }
.modal-overlay.open { display: flex; }
.modal { background: #fff; border-radius: 14px; width: min(460px, 100%); padding: 20px; box-shadow: 0 20px 60px rgba(0,15,30,0.4); }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal-close { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--muted); line-height: 1; }

/* ============ Chart ============ */
.chart-box { width: 100%; }
.chart-svg { width: 100%; height: auto; }

/* ============ Profile ============ */
.profile-avatar { display: flex; align-items: center; gap: 18px; margin-bottom: 16px; }

/* ============ FAQ ============ */
.accordion { display: flex; flex-direction: column; gap: 10px; }
.acc-item { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.acc-head { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; background: none; border: none; cursor: pointer; font-family: var(--font); font-size: 14.5px; font-weight: 700; color: var(--text); text-align: start; }
.acc-head:hover { background: var(--blue-soft); }
.acc-body { padding: 0 18px 16px; color: var(--muted); font-size: 13.8px; }
.faq-cta { margin-top: 22px; text-align: center; background: var(--blue-soft); border-color: var(--blue-border); }

/* ============ CTA band ============ */
.cta-band { background: linear-gradient(120deg, var(--blue-dark), var(--blue)); color: #fff; }
.cta-band-in { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.cta-band h2 { font-size: 23px; margin-bottom: 6px; }
.cta-band p { opacity: 0.9; max-width: 60ch; }

/* ============ Footer ============ */
.site-footer { background: var(--navy); color: #B7C9D9; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 30px; padding: 46px 0 34px; }
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer-col a { display: block; color: #B7C9D9; padding: 4px 0; font-size: 13.5px; }
.footer-col a:hover { color: #fff; }
.footer-col span { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13.5px; }
.footer-about { font-size: 13px; margin-top: 12px; opacity: 0.85; }
.newsletter-form { display: flex; gap: 8px; margin-top: 10px; }
.newsletter-form input { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.18); color: #fff; }
.newsletter-form input::placeholder { color: #8FA6BA; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 15px 0; font-size: 12.5px; }
.footer-bottom .container { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .grid-3c { grid-template-columns: repeat(2, 1fr); }
  .hero-in { grid-template-columns: 1fr; padding: 52px 0 44px; }
  .hero-stats { flex-direction: row; flex-wrap: wrap; }
  .hero-stat { flex: 1; min-width: 150px; }
  .chat-console { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-2-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .topbar-motto { display: none; }
  .nav-toggle { display: inline-flex; }
  .main-nav {
    display: none; position: absolute; top: 100%; inset-inline: 0; background: #fff;
    flex-direction: column; align-items: stretch; padding: 12px 16px; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .main-nav.open { display: flex; }
  .hide-sm { display: none !important; }
  .grid-3, .grid-4, .grid-3c, .form-grid { grid-template-columns: 1fr; }
  .section { padding: 36px 0; }
  .hero h1 { font-size: 25px; }
  .event-row { flex-direction: column; align-items: flex-start; }
  .sidebar {
    position: fixed; inset-inline-start: 0; top: 0; transform: translateX(-105%);
    transition: transform 0.25s ease; box-shadow: 0 0 40px rgba(0,0,0,0.25);
  }
  [dir='rtl'] .sidebar { transform: translateX(105%); }
  .sidebar.open { transform: none; }
  .side-close { display: block; }
  .side-overlay.show { display: block; }
  .flash-wrap { inset-inline: 12px; max-width: none; }
  .wizard-nav { flex-wrap: wrap; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .track-input { flex-direction: column; }
  .timeline { flex-direction: column; align-items: stretch; }
}
