/* ===== AMIR PANEL - User Dashboard ===== */

.amir-panel-app {
  --ud-primary: #00d4ff;
  --ud-secondary: #00ff96;
  --ud-bg: #050608;
  --ud-card: rgba(255, 255, 255, 0.045);
  --ud-card-border: rgba(255, 255, 255, 0.1);
  --ud-border: rgba(255, 255, 255, 0.08);
  --ud-text: #f0f2f5;
  --ud-muted: #9098a8;

  position: relative;
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  min-height: 100dvh; /* در سافاری موبایل هنگام جمع‌شدن نوار آدرس، ارتفاع واقعی صفحه را درست محاسبه می‌کند و از ایجاد فضای خالی اضافه در پایین صفحه هنگام اسکرول جلوگیری می‌کند */
  width: 100%;
  background: radial-gradient(120% 120% at 15% 0%, #10141c 0%, var(--ud-bg) 60%);
  color: var(--ud-text);
  border-radius: 0;
  overflow: hidden;
  font-family: "Space Grotesk", "Vazirmatn", sans-serif;
  border: none;
  box-shadow: none;
}
.amir-panel-app * { box-sizing: border-box; }
.amir-panel-app button, .amir-panel-app input, .amir-panel-app select, .amir-panel-app textarea {
  font-family: inherit;
}

.amir-panel-app .amir-mesh-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.amir-panel-sidebar,
.amir-panel-main {
  position: relative;
  z-index: 2;
}

@media (max-width: 800px) {
  #amirPanelApp.amir-panel-app { grid-template-columns: 1fr; padding-top: 58px; padding-bottom: 78px; }
}

/* ══════════════════════════════════════════
   نوار بالای صفحه (فقط موبایل) - شناور، با قاب گرادیانت چرخشی و حاشیه از طرفین، هماهنگ با نوار پایین
══════════════════════════════════════════ */
.amir-mobile-topbar {
  display: none;
  position: fixed;
  inset-block-start: 14px;
  inset-inline: 14px;
  z-index: 400;
}
@media (max-width: 800px) { #amirPanelApp .amir-mobile-topbar { display: block; } }

.amir-mobile-topbar-gb {
  --nm-c1: #00d4ff; --nm-c2: #00ff96; --nm-c3: #f472b6;
  --nm-c4: #fb923c; --nm-c5: #a78bfa; --nm-c6: var(--nm-c1);
  padding: 2px;
  border-radius: 20px;
  position: relative;
  animation: amirNmGbSpin 5s linear infinite;
}
.amir-mobile-topbar-gb::after {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;
  border-radius: inherit;
  z-index: 0;
  background: conic-gradient(from var(--nm-angle, 0deg), var(--nm-c1), var(--nm-c2), var(--nm-c3), var(--nm-c4), var(--nm-c5), var(--nm-c6));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  animation: inherit;
}

.amir-mobile-topbar-inner {
  position: relative;
  z-index: 1;
  height: 56px;
  border-radius: 18px;
}

/* موقعیت‌دهی مطلق و فیزیکی (مستقل از RTL/LTR): همبرگر همیشه راست، خروج همیشه چپ، لوگو همیشه وسط */
.amir-mobile-menu-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  position: absolute;
  z-index: 2;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}
.amir-mobile-menu-btn span {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--ud-text);
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.amir-mobile-menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.amir-mobile-menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.amir-mobile-menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.amir-mobile-topbar-brand {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-weight: 800;
  font-size: 14.5px;
  letter-spacing: 0.5px;
  text-align: center;
  max-width: calc(100% - 110px);
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.amir-mobile-topbar-brand span {
  background: linear-gradient(90deg, var(--ud-primary), var(--ud-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.amir-panel-brand-img { max-height: 32px; max-width: 130px; display: block; object-fit: contain; }
.amir-mobile-topbar-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-decoration: none;
  color: #ff8080;
  position: absolute;
  z-index: 2;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
}
.amir-logout-icon { display: block; }

/* ══════════════════════════════════════════
   افکت Liquid Glass مشترک برای هر سه منو (نوار بالا، نوار پایین، درور کشویی)
   بدون اینکه به قاب گرادیانت چرخشی دورشون آسیب بزنه (چون این افکت فقط
   روی لایه‌ی داخلی/شیشه‌ای اعمال می‌شه، نه لایه‌ی گرادیانت بیرونی)
══════════════════════════════════════════ */
.amir-mobile-topbar-inner,
.amir-mobile-bottom-nav-inner,
#amirPanelApp .amir-panel-sidebar-panel {
  background: linear-gradient(160deg, rgba(30, 34, 44, 0.65), rgba(10, 12, 16, 0.75));
  backdrop-filter: blur(22px) saturate(1.7);
  -webkit-backdrop-filter: blur(22px) saturate(1.7);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3),
    0 8px 28px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.amir-mobile-topbar-inner::before,
.amir-mobile-bottom-nav-inner::before,
#amirPanelApp .amir-panel-sidebar-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.03) 32%, rgba(255, 255, 255, 0) 60%);
  pointer-events: none;
}
.amir-mobile-bottom-nav-inner > *,
#amirPanelApp .amir-panel-sidebar-panel > * {
  position: relative;
  z-index: 1;
}

/* پس‌زمینه‌ی تیره پشت درور موبایل */
.amir-mobile-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 450;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
}
@media (max-width: 800px) {
  #amirPanelApp .amir-mobile-drawer-backdrop.is-open { display: block; opacity: 1; }
}

.amir-mobile-drawer-close { display: none; }

/* ══════════════════════════════════════════
   سایدبار: دسکتاپ = ستون ثابت کناری | موبایل = درور کشویی با قاب گرادیانت چرخشی
══════════════════════════════════════════ */
@media (max-width: 800px) {
  #amirPanelApp .amir-panel-sidebar {
    position: fixed;
    top: 16px;
    bottom: 96px;
    width: min(78vw, 300px);
    z-index: 460;
    padding: 2px; /* ضخامت قاب گرادیانت */
    border-radius: 24px;
    border: none;
    background: transparent;
    backdrop-filter: none;
    display: block;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, visibility 0s linear 0.4s;
    --nmh-c1: #00d4ff; --nmh-c2: #00ff96; --nmh-c3: #f472b6;
    --nmh-c4: #fb923c; --nmh-c5: #a78bfa; --nmh-c6: var(--nmh-c1);
  }
  #amirPanelApp[dir="rtl"] .amir-panel-sidebar { right: 16px; left: auto; transform: translateX(150%); }
  #amirPanelApp[dir="ltr"] .amir-panel-sidebar { left: 16px; right: auto; transform: translateX(-150%); }
  #amirPanelApp .amir-panel-sidebar.is-open {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateX(0) !important;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  }

  /* قاب گرادیانت چرخشی - تکنیک conic-gradient + mask-exclude */
  #amirPanelApp .amir-panel-sidebar::after {
    content: "";
    position: absolute;
    inset: 0;
    padding: 2px;
    border-radius: inherit;
    z-index: 0;
    background: conic-gradient(from var(--nmh-angle, 0deg), var(--nmh-c1), var(--nmh-c2), var(--nmh-c3), var(--nmh-c4), var(--nmh-c5), var(--nmh-c6));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    animation: amirGbSpin 4s linear infinite;
  }
  #amirPanelApp .amir-panel-sidebar::before {
    content: "";
    position: absolute;
    inset: -4px;
    padding: 6px;
    border-radius: inherit;
    background: conic-gradient(from var(--nmh-angle, 0deg), var(--nmh-c1), var(--nmh-c2), var(--nmh-c3), var(--nmh-c4), var(--nmh-c5), var(--nmh-c6));
    filter: blur(12px);
    opacity: 0.5;
    z-index: -1;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    animation: amirGbSpin 4s linear infinite;
  }
  @property --nmh-angle { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
  @keyframes amirGbSpin { to { --nmh-angle: 360deg; } }

  #amirPanelApp .amir-panel-sidebar-panel {
    position: relative;
    z-index: 1;
    height: 100%;
    border-radius: 22px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
  }

  #amirPanelApp .amir-mobile-drawer-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: none;
    color: var(--ud-text);
    font-size: 14px;
    margin-inline-start: auto;
    margin-bottom: 12px;
    cursor: pointer;
  }
}
@media (min-width: 801px) {
  .amir-panel-sidebar-panel { display: contents; }
}

/* سایدبار (دسکتاپ) */
.amir-panel-sidebar {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(16px);
  border-inline-end: 1px solid var(--ud-border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
}

.amir-panel-app-brand {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 1px;
  margin-bottom: 24px;
  color: var(--ud-text);
  text-align: center;
}
.amir-panel-app-brand .amir-panel-brand-img { margin: 0 auto; }
.amir-panel-app-brand span {
  background: linear-gradient(90deg, var(--ud-primary), var(--ud-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
@media (max-width: 800px) { #amirPanelApp .amir-panel-app-brand { display: none; } }

.amir-panel-sidebar-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--ud-card-border);
}
.amir-panel-sidebar-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--ud-primary);
}
.amir-panel-sidebar-name { font-weight: 700; font-size: 14px; color: var(--ud-text); }
.amir-panel-sidebar-identity .amir-plan-badge { margin-inline-start: 0; }

.amir-mobile-topbar-brand { display: flex; align-items: center; }

.amir-panel-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }

.amir-panel-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  color: var(--ud-muted);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  text-align: start;
  padding: 11px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.amir-panel-nav-item:hover { background: rgba(255,255,255,0.04); color: var(--ud-text); }
.amir-panel-nav-item.active {
  background: linear-gradient(90deg, rgba(0,212,255,0.15), rgba(0,255,150,0.1));
  color: var(--ud-text);
  box-shadow: inset 3px 0 0 var(--ud-primary);
}

/* آیکون‌های منوی سفارشی (اموجی یا تصویر/گیف) - اندازه‌ی ثابت تا نویگیشن بهم نریزد */
.amir-panel-nav-icon-emoji { display: inline-block; width: 18px; text-align: center; flex-shrink: 0; }
.amir-panel-nav-icon-img {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  object-fit: cover;
  flex-shrink: 0;
  vertical-align: middle;
}

/* منوهای تو در تو (زیرمنو) */
.amir-panel-nav-group { display: flex; flex-direction: column; }
.amir-panel-nav-group-toggle { justify-content: space-between; width: 100%; }
.amir-panel-nav-caret { font-size: 13px; transition: transform 0.2s; color: var(--ud-text); opacity: 0.75; margin-inline-start: auto; }
.amir-panel-nav-group.amir-nav-expanded > .amir-panel-nav-group-toggle .amir-panel-nav-caret { transform: rotate(180deg); }
.amir-panel-nav-children {
  display: none;
  flex-direction: column;
  gap: 2px;
  margin-top: 2px;
}
.amir-panel-nav-group.amir-nav-expanded > .amir-panel-nav-children { display: flex; }
.amir-panel-nav-children .amir-panel-nav-item { font-size: 12.5px; }

.amir-panel-logout {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ff6b6b;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 11px 14px;
  margin-top: 12px;
}

/* محتوای اصلی */
.amir-panel-main { position: relative; z-index: 1; padding: 32px; overflow-x: hidden; }
@media (max-width: 800px) { #amirPanelApp .amir-panel-main { padding: 20px; } }

.amir-panel-section { display: none; }
.amir-panel-section.active { display: block; animation: amirPanelFadeIn 0.3s ease; }
@keyframes amirPanelFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.amir-panel-section h2 { font-size: 19px; font-weight: 700; margin: 0 0 18px; }
.amir-panel-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}
.amir-panel-section-header h2 { margin: 0; }
.amir-panel-muted { color: var(--ud-muted); font-size: 13px; }

/* نسخه‌ی سمت کاربر (front-end) کلاس‌های amir-panel-card/field که در admin.css تعریف شده‌اند؛
   بخش «بانک پزشکی» روی داشبورد کاربر از همین کلاس‌ها استفاده می‌کند */
.amir-panel-card {
  background: var(--ud-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--ud-card-border);
  border-radius: 16px;
  padding: 22px 24px;
  margin-bottom: 20px;
}
.amir-panel-card-title { font-size: 15px; font-weight: 700; color: var(--ud-text); margin: 0 0 16px; }
.amir-panel-field { margin-bottom: 16px; }
.amir-panel-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--ud-text); }
.amir-panel-hint { display: block; color: var(--ud-muted); font-size: 12px; margin-top: 6px; line-height: 1.7; }
.amir-panel-field input[type="text"],
.amir-panel-field input[type="date"],
.amir-panel-field input[type="file"],
.amir-panel-field textarea,
.amir-panel-field select {
  width: 100%;
  background: var(--ud-bg);
  border: 1.5px solid var(--ud-card-border);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--ud-text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
.amir-panel-field input:focus, .amir-panel-field textarea:focus, .amir-panel-field select:focus {
  border-color: var(--ud-primary);
}

/* استایل شیک برای ورودی تاریخ (استپر بومی مرورگر رو با تم تیره هماهنگ می‌کنیم) */
.amir-panel-field input[type="date"] {
  position: relative;
  cursor: pointer;
  color-scheme: dark;
}
.amir-panel-field input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.75;
  filter: invert(1);
  border-radius: 6px;
  padding: 3px;
  margin-inline-start: 6px;
  transition: opacity 0.15s ease, background 0.15s ease;
}
.amir-panel-field input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
  background: rgba(0, 212, 255, 0.16);
}

/* استایل شیک برای فیلدهای قفل‌شده (ایمیل/موبایل غیرقابل‌تغییر) */
.amir-panel-field input:disabled {
  background: rgba(255, 255, 255, 0.025);
  border-color: rgba(255, 255, 255, 0.07);
  color: var(--ud-muted);
  cursor: not-allowed;
  opacity: 1;
}

/* دکمه‌ی شیکِ تبدیل تاریخ شمسی/میلادی، کنار هر ورودیِ تاریخ */
.amir-date-field-wrap { display: flex; align-items: center; gap: 8px; }
.amir-date-field-wrap input[type="date"] { flex: 1; min-width: 0; }
.amir-date-field-jalali {
  flex: 1;
  min-width: 0;
  background: var(--ud-bg);
  border: 1.5px solid var(--ud-card-border);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--ud-text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  font-variant-numeric: tabular-nums;
  text-align: end;
}
.amir-date-field-jalali:focus { border-color: var(--ud-primary); }
.amir-date-field-jalali::placeholder { color: var(--ud-muted); opacity: 0.6; }
.amir-date-field-toggle {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1.5px solid var(--ud-card-border);
  background: linear-gradient(135deg, rgba(0,212,255,0.14), rgba(168,85,247,0.1));
  color: var(--ud-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.35s ease, border-color 0.2s ease, background 0.2s ease;
}
.amir-date-field-toggle:hover {
  border-color: rgba(0, 212, 255, 0.45);
  background: linear-gradient(135deg, rgba(0,212,255,0.22), rgba(168,85,247,0.16));
  transform: rotate(180deg);
}

.amir-panel-account-card {
  background: var(--ud-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--ud-card-border);
  border-radius: 14px;
  padding: 22px;
  font-size: 14px;
  line-height: 2.2;
}

.amir-panel-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 24px;
}
@media (max-width: 640px) { .amir-panel-quick-grid { grid-template-columns: 1fr; } }

.amir-panel-quick-card {
  background: var(--ud-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--ud-card-border);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  color: var(--ud-text);
  font-family: inherit;
  transition: border-color 0.25s, transform 0.2s, box-shadow 0.25s;
}
.amir-panel-quick-card:hover { border-color: var(--ud-primary); transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0, 212, 255, 0.15); }
.amir-panel-quick-card .q-icon { font-size: 22px; }
.amir-panel-quick-card .q-title { font-size: 13.5px; font-weight: 600; }


.amir-dash-user-wrap {
  --ud-primary: #00d4ff;
  --ud-secondary: #00ff96;
  --ud-bg: #0b0d12;
  --ud-card: #14161d;
  --ud-border: #262a33;
  --ud-text: #f0f2f5;
  --ud-muted: #9098a8;

  background: var(--ud-bg);
  color: var(--ud-text);
  border-radius: 20px;
  padding: 32px;
  font-family: "Space Grotesk", "Vazirmatn", sans-serif;
  max-width: 1000px;
  margin: 0 auto;
}
.amir-dash-user-wrap * { box-sizing: border-box; }

.amir-dash-user-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--ud-border);
}
.amir-dash-user-header h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 4px;
}
.amir-dash-user-header p {
  margin: 0;
  color: var(--ud-muted);
  font-size: 13px;
}
.amir-dash-user-clock {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(90deg, var(--ud-primary), var(--ud-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-variant-numeric: tabular-nums;
}

/* ══════════════════════════════════════════════════════════════
   گزارش دستیاران هوشمند — ویجت مدرن، شیک، لوکس و انیمیشنی
══════════════════════════════════════════════════════════════ */
@keyframes amirAgentCardIn {
  to { opacity: 1; transform: translateY(0); }
}

.amir-dash-user-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
@media (max-width: 900px) { .amir-dash-user-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .amir-dash-user-grid { grid-template-columns: repeat(2, 1fr); } }

.amir-dash-user-card {
  background: var(--ud-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--ud-card-border);
  border-radius: 16px;
  padding: 18px 18px;
  text-align: start;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  animation: amirCardPopIn 0.5s cubic-bezier(.2,.8,.2,1) both;
  width: 100%;
  cursor: pointer;
  color: var(--ud-text);
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.amir-dash-user-grid .amir-dash-user-card:nth-child(1) { animation-delay: 0.05s; }
.amir-dash-user-grid .amir-dash-user-card:nth-child(2) { animation-delay: 0.1s; }
.amir-dash-user-grid .amir-dash-user-card:nth-child(3) { animation-delay: 0.15s; }
.amir-dash-user-grid .amir-dash-user-card:nth-child(4) { animation-delay: 0.2s; }
@keyframes amirCardPopIn {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.amir-dash-user-card:hover {
  transform: translateY(-4px);
  border-color: var(--ud-primary);
  box-shadow: 0 14px 34px rgba(0, 212, 255, 0.15);
}
.amir-dash-user-info { min-width: 0; overflow: hidden; }
.amir-dash-user-icon { font-size: 28px; line-height: 1; flex-shrink: 0; opacity: 0.9; }
.amir-dash-user-value { font-size: 28px; font-weight: 800; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.amir-dash-user-label { font-size: 12px; color: var(--ud-muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* در کاشی‌های باریک (مثل ساعت با ثانیه‌شمار: 00:27:23) روی موبایل، عدد بزرگ ممکن است روی آیکون کنارش سوار شود؛
   روی صفحه‌های باریک، هم عدد و هم آیکون کمی کوچک‌تر می‌شوند تا در کنار هم جا شوند */
@media (max-width: 560px) {
  .amir-dash-user-value { font-size: 21px; }
  .amir-dash-user-icon { font-size: 22px; }
}

.amir-dash-user-card-static { cursor: default; }
.amir-dash-user-card-static:hover { transform: none; }
.amir-streak-card .amir-dash-user-value { background: linear-gradient(135deg, #ff9d3d, #ff3d3d); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.amir-streak-card:hover { border-color: #ff6a3d; box-shadow: 0 14px 34px rgba(255, 106, 61, 0.18); transform: translateY(-4px); }
.amir-weather-card:hover { transform: translateY(-4px); }

.amir-plan-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 999px;
  vertical-align: middle;
  margin-inline-start: 8px;
}

.amir-settings-avatar-row { display: flex; align-items: center; gap: 18px; margin-bottom: 16px; }
.amir-settings-avatar-preview { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 2px solid var(--ud-bg, #050608); flex-shrink: 0; display: block; }
.amir-settings-hint { display: block; margin-top: 6px; font-size: 12px; color: var(--tk-muted, #9098a8); }
.amir-settings-field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 18px; }
@media (max-width: 640px) { .amir-settings-field-grid { grid-template-columns: 1fr; } }

/* ===== حلقه‌ی درصد تکمیل پروفایل، دور آواتار (همان تکنیک conic-gradient ماسک‌شده‌ی استوری‌ها) ===== */
.amir-profile-avatar-ring {
  --percent: 0;
  position: relative;
  display: inline-flex;
  padding: 4px;
  border-radius: 50%;
  flex-shrink: 0;
  background: conic-gradient(#00d4ff 0%, #00ff96 calc(var(--percent) * 1%), rgba(255,255,255,0.14) calc(var(--percent) * 1%) 100%);
  transition: background 0.6s ease;
}
.amir-profile-avatar-ring .amir-settings-avatar-preview { border: 2px solid var(--ud-bg, #050608); }

/* ===== کارت شیک گیج (Gauge) درصد تکمیل پروفایل ===== */
.amir-profile-completion-card {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  background: linear-gradient(155deg, rgba(0,212,255,0.07), rgba(168,85,247,0.05));
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 20px;
  padding: 22px 26px;
  margin-bottom: 22px;
}
.amir-profile-gauge { --percent: 0; position: relative; width: 132px; height: 132px; flex-shrink: 0; }
.amir-profile-gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.amir-profile-gauge-track { fill: none; stroke: rgba(255,255,255,0.08); stroke-width: 10; }
.amir-profile-gauge-fill {
  fill: none;
  stroke: url(#amirProfileGaugeGrad);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 327;
  stroke-dashoffset: calc(327 - (327 * var(--percent) / 100));
  transition: stroke-dashoffset 1s cubic-bezier(.2,.8,.3,1);
}
.amir-profile-gauge-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.amir-profile-gauge-percent {
  font-size: 27px;
  font-weight: 800;
  background: linear-gradient(90deg, #00d4ff, #00ff96 55%, #a855f7);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}
.amir-profile-gauge-caption { font-size: 11px; color: var(--ud-muted, #9098a8); margin-top: 2px; }

.amir-profile-checklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 20px; flex: 1; min-width: 220px; }
.amir-profile-checklist li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ud-muted, #9098a8); transition: color 0.3s ease; }
.amir-profile-checklist-icon {
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; flex-shrink: 0;
  background: rgba(255,255,255,0.08); color: var(--ud-muted, #9098a8);
  transition: background 0.3s ease, color 0.3s ease;
}
.amir-profile-checklist li.is-done { color: var(--ud-text, #f0f2f5); }
.amir-profile-checklist li.is-done .amir-profile-checklist-icon { background: linear-gradient(135deg, #00d4ff, #00ff96); color: #04121a; }

.amir-panel-alert-success { background: rgba(0, 255, 150, 0.1); border: 1px solid rgba(0, 255, 150, 0.35); color: #00ff96; padding: 10px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; max-width: 720px; }
.amir-panel-alert-error { background: rgba(255, 80, 80, 0.1); border: 1px solid rgba(255, 80, 80, 0.35); color: #ff8080; padding: 10px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; max-width: 720px; }

/* ===== بانک داده ===== */
.amir-fm-quota-bar { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13px; color: var(--ud-muted); margin-bottom: 16px; }
.amir-fm-breadcrumb { font-size: 13px; margin-bottom: 18px; color: var(--ud-muted); }
.amir-fm-breadcrumb a, .amir-fm-crumb { color: var(--ud-primary); text-decoration: none; }
.amir-fm-breadcrumb a:hover { text-decoration: underline; }

.amir-fm-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 22px; }
.amir-fm-inline-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--ud-card); border: 1px solid var(--ud-card-border); border-radius: 12px; padding: 10px 14px; }
.amir-fm-inline-form input[type="text"] {
  background: var(--ud-bg, #0b0d12);
  border: 1.5px solid var(--ud-card-border);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--ud-text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
}
.amir-fm-upload-submit { background: var(--ud-card); color: var(--ud-text); border: 1px solid var(--ud-card-border); box-shadow: none; }
.amir-fm-upload-submit:hover { border-color: var(--ud-primary); }

.amir-fm-grid { display: flex; flex-direction: column; gap: 8px; }
.amir-fm-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--ud-card);
  border: 1px solid var(--ud-card-border);
  border-radius: 10px;
  padding: 10px 14px;
  transition: border-color 0.2s;
}
.amir-fm-item:hover { border-color: var(--ud-primary); }
.amir-fm-item-open { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: var(--ud-text); text-decoration: none; }
.amir-fm-item-icon { font-size: 18px; flex-shrink: 0; }
.amir-fm-item-name { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amir-fm-item-size { font-size: 12px; color: var(--ud-muted); flex-shrink: 0; margin-inline-start: auto; }
.amir-fm-delete-form { flex-shrink: 0; }
.amir-fm-delete-btn { background: none; border: none; cursor: pointer; font-size: 15px; opacity: 0.7; padding: 4px; }
.amir-fm-delete-btn:hover { opacity: 1; }

/* ===== کیف پول ===== */
.amir-wallet-balance-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.12), rgba(0, 255, 150, 0.08));
  border: 1px solid var(--ud-card-border);
  border-radius: 16px;
  padding: 22px 26px;
  margin-bottom: 22px;
  max-width: 340px;
}
.amir-wallet-balance-label { font-size: 13px; color: var(--ud-muted); }
.amir-wallet-balance-amount { font-size: 30px; font-weight: 800; background: linear-gradient(90deg, var(--ud-primary), var(--ud-secondary)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.amir-wallet-wrap { max-width: 620px; }
.amir-wallet-wrap table { width: 100%; border-collapse: collapse; color: var(--ud-text); font-size: 13px; }
.amir-wallet-wrap table th, .amir-wallet-wrap table td { padding: 10px 12px; border-bottom: 1px solid var(--ud-card-border); text-align: start; }

/* ===== امیر کوین ===== */
.amir-coin-balance-card {
  background: linear-gradient(135deg, rgba(255, 209, 102, 0.16), rgba(168, 85, 247, 0.10));
}
.amir-coin-history-title { font-size: 15px; margin: 26px 0 12px; color: var(--ud-text); }
.amir-coin-history {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 620px;
}
.amir-coin-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--ud-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--ud-card-border);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13px;
}
.amir-coin-history-reason { color: var(--ud-text); flex: 1; }
.amir-coin-history-date { color: var(--ud-muted); font-size: 12px; white-space: nowrap; }
.amir-coin-history-amount { font-weight: 700; white-space: nowrap; min-width: 60px; text-align: end; }
.amir-coin-history-row.amir-coin-in .amir-coin-history-amount { color: #00d47a; }
.amir-coin-history-row.amir-coin-out .amir-coin-history-amount { color: #ff5c5c; }

/* ===== کاشی‌های قیمت بازار (دلار، طلا، ارز دیجیتال) ===== */
.amir-market-tile {
  grid-column: span 2;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}
.amir-market-tile-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.amir-market-tile-chart { height: 40px; color: var(--ud-primary); }
.amir-market-svg { display: block; width: 100%; height: 100%; }
.amir-market-svg-empty { color: var(--ud-muted); }

/* انیمیشن رسم نمودار از ابتدا به انتها، هر بار که یک نمودار نمایش داده می‌شود (کلیک روی چیپ یا تب) */
.amir-market-drawline {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.amir-market-drawline.amir-drawn {
  transition: stroke-dashoffset 1.1s cubic-bezier(.22,.9,.3,1);
  stroke-dashoffset: 0;
}

/* ══════════════════════════════════════════════════════════════
   کشوی جستجوپذیرِ شیک — برای انتخاب از میان گزینه‌های زیاد
   (پارامترهای پزشکی، و هر جای دیگری با تعداد بالای گزینه)
══════════════════════════════════════════════════════════════ */
.amir-search-select { position: relative; margin-bottom: 20px; max-width: 420px; }
.amir-search-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--ud-card);
  border: 1.5px solid var(--ud-card-border);
  border-radius: 14px;
  padding: 12px 16px;
  color: var(--ud-text);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.amir-search-select-trigger:hover { border-color: rgba(0, 212, 255, 0.35); }
.amir-search-select.is-open .amir-search-select-trigger {
  border-color: var(--ud-primary);
  background: rgba(0, 212, 255, 0.06);
}
.amir-search-select-trigger-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amir-search-select-trigger-icon {
  flex-shrink: 0;
  color: var(--ud-muted);
  transition: transform 0.25s ease;
  font-size: 12px;
}
.amir-search-select.is-open .amir-search-select-trigger-icon { transform: rotate(180deg); color: var(--ud-primary); }

.amir-search-select-panel {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-start: 0;
  width: min(360px, 100vw - 24px);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px);
  background: linear-gradient(165deg, rgba(20,23,32,0.98), rgba(8,10,15,0.99));
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  z-index: 40;
  transition: max-height 0.25s ease, opacity 0.2s ease, transform 0.2s ease;
}
.amir-search-select.is-open .amir-search-select-panel {
  max-height: 360px;
  opacity: 1;
  transform: translateY(0);
}
.amir-search-select-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.amir-search-select-search-icon { font-size: 13px; opacity: 0.7; flex-shrink: 0; }
.amir-search-select-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--ud-text);
  font-family: inherit;
  font-size: 13px;
}
.amir-search-select-search-input::placeholder { color: var(--ud-muted); }
.amir-search-select-options {
  max-height: 300px;
  overflow-y: auto;
  padding: 6px;
}
.amir-search-select-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: none;
  border: none;
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--ud-text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: start;
  cursor: pointer;
  transition: background 0.15s ease;
}
.amir-search-select-option:hover { background: rgba(255,255,255,0.05); }
.amir-search-select-option.active { background: rgba(0, 212, 255, 0.12); color: var(--ud-primary); }
.amir-search-select-option-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amir-search-select-option-cat { flex-shrink: 0; font-size: 11px; color: var(--ud-muted); font-weight: 500; }
.amir-search-select-empty { padding: 20px 12px; text-align: center; font-size: 12.5px; color: var(--ud-muted); }

.amir-market-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.amir-market-tab {
  background: var(--ud-card);
  border: 1px solid var(--ud-card-border);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ud-muted);
  cursor: pointer;
  font-family: inherit;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.amir-market-tab.active { color: var(--ud-bg); background: var(--chip-color, var(--ud-primary)); border-color: transparent; }

.amir-market-panel { display: none; }
.amir-market-panel.active { display: block; animation: amirCardPopIn 0.4s cubic-bezier(.2,.8,.2,1) both; }
.amir-market-panel-header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.amir-market-panel-price { font-size: 34px; font-weight: 800; }
.amir-market-panel-unit { font-size: 14px; color: var(--ud-muted); font-weight: 500; }
.amir-market-panel-change { font-size: 14px; font-weight: 700; }
.amir-market-panel-change.amir-market-up { color: #00d47a; }
.amir-market-panel-change.amir-market-down { color: #ff5c5c; }
.amir-market-panel-chart {
  background: var(--ud-card);
  border: 1px solid var(--ud-card-border);
  border-radius: 16px;
  padding: 16px;
  max-width: 760px;
}

/* ===== کارت یکپارچه‌ی بازار (روی داشبورد، چند خط رنگی روی هم) ===== */
.amir-market-unified-card {
  margin: 24px 0;
  padding: 22px 24px 20px;
}
.amir-market-unified-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
}
.amir-market-unified-title { font-size: 16px; font-weight: 700; color: var(--ud-text); }
.amir-market-unified-subtitle { font-size: 12px; margin-top: 2px; }

.amir-market-legend { display: flex; flex-wrap: wrap; gap: 8px; }
.amir-market-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--ud-card-border);
  border-radius: 999px;
  padding: 6px 12px 6px 10px;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.2s, border-color 0.2s;
}
.amir-market-chip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--chip-color); flex-shrink: 0; }
.amir-market-chip-label { font-size: 12px; color: var(--ud-muted); }
.amir-market-chip-value { font-size: 12px; font-weight: 700; color: var(--ud-text); }
.amir-market-chip.active { border-color: var(--chip-color); background: color-mix(in srgb, var(--chip-color) 14%, transparent); }
.amir-market-chip.active .amir-market-chip-label { color: var(--ud-text); }

.amir-market-chart-wrap {
  position: relative;
  height: 220px;
  margin: 8px 0 4px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent 60%);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.amir-market-unified-svg { width: 100%; height: 100%; display: block; }
.amir-market-series { display: none; }
.amir-market-series.active { display: block; }
.amir-market-chart-empty { font-size: 13px; text-align: center; padding: 0 20px; }
.amir-market-grid-line { color: var(--ud-border, rgba(255,255,255,0.08)); opacity: 0.55; }

/* برچسب‌های نمادینِ محور قیمت (بالا/پایین)، بسیار کم‌رنگ و شیک، فقط برای جهت‌دهی بدون شلوغی */
.amir-market-axis-y {
  position: absolute;
  inset-block: 10px;
  inset-inline-start: 10px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}
.amir-market-axis-y span {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: var(--ud-muted, #9098a8);
  background: rgba(5,6,8,0.55);
  backdrop-filter: blur(3px);
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.06);
  transition: color 0.3s ease;
}

/* نوار زمانیِ نمادین زیر نمودار (چند تیک، نه شلوغ) */
.amir-market-axis-x {
  display: flex;
  justify-content: space-between;
  padding: 0 4px;
  margin: 2px 0 10px;
}
.amir-market-axis-x span {
  font-size: 10.5px;
  color: var(--ud-muted, #9098a8);
  opacity: 0.75;
  font-variant-numeric: tabular-nums;
}

.amir-market-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  padding-top: 16px;
  margin-top: 8px;
  border-top: 1px solid var(--ud-card-border);
}
.amir-market-stat { display: flex; flex-direction: column; gap: 4px; min-width: 90px; }
.amir-market-stat-label { font-size: 11px; font-weight: 700; letter-spacing: 0.3px; }
.amir-market-stat-value { font-size: 17px; font-weight: 800; color: var(--ud-text); }
.amir-market-stat-value small { font-size: 11px; font-weight: 500; color: var(--ud-muted); }

.amir-market-more-link {
  display: inline-block;
  margin-top: 16px;
  background: none;
  border: none;
  color: var(--ud-primary);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}

/* ===== بانک پزشکی ===== */
.amir-medical-disclaimer { font-size: 12.5px; line-height: 1.8; margin-bottom: 16px; }

.amir-medical-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin: 18px 0 26px;
}
.amir-medical-category-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: var(--ud-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid var(--ud-card-border);
  border-radius: 16px;
  padding: 20px 12px;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}
.amir-medical-category-tile:hover { transform: translateY(-3px); border-color: var(--ud-primary); }
.amir-medical-category-tile.active { border-color: var(--ud-primary); background: rgba(74, 158, 255, 0.08); }
.amir-medical-category-tile-icon { font-size: 30px; line-height: 1; }
.amir-medical-category-tile-label { font-size: 12.5px; font-weight: 600; color: var(--ud-text); text-align: center; line-height: 1.4; }

.amir-medical-add-wrap { margin-top: 20px; margin-bottom: 28px; }

/* ===== تب دستی/هوشمند (AI) در بانک پزشکی ===== */
.amir-medical-mode-tabs { display: flex; gap: 10px; margin: 4px 0 18px; flex-wrap: wrap; }
.amir-medical-mode-btn {
  background: var(--ud-card);
  border: 1.5px solid var(--ud-card-border);
  border-radius: 999px;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ud-muted);
  cursor: pointer;
  font-family: inherit;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.amir-medical-mode-btn.active { color: var(--ud-bg); background: linear-gradient(90deg, var(--ud-primary), var(--ud-secondary)); border-color: transparent; }

.amir-medical-ai-avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; vertical-align: middle; margin-inline-end: 8px; }
.amir-medical-ai-divider { text-align: center; color: var(--ud-muted); font-size: 12px; margin: 14px 0; position: relative; }
.amir-medical-ai-divider::before, .amir-medical-ai-divider::after {
  content: ""; position: absolute; top: 50%; width: 42%; height: 1px; background: var(--ud-card-border);
}
.amir-medical-ai-divider::before { inset-inline-start: 0; }
.amir-medical-ai-divider::after { inset-inline-end: 0; }

.amir-medical-ai-status { margin-top: 14px; font-size: 13px; line-height: 1.8; min-height: 1px; }
.amir-medical-ai-status-loading { color: var(--ud-primary); }
.amir-medical-ai-status-success { color: #00d47a; }
.amir-medical-ai-status-error { color: #ff5c5c; }
.amir-medical-add-wrap form { display: flex; flex-direction: column; gap: 4px; }

.amir-medical-preset-fields,
.amir-medical-custom-fields { border-top: 1px solid var(--ud-card-border); padding-top: 14px; margin-top: 10px; }

.amir-medical-custom-param-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.8fr 1fr 1fr auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
@media (max-width: 640px) { .amir-medical-custom-param-row { grid-template-columns: 1fr 1fr; } }
.amir-medical-custom-param-row input {
  background: var(--ud-bg);
  border: 1.5px solid var(--ud-card-border);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13px;
  color: var(--ud-text);
  font-family: inherit;
}
.amir-medical-remove-param-btn {
  background: rgba(255, 92, 92, 0.12);
  border: 1px solid rgba(255, 92, 92, 0.3);
  color: #ff5c5c;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 14px;
  flex-shrink: 0;
}
.amir-medical-add-param-btn {
  background: var(--ud-card);
  border: 1.5px dashed var(--ud-card-border);
  border-radius: 10px;
  padding: 8px 16px;
  color: var(--ud-primary);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  margin-top: 4px;
}

.amir-medical-value-chip {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--ud-card-border);
}
.amir-medical-value-chip.amir-market-up { color: #00d47a; border-color: rgba(0, 212, 122, 0.35); background: rgba(0, 212, 122, 0.08); }
.amir-medical-value-chip.amir-market-down { color: #ff5c5c; border-color: rgba(255, 92, 92, 0.35); background: rgba(255, 92, 92, 0.08); }
.amir-medical-link { color: var(--ud-primary); font-size: 13px; font-weight: 700; text-decoration: none; }
.amir-medical-delete-form { display: inline-block; }
.amir-medical-delete-btn {
  background: none;
  border: none;
  color: #ff5c5c;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}

/* ===== گروه‌بندی گیاهان ===== */
.amir-plant-group-chips { margin-bottom: 14px; }
.amir-plant-group-add-form { display: flex; gap: 10px; flex-wrap: wrap; }
.amir-plant-group-add-form input[type="text"] {
  flex: 1;
  min-width: 200px;
  background: var(--ud-bg);
  border: 1.5px solid var(--ud-card-border);
  border-radius: 10px;
  padding: 9px 14px;
  color: var(--ud-text);
  font-family: inherit;
  font-size: 13px;
}

/* ===== گرید کارت‌های گیاه — شیک، مدرن، با نشان وضعیت آبیاری ===== */
.amir-plant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 4px;
}
.amir-plant-card {
  background: var(--ud-card);
  border: 1px solid var(--ud-card-border);
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.amir-plant-card:hover { transform: translateY(-3px); border-color: rgba(0, 255, 150, 0.35); }
.amir-plant-card-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: linear-gradient(155deg, rgba(0,255,150,0.12), rgba(0,212,255,0.06));
  display: flex;
  align-items: center;
  justify-content: center;
}
.amir-plant-card-photo img { width: 100%; height: 100%; object-fit: cover; }
.amir-plant-card-photo-fallback { font-size: 46px; opacity: 0.55; }
.amir-plant-care-badge {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(5,6,8,0.7);
  box-shadow: 0 0 10px currentColor;
}
.amir-plant-care-ok { background: #00d47a; color: #00d47a; }
.amir-plant-care-due { background: #ffb703; color: #ffb703; animation: amirPlantPulse 1.6s ease-in-out infinite; }
.amir-plant-care-overdue { background: #ff5c5c; color: #ff5c5c; animation: amirPlantPulse 1.2s ease-in-out infinite; }
.amir-plant-care-unknown { background: rgba(255,255,255,0.25); color: rgba(255,255,255,0.25); }
@keyframes amirPlantPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.55; transform: scale(1.25); } }

.amir-plant-card-body { padding: 14px 16px 16px; }
.amir-plant-card-name { font-weight: 800; font-size: 14.5px; color: var(--ud-text); }
.amir-plant-care-status { font-size: 12px; font-weight: 700; margin-top: 9px; }
.amir-plant-care-status-ok { color: #00d47a; }
.amir-plant-care-status-due { color: #ffb703; }
.amir-plant-care-status-overdue { color: #ff5c5c; }
.amir-plant-care-status-unknown { color: var(--ud-muted); }
.amir-plant-card-tips { font-size: 11.5px; line-height: 1.7; margin: 8px 0 0; }
.amir-plant-card-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.amir-plant-water-btn {
  background: linear-gradient(90deg, #4a9eff, #00d4b8);
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 700;
  color: #04121a;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s ease;
}
.amir-plant-water-btn:active { transform: scale(0.95); }
.amir-plant-water-btn-done { animation: amirPlantWaterDone 0.6s ease; }
@keyframes amirPlantWaterDone { 0% { transform: scale(1); } 40% { transform: scale(1.12); } 100% { transform: scale(1); } }

/* ===== داروها: ساعت‌های مصرف + نتیجه‌ی بررسی تداخل ===== */
.amir-medication-times-wrap { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.amir-medication-interactions-result {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.9;
  white-space: pre-line;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--ud-card-border);
  display: none;
}
.amir-medication-interactions-result:not(:empty) { display: block; }
.amir-medication-interactions-result.is-loading { color: var(--ud-primary); }
.amir-medication-interactions-result.is-done { color: var(--ud-text); border-color: rgba(0, 212, 122, 0.3); }
.amir-medication-interactions-result.is-error { color: #ff5c5c; border-color: rgba(255, 92, 92, 0.3); }

/* ══════════════════════════════════════════════════════════════
   حالت‌های ورود هوشمند (اسکن/دوربین) — گل‌وگیاه و سلامت هوشمند
   طراحی لوکس: کارت‌های آیکون‌دار، دراپ‌زون شیشه‌ای، دکمه‌های گرادیانت
══════════════════════════════════════════════════════════════ */
.amir-smart-mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 4px 0 20px;
}
@media (max-width: 720px) { .amir-smart-mode-tabs { grid-template-columns: 1fr; } }

.amir-smart-mode-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--ud-card);
  border: 1.5px solid var(--ud-card-border);
  cursor: pointer;
  font-family: inherit;
  text-align: start;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  position: relative;
  overflow: hidden;
}
.amir-smart-mode-card:hover { transform: translateY(-2px); border-color: rgba(0, 212, 255, 0.35); }
.amir-smart-mode-card.active {
  border-color: transparent;
  background: linear-gradient(155deg, rgba(0,212,255,0.14), rgba(168,85,247,0.09));
  box-shadow: 0 8px 26px rgba(0, 212, 255, 0.16), inset 0 0 0 1.5px rgba(0,212,255,0.35);
}
.amir-smart-mode-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  background: linear-gradient(135deg, rgba(0,212,255,0.18), rgba(168,85,247,0.14));
  transition: transform 0.25s ease;
}
.amir-smart-mode-card.active .amir-smart-mode-icon { transform: scale(1.08) rotate(-4deg); }
.amir-smart-mode-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.amir-smart-mode-title { font-size: 13.5px; font-weight: 800; color: var(--ud-text); }
.amir-smart-mode-sub { font-size: 11px; color: var(--ud-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- پنل ایجنت هوشمند (اسکن/دوربین) --- */
.amir-smart-panel {
  border-radius: 22px;
  padding: 22px;
  margin-bottom: 20px;
  background: linear-gradient(165deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
  border: 1px solid rgba(255,255,255,0.08);
  position: relative;
  overflow: hidden;
}
.amir-smart-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(0,255,150,0.08), transparent 55%);
  pointer-events: none;
}
.amir-smart-panel-agent { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; position: relative; z-index: 1; }
.amir-smart-agent-ring {
  position: relative;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  padding: 2.5px;
  background: conic-gradient(from var(--story-angle, 0deg), #00d4ff, #00ff96, #a855f7, #ff2fb0, #00d4ff);
  animation: amirStoryRingSpin 6s linear infinite;
  display: flex; align-items: center; justify-content: center;
}
.amir-smart-agent-ring img, .amir-smart-agent-ring .amir-smart-agent-fallback {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
  background: var(--ud-bg); border: 2px solid var(--ud-bg);
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.amir-smart-agent-name { font-size: 14.5px; font-weight: 800; color: var(--ud-text); }
.amir-smart-agent-tag { font-size: 11px; color: var(--ud-muted); margin-top: 1px; }

/* --- دراپ‌زون آپلود عکس --- */
.amir-smart-dropzone {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255,255,255,0.03);
  border: 1.5px dashed rgba(255,255,255,0.16);
  min-height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease, background 0.2s ease;
  z-index: 1;
}
.amir-smart-dropzone.amir-smart-dropzone-drag { border-color: var(--ud-primary); background: rgba(0,212,255,0.07); }
.amir-smart-dropzone-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 16px; text-align: center; cursor: pointer; }
.amir-smart-dropzone-icon { font-size: 32px; margin-bottom: 2px; filter: drop-shadow(0 4px 14px rgba(0,255,150,0.3)); }
.amir-smart-dropzone-title { font-weight: 700; font-size: 14.5px; color: var(--ud-text); }
.amir-smart-dropzone-hint { font-size: 12px; color: var(--ud-muted); margin-bottom: 6px; }
.amir-smart-pick-btn {
  margin-top: 6px;
  padding: 10px 22px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  font-family: inherit;
  color: #04121a;
  background: linear-gradient(120deg, #00d4ff, #00ff96);
  box-shadow: 0 6px 20px rgba(0,212,255,0.28);
}
.amir-smart-preview-wrap { position: relative; width: 100%; min-height: 220px; background: #000; display: flex; align-items: center; justify-content: center; }
.amir-smart-preview-wrap img { width: 100%; max-height: 320px; object-fit: contain; }
.amir-smart-file-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--ud-text);
  font-size: 13px;
  font-weight: 700;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.amir-smart-preview-remove {
  position: absolute; top: 10px; inset-inline-end: 10px;
  width: 30px; height: 30px; border-radius: 50%; border: none;
  background: rgba(0,0,0,0.55); color: #fff; cursor: pointer; font-size: 14px; backdrop-filter: blur(4px);
}

/* --- دکمه‌ی تحلیل با هوش مصنوعی --- */
.amir-smart-analyze-btn {
  margin-top: 14px;
  width: 100%;
  padding: 13px;
  border-radius: 16px;
  border: none;
  cursor: pointer;
  font-weight: 800;
  font-size: 14px;
  font-family: inherit;
  color: #04121a;
  background: linear-gradient(120deg, #00d4ff, #a855f7 55%, #ff2fb0);
  background-size: 200% 100%;
  box-shadow: 0 10px 28px rgba(168,85,247,0.26);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: background-position 0.4s ease, transform 0.15s ease, opacity 0.2s ease;
  position: relative; z-index: 1;
}
.amir-smart-analyze-btn:hover { background-position: 100% 0; }
.amir-smart-analyze-btn:active { transform: scale(0.98); }
.amir-smart-analyze-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* --- دوربین هوشمند --- */
.amir-smart-camera-frame {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 4 / 3;
  border-radius: 20px;
  overflow: hidden;
  margin: 0 auto 14px;
  background: #000;
  border: 1.5px solid rgba(0,212,255,0.25);
  box-shadow: 0 10px 34px rgba(0,0,0,0.4);
}
.amir-smart-camera-frame video,
.amir-smart-camera-frame img {
  width: 100%; height: 100%; object-fit: cover; display: none;
}
.amir-smart-camera-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; position: relative; z-index: 1; }
.amir-smart-camera-btn {
  padding: 11px 20px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  font-family: inherit;
  display: inline-flex; align-items: center; gap: 7px;
  transition: transform 0.15s ease;
}
.amir-smart-camera-btn:active { transform: scale(0.96); }
.amir-smart-camera-btn-primary { color: #04121a; background: linear-gradient(120deg, #00d4ff, #00ff96); box-shadow: 0 6px 18px rgba(0,212,255,0.28); }
.amir-smart-camera-btn-ghost { color: var(--ud-text); background: rgba(255,255,255,0.06); border: 1.5px solid var(--ud-card-border); }

/* --- فرم افزودن، وقتی از حالت هوشمند فعال می‌شود با انیمیشن باز می‌شود --- */
.amir-smart-reveal { transition: opacity 0.4s ease, transform 0.4s ease; }
.amir-smart-reveal.amir-smart-reveal-hidden { display: none; }
.amir-smart-reveal.amir-smart-reveal-in { animation: amirSmartRevealIn 0.5s ease; }
@keyframes amirSmartRevealIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* --- استپر عددی شیک (بازه‌ی آبیاری و مشابه) --- */
.amir-stepper {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: var(--ud-bg);
  border: 1.5px solid var(--ud-card-border);
  border-radius: 14px;
  overflow: hidden;
  width: fit-content;
}
.amir-stepper-btn {
  width: 38px;
  height: 42px;
  border: none;
  background: rgba(255,255,255,0.04);
  color: var(--ud-primary);
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease;
  flex-shrink: 0;
}
.amir-stepper-btn:hover { background: rgba(0,212,255,0.12); }
.amir-stepper input[type="number"] {
  width: 56px;
  text-align: center;
  border: none;
  background: transparent;
  color: var(--ud-text);
  font-size: 15px;
  font-weight: 800;
  font-family: inherit;
  -moz-appearance: textfield;
}
.amir-stepper input[type="number"]::-webkit-outer-spin-button,
.amir-stepper input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.amir-stepper-unit { padding: 0 14px 0 4px; font-size: 12px; color: var(--ud-muted); font-weight: 700; }

/* --- چیپ‌های ساعت مصرف دارو --- */
.amir-medication-times-wrap { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 10px; }
.amir-time-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--ud-bg);
  border: 1.5px solid var(--ud-card-border);
  border-radius: 999px;
  padding: 6px 8px 6px 14px;
  transition: border-color 0.15s ease;
}
.amir-time-chip:hover { border-color: rgba(0, 212, 255, 0.35); }
.amir-time-chip-icon { font-size: 13px; }
.amir-time-chip input[type="time"] {
  border: none;
  background: transparent;
  color: var(--ud-text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
}
.amir-time-chip-remove {
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: rgba(255,92,92,0.12); color: #ff5c5c;
  font-size: 11px; cursor: pointer; flex-shrink: 0;
}
.amir-time-add-btn {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1.5px dashed rgba(0,212,255,0.35);
  background: rgba(0,212,255,0.06);
  color: var(--ud-primary);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

/* ══════════════════════════════════════════════════════════════
   دو کاشیِ معرفیِ ایجنت‌ها در داشبورد (سلامت هوشمند / گل‌وگیاه)
══════════════════════════════════════════════════════════════ */
.amir-agent-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}
@media (max-width: 640px) { .amir-agent-tiles { grid-template-columns: 1fr; } }

.amir-agent-tile {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 18px 20px;
  background: linear-gradient(155deg, rgba(255,255,255,0.055), rgba(255,255,255,0.015));
  border: 1px solid rgba(255,255,255,0.09);
  opacity: 0;
  transform: translateY(10px);
  animation: amirAgentCardIn 0.5s ease forwards;
}
.amir-agent-tile:nth-child(2) { animation-delay: 0.1s; }
.amir-agent-tile-health::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 0% 0%, rgba(0,212,255,0.12), transparent 55%); pointer-events: none; }
.amir-agent-tile-plants::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 0% 0%, rgba(0,255,150,0.12), transparent 55%); pointer-events: none; }
.amir-agent-tile-nutrition::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 0% 0%, rgba(255,183,3,0.14), transparent 55%); pointer-events: none; }

.amir-agent-tile-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; position: relative; z-index: 1; }
.amir-agent-tile-avatar-ring {
  position: relative;
  flex-shrink: 0;
  width: 50px; height: 50px;
  border-radius: 50%;
  padding: 2.5px;
  background: conic-gradient(from var(--story-angle, 0deg), #00d4ff, #00ff96, #a855f7, #ff2fb0, #00d4ff);
  animation: amirStoryRingSpin 6s linear infinite;
  display: flex; align-items: center; justify-content: center;
}
.amir-agent-tile-avatar-ring img, .amir-agent-tile-avatar-fallback {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
  background: var(--ud-bg); border: 2px solid var(--ud-bg);
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.amir-agent-tile-name { font-size: 14.5px; font-weight: 800; color: var(--ud-text); }
.amir-agent-tile-role { font-size: 11px; color: var(--ud-muted); margin-top: 1px; }

.amir-agent-tile-messages { display: flex; flex-direction: column; gap: 8px; position: relative; z-index: 1; }
.amir-agent-tile-msg {
  font-size: 12.5px;
  line-height: 1.7;
  padding: 10px 13px;
  border-radius: 13px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--ud-text);
}
.amir-agent-tile-msg-high { border-color: rgba(255, 140, 60, 0.35); background: rgba(255, 140, 60, 0.08); }
.amir-agent-tile-msg-calm { color: var(--ud-muted); }

/* حالتِ تک‌ستونه، وقتی کاشیِ ایجنت بالای خودِ صفحه‌ی اختصاصی (گل‌وگیاه/سلامت هوشمند) قرار می‌گیرد */
.amir-agent-tiles-single { grid-template-columns: 1fr; margin-bottom: 22px; }
.amir-agent-tile-solo { max-width: 640px; }

/* عنوانِ برجسته‌ی شمارش‌معکوس، داخل کاشیِ ایجنت (درخواستِ نمایش تیتروار) */
.amir-agent-tile-countdown-headline {
  font-size: 13.5px;
  font-weight: 800;
  margin-bottom: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--ud-text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 1;
  font-variant-numeric: tabular-nums;
  font-family: inherit;
  cursor: pointer;
  max-width: 100%;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.amir-agent-tile-countdown-headline::-webkit-scrollbar { display: none; }
.amir-agent-tile-countdown-headline:hover {
  background: rgba(0, 212, 255, 0.1);
  border-color: rgba(0, 212, 255, 0.3);
  transform: translateY(-1px);
}
.amir-agent-tile-countdown-headline:active { transform: translateY(0); }

/* پالسِ کوتاهِ برجسته‌سازی، وقتی از کاشیِ ایجنت به کارت گیاه/داروی مربوطه هدایت می‌شویم */
@keyframes amirTileHighlightPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0); }
  20% { box-shadow: 0 0 0 6px rgba(0, 212, 255, 0.35); }
  50% { box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.2); }
}
.amir-tile-highlight {
  animation: amirTileHighlightPulse 1.1s ease-out 2;
  border-color: rgba(0, 212, 255, 0.5) !important;
}

/* ══════════════════════════════════════════════════════════════
   شمارش معکوس زنده (گل‌وگیاه / داروها) — سراسری
══════════════════════════════════════════════════════════════ */
[data-countdown-ts] { font-variant-numeric: tabular-nums; }
.amir-countdown-overdue { color: #ff5c5c; }
.amir-countdown-num { font-weight: 800; }
.amir-countdown-unit {
  font-weight: 500;
  font-size: 0.82em;
  color: var(--ud-muted, #9098a8);
  margin-inline-end: 3px;
  margin-inline-start: 1px;
}
.amir-countdown-prefix { opacity: 0.85; font-weight: 600; }
.amir-countdown-overdue .amir-countdown-unit { color: rgba(255, 92, 92, 0.7); }

/* نشانِ بزرگ و جذابِ شمارش‌معکوس روی خودِ کاشی‌ها */
.amir-tile-countdown-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  background: linear-gradient(120deg, rgba(0,212,255,0.16), rgba(0,255,150,0.14));
  border: 1px solid rgba(0,212,255,0.3);
  color: #00ff96;
  box-shadow: 0 0 0 rgba(0,212,255,0.4);
  animation: amirCountdownGlow 2.6s ease-in-out infinite;
  max-width: 100%;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.amir-tile-countdown-badge::-webkit-scrollbar { display: none; }
.amir-tile-countdown-badge .amir-tile-countdown-icon { font-size: 16px; }
.amir-tile-countdown-badge.amir-countdown-overdue-badge {
  background: linear-gradient(120deg, rgba(255,92,92,0.18), rgba(255,140,60,0.14));
  border-color: rgba(255,92,92,0.4);
  color: #ff8080;
}
@keyframes amirCountdownGlow {
  0%, 100% { box-shadow: 0 0 0 rgba(0,212,255,0.25); }
  50% { box-shadow: 0 0 16px rgba(0,212,255,0.25); }
}

/* دکمه‌ی «جزئیات بیشتر» ظریف روی کاشی‌ها */
.amir-tile-more-hint {
  margin-top: 8px;
  font-size: 11px;
  color: var(--ud-muted);
  opacity: 0.75;
  display: flex;
  align-items: center;
  gap: 4px;
}
[data-detail-id] { cursor: pointer; }

/* ══════════════════════════════════════════════════════════════
   مودالِ عمومیِ «جزئیات کاشی»
══════════════════════════════════════════════════════════════ */
.amir-tile-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(3, 4, 8, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  padding: 20px;
}
.amir-tile-detail-overlay.is-open { display: flex; }
.amir-tile-detail-box {
  width: min(480px, 100%);
  max-height: 86vh;
  overflow-y: auto;
  background: linear-gradient(165deg, rgba(20,23,32,0.97), rgba(8,10,15,0.99));
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 24px;
  padding: 24px 22px;
  position: relative;
  box-shadow: 0 30px 90px rgba(0,0,0,0.55);
  animation: amirStoryPop 0.28s cubic-bezier(.2,.9,.3,1.2);
}
.amir-tile-detail-close {
  position: absolute;
  top: 16px;
  inset-inline-end: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  z-index: 2;
}
.amir-tile-detail-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 16px;
  background: linear-gradient(155deg, rgba(0,255,150,0.14), rgba(0,212,255,0.06));
  display: flex;
  align-items: center;
  justify-content: center;
}
.amir-tile-detail-photo img { width: 100%; height: 100%; object-fit: cover; }
.amir-tile-detail-photo-fallback { font-size: 52px; opacity: 0.6; }
.amir-tile-detail-title { font-size: 18px; font-weight: 800; color: var(--ud-text); margin-bottom: 3px; }
.amir-tile-detail-subtitle { font-size: 13px; color: var(--ud-primary); font-weight: 700; margin-bottom: 12px; }
.amir-tile-detail-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.amir-tile-detail-section-title { font-size: 12px; font-weight: 800; color: var(--ud-muted); margin: 14px 0 6px; text-transform: uppercase; letter-spacing: 0.3px; }
.amir-tile-detail-text { font-size: 13.5px; line-height: 1.9; color: var(--ud-text); }

/* جدولِ پارامترهای اندازه‌گیری‌شده (در مودالِ جزئیاتِ رکورد پزشکی) */
.amir-medical-values-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  margin-bottom: 6px;
}
.amir-medical-values-table thead th {
  text-align: start;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--ud-muted);
  padding: 6px 8px;
  border-bottom: 1px solid var(--ud-card-border);
}
.amir-medical-values-table tbody td {
  padding: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: var(--ud-text);
  vertical-align: middle;
}
.amir-medical-values-table tbody tr:last-child td { border-bottom: none; }
.amir-medical-values-table-val { font-weight: 800; font-variant-numeric: tabular-nums; }
.amir-medical-row-alert td:first-child { color: #ff8080; }
.amir-medical-row-alert .amir-medical-values-table-val { color: #ff8080; }
.amir-medical-row-ok .amir-medical-values-table-val { color: #00d47a; }

/* ══════════════════════════════════════════════════════════════
   کاشی‌های گروه‌بندی‌شده‌ی گل‌وگیاه، در بالای صفحه
══════════════════════════════════════════════════════════════ */
.amir-plant-group-section { margin-bottom: 26px; }
.amir-plant-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 800;
  color: var(--ud-text);
  margin: 0 0 12px;
}
.amir-plant-group-count {
  font-size: 11px;
  font-weight: 800;
  background: rgba(0, 212, 255, 0.12);
  color: var(--ud-primary);
  border-radius: 999px;
  padding: 1px 9px;
}
.amir-plant-existing-groups { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }

.amir-plant-empty-hero {
  text-align: center;
  padding: 46px 20px;
  border: 1.5px dashed var(--ud-card-border);
  border-radius: 18px;
  margin-bottom: 22px;
}
.amir-plant-empty-hero-icon { font-size: 38px; margin-bottom: 8px; }

/* ══════════════════════════════════════════════════════════════
   خلاصه‌ی روزانه‌ی کالری (بخش تغذیه)
══════════════════════════════════════════════════════════════ */
.amir-food-summary-row { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.amir-food-summary-ring {
  --percent: 0;
  position: relative;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  flex-shrink: 0;
  background: conic-gradient(#ffb703 calc(var(--percent) * 1%), rgba(255,255,255,0.08) 0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.6s ease;
}
.amir-food-summary-ring::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--ud-bg, #050608);
}
.amir-food-summary-ring-value {
  position: relative;
  z-index: 1;
  font-size: 21px;
  font-weight: 800;
  color: var(--ud-text);
}
.amir-food-summary-stats { flex: 1; min-width: 220px; }
.amir-food-summary-main { font-size: 15px; font-weight: 800; color: var(--ud-text); margin-bottom: 9px; }
.amir-food-target-edit { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.amir-food-target-edit input[type="number"] {
  width: 90px;
  background: var(--ud-bg);
  border: 1.5px solid var(--ud-card-border);
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--ud-text);
  font-family: inherit;
  font-size: 13px;
}

/* چیپ‌های اطلاعاتیِ کوچک روی کاشی‌ها (بازه‌ی آبیاری، دوره‌ی مصرف، ساعت مصرف و ...) */
.amir-plant-card-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 7px 0; }
.amir-plant-info-chip {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: var(--ud-muted);
  border: 1px solid rgba(255,255,255,0.08);
}
.amir-plant-card-species { font-size: 12px; color: var(--ud-muted); font-style: italic; font-weight: 500; }

/* ══════════════════════════════════════════════════════════════
   کاشی‌های داروها (سبک هم‌خانواده با کاشی‌های گیاه)
══════════════════════════════════════════════════════════════ */
.amir-medication-tile {
  background: var(--ud-card);
  border: 1px solid var(--ud-card-border);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.amir-medication-tile:hover { transform: translateY(-3px); border-color: rgba(0, 212, 255, 0.35); }
.amir-medication-tile-photo {
  width: 100%;
  aspect-ratio: 16 / 7;
  background: linear-gradient(155deg, rgba(0,212,255,0.14), rgba(168,85,247,0.08));
  display: flex;
  align-items: center;
  justify-content: center;
}
.amir-medication-tile-photo img { width: 100%; height: 100%; object-fit: cover; }
.amir-medication-tile-photo-fallback { font-size: 34px; opacity: 0.6; }
.amir-medication-tile-body { padding: 14px 16px 16px; }
.amir-medication-tile-name { font-weight: 800; font-size: 14.5px; color: var(--ud-text); }
.amir-medication-tile-purpose { font-size: 12px; color: var(--ud-primary); margin-top: 3px; font-weight: 600; }

.amir-wallet-wrap input[type="text"],
.amir-wallet-wrap input[type="number"],
.amir-wallet-wrap select {
  background: var(--ud-bg);
  border: 1.5px solid var(--ud-card-border);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--ud-text);
  font-family: inherit;
  font-size: 13px;
  outline: none;
}
.amir-wallet-wrap input:focus, .amir-wallet-wrap select:focus { border-color: var(--ud-primary); }
.amir-wallet-wrap .button,
.amir-wallet-wrap button,
.amir-wallet-wrap input[type="submit"] {
  background: linear-gradient(90deg, var(--ud-primary), var(--ud-secondary)) !important;
  color: #04141a !important;
  border: none !important;
  border-radius: 10px !important;
  padding: 11px 22px !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 212, 255, 0.22);
  transition: transform 0.15s, box-shadow 0.15s;
}
.amir-wallet-wrap .button:hover,
.amir-wallet-wrap button:hover,
.amir-wallet-wrap input[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 212, 255, 0.32);
}

.amir-file-input-wrap { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.amir-file-input-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.amir-file-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--ud-primary, #00d4ff), var(--ud-secondary, #00ff96));
  color: #04141a;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 212, 255, 0.25);
  transition: transform 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.amir-file-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 212, 255, 0.35); }
.amir-file-btn-icon { font-size: 14px; }
.amir-file-name { font-size: 13px; color: var(--ud-muted); overflow: hidden; text-overflow: ellipsis; }

.amir-dash-user-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.amir-dash-user-btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--ud-primary), var(--ud-secondary));
  color: #04141a;
  font-weight: 700;
  text-decoration: none;
  font-size: 14px;
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
  transition: transform 0.15s;
}
.amir-dash-user-btn:hover { transform: translateY(-2px); color: #04141a; }

/* ══════════════════════════════════════════
   نوار پایین موبایل (شناور، با قاب گرادیانت چرخشی)
══════════════════════════════════════════ */
.amir-mobile-bottom-nav {
  display: none;
  position: fixed;
  inset-block-end: 14px;
  inset-inline: 14px;
  z-index: 300;
}
@media (max-width: 800px) { #amirPanelApp .amir-mobile-bottom-nav { display: block; } }

.amir-mobile-bottom-nav-gb {
  --nm-c1: #00d4ff; --nm-c2: #00ff96; --nm-c3: #f472b6;
  --nm-c4: #fb923c; --nm-c5: #a78bfa; --nm-c6: var(--nm-c1);
  padding: 2px;
  border-radius: 22px;
  position: relative;
  animation: amirNmGbSpin 5s linear infinite;
}
@property --nm-angle { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes amirNmGbSpin { to { --nm-angle: 360deg; } }
.amir-mobile-bottom-nav-gb::after {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;
  border-radius: inherit;
  z-index: 0;
  background: conic-gradient(from var(--nm-angle, 0deg), var(--nm-c1), var(--nm-c2), var(--nm-c3), var(--nm-c4), var(--nm-c5), var(--nm-c6));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  animation: inherit;
}
.amir-mobile-bottom-nav-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 2px;
  padding: 8px 10px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  border-radius: 20px;
}

.amir-mnb-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  color: rgba(240, 242, 245, 0.6);
  padding: 6px 4px;
  border-radius: 12px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, transform 0.2s;
}
.amir-mnb-btn:active { transform: scale(0.92); }
.amir-mnb-btn.active { color: var(--ud-primary); }
.amir-mnb-icon { font-size: 18px; line-height: 1; }
.amir-mnb-label { font-size: 10px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* ===== منوهای سفارشی داشبورد ===== */
.amir-custom-menu-content {
  background: var(--ud-card);
  border: 1px solid var(--ud-card-border);
  border-radius: 16px;
  padding: 24px;
  line-height: 1.9;
}
.amir-custom-menu-content img { max-width: 100%; border-radius: 10px; }
.amir-custom-menu-elementor { padding: 0; background: transparent; border: none; overflow: hidden; border-radius: 16px; }

.amir-custom-menu-iframe-wrap {
  width: 100%;
  height: calc(100vh - 220px);
  min-height: 480px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--ud-card-border);
  background: #fff;
}
.amir-custom-menu-iframe-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
