/* =====================================================================
   style.css — Fluent-inspired design system (Microsoft 365 style)
   سامانه رأی‌گیری مجمع عمومی
   نکته: تمام نام‌های کلاس قبلی حفظ شده تا نیازی به تغییر فایل‌های blade نباشد.
   ===================================================================== */

/* ---------- فونت وزیرمتن (self-hosted، بدون وابستگی به CDN خارجی) ----------
   قبلاً --font به 'Vazirmatn' اشاره می‌کرد ولی هیچ‌جا این فونت واقعاً بارگذاری
   نمی‌شد؛ در نتیجه مرورگر همیشه به فونت پیش‌فرض سیستم (Tahoma/Arial) سقوط
   می‌کرد و ظاهر یکدست و مدرن طراحی‌شده هرگز واقعاً دیده نمی‌شد. */
@font-face {
  font-family: 'Vazirmatn';
  src: url('../webfonts/vazirmatn/Vazirmatn-UI-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../webfonts/vazirmatn/Vazirmatn-UI-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../webfonts/vazirmatn/Vazirmatn-UI-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../webfonts/vazirmatn/Vazirmatn-UI-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
  --brand: #2564eb;
  --brand-600: #1d4fc7;
  --brand-700: #1740a0;
  --brand-50: #eef3fd;
  --brand-100: #dbe6fb;
  --accent-grad: linear-gradient(135deg, #2564eb 0%, #6c3ce9 100%);

  --success: #0f8a3e;
  --success-bg: #e6f6ec;
  --warning: #b7791f;
  --warning-bg: #fdf3dd;
  --danger: #d13438;
  --danger-bg: #fdecec;
  --info: #2564eb;
  --info-bg: #eef3fd;

  --surface: #ffffff;
  --bg: #dde3f0;
  --bg-elevated: #f5f7fb;
  --border: #e3e5ec;
  --border-strong: #cfd3dd;

  --text: #201f27;
  --text-muted: #6b6f7a;
  --text-faint: #9aa0ab;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;

  --shadow-1: 0 1px 2px rgba(20, 20, 40, 0.06);
  --shadow-2: 0 2px 6px rgba(20, 20, 40, 0.08), 0 0.5px 1.5px rgba(20, 20, 40, 0.06);
  --shadow-3: 0 8px 24px rgba(20, 20, 40, 0.10), 0 1px 3px rgba(20, 20, 40, 0.08);

  --font: 'Vazirmatn', 'Segoe UI', Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  background-color: var(--bg);
  /* WhatsApp-style faint doodle wallpaper: a repeating tile of outlined
     voting-themed icons (ballot box, checkmark, shield, document, people)
     at very low opacity over a muted (not stark-white) base tone. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260' viewBox='0 0 260 260'%3E%3Cg fill='none' stroke='%232a3a66' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' opacity='0.06'%3E%3Cg transform='translate(18,22) rotate(-8)'%3E%3Crect x='0' y='10' width='34' height='24' rx='3'/%3E%3Cpath d='M6 10 L17 -4 L28 10'/%3E%3Cpath d='M12 22 L16 26 L23 17'/%3E%3C/g%3E%3Cg transform='translate(150,40) rotate(6)'%3E%3Ccircle cx='16' cy='16' r='15'/%3E%3Cpath d='M9 16 L14 21 L23 10'/%3E%3C/g%3E%3Cg transform='translate(90,110) rotate(-4)'%3E%3Crect x='0' y='0' width='26' height='34' rx='2'/%3E%3Cpath d='M6 9 H20 M6 16 H20 M6 23 H14'/%3E%3C/g%3E%3Cg transform='translate(200,140) rotate(10)'%3E%3Cpath d='M16 2 L30 8 V18 C30 27 24 33 16 36 C8 33 2 27 2 18 V8 Z'/%3E%3Cpath d='M10 18 L14 22 L22 13'/%3E%3C/g%3E%3Cg transform='translate(30,170) rotate(-6)'%3E%3Ccircle cx='11' cy='10' r='7'/%3E%3Ccircle cx='27' cy='10' r='7'/%3E%3Cpath d='M2 30 C2 22 8 18 15 18 M19 18 C26 18 32 22 32 30'/%3E%3C/g%3E%3Cg transform='translate(140,210) rotate(4)'%3E%3Crect x='0' y='10' width='34' height='24' rx='3'/%3E%3Cpath d='M6 10 L17 -4 L28 10'/%3E%3Cpath d='M12 22 L16 26 L23 17'/%3E%3C/g%3E%3Cg transform='translate(225,-10) rotate(-10)'%3E%3Crect x='0' y='0' width='26' height='34' rx='2'/%3E%3Cpath d='M6 9 H20 M6 16 H20 M6 23 H14'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Soft directional wash on top of the doodle pattern for a bit of depth —
   replaces the old rotating neon background. Static, never distracting. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1200px 500px at 15% -10%, rgba(37, 100, 235, 0.10), transparent 60%),
    radial-gradient(900px 500px at 110% 10%, rgba(108, 60, 233, 0.07), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* Particles: kept in the DOM/JS for compatibility, but hidden — a floating
   particle background doesn't fit a clean Microsoft-style interface. */
.particles { display: none; }

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-600); }

h1, h2, h3, h4, h5, h6 { font-weight: 700; letter-spacing: -0.01em; }

hr.divider, .divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.25rem 0;
  opacity: 1;
}

/* ---------- Brand color utility classes (names kept, meaning updated) ---------- */
.text-turquoise { color: var(--brand) !important; }
.bg-turquoise { background: var(--brand) !important; }
.border-turquoise { border-color: var(--brand) !important; }

.text-gradient {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- Cards ---------- */
.glass-card, .box {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
  padding: 28px;
  margin-bottom: 0;
}

@media (max-width: 576px) {
  .glass-card, .box { padding: 18px; border-radius: var(--radius); }
}

.stat-card {
  padding: 20px 12px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-3); }

/* ---------- Buttons ---------- */
.btn {
  border-radius: var(--radius-sm);
  font-weight: 600;
  padding: 8px 18px;
  transition: all .15s ease;
  border: 1px solid transparent;
}

.btn-turquoise, .btn-success-custom {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.btn-turquoise:hover, .btn-success-custom:hover {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: #fff;
  box-shadow: var(--shadow-2);
}

.btn-outline-turquoise {
  background: transparent;
  border-color: var(--brand);
  color: var(--brand);
}
.btn-outline-turquoise:hover {
  background: var(--brand-50);
  border-color: var(--brand);
  color: var(--brand-700);
}

.btn-outline-secondary {
  border-color: var(--border-strong);
  color: var(--text-muted);
  background: transparent;
}
.btn-outline-secondary:hover { background: var(--bg); color: var(--text); }

.btn-outline-danger { color: var(--danger); border-color: var(--danger); background: transparent; }
.btn-outline-danger:hover { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }

.btn-outline-warning { color: var(--warning); border-color: var(--warning); background: transparent; }
.btn-outline-warning:hover { background: var(--warning-bg); border-color: var(--warning); color: var(--warning); }

.btn-secondary { background: var(--text-faint); border-color: var(--text-faint); color: #fff; }
.btn-secondary:disabled { opacity: .55; }

.btn-lg { padding: 12px 22px; font-size: 1.05rem; border-radius: var(--radius-sm); }
.btn-sm { padding: 5px 12px; font-size: .85rem; }

.btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-logout:hover { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }
.btn-logout-sm { padding: 5px 10px; font-size: .78rem; }

.btn:disabled, .btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- Forms ---------- */
.form-control, .form-select,
input[type="text"], input[type="password"], input[type="tel"], input[type="number"] {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 9px 12px;
  font-family: var(--font);
}
.form-control:focus, .form-select:focus, input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-50);
  outline: none;
}
.form-control.is-invalid { border-color: var(--danger); }

.form-label, label { color: var(--text); font-weight: 600; font-size: .9rem; margin-bottom: 6px; display: inline-block; }
.form-help { color: var(--text-muted); font-size: .8rem; }
.form-group { margin-bottom: 14px; }

.form-check-input {
  border: 1.5px solid var(--border-strong);
  width: 1.15em;
  height: 1.15em;
}
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-check-input:focus { box-shadow: 0 0 0 3px var(--brand-50); border-color: var(--brand); }
.form-switch .form-check-input { width: 2.5em; }
.form-check-label { color: var(--text); }

/* ---------- Alerts ---------- */
.alert, .alert-glass, .alert-custom-success, .alert-custom-info,
.alert-custom-warning, .alert-custom-danger {
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  border: 1px solid transparent;
  font-size: .92rem;
}

.alert-custom-success, .alert-success { background: var(--success-bg); color: var(--success); border-color: rgba(15, 138, 62, .18); }
.alert-custom-info, .alert-info, .alert-glass { background: var(--info-bg); color: var(--brand-700); border-color: rgba(37, 100, 235, .18); }
.alert-custom-warning, .alert-warning { background: var(--warning-bg); color: var(--warning); border-color: rgba(183, 121, 31, .2); }
.alert-custom-danger, .alert-error, .alert-danger { background: var(--danger-bg); color: var(--danger); border-color: rgba(209, 52, 56, .2); }

/* ---------- Badges ---------- */
.badge { font-weight: 600; border-radius: 20px; padding: 5px 12px; font-size: .78rem; }
.badge.bg-success { background: var(--success) !important; }
.badge.bg-secondary { background: #9aa0ab !important; }
.badge.bg-warning { background: var(--warning) !important; color: #fff !important; }
.badge.bg-danger { background: var(--danger) !important; }

.limit-badge, .u-badge-turquoise-sm, .u-badge-turquoise {
  display: inline-block;
  background: var(--brand-50);
  color: var(--brand-700);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: .8rem;
  font-weight: 600;
}

.status-badge {
  display: inline-block;
  border-radius: 20px;
  padding: 6px 16px;
  font-size: .82rem;
  font-weight: 700;
  margin-top: 8px;
}
.status-active { background: var(--success-bg); color: var(--success); }
.status-ended { background: #eef0f4; color: var(--text-muted); }
.status-not-started { background: var(--warning-bg); color: var(--warning); }

/* ---------- Tables ---------- */
.table { color: var(--text); }
.table thead th {
  border-bottom: 2px solid var(--border);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: none;
}
.table td, .table th { border-color: var(--border); vertical-align: middle; }
.table-borderless td, .table-borderless th { border: none; }
.table-hover tbody tr:hover { background: var(--brand-50); }

/* ---------- Login page ---------- */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  z-index: 1;
}
.login-container .glass-card { width: 100%; max-width: 440px; }
.login-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent-grad);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin: 0 auto 16px;
  box-shadow: var(--shadow-2);
}
.login-title { font-size: 1.5rem; margin-bottom: 6px; text-align: center; }
.login-subtitle { color: var(--text-muted); text-align: center; margin-bottom: 22px; font-size: .92rem; }

/* ---------- OTP verify page (.wrap/.box - simple markup) ---------- */
.wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  z-index: 1;
}
.box { max-width: 420px; width: 100%; text-align: center; }
.box h1 { font-size: 1.35rem; margin-bottom: 6px; }
.box > p { color: var(--text-muted); margin-bottom: 18px; font-size: .92rem; }
.box form { margin-top: 0; }
.box .btn {
  width: 100%;
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 11px;
  font-size: 1rem;
}
.box .btn:hover { background: var(--brand-600); }
.meta { color: var(--text-faint); font-size: .8rem; text-align: center; margin-top: 16px; }

/* شماره موبایل + آیکن مداد (بازگشت/ویرایش) — مطابق طراحی مرجع */
.otp-mobile-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 22px;
  font-weight: 600;
}
.otp-mobile-row a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-50);
  color: var(--brand);
  font-size: .8rem;
}
.otp-mobile-row a:hover { background: var(--brand-100); }

/* جعبه‌های جدای کد یکبار مصرف */
.otp-box-grid {
  display: flex;
  justify-content: center;
  gap: 10px;
  direction: ltr;
  margin: 4px 0 20px;
}
.otp-box {
  width: 54px;
  height: 58px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.otp-box:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-50);
  background: var(--surface);
}
@media (max-width: 420px) {
  .otp-box { width: 46px; height: 52px; font-size: 1.3rem; }
  .otp-box-grid { gap: 8px; }
}

/* شمارنده‌ی ساده‌ی «ارسال مجدد» زیر جعبه‌های کد، مطابق طراحی مرجع */
.otp-resend-row {
  text-align: center;
  font-size: .88rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.otp-resend-row .countdown { color: var(--brand); font-weight: 700; }
.otp-resend-row button {
  background: none;
  border: none;
  padding: 0;
  color: var(--brand);
  font-weight: 700;
  font-size: .88rem;
  cursor: pointer;
}
.otp-resend-row button:hover { color: var(--brand-600); text-decoration: underline; }
.otp-resend-row button:disabled { color: var(--text-faint); cursor: not-allowed; }

.btn-link-resend {
  display: block;
  width: 100%;
  text-align: center;
  background: none;
  border: none;
  padding: 6px;
  color: var(--brand);
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
}
.btn-link-resend:hover { color: var(--brand-600); text-decoration: underline; }

.otp-info {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 14px;
  text-align: right;
}
.info-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: .88rem;
  border-bottom: 1px solid var(--border);
}
.info-item:last-child { border-bottom: none; }
.info-item .label { color: var(--text-muted); font-weight: 500; margin: 0; }
.info-item .value { color: var(--text); font-weight: 700; }
.info-item .value.active { color: var(--success); }
.info-item .value.expired { color: var(--danger); }
.time-warning { color: var(--danger) !important; }

/* ---------- Voter panel header ---------- */
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.user-info { display: flex; align-items: center; gap: 12px; }
.user-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent-grad);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.user-name { font-weight: 700; color: var(--text); }
.user-role { font-size: .78rem; color: var(--text-muted); }

.time-info-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.time-item { display: flex; align-items: center; gap: 10px; text-align: right; }
.time-item .icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--brand-50);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.time-item .label { font-size: .74rem; color: var(--text-muted); margin: 0; }
.time-item .value { font-weight: 700; color: var(--text); }

.results-link-box {
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.tracking-code-box {
  display: inline-block;
  background: var(--brand-50);
  color: var(--brand-700);
  border: 1px dashed var(--brand);
  border-radius: var(--radius-sm);
  padding: 3px 10px;
  font-family: monospace;
  font-weight: 700;
  letter-spacing: 1px;
}
.tracking-code-box-large {
  background: var(--brand-50);
  border: 2px dashed var(--brand);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.tracking-code-box-large .code {
  font-size: 28px;
  font-weight: bold;
  letter-spacing: 2px;
  color: var(--brand-700);
  font-family: monospace;
}

.scroll-box {
  max-height: 260px;
  overflow-y: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 18px;
  font-size: .9rem;
  line-height: 1.9;
}
.scroll-box::-webkit-scrollbar { width: 8px; }
.scroll-box::-webkit-scrollbar-track { background: transparent; }
.scroll-box::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
.scroll-box::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

.candidate-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.candidate-tag {
  background: var(--brand-50);
  color: var(--brand-700);
  border: 1px solid var(--brand-100);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: .82rem;
  font-weight: 600;
}

.date-display-footer { font-family: monospace; }

/* ---------- Ballot ---------- */
.candidate-select-list { display: flex; flex-direction: column; gap: 10px; }
.candidate-check-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: border-color .15s ease, background .15s ease;
}
.candidate-check-item:has(.candidate-checkbox:checked) {
  background: var(--brand-50);
  border-color: var(--brand);
}
.candidate-checkbox { margin-top: 3px; }

/* ---------- Results ---------- */
.results-list { display: flex; flex-direction: column; gap: 14px; }
.result-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.progress { background: var(--border); border-radius: 20px; overflow: hidden; }
.progress-bar { background: var(--brand); }

/* ---------- Misc utility classes (kept, re-themed for light UI) ---------- */
.u-c-turquoise { color: var(--brand); }
.u-emoji-48-10 { font-size: 48px; margin-bottom: 10px; }
.u-emoji-48-15 { font-size: 48px; margin-bottom: 15px; }
.u-emoji-64-10 { font-size: 64px; margin-bottom: 10px; }
.u-emoji-64-20 { font-size: 64px; margin-bottom: 20px; }
.u-fs-12 { font-size: 12px; }
.u-fs-20 { font-size: 20px; }
.u-fs-24 { font-size: 24px; }
.u-fs-28 { font-size: 28px; }
.u-fs-40 { font-size: 40px; }
.u-fw-700 { font-weight: 700; }
.u-d-none { display: none; }
.u-pre-line { white-space: pre-line; }
.u-ml-5 { margin-left: 5px; }
.u-mr-auto { margin-right: auto; }
.u-border-10 { border-color: var(--border); }
.u-border-subtle, .u-border-subtle-pt { border-color: var(--border) !important; }
.u-border-subtle-pt { padding-top: 12px !important; }
.u-border-top-subtle { border-top: 1px solid var(--border); }
.u-max-w-150 { max-width: 150px; }
.u-time-label { font-size: 11px; color: var(--text-faint); }
.u-sep-8 { margin: 0 8px; color: var(--text-faint); }
.u-sep-5 { margin: 0 5px; color: var(--text-faint); }
.u-text-left { text-align: left; }
.u-ltr { direction: ltr; }
.u-ltr-inline-block { direction: ltr; display: inline-block; }
.u-ltr-center-50, .u-ltr-center-40 { direction: ltr; text-align: center; font-size: 12px; color: var(--text-faint); }
.u-ltr-c-60 { direction: ltr; color: var(--text-muted); }
.u-ltr-mono-13, .u-ltr-mono-14 { direction: ltr; font-family: monospace; font-size: 13px; }
.u-ltr-mono-left { text-align: left; font-family: monospace; }
.u-c-white-ltr, .u-c-white-ltr-12 { color: var(--text); direction: ltr; text-align: left; }
.u-c-white-ltr-12 { font-size: 12px; }
.u-c-white, .u-c-white-bold { color: var(--text); }
.u-c-white-bold { font-weight: 700; }
.u-c-20-ltr, .u-c-20-imp-10-ltr { color: var(--text-faint); direction: ltr; }
.u-c-20-imp-10-ltr { font-size: 10px; }
.u-c-25-10-ltr { color: var(--text-faint); font-size: 10px; direction: ltr; }
.u-c-30, .u-c-30-imp { color: var(--text-faint); }
.u-c-30-imp { color: var(--text-faint) !important; }
.u-c-30-block-mt5 { color: var(--text-faint) !important; display: block; margin-top: 5px; }
.u-c-40, .u-c-40-imp { color: var(--text-muted); }
.u-c-40-imp { color: var(--text-muted) !important; }
.u-c-50, .u-c-50-imp { color: var(--text-muted); }
.u-c-50-imp { color: var(--text-muted) !important; }
.u-c-80-ltr { color: var(--text); direction: ltr; }
.u-c-green { color: var(--success); }
.u-c-green-bold { color: var(--success); font-weight: 700; }
.u-c-red-bold { color: var(--danger); font-weight: 700; }
.u-c-gold-bold { color: #b7791f; font-weight: 700; }
.u-c-amber { color: #b7791f; }
.u-c-turquoise-bold700 { color: var(--brand); font-weight: 700; }
.u-c-turquoise-bold600 { color: var(--brand); font-weight: 600; }
.u-border-green-30 { border-color: rgba(15, 138, 62, .3); }
.u-logout-danger { border-color: rgba(209, 52, 56, .3); color: var(--danger); }
.u-box-turquoise { background: var(--brand-50); border-radius: 8px; border: 1px solid var(--brand-100); }
.u-box-dark { background: var(--bg-elevated); border-radius: 12px; }
.u-box-soft-10 { background: var(--bg-elevated); border-radius: 10px; padding: 8px; }
.u-box-soft-12 { background: var(--bg-elevated); border-radius: 12px; padding: 10px; }
.u-p-20-25 { padding: 20px 25px; }
.u-switch-sm { width: 50px; height: 26px; border-radius: 13px; }
.u-gradient-text, .u-gradient-text2 {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.u-otp-alert { font-size: 12px; padding: 8px 12px; direction: ltr; text-align: center; }

/* ---------- Password visibility toggle ---------- */
.password-field-wrap { position: relative; }
.password-field-wrap input { padding-left: 42px; }
.password-toggle-eye {
  position: absolute;
  top: 50%;
  left: 4px;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-faint);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.password-toggle-eye:hover { background: var(--brand-50); color: var(--brand); }

/* ---------- Jalali date-time picker ---------- */
.jalali-picker-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
}
.jalali-picker-wrap input.jalali-input {
  flex: 1;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}
.jalali-picker-toggle {
  border: 1px solid var(--border-strong);
  border-right: none;
  background: var(--bg-elevated);
  color: var(--brand);
  border-top-left-radius: var(--radius-sm);
  border-bottom-left-radius: var(--radius-sm);
  padding: 0 12px;
  cursor: pointer;
  transition: background .15s ease;
}
.jalali-picker-toggle:hover { background: var(--brand-50); }

.jalali-picker-popup {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 50;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-3);
  padding: 14px;
  width: 280px;
  max-width: calc(100vw - 32px);
}
.jp-header { display: flex; gap: 8px; margin-bottom: 10px; }
.jp-header select {
  flex: 1;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  font-family: var(--font);
  font-size: .85rem;
  background: var(--surface);
}
.jp-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: .75rem;
  color: var(--text-faint);
  margin-bottom: 4px;
}
.jp-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.jp-day {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  border-radius: 6px;
  font-size: .82rem;
  cursor: pointer;
  color: var(--text);
}
.jp-day:hover { background: var(--brand-50); }
.jp-day.jp-selected { background: var(--brand); color: #fff; font-weight: 700; }
.jp-day.jp-empty { cursor: default; }
.jp-time {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 10px 0;
  color: var(--text-muted);
  font-size: .85rem;
}
.jp-time select {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 4px 6px;
  font-family: var(--font);
}
.jp-actions { display: flex; justify-content: space-between; gap: 8px; }

/* ---------- Smart assistant widget ---------- */
.assistant-widget {
  position: fixed;
  bottom: 22px;
  left: 22px;
  z-index: 200;
}
.assistant-toggle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--accent-grad);
  color: #fff;
  font-size: 22px;
  box-shadow: var(--shadow-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s ease;
}
.assistant-toggle:hover { transform: scale(1.06); }
.assistant-toggle.active { transform: scale(0.94); }

.assistant-panel {
  position: absolute;
  bottom: 68px;
  left: 0;
  width: 330px;
  max-width: calc(100vw - 40px);
  height: 440px;
  max-height: 70vh;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.assistant-header {
  background: var(--accent-grad);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .95rem;
}
.assistant-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}
.assistant-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-elevated);
}
.assistant-msg {
  max-width: 85%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: .85rem;
  line-height: 1.7;
}
.assistant-msg-bot {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.assistant-msg-user {
  align-self: flex-end;
  background: var(--brand);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.assistant-typing { display: flex; gap: 4px; padding: 12px 14px; }
.assistant-typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-faint);
  animation: assistant-blink 1.2s infinite ease-in-out;
}
.assistant-typing span:nth-child(2) { animation-delay: .2s; }
.assistant-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes assistant-blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }

.assistant-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.assistant-chip {
  border: 1px solid var(--brand-100);
  background: var(--brand-50);
  color: var(--brand-700);
  border-radius: 16px;
  padding: 5px 12px;
  font-size: .76rem;
  cursor: pointer;
  white-space: nowrap;
}
.assistant-chip:hover { background: var(--brand-100); }

.assistant-form {
  display: flex;
  border-top: 1px solid var(--border);
}
.assistant-form input {
  flex: 1;
  border: none;
  padding: 12px 14px;
  font-family: var(--font);
  font-size: .85rem;
  outline: none;
}
.assistant-form button {
  border: none;
  background: var(--brand);
  color: #fff;
  width: 48px;
  cursor: pointer;
  font-size: 16px;
}
.assistant-form button:hover { background: var(--brand-600); }

@media (max-width: 576px) {
  .assistant-widget { bottom: 14px; left: 14px; }
  .assistant-panel { width: calc(100vw - 28px); height: 60vh; }
}

/* ---------- Pagination ---------- */
.u-pagination-wrap { display: flex; justify-content: center; }
.pagination { gap: 4px; flex-wrap: wrap; }
.page-link {
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: var(--radius-sm) !important;
  font-weight: 600;
  font-size: .85rem;
}
.page-link:hover { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-100); }
.page-item.active .page-link { background: var(--brand); border-color: var(--brand); color: #fff; }
.page-item.disabled .page-link { color: var(--text-faint); background: transparent; }

/* ---------- Responsive ---------- */
@media (max-width: 576px) {
  .container, .container-fluid { padding-left: 14px; padding-right: 14px; }
  .header-top { flex-direction: column; align-items: flex-start; }
}
