/* =========================================================
   گاراژه — استایل مشترک (پیشوند gr-)
   ========================================================= */

:root {
  --gr-color-brand: #0f2537;
  --gr-color-brand-hover: #173752;
  --gr-color-accent: #316ba7;
  --gr-color-accent-hover: #3a7cb9;
  --gr-color-action: #2b5c9c;
  --gr-color-success: #22c55e;
  --gr-color-danger: #ef4444;
  --gr-color-text: #0f2537;
  --gr-color-text-muted: #64748b;
  --gr-color-text-soft: #94a3b8;
  --gr-color-label: #475569;
  --gr-color-border: #e2e8f0;
  --gr-color-border-light: #f1f5f9;
  --gr-color-bg: #c4c4c4;
  --gr-color-bg-app: #f8fafc;
  --gr-color-surface: #ffffff;
  --gr-color-surface-muted: #f1f5f9;
  --gr-radius-sm: 8px;
  --gr-radius-md: 12px;
  --gr-radius-lg: 14px;
  --gr-radius-pill: 24px;
  --gr-header-h: 56px;
  --gr-nav-h: 72px;
  --gr-font: 'Vazirmatn', Tahoma, sans-serif;
  --gr-shadow-card: 0 4px 12px rgba(0, 0, 0, 0.04);
  /* قالب استاندارد فریم (همه صفحات) */
  --gr-frame-width: 390px;
  --gr-frame-height: 844px;
  --gr-frame-radius: 24px;
  --gr-frame-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
}

body.gr-body {
  font-family: var(--gr-font);
  background-color: #fff;
  color: var(--gr-color-text);
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px 16px;
}

body.gr-body--splash {
  overflow: hidden;
  user-select: none;
}

/* --- نگه‌دارنده دسکتاپ (فقط مرکزچین فریم، بدون قاب رنگی) --- */
.gr-device-holder {
  flex-shrink: 0;
}

.cus_ltr{
  direction: ltr;
}
.cus_ltr input{
  text-align: right;
  direction: rtl;
}
/* --- فریم استاندارد (splash | auth | app) --- */
.gr-frame {
  width: var(--gr-frame-width);
  height: var(--gr-frame-height);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background-color: var(--gr-color-bg-app);
  border-radius: var(--gr-frame-radius);
}

/* دسکتاپ: کارت موبایل روی پس‌زمینه خاکستری (مثل طرح اولیه) */
@media (min-width: 431px) {
  .gr-device-holder .gr-frame {
    width: var(--gr-frame-width);
    height: var(--gr-frame-height);
    max-height: min(var(--gr-frame-height), calc(100dvh - 48px));
    box-shadow: var(--gr-frame-shadow);
    border-radius: var(--gr-frame-radius);
  }
}

.gr-frame--splash {
  background-color: var(--gr-color-surface);
  touch-action: pan-y;
  cursor: grab;
}

.gr-frame--splash.is-dragging {
  cursor: grabbing;
}

.gr-frame--auth {
  background-color: var(--gr-color-surface);
}

.gr-frame--app.gr-app-shell--panel {
  background-color: var(--gr-color-bg-app);
}

/* موبایل واقعی: تمام‌صفحه، بدون قاب دسکتاپ */
@media (max-width: 430px) {
  body.gr-body {
    padding: 0;
    align-items: stretch;
  }

  .gr-device-holder {
    width: 100%;
    min-height: 100dvh;
  }

  .gr-device-holder .gr-frame {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }
}

/* --- پوسته داخلی اپ (داخل gr-frame) --- */
.gr-app-shell {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background-color: inherit;
}

.gr-app-main {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 16px;
  -webkit-overflow-scrolling: touch;
  background: #f3f7f8;
}

.gr-app-shell--has-footer .gr-app-main {
  padding-bottom: calc(var(--gr-nav-h) + 16px);
}

.gr-app-main::-webkit-scrollbar {
  display: none;
}

.gr-app-main--compact {
  padding-top: 8px;
}

.gr-app-main--panel {
  padding-top: 14px;
}

/* --- هدر --- */
.gr-header {
  height: var(--gr-header-h);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  background-color: var(--gr-color-bg-app);
  flex-shrink: 0;
  z-index: 5;
}

.gr-header--main {
  background-color: var(--gr-color-surface);
  border-bottom: 1px solid var(--gr-color-border);
  height: 48px;
}

.gr-header__logo {
  font-size: 20px;
  font-weight: 900;
  color: var(--gr-color-brand);
}

.gr-header__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--gr-color-brand);
}

.gr-header__btn {
  color: var(--gr-color-brand);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 4px;
  border: none;
  background: none;
  text-decoration: none;
}

.gr-header--main .gr-header__btn {
  color: #334155;
}

.gr-header__spacer {
  width: 32px;
  flex-shrink: 0;
}

/* --- ناوبری پایین --- */
.gr-bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--gr-nav-h);
  background-color: var(--gr-color-surface);
  border-top: 1px solid var(--gr-color-border-light);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 12px 10px;
  z-index: 5;
}

.gr-nav-item {
  color: var(--gr-color-text-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
  gap: 0;
}

.gr-nav-item img {
  display: block;
}

.gr-nav-item.is-active {
  background-color: var(--gr-color-action);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--gr-radius-pill);
  flex-direction: row;
  gap: 6px;
}

.gr-nav-item.is-active img {
  filter: brightness(0) invert(1);
}

.gr-nav-item.is-active span {
  font-size: 12px;
  font-weight: 700;
}

/* --- دکمه‌ها --- */
.gr-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: none;
  border-radius: var(--gr-radius-pill);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.gr-btn:active {
  transform: scale(0.98);
}

a.gr-btn {
  text-decoration: none;
  line-height: 1.2;
}

.gr-btn--block {
  width: 100%;
}

.gr-btn--lg {
  min-height: 48px;
  font-size: 14px;
}

.gr-btn--primary,
.gr-btn--dark {
  background-color: var(--gr-color-brand);
  color: #fff;
}

.gr-btn--primary:hover,
.gr-btn--dark:hover {
  background-color: var(--gr-color-brand-hover);
}

.gr-btn--secondary,
.gr-btn--blue {
  background-color: var(--gr-color-accent);
  color: #fff;
}

.gr-btn--secondary:hover,
.gr-btn--blue:hover {
  background-color: var(--gr-color-accent-hover);
}

.gr-btn--action {
  background-color: var(--gr-color-action);
  color: #fff;
  border-radius: var(--gr-radius-lg);
  box-shadow: 0 4px 12px rgba(43, 92, 156, 0.2);
}

.gr-btn--success,
.gr-btn--timer {
  background-color: var(--gr-color-success);
  color: #fff;
  font-size: 11px;
  pointer-events: none;
}

.gr-btn-group {
  display: flex;
  gap: 10px;
  width: 100%;
}

.gr-btn-group .gr-btn {
  flex: 1;
}

/* --- فرم و ورودی --- */
.gr-field {
  width: 100%;
  margin-bottom: 16px;
}

.gr-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--gr-color-label);
  margin-bottom: 8px;
}

.gr-input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--gr-color-border);
  border-radius: var(--gr-radius-sm);
  padding: 0 12px;
  font-family: inherit;
  font-size: 14px;
  color: var(--gr-color-text);
  background: var(--gr-color-surface);
  outline: none;
}

.gr-input:focus {
  border-color: var(--gr-color-accent);
}

.gr-input--ltr {
  text-align: left;
  direction: ltr;
}

.gr-input--search {
  height: 36px;
  border-radius: 20px;
  font-size: 11px;
}

.gr-otp-row {
  display: flex;
  gap: 6px;
  flex-direction: row-reverse;
  justify-content: center;
}

.gr-otp-box {
  width: 38px;
  height: 40px;
  border: 1px solid var(--gr-color-border);
  border-radius: var(--gr-radius-sm);
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--gr-color-text);
  font-family: inherit;
  outline: none;
}

.gr-field--error .gr-otp-box {
  border-color: var(--gr-color-danger);
  color: var(--gr-color-danger);
}

/* --- پیام‌های اعلامی فرم‌ها (مشترک) --- */
.gr-notice {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: var(--gr-radius-sm);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}

.gr-notice--success {
  background-color: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.gr-notice--error {
  background-color: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.gr-notice--warning {
  background-color: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}

.gr-notice--info {
  background-color: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

/* --- تایپوگرافی مشترک --- */
.gr-brand-name {
  font-size: 26px;
  font-weight: 900;
  color: var(--gr-color-brand);
  margin-bottom: 10px;
}

.gr-page-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--gr-color-brand);
  text-align: center;
  margin-bottom: 5px;
}

.gr-page-subtitle {
  font-size: 11px;
  color: var(--gr-color-text-soft);
  text-align: center;
  margin-bottom: 25px;
}

.gr-icon-btn {
  width: 34px;
  height: 34px;
  background-color: var(--gr-color-surface-muted);
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--gr-color-brand);
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.gr-icon-btn i {
  font-size: 18px;
  line-height: 1;
}

.gr-link {
  color: var(--gr-color-accent);
  text-decoration: none;
  font-size: 11px;
}

.gr-link--block {
  display: block;
  text-align: center;
  margin-top: 10px;
}

.gr-terms {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: #334155;
  margin-bottom: 15px;
}

.gr-terms a {
  color: var(--gr-color-accent);
  text-decoration: none;
}

.gr-phone-display {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--gr-color-text-muted);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 10px;
}

.gr-phone-display svg {
  flex-shrink: 0;
}

.gr-footer-actions {
  width: 100%;
  margin-top: auto;
}

/* --- کارت سطحی --- */
.gr-card {
  background-color: var(--gr-color-surface);
  border-radius: var(--gr-radius-md);
  box-shadow: var(--gr-shadow-card);
}
.no-decoration{
  text-decoration: none;
}
.white-back{
  background-color: #fff !important;
}

/* --- Bottom sheet select (reusable) --- */
body.is-sheet-open {
  overflow: hidden;
}

.gr-sheet {
  position: absolute;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}

.gr-sheet__backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(15, 23, 42, 0.35);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.gr-sheet__panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gr-color-surface);
  border-radius: 18px 18px 0 0;
  transform: translateY(100%);
  transition: transform 0.24s ease;
  max-height: min(78%, 520px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 -10px 30px rgba(15, 37, 55, 0.18);
}

.gr-sheet.is-open {
  pointer-events: auto;
}

.gr-sheet.is-open .gr-sheet__backdrop {
  opacity: 1;
}

.gr-sheet.is-open .gr-sheet__panel {
  transform: translateY(0);
}

.gr-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--gr-color-border-light);
}

.gr-sheet__title {
  font-size: 14px;
  font-weight: 800;
  color: var(--gr-color-brand);
}

.gr-sheet__close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--gr-color-border-light);
  border-radius: 10px;
  background: var(--gr-color-surface-muted);
  color: var(--gr-color-text-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.gr-sheet__body {
  overflow-y: auto;
  padding: 8px 12px;
}

.gr-sheet__options {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gr-sheet__option {
  width: 100%;
  border: 1px solid var(--gr-color-border-light);
  border-radius: 12px;
  background: #fff;
  min-height: 46px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--gr-color-brand);
  cursor: pointer;
}

.gr-sheet__option.is-active {
  border-color: rgba(49, 107, 167, 0.4);
  background: rgba(49, 107, 167, 0.07);
}

.gr-sheet__check {
  color: transparent;
  transition: color 0.2s ease;
  display: flex;
}

.gr-sheet__option.is-active .gr-sheet__check {
  color: var(--gr-color-action);
}

.gr-sheet__footer {
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--gr-color-border-light);
}

/* --- Vehicle selector sheet (reusable) --- */
.gr-vehicle-sheet__tabs {
  display: flex;
  gap: 18px;
  border-bottom: 1px solid var(--gr-color-border);
  margin-bottom: 14px;
}

.gr-vehicle-sheet__tab {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 14px;
  font-weight: 700;
  padding: 8px 0 10px;
  position: relative;
  font-family: inherit;
  cursor: pointer;
}

.gr-vehicle-sheet__tab.is-active {
  color: var(--gr-color-brand);
}

.gr-vehicle-sheet__tab.is-active::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--gr-color-brand);
}

.gr-vehicle-sheet__panel {
  display: none;
}

.gr-vehicle-sheet__panel.is-active {
  display: block;
}

.gr-vehicle-sheet__options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gr-vehicle-sheet__option {
  width: 100%;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #fff;
  color: #1e3a8a;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.gr-vehicle-sheet__option .bi {
  font-size: 16px;
  line-height: 1;
  color: #60a5fa;
  opacity: 0;
}

.gr-vehicle-sheet__option.is-active {
  border-color: #3b82f6;
  background: #eff6ff;
}

.gr-vehicle-sheet__option.is-active .bi {
  opacity: 1;
}

.gr-vehicle-sheet__empty {
  margin: 4px 0 0;
  color: var(--gr-color-text-muted);
  font-size: 13px;
}

.gr-vehicle-sheet__add-link {
  margin-top: 12px;
  display: inline-flex;
  color: var(--gr-color-brand);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.gr-sheet__add-trigger {
  text-decoration: none;
}

.gr-sheet__add-trigger .bi {
  font-size: 18px;
  line-height: 1;
}