/* ==========================================================================
   Phase 2 고도화: 상단 헤더 계정 드롭다운 · 반응형 3단 쉘 (태블릿·모바일)
   ========================================================================== */

.vo-account-menu {
  position: relative;
  display: inline-block;
}

.vo-account-trigger {
  list-style: none;
  gap: 6px;
}

.vo-account-trigger::-webkit-details-marker {
  display: none;
}

.vo-account-role-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
  background: rgba(217, 120, 59, 0.2);
  color: var(--accent-lime);
  border: 1px solid rgba(217, 120, 59, 0.4);
}

.vo-account-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 230px;
  padding: 8px;
  border-radius: 12px;
  background: var(--bg-panel);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-panel);
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vo-account-meta {
  padding: 6px 10px 8px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 4px;
}

.vo-account-meta-name {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text-primary);
}

.vo-account-meta-email {
  font-size: 11px;
  color: var(--text-muted);
  word-break: break-all;
}

.vo-account-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.vo-account-menu-item:hover {
  background: var(--bg-panel-elevated);
}

.vo-account-menu-item.is-danger {
  color: var(--accent-danger);
}

.vo-account-menu-item.is-danger:hover {
  background: rgba(239, 68, 68, 0.12);
}

.vo-account-menu-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 4px 2px;
}

.vo-account-menu form {
  margin: 0;
  width: 100%;
}

body.theme-light .vo-account-role-tag {
  background: #fbe7d8;
  color: #8c3b10;
  border-color: rgba(184, 84, 28, 0.35);
}

body.theme-light .vo-account-dropdown {
  background: #ffffff;
  border-color: #d4cdc1;
  box-shadow: 0 12px 28px rgba(24, 22, 20, 0.14);
}

.vo-account-mobile-actions {
  display: none;
}

.vo-cmdk-icon {
  font-size: 12px;
  line-height: 1;
}

.vo-inline-avatar-form {
  flex-wrap: wrap;
}

@media (max-width: 980px) {
  .vo-invite-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vo-member-inline-grid {
    grid-template-columns: minmax(180px, 1fr) 92px;
  }

  .vo-mail-template-workbench,
  .vo-account-settings-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .vo-invite-grid-3,
  .vo-member-inline-grid,
  .vo-integration-meta-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.desk-container code,
.vo-modal-card code,
.vo-right-hud code {
  overflow-wrap: anywhere;
}

@media (max-width: 1180px) {
  .vo-shell,
  .vo-shell.is-right-hidden {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .vo-shell.is-left-hidden,
  .vo-shell.is-left-hidden.is-right-hidden,
  .vo-shell-guest,
  .vo-shell-guest.is-right-hidden {
    grid-template-columns: minmax(0, 1fr);
  }

  .vo-guest-portal-shortcut {
    display: inline-flex;
  }

  .vo-hud-backdrop {
    display: block;
    position: fixed;
    top: 52px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(2, 6, 23, 0.56);
    backdrop-filter: blur(2px);
    z-index: 44;
  }

  .vo-right-hud {
    position: fixed;
    top: 52px;
    right: 0;
    bottom: 0;
    height: auto;
    width: min(352px, 88vw);
    z-index: 45;
    box-shadow: -8px 0 28px rgba(0, 0, 0, 0.45);
  }

  .vo-right-hud-mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
  }

  .vo-right-hud-mobile-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-primary);
  }
}

@media (max-width: 1040px) {
  .vo-header {
    padding: 0 12px;
    gap: 8px;
  }

  .vo-brand-sub {
    display: none;
  }

  .vo-cmdk-trigger .vo-kbd {
    display: none;
  }
}

@media (max-width: 960px) {
  .vo-header-desktop-only {
    display: none !important;
  }

  .vo-account-mobile-actions {
    display: block;
  }
}

@media (max-width: 768px) {
  .vo-header {
    padding: 0 10px;
    gap: 6px;
  }

  .vo-brand {
    gap: 6px;
    font-size: 13.5px;
  }

  .vo-layout-toggles {
    margin-left: 0;
    gap: 4px;
  }

  .vo-toggle-left {
    display: none !important;
  }

  .vo-header-actions {
    gap: 5px;
  }

  .vo-header-actions .btn-header,
  .vo-brand .btn-header {
    padding: 5px 8px;
    font-size: 11px;
  }

  .vo-shell,
  .vo-shell.is-left-hidden,
  .vo-shell.is-right-hidden,
  .vo-shell.is-left-hidden.is-right-hidden,
  .vo-shell-guest,
  .vo-shell-guest.is-right-hidden {
    grid-template-columns: minmax(0, 1fr);
    padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  }

  .vo-shell-guest,
  .vo-shell-guest.is-right-hidden {
    padding-bottom: 0;
  }

  .vo-shell.is-left-hidden .vo-left-rail {
    display: flex !important;
  }

  .vo-left-rail {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(56px + env(safe-area-inset-bottom, 0px));
    flex-direction: row;
    align-items: center;
    padding: 4px 8px calc(4px + env(safe-area-inset-bottom, 0px));
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    border-right: 0;
    border-top: 1px solid var(--border-subtle);
    z-index: 42;
  }

  .vo-left-rail::-webkit-scrollbar {
    display: none;
  }

  .vo-nav-link {
    min-width: 64px;
    padding: 5px 8px;
    flex-shrink: 0;
    white-space: nowrap;
  }

  .vo-nav-link .nav-count-badge {
    position: absolute;
    top: 2px;
    right: 4px;
    margin-left: 0;
    padding: 0 4px;
    font-size: 9px;
  }

  .vo-rail-hide-btn {
    display: none;
  }

  .vo-hud-backdrop,
  .vo-right-hud {
    bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  }

  .vo-right-hud {
    width: min(360px, 92vw);
    padding: 10px;
    gap: 10px;
  }

  .vo-right-hud .hud-card-resize-handle {
    display: none;
  }

  .vo-right-hud .hud-section-card-resizable {
    max-height: none;
    flex: 0 0 auto;
    padding-bottom: 10px;
  }

  .vo-right-hud .hud-card-body {
    max-height: 240px;
  }

  .vo-shell-guest .vo-hud-backdrop,
  .vo-shell-guest .vo-right-hud {
    bottom: 0;
  }

  .desk-container {
    padding: 14px 12px 24px;
  }

  .page-header-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 14px;
  }

  .page-title {
    font-size: 18px;
  }

  .page-subtitle {
    font-size: 12.5px;
  }

  .canvas-overlay-top-center {
    display: none;
  }

  .canvas-overlay-top-left {
    top: 10px;
    left: 10px;
    right: 10px;
    flex-wrap: wrap;
    gap: 6px;
  }

  .canvas-overlay-top-right {
    top: auto;
    bottom: 12px;
    left: 10px;
    right: auto;
    width: auto;
    max-width: calc(100% - 130px);
    padding: 6px 8px;
  }

  .floor-selector-title,
  .workspace-mini-box {
    display: none;
  }

  .floor-selector-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }

  .floor-selector-item {
    padding: 4px 7px;
    font-size: 11px;
    gap: 0;
  }

  .floor-selector-item > span:not(.floor-code-chip) {
    display: none;
  }

  .canvas-overlay-bottom-right {
    bottom: 12px;
    right: 10px;
  }

  .canvas-camera-actions {
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
  }

  .btn-floating {
    padding: 6px 9px;
    font-size: 11px;
  }

  .canvas-inspector-card {
    top: auto;
    bottom: 64px;
    left: 10px;
    right: 10px;
    width: auto;
    max-width: none;
  }
}

@media (max-width: 640px) {
  .vo-cmdk-trigger .vo-cmdk-label {
    display: none;
  }

  .vo-guest-limit-note {
    display: none;
  }

  .vo-account-name {
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .card-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .kpi-value {
    font-size: 18px;
    line-height: 1.25;
    margin: 3px 0;
  }

  .panel-box {
    padding: 12px;
  }

  .smart-form-body {
    padding: 14px 12px;
  }

  .smart-summary,
  .smart-card-header {
    padding: 12px;
  }

  .vo-modal-backdrop {
    padding: 10px;
  }

  .vo-modal-card,
  .vo-modal-card-wide,
  .vo-modal-card-xl {
    width: 100%;
    max-width: 100%;
    max-height: 92vh;
    max-height: 92dvh;
    padding: 14px;
    border-radius: 12px;
  }

  .mail-html-frame {
    min-height: 240px;
    height: 300px;
  }

  .mail-search-form {
    width: 100%;
    margin-left: 0;
  }

  .mail-search-input-box {
    flex: 1 1 160px;
    width: auto;
    min-width: 0;
  }

  .mail-search-select {
    flex: 1 1 120px;
    min-width: 0;
    max-width: 100%;
  }

  .mail-compact-row {
    padding: 10px 11px;
  }

  .vo-mnt-board-card {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .vo-notif-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .vo-notif-icon-col {
    display: none;
  }

  .vo-notif-side {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .mail-compact-sender-meta {
    white-space: normal;
  }

  .mail-compact-title-btn,
  .mail-compact-title-text,
  .mail-compact-summary {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .vo-acc-project-select {
    min-width: 0;
    max-width: 100%;
    width: 100%;
  }

  .vo-catalog-search {
    width: 100%;
  }

  .picker-input-group {
    flex-direction: column;
    align-items: stretch;
  }

  .vo-modal-footer-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .vo-modal-footer-bar > .u-flex-center-gap-8 {
    justify-content: flex-end;
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .status-pill {
    padding: 2px 6px;
    font-size: 10px;
  }

  .vo-account-role-tag {
    display: none;
  }

  .vo-cmdk-footer {
    flex-wrap: wrap;
    gap: 8px;
  }
}

@media (max-width: 380px) {
  .card-grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Phase 3 고도화: 인스펙터 1클릭 모델 티어 퀵 전환 바
   ========================================================================== */

.inspector-tier-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.inspector-tier-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  margin-right: 4px;
}

.inspector-tier-btn {
  appearance: none;
  border: 1px solid var(--border-subtle);
  background: var(--bg-panel-elevated);
  color: var(--text-secondary);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 10.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.inspector-tier-btn:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.inspector-tier-btn.is-active {
  background: rgba(217, 120, 59, 0.22);
  border-color: rgba(217, 120, 59, 0.55);
  color: var(--accent-lime);
}

body.theme-light .inspector-tier-btn.is-active {
  background: #fbe7d8;
  border-color: #b8541c;
  color: #8c3b10;
}

/* ==========================================================================
   Phase 6: 글로벌 ⌘K 커맨드 팔레트 · 실시간 허브 배너 · 3F AgentRun 라이브 피드
   ========================================================================== */

.vo-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.vo-cmdk-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.vo-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 5px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--bg-panel-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.vo-cmdk-backdrop {
  align-items: flex-start;
  padding-top: min(14vh, 110px);
}

.vo-cmdk-card {
  width: min(640px, 94vw);
  padding: 0;
  overflow: hidden;
}

.vo-cmdk-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-panel-elevated);
}

.vo-cmdk-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  outline: none;
}

.vo-cmdk-input::placeholder {
  color: var(--text-placeholder);
}

.vo-cmdk-list {
  max-height: 360px;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vo-cmdk-item {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 9px 11px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-primary);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.vo-cmdk-item:hover,
.vo-cmdk-item.is-active {
  background: var(--bg-panel-elevated);
  border-color: var(--border-strong);
}

.vo-cmdk-item-main {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vo-cmdk-item-title {
  font-size: 13px;
  font-weight: 700;
}

.vo-cmdk-item-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  padding-left: 2px;
}

.vo-cmdk-empty {
  padding: 24px 12px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
}

.vo-cmdk-footer {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 14px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-panel-elevated);
  font-size: 11px;
  color: var(--text-muted);
}

.vo-live-sync-banner,
.vo-run-live-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 13px;
  margin-bottom: 12px;
  border-radius: 10px;
  border: 1px solid rgba(245, 158, 11, 0.38);
  background: rgba(245, 158, 11, 0.1);
  color: var(--text-primary);
  font-size: 12.5px;
}

.vo-run-live-strip {
  border-color: rgba(56, 189, 248, 0.38);
  background: rgba(56, 189, 248, 0.08);
  margin-bottom: 10px;
}

.vo-live-sync-content {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

body.theme-light .vo-live-sync-banner {
  background: #fffbeb;
  border-color: #f59e0b;
}

body.theme-light .vo-run-live-strip {
  background: #f0f9ff;
  border-color: #38bdf8;
}

.vo-guest-portal-shortcut {
  display: none;
}

.vo-run-timeline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.vo-run-step {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--border-subtle);
  background: var(--bg-panel-elevated);
  color: var(--text-muted);
}

.vo-run-step.is-active {
  background: var(--surface-sky);
  color: var(--text-sky);
  border-color: var(--border-sky);
}

.vo-run-step.is-done {
  background: var(--surface-emerald);
  color: var(--text-emerald);
  border-color: var(--border-emerald);
}

.vo-run-step.is-failed {
  background: var(--surface-danger);
  color: var(--text-danger);
  border-color: var(--border-danger);
}

