/**
 * Karnameh Plus Web Portal — Deputy Mobile Workspace Styles
 * مسیر: apps/web-portal/public/deputy/deputy.css
 *
 * میز کار موبایل‌محور معاونت: نوار جستجوی چسبان، چیپ کلاس، کارت فشرده دانش‌آموز،
 * شیت پایین برای جزئیات، ثبت تشویق/تذکر با چیپ‌های آماده و پیش‌نمایش زنده نمره انضباط
 * بدون اموجی مطابق سیاست Zero-Emoji Policy
 */

[hidden] {
  display: none !important;
}

.deputy-shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 12px 14px calc(24px + env(safe-area-inset-bottom));
}

/* ---------- هدر فشرده ---------- */

.deputy-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
  background: var(--bg-secondary);
  background: color-mix(in srgb, var(--bg-secondary) 88%, transparent);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
}

.deputy-header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.deputy-header-logo {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #ffffff;
}

.deputy-header-logo svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.deputy-header-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deputy-header-sub {
  margin: 1px 0 0;
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deputy-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.deputy-icon-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.deputy-icon-btn:hover,
.deputy-icon-btn:focus-visible {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.deputy-icon-btn svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
}

/* منوی حساب */
.deputy-account-wrap {
  position: relative;
}

.deputy-account-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 210px;
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  z-index: 60;
}

.deputy-account-menu.open {
  display: flex;
}

.deputy-account-menu button {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  text-align: right;
  cursor: pointer;
}

.deputy-account-menu button:hover {
  background: var(--bg-card-hover);
}

.deputy-account-menu button.danger {
  color: var(--accent-red);
}

.deputy-account-menu svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  flex: 0 0 17px;
}

/* ---------- ورود ---------- */

.deputy-login-card {
  max-width: 440px;
  margin: 32px auto;
}

.deputy-login-note {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 18px;
  line-height: 1.8;
}

.deputy-form-error {
  color: var(--accent-red);
  font-size: 13px;
  margin-top: 10px;
  text-align: center;
}

/* ---------- نوار جستجو و فیلتر ---------- */

.deputy-toolbar {
  position: sticky;
  top: 66px;
  z-index: 25;
  padding: 12px;
  margin-bottom: 12px;
  background: var(--bg-secondary);
  background: color-mix(in srgb, var(--bg-secondary) 92%, transparent);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
}

.deputy-search-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.deputy-search-box {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.deputy-search-box svg {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 17px;
  height: 17px;
  transform: translateY(-50%);
  stroke: var(--text-muted);
  pointer-events: none;
}

.deputy-search-box input {
  width: 100%;
  min-height: 46px;
  padding: 10px 38px 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 16px;
}

.deputy-search-box input:focus {
  outline: none;
  border-color: var(--border-color-focus);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.deputy-date-btn {
  flex: 0 0 auto;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  direction: ltr;
}

.deputy-date-btn input {
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  width: 92px;
  text-align: center;
  direction: ltr;
  padding: 0;
}

.deputy-date-btn input:focus {
  outline: none;
}

.deputy-class-chips {
  display: flex;
  gap: 7px;
  margin-top: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.deputy-class-chips::-webkit-scrollbar {
  display: none;
}

.deputy-chip {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
}

.deputy-chip.active {
  background: rgba(56, 189, 248, 0.14);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

.deputy-toolbar-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--text-muted);
}

/* ---------- تب‌ها ---------- */

.deputy-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 4px;
  margin-bottom: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
}

.deputy-tab {
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.deputy-tab.active {
  background: var(--bg-secondary);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.deputy-tab-count {
  display: inline-block;
  margin-right: 5px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.16);
  color: var(--accent-blue);
  font-size: 10.5px;
}

/* ---------- نوار اقدام گروهی ---------- */

.deputy-bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
}

.deputy-bulk-text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.deputy-bulk-text strong {
  color: var(--text-primary);
}

/* ---------- کارت دانش‌آموز ---------- */

.deputy-student-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.deputy-student-card {
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 15px;
  box-shadow: var(--shadow-sm);
}

.deputy-student-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-family: inherit;
  text-align: right;
  cursor: pointer;
}

.deputy-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(56, 189, 248, 0.14);
  color: var(--accent-blue);
  font-size: 13px;
  font-weight: 800;
}

.deputy-student-info {
  flex: 1 1 auto;
  min-width: 0;
}

.deputy-student-name {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deputy-student-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
}

.deputy-status-chip {
  flex: 0 0 auto;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.deputy-status-chip.present {
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
}

.deputy-status-chip.absent {
  background: rgba(239, 68, 68, 0.14);
  color: #f87171;
}

.deputy-status-chip.tardy {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
}

.deputy-quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 8px;
}

.deputy-quick-btn {
  min-height: 36px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
}

.deputy-quick-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.deputy-quick-btn.active.present {
  background: rgba(16, 185, 129, 0.16);
  border-color: #10b981;
  color: #34d399;
}

.deputy-quick-btn.active.absent {
  background: rgba(239, 68, 68, 0.16);
  border-color: #ef4444;
  color: #f87171;
}

.deputy-quick-btn.active.tardy {
  background: rgba(245, 158, 11, 0.16);
  border-color: #f59e0b;
  color: #fbbf24;
}

.deputy-restricted-note {
  margin-top: 7px;
  font-size: 11px;
  color: var(--accent-amber);
}

.deputy-load-more {
  width: 100%;
  min-height: 46px;
  margin-top: 10px;
  border: 1px dashed var(--border-color);
  border-radius: 13px;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.deputy-empty {
  padding: 34px 18px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: 16px;
}

/* ---------- فید انضباط ---------- */

.deputy-feed {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.deputy-feed-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
}

.deputy-feed-mark {
  width: 8px;
  align-self: stretch;
  border-radius: 999px;
  flex: 0 0 8px;
}

.deputy-feed-mark.positive {
  background: #10b981;
}

.deputy-feed-mark.negative {
  background: #ef4444;
}

.deputy-feed-body {
  flex: 1 1 auto;
  min-width: 0;
}

.deputy-feed-title {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.deputy-feed-sub {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deputy-feed-impact {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 800;
}

.deputy-feed-impact.positive {
  color: #34d399;
}

.deputy-feed-impact.negative {
  color: #f87171;
}

.deputy-feed-del {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-color);
  border-radius: 9px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.deputy-feed-del:hover {
  color: var(--accent-red);
  border-color: rgba(239, 68, 68, 0.4);
}

.deputy-feed-del svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
}

/* ---------- پیامک ---------- */

.deputy-sms-card {
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
}

.deputy-sms-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 6px;
}

.deputy-sms-title svg {
  width: 19px;
  height: 19px;
  stroke: var(--accent-blue);
}

.deputy-sms-desc {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.9;
  color: var(--text-secondary);
}

.deputy-sms-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 10px;
}

.deputy-sms-badge.on {
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
}

.deputy-sms-badge.off {
  background: rgba(239, 68, 68, 0.14);
  color: #f87171;
}

.deputy-sms-badge.warn {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
}

/* ---------- شیت پایین ---------- */

.deputy-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: flex-end;
  justify-content: center;
  background: rgba(3, 7, 18, 0.62);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 0;
}

.deputy-sheet-overlay.open {
  display: flex;
}

.deputy-sheet {
  width: 100%;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.35);
  animation: deputySheetUp 0.22s ease-out;
}

@keyframes deputySheetUp {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.deputy-sheet-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  flex: 0 0 auto;
}

.deputy-sheet-grab {
  position: absolute;
  top: 6px;
  left: 50%;
  width: 40px;
  height: 4px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: var(--border-color);
}

.deputy-sheet-head .deputy-avatar {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
}

.deputy-sheet-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
}

.deputy-sheet-meta {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.deputy-sheet-close {
  margin-right: auto;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.deputy-sheet-body {
  padding: 14px 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
}

.deputy-sheet-section {
  padding: 12px 0;
  border-bottom: 1px dashed var(--border-color);
}

.deputy-sheet-section:last-child {
  border-bottom: 0;
  padding-bottom: 4px;
}

.deputy-section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-secondary);
}

.deputy-conduct-now {
  font-size: 12px;
  font-weight: 800;
  color: var(--accent-blue);
}

/* کنترل سگمنتی */
.deputy-seg {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.deputy-seg button {
  min-height: 38px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.deputy-seg button.active.present,
.deputy-seg button.active.positive {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
}

.deputy-seg button.active.absent,
.deputy-seg button.active.negative {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
}

.deputy-seg button.active.tardy {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
}

.deputy-bells {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}

.deputy-bell {
  min-width: 44px;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.deputy-bell.active {
  background: rgba(56, 189, 248, 0.16);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

.deputy-inline-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}

.deputy-inline-toggle input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent-blue);
}

/* چیپ‌های آماده و ضریب */
.deputy-preset-chips,
.deputy-impact-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.deputy-preset-chip,
.deputy-impact-chip {
  min-height: 34px;
  padding: 5px 11px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

.deputy-preset-chip.active,
.deputy-impact-chip.active {
  border-color: var(--accent-blue);
  background: rgba(56, 189, 248, 0.13);
  color: var(--accent-blue);
}

.deputy-field-label {
  display: block;
  margin: 12px 0 7px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
}

.deputy-textarea {
  width: 100%;
  min-height: 74px;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.8;
  resize: vertical;
}

.deputy-textarea:focus {
  outline: none;
  border-color: var(--border-color-focus);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}

.deputy-impact-input {
  width: 92px;
  min-height: 40px;
  margin-top: 8px;
  padding: 6px 10px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 15px;
}

.deputy-conduct-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  margin-top: 10px;
  border-radius: 12px;
  background: rgba(56, 189, 248, 0.09);
  border: 1px solid rgba(56, 189, 248, 0.2);
  font-size: 12px;
  color: var(--text-secondary);
}

.deputy-conduct-preview strong {
  color: var(--accent-blue);
  font-size: 13px;
}

.deputy-sheet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.deputy-sheet-actions .btn {
  min-height: 44px;
  padding: 8px 10px;
  font-size: 12.5px;
}

.deputy-sheet-sms-link {
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  border: 1px dashed var(--border-color);
  border-radius: 12px;
  background: transparent;
  color: var(--accent-blue);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.deputy-recent-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.deputy-recent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 12px;
}

.deputy-recent-item:last-child {
  border-bottom: 0;
}

.deputy-recent-item span {
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* دکمه‌های عمومی داخل پورتال */
.deputy-btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.deputy-btn {
  min-height: 42px;
  padding: 8px 14px;
  border-radius: 11px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.deputy-btn.primary {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #03202d;
}

.deputy-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.deputy-char-count {
  margin-top: 5px;
  text-align: left;
  font-size: 10.5px;
  color: var(--text-muted);
  direction: ltr;
}

.deputy-sms-status {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--text-secondary);
  min-height: 18px;
}

.deputy-sms-status.error {
  color: var(--accent-red);
}

.deputy-sms-status.ok {
  color: #34d399;
}

/* ---------- گفتگوی تایید ---------- */

.deputy-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(3, 7, 18, 0.66);
  backdrop-filter: blur(4px);
}

.deputy-confirm-overlay.open {
  display: flex;
}

.deputy-confirm {
  width: 100%;
  max-width: 360px;
  padding: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
}

.deputy-confirm h3 {
  margin: 0 0 7px;
  font-size: 15px;
  color: var(--text-primary);
}

.deputy-confirm p {
  margin: 0 0 16px;
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--text-secondary);
}

.deputy-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ---------- توست ---------- */

#kpDeputyToastBox {
  position: fixed;
  top: 14px;
  left: 14px;
  right: 14px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  direction: rtl;
  font-family: inherit;
  pointer-events: none;
}

.deputy-toast {
  width: 100%;
  max-width: 380px;
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-right: 4px solid var(--accent-blue);
  color: var(--text-primary);
  font-size: 12.5px;
  line-height: 1.7;
  box-shadow: var(--shadow-lg);
  animation: deputyToastIn 0.18s ease-out;
}

.deputy-toast.success { border-right-color: #10b981; }
.deputy-toast.warning { border-right-color: #f59e0b; }
.deputy-toast.error { border-right-color: #ef4444; }

@keyframes deputyToastIn {
  from { transform: translateY(-8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ---------- ریسپانسیو ---------- */

@media (min-width: 860px) {
  .deputy-shell {
    padding: 20px 20px 40px;
  }

  .deputy-sheet-overlay {
    align-items: center;
    padding: 24px;
  }

  .deputy-sheet {
    max-width: 560px;
    max-height: 88dvh;
    border-radius: 22px;
  }

  .deputy-sheet-grab {
    display: none;
  }

  .deputy-sheet-actions {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

@media (max-width: 420px) {
  .deputy-header-title {
    font-size: 13.5px;
  }

  .deputy-header-sub {
    display: none;
  }

  .deputy-quick-btn {
    font-size: 11.5px;
  }

  .deputy-tab {
    font-size: 11.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .deputy-sheet,
  .deputy-toast {
    animation: none;
  }
}
