:root{
  --bg-1:#eef5f7;
  --bg-2:#e4f0f3;
  --glass:rgba(255,255,255,0.55);
  --glass-strong:rgba(255,255,255,0.72);
  --glass-border:rgba(255,255,255,0.6);
  --ink:#14232b;
  --ink-soft:#3d5057;
  --accent:#25818f;
  --accent-2:#7fd1c9;
  --accent-soft:#cdeef0;
  --danger:#b6402d;
  --danger-soft:#fbe9e6;
  --radius-lg:26px;
  --radius-md:16px;
  --radius-sm:10px;
  --shadow-soft:0 10px 30px rgba(45,90,100,0.10);
  --shadow-softer:0 4px 14px rgba(45,90,100,0.08);
  font-size:17px;
}

*{box-sizing:border-box;}

html,body{
  margin:0;
  padding:0;
  min-height:100%;
}

body{
  font-family:"IBM Plex Sans Arabic","Tajawal",sans-serif;
  font-weight:500;
  color:var(--ink);
  background:
    radial-gradient(circle at 15% 10%, var(--accent-soft) 0%, transparent 45%),
    radial-gradient(circle at 85% 20%, #d9ecef 0%, transparent 40%),
    radial-gradient(circle at 50% 90%, #e7f4f0 0%, transparent 50%),
    linear-gradient(160deg, var(--bg-1), var(--bg-2));
  background-attachment:fixed;
  direction:rtl;
  line-height:1.8;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

.page{
  max-width:760px;
  margin:0 auto;
  padding:24px 16px 60px;
  display:flex;
  flex-direction:column;
  gap:24px;
}

/* ===== Header ===== */
.site-header{
  text-align:center;
  padding:8px 0 4px;
}

.logo-wrap{
  display:flex;
  justify-content:center;
  margin-bottom:14px;
}

.party-logo{
  max-width:180px;
  max-height:180px;
  width:auto;
  height:auto;
  object-fit:contain;
  filter:drop-shadow(0 6px 16px rgba(45,90,100,0.18));
}

.site-title{
  font-family:"Tajawal",sans-serif;
  font-size:1.7rem;
  font-weight:900;
  line-height:1.5;
  margin:0 0 6px;
  color:var(--ink);
}

.site-subtitle{
  font-family:"Tajawal",sans-serif;
  font-size:1.15rem;
  color:var(--accent);
  font-weight:700;
  margin:0;
}

/* ===== Glass card ===== */
.glass-card{
  background:var(--glass);
  border:1px solid var(--glass-border);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-soft);
  backdrop-filter:blur(18px) saturate(140%);
  -webkit-backdrop-filter:blur(18px) saturate(140%);
  padding:28px 22px;
}

@supports not (backdrop-filter: blur(1px)){
  .glass-card{ background:var(--glass-strong); }
}

/* ===== Progress ===== */
.progress-wrap{
  margin-bottom:26px;
}

.progress-track{
  height:8px;
  border-radius:999px;
  background:rgba(47,143,157,0.15);
  overflow:hidden;
  margin-bottom:14px;
}

.progress-fill{
  height:100%;
  width:11.11%;
  border-radius:999px;
  background:linear-gradient(90deg, var(--accent), var(--accent-2));
  transition:width .35s ease;
}

.progress-steps{
  display:flex;
  justify-content:space-between;
  list-style:none;
  margin:0;
  padding:0;
  font-size:0.68rem;
  color:var(--ink-soft);
  overflow-x:auto;
  gap:4px;
}

.progress-steps li{
  flex:1;
  text-align:center;
  white-space:nowrap;
  padding-bottom:2px;
  border-bottom:2px solid transparent;
}

.progress-steps li.active{
  color:var(--accent);
  font-weight:700;
  border-bottom-color:var(--accent);
}

.progress-steps li.done{
  color:var(--ink);
}

/* ===== Steps / fields ===== */
.step{
  border:none;
  margin:0;
  padding:0;
  display:none;
  animation:fadeIn .35s ease;
}

.step.active{ display:block; }

@keyframes fadeIn{
  from{ opacity:0; transform:translateY(6px); }
  to{ opacity:1; transform:translateY(0); }
}

.step-title{
  font-family:"Tajawal",sans-serif;
  font-size:1.35rem;
  font-weight:800;
  line-height:1.5;
  padding:0;
  margin:0 0 20px;
  color:var(--ink);
}

.field{
  margin-bottom:20px;
}

label{
  display:block;
  font-weight:700;
  font-size:1rem;
  line-height:1.6;
  margin-bottom:8px;
  color:var(--ink);
}

.req{ color:var(--accent); }

input[type="text"],
input[type="tel"],
input[type="date"],
select,
textarea{
  width:100%;
  padding:13px 14px;
  border-radius:var(--radius-sm);
  border:1px solid rgba(37,129,143,0.35);
  background:rgba(255,255,255,0.75);
  font-family:inherit;
  font-weight:500;
  font-size:1.02rem;
  line-height:1.6;
  color:var(--ink);
  transition:border-color .2s, box-shadow .2s;
}

input::placeholder,
textarea::placeholder{
  color:#7c8e94;
  font-weight:400;
}

input:focus,
select:focus,
textarea:focus{
  outline:none;
  border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(47,143,157,0.18);
}

input.invalid,
select.invalid,
textarea.invalid{
  border-color:var(--danger);
  box-shadow:0 0 0 3px rgba(201,106,90,0.12);
}

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

.error-msg{
  color:var(--danger);
  font-weight:600;
  font-size:0.88rem;
  line-height:1.5;
  margin:7px 0 0;
  min-height:1em;
}

.hint-text{
  font-size:0.92rem;
  font-weight:500;
  color:var(--ink-soft);
  margin:-6px 0 18px;
}

.field-hint{
  margin:6px 0 0;
}

.notice-box{
  background:var(--accent-soft);
  border:1px solid rgba(37,129,143,0.3);
  border-radius:var(--radius-sm);
  padding:13px 15px;
  font-size:0.92rem;
  font-weight:500;
  color:var(--ink);
}

/* ===== Radio / checkbox pills ===== */
.radio-row{
  display:flex;
  gap:10px;
}

.radio-row.wrap{ flex-wrap:wrap; }

.checkbox-grid{
  display:grid;
  grid-template-columns:repeat(2, 1fr);
  gap:10px;
}

@media (max-width:480px){
  .checkbox-grid{ grid-template-columns:1fr; }
}

.radio-pill,
.checkbox-pill{
  display:flex;
  align-items:center;
  gap:9px;
  padding:11px 15px;
  border-radius:999px;
  border:1px solid rgba(37,129,143,0.3);
  background:rgba(255,255,255,0.6);
  font-size:0.96rem;
  cursor:pointer;
  font-weight:600;
  color:var(--ink);
  transition:background .2s, border-color .2s;
}

.checkbox-pill.wide{
  border-radius:var(--radius-sm);
  width:100%;
}

.radio-pill:has(input:checked),
.checkbox-pill:has(input:checked){
  background:var(--accent-soft);
  border-color:var(--accent);
  color:var(--ink);
}

.radio-pill input,
.checkbox-pill input{
  accent-color:var(--accent);
  width:16px;
  height:16px;
}

/* ===== conditional fields ===== */
.conditional-fields{
  margin-top:6px;
  padding-top:6px;
  border-top:1px dashed rgba(47,143,157,0.25);
}

/* ===== honeypot ===== */
.honeypot{
  position:absolute;
  left:-9999px;
  width:1px;
  height:1px;
  overflow:hidden;
}

/* ===== review ===== */
.review-list{
  display:flex;
  flex-direction:column;
  gap:0;
  margin-bottom:20px;
  border-radius:var(--radius-md);
  overflow:hidden;
  border:1px solid rgba(47,143,157,0.18);
}

.review-row{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:13px 14px;
  background:rgba(255,255,255,0.5);
  border-bottom:1px solid rgba(37,129,143,0.14);
  font-size:0.94rem;
  line-height:1.5;
}

.review-row:last-child{ border-bottom:none; }

.review-row .rlabel{
  color:var(--ink-soft);
  font-weight:500;
  flex:0 0 42%;
}

.review-row .rvalue{
  flex:1;
  text-align:left;
  font-weight:700;
  color:var(--ink);
  word-break:break-word;
}

.review-section-title{
  padding:11px 14px;
  font-size:0.86rem;
  font-weight:800;
  color:var(--accent);
  background:rgba(37,129,143,0.1);
}

.review-edit-link{
  display:inline-block;
  margin-top:10px;
  font-size:0.86rem;
  font-weight:600;
  color:var(--accent);
  cursor:pointer;
  text-decoration:underline;
  background:none;
  border:none;
  padding:0;
}

.confirm-field{ margin-top:8px; }

/* ===== nav buttons ===== */
.nav-buttons{
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-top:26px;
}

.btn{
  flex:1;
  padding:14px 18px;
  border-radius:999px;
  font-size:0.95rem;
  font-weight:700;
  border:none;
  cursor:pointer;
  transition:transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.btn:active{ transform:scale(0.98); }

.btn:disabled{ opacity:0.6; cursor:not-allowed; }

.btn-primary{
  background:linear-gradient(90deg, var(--accent), var(--accent-2));
  color:#fff;
  box-shadow:var(--shadow-softer);
}

.btn-ghost{
  background:rgba(255,255,255,0.5);
  color:var(--ink);
  border:1px solid rgba(47,143,157,0.25);
}

/* ===== success ===== */
.success-card{
  text-align:center;
  padding:44px 24px;
}

.success-icon{
  width:64px;
  height:64px;
  border-radius:50%;
  background:linear-gradient(135deg, var(--accent), var(--accent-2));
  color:#fff;
  font-size:1.8rem;
  display:flex;
  align-items:center;
  justify-content:center;
  margin:0 auto 18px;
}

.success-card h2{
  font-family:"Tajawal",sans-serif;
  margin:0 0 14px;
  font-size:1.5rem;
  font-weight:800;
}

.request-id{
  font-size:1.15rem;
  font-weight:700;
  margin:0 0 16px;
  color:var(--accent);
}

.success-text{
  color:var(--ink-soft);
  font-weight:500;
  font-size:1rem;
  line-height:1.7;
  max-width:420px;
  margin:0 auto;
}

/* ===== footer ===== */
.site-footer{
  text-align:center;
  font-size:0.78rem;
  color:var(--ink-soft);
  padding-bottom:20px;
}

/* ===== reduced motion ===== */
@media (prefers-reduced-motion: reduce){
  .step, .btn, .progress-fill{ animation:none !important; transition:none !important; }
}

/* ===== focus visibility ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible{
  outline:3px solid var(--accent);
  outline-offset:2px;
}
