/* DoorForce Office UX V2 — workspace shell */
:root {
  --df-ws-navy: #0b1f3a;
  --df-ws-red: #bf0a30;
  --df-ws-muted: #64748b;
  --df-ws-border: #e2e8f0;
  --df-ws-soft: #f8fafc;
}

html.df-ux-v2 .sidebar .nav-section { display: none !important; }

html.df-ux-v2 #office-nav-links {
  padding: 8px 10px 16px;
  gap: 4px;
  display: flex;
  flex-direction: column;
}

html.df-ux-v2 #office-nav-links .nav-link {
  border-radius: 10px;
  padding: 11px 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

html.df-ux-v2 #office-nav-links .nav-link.active {
  background: rgba(191, 10, 48, 0.12);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--df-ws-red);
}

html.df-ux-v2 .df-executive-hero {
  display: none !important;
}

#df-workspace-tabs {
  margin: 0 0 14px;
}

.df-ws-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  background: var(--df-ws-soft);
  border: 1px solid var(--df-ws-border);
  border-radius: 12px;
}

.df-ws-tab {
  border: 0;
  background: transparent;
  color: var(--df-ws-navy);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.df-ws-tab:hover { background: #fff; }
.df-ws-tab.is-active {
  background: var(--df-ws-navy);
  color: #fff;
}

.df-header-icon-btn {
  position: relative;
  border: 1px solid var(--df-ws-border);
  background: #fff;
  color: var(--df-ws-navy);
  border-radius: 999px;
  padding: 8px 12px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.df-header-teron {
  background: var(--df-ws-navy);
  color: #fff;
  border-color: var(--df-ws-navy);
}

.df-header-search {
  max-width: 220px;
  min-width: 140px;
  border-radius: 999px !important;
  padding: 8px 14px !important;
  font-size: 0.82rem !important;
}

.df-header-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--df-ws-red);
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  font-weight: 800;
}

/* Teron lives in the header — hide floating FAB in UX V2 */
html.df-ux-v2 #teron-fab,
html.df-ux-v2 .df-teron-fab,
html.df-ux-v2 .df-jarvis-fab {
  display: none !important;
}

html.df-ux-v2 .df-module-tabs {
  display: none !important;
}

html.df-ux-v2 .top-nav-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

html.df-ux-v2 .content-body .card {
  border-radius: 12px;
}

html.df-ux-v2 .df-workspace-tabs-host:not([hidden]) {
  margin-bottom: 16px;
}

.df-header-icon-btn:hover { border-color: #94a3b8; }
.df-header-teron {
  background: var(--df-ws-navy);
  color: #fff;
  border-color: var(--df-ws-navy);
}

.df-header-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--df-ws-red);
  color: #fff;
  font-size: 0.65rem;
  line-height: 16px;
  text-align: center;
}

/* Hide floating Teron FAB in V2 — header entry only */
html.df-ux-v2 #teron-fab,
html.df-ux-v2 .df-teron-fab,
html.df-ux-v2 .df-jarvis-fab {
  display: none !important;
}

/* Customer workspace tabs */
.df-cust-ws-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 16px;
  padding: 6px;
  background: var(--df-ws-soft);
  border: 1px solid var(--df-ws-border);
  border-radius: 12px;
}

.df-cust-ws-tab {
  border: 0;
  background: transparent;
  color: var(--df-ws-navy);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.df-cust-ws-tab.is-active {
  background: var(--df-ws-navy);
  color: #fff;
}

.df-cust-ws-pane[hidden] { display: none !important; }

.df-cust-ws-pane .card {
  border-radius: 12px;
}

.top-navbar {
  gap: 12px;
  flex-wrap: wrap;
}

.top-nav-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

@media (max-width: 900px) {
  .df-ws-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .df-cust-ws-tabs { overflow-x: auto; flex-wrap: nowrap; }
}

/* —— Header Profile drawer —— */
.df-profile-root[hidden] { display: none !important; }
.df-profile-root {
  position: fixed;
  inset: 0;
  z-index: 12000;
}
.df-profile-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 35, 66, 0.38);
}
.df-profile-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(420px, 100vw);
  height: 100%;
  background: #fff;
  color: #0a2342;
  box-shadow: -12px 0 40px rgba(10, 35, 66, 0.18);
  display: flex;
  flex-direction: column;
  overflow: auto;
  padding: 18px 18px 28px;
  animation: df-profile-slide 0.18s ease-out;
}
@keyframes df-profile-slide {
  from { transform: translateX(18px); opacity: 0.6; }
  to { transform: translateX(0); opacity: 1; }
}
.df-profile-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.df-profile-drawer-head h2 {
  margin: 2px 0 0;
  font-size: 1.25rem;
  color: #0a2342;
}
.df-profile-close {
  border: 1px solid #d7dee8;
  background: #fff;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  color: #0a2342;
}
.df-profile-identity {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e5ebf2;
  border-radius: 14px;
  background: linear-gradient(180deg, #f7f9fc 0%, #fff 100%);
  margin-bottom: 12px;
}
.df-profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  background: #0a2342;
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-weight: 800;
}
.df-profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.df-profile-identity-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.df-profile-identity-text strong {
  font-size: 1rem;
}
.df-profile-identity-text span {
  font-size: 0.82rem;
  color: #475569;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.df-profile-muted { color: #64748b; font-size: 0.78rem; }
.df-profile-meta-line { white-space: normal !important; }
.df-profile-status-pill {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}
.df-profile-status-ok { background: #dcfce7; color: #166534; }
.df-profile-status-warn { background: #fef3c7; color: #92400e; }
.df-profile-status-danger { background: #fee2e2; color: #991b1b; }
.df-profile-banner {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
}
.df-profile-banner[data-tone="loading"] { background: #eff6ff; color: #1d4ed8; }
.df-profile-banner[data-tone="success"] { background: #dcfce7; color: #166534; }
.df-profile-banner[data-tone="error"] { background: #fee2e2; color: #991b1b; }
.df-profile-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.df-profile-action {
  text-align: left;
  border: 1px solid #e5ebf2;
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  font-weight: 650;
  color: #0a2342;
  cursor: pointer;
}
.df-profile-action:hover,
.df-profile-action:focus-visible {
  border-color: #0a2342;
  outline: none;
}
.df-profile-action-danger {
  color: #b91c1c;
  border-color: #fecaca;
  margin-top: 6px;
}
.df-profile-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.df-profile-dl {
  margin: 0;
  display: grid;
  gap: 10px;
}
.df-profile-dl > div {
  display: grid;
  gap: 2px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eef2f7;
}
.df-profile-dl dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}
.df-profile-dl dd {
  margin: 0;
  font-weight: 650;
}
.df-profile-field {
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 650;
}
.df-profile-fieldset {
  border: 1px solid #e5ebf2;
  border-radius: 12px;
  padding: 10px 12px;
}
.df-profile-fieldset legend {
  padding: 0 4px;
  font-size: 0.8rem;
  font-weight: 700;
}
.df-profile-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 550;
  margin: 6px 0;
}
.df-profile-photo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
#df-profile-photo-preview,
.df-profile-photo-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  background: #0a2342;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
}
.df-profile-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.df-profile-company-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.df-profile-company-row {
  text-align: left;
  border: 1px solid #e5ebf2;
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  display: grid;
  gap: 2px;
}
.df-profile-company-row span {
  font-size: 0.78rem;
  color: #64748b;
}
.df-profile-company-row.is-current {
  background: #f1f5f9;
  cursor: default;
}
.df-profile-company-row:not(.is-current):hover {
  border-color: #0a2342;
}

@media (max-width: 640px) {
  .df-profile-drawer {
    width: 100vw;
    border-radius: 0;
  }
}
