/* ==========================================================================
   Plates directory page
   ========================================================================== */

.plates-content-host {
  background: linear-gradient(180deg, #f1f5f9 0%, #f8fafc 28%, #ffffff 100%);
  min-height: 100%;
}

.vp-mobile .plates-content-host {
  padding-bottom: calc(96px + env(safe-area-inset-bottom, 0)) !important;
}

.plates-page {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 4px 0 24px;
  font-family: Vazirmatn, inherit;
}

/* ---------- Hero ---------- */
.plates-hero {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(200, 169, 107, 0.22);
  background: linear-gradient(145deg, #0f172a 0%, #1e293b 48%, #0f172a 100%);
  box-shadow:
    0 16px 40px rgba(15, 23, 42, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.plates-hero__glow {
  position: absolute;
  inset: -40% auto auto -20%;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 169, 107, 0.35) 0%, transparent 68%);
  pointer-events: none;
}

.plates-hero__inner {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 16px;
}

.plates-hero__icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 16px;
  background: rgba(200, 169, 107, 0.14);
  border: 1px solid rgba(200, 169, 107, 0.35);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.plates-hero__title {
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
}

.plates-hero__subtitle {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: rgba(226, 232, 240, 0.82);
}

/* ---------- My plates ---------- */
.plates-mine {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(200, 169, 107, 0.28);
  background: linear-gradient(165deg, #ffffff 0%, #fffdf8 42%, #f8fafc 100%);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.plates-mine__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.plates-mine__title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
}

.plates-mine__unit {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  line-height: 1.45;
}

.plates-mine__manage {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #0f172a;
  text-decoration: none;
  background: rgba(200, 169, 107, 0.16);
  border: 1px solid rgba(200, 169, 107, 0.35);
  transition: background 0.15s ease, transform 0.15s ease;
}

.plates-mine__manage:active {
  transform: scale(0.98);
}

.plates-mine__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 10px;
}

.plates-mine__tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 10px 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e8edf3;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.plates-mine__slot {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
}

.plates-mine__graphic {
  display: flex;
  justify-content: center;
  width: 100%;
}

.plates-mine__graphic .iran-plate {
  width: 100%;
  max-width: 220px;
}

.plates-mine__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 14px;
  border-radius: 14px;
  border: 1px dashed rgba(200, 169, 107, 0.45);
  background: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.plates-mine__empty-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(200, 169, 107, 0.2), rgba(15, 23, 42, 0.04));
}

.plates-mine__empty p {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: #64748b;
  line-height: 1.5;
}

.plates-mine__loading {
  display: flex;
  justify-content: center;
  padding: 20px;
}

/* ---------- Directory section ---------- */
.plates-directory {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.plates-directory__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-inline: 2px;
}

.plates-directory__title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}

/* ---------- Toolbar / search ---------- */
.plates-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plates-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.plates-filter {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.plates-filter__label {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  padding-inline: 2px;
}

.plates-filter__select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1.5px solid rgba(200, 169, 107, 0.28);
  background: #fff;
  color: #0f172a;
  font-family: Vazirmatn, inherit;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  padding-left: 32px;
}

.plates-filter__select:focus {
  outline: none;
  border-color: #c8a96b;
  box-shadow: 0 8px 20px rgba(200, 169, 107, 0.14);
}

.plates-search.ch-search-row__wrap {
  height: 48px;
  min-height: 48px;
  padding: 0 14px;
  gap: 10px;
  border: 1.5px solid rgba(200, 169, 107, 0.32);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.plates-search.ch-search-row__wrap:focus-within {
  border-color: #c8a96b;
  box-shadow: 0 10px 28px rgba(200, 169, 107, 0.16);
}

.plates-search .ch-search-row__input {
  font-size: 14px;
}

.plates-toolbar__count {
  margin: 0;
  padding-inline: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
}

/* ---------- List ---------- */
.plates-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.plates-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: #fff;
  box-shadow:
    0 8px 24px rgba(15, 23, 42, 0.06),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.plates-card:hover {
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.09);
}

.plates-card:active {
  transform: scale(0.995);
}

.plates-card__plate-zone {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 18px 14px 16px;
  background:
    radial-gradient(ellipse 90% 80% at 50% 0%, rgba(200, 169, 107, 0.16) 0%, transparent 72%),
    linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border-bottom: 1px solid #f1f5f9;
}

.plates-card__plate {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 280px;
}

.plates-card__plate .iran-plate {
  width: 100%;
  max-width: 280px;
}

.plates-card__plate-fallback {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.plates-card__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px 16px;
}

.plates-card__resident {
  display: flex;
  align-items: center;
  gap: 12px;
}

.plates-card__avatar {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  background: linear-gradient(135deg, rgba(200, 169, 107, 0.35), rgba(200, 169, 107, 0.12));
  border: 1px solid rgba(200, 169, 107, 0.35);
}

.plates-card__identity {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.plates-card__name {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
}

.plates-card__label {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
}

.plates-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.plates-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.plates-chip--muted {
  color: #94a3b8;
}

.plates-chip__ico {
  display: inline-flex;
  color: #c8a96b;
}

.plates-chip__ico svg {
  width: 12px !important;
  height: 12px !important;
}

/* ---------- Empty / loading ---------- */
.plates-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 28px 12px;
  padding: 28px 20px;
  border-radius: 16px;
  border: 1px dashed rgba(200, 169, 107, 0.4);
  background: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.plates-empty__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(200, 169, 107, 0.18), rgba(15, 23, 42, 0.04));
  margin-bottom: 4px;
}

.plates-empty__title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.plates-empty__hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: #64748b;
  max-width: 260px;
}

.plates-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 160px;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
}

.plates-loading__ring {
  width: 28px;
  height: 28px;
  border: 2.5px solid rgba(200, 169, 107, 0.25);
  border-top-color: #c8a96b;
  border-radius: 50%;
  animation: plates-spin 0.75s linear infinite;
}

@keyframes plates-spin {
  to { transform: rotate(360deg); }
}

/* ---------- My plates (profile) ---------- */
.vp-mobile .content.my-plates-content-host {
  padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0) + 20px) !important;
}

.my-plates-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.my-plates-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 6px 2px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  text-decoration: none;
}

.my-plates-back__ico {
  display: inline-flex;
  color: #94a3b8;
}

.my-plates-card {
  border: 1px solid rgba(200, 169, 107, 0.35);
  background: linear-gradient(165deg, #fff 0%, #fffdf8 55%, #f8fafc 100%);
  padding: 14px 14px 12px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.my-plates-card__hero {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 2px 10px;
  margin-bottom: 10px;
}

.my-plates-card__icon {
  grid-row: 1 / span 2;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(200, 169, 107, 0.28), rgba(30, 58, 138, 0.08));
  color: #0f172a;
  border: 1px solid rgba(200, 169, 107, 0.35);
}

.my-plates-card__title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  align-self: end;
}

.my-plates-card__hint {
  margin: 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
}

.my-plates-card__status {
  grid-column: 1 / -1;
  display: inline-flex;
  align-self: start;
  margin-top: 2px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #1e3a8a;
  background: rgba(30, 58, 138, 0.08);
  border: 1px solid rgba(30, 58, 138, 0.12);
}

.my-plates-unit {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(30, 58, 138, 0.06), rgba(200, 169, 107, 0.08));
  border: 1px solid rgba(30, 58, 138, 0.1);
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  text-align: center;
}

.my-plates-guide {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  line-height: 1.55;
}

.my-plates-guide__ico {
  flex-shrink: 0;
  display: inline-flex;
  margin-top: 2px;
  color: #c8a96b;
}

.my-plates-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.my-plates-slot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
}

.my-plates-slot--optional {
  background: #fafbfc;
  border-style: dashed;
}

.my-plates-slot__head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.my-plates-slot__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #0f172a;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.my-plates-slot--optional .my-plates-slot__num {
  background: #94a3b8;
}

.my-plates-slot__titles {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.my-plates-slot__title {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
}

.my-plates-slot__badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.my-plates-slot .iran-plate-input__board {
  min-height: 2.6rem;
}

.my-plates-slot .iran-plate-input__cell {
  font-size: 15px;
}

.my-plates-slot__guide {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  line-height: 1.45;
}

.my-plates-save {
  margin-top: 4px;
}
