/* Root scrollbar: floating + hover-to-show (do NOT force a gutter on all elements) */
html {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

html:hover {
  scrollbar-color: var(--wd-border) transparent;
}

html::-webkit-scrollbar {
  width: 0.25rem;
  height: 0.25rem;
}

html::-webkit-scrollbar-track {
  background: transparent;
}

html::-webkit-scrollbar-thumb {
  background-color: transparent;
  border-radius: 1rem;
}

html:hover::-webkit-scrollbar-thumb {
  background-color: var(--wd-border);
}

/* Prevent accidental horizontal overflow in main content (keep header sticky stable) */
main[role="main"] {
  overflow-x: hidden;
}

@supports (overflow: clip) {
  main[role="main"] {
    overflow-x: clip;
  }
}

/* Fix z-index for NextUI global settings popover */
.sx-global-settings-container,
.sx-popover,
[data-popper-placement] {
    z-index: 9999 !important;
}

/* Fix: When sidebar has an open menu dropdown, elevate sidebar's stacking context
   above main content area (which has z-index: 200) to allow clicks on the menu */
.sx-shell-sidebar:has(.sx-menu-dropdown) {
    z-index: 300 !important;
}

/* Ensure the menu dropdown and overlay are above everything when in sidebar */
.sx-shell-sidebar .sx-menu-dropdown,
.sx-shell-sidebar .sx-menu-overlay {
    z-index: 9999 !important;
}

/* Hide scrollbars when not hovered on some containers */
.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: var(--wd-border) transparent;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 0.375rem;
}

/* Floating scrollbar that doesn't occupy space and shows on hover */
.floating-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.floating-scrollbar:hover {
    scrollbar-color: var(--wd-border) transparent;
}

.floating-scrollbar::-webkit-scrollbar {
    width: 0.25rem;
}

.floating-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.floating-scrollbar::-webkit-scrollbar-thumb {
    background-color: transparent;
    border-radius: 1rem;
}

.floating-scrollbar:hover::-webkit-scrollbar-thumb {
    background-color: var(--wd-border);
}

/* Desk Pool Content Fixed Height */
.wd-desk-pool-content {
    height: 12rem;
    overflow-y: auto;
}

/* Global page sizing & gutters (keep Header/Body/Footer aligned) */
:root {
  --wd-page-max-width: 120rem;
  --wd-page-gutter-x: 1rem;
  --wd-page-gutter-y: 1.5rem;
}

@media (min-width: 48rem) {
  :root {
    --wd-page-gutter-x: 1.5rem;
  }
}

.wd-page-shell {
  /* Use visual viewport width to avoid "layout viewport < visual viewport" gaps */
  width: 100vw;
  max-width: min(var(--wd-page-max-width), 100vw);
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  /* Fallback first (in case env() is unsupported) */
  padding-left: var(--wd-page-gutter-x);
  padding-right: var(--wd-page-gutter-x);
  /* Safe-area aware override */
  --wd-safe-x: max(env(safe-area-inset-left), env(safe-area-inset-right));
  padding-left: calc(var(--wd-page-gutter-x) + var(--wd-safe-x));
  padding-right: calc(var(--wd-page-gutter-x) + var(--wd-safe-x));
}

/* Desk shell: Desk-specific vertical spacing only (x-gutters are handled by wd-page-shell) */
.wd-desk-shell {
  padding-top: var(--wd-page-gutter-y);
}

/* Header: prevent overflowing children from increasing page scrollWidth */
.wd-header-clip {
  overflow-x: clip;
}

@supports not (overflow: clip) {
  .wd-header-clip {
    overflow-x: hidden;
  }
}

/* Header: allow horizontal scroll when content overflows */
.wd-header-scroll {
  overflow-x: auto;
  /* Allow dropdowns/popovers to overflow vertically from the sticky header */
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

/* Ensure the header row can exceed container width and be scrolled */
.wd-header-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 100%;
  gap: 2rem;
  min-width: max-content;
  width: 100%;
}

/* Perfect Day modal: stable 50/50 layout (avoid Tailwind breakpoint issues) */
.wd-perfectday-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: stretch;
}

@media (min-width: 64rem) {
  .wd-perfectday-layout {
    flex-direction: row;
    align-items: flex-start;
  }
}

.wd-perfectday-col {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Safe area for mobile devices */
.safe-pb {
    padding-bottom: env(safe-area-inset-bottom);
}

.safe-pt {
    padding-top: env(safe-area-inset-top);
}

/* Title bar color for mobile PWA */
:root {
    --wd-header-height: 4rem;
}

html {
  font-size: 0.875rem;
}

@media (min-width: 48rem) {
  html {
    font-size: 1rem;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* Removed: html { position: relative; min-height: 100%; }
   This was an old sticky-footer pattern that conflicts with the AppShell layout.
   The app shell now handles height via 100vh. */

/* AppShell layout: prevent document-level scrolling, let shell content scroll independently */
html, body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  height: 100%;
}

/* AppShell content container: relative positioning for fixed footer */
.wd-app-shell {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Main content area should be scrollable */
#app-body-slot {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
}

/* Full height content (no padding needed for footer) */
.wd-content-full {
  padding-bottom: 2.5rem; /* Space for footer */
}

/* Fixed footer bar with frosted glass effect */
.wd-footer-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 0.5rem 1rem;
  background: var(--wd-bg-glass, rgba(255, 255, 255, 0.7));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--wd-border-glass, rgba(0, 0, 0, 0.05));
}

/* Dark theme glass effect */
[data-theme="dark"] .wd-footer-bar {
  background: rgba(30, 30, 30, 0.7);
  border-top-color: rgba(255, 255, 255, 0.05);
}

/* Public layout (unauthenticated): full viewport without sidebar */
.wd-public-layout {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--sx-colorNeutralBackground1, var(--wd-bg));
}
}

/* Enable elastic/rubber-band scrolling globally for all scrollable elements (macOS/iOS) */
* {
  -webkit-overflow-scrolling: touch;
}

/* Ensure overscroll bounce effect is enabled for scrollable containers */
[style*="overflow: auto"],
[style*="overflow-y: auto"],
[style*="overflow: scroll"],
[style*="overflow-y: scroll"] {
  overscroll-behavior: auto;
}

/* Common scrollable patterns */
.sx-sidebar-nav-content,
.sx-shell-route,
#app-body-slot,
[class*="overflow-y-auto"],
[class*="overflow-auto"] {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: auto;
}

.wd-task-card {
  cursor: grab;
}

.wd-drag-handle {
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  font-weight: 700;
  line-height: 1;
}

.wd-drag-handle:active {
  cursor: grabbing;
}

.wd-drag-ghost {
  position: fixed;
  z-index: 10000;
  pointer-events: none !important;
  opacity: 0.8;
  box-shadow: 0 0.625rem 1.5625rem rgba(0, 0, 0, 0.1);
  transform: rotate(2deg);
  transition: transform 0.1s;
}

/* Global lock to prevent text selection during any drag operation */
.wd-dragging-active, 
.wd-dragging-active *,
[draggable="true"]:active,
[draggable="true"]:active * {
  user-select: none !important;
  -webkit-user-select: none !important;
  cursor: grabbing !important;
}

.wd-drag-ghost * {
  /* Ensure all content is visible in the ghost */
  visibility: visible !important;
}

.wd-toast {
  position: fixed;
  left: 50%;
  bottom: 1.375rem;
  transform: translateX(-50%);
  z-index: 9999;
  padding: 0.625rem 0.75rem;
  border-radius: 0.625rem;
  background: rgba(220, 53, 69, 0.95);
  color: #fff;
  font-size: 0.8125rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease-in-out;
  max-width: 70vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wd-toast--show {
  opacity: 1;
}

.wd-task-card--dragging {
  opacity: 0.4;
  cursor: grabbing;
}

.wd-task-card--selected {
  border-color: var(--wd-primary) !important;
  background-color: var(--wd-muted-bg) !important;
  box-shadow: 0 0 0 0.125rem var(--wd-primary) !important;
}

.wd-task-card--preview {
  outline: 0.125rem dashed var(--wd-primary);
  outline-offset: 0.125rem;
  background: var(--wd-muted-bg) !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.wd-task-card--preview * {
  visibility: hidden;
}

.wd-task-placeholder {
  pointer-events: none;
  margin-bottom: 0.75rem;
  transition: all 0.15s ease;
}

.wd-dropzone {
  min-height: 2rem;
  padding-bottom: 0.5rem;
}

.wd-dropzone--over {
  background: rgba(13, 110, 253, 0.06);
  border-radius: 0.75rem;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Dropdowns and Popovers */
.wd-popover {
    background-color: var(--wd-card-bg) !important;
    border: 0.0625rem solid var(--wd-border) !important;
    border-radius: 0.75rem !important;
    box-shadow: var(--wd-popover-shadow) !important;
    padding: 0.5rem 0 !important;
    opacity: 1 !important;
}

[data-theme='dark'] .wd-popover {
    background-color: #1f2937 !important;
}

.wd-menu-item, .wd-popover-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--wd-fg) !important;
    transition: all 0.2s;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none !important;
    white-space: nowrap;
}

.wd-menu-item:hover, .wd-popover-item:hover {
    background-color: var(--wd-hover-bg) !important;
}

details[data-wd-dropdown] > summary {
    list-none: none;
}

details[data-wd-dropdown] > summary::-webkit-details-marker {
    display: none;
}

details[data-wd-dropdown][open] > .wd-popover {
    display: block;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInFromTop {
    from { transform: translateY(-0.5rem); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.animate-in {
    animation-duration: 200ms;
    animation-fill-mode: both;
}

.fade-in {
    animation-name: fadeIn;
}

.slide-in-from-top-1 {
    animation-name: slideInFromTop;
}

/* Breathing animation for paused state */
@keyframes wdBreathe {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.35;
        transform: scale(0.85);
    }
}

.wd-animate-breathe {
    animation: wdBreathe 2s ease-in-out infinite;
}

@keyframes wdSpinSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-spin-slow {
    animation: wdSpinSlow 3s linear infinite;
}

/* Task Checklist Styling */
.prose ul > li input[type="checkbox"] {
    margin-right: 0.5rem;
    cursor: pointer;
    accent-color: var(--wd-primary);
    width: 1.1rem;
    height: 1.1rem;
    vertical-align: middle;
}

.prose ul > li:has(input[type="checkbox"]:checked) {
    text-decoration: line-through;
    opacity: 0.6;
}

.prose ul {
    list-style-type: none;
    padding-left: 0.5rem;
}

.prose li {
    padding-left: 0;
}

/* NextUI notification bell styles */
.wd-notification {
    position: relative;
}

.wd-notification-trigger {
    position: relative;
}

.wd-notification-badge-right,
.wd-notification-badge-left {
    position: absolute;
    top: -2px;
}

.wd-notification-badge-right {
    right: -2px;
}

.wd-notification-badge-left {
    left: -2px;
}

.wd-notification-panel {
    width: 20rem;
    max-height: 28rem;
    overflow: hidden;
}

.wd-notification-header {
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--wd-border);
    background: var(--wd-muted-bg);
}

.wd-notification-title {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.wd-notification-body {
    max-height: 24rem;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.wd-notification-section {
    padding: 0 0.75rem 0.75rem;
    border-bottom: 1px solid var(--wd-border);
}

.wd-notification-section-header {
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.wd-notification-section-title {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.wd-notification-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.wd-notification-item {
    width: 100%;
    justify-content: space-between;
    text-align: left;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
}

.wd-notification-item-text {
    flex: 1;
    min-width: 0;
}

.wd-notification-item-title {
    font-weight: 700;
    text-transform: uppercase;
}

.wd-notification-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    margin-top: 0.25rem;
}

.wd-notification-muted {
    color: var(--wd-muted-fg);
}

.wd-notification-read {
    opacity: 0.6;
}

.wd-notification-empty {
    padding: 1.5rem;
    text-align: center;
    color: var(--wd-muted-fg);
}

.wd-footer {
    justify-content: space-between;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 10px;
}

.wd-footer-meta {
    align-items: center;
}

/* NextUI navbar layout helpers */
.wd-navbar-title {
    width: 100%;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
}

.wd-navbar-title-text {
    font-weight: 700;
    letter-spacing: 0.08em;
}

.wd-navbar-title-actions {
    align-items: center;
    flex-shrink: 0;
}

.wd-navbar-left {
    align-items: center;
    min-width: 0;
}

.wd-navbar-actions {
    align-items: center;
    flex-shrink: 0;
}

/* Global menu (ellipsis) */
.wd-global-menu {
    position: relative;
}

.wd-global-menu-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: none;
    background: transparent;
    cursor: pointer;
}

.wd-global-menu-trigger:hover {
    background: color-mix(in srgb, var(--wd-muted-bg) 60%, transparent);
}

.wd-global-menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 160px;
    background: var(--wd-card-bg);
    border: 1px solid var(--wd-border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 2100;
    display: flex;
    flex-direction: column;
    padding: 6px;
    gap: 4px;
}

.wd-global-menu-item {
    display: block;
    padding: 6px 10px;
    border-radius: 6px;
    color: var(--wd-fg);
    text-decoration: none;
    font-size: 12px;
}

.wd-global-menu-item:hover {
    background: color-mix(in srgb, var(--wd-muted-bg) 60%, transparent);
}

.wd-global-menu {
    position: relative;
}

.wd-global-menu-trigger {
    display: inline-flex;
    align-items: center;
    gap: var(--sx-spacing-xs);
    padding: 0.35rem 0.6rem;
    border-radius: 0.75rem;
    color: var(--wd-muted-fg);
    background: transparent;
    border: none;
}

.wd-global-menu-trigger:hover {
    color: var(--wd-fg);
    background: var(--wd-muted-bg);
}

.wd-global-menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 0.4rem);
    min-width: 12rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.4rem;
    border-radius: 0.8rem;
    background: var(--wd-card-bg);
    border: 1px solid var(--wd-border);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
    z-index: 3000;
}

.wd-global-menu-item {
    padding: 0.45rem 0.7rem;
    border-radius: 0.6rem;
    color: var(--wd-fg);
    font-size: 0.85rem;
    text-decoration: none;
}

.wd-global-menu-item:hover {
    background: var(--wd-muted-bg);
}

/* Sidebar content and footer */
.wd-sidebar-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.wd-sidebar-content > .sx-nav-menu {
    flex: 1;
    overflow-y: auto;
}

.wd-sidebar-footer {
    padding: var(--sx-spacing-sm);
    border-top: 1px solid var(--wd-border);
    margin-top: auto;
}

.wd-sidebar-actions {
    justify-content: center;
}

.sx-shell-splitter {
    cursor: col-resize;
}

/* Fix NextUI nav menu group collapse bug: scoped CSS overrides hidden attribute */
/* The component sets display:flex unconditionally, ignoring the hidden attribute */
.sx-nav-menu-group-items[hidden] {
    display: none !important;
}

/* NextUI mini pomodoro styles */
.wd-mini-pomodoro {
    position: relative;
}

.wd-mini-pomodoro-trigger {
    border-radius: 999px;
}

.wd-mini-pomodoro-time {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.wd-mini-pomodoro-type {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--wd-muted-fg);
}

.wd-mini-pomodoro-panel {
    width: 16rem;
    padding: 0.75rem;
}

.wd-mini-pomodoro-header {
    justify-content: space-between;
    border-bottom: 1px solid var(--wd-border);
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
}

.wd-mini-pomodoro-title {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--wd-muted-fg);
}

.wd-mini-pomodoro-type-active {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--wd-primary);
    font-weight: 700;
}

.wd-mini-pomodoro-action {
    width: 100%;
    justify-content: flex-start;
}

.wd-mini-pomodoro-action-active {
    background: color-mix(in srgb, var(--wd-primary) 12%, transparent);
    color: var(--wd-primary);
}

.wd-mini-pomodoro-action-success {
    color: #16a34a;
}

.wd-mini-pomodoro-action-danger {
    color: #dc2626;
}

.wd-mini-pomodoro-settings {
    margin-top: 0.5rem;
    width: 100%;
    justify-content: flex-start;
    color: var(--wd-muted-fg);
}

/* NextUI desk card styles */
.wd-desk-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    background: var(--wd-muted-bg);
    border-bottom: 1px solid var(--wd-border);
}

.wd-desk-card-title {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--wd-muted-fg);
    font-weight: 700;
}

.wd-desk-card-actions {
    align-items: center;
}

.wd-desk-card-footer {
    padding: 0.5rem 0.75rem;
    border-top: 1px solid var(--wd-border);
    background: color-mix(in srgb, var(--wd-muted-bg) 35%, transparent);
}

/* Standard Blazor Navigation Styles */
.wd-nav {
    padding: 0.5rem;
}

.wd-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.wd-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    border-radius: 0.5rem;
    color: var(--wd-fg);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.wd-nav-item:hover {
    background: var(--wd-muted-bg);
    color: var(--wd-fg);
    text-decoration: none;
}

.wd-nav-item.active {
    background: color-mix(in srgb, var(--wd-primary) 15%, transparent);
    color: var(--wd-primary);
    font-weight: 600;
}

.wd-nav-item i {
    width: 1.25rem;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.7;
}

.wd-nav-item.active i {
    opacity: 1;
}

.wd-nav-group {
    margin-top: 0.25rem;
}

.wd-nav-group-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.625rem 0.875rem;
    border-radius: 0.5rem;
    border: none;
    background: none;
    color: var(--wd-fg);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.wd-nav-group-header:hover {
    background: var(--wd-muted-bg);
}

.wd-nav-group-header i {
    width: 1.25rem;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.7;
}

.wd-nav-chevron {
    margin-left: auto;
    font-size: 0.7rem;
    opacity: 0.5;
}

.wd-nav-submenu {
    list-style: none;
    margin: 0;
    padding: 0.25rem 0 0.25rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.wd-nav-submenu .wd-nav-item {
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
}

/* Static group header for non-interactive Razor Pages context */
.wd-nav-group-static {
    cursor: default;
}

.wd-nav-group-static:hover {
    background: transparent;
}

/* Collapsed submenu - hidden by default in Razor Pages context */
.wd-nav-submenu-collapsed {
    display: none;
}

/* ==================== */
/* UserBar Component    */
/* ==================== */
.wd-sidebar-userbar {
    margin-top: auto;
    border-top: 1px solid var(--wd-border);
    flex-shrink: 0;
}

.wd-user-bar {
    position: relative;
    padding: 0.5rem;
}

.wd-user-bar-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-radius: 0.75rem;
    transition: all 0.15s ease;
    border: none;
    background: transparent;
    cursor: pointer;
}

.wd-user-bar-trigger:hover {
    background: var(--wd-muted-bg);
}

.wd-user-bar-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.wd-user-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--wd-primary) 0%, color-mix(in srgb, var(--wd-primary) 70%, #000) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wd-primary-fg);
    font-size: 0.875rem;
    flex-shrink: 0;
}

.wd-user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--wd-fg);
    flex: 1;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wd-user-chevron {
    font-size: 0.625rem;
    color: var(--wd-muted-fg);
}

.wd-user-menu {
    position: absolute;
    bottom: calc(100% + 0.5rem);
    left: 0.5rem;
    right: 0.5rem;
    background: var(--wd-card-bg);
    border: 1px solid var(--wd-border);
    border-radius: 0.75rem;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.15);
    padding: 0.5rem;
    z-index: 100;
}

.wd-user-menu-header {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--wd-border);
    margin-bottom: 0.25rem;
}

.wd-user-menu-title {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--wd-muted-fg);
    font-weight: 700;
    font-size: 0.625rem;
}

.wd-user-menu-items {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.wd-user-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: var(--wd-fg);
    text-decoration: none;
    transition: all 0.15s ease;
}

.wd-user-menu-item:hover {
    background: var(--wd-muted-bg);
    text-decoration: none;
    color: var(--wd-fg);
}

.wd-user-menu-item i {
    width: 1rem;
    text-align: center;
    opacity: 0.7;
}

.wd-user-menu-item span {
    flex: 1;
    text-align: left;
}

.wd-user-menu-divider {
    height: 1px;
    background: var(--wd-border);
    margin: 0.375rem 0;
}

.wd-user-menu-item-danger {
    color: #dc2626;
}

.wd-user-menu-item-danger:hover {
    background: color-mix(in srgb, #dc2626 10%, transparent);
    color: #dc2626;
}

.wd-highlight-pulse {
    animation: wd-highlight-pulse 0.6s ease-out 3;
    box-shadow: 0 0 0 3px var(--wd-primary) !important;
    border-radius: 0.75rem;
}

@keyframes wd-highlight-pulse {
    0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.5); }
    100% { box-shadow: 0 0 0 6px transparent; }
}