/* ================================================================
   WEPS ADMIN — ADMIN PANEL STYLES
   Categories, staff management pages
================================================================ */

/* ── ADMIN PAGE LAYOUT ─────────────────────────────────────────── */
.admin-page {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.admin-page-header {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.admin-page-title {
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text-primary);
}
.admin-page-sub {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: 2px;
}
.admin-page-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-6);
}

/* Full-page embedded WEPS sales pipeline flowchart (standalone HTML + Mermaid) */
.admin-page--pipeline-iframe {
  padding: 0;
}
.pipeline-frame-wrap {
  position: relative;
}
.pipeline-frame-wrap.is-loading::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background: var(--bg-base);
  opacity: 0.92;
  pointer-events: none;
}
.pipeline-frame-wrap.is-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: weps-pipeline-spin 0.7s linear infinite;
  pointer-events: none;
}
@keyframes weps-pipeline-spin {
  to { transform: rotate(360deg); }
}
.admin-page--pipeline-iframe .pipeline-flowchart-iframe {
  flex: 1;
  width: 100%;
  min-height: 0;
  border: 0;
  display: block;
  position: relative;
  z-index: 0;
}

/* ── SETTINGS PAGE (match screenshot) ─────────────────────────── */
.admin-page--settings .admin-page-header {
  background: linear-gradient(180deg, rgba(8, 12, 22, 0.65), rgba(24, 28, 39, 0.92));
}
.admin-page-body--settings {
  padding-top: var(--space-5);
  background:
    radial-gradient(900px 400px at 55% 30%, rgba(148, 163, 184, 0.06), transparent 60%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.28), transparent 32%);
}

.settings-stack {
  width: 100%;
  max-width: none;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.settings-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, rgba(30, 34, 53, 0.92), rgba(16, 19, 34, 0.92));
  box-shadow: none;
}
.settings-card--profile,
.settings-card--integration {
  border-color: rgba(148, 163, 184, 0.22);
}
.settings-card--profile .settings-card-icon {
  color: rgba(148, 163, 184, 0.95);
  background: rgba(148, 163, 184, 0.08);
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow: none;
}
.settings-card--integration .settings-card-icon--green {
  color: rgba(148, 163, 184, 0.95);
  background: rgba(148, 163, 184, 0.08);
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow: none;
}
.settings-card::before,
.settings-card::after { content: none; }
.settings-card > * {
  position: relative;
  z-index: 1;
}

.settings-card-header {
  margin-bottom: var(--space-5);
}
.settings-card-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
}
.settings-card-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #c4b5fd;
  background: rgba(124, 58, 237, 0.14);
  border: 1px solid rgba(124, 58, 237, 0.24);
  box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.10) inset;
}
.settings-card-icon--teal {
  color: #67e8f9;
  background: rgba(6, 182, 212, 0.14);
  border-color: rgba(6, 182, 212, 0.26);
}
.settings-card-icon--green {
  color: #4ade80;
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.30);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.10) inset;
}

/* AI agent avatar (Miranda) — neutral gray with bot glyph */
.user-avatar.miranda-ai-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0;
}
.user-avatar.miranda-ai-avatar svg {
  display: block;
}

.settings-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px 16px;
}
@media (min-width: 720px) {
  .settings-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 980px) {
  .settings-form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.settings-span-2 { grid-column: span 2; }
.settings-span-3 { grid-column: 1 / -1; }
.settings-span-1-2 { grid-column: span 2; }
@media (max-width: 719px) {
  .settings-span-2,
  .settings-span-1-2 { grid-column: 1 / -1; }
}

.settings-form-grid--integration {
  align-items: start;
}

.settings-photo-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.settings-photo-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.settings-photo-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.settings-photo-cell .user-avatar.lg {
  width: 48px;
  height: 48px;
  font-size: 16px;
}
.settings-photo-cell .btn-upload-purple {
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: rgba(226, 232, 240, 0.95);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
}
.settings-photo-cell .btn-upload-purple:hover {
  background: rgba(148, 163, 184, 0.16);
  border-color: rgba(148, 163, 184, 0.4);
}

/* Form fields with leading icon (settings page) */
.settings-field { position: relative; }
.settings-field .settings-field-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: rgba(148, 163, 184, 0.85);
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.settings-field > .form-input,
.settings-field > .form-select {
  padding-left: 38px;
}
.settings-field--password .form-input {
  padding-left: 38px;
  padding-right: 42px;
}
.settings-field--password > .settings-field-icon { color: rgba(148, 163, 184, 0.85); }

.settings-panel {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  padding: 14px;
  background: rgba(2, 6, 23, 0.18);
}
.settings-panel-title {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.settings-toggles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 720px) {
  .settings-toggles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(30, 34, 53, 0.35);
  cursor: pointer;
}
.settings-toggle-row-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.settings-toggle-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(148, 163, 184, 0.95);
  background: rgba(148, 163, 184, 0.10);
  border: 1px solid rgba(148, 163, 184, 0.18);
  flex-shrink: 0;
}
.settings-toggle-label {
  font-size: 13px;
  color: var(--text-primary);
  white-space: nowrap;
}

.admin-page--settings .form-label {
  color: rgba(226, 232, 240, 0.85);
}
.admin-page--settings .form-hint {
  color: rgba(148, 163, 184, 0.85);
  font-size: 12px;
}
.admin-page--settings .form-input,
.admin-page--settings .form-select,
.admin-page--settings .form-textarea {
  background: rgba(15, 18, 35, 0.65);
  border-color: rgba(148, 163, 184, 0.16);
}
.admin-page--settings .form-input:focus,
.admin-page--settings .form-select:focus,
.admin-page--settings .form-textarea:focus {
  border-color: rgba(148, 163, 184, 0.45);
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.12);
}
.admin-page--settings .form-textarea { min-height: 110px; }

/* Profile card fields — bordered legend + neutral slate chrome (shared dropdowns) */
.settings-role-wrap,
.settings-dept-wrap,
.settings-status-wrap {
  position: relative;
  min-width: 0;
}
.settings-status-trigger-lead {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.settings-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.settings-status-wrap.is-online .settings-status-dot {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.22);
}
.settings-status-wrap.is-offline .settings-status-dot {
  background: #64748b;
  box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.28);
}
.settings-status-wrap.is-busy .settings-status-dot {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.24);
}
.settings-status-pill {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: block;
}
.settings-status-pill--online {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}
.settings-status-pill--offline {
  background: #64748b;
  box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.25);
}
.settings-status-pill--busy {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.22);
}
.settings-status-option-icon {
  border-color: rgba(148, 163, 184, 0.14);
}
.settings-role-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}
.settings-inspire-box {
  position: relative;
  margin-top: 6px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: rgba(15, 18, 35, 0.72);
  box-shadow: none;
}
.settings-inspire-legend {
  position: absolute;
  top: -9px;
  left: 14px;
  z-index: 2;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(148, 163, 184, 0.95);
  background: linear-gradient(180deg, rgba(30, 34, 53, 1), rgba(22, 25, 42, 1));
  line-height: 1.2;
  margin: 0;
}
label.settings-inspire-legend {
  cursor: pointer;
}
.settings-inspire-inner {
  padding: 8px 8px 10px;
  position: relative;
}
.settings-inspire-box .settings-field {
  margin: 0;
}
.admin-page--settings .settings-inspire-box .form-input,
.admin-page--settings .settings-inspire-box .form-select,
.admin-page--settings .settings-inspire-box .form-textarea {
  border-radius: 11px;
  border: none;
  box-shadow: none;
  background: rgba(10, 12, 24, 0.45);
}
.admin-page--settings .settings-inspire-box .form-input:focus,
.admin-page--settings .settings-inspire-box .form-select:focus,
.admin-page--settings .settings-inspire-box .form-textarea:focus {
  outline: none;
  border: none;
  box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.35);
}
.admin-page--settings .settings-inspire-box .form-textarea {
  min-height: 110px;
  padding-left: 38px;
}
.settings-inspire-box .settings-field-icon--textarea {
  top: 18px;
  transform: none;
}
.settings-inspire-box .password-input-wrap {
  border-radius: 11px;
  border: none;
  box-shadow: none;
  background: rgba(10, 12, 24, 0.45);
}
.admin-page--settings .settings-inspire-box .password-input-wrap:focus-within {
  box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.35);
}
.settings-push-form-group {
  margin-top: 0;
}
.settings-inspire-box--push .settings-push-hint {
  margin: 0 0 10px;
  line-height: 1.45;
  font-size: 12px;
}
.settings-push-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.settings-dept-panel-empty {
  margin: 6px 8px 10px;
}
.settings-inspire-box--photo .settings-inspire-inner {
  padding: 12px 14px 14px;
}
.settings-inspire-box--photo .settings-photo-row {
  align-items: center;
  gap: 16px;
  margin: 0;
}
.settings-inspire-box--photo .settings-photo-actions {
  gap: 8px;
}
.settings-inspire-box--photo .user-avatar.lg {
  flex-shrink: 0;
}
.settings-photo-row--miranda {
  align-items: flex-start;
}
@media (min-width: 520px) {
  .settings-photo-row--miranda {
    align-items: center;
  }
}
.settings-inspire-box--miranda-photo .btn-upload-purple--integration {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: rgba(226, 232, 240, 0.95);
}
.settings-inspire-box--miranda-photo .btn-upload-purple--integration:hover {
  background: rgba(148, 163, 184, 0.16);
  border-color: rgba(148, 163, 184, 0.4);
}
.settings-inspire-box--miranda-photo .user-avatar.lg {
  width: 48px;
  height: 48px;
  font-size: 16px;
  flex-shrink: 0;
}
.settings-inspire-box--notifications .settings-inspire-inner {
  padding-top: 6px;
}
.settings-inspire-box--notifications .settings-toggle-row {
  background: rgba(15, 18, 35, 0.4);
  border-color: rgba(148, 163, 184, 0.14);
}
.settings-role-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: rgba(248, 250, 252, 0.96);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}
.settings-role-trigger:hover {
  background: rgba(148, 163, 184, 0.08);
}
.settings-role-trigger:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.22);
}
.settings-role-trigger:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.settings-role-trigger:disabled:hover {
  background: transparent;
}
.settings-dept-trigger-lead .settings-dept-trigger-emoji {
  font-size: 1.15rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.settings-role-option-icon .settings-dept-emoji {
  font-size: 1.05rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.settings-role-trigger-lead {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(15, 18, 35, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: rgba(148, 163, 184, 0.95);
}
.settings-role-wrap.is-agent .settings-role-icon-shield,
.settings-role-wrap.is-admin .settings-role-icon-user {
  display: none;
}
.settings-role-trigger-text {
  flex: 1;
  min-width: 0;
}
.settings-role-chevron {
  flex-shrink: 0;
  display: inline-flex;
  color: rgba(148, 163, 184, 0.9);
  transition: transform 0.2s ease;
}
.settings-custom-dropdown.is-open .settings-role-chevron {
  transform: rotate(180deg);
}
.settings-role-panel {
  position: absolute;
  left: -1px;
  right: -1px;
  top: calc(100% + 6px);
  z-index: 40;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(22, 25, 40, 0.98);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
}
.settings-role-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: rgba(248, 250, 252, 0.96);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}
.settings-role-option:hover {
  background: rgba(148, 163, 184, 0.1);
}
.settings-role-option.is-selected {
  background: rgba(148, 163, 184, 0.16);
}
.settings-role-option-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 18, 35, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: rgba(148, 163, 184, 0.95);
}
.settings-role-option-label {
  flex: 1;
  min-width: 0;
}
.settings-role-check {
  flex-shrink: 0;
  width: 1.25rem;
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  color: rgba(148, 163, 184, 0.95);
  opacity: 0;
}
.settings-role-option.is-selected .settings-role-check {
  opacity: 1;
}

.settings-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}
.settings-actions--integration {
  justify-content: flex-start;
  gap: 10px;
}

/* ── CATEGORY CARDS ───────────────────────────────────────────── */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.cat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.cat-card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-md);
}
.cat-card-accent {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}

.cat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}
.cat-card-info { display: flex; align-items: center; gap: var(--space-3); }
.cat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.cat-name { font-size: var(--text-lg); font-weight: 600; color: var(--text-primary); }
.cat-desc { font-size: var(--text-sm); color: var(--text-muted); margin-top: 2px; }
.cat-actions { display: flex; gap: var(--space-2); }

.cat-members-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
  margin-top: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cat-member-count {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 600;
  padding: 1px 7px;
  color: var(--text-secondary);
}

.cat-member-list { display: flex; flex-direction: column; gap: var(--space-2); }
.cat-member-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px solid var(--border);
}
.cat-member-info { flex: 1; min-width: 0; }
.cat-member-name { font-size: var(--text-sm); font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-member-role { font-size: 11px; color: var(--text-muted); }
.cat-member-status { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.cat-member-status.online  { background: #22c55e; }
.cat-member-status.offline { background: var(--text-muted); }
.cat-member-actions { display: flex; gap: 4px; }

/* ── STAFF TABLE ──────────────────────────────────────────────── */
.staff-page-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.staff-filters {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  padding: var(--space-4) var(--space-5);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.staff-filters__add {
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.staff-search-wrap {
  position: relative;
  flex: 1;
  max-width: 320px;
}
.staff-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.staff-search {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 7px 10px 7px 32px;
  color: var(--text-primary);
  font-size: var(--text-sm);
  outline: none;
  transition: border-color var(--transition);
}
.staff-search::placeholder { color: var(--text-muted); }
.staff-search:focus { border-color: var(--accent); }

.staff-table-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.staff-avatar-cell { display: flex; align-items: center; gap: var(--space-3); }
.staff-member-name { font-size: var(--text-sm); font-weight: 600; color: var(--text-primary); }
.staff-member-email { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

.online-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}
.online-dot.online  { background: #22c55e; }
.online-dot.offline { background: var(--text-muted); }

/* ── MODAL FORMS ──────────────────────────────────────────────── */
.modal-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4) var(--space-5);
}
.modal-form-grid .full-width { grid-column: 1 / -1; }

.avatar-upload {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.avatar-preview {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.avatar-upload-info { flex: 1; }
.avatar-upload-info p { font-size: 13px; color: var(--text-secondary); margin-bottom: var(--space-2); }

/* Agent Inbox View */
.agent-inbox-header {
  padding: var(--space-4) var(--space-5);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-shrink: 0;
}
.agent-inbox-info { flex: 1; }
.agent-inbox-name { font-size: var(--text-lg); font-weight: 600; color: var(--text-primary); }
.agent-inbox-role { font-size: var(--text-sm); color: var(--text-muted); }
.agent-stats { display: flex; gap: var(--space-4); }
.agent-stat { text-align: center; }
.agent-stat-value { font-size: var(--text-xl); font-weight: 700; color: var(--text-primary); }
.agent-stat-label { font-size: 11px; color: var(--text-muted); }

/* ── DASHBOARD WELCOME ────────────────────────────────────────── */
.dashboard-greeting {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(249,115,22,0.05) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-6) var(--space-8);
  margin-bottom: var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.greeting-title { font-size: var(--text-2xl); font-weight: 700; color: var(--text-primary); }
.greeting-sub   { font-size: var(--text-md); color: var(--text-muted); margin-top: var(--space-2); }
.greeting-accent { height: 4px; width: 60px; background: var(--accent); border-radius: 2px; margin-top: var(--space-3); }

.recent-section-title {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.recent-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── AUTH ROUTES (#login / #register) ────────────────────────── */
.app-shell.weps-auth-route .sidebar,
.app-shell.weps-auth-route .topbar {
  display: none;
}
.app-shell.weps-auth-route .main-area {
  min-height: 100vh;
}
.app-shell.weps-auth-route .page-content {
  padding: 0;
  overflow: hidden;
  background: #020617;
  min-height: 100vh;
}
.admin-page.weps-auth-page {
  width: 100%;
  height: 100%;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

/* Inspired-by-exact login layout */
.login-bg {
  width: 100vw;
  height: 100vh;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 30%, rgba(255, 115, 0, 0.18), transparent 25%),
    linear-gradient(135deg, #020617, #061533 55%, #020617);
}
.network {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,122,0,0.8) 1px, transparent 2px),
    radial-gradient(circle at 30% 50%, rgba(255,122,0,0.8) 1px, transparent 2px),
    radial-gradient(circle at 40% 20%, rgba(255,122,0,0.8) 1px, transparent 2px);
  opacity: 0.4;
}
.globe {
  position: absolute;
  left: -180px;
  top: 80px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 122, 0, 0.25), transparent 60%),
    linear-gradient(135deg, #07134a, #020617);
  box-shadow: 0 0 80px rgba(255, 122, 0, 0.25);
  border: 1px solid rgba(255,255,255,0.05);
}
.globe::before {
  content: "";
  position: absolute;
  inset: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.08);
}
.orange-line {
  position: absolute;
  height: 4px;
  background: #ff7900;
  box-shadow: 0 0 18px #ff7900;
  border-radius: 50px;
}
.line1 {
  width: 620px;
  left: 120px;
  top: 260px;
  transform: rotate(-18deg);
}
.line2 {
  width: 480px;
  left: 40px;
  bottom: 170px;
  transform: rotate(18deg);
}
.wave {
  position: absolute;
  width: 800px;
  height: 260px;
  border-radius: 50%;
  background: rgba(10, 24, 78, 0.85);
  filter: blur(1px);
}
.wave1 {
  left: -120px;
  bottom: -80px;
  transform: rotate(-10deg);
}
.wave2 {
  right: -250px;
  top: -120px;
  transform: rotate(-20deg);
}
.ship {
  position: absolute;
  left: 120px;
  bottom: 140px;
  width: 240px;
  height: 70px;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  border-radius: 0 0 30px 30px;
  box-shadow: 0 0 30px rgba(255,121,0,0.15);
  z-index: 5;
}
.ship::before {
  content: "";
  position: absolute;
  top: -30px;
  left: 30px;
  width: 160px;
  height: 30px;
  background: repeating-linear-gradient(
    to right,
    #1e3a8a,
    #1e3a8a 20px,
    #ff7900 20px,
    #ff7900 40px
  );
}

.login-card {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 440px;
  padding: 0;
  border-radius: 18px;
  background: rgba(58, 56, 54, 1);
  color: #0f172a;
  z-index: 10;
  overflow: hidden;
  border: 3px solid rgba(58, 56, 54, 0.22);
  box-shadow: 0 18px 60px rgba(0,0,0,0.42);
}

.login-header {
  padding: 34px 34px 24px;
  background: linear-gradient(135deg, #071533, #0b1f4a);
  color: #fff;
  position: relative;
  text-align: center;
}
.login-header::after {
  content: "";
  position: absolute;
  right: -55px;
  top: -55px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255,121,0,0.18);
}
.logo {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 8px;
  position: relative;
  z-index: 2;
}
.login-note {
  color: rgba(255,255,255,0.68);
  font-size: 14px;
  position: relative;
  z-index: 2;
}
.form-area {
  padding: 30px 34px 34px;
  background: rgba(223, 231, 247, 1);
}

.input-group {
  position: relative;
  margin-top: 15px;
}

.login-card input,
.login-card .form-input {
  width: 100%;
  padding: 15px 16px;
  border-radius: 10px;
  font-size: 15px;
  background: #f7faff;
  color: #0f172a;
  border: 1px solid #d7dce5;
  outline: none;
  transition: 0.22s;
}
.login-card #weps-login-email {
  background: rgba(238, 244, 251, 1);
}
.login-card #weps-login-password {
  background: rgba(238, 244, 251, 1);
}
.login-card input:focus,
.login-card .form-input:focus {
  border-color: #ff7900;
  background: #ffffff;
}
.login-card #weps-login-email:focus,
.login-card #weps-login-password:focus {
  background: rgba(238, 244, 251, 1);
}
.login-card input::placeholder,
.login-card .form-input::placeholder {
  color: #64748b;
}

.login-card .btn-primary {
  width: 100%;
  padding: 15px 16px;
  border-radius: 10px;
  font-size: 15px;
  margin-top: 22px;
  border: none;
  background: #ff7900;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.7px;
  cursor: pointer;
  transition: 0.22s;
  box-shadow: none;
}
.login-card .btn-primary:hover {
  background: #e86e00;
  box-shadow: none;
}

/* password toggle should still be usable in this theme */
.login-card .password-input-wrap {
  display: block;
}
.login-card .password-toggle-btn {
  right: 10px;
  width: 34px;
  height: 34px;
  padding: 0;
  background: transparent;
  z-index: 2;
  color: #0f172a;
}
.login-card .password-toggle-btn:hover {
  color: #0b1220;
  background: rgba(2, 6, 23, 0.06);
}
.login-card .password-input-wrap .form-input {
  padding-right: 54px;
}

@media (max-width: 520px) {
  .login-card {
    width: 90%;
    left: 50%;
  }
}

/* ── PASSWORD FIELD + EYE TOGGLE ─────────────────────────────── */
.password-input-wrap {
  position: relative;
  display: block;
  width: 100%;
}
.password-input-wrap .form-input {
  padding-right: 42px;
  width: 100%;
  box-sizing: border-box;
}
.password-toggle-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm, 6px);
  flex-shrink: 0;
}
.password-toggle-btn:hover {
  color: var(--text-primary);
  background: var(--bg-hover, rgba(255, 255, 255, 0.06));
}
.password-toggle-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.password-toggle-btn svg {
  display: block;
}
/* `display:block` above must not defeat the hidden toggle glyphs (open eye vs slash). */
.password-toggle-btn svg .pw-svg-show[hidden],
.password-toggle-btn svg .pw-svg-hide[hidden] {
  display: none !important;
}

/* Staff modal: eye control stays visible; stronger while the field is focused (active). */
.password-input-wrap--staff .password-toggle-btn {
  opacity: 1;
  color: var(--text-muted);
}
.password-input-wrap--staff:focus-within .password-toggle-btn {
  color: var(--text-secondary);
  background: var(--bg-hover, rgba(255, 255, 255, 0.06));
}
.password-input-wrap--staff:focus-within .password-toggle-btn:hover {
  color: var(--text-primary);
}
