/**
 * master-v3.css — Master V3 Design System Foundation
 * Время Профи / tersam.ru
 *
 * Phase V3.0 — primitives/tokens only. NOT connected to HTML yet.
 * Phase V3.1 — #panel-home layout (master-dashboard-v2.html only).
 * Phase V3.1.3 — light canvas override (premium + m3-shell).
 * Phase V3.1.4 — home UX polish (compact header, money KPI, today/overview).
 * Phase V3.2 — More Hub + hide sidebar (bottom nav only).
 * Phase V3.2.1 — home header UX polish (online only, crown badge).
 * Phase V3.3 — Income Card V2 Lite (month revenue + goal progress).
 *
 * Do NOT style: #orderFeedV3Host, .ofv3-*, OLC/OFT, feed/chat/finance/profile panels.
 * Experimental pilot frozen: css/premium-cabinet-mobile.css
 */

/* ═══════════════════════════════════════════════════════════
   1. Token host — .m3-shell (+ body.master-v3-theme for future)
   ═══════════════════════════════════════════════════════════ */

body.master-v3-theme,
.m3-shell {
  color-scheme: dark;

  /* Canvas & surfaces */
  --m3-bg-canvas: #0a0a0c;
  --m3-bg-elevated: #111114;
  --m3-surface-card: #1a1a1f;
  --m3-surface-card-hover: #222228;
  --m3-surface-glass: rgba(26, 26, 31, 0.72);
  --m3-border: rgba(255, 255, 255, 0.06);
  --m3-border-strong: rgba(255, 255, 255, 0.10);
  --m3-glass-highlight: rgba(255, 255, 255, 0.04);

  /* Typography */
  --m3-text-primary: #f4f4f5;
  --m3-text-secondary: #a1a1aa;
  --m3-text-muted: #71717a;
  --m3-text-inverse: #0a0a0c;

  /* Accents */
  --m3-accent-primary: #8b5cf6;
  --m3-accent-primary-soft: rgba(139, 92, 246, 0.18);
  --m3-accent-primary-deep: #6d28d9;
  --m3-accent-premium: #d4a853;
  --m3-accent-premium-soft: rgba(212, 168, 83, 0.14);
  --m3-accent-success: #22c55e;
  --m3-accent-success-soft: rgba(34, 197, 94, 0.14);
  --m3-accent-warn: #f59e0b;
  --m3-accent-warn-soft: rgba(245, 158, 11, 0.12);
  --m3-accent-danger: #ef4444;
  --m3-accent-danger-soft: rgba(239, 68, 68, 0.12);

  /* Radius */
  --m3-radius-sm: 12px;
  --m3-radius-md: 16px;
  --m3-radius-lg: 20px;
  --m3-radius-xl: 24px;
  --m3-radius-pill: 999px;

  /* Spacing */
  --m3-space-1: 8px;
  --m3-space-2: 12px;
  --m3-space-3: 16px;
  --m3-space-4: 20px;
  --m3-space-5: 24px;
  --m3-space-6: 32px;

  /* Elevation */
  --m3-shadow-1: 0 2px 8px rgba(0, 0, 0, 0.25);
  --m3-shadow-2: 0 4px 16px rgba(0, 0, 0, 0.30);
  --m3-shadow-3: 0 8px 28px rgba(0, 0, 0, 0.35);
  --m3-shadow-4: 0 12px 40px rgba(0, 0, 0, 0.40);
  --m3-shadow-glow-primary: 0 0 20px rgba(139, 92, 246, 0.22);
  --m3-shadow-glow-premium: 0 0 16px rgba(212, 168, 83, 0.18);
  --m3-blur-glass: 12px;

  /* Canvas gradient (subtle) */
  --m3-bg-gradient: radial-gradient(ellipse 140% 90% at 50% -15%, rgba(139, 92, 246, 0.10) 0%, transparent 52%),
    radial-gradient(ellipse 70% 45% at 100% 0%, rgba(212, 168, 83, 0.05) 0%, transparent 42%),
    var(--m3-bg-canvas);

  /* Typography stacks */
  --m3-font-display: Manrope, Inter, system-ui, sans-serif;
  --m3-font-body: Inter, system-ui, sans-serif;

  color: var(--m3-text-primary);
  font-family: var(--m3-font-body);
}

/* ═══════════════════════════════════════════════════════════
   2. Shell & screen layout
   ═══════════════════════════════════════════════════════════ */

.m3-shell {
  min-height: 100vh;
  background: var(--m3-bg-gradient);
  background-color: var(--m3-bg-canvas);
}

.m3-screen {
  display: flex;
  flex-direction: column;
  gap: var(--m3-space-3);
  padding: 0 var(--m3-space-3) var(--m3-space-4);
  max-width: 100%;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .m3-screen {
    gap: var(--m3-space-4);
    padding: 0 var(--m3-space-4) var(--m3-space-5);
  }
}

/* ═══════════════════════════════════════════════════════════
   3. Topbar & bottom nav (shell chrome)
   ═══════════════════════════════════════════════════════════ */

.m3-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--m3-space-2);
  padding: var(--m3-space-2) var(--m3-space-3);
  background: rgba(10, 10, 12, 0.92);
  backdrop-filter: blur(var(--m3-blur-glass));
  -webkit-backdrop-filter: blur(var(--m3-blur-glass));
  border-bottom: 1px solid var(--m3-border);
  box-shadow: var(--m3-shadow-1);
}

.m3-topbar__title {
  margin: 0;
  font-family: var(--m3-font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--m3-text-primary);
  line-height: 1.2;
}

.m3-topbar__sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--m3-text-muted);
  line-height: 1.3;
}

.m3-topbar__actions {
  display: flex;
  align-items: center;
  gap: var(--m3-space-1);
  flex-shrink: 0;
}

.m3-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  gap: 4px;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  background: rgba(10, 10, 12, 0.94);
  backdrop-filter: blur(var(--m3-blur-glass));
  -webkit-backdrop-filter: blur(var(--m3-blur-glass));
  border-top: 1px solid var(--m3-border);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.45);
}

.m3-bottom-nav__btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 52px;
  padding: 6px 4px;
  border: none;
  border-radius: var(--m3-radius-sm);
  background: transparent;
  color: var(--m3-text-muted);
  font-family: var(--m3-font-body);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.m3-bottom-nav__btn:hover {
  color: var(--m3-text-secondary);
  background: rgba(255, 255, 255, 0.04);
}

.m3-bottom-nav__btn--active {
  color: var(--m3-text-primary);
  background: var(--m3-accent-primary-soft);
  box-shadow: var(--m3-shadow-glow-primary);
}

.m3-bottom-nav__btn--active .m3-bottom-nav__icon {
  color: var(--m3-accent-primary);
}

.m3-bottom-nav__icon {
  font-size: 18px;
  line-height: 1;
  color: inherit;
}

@media (min-width: 768px) {
  .m3-bottom-nav {
    display: none;
  }
}

/* ═══════════════════════════════════════════════════════════
   4. Section title
   ═══════════════════════════════════════════════════════════ */

.m3-section-title {
  margin: 0 0 var(--m3-space-2);
  font-family: var(--m3-font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--m3-text-primary);
  line-height: 1.25;
}

.m3-section-title--muted {
  color: var(--m3-text-secondary);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ═══════════════════════════════════════════════════════════
   5. Card
   ═══════════════════════════════════════════════════════════ */

.m3-card {
  background: var(--m3-surface-card);
  border: 1px solid var(--m3-border);
  border-radius: var(--m3-radius-lg);
  box-shadow: var(--m3-shadow-2);
  padding: var(--m3-space-3);
  color: var(--m3-text-primary);
  box-sizing: border-box;
}

.m3-card--glass {
  background: var(--m3-surface-glass);
  backdrop-filter: blur(var(--m3-blur-glass));
  -webkit-backdrop-filter: blur(var(--m3-blur-glass));
  box-shadow: var(--m3-shadow-2), inset 0 1px 0 var(--m3-glass-highlight);
}

.m3-card:hover {
  border-color: var(--m3-border-strong);
}

@media (min-width: 768px) {
  .m3-card:hover {
    background: var(--m3-surface-card-hover);
  }
}

/* ═══════════════════════════════════════════════════════════
   6. KPI tile
   ═══════════════════════════════════════════════════════════ */

.m3-kpi-tile {
  display: flex;
  flex-direction: column;
  gap: var(--m3-space-1);
  padding: var(--m3-space-3) var(--m3-space-2);
  background: var(--m3-surface-card);
  border: 1px solid var(--m3-border);
  border-radius: var(--m3-radius-lg);
  box-shadow: var(--m3-shadow-2), inset 0 1px 0 var(--m3-glass-highlight);
  min-width: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.m3-kpi-tile--glass {
  background: var(--m3-surface-glass);
  backdrop-filter: blur(var(--m3-blur-glass));
  -webkit-backdrop-filter: blur(var(--m3-blur-glass));
}

.m3-kpi-tile:hover {
  border-color: rgba(139, 92, 246, 0.25);
  box-shadow: var(--m3-shadow-2), var(--m3-shadow-glow-primary);
  transform: translateY(-1px);
}

.m3-kpi-tile__label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--m3-text-secondary);
  line-height: 1.2;
}

.m3-kpi-tile__value {
  font-family: var(--m3-font-display);
  font-size: clamp(22px, 6vw, 28px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--m3-text-primary);
  line-height: 1.1;
}

.m3-kpi-tile__sub {
  font-size: 11px;
  color: var(--m3-text-muted);
  line-height: 1.3;
}

.m3-kpi-tile--primary .m3-kpi-tile__value {
  color: var(--m3-accent-primary);
}

.m3-kpi-tile--premium .m3-kpi-tile__value {
  color: var(--m3-accent-premium);
}

.m3-kpi-tile--success .m3-kpi-tile__value {
  color: var(--m3-accent-success);
}

.m3-kpi-tile--warn .m3-kpi-tile__value {
  color: var(--m3-accent-warn);
}

/* ═══════════════════════════════════════════════════════════
   7. Buttons
   ═══════════════════════════════════════════════════════════ */

.m3-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--m3-space-1);
  min-height: 44px;
  padding: 10px var(--m3-space-3);
  border-radius: var(--m3-radius-sm);
  border: 1px solid var(--m3-border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--m3-text-secondary);
  font-family: var(--m3-font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.m3-button:hover {
  background: rgba(255, 255, 255, 0.10);
  color: var(--m3-text-primary);
  border-color: var(--m3-border-strong);
}

.m3-button:active {
  transform: scale(0.98);
}

.m3-button--primary {
  background: linear-gradient(135deg, var(--m3-accent-primary) 0%, var(--m3-accent-primary-deep) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--m3-shadow-glow-primary);
}

.m3-button--primary:hover {
  background: linear-gradient(135deg, #9d6ff8 0%, var(--m3-accent-primary-deep) 100%);
  color: #fff;
  filter: brightness(1.04);
}

.m3-button--ghost {
  background: transparent;
  border-color: var(--m3-border);
  color: var(--m3-text-secondary);
  box-shadow: none;
}

.m3-button--ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--m3-text-primary);
}

.m3-button:disabled,
.m3-button[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════
   8. Pill & status dot
   ═══════════════════════════════════════════════════════════ */

.m3-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--m3-radius-pill);
  border: 1px solid var(--m3-border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--m3-text-secondary);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.m3-pill--primary {
  background: var(--m3-accent-primary-soft);
  border-color: rgba(139, 92, 246, 0.25);
  color: #c4b5fd;
}

.m3-pill--premium {
  background: var(--m3-accent-premium-soft);
  border-color: rgba(212, 168, 83, 0.28);
  color: var(--m3-accent-premium);
}

.m3-pill--success {
  background: var(--m3-accent-success-soft);
  border-color: rgba(34, 197, 94, 0.25);
  color: var(--m3-accent-success);
}

.m3-pill--warn {
  background: var(--m3-accent-warn-soft);
  border-color: rgba(245, 158, 11, 0.25);
  color: var(--m3-accent-warn);
}

.m3-pill--muted {
  background: rgba(255, 255, 255, 0.04);
  color: var(--m3-text-muted);
}

.m3-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--m3-text-muted);
  flex-shrink: 0;
}

.m3-status-dot--online {
  background: var(--m3-accent-success);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.55);
}

.m3-status-dot--busy {
  background: var(--m3-accent-warn);
}

.m3-status-dot--offline {
  background: var(--m3-text-muted);
}

/* ═══════════════════════════════════════════════════════════
   9. List row
   ═══════════════════════════════════════════════════════════ */

.m3-list-row {
  display: flex;
  align-items: center;
  gap: var(--m3-space-2);
  padding: var(--m3-space-2) var(--m3-space-3);
  border-radius: var(--m3-radius-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--m3-text-primary);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  box-sizing: border-box;
}

.m3-list-row:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--m3-border);
}

.m3-list-row--active {
  background: var(--m3-accent-primary-soft);
  border-color: rgba(139, 92, 246, 0.22);
  box-shadow: inset 3px 0 0 var(--m3-accent-primary);
}

.m3-list-row__icon {
  width: 36px;
  height: 36px;
  border-radius: var(--m3-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  color: var(--m3-text-secondary);
  flex-shrink: 0;
}

.m3-list-row__body {
  flex: 1;
  min-width: 0;
}

.m3-list-row__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--m3-text-primary);
  line-height: 1.25;
}

.m3-list-row__meta {
  font-size: 12px;
  color: var(--m3-text-muted);
  line-height: 1.3;
  margin-top: 2px;
}

.m3-list-row__chev {
  color: var(--m3-text-muted);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   10a. Verification gate light canvas (matches #panel-home) —
   fixes a dark background flash right after login: this panel is
   forced visible for every master while the access check is still
   pending (see masterV2CoerceSectionKeyForPending), and previously
   had no light override, so the legacy dark .app-main canvas showed
   through until the check resolved and redirected home.
   ═══════════════════════════════════════════════════════════ */

body.premium-cabinet-theme.cabinet-role-master.master-v3-theme #panel-verification_gate.app-panel,
body.master-v3-theme #panel-verification_gate {
  background: #f4f5f8 !important;
  color: #1c2030;
}

/* ═══════════════════════════════════════════════════════════
   10. Phase V3.1 — Master Home (#panel-home only)
   ═══════════════════════════════════════════════════════════ */

body.master-v3-theme #panel-home {
  --m3-home-canvas: #f4f5f8;
  --m3-home-ink: #1c2030;
  --m3-home-ink-muted: #8a90a2;
  --m3-home-card-bg: #ffffff;
  --m3-home-card-border: rgba(226, 232, 240, 0.95);
  --m3-home-card-shadow: 0 18px 40px -26px rgba(20, 25, 45, 0.28);
  --m3-home-premium-bg: linear-gradient(165deg, #18181f 0%, #0a0a0c 100%);
  --m3-home-premium-border: rgba(255, 255, 255, 0.08);

  background: var(--m3-home-canvas) !important;
  color: var(--m3-home-ink);
  overflow-x: hidden;
  padding-top: 0;
  box-sizing: border-box;
}

body.master-v3-theme #panel-home .master-home-app.m3-home,
body.master-v3-theme #panel-home .master-home-app.m3-shell {
  display: flex;
  flex-direction: column;
  gap: var(--m3-space-3);
  padding: var(--m3-space-2) var(--m3-space-3) calc(96px + env(safe-area-inset-bottom, 0px));
  max-width: 720px;
  margin: 0 auto;
  box-sizing: border-box;
  min-height: auto;
  background: var(--m3-home-canvas) !important;
  background-color: var(--m3-home-canvas) !important;
  background-image: none !important;
  color-scheme: light;
}

body.master-v3-theme #panel-home .m3-home-jshim {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  pointer-events: none;
}

body.master-v3-theme.master-v2-home-active #masterCrmHeader.admin-crm-header {
  display: none !important;
}

/* — Unified header card (matches CRM header on other sections) — */
body.master-v3-theme #panel-home .m3-home-header-card {
  padding: 10px 12px 12px;
  border-radius: var(--m3-radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 10, 12, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.28);
  color: #f4f4f5;
}

body.master-v3-theme #panel-home .m3-home-header-card__row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

body.master-v3-theme #panel-home .m3-home-header-card__menu,
body.master-v3-theme #panel-home .m3-home-header-card__notif {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--m3-radius-sm);
  background: rgba(255, 255, 255, 0.05);
  color: #a1a1aa;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.master-v3-theme #panel-home .m3-home-header-card__copy {
  flex: 1;
  min-width: 0;
}

body.master-v3-theme #panel-home .m3-home-header-card__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  color: #f4f4f5;
}

body.master-v3-theme #panel-home .m3-home-header-card__sub {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.35;
  color: #a1a1aa;
}

body.master-v3-theme #panel-home .m3-home-header-card__notif {
  position: relative;
}

body.master-v3-theme #panel-home .m3-home-header-card__notif-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: var(--m3-radius-pill);
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

body.master-v3-theme #panel-home .m3-home-header-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

body.master-v3-theme #panel-home .m3-home-header-card__avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--m3-radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

body.master-v3-theme #panel-home .m3-home-header-card__avatar img,
body.master-v3-theme #panel-home .master-home-hero-identity__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.master-v3-theme #panel-home .master-home-hero-identity__initials {
  font-size: 14px;
  font-weight: 700;
  color: #c4b5fd;
}

body.master-v3-theme #panel-home .m3-home-header-card__who {
  flex: 1 1 120px;
  min-width: 0;
}

body.master-v3-theme #panel-home .m3-home-header-card__name,
body.master-v3-theme #panel-home #master-home-hero-display-name {
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  color: #f4f4f5;
  overflow-wrap: anywhere;
  word-break: break-word;
}

body.master-v3-theme #panel-home .m3-home-header-card__date {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: #71717a;
  text-transform: capitalize;
}

body.master-v3-theme #panel-home .m3-home-header-card__chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  flex: 1 1 100%;
}

body.master-v3-theme #panel-home .m3-home-header-card__chip,
body.master-v3-theme #panel-home #master-home-hero-online-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--m3-radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  font-size: 10px;
  line-height: 1.2;
  color: #a1a1aa;
  max-width: 100%;
}

body.master-v3-theme #panel-home #master-home-hero-status-badge {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 108px;
}

body.master-v3-theme #panel-home #master-home-hero-online-wrap.master-home-hero-online--ready {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
}

body.master-v3-theme #panel-home #master-home-hero-online-wrap.master-home-hero-online--shift {
  border-color: rgba(139, 92, 246, 0.35);
  background: rgba(139, 92, 246, 0.16);
  color: #c4b5fd;
}

body.master-v3-theme #panel-home #master-home-hero-online-wrap.master-home-hero-online--profile {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.14);
  color: #fcd34d;
}

body.master-v3-theme #panel-home .master-home-hero-online__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #71717a;
  flex-shrink: 0;
}

body.master-v3-theme #panel-home #master-home-hero-online-wrap.master-home-hero-online--ready .master-home-hero-online__dot {
  background: #22c55e;
}

body.master-v3-theme #panel-home .m3-home-header-card__chip i {
  color: #d4a853;
  font-size: 9px;
}

body.master-v3-theme #panel-home .m3-home-header-card__chip-lbl {
  color: #71717a;
}

body.master-v3-theme #panel-home .m3-home-header-card__pill {
  font-size: 10px;
  max-width: 132px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.master-v3-theme #panel-home .m3-home-header-card__pill.master-home-pill--ok {
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.28);
}

body.master-v3-theme #panel-home .m3-home-header-card__pill.master-home-pill--wait {
  background: rgba(245, 158, 11, 0.14);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.28);
}

/* — Light work area below header — */
body.master-v3-theme #panel-home .m3-home-work {
  display: flex;
  flex-direction: column;
  gap: var(--m3-space-2);
  background: var(--m3-home-canvas) !important;
  background-color: var(--m3-home-canvas) !important;
  background-image: none !important;
}

body.master-v3-theme #panel-home .m3-home-work__taking:not([hidden]) {
  display: block;
  padding: 8px 12px;
  border-radius: var(--m3-radius-sm);
  border: 1px solid rgba(99, 102, 241, 0.2);
  background: rgba(238, 242, 255, 0.95);
  font-size: 13px;
  color: #4338ca;
}

body.master-v3-theme #panel-home .m3-home-work__avail {
  padding: var(--m3-space-3);
  border-radius: var(--m3-radius-md);
  border: 1px solid var(--m3-home-card-border);
  background: var(--m3-home-card-bg);
  box-shadow: var(--m3-home-card-shadow);
}

body.master-v3-theme #panel-home .m3-home-work__avail-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--m3-space-2);
  margin-bottom: var(--m3-space-2);
}

body.master-v3-theme #panel-home .m3-home-work__avail-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--m3-home-ink);
}

body.master-v3-theme #panel-home .m3-home-work__avail-row {
  display: flex;
  align-items: flex-start;
  gap: var(--m3-space-2);
}

body.master-v3-theme #panel-home .m3-home-work__avail .master-home-av-state__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--m3-home-ink);
}

body.master-v3-theme #panel-home .m3-home-work__avail .master-home-av-state__hint {
  font-size: 12px;
  color: var(--m3-home-ink-muted);
  margin-top: 2px;
}

body.master-v3-theme #panel-home .m3-home-work__avail .master-home-av-note {
  margin-top: var(--m3-space-2);
  font-size: 11px;
  color: var(--m3-home-ink-muted);
}

body.master-v3-theme #panel-home .m3-home-work__cta {
  width: 100%;
  justify-content: center;
  min-height: 48px;
  font-size: 15px;
  font-weight: 600;
}

/* — KPI strip — */
body.master-v3-theme #panel-home .m3-home-kpi {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--m3-space-2);
}

@media (min-width: 480px) {
  body.master-v3-theme #panel-home .m3-home-kpi {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

body.master-v3-theme #panel-home .m3-home-kpi .m3-kpi-tile {
  min-height: 76px;
  background: var(--m3-home-card-bg);
  border: 1px solid var(--m3-home-card-border);
  box-shadow: var(--m3-home-card-shadow);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.master-v3-theme #panel-home .m3-home-kpi .m3-kpi-tile:hover {
  border-color: rgba(99, 102, 241, 0.22);
  box-shadow: 0 14px 34px rgba(79, 70, 229, 0.12);
  transform: translateY(-1px);
}

body.master-v3-theme #panel-home .m3-home-kpi .m3-kpi-tile__label {
  color: var(--m3-home-ink-muted);
}

body.master-v3-theme #panel-home .m3-home-kpi .m3-kpi-tile__value {
  color: var(--m3-home-ink);
}

body.master-v3-theme #panel-home .m3-kpi-tile--accent .m3-kpi-tile__value {
  color: #4f46e5;
}

body.master-v3-theme #panel-home .m3-kpi-tile--premium .m3-kpi-tile__value {
  color: #b45309;
}

/* — Quick actions — */
body.master-v3-theme #panel-home .m3-home-quick__title {
  margin: 0 0 var(--m3-space-2);
  color: var(--m3-home-ink);
}

body.master-v3-theme #panel-home .m3-home-quick__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--m3-space-2);
}

body.master-v3-theme #panel-home .m3-home-quick__card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: var(--m3-space-3);
  border: 1px solid var(--m3-home-card-border);
  border-radius: var(--m3-radius-md);
  background: var(--m3-home-card-bg);
  color: var(--m3-home-ink);
  box-shadow: var(--m3-home-card-shadow);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  min-width: 0;
}

body.master-v3-theme #panel-home .m3-home-quick__card:hover {
  background: #ffffff;
  border-color: rgba(99, 102, 241, 0.24);
  box-shadow: 0 14px 34px rgba(79, 70, 229, 0.1);
}

body.master-v3-theme #panel-home .m3-home-quick__icon {
  width: 36px;
  height: 36px;
  border-radius: var(--m3-radius-sm);
  background: rgba(99, 102, 241, 0.12);
  color: #4f46e5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

body.master-v3-theme #panel-home .m3-home-quick__label {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--m3-home-ink);
}

body.master-v3-theme #panel-home .m3-home-quick__sub {
  font-size: 11px;
  color: var(--m3-home-ink-muted);
  line-height: 1.25;
}

/* — Today — */
body.master-v3-theme #panel-home .m3-home-today {
  padding: var(--m3-space-3);
  background: var(--m3-home-card-bg) !important;
  border: 1px solid var(--m3-home-card-border) !important;
  box-shadow: var(--m3-home-card-shadow) !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.master-v3-theme #panel-home .m3-home-today__title {
  margin: 0 0 var(--m3-space-3);
  color: var(--m3-home-ink);
}

body.master-v3-theme #panel-home .m3-home-today__subtitle {
  margin: 0 0 var(--m3-space-2);
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}

body.master-v3-theme #panel-home .m3-home-today__block + .m3-home-today__block {
  margin-top: var(--m3-space-3);
  padding-top: var(--m3-space-3);
  border-top: 1px solid var(--m3-border);
}

body.master-v3-theme #panel-home .master-home-attention {
  margin-bottom: var(--m3-space-3);
  padding: var(--m3-space-3);
  border-radius: var(--m3-radius-md);
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: var(--m3-accent-warn-soft);
}

body.master-v3-theme #panel-home .master-home-attention__eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fcd34d;
}

body.master-v3-theme #panel-home .master-home-attention__desc {
  margin: 8px 0 12px;
  font-size: 13px;
  color: var(--m3-text-primary);
}

body.master-v3-theme #panel-home .master-home-hint,
body.master-v3-theme #panel-home .master-home-do-card {
  display: flex;
  align-items: flex-start;
  gap: var(--m3-space-2);
  width: 100%;
  padding: var(--m3-space-2);
  margin-bottom: var(--m3-space-1);
  border: 1px solid var(--m3-home-card-border);
  border-radius: var(--m3-radius-sm);
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
}

body.master-v3-theme #panel-home .master-home-hint--accent,
body.master-v3-theme #panel-home .master-home-hint--feed-pulse {
  border-color: rgba(99, 102, 241, 0.24);
  background: rgba(238, 242, 255, 0.95);
  color: #4338ca;
}

body.master-v3-theme #panel-home .master-home-do-card {
  align-items: center;
}

body.master-v3-theme #panel-home .master-home-do-title {
  display: block;
  font-weight: 600;
  color: var(--m3-home-ink);
}

body.master-v3-theme #panel-home .master-home-do-desc {
  display: block;
  font-size: 12px;
  color: var(--m3-home-ink-muted);
  margin-top: 2px;
}

body.master-v3-theme #panel-home .master-home-do-arrow {
  margin-left: auto;
  color: var(--m3-text-muted);
  flex-shrink: 0;
}

body.master-v3-theme #panel-home .master-home-hint-skel,
body.master-v3-theme #panel-home .master-home-do-skel {
  height: 44px;
  border-radius: var(--m3-radius-sm);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.04) 0%, rgba(15, 23, 42, 0.08) 50%, rgba(15, 23, 42, 0.04) 100%);
  background-size: 200% 100%;
  animation: m3-home-shimmer 1.2s ease-in-out infinite;
  margin-bottom: var(--m3-space-1);
}

@keyframes m3-home-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* — Analytics — */
body.master-v3-theme #panel-home .m3-home-analytics {
  padding: var(--m3-space-3);
  background: var(--m3-home-card-bg) !important;
  border: 1px solid var(--m3-home-card-border) !important;
  box-shadow: var(--m3-home-card-shadow) !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.master-v3-theme #panel-home .m3-home-analytics__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--m3-space-2);
  margin-bottom: var(--m3-space-3);
}

body.master-v3-theme #panel-home .m3-home-analytics__title {
  margin: 0;
  color: var(--m3-home-ink);
}

body.master-v3-theme #panel-home .m3-home-analytics__link {
  flex-shrink: 0;
  font-size: 12px;
  padding: 6px 12px;
}

body.master-v3-theme #panel-home .m3-home-analytics__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--m3-space-2);
}

body.master-v3-theme #panel-home .m3-home-analytics__cell {
  text-align: center;
  padding: var(--m3-space-2);
  border-radius: var(--m3-radius-sm);
  background: #f8fafc;
  border: 1px solid var(--m3-home-card-border);
  min-width: 0;
}

body.master-v3-theme #panel-home .m3-home-analytics__val {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--m3-home-ink);
  line-height: 1.2;
}

body.master-v3-theme #panel-home .m3-home-analytics__lbl {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  color: var(--m3-home-ink-muted);
  line-height: 1.25;
}

/* — Error card — */
body.master-v3-theme #panel-home .m3-home-error {
  display: flex;
  align-items: center;
  gap: var(--m3-space-2);
  padding: var(--m3-space-3);
  border-radius: var(--m3-radius-md);
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: var(--m3-accent-danger-soft);
  color: var(--m3-text-primary);
}

body.master-v3-theme #panel-home .m3-home-error[hidden] {
  display: none !important;
}

body.master-v3-theme #panel-home .master-home-error-card__title {
  display: block;
  font-size: 14px;
}

body.master-v3-theme #panel-home .master-home-error-card__hint {
  display: block;
  font-size: 12px;
  color: var(--m3-text-muted);
  margin-top: 2px;
}

body.master-v3-theme #panel-home .master-home-error-card__retry {
  flex-shrink: 0;
  margin-left: auto;
}

/* — Override light legacy inside home only — */
body.master-v3-theme #panel-home .master-kpi-card,
body.master-v3-theme #panel-home .master-home-qbtn,
body.master-v3-theme #panel-home .master-home-hero-card,
body.master-v3-theme #panel-home .master-home-section--card {
  background: transparent !important;
}

@media (max-width: 359px) {
  body.master-v3-theme #panel-home .m3-home-header-card__pill {
    display: none;
  }
  body.master-v3-theme #panel-home .m3-home-analytics__grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) {
  body.master-v3-theme #panel-home .master-home-app.m3-home,
  body.master-v3-theme #panel-home .master-home-app.m3-shell {
    padding-top: var(--m3-space-3);
    gap: var(--m3-space-4);
  }
  body.master-v3-theme #panel-home .m3-home-quick__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Onboarding widget — light card on home canvas */
body.master-v3-theme #panel-home #vp-onboarding-master .vp-ob-inner {
  background: var(--m3-home-card-bg) !important;
  border: 1px solid var(--m3-home-card-border) !important;
  box-shadow: var(--m3-home-card-shadow) !important;
  color: var(--m3-home-ink) !important;
}

body.master-v3-theme #panel-home #vp-onboarding-master .vp-ob-title,
body.master-v3-theme #panel-home #vp-onboarding-master .vp-ob-card__title {
  color: var(--m3-home-ink) !important;
}

body.master-v3-theme #panel-home #vp-onboarding-master .vp-ob-sub,
body.master-v3-theme #panel-home #vp-onboarding-master .vp-ob-card__text,
body.master-v3-theme #panel-home #vp-onboarding-master .vp-ob-progress {
  color: var(--m3-home-ink-muted) !important;
}

body.master-v3-theme #panel-home #vp-onboarding-master .vp-ob-card {
  background: #f8fafc !important;
  border-color: var(--m3-home-card-border) !important;
}

body.master-v3-theme #panel-home #vp-onboarding-master .vp-ob-collapse {
  color: #475569 !important;
  border-color: var(--m3-home-card-border) !important;
}

/* ═══════════════════════════════════════════════════════════
   11. Phase V3.1.1 — section header alignment (master panels)
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  body.master-v3-theme.cabinet-role-master.profi-mobile-ready .app-main {
    padding-top: 64px !important;
  }

  body.master-v3-theme.cabinet-role-master.profi-mobile-ready #masterCrmHeader.admin-crm-header {
    padding: 6px 10px 8px;
    margin-bottom: 8px;
  }

  body.master-v3-theme #panel-feed .master-feed-toolbar,
  body.master-v3-theme #panel-myorders .master-feed-toolbar,
  body.master-v3-theme #panel-settings .master-feed-toolbar {
    margin-top: 0;
    margin-bottom: 8px;
  }

  body.master-v3-theme #panel-feed.master-feed-v3-pilot-active .ofv3-host {
    margin-top: 0;
    padding-top: 0;
  }

  body.master-v3-theme #panel-chats #sec-chat.chat-v3-surface {
    padding-top: 12px;
    padding-bottom: 16px;
  }

  body.master-v3-theme #panel-chats #sec-chat .chat-m-hero {
    margin-top: 0;
    margin-bottom: 10px;
    padding-top: 12px;
    padding-bottom: 12px;
  }
}

/* ═══════════════════════════════════════════════════════════
   12. Phase V3.1.3 — light canvas (beat premium + .m3-shell dark)
   ═══════════════════════════════════════════════════════════ */

body.master-v3-theme.premium-cabinet-theme.cabinet-role-master #panel-home,
body.master-v3-theme.premium-cabinet-theme.cabinet-role-master #panel-home.app-panel,
body.master-v3-theme.premium-cabinet-theme.cabinet-role-master.profi-mobile-ready #panel-home.app-panel {
  background: var(--m3-home-canvas, var(--profi-bg, #f5f7fa)) !important;
  background-color: var(--m3-home-canvas, var(--profi-bg, #f5f7fa)) !important;
  background-image: none !important;
  color: var(--m3-home-ink);
  color-scheme: light;
}

body.master-v3-theme.master-v2-home-active.premium-cabinet-theme.cabinet-role-master .app-main,
body.master-v3-theme.master-v2-home-active.premium-cabinet-theme.cabinet-role-master.profi-mobile-ready .app-main {
  background: var(--profi-bg, #f5f7fa) !important;
  background-color: var(--profi-bg, #f5f7fa) !important;
  background-image: none !important;
}

body.master-v3-theme #panel-home .m3-home-kpi,
body.master-v3-theme #panel-home .m3-home-quick,
body.master-v3-theme #panel-home .m3-home-today,
body.master-v3-theme #panel-home .m3-home-analytics,
body.master-v3-theme #panel-home .m3-home-onboarding,
body.master-v3-theme #panel-home #vp-onboarding-master {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
}

body.master-v3-theme #panel-home .m3-home-header-card {
  color-scheme: dark;
}

/* ═══════════════════════════════════════════════════════════
   13. Phase V3.1.4 — home UX polish (#panel-home only)
   ═══════════════════════════════════════════════════════════ */

/* — 1. Compact header (~15–20% shorter) — */
body.master-v3-theme #panel-home .m3-home-header-card {
  padding: 8px 10px 10px;
}

body.master-v3-theme #panel-home .m3-home-header-card__row {
  gap: 8px;
}

body.master-v3-theme #panel-home .m3-home-header-card__menu,
body.master-v3-theme #panel-home .m3-home-header-card__notif {
  width: 34px;
  height: 34px;
}

body.master-v3-theme #panel-home .m3-home-header-card__title {
  font-size: 15px;
}

body.master-v3-theme #panel-home .m3-home-header-card__sub {
  margin-top: 2px;
  font-size: 11px;
}

body.master-v3-theme #panel-home .m3-home-header-card__meta {
  gap: 6px;
  margin-top: 6px;
  padding-top: 6px;
}

body.master-v3-theme #panel-home .m3-home-header-card__avatar {
  width: 32px;
  height: 32px;
}

body.master-v3-theme #panel-home .master-home-hero-identity__initials {
  font-size: 12px;
}

body.master-v3-theme #panel-home .m3-home-header-card__name,
body.master-v3-theme #panel-home #master-home-hero-display-name {
  font-size: 13px;
  line-height: 1.25;
}

body.master-v3-theme #panel-home .m3-home-header-card__date {
  margin-top: 1px;
  font-size: 10px;
}

body.master-v3-theme #panel-home .m3-home-header-card__chips {
  gap: 5px;
}

body.master-v3-theme #panel-home .m3-home-header-card__chip,
body.master-v3-theme #panel-home #master-home-hero-online-wrap {
  padding: 2px 7px;
  font-size: 10px;
}

body.master-v3-theme #panel-home #master-home-hero-status-badge {
  max-width: 96px;
}

/* — 2. Status row inside header (shift + availability) — */
body.master-v3-theme #panel-home .m3-home-header-card__status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  flex: 1 1 100%;
}

/* taking_orders pill duplicates availability label — keep hook, hide visually */
body.master-v3-theme #panel-home .m3-home-header-card__taking {
  display: none !important;
}

body.master-v3-theme #panel-home .m3-home-header-card__taking:not([hidden]) {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: var(--m3-radius-pill);
  border: 1px solid rgba(99, 102, 241, 0.28);
  background: rgba(99, 102, 241, 0.12);
  font-size: 10px;
  line-height: 1.2;
  color: #c7d2fe;
  max-width: 100%;
}

body.master-v3-theme #panel-home .m3-home-header-card__taking .master-home-taking-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #818cf8;
  flex-shrink: 0;
}

body.master-v3-theme #panel-home .m3-home-header-card__taking .master-home-taking-dot--on {
  background: #22c55e;
}

body.master-v3-theme #panel-home .m3-home-header-card__av {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 4px 2px 8px;
  border-radius: var(--m3-radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  max-width: 100%;
  min-width: 0;
}

body.master-v3-theme #panel-home .m3-home-header-card__av-label {
  font-size: 10px;
  line-height: 1.2;
  color: #d4d4d8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

body.master-v3-theme #panel-home .m3-home-header-card__av-toggle {
  flex-shrink: 0;
  transform: scale(0.88);
  transform-origin: center;
}

body.master-v3-theme #panel-home .m3-home-header-card__av:has(.master-home-av-toggle.is-on) {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.12);
}

body.master-v3-theme #panel-home .m3-home-header-card__av:has(.master-home-av-toggle.is-on) .m3-home-header-card__av-label {
  color: #86efac;
}

/* — Work area: CTA only — */
body.master-v3-theme #panel-home .m3-home-work {
  gap: var(--m3-space-1);
}

body.master-v3-theme #panel-home .m3-home-work__cta {
  min-height: 44px;
  font-size: 14px;
}

/* — 3. Money-first KPI — */
body.master-v3-theme #panel-home .m3-home-kpi {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.master-v3-theme #panel-home .m3-kpi-tile--money-hero {
  grid-column: 1 / -1;
  min-height: 72px;
  padding: 14px 16px;
  border-color: rgba(212, 168, 83, 0.35);
  background: linear-gradient(135deg, rgba(255, 251, 235, 0.98) 0%, rgba(254, 243, 199, 0.92) 100%);
  box-shadow: 0 10px 28px rgba(180, 83, 9, 0.12);
}

body.master-v3-theme #panel-home .m3-kpi-tile--money-hero .m3-kpi-tile__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #92400e;
}

body.master-v3-theme #panel-home .m3-kpi-tile--money-hero .m3-kpi-tile__value {
  font-size: clamp(24px, 7vw, 30px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #b45309;
}

body.master-v3-theme #panel-home .m3-kpi-tile--money-hero:hover {
  border-color: rgba(212, 168, 83, 0.5);
  box-shadow: 0 14px 34px rgba(180, 83, 9, 0.16);
}

body.master-v3-theme #panel-home .m3-kpi-tile--today-rev .m3-kpi-tile__value {
  color: #4f46e5;
  font-weight: 700;
}

body.master-v3-theme #panel-home .m3-home-kpi .m3-kpi-tile:not(.m3-kpi-tile--money-hero) {
  min-height: 64px;
}

@media (min-width: 480px) {
  body.master-v3-theme #panel-home .m3-home-kpi {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body.master-v3-theme #panel-home .m3-kpi-tile--money-hero {
    grid-column: span 2;
    min-height: 76px;
  }
}

/* — 4. Today summary — */
body.master-v3-theme #panel-home .m3-home-today__summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--m3-space-2);
}

body.master-v3-theme #panel-home .m3-home-today__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 72px;
  padding: 10px 6px;
  border-radius: var(--m3-radius-sm);
  border: 1px solid var(--m3-home-card-border);
  background: #f8fafc;
  text-align: center;
}

body.master-v3-theme #panel-home .m3-home-today__stat-val {
  display: block;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  color: var(--m3-home-ink);
  font-variant-numeric: tabular-nums;
}

body.master-v3-theme #panel-home .m3-home-today__stat-lbl {
  font-size: 10px;
  line-height: 1.25;
  color: var(--m3-home-ink-muted);
}

body.master-v3-theme #panel-home .m3-home-today__stat:first-child .m3-home-today__stat-val {
  color: #4f46e5;
}

body.master-v3-theme #panel-home .m3-home-today__stat:nth-child(2) .m3-home-today__stat-val {
  color: #d97706;
}

body.master-v3-theme #panel-home .m3-home-today__stat:nth-child(3) .m3-home-today__stat-val {
  color: #7c3aed;
}

body.master-v3-theme #panel-home #master-shift-chat-badge[hidden] {
  display: inline !important;
}

body.master-v3-theme #panel-home #master-shift-chat-badge[hidden]:empty::before {
  content: '0';
}

/* — 5. Overview: revenue periods — */
body.master-v3-theme #panel-home .m3-home-analytics__cell {
  min-height: 68px;
  padding: 12px 8px;
}

body.master-v3-theme #panel-home .m3-home-analytics__val {
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

body.master-v3-theme #panel-home .m3-home-analytics__lbl {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

@media (max-width: 768px) {
  body.master-v3-theme #panel-home .m3-home-header-card__av-label {
    max-width: 108px;
  }
}

/* ═══════════════════════════════════════════════════════════
   14. Phase V3.2 — More Hub + single bottom nav (hide sidebar)
   ═══════════════════════════════════════════════════════════ */

/* — Hide legacy sidebar chrome (DOM preserved) — */
body.master-v3-theme.cabinet-role-master #appSidebar,
body.master-v3-theme.cabinet-role-master #sidebarToggle,
body.master-v3-theme.cabinet-role-master #sidebarOverlay,
body.master-v3-theme.cabinet-role-master #masterSidebarCollapseBtn,
body.master-v3-theme.cabinet-role-master #panel-home .m3-home-header-card__menu {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.master-v3-theme.cabinet-role-master.app-shell {
  display: block !important;
  grid-template-columns: minmax(0, 1fr) !important;
}

body.master-v3-theme.cabinet-role-master .app-main {
  margin-left: 0 !important;
  max-width: 100% !important;
  padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important;
}

/* Bottom nav — primary nav on all breakpoints */
body.master-v3-theme.cabinet-role-master .master-bottom-nav {
  display: flex !important;
}

/* — More Hub panel — */
body.master-v3-theme #panel-more {
  background: var(--m3-home-canvas, #f5f7fa) !important;
  padding: var(--m3-space-2) var(--m3-space-3) calc(96px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
}

body.master-v3-theme #panel-more .m3-more-hub {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--m3-space-3);
}

body.master-v3-theme #panel-more .m3-more-hub__head {
  padding-top: var(--m3-space-1);
}

body.master-v3-theme #panel-more .m3-more-hub__title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: var(--m3-home-ink, #0f172a);
  line-height: 1.2;
}

body.master-v3-theme #panel-more .m3-more-hub__sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--m3-home-ink-muted, #64748b);
  line-height: 1.35;
}

body.master-v3-theme #panel-more .m3-more-hub__user {
  display: flex;
  align-items: center;
  gap: var(--m3-space-2);
  padding: var(--m3-space-2) var(--m3-space-3);
  border-radius: var(--m3-radius-md);
  border: 1px solid var(--m3-home-card-border, rgba(15, 23, 42, 0.08));
  background: var(--m3-home-card-bg, #fff);
  box-shadow: var(--m3-home-card-shadow, 0 8px 24px rgba(15, 23, 42, 0.06));
}

body.master-v3-theme #panel-more .m3-more-hub__avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--m3-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  flex-shrink: 0;
}

body.master-v3-theme #panel-more .m3-more-hub__name {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--m3-home-ink, #0f172a);
  line-height: 1.25;
}

body.master-v3-theme #panel-more .m3-more-hub__role {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--m3-home-ink-muted, #64748b);
}

body.master-v3-theme #panel-more .m3-more-hub__group-label {
  margin: 0 0 var(--m3-space-1);
  padding: 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--m3-home-ink-muted, #64748b);
}

body.master-v3-theme #panel-more .m3-more-hub__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

body.master-v3-theme #panel-more .m3-more-hub__item {
  display: flex;
  align-items: center;
  gap: var(--m3-space-2);
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--m3-home-card-border, rgba(15, 23, 42, 0.08));
  border-radius: var(--m3-radius-md);
  background: var(--m3-home-card-bg, #fff);
  box-shadow: var(--m3-home-card-shadow, 0 8px 24px rgba(15, 23, 42, 0.06));
  color: var(--m3-home-ink, #0f172a);
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.master-v3-theme #panel-more .m3-more-hub__item:hover {
  border-color: rgba(99, 102, 241, 0.22);
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.1);
}

body.master-v3-theme #panel-more .m3-more-hub__ico {
  width: 36px;
  height: 36px;
  border-radius: var(--m3-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.1);
  color: #4f46e5;
  flex-shrink: 0;
}

body.master-v3-theme #panel-more .m3-more-hub__copy {
  flex: 1;
  min-width: 0;
}

body.master-v3-theme #panel-more .m3-more-hub__label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
}

body.master-v3-theme #panel-more .m3-more-hub__hint {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--m3-home-ink-muted, #64748b);
  line-height: 1.25;
}

body.master-v3-theme #panel-more .m3-more-hub__chev {
  color: #94a3b8;
  font-size: 12px;
  flex-shrink: 0;
}

body.master-v3-theme #panel-more .m3-more-hub__logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: var(--m3-space-1);
  padding: 12px 16px;
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--m3-radius-md);
  background: rgba(254, 242, 242, 0.95);
  color: #b91c1c;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

body.master-v3-theme #panel-more .m3-more-hub__logout:hover {
  border-color: rgba(239, 68, 68, 0.4);
  background: #fef2f2;
}

/* Settings — back to More Hub */
body.master-v3-theme #panel-settings .m3-settings-toolbar {
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--m3-space-2);
}

body.master-v3-theme #panel-settings .m3-more-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--m3-home-card-border, rgba(15, 23, 42, 0.1));
  border-radius: var(--m3-radius-sm);
  background: #fff;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  flex: 0 0 auto;
}

body.master-v3-theme #panel-settings .m3-more-back:hover {
  border-color: rgba(99, 102, 241, 0.22);
  color: #4f46e5;
}

@media (min-width: 769px) {
  body.master-v3-theme.cabinet-role-master #masterCrmHeader.admin-crm-header {
    padding-left: var(--m3-space-3);
  }
}

/* ═══════════════════════════════════════════════════════════
   15. Phase V3.2.1 — home header UX polish
   ═══════════════════════════════════════════════════════════ */

body.master-v3-theme #panel-home .m3-home-header-card__avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
}

body.master-v3-theme #panel-home .m3-home-header-card__avatar-wrap .m3-home-header-card__avatar {
  width: 100%;
  height: 100%;
}

body.master-v3-theme #panel-home .m3-home-header-card__crown {
  position: absolute;
  top: -2px;
  right: -2px;
  z-index: 2;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(10, 10, 12, 0.92);
  background: linear-gradient(145deg, #fde68a 0%, #f59e0b 48%, #d97706 100%);
  color: #78350f;
  box-shadow: 0 2px 6px rgba(180, 83, 9, 0.35);
  pointer-events: none;
}

body.master-v3-theme #panel-home .m3-home-header-card__crown[hidden] {
  display: none !important;
}

body.master-v3-theme #panel-home .m3-home-header-card__crown i {
  font-size: 8px;
  line-height: 1;
}

body.master-v3-theme #panel-home .m3-home-header-card__online {
  grid-area: stat;
  justify-self: start;
}

body.master-v3-theme #panel-home #master-home-hero-online-wrap.master-home-hero-online--ready {
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
}

body.master-v3-theme #panel-home #master-home-hero-online-wrap.master-home-hero-online--ready .master-home-hero-online__dot {
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
}

body.master-v3-theme #panel-home #master-home-hero-status-badge {
  max-width: none;
  white-space: nowrap;
}

body.master-v3-theme #panel-home #master-home-access-badge,
body.master-v3-theme #panel-home .m3-home-header-card__status-hooks {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.master-v3-theme #panel-home .m3-home-header-card__chips {
  grid-area: rate;
  justify-self: end;
  align-self: center;
  flex: 0 0 auto;
  margin-left: 0;
}

body.master-v3-theme #panel-home .m3-home-header-card__status-row {
  display: none !important;
}

body.master-v3-theme #panel-home .m3-home-header-card__avatar-wrap {
  grid-area: av;
}

body.master-v3-theme #panel-home .m3-home-header-card__who {
  grid-area: who;
  align-self: center;
}

body.master-v3-theme #panel-home .m3-home-header-card__meta {
  display: grid !important;
  grid-template-columns: 32px 1fr auto;
  grid-template-areas:
    "av who rate"
    "av stat stat";
  align-items: center;
  column-gap: 8px;
  row-gap: 4px;
}

@media (max-width: 768px) {
  body.master-v3-theme #panel-home .m3-home-header-card__meta {
    column-gap: 8px;
    row-gap: 4px;
  }
}

/* ═══════════════════════════════════════════════════════════
   16. Phase V3.3 — Income Card V2 Lite
   ═══════════════════════════════════════════════════════════ */

body.master-v3-theme #panel-home .m3-income-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  grid-column: 1 / -1;
  min-height: 96px;
  padding: 14px 16px;
  border-radius: var(--m3-radius-md);
  border: 1px solid rgba(212, 168, 83, 0.35);
  background: linear-gradient(135deg, rgba(255, 251, 235, 0.98) 0%, rgba(254, 243, 199, 0.92) 100%);
  box-shadow: 0 10px 28px rgba(180, 83, 9, 0.12);
  box-sizing: border-box;
}

body.master-v3-theme #panel-home .m3-income-card__label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #92400e;
  line-height: 1.2;
}

body.master-v3-theme #panel-home .m3-income-card__value {
  display: block;
  margin-bottom: 12px;
  font-family: Manrope, system-ui, sans-serif;
  font-size: clamp(24px, 7vw, 28px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #b45309;
}

body.master-v3-theme #panel-home .m3-income-card__progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

body.master-v3-theme #panel-home .m3-income-card__bar {
  flex: 1;
  min-width: 0;
  height: 8px;
  border-radius: var(--m3-radius-pill);
  background: rgba(180, 83, 9, 0.12);
  overflow: hidden;
}

body.master-v3-theme #panel-home .m3-income-card__fill {
  width: 0%;
  height: 100%;
  border-radius: var(--m3-radius-pill);
  background: linear-gradient(90deg, #f59e0b, #d97706);
  transition: width 0.35s ease;
}

body.master-v3-theme #panel-home .m3-income-card__pct {
  flex-shrink: 0;
  min-width: 36px;
  font-size: 12px;
  font-weight: 700;
  color: #92400e;
  text-align: right;
  line-height: 1.2;
}

body.master-v3-theme #panel-home .m3-income-card__goal {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #92400e;
  line-height: 1.3;
}

@media (min-width: 480px) {
  body.master-v3-theme #panel-home .m3-home-kpi .m3-income-card.m3-kpi-tile--money-hero {
    grid-column: span 2;
    min-height: 112px;
  }
}

/* ═══════════════════════════════════════════════════════════
   17. Phase V3.4 — P1 premium home polish (#panel-home only)
   ═══════════════════════════════════════════════════════════ */

/* — Vertical rhythm — */
body.master-v3-theme #panel-home .master-home-app.m3-home,
body.master-v3-theme #panel-home .master-home-app.m3-shell {
  gap: var(--m3-space-4);
  padding: var(--m3-space-3) var(--m3-space-3) calc(96px + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 768px) {
  body.master-v3-theme #panel-home .master-home-app.m3-home,
  body.master-v3-theme #panel-home .master-home-app.m3-shell {
    gap: var(--m3-space-5);
    padding-top: var(--m3-space-4);
  }
}

/* — Hero: notif only, no title row — */
body.master-v3-theme #panel-home .m3-home-header-card {
  position: relative;
  padding: 12px 12px 14px;
}

body.master-v3-theme #panel-home .m3-home-header-card__notif {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

body.master-v3-theme #panel-home .m3-home-header-card__meta {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  padding-right: 42px;
  grid-template-columns: 40px 1fr auto;
  column-gap: 10px;
  row-gap: 6px;
}

body.master-v3-theme #panel-home .m3-home-header-card__avatar-wrap {
  width: 40px;
  height: 40px;
}

body.master-v3-theme #panel-home .master-home-hero-identity__initials {
  font-size: 15px;
}

body.master-v3-theme #panel-home .m3-home-header-card__name,
body.master-v3-theme #panel-home #master-home-hero-display-name {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

body.master-v3-theme #panel-home .m3-home-header-card__crown {
  top: -3px;
  right: -3px;
  width: 16px;
  height: 16px;
  box-shadow: 0 2px 6px rgba(180, 83, 9, 0.35), 0 0 8px rgba(245, 158, 11, 0.28);
}

body.master-v3-theme #panel-home .m3-home-header-card__crown i {
  font-size: 9px;
}

/* — Income card: stronger sum, more air, finer progress — */
body.master-v3-theme #panel-home .m3-income-card {
  min-height: 108px;
  padding: 18px 18px 16px;
  border-radius: 18px;
  box-shadow:
    0 10px 28px rgba(180, 83, 9, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

body.master-v3-theme #panel-home .m3-income-card__label {
  margin-bottom: 8px;
}

body.master-v3-theme #panel-home .m3-income-card__value {
  margin-bottom: 14px;
  font-size: clamp(28px, 8vw, 36px);
  font-variant-numeric: tabular-nums;
}

body.master-v3-theme #panel-home .m3-income-card__progress-row {
  gap: 12px;
  margin-bottom: 10px;
}

body.master-v3-theme #panel-home .m3-income-card__bar {
  height: 5px;
}

body.master-v3-theme #panel-home .m3-income-card__pct {
  min-width: 40px;
  font-size: 13px;
}

body.master-v3-theme #panel-home .m3-income-card__goal {
  font-size: 11px;
  font-weight: 500;
  color: #a16207;
}

/* ═══════════════════════════════════════════════════════════
   18. Phase V3.5 — Light premium reskin (#panel-home only)
   Same premium composition as the dark reference, on white cards.
   ═══════════════════════════════════════════════════════════ */

body.master-v3-theme #panel-home {
  --m3-home-accent: #5b57e8;
  --m3-home-accent-2: #6d5ef0;
  --m3-home-accent-bg: #edecfb;
  --m3-home-ok-text: #12894f;
  --m3-home-ok-bg: #e6f6ee;
  --m3-home-ok-icon: #17a566;
  --m3-home-label: #a7adba;
  --m3-home-divider: #eceef3;
  --m3-home-rating: #b8860f;
  --m3-home-danger: #ff5a5f;
  --m3-home-font-display: 'Space Grotesk', 'Manrope', sans-serif;
}

/* — Header: dark glass card → flat row on canvas (matches эталон) — */
body.master-v3-theme #panel-home .m3-home-header-card {
  border: none;
  background: transparent;
  box-shadow: none;
  color: var(--m3-home-ink);
}

body.master-v3-theme #panel-home .m3-home-header-card__menu,
body.master-v3-theme #panel-home .m3-home-header-card__notif {
  border: none;
  background: var(--m3-home-card-bg);
  color: var(--m3-home-ink);
  box-shadow: 0 4px 12px -8px rgba(20, 25, 45, 0.3);
}

body.master-v3-theme #panel-home .m3-home-header-card__notif-badge {
  background: var(--m3-home-danger);
  box-shadow: 0 0 0 2px var(--m3-home-canvas);
}

body.master-v3-theme #panel-home .m3-home-header-card__title,
body.master-v3-theme #panel-home .m3-home-header-card__name,
body.master-v3-theme #panel-home #master-home-hero-display-name {
  font-weight: 800;
  color: var(--m3-home-ink);
}

body.master-v3-theme #panel-home .m3-home-header-card__sub,
body.master-v3-theme #panel-home .m3-home-header-card__date {
  color: var(--m3-home-ink-muted);
}

body.master-v3-theme #panel-home .m3-home-header-card__meta {
  border-top: none;
}

body.master-v3-theme #panel-home .m3-home-header-card__avatar {
  background: var(--m3-home-accent-bg);
}

body.master-v3-theme #panel-home .master-home-hero-identity__initials {
  color: var(--m3-home-accent);
}

body.master-v3-theme #panel-home .m3-home-header-card__crown {
  border-color: #fff;
  box-shadow: 0 2px 6px rgba(180, 83, 9, 0.28), 0 0 0 1px rgba(180, 83, 9, 0.1);
}

/* rating chip + online status: plain colored inline text, no pill chrome */
body.master-v3-theme #panel-home .m3-home-header-card__chip,
body.master-v3-theme #panel-home #master-home-hero-online-wrap {
  border: none;
  background: transparent;
  padding: 0;
  color: var(--m3-home-rating);
  font-weight: 700;
}

body.master-v3-theme #panel-home .m3-home-header-card__chip i {
  color: var(--m3-home-rating);
}

body.master-v3-theme #panel-home .m3-home-header-card__chip-lbl {
  color: var(--m3-home-ink-muted);
}

body.master-v3-theme #panel-home .master-home-hero-online__dot {
  background: #94a3b8;
}

body.master-v3-theme #panel-home #master-home-hero-online-wrap.master-home-hero-online--ready,
body.master-v3-theme #panel-home .m3-home-header-card__pill.master-home-pill--ok {
  border: none;
  background: transparent;
  color: var(--m3-home-ok-text);
}

body.master-v3-theme #panel-home #master-home-hero-online-wrap.master-home-hero-online--ready .master-home-hero-online__dot {
  background: var(--m3-home-ok-icon);
  box-shadow: 0 0 0 2px rgba(23, 165, 102, 0.18);
}

body.master-v3-theme #panel-home #master-home-hero-online-wrap.master-home-hero-online--shift {
  border-color: rgba(91, 87, 232, 0.28);
  background: var(--m3-home-accent-bg);
  color: var(--m3-home-accent);
}

body.master-v3-theme #panel-home #master-home-hero-online-wrap.master-home-hero-online--profile,
body.master-v3-theme #panel-home .m3-home-header-card__pill.master-home-pill--wait {
  border-color: rgba(224, 144, 14, 0.3);
  background: #fffaf1;
  color: #b9720b;
}

body.master-v3-theme #panel-home .m3-home-header-card__taking:not([hidden]) {
  border-color: rgba(91, 87, 232, 0.28);
  background: var(--m3-home-accent-bg);
}

body.master-v3-theme #panel-home .m3-home-header-card__av {
  border: 1px solid var(--m3-home-card-border);
  background: #f5f7fa;
}

body.master-v3-theme #panel-home .m3-home-header-card__av-label {
  color: var(--m3-home-ink-muted);
}

body.master-v3-theme #panel-home .m3-home-header-card__av:has(.master-home-av-toggle.is-on) {
  border-color: rgba(23, 165, 102, 0.3);
  background: var(--m3-home-ok-bg);
}

body.master-v3-theme #panel-home .m3-home-header-card__av:has(.master-home-av-toggle.is-on) .m3-home-header-card__av-label {
  color: var(--m3-home-ok-text);
}

/* — CTA button: exact accent gradient — */
body.master-v3-theme #panel-home .m3-home-work__cta {
  background: linear-gradient(135deg, var(--m3-home-accent-2) 0%, var(--m3-home-accent) 100%);
  border-radius: 16px;
  font-weight: 800;
  box-shadow: 0 16px 34px -16px rgba(109, 94, 240, 0.75);
}

body.master-v3-theme #panel-home .m3-home-work__cta:hover {
  background: linear-gradient(135deg, var(--m3-home-accent-2) 0%, var(--m3-home-accent) 100%);
  filter: brightness(1.05);
}

/* — Income hero: gold → flat white card, bold display numerals — */
body.master-v3-theme #panel-home .m3-income-card,
body.master-v3-theme #panel-home .m3-kpi-tile--money-hero:hover {
  border: none;
  background: var(--m3-home-card-bg);
  box-shadow: var(--m3-home-card-shadow);
}

body.master-v3-theme #panel-home .m3-income-card__label {
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--m3-home-label);
}

body.master-v3-theme #panel-home .m3-income-card__value {
  font-family: var(--m3-home-font-display);
  font-weight: 700;
  color: var(--m3-home-ink);
}

body.master-v3-theme #panel-home .m3-income-card__bar {
  background: var(--m3-home-divider);
}

body.master-v3-theme #panel-home .m3-income-card__fill {
  background: linear-gradient(90deg, #6d5ef0, #8b7dff);
}

body.master-v3-theme #panel-home .m3-income-card__pct {
  color: var(--m3-home-accent);
}

body.master-v3-theme #panel-home .m3-income-card__goal {
  color: var(--m3-home-ink-muted);
  font-weight: 600;
}

/* — Stat rail: money-hero + one merged white strip with dividers — */
body.master-v3-theme #panel-home .m3-home-kpi {
  display: flex;
  flex-direction: column;
  gap: var(--m3-space-2);
}

body.master-v3-theme #panel-home .m3-home-stat-rail {
  display: flex;
  align-items: stretch;
  background: var(--m3-home-card-bg);
  border-radius: 16px;
  padding: 17px 8px;
  box-shadow: 0 1px 2px rgba(20, 25, 45, 0.04), 0 12px 26px -22px rgba(20, 25, 45, 0.22);
}

body.master-v3-theme #panel-home .m3-home-stat-rail .m3-kpi-tile {
  flex: 1;
  min-height: auto;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

body.master-v3-theme #panel-home .m3-home-stat-rail .m3-kpi-tile + .m3-kpi-tile {
  border-left: 1px solid var(--m3-home-divider);
}

body.master-v3-theme #panel-home .m3-home-kpi .m3-kpi-tile__value {
  font-family: var(--m3-home-font-display);
  font-variant-numeric: tabular-nums;
}

body.master-v3-theme #panel-home .m3-home-stat-rail .m3-kpi-tile__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--m3-home-label);
}

body.master-v3-theme #panel-home .m3-kpi-tile--today-rev .m3-kpi-tile__value {
  color: var(--m3-home-accent);
}

/* — Quick actions: stacked rows with icon chip + chevron (matches эталон) — */
body.master-v3-theme #panel-home .m3-home-quick__title {
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--m3-home-label);
}

body.master-v3-theme #panel-home .m3-home-quick__title i {
  display: none;
}

body.master-v3-theme #panel-home .m3-home-quick__grid {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

body.master-v3-theme #panel-home .m3-home-quick__card {
  flex-direction: row;
  align-items: center;
  gap: 13px;
  padding: 15px;
  border: none;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(20, 25, 45, 0.04), 0 12px 26px -24px rgba(20, 25, 45, 0.22);
}

body.master-v3-theme #panel-home .m3-home-quick__card:hover {
  border-color: transparent;
  box-shadow: 0 1px 2px rgba(20, 25, 45, 0.04), 0 14px 30px -22px rgba(20, 25, 45, 0.26);
}

body.master-v3-theme #panel-home .m3-home-quick__icon {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--m3-home-accent-bg);
  color: var(--m3-home-accent);
}

body.master-v3-theme #panel-home .m3-home-quick__icon--ok {
  background: var(--m3-home-ok-bg);
  color: var(--m3-home-ok-icon);
}

body.master-v3-theme #panel-home .m3-home-quick__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

body.master-v3-theme #panel-home .m3-home-quick__label {
  font-weight: 800;
}

body.master-v3-theme #panel-home .m3-home-quick__sub {
  color: var(--m3-home-ink-muted);
  font-weight: 600;
}

body.master-v3-theme #panel-home .m3-home-quick__sub.master-home-qbtn__sub--hot {
  color: var(--m3-home-accent);
  font-weight: 700;
}

body.master-v3-theme #panel-home .m3-home-quick__sub.master-home-qbtn__sub--muted {
  color: var(--m3-home-ink-muted);
}

body.master-v3-theme #panel-home .m3-home-quick__chevron {
  flex: none;
  color: #c2c6d0;
  font-size: 14px;
}

/* — Today rail: display font, accent first stat — */
body.master-v3-theme #panel-home .m3-home-today__stat-val {
  font-family: var(--m3-home-font-display);
}

body.master-v3-theme #panel-home .m3-home-today__stat:first-child .m3-home-today__stat-val {
  color: var(--m3-home-accent);
}

/* — Today rail: display font, accent first stat — */
body.master-v3-theme #panel-home .m3-home-today__stat-val {
  font-family: var(--m3-home-font-display);
}

body.master-v3-theme #panel-home .m3-home-today__stat:first-child .m3-home-today__stat-val {
  color: var(--m3-home-accent);
}