/* NKCV system layout: shared Fluent components, no theme color variants. */

/* Source: fluent-design-system.css */
/**
 * ============================================================================
 * MICROSOFT FLUENT DESIGN SYSTEM + MINIMALISM
 * ============================================================================
 * Unified design system implementation
 * All components follow Fluent Design principles
 * ============================================================================
 */

/* ========================================
   GLOBAL RESETS & BASE STYLES
   ======================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}



/* ========================================
   TYPOGRAPHY
   ======================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--app-font-family);
  font-weight: var(--app-font-weight-semibold);
  color: var(--app-text);
  line-height: 1.3;
  margin: 0;
}

h1 { font-size: var(--app-font-size-2xl); }
h2 { font-size: var(--app-font-size-xl); }
h3 { font-size: var(--app-font-size-lg); }
h4 { font-size: var(--app-font-size-md); }
h5, h6 { font-size: var(--app-font-size-base); }

p {
  margin: 0 0 var(--app-space-2);
  line-height: 1.6;
}

/* ========================================
   ICONS - UNIFIED SYSTEM
   ======================================== */
.app-icon,
.material-symbols-outlined,
.lucide-icon,
[class*="icon-"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--app-icon-size);
  height: var(--app-icon-size);
  font-size: var(--app-icon-size) !important;
  line-height: 1;
  vertical-align: middle;
  flex-shrink: 0;
  color: currentColor;
  overflow: visible;
}

.app-icon-sm,
.icon-sm { 
  width: var(--app-icon-size-sm); 
  height: var(--app-icon-size-sm); 
  font-size: var(--app-icon-size-sm) !important; 
}

.app-icon-lg,
.icon-lg { 
  width: var(--app-icon-size-lg); 
  height: var(--app-icon-size-lg); 
  font-size: var(--app-icon-size-lg) !important; 
}

.app-icon-xl,
.icon-xl { 
  width: var(--app-icon-size-xl); 
  height: var(--app-icon-size-xl); 
  font-size: var(--app-icon-size-xl) !important; 
}

/* Material Icons specific */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined' !important;
  font-weight: normal !important;
  font-style: normal !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  white-space: nowrap !important;
  word-wrap: normal !important;
  direction: ltr !important;
  -webkit-font-feature-settings: 'liga' !important;
  font-feature-settings: 'liga' !important;
}



/* ========================================
   BUTTONS - FLUENT DESIGN
   ======================================== */
.fluent-btn,
button:not([class*="unstyled"]):not([class*="nav-"]):not([type="submit"]):not(.fluent-select-search-clear):not(.auto-master-toggle):not(.auto-email-toggle):not(.create-primary-btn):not(.admin-system-btn):not(.sync-segment-btn):not(.sync-btn-block):not(.sync-chip-btn):not(.sync-btn-cancel):not(.sync-btn-confirm):not(.admin-users-primary-btn):not(.admin-users-secondary-btn):not(.admin-users-cancel-btn):not(.admin-users-danger-btn):not(.admin-users-filter-btn):not(.admin-users-icon-btn):not(.admin-users-page-btn):not(.previous-log-ai-btn):not(.btn-help-guide):not(.btn-filter-primary):not(.admin-table-tool-btn):not(.bulk-approve-btn):not(.bulk-reject-btn):not(.bulk-clear-btn):not(.fluent-select-trigger):not(.nkcv-date-picker-nav):not(.nkcv-date-picker-day),
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--app-space-1);
  height: var(--app-button-height);
  padding: 0 var(--app-space-2);
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-sm);
  background: var(--app-surface);
  color: var(--app-text);
  font-family: var(--app-font-family);
  font-size: var(--app-font-size-base);
  font-weight: var(--app-font-weight-semibold);
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: all var(--app-transition-fast) var(--app-ease);
  box-shadow: var(--app-shadow-xs);
}

.fluent-btn:hover,
button:not([class*="unstyled"]):not([class*="nav-"]):not([type="submit"]):not(.fluent-select-search-clear):not(.auto-master-toggle):not(.auto-email-toggle):not(.create-primary-btn):not(.admin-system-btn):not(.sync-segment-btn):not(.sync-btn-block):not(.sync-chip-btn):not(.sync-btn-cancel):not(.sync-btn-confirm):not(.admin-users-primary-btn):not(.admin-users-secondary-btn):not(.admin-users-cancel-btn):not(.admin-users-danger-btn):not(.admin-users-filter-btn):not(.admin-users-icon-btn):not(.admin-users-page-btn):not(.previous-log-ai-btn):not(.btn-help-guide):not(.btn-filter-primary):not(.admin-table-tool-btn):not(.bulk-approve-btn):not(.bulk-reject-btn):not(.bulk-clear-btn):not(.fluent-select-trigger):not(.nkcv-date-picker-nav):not(.nkcv-date-picker-day):hover {
  background: var(--app-surface-hover);
  border-color: var(--app-border);
  transform: translateY(-1px);
  box-shadow: var(--app-shadow-sm);
}

.fluent-btn:active,
button:not([class*="unstyled"]):not([class*="nav-"]):not([type="submit"]):not(.fluent-select-search-clear):not(.auto-master-toggle):not(.auto-email-toggle):not(.create-primary-btn):not(.admin-system-btn):not(.sync-segment-btn):not(.sync-btn-block):not(.sync-chip-btn):not(.sync-btn-cancel):not(.sync-btn-confirm):not(.admin-users-primary-btn):not(.admin-users-secondary-btn):not(.admin-users-cancel-btn):not(.admin-users-danger-btn):not(.admin-users-filter-btn):not(.admin-users-icon-btn):not(.admin-users-page-btn):not(.previous-log-ai-btn):not(.btn-help-guide):not(.btn-filter-primary):not(.admin-table-tool-btn):not(.bulk-approve-btn):not(.bulk-reject-btn):not(.bulk-clear-btn):not(.fluent-select-trigger):not(.nkcv-date-picker-nav):not(.nkcv-date-picker-day):active {
  transform: translateY(0);
  box-shadow: var(--app-shadow-xs);
}

.fluent-btn:focus-visible,
button:focus-visible {
  outline: 2px solid var(--colorFocusRingOuter);
  outline-offset: 2px;
}

.fluent-btn:disabled,
button:disabled {
  opacity: var(--opacity-disabled);
  cursor: not-allowed;
  pointer-events: none;
}

/* Button Variants */
.fluent-btn-primary,
button[type="submit"],
.btn-primary {
  background: var(--app-primary);
  border-color: var(--app-primary);
  color: #ffffff;
}

.fluent-btn-primary:hover,
button[type="submit"]:hover {
  background: var(--app-primary-hover);
  border-color: var(--app-primary-hover);
  color: #ffffff;
}

.fluent-btn-secondary,
.btn-secondary {
  background: var(--app-surface);
  border-color: var(--app-border);
  color: var(--app-text);
}

.fluent-btn-danger,
.btn-danger {
  background: var(--app-danger);
  border-color: var(--app-danger);
  color: #ffffff;
}

.fluent-btn-danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

/* Button Sizes */
.fluent-btn-sm,
.btn-sm {
  height: var(--app-button-height-sm);
  padding: 0 var(--app-space-1);
  font-size: var(--app-font-size-sm);
}

.fluent-btn-lg,
.btn-lg {
  height: var(--app-button-height-lg);
  padding: 0 var(--app-space-3);
  font-size: var(--app-font-size-md);
}

/* Icon Button */
.fluent-btn-icon,
.btn-icon {
  width: var(--app-button-height);
  padding: 0;
}

.fluent-btn-icon-sm {
  width: var(--app-button-height-sm);
  height: var(--app-button-height-sm);
  padding: 0;
}

/* ========================================
   INPUTS & FORM CONTROLS - FLUENT DESIGN
   ======================================== */
.fluent-input,
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([class*="unstyled"]),
select:not([class*="unstyled"]),
textarea:not([class*="unstyled"]) {
  display: block;
  width: 100%;
  height: var(--app-input-height);
  padding: 0 var(--app-space-2);
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-sm);
  background: var(--app-surface);
  color: var(--app-text);
  font-family: var(--app-font-family);
  font-size: var(--app-font-size-base);
  line-height: 1.5;
  transition: all var(--app-transition-fast) var(--app-ease);
  box-shadow: var(--app-shadow-xs);
}

textarea.fluent-input,
textarea:not([class*="unstyled"]) {
  height: auto;
  min-height: calc(var(--app-input-height) * 2);
  padding: var(--app-space-1) var(--app-space-2);
  resize: vertical;
}

.fluent-input:hover,
input:not([type="checkbox"]):not([type="radio"]):hover,
select:hover,
textarea:hover {
  border-color: var(--app-text-tertiary);
}

.fluent-input:focus,
input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--app-primary);
  box-shadow: 0 0 0 1px var(--app-primary);
}

.fluent-input::placeholder,
input::placeholder,
textarea::placeholder {
  color: var(--app-text-tertiary);
  opacity: 1;
}

.fluent-input:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  opacity: var(--opacity-disabled);
  cursor: not-allowed;
  background: var(--app-surface-hover);
}

/* Input Sizes */
.fluent-input-sm {
  height: var(--app-button-height-sm);
  padding: 0 var(--app-space-1);
  font-size: var(--app-font-size-sm);
}

.fluent-input-lg {
  height: var(--app-input-height-lg);
  padding: 0 var(--app-space-3);
  font-size: var(--app-font-size-md);
}

/* Select Dropdown */
select:not([class*="unstyled"]) {
  padding-right: var(--app-space-4);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--app-space-1) center;
  background-size: 12px;
  appearance: none;
  cursor: pointer;
}

/* Checkbox */
input[type="checkbox"]:not([class*="unstyled"]) {
  appearance: none;
  display: inline-grid;
  place-content: center;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  border: 2px solid var(--app-border);
  border-radius: var(--app-radius-xs);
  background: var(--app-surface);
  cursor: pointer;
  transition: all var(--app-transition-fast) var(--app-ease);
  vertical-align: middle;
}

input[type="checkbox"]:checked {
  background: var(--app-primary);
  border-color: var(--app-primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M10 3L4.5 8.5L2 6' stroke='white' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px;
}

input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--colorFocusRingOuter);
  outline-offset: 2px;
}

/* Radio Button */
input[type="radio"]:not([class*="unstyled"]) {
  appearance: none;
  display: inline-grid;
  place-content: center;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  border: 2px solid var(--app-border);
  border-radius: var(--app-radius-full);
  background: var(--app-surface);
  cursor: pointer;
  transition: all var(--app-transition-fast) var(--app-ease);
  vertical-align: middle;
}

input[type="radio"]:checked {
  background: var(--app-primary);
  border-color: var(--app-primary);
  box-shadow: inset 0 0 0 3px var(--app-surface);
}

input[type="radio"]:focus-visible {
  outline: 2px solid var(--colorFocusRingOuter);
  outline-offset: 2px;
}



.fluent-card-hover:hover {
  box-shadow: var(--app-shadow-md);
  transform: translateY(-2px);
  border-color: var(--app-border-light);
}

.fluent-card-header {
  padding: var(--app-space-2);
  border-bottom: 1px solid var(--app-border-light);
}

.fluent-card-body {
  padding: var(--app-space-2);
  flex: 1;
}

.fluent-card-footer {
  padding: var(--app-space-2);
  border-top: 1px solid var(--app-border-light);
}

/* ========================================
   LAYOUT UTILITIES
   ======================================== */

/* Spacing */
.m-0 { margin: 0 !important; }
.m-1 { margin: var(--app-space-1) !important; }
.m-2 { margin: var(--app-space-2) !important; }
.m-3 { margin: var(--app-space-3) !important; }
.m-4 { margin: var(--app-space-4) !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: var(--app-space-1) !important; }
.mt-2 { margin-top: var(--app-space-2) !important; }
.mt-3 { margin-top: var(--app-space-3) !important; }
.mt-4 { margin-top: var(--app-space-4) !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: var(--app-space-1) !important; }
.mb-2 { margin-bottom: var(--app-space-2) !important; }
.mb-3 { margin-bottom: var(--app-space-3) !important; }
.mb-4 { margin-bottom: var(--app-space-4) !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: var(--app-space-1) !important; }
.p-2 { padding: var(--app-space-2) !important; }
.p-3 { padding: var(--app-space-3) !important; }
.p-4 { padding: var(--app-space-4) !important; }

.pt-0 { padding-top: 0 !important; }
.pt-1 { padding-top: var(--app-space-1) !important; }
.pt-2 { padding-top: var(--app-space-2) !important; }
.pt-3 { padding-top: var(--app-space-3) !important; }
.pt-4 { padding-top: var(--app-space-4) !important; }

.pb-0 { padding-bottom: 0 !important; }
.pb-1 { padding-bottom: var(--app-space-1) !important; }
.pb-2 { padding-bottom: var(--app-space-2) !important; }
.pb-3 { padding-bottom: var(--app-space-3) !important; }
.pb-4 { padding-bottom: var(--app-space-4) !important; }

/* Flexbox */
.flex { display: flex !important; }
.flex-row { flex-direction: row !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }

.items-start { align-items: flex-start !important; }
.items-center { align-items: center !important; }

.items-stretch { align-items: stretch !important; }

.justify-start { justify-content: flex-start !important; }
.justify-center { justify-content: center !important; }
.justify-end { justify-content: flex-end !important; }
.justify-between { justify-content: space-between !important; }

.gap-0 { gap: 0 !important; }
.gap-1 { gap: var(--app-space-1) !important; }
.gap-2 { gap: var(--app-space-2) !important; }
.gap-3 { gap: var(--app-space-3) !important; }
.gap-4 { gap: var(--app-space-4) !important; }

/* Text Utilities */
.text-left { text-align: left !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }

.text-xs { font-size: var(--app-font-size-xs) !important; }
.text-sm { font-size: var(--app-font-size-sm) !important; }
.text-base { font-size: var(--app-font-size-base) !important; }
.text-md { font-size: var(--app-font-size-md) !important; }
.text-lg { font-size: var(--app-font-size-lg) !important; }
.text-xl { font-size: var(--app-font-size-xl) !important; }

.font-normal { font-weight: var(--app-font-weight-normal) !important; }
.font-medium { font-weight: var(--app-font-weight-medium) !important; }
.font-semibold { font-weight: var(--app-font-weight-semibold) !important; }
.font-bold { font-weight: var(--app-font-weight-bold) !important; }

.text-truncate {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* Color Utilities */
.text-primary { color: var(--app-primary) !important; }
.text-secondary { color: var(--app-text-secondary) !important; }
.text-muted { color: var(--app-muted) !important; }
.text-success { color: var(--app-success) !important; }
.text-warning { color: var(--app-warning) !important; }
.text-danger { color: var(--app-danger) !important; }

.bg-primary { background-color: var(--app-primary) !important; }
.bg-surface { background-color: var(--app-surface) !important; }
.bg-success { background-color: var(--app-success-light) !important; }
.bg-warning { background-color: var(--app-warning-light) !important; }
.bg-danger { background-color: var(--app-danger-light) !important; }

/* Border Utilities */
.border { border: 1px solid var(--app-border) !important; }
.border-0 { border: none !important; }
.border-t { border-top: 1px solid var(--app-border) !important; }
.border-b { border-bottom: 1px solid var(--app-border) !important; }
.border-l { border-left: 1px solid var(--app-border) !important; }
.border-r { border-right: 1px solid var(--app-border) !important; }

.rounded-none { border-radius: 0 !important; }
.rounded-sm { border-radius: var(--app-radius-sm) !important; }
.rounded { border-radius: var(--app-radius-md) !important; }
.rounded-lg { border-radius: var(--app-radius-lg) !important; }
.rounded-full { border-radius: var(--app-radius-full) !important; }

/* Shadow Utilities */
.shadow-none { box-shadow: none !important; }
.shadow-xs { box-shadow: var(--app-shadow-xs) !important; }
.shadow-sm { box-shadow: var(--app-shadow-sm) !important; }
.shadow-md { box-shadow: var(--app-shadow-md) !important; }
.shadow-lg { box-shadow: var(--app-shadow-lg) !important; }

/* Display */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }

/* ========================================
   ACCESSIBILITY
   ======================================== */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

*:focus-visible {
  outline: 2px solid var(--colorFocusRingOuter);
  outline-offset: 2px;
}

/* Utility visibility guard: hidden beats base display utilities; responsive utilities below can still opt back in. */
.hidden,
[hidden] {
  display: none !important;
}

/* ========================================
   RESPONSIVE UTILITIES
   ======================================== */
@media (min-width: 640px) {
  .sm\:hidden { display: none !important; }
  .sm\:block { display: block !important; }
  .sm\:inline-block { display: inline-block !important; }
  .sm\:flex { display: flex !important; }
  .sm\:inline-flex { display: inline-flex !important; }
  .sm\:grid { display: grid !important; }
}

@media (min-width: 768px) {
  .md\:hidden { display: none !important; }
  .md\:block { display: block !important; }
  .md\:inline-block { display: inline-block !important; }
  .md\:flex { display: flex !important; }
  .md\:inline-flex { display: inline-flex !important; }
  .md\:grid { display: grid !important; }
}

@media (min-width: 1024px) {
  .lg\:hidden { display: none !important; }
  .lg\:block { display: block !important; }
  .lg\:inline-block { display: inline-block !important; }
  .lg\:flex { display: flex !important; }
  .lg\:inline-flex { display: inline-flex !important; }
  .lg\:grid { display: grid !important; }
}

/* ============================================================================
   END OF FLUENT DESIGN SYSTEM
   ============================================================================ */


/* Source: design-system-base.css */
/* Base component primitives. */

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(37, 99, 235, 0.35) transparent;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: rgba(37, 99, 235, 0.28);
  border: 3px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}



body {
  font-family: var(--app-font-family);
  font-size: var(--app-font-size-base);
  font-weight: var(--app-font-weight-normal);
  color: var(--app-text);
  background: var(--app-bg);
  min-height: 100vh;
}

.lucide-icon,
.app-icon,
.material-symbols-outlined {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: var(--app-icon-size);
  height: var(--app-icon-size);
  line-height: 1;
  vertical-align: -0.125em;
  font-size: 0 !important;
  overflow: hidden;
}

.app-icon:not(.lucide-icon),
.material-symbols-outlined:not(.lucide-icon) {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  font-size: var(--app-icon-size-md) !important;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "liga";
  overflow: visible;
}

.lucide-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

#sidebar .lucide-icon,
#sidebar .app-icon,
#sidebar .material-symbols-outlined {
  width: var(--app-icon-size-md);
  height: var(--app-icon-size-md);
}

.summary-icon .lucide-icon,
.create-icon .lucide-icon,
.ds-icon-shell .lucide-icon,
.director-kpi > span .lucide-icon,
.employee-card > div:first-child .lucide-icon,
.manager-card > div:first-child .lucide-icon {
  width: var(--app-icon-size-lg);
  height: var(--app-icon-size-lg);
}

.action-icon .lucide-icon,
button .lucide-icon,
a .lucide-icon {
  width: var(--app-icon-size);
  height: var(--app-icon-size);
}

.preserve-breaks {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.rich-editor-content,
.rich-text-content {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.rich-editor-content:empty::before,
[contenteditable]:empty::before {
  content: attr(data-placeholder);
  color: #94a3b8;
  pointer-events: none;
}

.rich-editor-content p,
.rich-text-content p {
  margin: 0 0 0.75rem;
}

.rich-editor-content p:last-child,
.rich-text-content p:last-child {
  margin-bottom: 0;
}

.rich-editor-content ul,
.rich-text-content ul {
  list-style: disc;
  margin: 0.5rem 0 0.75rem 1.25rem;
  padding-left: 0.75rem;
}

.rich-editor-content ol,
.rich-text-content ol {
  list-style: decimal;
  margin: 0.5rem 0 0.75rem 1.25rem;
  padding-left: 0.75rem;
}

.rich-editor-content li,
.rich-text-content li {
  margin: 0.25rem 0;
  padding-left: 0.25rem;
}

.rich-editor-content li::marker,
.rich-text-content li::marker {
  color: var(--app-primary);
  font-weight: var(--app-font-weight-extrabold);
}

.rich-editor-content strong,
.rich-editor-content b,
.rich-text-content strong,
.rich-text-content b {
  font-weight: var(--app-font-weight-extrabold);
}

.rich-editor-content em,
.rich-editor-content i,
.rich-text-content em,
.rich-text-content i {
  font-style: italic;
}

.rich-editor-content u,
.rich-text-content u {
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

/* ========================================
   RICH TEXT EDITOR – contenteditable formatting visibility
   Ensure bold/italic/underline/lists always show inside any contenteditable & rich-text
   regardless of theme or Tailwind reset overrides.
   ======================================== */
[contenteditable] b,
[contenteditable] strong,
.rich-text-content b,
.rich-text-content strong,
.rich-editor-content b,
.rich-editor-content strong {
  font-weight: 700 !important;
}
[contenteditable] i,
[contenteditable] em,
.rich-text-content i,
.rich-text-content em,
.rich-editor-content i,
.rich-editor-content em {
  font-style: italic !important;
}
[contenteditable] u,
.rich-text-content u,
.rich-editor-content u {
  text-decoration: underline !important;
  text-underline-offset: 0.15em !important;
}
[contenteditable] ul,
.rich-text-content ul,
.rich-editor-content ul {
  list-style: disc !important;
  list-style-type: disc !important;
  list-style-position: outside !important;
  margin: 0.35rem 0 0.5rem 1.4rem !important;
  padding-left: 0.25rem !important;
}
[contenteditable] ol,
.rich-text-content ol,
.rich-editor-content ol {
  list-style: decimal !important;
  list-style-type: decimal !important;
  list-style-position: outside !important;
  margin: 0.35rem 0 0.5rem 1.4rem !important;
  padding-left: 0.25rem !important;
}
[contenteditable] li,
.rich-text-content li,
.rich-editor-content li {
  display: list-item !important;
  list-style: inherit !important;
  margin: 0.2rem 0 !important;
  padding-left: 0.25rem !important;
}
[contenteditable] li::marker,
.rich-text-content li::marker,
.rich-editor-content li::marker {
  color: currentColor !important;
  font-weight: 600 !important;
}


.ds-avatar,
.ds-header-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  flex-shrink: 0;
  align-self: center;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  line-height: 1;
  box-sizing: border-box;
}

.ds-avatar-32,
.ds-header-avatar {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  max-width: 32px;
  max-height: 32px;
  font-size: var(--app-font-size-sm);
  border-radius: var(--app-radius-lg);
}

.ds-avatar-36 {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  max-width: 36px;
  max-height: 36px;
  font-size: var(--app-font-size-sm);
  border-radius: var(--app-radius-lg);
}

.ds-avatar-40 {
  width: var(--app-button-height);
  height: var(--app-button-height);
  min-width: var(--app-button-height);
  min-height: var(--app-button-height);
  max-width: var(--app-button-height);
  max-height: var(--app-button-height);
  font-size: var(--app-font-size-base);
  border-radius: var(--app-radius-lg);
}

.ds-avatar-44 {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  max-width: 44px;
  max-height: 44px;
  font-size: var(--app-font-size-base);
  border-radius: var(--app-radius-lg);
}

.ds-avatar-48 {
  width: var(--app-input-height);
  height: var(--app-input-height);
  min-width: var(--app-input-height);
  min-height: var(--app-input-height);
  max-width: var(--app-input-height);
  max-height: var(--app-input-height);
  font-size: var(--app-font-size-md);
  border-radius: var(--app-radius-xl);
}

.ds-avatar-56 {
  width: var(--app-space-7);
  height: var(--app-space-7);
  min-width: var(--app-space-7);
  min-height: var(--app-space-7);
  max-width: var(--app-space-7);
  max-height: var(--app-space-7);
  font-size: var(--app-font-size-lg);
  border-radius: var(--app-radius-xl);
}

.ds-avatar-round {
  border-radius: 9999px !important;
}

.ds-avatar-img,
img.ds-avatar,
img.ds-header-avatar {
  padding: 0;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  display: block;
}

img.ds-avatar-32,
.ds-avatar-img.ds-avatar-32 {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
}

img.ds-avatar-36,
.ds-avatar-img.ds-avatar-36 {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  max-width: 36px !important;
  max-height: 36px !important;
}

img.ds-avatar-40,
.ds-avatar-img.ds-avatar-40 {
  width: var(--app-button-height) !important;
  height: var(--app-button-height) !important;
  min-width: var(--app-button-height) !important;
  min-height: var(--app-button-height) !important;
  max-width: var(--app-button-height) !important;
  max-height: var(--app-button-height) !important;
}

img.ds-avatar-44,
.ds-avatar-img.ds-avatar-44 {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  max-width: 44px !important;
  max-height: 44px !important;
}

img.ds-avatar-48,
.ds-avatar-img.ds-avatar-48 {
  width: var(--app-input-height) !important;
  height: var(--app-input-height) !important;
  min-width: var(--app-input-height) !important;
  min-height: var(--app-input-height) !important;
  max-width: var(--app-input-height) !important;
  max-height: var(--app-input-height) !important;
}

img.ds-avatar-56,
.ds-avatar-img.ds-avatar-56 {
  width: var(--app-space-7) !important;
  height: var(--app-space-7) !important;
  min-width: var(--app-space-7) !important;
  min-height: var(--app-space-7) !important;
  max-width: var(--app-space-7) !important;
  max-height: var(--app-space-7) !important;
}
.ds-avatar-initial {
  font-weight: 800;
  user-select: none;
}

.ds-header-user .ds-avatar,
.ds-header-user .ds-header-avatar,
.ds-header-user img.ds-header-avatar {
  align-self: center;
}




/* Hamburger/Toggle Button */
.sidebar-header-toggle {
  width: var(--app-button-height);
  height: var(--app-button-height);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--app-radius-md);
  background: transparent;
  color: var(--app-text);
  transition: background-color var(--app-transition-base) var(--app-ease);
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}

.sidebar-header-toggle:hover {
  background: var(--app-surface-hover);
}

.sidebar-header-toggle .material-symbols-outlined {
  font-size: var(--app-icon-size-md);
}

/* Header Title */
.ds-header-title {
  flex: 0 1 auto;
  min-width: 0;
  margin-right: var(--app-space-2);
}

#app-page-title {
  /* var(--app-font-size-lg): giu nguyen kich thuoc hien tai o desktop, truoc day
     do class Tailwind "text-lg" (bi .text-lg !important trong file nay ghi de)
     tao ra, khong phai var(--app-font-size-xl). */
  font-size: var(--app-font-size-lg);
  font-weight: var(--app-font-weight-semibold);
  color: var(--app-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--app-font-family);
  line-height: 1.4;
}

/* Header Spacer */
.ds-header-spacer {
  flex: 1 1 auto;
  min-width: var(--app-space-2);
}



/* Notification Button */
.ds-notification-btn {
  width: var(--app-button-height);
  height: var(--app-button-height);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--app-radius-md);
  background: transparent;
  color: var(--app-text);
  transition: background-color var(--app-transition-base) var(--app-ease);
  border: none;
  cursor: pointer;
}

.ds-notification-btn:hover {
  background: var(--app-surface-hover);
}

/* User Menu */
#app-user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--app-input-height);
  padding: 0 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}

.ds-header-user-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ds-header-user-name {
  font-size: var(--app-font-size-base);
  font-weight: var(--app-font-weight-semibold);
  color: var(--app-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ds-header-avatar {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: var(--app-radius-md);
  border: 2px solid var(--app-border);
}

/* Logout Button */
.ds-header-logout {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: var(--app-button-height);
  background: transparent;
  border: none;
  padding: 0 var(--app-space-1);
  color: var(--app-text-secondary);
  font-size: var(--app-font-size-base);
  font-weight: var(--app-font-weight-medium);
  cursor: pointer;
  transition: all var(--app-transition-base) var(--app-ease);
  white-space: nowrap;
  flex-shrink: 0;
}

.ds-header-logout:hover {
  background: var(--app-danger-light);
  color: var(--app-danger);
}

/* ========== SIDEBAR REDESIGN ========== */
#sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--app-sidebar-width);
  height: 100vh;
  background: var(--app-surface);
  border-right: 1px solid var(--app-border);
  box-shadow: var(--app-shadow-sm);
  z-index: var(--app-z-fixed);
  display: flex;
  flex-direction: column;
  transition: transform var(--app-transition-base) var(--app-ease), width var(--app-transition-base) var(--app-ease);
  overflow: hidden;
}

/* Sidebar Container */
#sidebar > .p-5 {
  padding: var(--app-space-2) var(--app-space-2);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Sidebar Top Section */
.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--app-space-3);
  padding: 0 4px;
  gap: var(--app-space-1);
}

/* Logo Section */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.app-sidebar-logo {
  height: 58px;
  width: auto;
  object-fit: contain;
  max-width: 100%;
}

/* Sidebar Navigation */
#app-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: var(--app-space-2);
}

/* Sidebar Section */
.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--app-text-tertiary);
  padding: 0 var(--app-space-2) 6px var(--app-space-2);
  margin: 0;
}



.sidebar-nav-item .material-symbols-outlined {
  font-size: 20px;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--app-text-secondary);
  transition: color var(--app-transition-base) var(--app-ease);
}

.sidebar-nav-item .nav-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

/* Sidebar Nav Item Hover */
.sidebar-nav-item:hover {
  background: var(--app-surface-hover);
}

.sidebar-nav-item:hover .material-symbols-outlined {
  color: var(--app-text);
}

/* Sidebar Nav Item Active */
.sidebar-nav-item.nav-active {
  background: var(--app-primary-light);
  color: var(--app-primary);
  font-weight: var(--app-font-weight-semibold);
}

.sidebar-nav-item.nav-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: var(--app-space-1);
  bottom: var(--app-space-1);
  width: 3px;
  background: var(--app-primary);
  border-radius: 0 4px 4px 0;
}

.sidebar-nav-item.nav-active .material-symbols-outlined {
  color: var(--app-primary);
}

/* Sidebar Count Badge */
.sidebar-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--app-space-3);
  height: var(--app-space-3);
  padding: 0 var(--app-space-1);
  background: var(--app-danger);
  color: #ffffff;
  font-size: var(--app-font-size-sm);
  font-weight: var(--app-font-weight-bold);
  border-radius: var(--app-radius-full);
  margin-left: auto;
  flex-shrink: 0;
}

/* Sidebar Mid Toggle Button (Hide - using header button instead) */
.sidebar-mid-toggle,
.collapse-toggle {
  display: none;
}

/* Mobile Sidebar Close Button */
#sidebar button[onclick*="closeSidebar"] {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--app-radius-md);
  background: transparent;
  color: var(--app-text);
  border: none;
  cursor: pointer;
  transition: background-color var(--app-transition-base) var(--app-ease);
  flex-shrink: 0;
}

#sidebar button[onclick*="closeSidebar"]:hover {
  background: var(--app-surface-hover);
}

/* ========== RESPONSIVE DESIGN ========== */

/* Desktop */
@media (min-width: 1024px) {
  #sidebar {
    transform: translateX(0);
  }
  
  .sidebar-header-toggle {
    display: inline-flex;
  }
  
  #app-main {
    margin-left: var(--app-sidebar-width);
    transition: margin-left var(--app-transition-base) var(--app-ease);
  }
  
  /* Collapsed State */
  body.sidebar-collapsed #sidebar {
    width: var(--app-sidebar-collapsed-width);
  }
  
  body.sidebar-collapsed #app-main {
    margin-left: var(--app-sidebar-collapsed-width);
  }
  
  body.sidebar-collapsed .sidebar-brand,
  body.sidebar-collapsed .nav-label,
  body.sidebar-collapsed .sidebar-section-title,
  body.sidebar-collapsed .sidebar-count-badge {
    opacity: 0;
    visibility: hidden;
  }
  
  body.sidebar-collapsed .sidebar-nav-item {
    justify-content: center;
    padding: var(--app-space-2);
  }
  
  body.sidebar-collapsed .sidebar-nav-item.nav-active::before {
    left: 50%;
    transform: translateX(-50%);
    top: auto;
    bottom: 4px;
    width: var(--app-space-3);
    height: 3px;
  }
}

/* Tablet & Mobile */
@media (max-width: 1023.98px) {
  #sidebar {
    transform: translateX(-100%);
    width: min(280px, 85vw);
    box-shadow: var(--app-shadow-lg);
  }
  
  #sidebar.sidebar-open {
    transform: translateX(0);
  }
  
  #app-main {
    margin-left: 0;
  }
  
  .ds-app-header {
    padding: 0 var(--app-space-2);
  }
  
  /* IMPORTANT: Always show hamburger on tablet/mobile */
  .ds-app-header button[onclick*="toggleSidebarCollapse"],
  .sidebar-header-toggle {
    display: inline-flex !important;
  }
  
  #app-page-title {
    font-size: var(--app-font-size-lg);
  }
  
  .ds-header-user-meta,
  .ds-header-logout-label {
    display: none;
  }
  
  #app-user-menu {
    padding: 6px;
    gap: 0;
  }
  
  .ds-header-logout {
    padding: 0 var(--app-space-2);
  }
}

/* Mobile Portrait */
@media (max-width: 640px) {
  .ds-app-header {
    gap: var(--app-space-1);
    padding: 0 var(--app-space-2);
  }
  
  /* IMPORTANT: Always show hamburger on mobile */
  .ds-app-header button[onclick*="toggleSidebarCollapse"],
  .sidebar-header-toggle {
    display: inline-flex !important;
  }
  
  #app-page-title {
    font-size: var(--app-font-size-md);
  }
  
  .ds-header-right {
    gap: 4px;
  }
  
  .ds-header-avatar {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
  }
  
  .ds-header-logout .app-icon {
    font-size: var(--app-icon-size-md);
  }
}

/* ========== ACCESSIBILITY ========== */
.sidebar-nav-item:focus,
.ds-notification-btn:focus,
.ds-header-logout:focus,
.sidebar-header-toggle:focus {
  outline: 2px solid var(--colorFocusRingOuter);
  outline-offset: 2px;
}

/* ========== ANIMATIONS ========== */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px var(--app-space-2);
  border-radius: var(--app-radius-md);
  color: var(--app-text);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color var(--app-transition-base) var(--app-ease);
  position: relative;
  cursor: pointer;
  min-height: 42px;
  animation: slideIn 0.3s ease-out;
}

/* ========== OVERLAY ========== */
#sidebar-overlay {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
}

/* ========== UTILITIES ========== */
.fluent-card {
  display: flex;
  flex-direction: column;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-lg);
  box-shadow: var(--app-shadow-sm);
  overflow: hidden;
  transition: all var(--app-transition-base) var(--app-ease);
}

.fluent-hover {
  transition: all var(--app-transition-base) var(--app-ease);
}

.fluent-hover:hover {
  transform: translateY(-1px);
  box-shadow: var(--app-shadow-md);
}


/* Toast notification components. */
/* Toast notification system - Fluent + Minimal */
#toast-container {
  position: fixed;
  inset-block-start: 76px;
  inset-inline-end: var(--app-space-3, 24px);
  z-index: var(--app-z-toast, 9000);
  display: flex;
  flex-direction: column;
  gap: var(--app-space-2, 16px);
  width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}

.toast-item {
  --toast-accent: var(--app-info, var(--app-primary, #2563eb));
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 32px;
  align-items: start;
  gap: var(--app-space-2, 16px);
  width: 100%;
  min-height: 88px;
  padding: 18px 16px;
  border: 1px solid var(--app-border, #e2e8f0);
  border-radius: var(--app-radius-md, 8px);
  background: var(--app-surface-raised, var(--app-surface, #ffffff));
  color: var(--app-text, #0f172a);
  box-shadow: var(--app-shadow-strong, 0 16px 40px rgba(15, 23, 42, 0.16));
  pointer-events: auto;
  overflow: hidden;
  transform: translateX(0);
  opacity: 1;
  transition: opacity 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.toast-item.toast-entering,
.toast-item.toast-hiding {
  opacity: 0;
  transform: translateX(24px);
}

.toast-progress {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  width: 100%;
  height: 4px;
  background: var(--toast-accent);
  transform-origin: left center;
  animation: toast-progress-animation linear forwards;
}

@keyframes toast-progress-animation {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

.toast-success { --toast-accent: var(--app-success, #16a34a); }
.toast-warning { --toast-accent: var(--app-warning, #d97706); }
.toast-error { --toast-accent: var(--app-danger, var(--app-error, #dc2626)); }
.toast-info { --toast-accent: var(--app-info, var(--app-primary, #2563eb)); }

.toast-icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: var(--app-radius-md, 8px);
  background: color-mix(in srgb, var(--toast-accent) 14%, transparent);
  color: var(--toast-accent);
}

.toast-icon,
.toast-close-icon {
  width: 20px;
  height: 20px;
  font-size: 20px !important;
  line-height: 1;
}

.toast-content {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.toast-title {
  margin: 0;
  color: var(--app-text, #0f172a);
  font: 800 0.95rem/1.35 "Be Vietnam Pro", Inter, system-ui, sans-serif;
  overflow-wrap: anywhere;
}

.toast-message {
  margin: 0;
  color: var(--app-muted, #64748b);
  font: 600 0.875rem/1.45 "Be Vietnam Pro", Inter, system-ui, sans-serif;
  overflow-wrap: anywhere;
}

.toast-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  margin: -4px -4px 0 0;
  padding: 0;
  border: 0;
  border-radius: var(--app-radius-sm, 6px);
  background: transparent;
  color: var(--app-muted, #64748b);
  cursor: pointer;
}

.toast-close:hover {
  background: var(--app-surface-hover, rgba(15, 23, 42, 0.06));
  color: var(--app-text, #0f172a);
}

.toast-item:focus-within,
.toast-close:focus-visible {
  outline: 2px solid var(--app-primary, #2563eb);
  outline-offset: 2px;
}

/* html[data-theme="glass"] .toast-item styling now lives in
   glass-acrylic-theme.css (single acrylic definition, no more duplicate
   blur/opacity values fighting this one). */

@media (max-width: 640px) {
  #toast-container {
    inset-block-start: 72px;
    inset-inline: 12px;
    width: auto;
  }

  .toast-item {
    grid-template-columns: 36px minmax(0, 1fr) 32px;
    min-height: 80px;
    padding: 14px 12px;
  }

  .toast-icon-wrapper {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .toast-item,
  .toast-progress {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}
/* Light UI stabilization: Fluent neutral surfaces, reliable layout utilities, restrained accents. */
.grid { display: grid !important; }
.inline-grid { display: inline-grid !important; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
.grid-cols-7 { grid-template-columns: repeat(7, minmax(0, 1fr)) !important; }
.gap-y-1 { row-gap: var(--app-space-1) !important; }
.items-end { align-items: flex-end !important; }
.place-items-center { place-items: center !important; }
.w-full { width: 100% !important; }
.min-w-0 { min-width: 0 !important; }
.flex-1 { flex: 1 1 0% !important; }
.shrink-0 { flex-shrink: 0 !important; }
.truncate { overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; }

[class*="grid-cols-[5.7rem_1fr_2.5rem]"] { grid-template-columns: 5.7rem minmax(0, 1fr) 2.5rem !important; }

@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

@media (min-width: 768px) {
  [class*="md:grid-cols-[1fr_0.95fr]"] { grid-template-columns: minmax(0, 1fr) minmax(0, .95fr) !important; }
  .md\:items-center { align-items: center !important; }
}

@media (min-width: 1280px) {
  .xl\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  .xl\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
  .xl\:items-end { align-items: flex-end !important; }
  #tour-log-filters form { grid-template-columns: minmax(360px, 1fr) 150px 150px 130px auto auto !important; align-items: end !important; }
  [class*="xl:grid-cols-[1.35fr_1.4fr_1fr]"] { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1.4fr) minmax(0, 1fr) !important; }
  [class*="xl:grid-cols-[minmax(0,1fr)_22rem]"] { grid-template-columns: minmax(0, 1fr) 22rem !important; }
}

html:not([data-theme="dark"]):not([data-theme="glass"]) .ds-app-header {
  height: 56px !important;
  min-height: 56px !important;
  background: rgba(255, 255, 255, .96) !important;
  border-bottom: 1px solid #e5eaf2 !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04) !important;
}

html:not([data-theme="dark"]):not([data-theme="glass"]) #app-page-title,
html:not([data-theme="dark"]):not([data-theme="glass"]) .ds-header-user-name {
  color: #1f2937 !important;
}

html:not([data-theme="dark"]):not([data-theme="glass"]) #app-user-menu {
  width: auto !important;
  max-width: 260px !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 4px 10px 4px 6px !important;
  border-radius: 999px !important;
  border: 1px solid #dbe3ee !important;
  background: #ffffff !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .06) !important;
}

.ds-header-user .ds-avatar,
.ds-header-user .ds-avatar-img,
.ds-header-user img.ds-avatar,
.ds-header-user img.ds-header-avatar {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
  border-radius: 999px !important;
}

html:not([data-theme="dark"]):not([data-theme="glass"]) #sidebar {
  background: #ffffff !important;
  border-right: 1px solid #e3e8f0 !important;
  box-shadow: 0 12px 34px rgba(15, 23, 42, .08) !important;
}

html:not([data-theme="dark"]):not([data-theme="glass"]) .sidebar-nav-item {
  color: #334155 !important;
  border-left: 3px solid transparent !important;
}

html:not([data-theme="dark"]):not([data-theme="glass"]) .sidebar-nav-item:hover {
  background: #f4f8ff !important;
  color: #0f6cbd !important;
}

html:not([data-theme="dark"]):not([data-theme="glass"]) .sidebar-nav-item.nav-active {
  background: #eaf3ff !important;
  color: #0f6cbd !important;
  border-left-color: #0f6cbd !important;
}

html:not([data-theme="dark"]):not([data-theme="glass"]) .sidebar-nav-item.nav-active .material-symbols-outlined,
html:not([data-theme="dark"]):not([data-theme="glass"]) .sidebar-nav-item.nav-active .app-icon {
  color: #0f6cbd !important;
}

html:not([data-theme="dark"]):not([data-theme="glass"]) body.sidebar-collapsed #sidebar {
  width: 64px !important;
}

@media (min-width: 1024px) {
  html:not([data-theme="dark"]):not([data-theme="glass"]) body.sidebar-collapsed #app-main {
    margin-left: 64px !important;
  }
  body.sidebar-collapsed #sidebar .sidebar-nav-item {
    width: 40px !important;
    min-height: 40px !important;
    margin-inline: auto !important;
    padding: 0 !important;
    justify-content: center !important;
    border-left: 0 !important;
  }
}

html:not([data-theme="dark"]):not([data-theme="glass"]) .journal-card,
html:not([data-theme="dark"]):not([data-theme="glass"]) .employee-card,
html:not([data-theme="dark"]):not([data-theme="glass"]) .manager-card,
html:not([data-theme="dark"]):not([data-theme="glass"]) .create-hero-card,
html:not([data-theme="dark"]):not([data-theme="glass"]) .create-manual-card {
  background: #ffffff !important;
  border-color: #dfe6f0 !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06) !important;
}

#tour-log-filters {
  padding: 24px !important;
}

#tour-log-filters form > label,
#tour-log-filters form > button,
#tour-log-filters form > a {
  align-self: end !important;
}

#tour-log-filters .journal-input,
#tour-log-filters select,
#tour-log-filters input[type="search"] {
  height: 42px !important;
  min-height: 42px !important;
}

html:not([data-theme="dark"]):not([data-theme="glass"]) .create-soft-icon,
html:not([data-theme="dark"]):not([data-theme="glass"]) .create-clock-art {
  background: #eaf3ff !important;
  border-color: #bfdbfe !important;
  color: #0f6cbd !important;
  box-shadow: 0 12px 28px rgba(15, 108, 189, .12) !important;
}

html:not([data-theme="dark"]):not([data-theme="glass"]) .create-note-art {
  border-color: #bfdbfe !important;
  box-shadow: 0 18px 40px rgba(15, 108, 189, .12) !important;
}

html:not([data-theme="dark"]):not([data-theme="glass"]) .create-note-art::before {
  background: #bfdbfe !important;
  box-shadow: 0 32px 0 #bfdbfe, 0 64px 0 #bfdbfe, 0 96px 0 #bfdbfe !important;
}

html:not([data-theme="dark"]):not([data-theme="glass"]) .create-note-rings {
  background: repeating-linear-gradient(90deg, transparent 0 16px, #60a5fa 16px 22px, transparent 22px 34px) !important;
}

html:not([data-theme="dark"]):not([data-theme="glass"]) .create-pen-art {
  background: linear-gradient(#1f2937 0 62%, #0f6cbd 62% 75%, #f8fafc 75% 100%) !important;
}
.has-open-select {
  overflow: visible !important;
}

html:not([data-theme="dark"]):not([data-theme="glass"]) .manager-topbar,
html:not([data-theme="dark"]):not([data-theme="glass"]) #tour-log-filters,
html:not([data-theme="dark"]):not([data-theme="glass"]) #tour-entry-form {
  overflow: visible !important;
}

html:not([data-theme="dark"]):not([data-theme="glass"]) .manager-period-control {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
}

html:not([data-theme="dark"]):not([data-theme="glass"]) .filter-control-wrap {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  min-width: 112px !important;
  height: 42px !important;
}

html:not([data-theme="dark"]):not([data-theme="glass"]) .filter-control-wrap--month {
  width: 150px !important;
}

html:not([data-theme="dark"]):not([data-theme="glass"]) .filter-control-wrap--year {
  width: 104px !important;
}

html:not([data-theme="dark"]):not([data-theme="glass"]) .filter-control-wrap .toolbar-control {
  width: 100% !important;
}

html:not([data-theme="dark"]):not([data-theme="glass"]) .manager-filter-form {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
}

html:not([data-theme="dark"]):not([data-theme="glass"]) .manager-filter-submit {
  background: #ffffff !important;
  border-color: #dbe3ee !important;
  color: #1f2937 !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .05) !important;
}

html:not([data-theme="dark"]):not([data-theme="glass"]) .manager-export-btn {
  background: #0f6cbd !important;
  border-color: #0f6cbd !important;
  color: #ffffff !important;
  box-shadow: 0 8px 18px rgba(15, 108, 189, .18) !important;
}

html:not([data-theme="dark"]):not([data-theme="glass"]) .ds-header-logout {
  height: 40px !important;
  min-height: 40px !important;
  padding-inline: 14px !important;
  border: 1px solid #fecaca !important;
  border-radius: 999px !important;
  background: #fff7f7 !important;
  color: #b42318 !important;
  -webkit-text-fill-color: #b42318 !important;
  box-shadow: 0 2px 8px rgba(180, 35, 24, .08) !important;
}

html:not([data-theme="dark"]):not([data-theme="glass"]) .ds-header-logout:hover {
  background: #fff1f1 !important;
  border-color: #fca5a5 !important;
}

html:not([data-theme="dark"]):not([data-theme="glass"]) .ds-header-logout .app-icon,
html:not([data-theme="dark"]):not([data-theme="glass"]) .ds-header-logout .material-symbols-outlined {
  color: #b42318 !important;
  -webkit-text-fill-color: #b42318 !important;
}

@media (max-width: 767.98px) {
  html:not([data-theme="dark"]):not([data-theme="glass"]) .manager-period-control,
  html:not([data-theme="dark"]):not([data-theme="glass"]) .filter-control-wrap,
  html:not([data-theme="dark"]):not([data-theme="glass"]) .manager-filter-submit,
  html:not([data-theme="dark"]):not([data-theme="glass"]) .manager-export-btn {
    width: 100% !important;
    max-width: none !important;
  }
}
/* Sidebar collapsed rail repair: compact Fluent icon rail. */
@media (min-width: 1024px) {
  body.sidebar-collapsed #sidebar {
    width: var(--app-sidebar-collapsed-width, 64px) !important;
    overflow: hidden !important;
  }

  body.sidebar-collapsed #sidebar > .p-5 {
    padding: 10px 8px !important;
    align-items: center !important;
    overflow-x: hidden !important;
  }

  body.sidebar-collapsed .sidebar-top {
    width: 100% !important;
    min-height: 36px !important;
    margin: 0 0 10px !important;
    justify-content: center !important;
  }

  body.sidebar-collapsed .sidebar-brand,
  body.sidebar-collapsed .app-sidebar-brand {
    display: none !important;
  }

  body.sidebar-collapsed #app-sidebar-nav {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.sidebar-collapsed #app-sidebar-nav.space-y-1 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 0 !important;
  }

  body.sidebar-collapsed .sidebar-section {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.sidebar-collapsed .sidebar-section + .sidebar-section {
    margin-top: 6px !important;
  }

  body.sidebar-collapsed .sidebar-section-title,
  body.sidebar-collapsed .nav-label {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }

  body.sidebar-collapsed #sidebar .sidebar-nav-item {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    margin: 0 auto !important;
    padding: 0 !important;
    border-radius: 8px !important;
    border-left: 0 !important;
    overflow: visible !important;
  }

  body.sidebar-collapsed #sidebar .sidebar-nav-item .material-symbols-outlined,
  body.sidebar-collapsed #sidebar .sidebar-nav-item .app-icon {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    font-size: 22px !important;
    line-height: 1 !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  body.sidebar-collapsed #sidebar .sidebar-nav-item.nav-active {
    background: #eaf3ff !important;
    box-shadow: inset 0 -3px 0 #0f6cbd !important;
  }

  body.sidebar-collapsed #sidebar .sidebar-nav-item.nav-active::before {
    display: none !important;
  }

  body.sidebar-collapsed #sidebar .sidebar-count-badge {
    opacity: 1 !important;
    visibility: visible !important;
    position: absolute !important;
    top: -5px !important;
    right: -5px !important;
    min-width: 16px !important;
    height: 16px !important;
    padding: 0 4px !important;
    border: 2px solid var(--app-sidebar-bg, #ffffff) !important;
    font-size: 10px !important;
    line-height: 12px !important;
  }
}
/* Keep the app footer centered regardless of surrounding layout. */
#app-main > footer {
  width: 100% !important;
  text-align: center !important;
  align-self: stretch !important;
}

/* Manager dashboard analytics cards */
.manager-analytics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.manager-analytics-grid .analytics-card {
  min-height: 390px;
  padding: 24px;
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  border-radius: 24px !important;
  background:
    radial-gradient(circle at 18% 8%, rgba(37, 99, 235, 0.08), transparent 28%),
    radial-gradient(circle at 88% 92%, rgba(16, 185, 129, 0.08), transparent 30%),
    #ffffff !important;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08) !important;
  display: flex;
  flex-direction: column;
  gap: 22px;
  overflow: hidden;
}

.analytics-card__header,
.analytics-card__title-wrap,
.analytics-card__period {
  display: flex;
  align-items: center;
}

.analytics-card__header {
  justify-content: space-between;
  gap: 14px;
}

.analytics-card__title-wrap {
  min-width: 0;
  gap: 10px;
}

.analytics-card__title {
  color: #0f172a;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.25;
  margin: 0;
}

.analytics-card__icon,
.analytics-mini-stat__icon,
.analytics-status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.analytics-card__icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
}

.analytics-card__icon .material-symbols-outlined {
  font-size: 20px;
}

.analytics-card__icon--blue {
  color: #2563eb;
  background: #eaf2ff;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.12);
}

.analytics-card__period {
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  gap: 6px;
  white-space: nowrap;
}

.analytics-card__period .material-symbols-outlined {
  font-size: 16px;
}

.analytics-card__body {
  flex: 1;
}

.analytics-card__body--donut {
  display: grid;
  grid-template-columns: minmax(132px, 180px) minmax(0, 1fr);
  align-items: center;
  gap: 22px;
}

.analytics-card__body--status {
  grid-template-columns: minmax(132px, 176px) minmax(0, 1fr);
}

.analytics-donut {
  width: min(178px, 100%);
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  background: var(--donut-bg, conic-gradient(#e2e8f0 0 100%));
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04), 0 16px 30px rgba(15, 23, 42, 0.08);
  margin-inline: auto;
  position: relative;
}

.analytics-donut::after {
  content: "";
  position: absolute;
  inset: 32px;
  border-radius: inherit;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.04);
}

.analytics-donut__center {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.analytics-donut__center strong {
  color: #071b4d;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
}

.analytics-donut__center span {
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
}

.analytics-legend {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.analytics-legend__item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.analytics-legend__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  justify-self: center;
}

.analytics-legend__label {
  color: #334155;
  font-size: 12.5px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-legend__item strong {
  color: #0f172a;
  font-size: 12.5px;
  font-weight: 750;
  white-space: nowrap;
}

.analytics-status-icon {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  color: #ffffff;
}

.analytics-status-icon .material-symbols-outlined {
  font-size: 15px;
  font-weight: 700;
}

.analytics-status-icon--approved { background: #45c461; }
.analytics-status-icon--pending { background: #ff9f1c; }
.analytics-status-icon--rejected { background: #f05252; }
.analytics-status-icon--draft { background: #2563eb; }

.analytics-stat-strip {
  min-height: 82px;
  border-radius: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 0;
  overflow: hidden;
}

.analytics-stat-strip--bluegreen {
  background: linear-gradient(90deg, rgba(239, 246, 255, 0.96), rgba(240, 253, 244, 0.96));
}

.analytics-stat-strip--blue {
  background: linear-gradient(90deg, rgba(239, 246, 255, 0.98), rgba(241, 245, 249, 0.95));
}

.analytics-stat-strip--green {
  background: linear-gradient(90deg, rgba(240, 253, 244, 0.98), rgba(247, 254, 231, 0.92));
}

.analytics-mini-stat {
  min-width: 0;
  padding: 16px 18px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  column-gap: 12px;
  align-items: center;
}

.analytics-mini-stat + .analytics-mini-stat {
  border-left: 1px solid rgba(148, 163, 184, 0.32);
}

.analytics-mini-stat__icon {
  grid-row: span 2;
  width: 44px;
  height: 44px;
  border-radius: 14px;
}

.analytics-mini-stat__icon .material-symbols-outlined {
  font-size: 22px;
}

.analytics-mini-stat__icon--blue {
  color: #2563eb;
  background: #dbeafe;
}

.analytics-mini-stat__icon--green {
  color: #16a34a;
  background: #dcfce7;
}

.analytics-mini-stat span:not(.analytics-mini-stat__icon) {
  color: #64748b;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
}

.analytics-mini-stat strong {
  color: #0f172a;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.15;
}

.analytics-hours-head,
.analytics-hours-row {
  display: grid;
  grid-template-columns: 24px minmax(110px, 1.15fr) minmax(110px, 1fr) 72px;
  align-items: center;
  gap: 10px;
}

.analytics-hours-head {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 0 2px;
}

.analytics-hours-head span:nth-child(4) {
  text-align: right;
}

.analytics-hours-list {
  display: grid;
  gap: 14px;
  flex: 1;
}

.analytics-hours-row {
  min-height: 52px;
}

.analytics-rank {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
}

.analytics-rank--1 { background: #f59e0b; }
.analytics-rank--2 { background: #94a3b8; }
.analytics-rank--3 { background: #ea7a2a; }

.analytics-user {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.analytics-user .ds-avatar,
.analytics-user img.ds-avatar {
  flex: 0 0 auto !important;
}

.analytics-user strong {
  min-width: 0;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-hours-meter {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.analytics-hours-meter strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 750;
  text-align: right;
}

.analytics-meter {
  height: 6px;
  border-radius: 999px;
  background: #e5eaf1;
  overflow: hidden;
}

.analytics-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #1d7ff2);
}

.analytics-hours-avg {
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}

.analytics-empty {
  color: #64748b;
  font-size: 14px;
  font-weight: 700;
  padding: 34px 0;
  text-align: center;
}

@media (max-width: 1280px) {
  .manager-analytics-grid {
    grid-template-columns: 1fr;
  }

  .manager-analytics-grid .analytics-card {
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .manager-analytics-grid .analytics-card {
    padding: 18px;
    border-radius: 18px !important;
  }

  .analytics-card__header,
  .analytics-card__body--donut,
  .analytics-card__body--status,
  .analytics-stat-strip,
  .analytics-hours-head,
  .analytics-hours-row {
    grid-template-columns: 1fr;
  }

  .analytics-card__header {
    align-items: flex-start;
  }

  .analytics-card__period {
    justify-self: start;
  }

  .analytics-hours-head {
    display: none;
  }

  .analytics-hours-row {
    gap: 10px;
    padding: 12px 0;
  }

  .analytics-hours-meter strong,
  .analytics-hours-avg {
    text-align: left;
  }

  .analytics-mini-stat + .analytics-mini-stat {
    border-left: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.32);
  }
}
/* Sidebar active marker repair: use only the pseudo marker, never a second border line. */
#sidebar .sidebar-nav-item.nav-active {
  border-left-color: transparent !important;
}

#sidebar .sidebar-nav-item.nav-active::before {
  display: block !important;
}

html:not([data-theme="dark"]):not([data-theme="glass"]) #sidebar .sidebar-nav-item.nav-active {
  border-left-color: transparent !important;
}

@media (min-width: 1024px) {
  body.sidebar-collapsed #sidebar .sidebar-nav-item.nav-active {
    border-left-color: transparent !important;
  }
}

/* 2026-07-14: app header top/user layout repair. */
html,
body {
  min-height: 100vh;
  margin: 0 !important;
  padding-top: 0 !important;
}

#app-main {
  padding-top: 56px !important;
}

.ds-app-header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 56px !important;
  min-height: 56px !important;
  background: var(--app-surface);
  border-bottom: 1px solid var(--app-border);
  box-shadow: var(--app-shadow-xs);
  display: flex;
  align-items: center;
  padding: 0 var(--app-space-2);
  gap: var(--app-space-2);
  z-index: 1200 !important;
  width: auto !important;
  margin: 0 !important;
  transform: none !important;
}

@media (min-width: 1024px) {
  .ds-app-header {
    left: var(--app-sidebar-width) !important;
  }

  body.sidebar-collapsed .ds-app-header {
    left: var(--app-sidebar-collapsed-width) !important;
  }
}

@media (max-width: 1023.98px) {
  .ds-app-header {
    left: 0 !important;
  }
}

.ds-header-right {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  flex-shrink: 0;
  margin-left: auto;
  height: 100% !important;
  min-width: 0 !important;
  justify-content: flex-end !important;
}



#app-user-menu .ds-header-user-meta {
  min-width: 0 !important;
  max-width: 190px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  gap: 0 !important;
  overflow: hidden !important;
}

#app-user-menu .ds-header-user-name,
#app-user-menu .ds-header-user-meta p {
  max-width: 100% !important;
  margin: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  line-height: 1.15 !important;
}

#app-user-menu .ds-header-user-name {
  font-size: 12px !important;
  font-weight: 800 !important;
}

#app-user-menu .ds-header-user-meta p:not(.ds-header-user-name) {
  font-size: 11px !important;
  font-weight: 700 !important;
}
/* Header user dropdown: logout lives inside the user information control. */
.ds-header-user-dropdown {
  position: relative;
  flex: 0 0 auto;
}

#app-user-menu.ds-header-user {
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  max-width: 280px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.55rem !important;
  padding: 4px 10px 4px 6px !important;
  overflow: hidden !important;
  cursor: pointer;
}

#app-user-menu .ds-header-user-caret {
  flex: 0 0 auto;
  color: #64748b;
  font-size: 18px;
  transition: transform .16s ease;
}

#app-user-menu.is-open .ds-header-user-caret {
  transform: rotate(180deg);
}

.ds-header-user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 260;
  width: 240px;
  padding: 8px;
  border: 1px solid rgba(226, 232, 240, .92);
  border-radius: 8px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .14);
}

.ds-header-user-menu[hidden] {
  display: none !important;
}

.ds-header-user-menu-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-bottom: 1px solid rgba(226, 232, 240, .78);
  margin-bottom: 6px;
}

.ds-header-user-menu-head strong,
.ds-header-user-menu-head span {
  display: block;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ds-header-user-menu-head strong {
  color: #111827;
  font-size: 13px;
  line-height: 18px;
  font-weight: 800;
}

.ds-header-user-menu-head span {
  color: #64748b;
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
}

.ds-header-menu-logout.ds-header-logout {
  width: 100%;
  height: 36px;
  justify-content: flex-start;
  gap: 8px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #dc2626;
  font-size: 14px;
  font-weight: 700;
}

.ds-header-menu-logout.ds-header-logout:hover,
.ds-header-menu-logout.ds-header-logout:focus-visible {
  background: #fef2f2;
  color: #b91c1c;
  outline: 0;
}

html[data-theme="dark"] .ds-header-user-menu {
  border-color: rgba(148, 163, 184, .28);
  background: rgba(15, 23, 42, .98);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .34);
}

html[data-theme="dark"] .ds-header-user-menu-head {
  border-bottom-color: rgba(148, 163, 184, .22);
}

html[data-theme="dark"] .ds-header-user-menu-head strong {
  color: #f8fafc;
}

html[data-theme="dark"] .ds-header-user-menu-head span,
html[data-theme="dark"] #app-user-menu .ds-header-user-caret {
  color: #cbd5e1;
}

@media (max-width: 767.98px) {
  #app-user-menu .ds-header-user-caret {
    display: none;
  }

  .ds-header-user-menu {
    right: -4px;
    width: 220px;
  }
}
