:root{
  --bg: #070a0f;
  --border: rgba(255,255,255,0.12);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.62);

  --gold: #d6b25b;
  --green: #2f6b4b;

  --shadow: 0 18px 60px rgba(0,0,0,0.55);
  --radius: 18px;
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }

body{
  margin: 0;
  font-family: "Vazirmatn", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:
    radial-gradient(1200px 800px at 70% 20%, rgba(214,178,91,0.08), transparent 60%),
    radial-gradient(1000px 700px at 30% 80%, rgba(47,107,75,0.10), transparent 55%),
    var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

/* Background ornaments */
.bg-orb{
  position: fixed;
  width: 520px;
  height: 520px;
  filter: blur(70px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}
.orb-1{
  right: -180px;
  top: -180px;
  background: radial-gradient(circle at 30% 30%, rgba(214,178,91,0.9), transparent 55%);
}
.orb-2{
  left: -220px;
  bottom: -220px;
  background: radial-gradient(circle at 30% 30%, rgba(47,107,75,0.9), transparent 55%);
}
.bg-grid{
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(circle at 50% 30%, #000 45%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}

.page{
  position: relative;
  z-index: 1;
  min-height: 100%;
  display: grid;
  align-content: start;
  justify-items: center;
  padding: 48px 16px 28px;
  gap: 22px;
}

/* Brand */
.brand{
  width: min(980px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 10px 10px 4px;
  text-align: center;
}
.brand__logo{
  width: 84px;
  height: 84px;
  object-fit: contain;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 10px 40px rgba(0,0,0,0.35);
  padding: 10px;
}
.brand__text h1{
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.2px;
}
.brand__text p{
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

/* Social */
.social{
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.social__link{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.18);
  color: rgba(255,255,255,0.90);
  text-decoration: none;
  transition: 180ms ease;
  box-shadow: 0 18px 50px rgba(0,0,0,0.22);
}
.social__link:hover{
  background: rgba(255,255,255,0.08);
  border-color: rgba(214,178,91,0.22);
  transform: translateY(-1px);
}
.social__icon{
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: linear-gradient(90deg, rgba(214,178,91,0.14), rgba(47,107,75,0.12));
  color: rgba(255,255,255,0.92);
}
.social__text{
  display: grid;
  line-height: 1.2;
}
.social__label{
  font-size: 12px;
  color: rgba(255,255,255,0.62);
}
.social__handle{
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

/* Card */
.card{
  width: min(560px, 100%);
  background: linear-gradient(180deg, rgba(255,255,255,0.09), rgba(255,255,255,0.05));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.tabs{
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(0,0,0,0.22);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.tab{
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.75);
  padding: 14px 12px;
  font-size: 14px;
  cursor: pointer;
  transition: 180ms ease;
}
.tab:hover{ color: rgba(255,255,255,0.92); }
.tab.is-active{
  color: var(--text);
  background: linear-gradient(90deg, rgba(214,178,91,0.15), rgba(47,107,75,0.12));
}

.alert{
  margin: 14px 14px 0;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.22);
  color: rgba(255,255,255,0.92);
  font-size: 13px;
  line-height: 1.8;
}
.alert[data-type="error"]{
  border-color: rgba(255, 90, 90, 0.35);
  box-shadow: 0 0 0 4px rgba(255, 90, 90, 0.08);
}
.alert[data-type="success"]{
  border-color: rgba(80, 220, 140, 0.35);
  box-shadow: 0 0 0 4px rgba(80, 220, 140, 0.08);
}

.panel{ display: none; }
.panel.is-active{ display: block; }

.form{
  padding: 16px 14px 18px;
  display: grid;
  gap: 12px;
}

.field label{
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  color: rgba(255,255,255,0.80);
}
.field input{
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.25);
  color: var(--text);
  padding: 12px 12px;
  outline: none;
  transition: 180ms ease;
}
.field input:focus{
  border-color: rgba(214,178,91,0.38);
  box-shadow: 0 0 0 4px rgba(214,178,91,0.10);
}
.field textarea{
  width: 100%;
  border-radius: 14px;
  border: 1.5px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.28);
  color: var(--text);
  padding: 14px 14px;
  outline: none;
  transition: 180ms ease;
  font-family: inherit;
  font-size: 14px;
  resize: none;
}
.field textarea::placeholder{
  color: rgba(255,255,255,0.48);
}
.field textarea:focus{
  border-color: rgba(214,178,91,0.42);
  box-shadow: 0 0 0 4px rgba(214,178,91,0.12), inset 0 0 0 1px rgba(214,178,91,0.06);
  background: rgba(0,0,0,0.35);
}

/* Range input styling */
.field input[type="range"]{
  width: 100%;
  height: 6px;
  border-radius: 6px;
  background: rgba(255,255,255,0.08);
  border: none;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  padding: 0;
}

.field input[type="range"]::-webkit-slider-thumb{
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(214,178,91,0.85);
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(214,178,91,0.40);
  transition: 120ms ease;
}

.field input[type="range"]::-webkit-slider-thumb:hover{
  background: rgba(214,178,91,0.95);
  box-shadow: 0 4px 12px rgba(214,178,91,0.55);
}

.field input[type="range"]::-webkit-slider-thumb:active{
  transform: scale(1.1);
}

.field input[type="range"]::-moz-range-thumb{
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(214,178,91,0.85);
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(214,178,91,0.40);
  transition: 120ms ease;
}

.field input[type="range"]::-moz-range-track{
  background: transparent;
  border: none;
}

.field input[type="range"]::-moz-range-progress{
  background: rgba(214,178,91,0.40);
  border-radius: 6px;
}
.hint{
  display: block;
  margin-top: 7px;
  color: rgba(255,255,255,0.52);
  font-size: 12px;
  line-height: 1.6;
}

.input-row{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.icon-btn{
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.82);
  padding: 10px 12px;
  border-radius: 14px;
  cursor: pointer;
  transition: 180ms ease;
}
.icon-btn:hover{ background: rgba(255,255,255,0.09); }

.grid-2{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.check{
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: rgba(255,255,255,0.74);
  font-size: 13px;
}
.check input{ width: 16px; height: 16px; }

.btn{
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 14px;
  cursor: pointer;
  transition: 180ms ease;
  font-weight: 700;
}
.btn:hover{ background: rgba(255,255,255,0.10); }
.btn-primary{
  border-color: rgba(214,178,91,0.25);
  background: linear-gradient(90deg, rgba(214,178,91,0.18), rgba(47,107,75,0.16));
}
.btn-primary:hover{
  background: linear-gradient(90deg, rgba(214,178,91,0.24), rgba(47,107,75,0.22));
}

.link{
  border: 0;
  background: transparent;
  color: rgba(214,178,91,0.92);
  cursor: pointer;
  padding: 0;
  font: inherit;
}
.link-inline{
  border: 0;
  background: transparent;
  color: rgba(214,178,91,0.92);
  cursor: pointer;
  padding: 0;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.fineprint{
  margin: 2px 0 0;
  color: rgba(255,255,255,0.56);
  font-size: 12px;
  line-height: 1.8;
}

.footer{
  width: min(980px, 100%);
  color: rgba(255,255,255,0.48);
  font-size: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding-top: 6px;
}

/* Modal */
.modal[hidden]{ display: none; }
.modal{
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 16px;
}
.modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
}
.modal__card{
  position: relative;
  width: min(560px, 100%);
  background: rgba(15,18,24,0.92);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 16px;
}
.modal__card h3{ margin: 0 0 8px; font-size: 16px; }
.modal__actions{
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 12px;
}

/* Dashboard */
.dash-wrap{ width: min(1100px, 100%); padding: 10px 10px 0; }

.dash-top{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.35);
}
.dash-brand{ display: flex; align-items: center; gap: 12px; }
.dash-logo{
  width: 56px; height: 56px; object-fit: contain;
  border-radius: 14px; padding: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
}
.dash-title{ font-weight: 800; font-size: 16px; }
.dash-sub{ color: rgba(255,255,255,0.58); font-size: 12px; margin-top: 2px; }

.dash-actions{ display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dash-user{
  color: rgba(255,255,255,0.78);
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.18);
}

.dash-grid{
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.dash-card{
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.25);
}
.dash-card h3{ margin: 0 0 10px; font-size: 15px; }

.dash-metrics{
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.metric{
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.18);
  border-radius: 16px;
  padding: 12px;
}
.metric__label{ color: rgba(255,255,255,0.55); font-size: 12px; }
.metric__value{ margin-top: 6px; font-weight: 800; }

.profile{ display: grid; gap: 10px; }
.profile__row{
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.18);
}
.profile__k{ color: rgba(255,255,255,0.60); font-size: 12px; }
.profile__v{ color: rgba(255,255,255,0.92); font-size: 13px; }

/* Jalali Picker */
.jalali-card{ padding: 14px; }
.jalali-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.jalali-controls{
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.jalali-pickers{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.jalali-select{
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.18);
  color: rgba(255,255,255,0.92);
  padding: 10px 12px;
  outline: none;
  transition: 180ms ease;
  font-family: inherit;
  cursor: pointer;
}
.jalali-select:focus{
  border-color: rgba(214,178,91,0.38);
  box-shadow: 0 0 0 4px rgba(214,178,91,0.10);
}
.jalali-month{
  text-align: center;
  font-weight: 800;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.18);
  margin-bottom: 10px;
}
.jalali-weekdays{
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  color: rgba(255,255,255,0.62);
  font-size: 12px;
  padding: 6px 2px 10px;
}
.jalali-weekdays span{ text-align: center; }
.jalali-grid{
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.jday{
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.90);
  border-radius: 14px;
  padding: 10px 0;
  cursor: pointer;
  text-align: center;
  transition: 160ms ease;
  user-select: none;
}
.jday:hover{ background: rgba(255,255,255,0.09); }
.jday.is-empty{ opacity: 0.18; pointer-events: none; }
.jday.is-selected{
  border-color: rgba(214,178,91,0.45);
  background: linear-gradient(90deg, rgba(214,178,91,0.18), rgba(47,107,75,0.16));
}

/* Accessibility */
.sr-only{
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

@media (max-width: 900px){
  .dash-grid{ grid-template-columns: 1fr; }
  .dash-metrics{ grid-template-columns: 1fr; }
  .grid-2{ grid-template-columns: 1fr; }
  .brand{ justify-content: center; text-align: center; flex-direction: column; }
  .social{ justify-content: center; }
}

/* Installment options */
.installment-options{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.installment-option{
  position: relative;
  display: block;
  cursor: pointer;
}

.installment-option input{
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.installment-label{
  display: block;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1.5px solid rgba(255,255,255,0.15);
  background: rgba(0,0,0,0.25);
  color: rgba(255,255,255,0.82);
  text-align: center;
  transition: 180ms ease;
  font-weight: 600;
}

.installment-option input:checked + .installment-label{
  border-color: rgba(214,178,91,0.40);
  background: linear-gradient(90deg, rgba(214,178,91,0.16), rgba(47,107,75,0.14));
  color: rgba(255,255,255,0.95);
  box-shadow: 0 0 0 3px rgba(214,178,91,0.12);
}

.installment-option:hover .installment-label{
  border-color: rgba(214,178,91,0.25);
  background: rgba(255,255,255,0.08);
}

/* VPN Section */
.vpn-section{
  display: grid;
  gap: 14px;
}

.vpn-label{
  margin: 0;
  color: rgba(255,255,255,0.82);
  font-size: 13px;
  font-weight: 600;
}

.vpn-copy-container{
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-copy{
  flex: 1;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1.5px solid rgba(214,178,91,0.25);
  background: linear-gradient(90deg, rgba(214,178,91,0.16), rgba(47,107,75,0.14));
  color: rgba(255,255,255,0.92);
  font-weight: 700;
  cursor: pointer;
  transition: 180ms ease;
}

.btn-copy:hover{
  border-color: rgba(214,178,91,0.40);
  background: linear-gradient(90deg, rgba(214,178,91,0.22), rgba(47,107,75,0.20));
  box-shadow: 0 0 0 3px rgba(214,178,91,0.12);
}

.btn-copy:active{
  transform: scale(0.98);
}

.copy-feedback{
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(47,107,75,0.25);
  border: 1px solid rgba(47,107,75,0.35);
  color: rgba(255,255,255,0.90);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  animation: fadeInOut 2s ease;
}

@keyframes fadeInOut{
  0%{ opacity: 0; }
  10%{ opacity: 1; }
  90%{ opacity: 1; }
  100%{ opacity: 0; }
}

/* Candidates list */
.candidates-list{
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.candidate-option{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.25);
  color: rgba(255,255,255,0.82);
  cursor: pointer;
  transition: 180ms ease;
}

.candidate-option input[type="checkbox"]{
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: rgba(214,178,91,0.85);
}

.candidate-option span{
  font-size: 14px;
  font-weight: 500;
}

.candidate-option:hover{
  border-color: rgba(214,178,91,0.25);
  background: rgba(255,255,255,0.08);
}

.candidate-option input[type="checkbox"]:checked + span{
  color: rgba(255,255,255,0.95);
  font-weight: 600;
}

.candidate-option input[type="checkbox"]:checked{
  border-color: rgba(214,178,91,0.45);
}

.candidate-option input[type="checkbox"]:disabled{
  opacity: 0.5;
  cursor: not-allowed;
}

/* Voting availability message */
.voting-availability{
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  text-align: center;
}

.availability-message{
  margin: 0;
  color: rgba(255,255,255,0.82);
  font-size: 14px;
  line-height: 1.6;
  font-weight: 500;
}

/* Candidate interest buttons */
.candidate-btn{
  border: 1.5px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.25);
  color: rgba(255,255,255,0.82);
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: 180ms ease;
}

.candidate-btn:hover{
  border-color: rgba(214,178,91,0.25);
  background: rgba(255,255,255,0.08);
}

.candidate-btn.selected{
  border-color: rgba(214,178,91,0.40);
  background: linear-gradient(90deg, rgba(214,178,91,0.16), rgba(47,107,75,0.14));
  color: rgba(255,255,255,0.95);
  box-shadow: 0 0 0 3px rgba(214,178,91,0.12);
}

.candidate-btn:disabled{
  opacity: 0.7;
  cursor: not-allowed;
}

.candidate-btn:disabled:not(.selected){
  border-color: rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.20);
}
