/* ========================================
   CV Builder - SAP Fiori Style
   Standalone CSS
======================================== */

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

:root {
  --font-main: "Inter", system-ui, sans-serif;
  --font-base: 14px;
  --text-sm: 13px;
  --text-base: 14px;
  --text-md: 16px;
  --text-lg: 18px;
  --text-xl: 24px;
  --text-2xl: 32px;

  /* Global Theme Tokens */
  --bg-app: #f6f8fc;
  --bg-surface: #ffffff;
  --text-primary: #0f2544;
  --text-secondary: #64748b;
  --primary: #ff7a00;
  --primary-hover: #e86f00;
  --primary-soft: #fff2e6;
  --success: #16a34a;
  --danger: #ef4444;
  --warning: #f59e0b;
  --border: #e6edf7;
  --shadow-soft: 0 10px 30px rgba(15, 37, 68, 0.06);
  --radius-lg: 20px;
  --radius-md: 12px;

  /* Backward compatible aliases */
  --primary-color: var(--primary);
  --secondary-color: #0a6ed1;
  --background-color: var(--bg-app);
  --card-background: var(--bg-surface);
  --border-color: var(--border);
  --text-color: var(--text-primary);
  --text-muted: var(--text-secondary);
  --success-color: var(--success);
  --error-color: var(--danger);
  --warning-color: var(--warning);
}

body.theme-dark {
  --bg-app: #0b1220;
  --bg-surface: #111827;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --border: #1f2937;
  --shadow-soft: none;

  --background-color: var(--bg-app);
  --card-background: var(--bg-surface);
  --border-color: var(--border);
  --text-color: var(--text-primary);
  --text-muted: var(--text-secondary);
}

body {
  font-family: var(--font-main);
  font-size: var(--font-base);
  background-color: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.5;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body.theme-dark .card,
body.theme-dark .auth-screen,
body.theme-dark .report-section,
body.theme-dark .archive-item,
body.theme-dark .report-cv-item,
body.theme-dark .dossier-item-card,
body.theme-dark .settings-user-item,
body.theme-dark .settings-tab-panel,
body.theme-dark .settings-theme-card,
body.theme-dark .entry-card {
  background: #1a222c !important;
  border-color: #2a3644 !important;
  color: var(--text-color);
}

body.theme-dark .header {
  background: #121922;
  border-bottom-color: #2a3644;
}

body.theme-dark input,
body.theme-dark textarea,
body.theme-dark select {
  background: #111922;
  color: var(--text-color);
  border-color: #334255;
}

/* Header */
.header {
  background: linear-gradient(135deg, #eb7c05 0%, #f39b32 100%);
  color: white;
  padding: 1.15rem 2rem;
  box-shadow: 0 12px 28px rgba(235, 124, 5, 0.24);
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.header-title h1 {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.header-logo-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-logo {
  width: clamp(185px, 23vw, 290px);
  height: 60px;
  max-height: 60px;
  object-fit: cover;
  object-position: center;
}

.header-title p {
  font-size: 0.92rem;
  opacity: 0.84;
}

/* Main Content */
.main-content {
  max-width: 1560px;
  margin: 0 auto;
  padding: 2rem 1.5rem 2.5rem;
  display: grid;
  grid-template-columns: minmax(200px, 0.4fr) minmax(230px, 0.5fr) minmax(700px, 1.8fr) minmax(430px, 1.06fr);
  gap: 1.5rem;
  align-items: start;
  overflow-anchor: none;
}

#featureFavoriteToggleBtn {
  display: none !important;
}

.feature-section-favorite-btn {
  width: 2.35rem;
  height: 2.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d7e2ee;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #f6f9fd 100%);
  color: #688099;
  box-shadow: 0 10px 24px rgba(30, 52, 76, 0.12);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.report-header-actions.feature-section-primary-actions,
.hr-card-header-actions.feature-section-primary-actions {
  order: 3;
  width: 100%;
  margin-top: 0.75rem;
  margin-right: 0;
  justify-content: flex-start;
}

.report-header:has(.feature-section-favorite-slot),
.hr-card-header:has(.feature-section-favorite-slot) {
  flex-wrap: wrap;
  align-items: flex-start;
}

.report-header:has(.feature-section-favorite-slot) > :first-child,
.hr-card-header:has(.feature-section-favorite-slot) > :first-child {
  order: 1;
  flex: 1 1 0;
  min-width: 0;
}

.feature-section-favorite-slot {
  order: 2;
  margin-left: auto;
  display: inline-flex;
  align-items: flex-start;
  gap: 0.5rem;
  flex: 0 0 auto;
}

.report-header-actions.feature-section-primary-actions,
.hr-card-header-actions.feature-section-primary-actions {
  flex: 0 0 100%;
}

.feature-section-favorite-btn:hover {
  transform: translateY(-1px);
  border-color: #b8cbe0;
  box-shadow: 0 14px 28px rgba(30, 52, 76, 0.16);
}

.feature-section-favorite-btn.is-favorite {
  background: linear-gradient(180deg, #fff9e8 0%, #ffefc4 100%);
  border-color: #f1c45a;
  color: #8c5b00;
}

.feature-section-favorite-icon {
  font-size: 1rem;
  line-height: 1;
}

.feature-section-help-btn {
  width: 2.35rem;
  height: 2.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d7e2ee;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #f6f9fd 100%);
  color: #688099;
  box-shadow: 0 10px 24px rgba(30, 52, 76, 0.12);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.feature-section-help-btn:hover {
  transform: translateY(-1px);
  border-color: #9fc0ec;
  color: #1f5bd8;
  background: linear-gradient(180deg, #ffffff 0%, #eef4fd 100%);
  box-shadow: 0 14px 28px rgba(30, 52, 76, 0.16);
}

.feature-section-help-icon {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
}

/* Drawer help contestuale */
.help-drawer {
  position: fixed;
  inset: 0;
  z-index: 1200;
  visibility: hidden;
  pointer-events: none;
}
.help-drawer.is-open {
  visibility: visible;
  pointer-events: auto;
}
.help-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 39, 68, 0.18);
  opacity: 0;
  transition: opacity 0.22s ease;
}
.help-drawer.is-open .help-drawer-backdrop {
  opacity: 1;
}
.help-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(460px, 94vw);
  background: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: -18px 0 44px rgba(15, 39, 68, 0.20);
  transform: translateX(100%);
  transition: transform 0.24s ease;
}
.help-drawer.is-open .help-drawer-panel {
  transform: translateX(0);
}
.help-drawer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #e2e9f3;
  flex: 0 0 auto;
}
.help-drawer-title {
  font-weight: 700;
  color: #102a48;
  font-size: 0.95rem;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.help-drawer-manual {
  flex: 0 0 auto;
  font-size: 0.82rem;
  font-weight: 600;
  color: #1f5bd8;
  text-decoration: none;
  white-space: nowrap;
}
.help-drawer-manual:hover {
  text-decoration: underline;
}
.help-drawer-close {
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d7e2ee;
  border-radius: 999px;
  background: #f6f9fd;
  color: #688099;
  cursor: pointer;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
.help-drawer-close:hover {
  color: #1f5bd8;
  border-color: #9fc0ec;
  background: #eef4fd;
}
.help-drawer-frame {
  flex: 1 1 auto;
  width: 100%;
  border: 0;
}

/* Banner "Manuale utente" nella home */
.home-manual-banner {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.95rem 1.15rem;
  border: 1px solid var(--border-color, #d7e2ee);
  border-radius: 16px;
  background: linear-gradient(180deg, #f6f9fe 0%, #eef4fd 100%);
  text-decoration: none;
  color: inherit;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.home-manual-banner:hover {
  transform: translateY(-2px);
  border-color: #9fc0ec;
  box-shadow: 0 14px 28px rgba(30, 52, 76, 0.14);
}
.home-manual-icon {
  flex: 0 0 auto;
  width: 2.6rem;
  height: 2.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #1f5bd8;
  color: #fff;
  font-weight: 700;
  font-size: 1.2rem;
}
.home-manual-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1 1 auto;
  min-width: 0;
}
.home-manual-title {
  font-weight: 700;
  color: #102a48;
}
.home-manual-desc {
  font-size: 0.85rem;
  color: #4e6078;
}
.home-manual-arrow {
  flex: 0 0 auto;
  color: #1f5bd8;
  font-size: 1.2rem;
  font-weight: 700;
}

.feature-menu-favorite-mark {
  margin-left: auto;
  font-size: 0.78rem;
  line-height: 1;
  color: #c58a0b;
}

.main-content > * {
  min-width: 0;
}

#app.app-dashboard-mode .main-content {
  grid-template-columns: minmax(210px, 0.42fr) minmax(0, 1fr);
}

#app.app-dashboard-mode .preview-panel,
#app.app-dashboard-mode .editor-panel,
#app.app-dashboard-mode .archive-panel,
#app.app-dashboard-mode .coach-panel,
#app.app-dashboard-mode .hr-panel,
#app.app-dashboard-mode .hidden-gems-panel,
#app.app-dashboard-mode .dossier-panel,
#app.app-dashboard-mode .settings-panel,
#app.app-dashboard-mode .vacation-panel,
#app.app-dashboard-mode .timesheet-panel {
  display: none;
}

#app.app-workspace-mode .report-panel {
  display: none;
}

#app.app-workspace-mode .archive-panel {
  display: none;
}

#app.app-workspace-mode .hr-panel {
  display: none;
}

#app.app-workspace-mode .hidden-gems-panel {
  display: none;
}

#app.app-workspace-mode .coach-panel {
  display: none;
}

#app.app-workspace-mode .dossier-panel {
  display: none;
}

#app.app-workspace-mode .settings-panel {
  display: none;
}

#app.app-workspace-mode .vacation-panel {
  display: none;
}

#app.app-workspace-mode .timesheet-panel {
  display: none;
}

#app.app-workspace-mode .main-content {
  grid-template-columns: minmax(210px, 0.42fr) minmax(720px, 1.8fr) minmax(430px, 1.06fr);
}

#app.app-hrinsights-mode .report-panel,
#app.app-hrinsights-mode .editor-panel,
#app.app-hrinsights-mode .preview-panel,
#app.app-hrinsights-mode .archive-panel,
#app.app-hrinsights-mode .coach-panel,
#app.app-hrinsights-mode .hidden-gems-panel,
#app.app-hrinsights-mode .dossier-panel,
#app.app-hrinsights-mode .settings-panel,
#app.app-hrinsights-mode .vacation-panel,
#app.app-hrinsights-mode .timesheet-panel {
  display: none;
}

#app.app-hrinsights-mode .main-content {
  grid-template-columns: minmax(210px, 0.42fr) minmax(0, 1fr);
}

#app.app-dossier-mode .report-panel,
#app.app-dossier-mode .editor-panel,
#app.app-dossier-mode .preview-panel,
#app.app-dossier-mode .archive-panel,
#app.app-dossier-mode .coach-panel,
#app.app-dossier-mode .hr-panel,
#app.app-dossier-mode .hidden-gems-panel,
#app.app-dossier-mode .settings-panel,
#app.app-dossier-mode .vacation-panel,
#app.app-dossier-mode .timesheet-panel {
  display: none;
}

#app.app-dossier-mode .main-content {
  grid-template-columns: minmax(210px, 0.42fr) minmax(0, 1fr);
}

#app.app-settings-mode .report-panel,
#app.app-settings-mode .editor-panel,
#app.app-settings-mode .preview-panel,
#app.app-settings-mode .archive-panel,
#app.app-settings-mode .coach-panel,
#app.app-settings-mode .hr-panel,
#app.app-settings-mode .hidden-gems-panel,
#app.app-settings-mode .dossier-panel,
#app.app-settings-mode .configurations-panel,
#app.app-settings-mode .vacation-panel,
#app.app-settings-mode .timesheet-panel {
  display: none;
}

#app.app-settings-mode .main-content {
  grid-template-columns: minmax(210px, 0.42fr) minmax(0, 1fr);
}

#app.app-settings-mode .configurations-panel {
  display: none;
}

#app.app-settings-mode .settings-panel .report-card .card-header {
  background: linear-gradient(180deg, rgba(235, 124, 5, 0.08) 0%, rgba(235, 124, 5, 0.03) 100%);
}

#app.app-settings-mode .settings-panel .report-card .card-header h2 {
  color: #8a4a00;
}

#app.app-configurations-mode .settings-panel {
  display: none;
}

#app.app-configurations-mode .configurations-panel {
  display: block;
  border-top: 4px solid #3a5f85;
}

#app.app-configurations-mode .report-panel,
#app.app-configurations-mode .editor-panel,
#app.app-configurations-mode .preview-panel,
#app.app-configurations-mode .archive-panel,
#app.app-configurations-mode .coach-panel,
#app.app-configurations-mode .hr-panel,
#app.app-configurations-mode .hidden-gems-panel,
#app.app-configurations-mode .dossier-panel,
#app.app-configurations-mode .vacation-panel,
#app.app-configurations-mode .timesheet-panel,
#app.app-configurations-mode .organization-panel,
#app.app-configurations-mode .my-team-panel {
  display: none;
}

#app.app-configurations-mode .configurations-panel .report-card .card-header {
  background: linear-gradient(180deg, rgba(58, 95, 133, 0.08) 0%, rgba(58, 95, 133, 0.03) 100%);
}

#app.app-configurations-mode .configurations-panel .report-card .card-header h2 {
  color: #274865;
}

#app:not(.app-organization-mode) .organization-panel {
  display: none;
}

#app:not(.app-myteam-mode) .my-team-panel {
  display: none;
}

#app:not(.app-support-mode) .support-panel {
  display: none;
}

#app:not(.app-communications-mode) .communications-panel {
  display: none;
}

#app:not(.app-payroll-mode) .payroll-panel {
  display: none;
}

#app.app-communications-mode .report-panel,
#app.app-communications-mode .editor-panel,
#app.app-communications-mode .preview-panel,
#app.app-communications-mode .archive-panel,
#app.app-communications-mode .coach-panel,
#app.app-communications-mode .hr-panel,
#app.app-communications-mode .hidden-gems-panel,
#app.app-communications-mode .dossier-panel,
#app.app-communications-mode .settings-panel,
#app.app-communications-mode .configurations-panel,
#app.app-communications-mode .vacation-panel,
#app.app-communications-mode .timesheet-panel,
#app.app-communications-mode .onboarding-panel,
#app.app-communications-mode .offboarding-panel,
#app.app-communications-mode .organization-panel,
#app.app-communications-mode .my-team-panel,
#app.app-communications-mode .asset-panel,
#app.app-communications-mode .support-panel {
  display: none;
}

#app.app-payroll-mode .report-panel,
#app.app-payroll-mode .editor-panel,
#app.app-payroll-mode .preview-panel,
#app.app-payroll-mode .archive-panel,
#app.app-payroll-mode .coach-panel,
#app.app-payroll-mode .hr-panel,
#app.app-payroll-mode .hidden-gems-panel,
#app.app-payroll-mode .dossier-panel,
#app.app-payroll-mode .settings-panel,
#app.app-payroll-mode .configurations-panel,
#app.app-payroll-mode .vacation-panel,
#app.app-payroll-mode .timesheet-panel,
#app.app-payroll-mode .onboarding-panel,
#app.app-payroll-mode .offboarding-panel,
#app.app-payroll-mode .organization-panel,
#app.app-payroll-mode .my-team-panel,
#app.app-payroll-mode .asset-panel,
#app.app-payroll-mode .support-panel,
#app.app-payroll-mode .communications-panel {
  display: none;
}

#app.app-payroll-mode .main-content {
  grid-template-columns: minmax(210px, 0.42fr) minmax(0, 1fr);
}

#app.app-communications-mode .main-content {
  grid-template-columns: minmax(210px, 0.42fr) minmax(0, 1fr);
}

#app.app-support-mode .report-panel,
#app.app-support-mode .editor-panel,
#app.app-support-mode .preview-panel,
#app.app-support-mode .archive-panel,
#app.app-support-mode .coach-panel,
#app.app-support-mode .hr-panel,
#app.app-support-mode .hidden-gems-panel,
#app.app-support-mode .dossier-panel,
#app.app-support-mode .settings-panel,
#app.app-support-mode .configurations-panel,
#app.app-support-mode .vacation-panel,
#app.app-support-mode .timesheet-panel,
#app.app-support-mode .onboarding-panel,
#app.app-support-mode .offboarding-panel,
#app.app-support-mode .organization-panel,
#app.app-support-mode .my-team-panel,
#app.app-support-mode .asset-panel {
  display: none;
}

#app.app-support-mode .main-content {
  grid-template-columns: minmax(210px, 0.42fr) minmax(0, 1fr);
}

#app.app-myteam-mode #myTeamPanel,
#app.app-myteam-mode #myTeamPanel .report-card,
#app.app-myteam-mode #settingsMyTeamContent,
#app.app-myteam-mode .my-team-section,
#app.app-myteam-mode .my-team-toolbar,
#app.app-myteam-mode .my-team-groups,
#app.app-myteam-mode .my-team-group,
#app.app-myteam-mode .my-team-members-grid,
#app.app-myteam-mode .my-team-profile,
#app.app-myteam-mode .my-team-profile-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

#app.app-myteam-mode #myTeamPanel {
  justify-self: stretch;
}

#app.app-myteam-mode .my-team-panel .card-body.report-body {
  display: block;
  width: 100%;
}

#app.app-organization-mode .report-panel,
#app.app-organization-mode .editor-panel,
#app.app-organization-mode .preview-panel,
#app.app-organization-mode .archive-panel,
#app.app-organization-mode .coach-panel,
#app.app-organization-mode .hr-panel,
#app.app-organization-mode .hidden-gems-panel,
#app.app-organization-mode .dossier-panel,
#app.app-organization-mode .settings-panel,
#app.app-organization-mode .configurations-panel,
#app.app-organization-mode .vacation-panel,
#app.app-organization-mode .timesheet-panel,
#app.app-organization-mode .onboarding-panel,
#app.app-organization-mode .offboarding-panel {
  display: none;
}

#app.app-organization-mode .main-content {
  grid-template-columns: minmax(210px, 0.42fr) minmax(0, 1fr);
}

#app.app-myteam-mode .report-panel,
#app.app-myteam-mode .editor-panel,
#app.app-myteam-mode .preview-panel,
#app.app-myteam-mode .archive-panel,
#app.app-myteam-mode .coach-panel,
#app.app-myteam-mode .hr-panel,
#app.app-myteam-mode .hidden-gems-panel,
#app.app-myteam-mode .dossier-panel,
#app.app-myteam-mode .settings-panel,
#app.app-myteam-mode .vacation-panel,
#app.app-myteam-mode .timesheet-panel,
#app.app-myteam-mode .onboarding-panel,
#app.app-myteam-mode .offboarding-panel,
#app.app-myteam-mode .organization-panel {
  display: none;
}

#app.app-myteam-mode .main-content {
  grid-template-columns: minmax(210px, 0.42fr) minmax(0, 1fr);
}

#app.app-vacation-mode .report-panel,
#app.app-vacation-mode .editor-panel,
#app.app-vacation-mode .preview-panel,
#app.app-vacation-mode .archive-panel,
#app.app-vacation-mode .coach-panel,
#app.app-vacation-mode .hr-panel,
#app.app-vacation-mode .hidden-gems-panel,
#app.app-vacation-mode .dossier-panel,
#app.app-vacation-mode .settings-panel,
#app.app-vacation-mode .timesheet-panel {
  display: none;
}

#app.app-vacation-mode .main-content {
  grid-template-columns: minmax(210px, 0.42fr) minmax(0, 1fr);
}

#app:not(.app-sickness-mode) .sickness-panel {
  display: none;
}

#app.app-sickness-mode .report-panel,
#app.app-sickness-mode .editor-panel,
#app.app-sickness-mode .preview-panel,
#app.app-sickness-mode .archive-panel,
#app.app-sickness-mode .coach-panel,
#app.app-sickness-mode .hr-panel,
#app.app-sickness-mode .hidden-gems-panel,
#app.app-sickness-mode .dossier-panel,
#app.app-sickness-mode .settings-panel,
#app.app-sickness-mode .vacation-panel:not(.sickness-panel),
#app.app-sickness-mode .timesheet-panel {
  display: none;
}

#app.app-sickness-mode .main-content {
  grid-template-columns: minmax(210px, 0.42fr) minmax(0, 1fr);
}

#app.app-timesheet-mode .report-panel,
#app.app-timesheet-mode .editor-panel,
#app.app-timesheet-mode .preview-panel,
#app.app-timesheet-mode .archive-panel,
#app.app-timesheet-mode .coach-panel,
#app.app-timesheet-mode .hr-panel,
#app.app-timesheet-mode .hidden-gems-panel,
#app.app-timesheet-mode .dossier-panel,
#app.app-timesheet-mode .settings-panel,
#app.app-timesheet-mode .vacation-panel {
  display: none;
}

#app.app-timesheet-mode .main-content {
  grid-template-columns: minmax(210px, 0.42fr) minmax(0, 1fr);
}

#app:not(.app-projects-mode) .projects-panel {
  display: none;
}

#app.app-projects-mode .report-panel,
#app.app-projects-mode .editor-panel,
#app.app-projects-mode .preview-panel,
#app.app-projects-mode .archive-panel,
#app.app-projects-mode .coach-panel,
#app.app-projects-mode .hr-panel,
#app.app-projects-mode .hidden-gems-panel,
#app.app-projects-mode .dossier-panel,
#app.app-projects-mode .settings-panel,
#app.app-projects-mode .vacation-panel,
#app.app-projects-mode .timesheet-panel,
#app.app-projects-mode .onboarding-panel,
#app.app-projects-mode .offboarding-panel,
#app.app-projects-mode .asset-panel,
#app.app-projects-mode .organization-panel {
  display: none;
}

#app.app-projects-mode .main-content {
  grid-template-columns: minmax(210px, 0.42fr) minmax(0, 1fr);
}

#app:not(.app-kpiconfig-mode) .kpi-config-panel {
  display: none;
}

#app.app-kpiconfig-mode .report-panel,
#app.app-kpiconfig-mode .editor-panel,
#app.app-kpiconfig-mode .preview-panel,
#app.app-kpiconfig-mode .archive-panel,
#app.app-kpiconfig-mode .coach-panel,
#app.app-kpiconfig-mode .hr-panel,
#app.app-kpiconfig-mode .hidden-gems-panel,
#app.app-kpiconfig-mode .dossier-panel,
#app.app-kpiconfig-mode .settings-panel,
#app.app-kpiconfig-mode .vacation-panel,
#app.app-kpiconfig-mode .timesheet-panel,
#app.app-kpiconfig-mode .projects-panel,
#app.app-kpiconfig-mode .onboarding-panel,
#app.app-kpiconfig-mode .offboarding-panel,
#app.app-kpiconfig-mode .asset-panel,
#app.app-kpiconfig-mode .organization-panel {
  display: none;
}

#app.app-kpiconfig-mode .main-content {
  grid-template-columns: minmax(210px, 0.42fr) minmax(0, 1fr);
}

#app:not(.app-home-mode) .home-panel {
  display: none;
}

#app.app-home-mode .report-panel,
#app.app-home-mode .editor-panel,
#app.app-home-mode .preview-panel,
#app.app-home-mode .archive-panel,
#app.app-home-mode .coach-panel,
#app.app-home-mode .hr-panel,
#app.app-home-mode .hidden-gems-panel,
#app.app-home-mode .dossier-panel,
#app.app-home-mode .settings-panel,
#app.app-home-mode .vacation-panel,
#app.app-home-mode .timesheet-panel,
#app.app-home-mode .projects-panel,
#app.app-home-mode .kpi-config-panel,
#app.app-home-mode .onboarding-panel,
#app.app-home-mode .offboarding-panel,
#app.app-home-mode .asset-panel,
#app.app-home-mode .organization-panel {
  display: none;
}

#app.app-home-mode .main-content {
  grid-template-columns: minmax(210px, 0.42fr) minmax(0, 1fr);
}

/* Home operativa: sezioni e tile */
.home-section { margin-bottom: 1.6rem; }
.home-section:last-child { margin-bottom: 0; }
.home-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.home-section-header h3 { margin: 0; font-size: 1.05rem; }
.home-section-toggle { display: inline-flex; gap: 0.4rem; }

.home-subsection {
  display: grid;
  gap: 0.8rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(214, 226, 236, 0.7);
}

.home-subsection-approvals {
  padding-top: 0.55rem;
}

.home-subsection-title {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6a8098;
}

/* Griglie tile grandi (Da fare + preferiti) e piccole (vista Tutto) */
.home-op-grid,
.home-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1rem;
}
.home-quick-grid.is-all {
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 0.6rem;
}

.home-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.home-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(23, 59, 94, 0.12);
  border-color: #b9cde2;
}

/* Tile grande */
.home-tile-lg {
  gap: 0.55rem;
  padding: 1.1rem;
  min-height: 148px;
}
/* Accento a sinistra: solo quando la tile ha attività pendenti (inbox con messaggi non letti
   o tile "Da fare" con contatore > 0). */
.home-tile.has-pending {
  border-left: 3px solid var(--accent-color, #0070f3);
}
/* Badge visti(totali): il totale fra parentesi ha la stessa grandezza dei visti, ma in grigio. */
.home-inbox-total {
  font-size: 0.7em;
  font-weight: 700;
  color: var(--text-secondary, #6a6d70);
  margin-left: 0.12em;
}
.home-tile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}
.home-tile-count {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #143650;
}
.home-tile-lg.is-empty .home-tile-count { color: var(--text-secondary, #9aa6b2); }
.home-tile-lg .home-tile-label {
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--text-color, #143650);
  line-height: 1.25;
}
.home-tile-desc {
  margin-top: auto;
  font-size: 0.86rem;
  color: var(--text-secondary, #6a6d70);
  line-height: 1.3;
}

/* Tile piccola (vista Tutto) */
.home-tile-sm {
  align-items: center;
  text-align: center;
  gap: 0.4rem;
  padding: 0.6rem;
}
.home-tile-sm .home-tile-label { font-size: 0.8rem; }

.home-tile-avatar {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  flex: 0 0 auto;
}
.home-tile-icon {
  width: 62%;
  height: 62%;
  background: #fff;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.home-tile-lg .home-tile-avatar { width: 48px; height: 48px; border-radius: 13px; }
.home-tile-sm .home-tile-avatar { width: 38px; height: 38px; font-size: 0.95rem; border-radius: 10px; }

.home-tile-label {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-color, #143650);
  line-height: 1.2;
}
.home-tile.is-empty { opacity: 0.7; }
.home-tile.is-empty:hover { opacity: 1; }

.home-empty-state {
  padding: 1.1rem;
  border: 1px dashed var(--border-color);
  border-radius: 12px;
  color: var(--text-secondary, #6a6d70);
  text-align: center;
}

body.theme-dark .home-tile {
  border: 1px solid #2d3d4f;
  background: linear-gradient(180deg, #162330 0%, #13202c 100%);
}
body.theme-dark .home-tile:hover { border-color: #48627f; }
body.theme-dark .home-tile-label { color: #e7f1fb; }
body.theme-dark .home-tile-count { color: #e7f1fb; }

/* Editor Configurazione KPI */
.kpi-config { display: flex; flex-direction: column; gap: 1rem; }
.kpi-scope-select { max-width: 360px; margin-bottom: 0; }
.kpi-inherit-note {
  background: #fff8e6;
  border: 1px solid #f5e0a3;
  color: #7a5b00;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  font-size: 0.9rem;
}
.kpi-config-lists {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.kpi-list-block {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.kpi-list-header { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.kpi-list-header h4 { margin: 0; }
.kpi-list-count { font-size: 0.82rem; color: var(--text-secondary, #6a6d70); }
.kpi-count-invalid { color: #bf1f26; font-weight: 600; }
.kpi-list-rows { display: flex; flex-direction: column; gap: 0.5rem; }
.kpi-row { display: flex; gap: 0.5rem; align-items: center; }
.kpi-row input { flex: 1 1 auto; height: 40px; box-sizing: border-box; }
.kpi-row input[data-field="shortLabel"] { flex: 0 0 140px; }
.kpi-row-remove { flex: 0 0 auto; }
.kpi-list-empty { color: var(--text-secondary, #6a6d70); font-size: 0.9rem; padding: 0.4rem 0; }
.kpi-config-actions { display: flex; gap: 0.6rem; justify-content: flex-end; }

#app.app-coach-mode .report-panel,
#app.app-coach-mode .editor-panel,
#app.app-coach-mode .preview-panel,
#app.app-coach-mode .archive-panel,
#app.app-coach-mode .hr-panel,
#app.app-coach-mode .hidden-gems-panel,
#app.app-coach-mode .dossier-panel,
#app.app-coach-mode .settings-panel,
#app.app-coach-mode .vacation-panel,
#app.app-coach-mode .timesheet-panel {
  display: none;
}

#app.app-coach-mode .main-content {
  grid-template-columns: minmax(210px, 0.42fr) minmax(0, 1fr);
}

#app.app-coach-mode .coach-panel,
#app.app-coach-mode .coach-panel .card,
#app.app-coach-mode .coach-panel .card-body,
#app.app-coach-mode .coach-chat-messages,
#app.app-coach-mode .coach-chat-input {
  min-width: 0;
}

#app.app-hiddengems-mode .report-panel,
#app.app-hiddengems-mode .editor-panel,
#app.app-hiddengems-mode .preview-panel,
#app.app-hiddengems-mode .archive-panel,
#app.app-hiddengems-mode .coach-panel,
#app.app-hiddengems-mode .hr-panel,
#app.app-hiddengems-mode .dossier-panel,
#app.app-hiddengems-mode .settings-panel,
#app.app-hiddengems-mode .vacation-panel,
#app.app-hiddengems-mode .timesheet-panel {
  display: none;
}

#app.app-hiddengems-mode .main-content {
  grid-template-columns: minmax(210px, 0.42fr) minmax(0, 1fr);
}

#app:not(.app-onboarding-mode) .onboarding-panel {
  display: none;
}

#app:not(.app-offboarding-mode) .offboarding-panel {
  display: none;
}

#app.app-onboarding-mode .report-panel,
#app.app-onboarding-mode .editor-panel,
#app.app-onboarding-mode .preview-panel,
#app.app-onboarding-mode .archive-panel,
#app.app-onboarding-mode .coach-panel,
#app.app-onboarding-mode .hr-panel,
#app.app-onboarding-mode .hidden-gems-panel,
#app.app-onboarding-mode .dossier-panel,
#app.app-onboarding-mode .settings-panel,
#app.app-onboarding-mode .vacation-panel,
#app.app-onboarding-mode .timesheet-panel,
#app.app-onboarding-mode .offboarding-panel {
  display: none;
}

#app.app-onboarding-mode .main-content {
  grid-template-columns: minmax(210px, 0.42fr) minmax(0, 1fr);
}

#app.app-offboarding-mode .report-panel,
#app.app-offboarding-mode .editor-panel,
#app.app-offboarding-mode .preview-panel,
#app.app-offboarding-mode .archive-panel,
#app.app-offboarding-mode .coach-panel,
#app.app-offboarding-mode .hr-panel,
#app.app-offboarding-mode .hidden-gems-panel,
#app.app-offboarding-mode .dossier-panel,
#app.app-offboarding-mode .settings-panel,
#app.app-offboarding-mode .vacation-panel,
#app.app-offboarding-mode .timesheet-panel,
#app.app-offboarding-mode .onboarding-panel {
  display: none;
}

#app.app-offboarding-mode .main-content {
  grid-template-columns: minmax(210px, 0.42fr) minmax(0, 1fr);
}

#app.menu-collapsed .feature-menu-panel {
  display: none;
}

/* Toggle collasso barra menu (desktop). Il bottone «collassa» vive nella barra del brand
   (sempre visibile, allineato a destra col logo); sparisce col pannello quando collassato.
   Il bottone «espandi» è flottante e compare solo in stato collassato. Su mobile la
   navigazione usa l'hamburger dedicato → entrambi nascosti. */
.feature-menu-collapse-btn {
  flex: 0 0 auto;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid #d7e2ee;
  border-radius: 8px;
  background: #ffffff;
  color: #27415a;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.feature-menu-collapse-btn:hover {
  background: #f2f7fc;
  border-color: #b8cbe0;
}

.feature-menu-expand-btn {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 130;
  display: none; /* mostrato solo quando #app.menu-collapsed (desktop) */
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid #d7e2ee;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f6f9fd 100%);
  color: #27415a;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(30, 52, 76, 0.12);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.feature-menu-expand-btn:hover {
  transform: translateY(-1px);
  border-color: #b8cbe0;
  box-shadow: 0 14px 28px rgba(30, 52, 76, 0.16);
}

#app.menu-collapsed .feature-menu-expand-btn {
  display: inline-flex;
}

/* Layout desktop a menu collassato: il contenuto occupa tutta la larghezza (colonna singola)
   per TUTTI i modi. Due problemi risolti qui:
   1) le vecchie regole di collasso desktop erano disabilitate con @media (max-width: 0px) (dead code);
   2) molti modi (dossier/Profilo, settings, organization, vacation, timesheet…) hanno regole
      `#app.app-<mode>-mode .main-content { grid-template-columns: 270px|254px … !important }` nei
      breakpoint desktop CHE NON escludono lo stato collassato → riservano una prima colonna per il
      menu anche quando è nascosto, schiacciando il contenuto ("dimensione cellulare").
   La classe `.menu-collapsed` è ripetuta di proposito per alzare la specificità a (1,3,0) e vincere
   su quelle regole (1,2,0)!important a prescindere dall'ordine sorgente e dal breakpoint.
   Il workspace (editor | anteprima) conserva le due colonne di contenuto (specificità (1,4,0)). */
@media (min-width: 1025px) {
  /* Default collassato: colonna singola a TUTTA la larghezza (rimosso il cap 1560). Per le viste
     dense (tabelle/liste/dashboard) lo spazio del menu diventa spazio utile per il contenuto. */
  #app.menu-collapsed.menu-collapsed .main-content {
    grid-template-columns: minmax(0, 1fr) !important;
    max-width: none !important;
  }

  /* Form/testo lungo: si allargano ma con un cap di leggibilità centrato (evita campi
     chilometrici su monitor larghi). Cap a 1760 → comunque visibilmente più largo dello stato
     aperto. NB: il Profilo NON è qui (è nav + card → sta full-width come le viste dense).
     Specificità (1,4,0) per battere il default (1,3,0). */
  #app.menu-collapsed.menu-collapsed.app-settings-mode .main-content,
  #app.menu-collapsed.menu-collapsed.app-configurations-mode .main-content,
  #app.menu-collapsed.menu-collapsed.app-coach-mode .main-content {
    max-width: 1760px !important;
  }

  /* CV editor: due colonne input | anteprima, a tutta larghezza. Lo spazio liberato dal menu va a
     ENTRAMBE (ratio editor:preview ~1.7:1); l'anteprima ha un minimo di 420px per un rendering CV
     realistico, l'editor prende il resto. */
  #app.menu-collapsed.menu-collapsed.app-workspace-mode .main-content {
    grid-template-columns: minmax(0, 1.7fr) minmax(420px, 1fr) !important;
    max-width: none !important;
  }
}

@media (max-width: 1024px) {
  /* Mobile: navigazione via hamburger dedicato → niente toggle collasso desktop. */
  .feature-menu-collapse-btn,
  .feature-menu-expand-btn,
  #app.menu-collapsed .feature-menu-expand-btn {
    display: none;
  }
}

#app.menu-collapsed.app-dashboard-mode .main-content {
  grid-template-columns: minmax(0, 1fr);
}

#app.menu-collapsed.app-workspace-mode .main-content {
  grid-template-columns: minmax(720px, 1.8fr) minmax(430px, 1.06fr);
}

#app.menu-collapsed.app-hrinsights-mode .main-content,
#app.menu-collapsed.app-hiddengems-mode .main-content,
#app.menu-collapsed.app-dossier-mode .main-content,
#app.menu-collapsed.app-settings-mode .main-content,
#app.menu-collapsed.app-configurations-mode .main-content,
#app.menu-collapsed.app-organization-mode .main-content,
#app.menu-collapsed.app-vacation-mode .main-content,
#app.menu-collapsed.app-timesheet-mode .main-content,
#app.menu-collapsed.app-coach-mode .main-content,
#app.menu-collapsed.app-onboarding-mode .main-content,
#app.menu-collapsed.app-offboarding-mode .main-content {
  grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 1024px) {
  .main-content {
    grid-template-columns: 1fr;
  }

  .preview-panel {
    order: -1;
  }

  .archive-panel {
    order: -2;
  }

  .feature-menu-panel {
    order: -3;
    position: static;
    top: auto;
    max-height: none;
  }

  .feature-menu-panel .card.sticky {
    position: static;
    max-height: none;
  }

  .feature-menu-panel .feature-menu-body {
    overflow: visible;
  }

  #app.app-dashboard-mode .main-content {
    grid-template-columns: 1fr;
  }

  #app.app-workspace-mode .main-content {
    grid-template-columns: 1fr;
  }

  #app.app-hrinsights-mode .main-content {
    grid-template-columns: 1fr;
  }

  #app.app-hiddengems-mode .main-content {
    grid-template-columns: 1fr;
  }

  #app.app-dossier-mode .main-content {
    grid-template-columns: 1fr;
  }

  #app.app-settings-mode .main-content {
    grid-template-columns: 1fr;
  }

  #app.app-configurations-mode .main-content {
    grid-template-columns: 1fr;
  }

  #app.app-organization-mode .main-content {
    grid-template-columns: 1fr;
  }

  #app.app-myteam-mode .main-content {
    grid-template-columns: 1fr;
  }

  #app.app-vacation-mode .main-content {
    grid-template-columns: 1fr;
  }

  #app.app-timesheet-mode .main-content {
    grid-template-columns: 1fr;
  }

  #app.app-coach-mode .main-content {
    grid-template-columns: 1fr;
  }

  #app.app-onboarding-mode .main-content {
    grid-template-columns: 1fr;
  }

  #app.app-offboarding-mode .main-content {
    grid-template-columns: 1fr;
  }

  .report-metrics{
    grid-template-columns: 1fr;
  }
}

.vacation-list {
  display: grid;
  gap: 0.7rem;
}

.vacation-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 0.95rem;
  border-radius: 12px;
  border: 1px solid #e2ebf3;
  background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
}

.vacation-item-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #27415a;
}

.vacation-item-meta {
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: #62778c;
}

.vacation-revocation-range-meta {
  display: inline-flex;
  width: fit-content;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  color: #8a4b00;
  background: #fff3d6;
  border: 1px solid rgba(202, 128, 19, 0.24);
}

.vacation-revocation-range-meta.is-residual {
  color: #0d5f46;
  background: #e9f8f1;
  border-color: rgba(28, 142, 99, 0.24);
}

/* Marker "inserita da HR": pillola neutra, stesso impianto dei meta di revoca. Va
   dichiarata anche per il tema scuro, dove il layer globale riapplica i colori. */
.vacation-item-meta.is-on-behalf {
  display: inline-flex;
  width: fit-content;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  color: #35507a;
  background: #eef2fb;
  border: 1px solid rgba(53, 80, 122, 0.2);
}

body.theme-dark .vacation-item-meta.is-on-behalf {
  color: #b9ccf2;
  background: rgba(120, 158, 226, 0.14);
  border-color: rgba(120, 158, 226, 0.3);
}

.vacation-range-revocation-summary {
  margin-top: 0.75rem !important;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  color: #0f4c81;
  background: #eef7ff;
  border: 1px solid rgba(15, 76, 129, 0.16);
  font-weight: 600;
}

body.theme-dark .vacation-revocation-range-meta {
  color: #ffd18a;
  background: rgba(255, 184, 77, 0.12);
  border-color: rgba(255, 184, 77, 0.28);
}

body.theme-dark .vacation-revocation-range-meta.is-residual {
  color: #8ee7bf;
  background: rgba(54, 211, 153, 0.12);
  border-color: rgba(54, 211, 153, 0.28);
}

body.theme-dark .vacation-range-revocation-summary {
  color: #c7e7ff;
  background: rgba(54, 162, 235, 0.12);
  border-color: rgba(108, 191, 255, 0.24);
}

.vacation-item-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.travel-workspace {
  display: grid;
  gap: 1rem;
}

.travel-workspace .report-section {
  padding: 1.05rem 1.05rem 1rem;
  border: 1px solid rgba(214, 226, 236, 0.95);
  border-radius: 20px;
  background:
    radial-gradient(circle at top left, rgba(15, 76, 129, 0.05), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
  box-shadow: 0 18px 38px rgba(15, 76, 129, 0.06);
}

.travel-workspace .report-section + .report-section {
  margin-top: 0;
}

.travel-workspace-inbox .vacation-list,
.travel-my-requests .vacation-list {
  margin-top: 0.4rem;
}

.travel-stage-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(214, 226, 236, 0.8);
}

.travel-stage-copy {
  display: grid;
  gap: 0.3rem;
  max-width: 68ch;
}

.travel-stage-kicker {
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0f4c81;
  font-weight: 800;
}

.travel-stage-copy h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.3;
  color: #173753;
}

.travel-stage-copy p {
  margin: 0;
  font-size: 0.83rem;
  line-height: 1.55;
  color: #5f7489;
}

.travel-stage-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(100px, 1fr));
  gap: 0.6rem;
  min-width: min(100%, 370px);
}

.travel-stage-stat {
  display: grid;
  gap: 0.2rem;
  padding: 0.8rem 0.9rem;
  border-radius: 16px;
  border: 1px solid #d5e2ee;
  background: linear-gradient(180deg, #ffffff 0%, #f3f8fd 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.85);
}

.travel-stage-stat span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6a8098;
}

.travel-stage-stat strong {
  font-size: 1rem;
  color: #173753;
}

.travel-basic-grid{
  gap: 1rem;
}

.travel-basic-grid {
  grid-template-columns: 1fr;
  width: 100%;
}

.travel-basic-grid .vacation-request-row.full-width {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.travel-basic-grid .form-group.full-width {
  grid-column: 1 / -1;
}

.travel-workspace :is(input:not([type="file"]), select, textarea) {
  width: 100%;
  min-height: 46px;
  padding: 0.72rem 0.85rem;
  border-radius: 14px;
  border: 1px solid #d7e4ef;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  color: #173753;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.75) inset;
}

.travel-workspace :is(textarea) {
  min-height: 112px;
  line-height: 1.55;
  resize: vertical;
}

.travel-workspace :is(input:not([type="file"]), select, textarea):focus {
  outline: none;
  border-color: #5b8bb8;
  box-shadow: 0 0 0 3px rgba(91, 139, 184, 0.14);
}

.travel-workspace .form-group label,
.travel-workspace .travel-expense-table thead th,
.travel-workspace .travel-cost-table thead th {
  font-weight: 800;
}

.travel-workspace .form-group {
  gap: 0.42rem;
}

.travel-expense-table-edit td,
.travel-cost-table td {
  vertical-align: middle;
}

.travel-expense-table-edit :is(input:not([type="file"]), select, textarea) {
  min-height: 42px;
  padding: 0.62rem 0.78rem;
  border-radius: 12px;
}

.travel-expense-table-edit textarea {
  min-height: 84px;
}

.travel-cost-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
}

.travel-cost-hint {
  font-size: 0.82rem;
  color: #5f7489;
}

.travel-cost-composer {
  display: grid;
  gap: 0.9rem;
  padding: 1rem 1.05rem;
  border: 1px solid #d9e5ef;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(245,249,253,0.98) 100%);
  box-shadow: 0 14px 32px rgba(15, 76, 129, 0.06);
}

.travel-cost-composer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.travel-cost-composer-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: #18334d;
}

.travel-cost-composer-copy {
  margin-top: 0.2rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #5d7086;
}

.travel-cost-composer-copy-block {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.travel-cost-composer-type-shell {
  display: grid;
  gap: 0.35rem;
  justify-items: end;
  min-width: 220px;
}

.travel-cost-composer-type-shell label {
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #5f7489;
  font-weight: 800;
}

.travel-cost-composer-type-shell select {
  width: 100%;
}

.travel-cost-composer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.95rem;
  align-items: start;
}

.travel-cost-composer-panel {
  display: grid;
  gap: 0.85rem;
  padding: 0.9rem;
  border-radius: 16px;
  border: 1px solid #dbe6ef;
  background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
}

.travel-cost-composer-panel--full {
  width: 100%;
}
.travel-cost-composer-panel .form-group {
  gap: 0.38rem;
}

.travel-cost-composer-panel .form-group label {
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5f7489;
}

.travel-cost-expense-grid {
  gap: 0.85rem;
}

.travel-cost-panel-copy {
  margin-top: 0.3rem;
  font-size: 0.74rem;
  line-height: 1.45;
  color: #6b7e92;
}

.travel-cost-inline-flag {
  width: fit-content;
}

.travel-cost-composer-actions {
  display: flex;
  justify-content: flex-end;
}

.travel-cost-table-wrap {
  display: grid;
  gap: 0.75rem;
}

.travel-cost-table-head {
  display: grid;
  gap: 0.18rem;
}

.travel-cost-table-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #18334d;
}

.travel-cost-table-copy {
  font-size: 0.84rem;
  line-height: 1.5;
  color: #5d7086;
}

.travel-cost-table-shell {
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 18px;
  border: 1px solid #d9e5ef;
  background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
  box-shadow: 0 14px 32px rgba(15, 76, 129, 0.06);
}

.travel-cost-table {
  width: 100%;
  border-collapse: collapse;
}

.travel-cost-table thead th {
  padding: 0.85rem 0.9rem;
  text-align: left;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #5f7489;
  background: #eef5fb;
  border-bottom: 1px solid #dbe6ef;
}

.travel-cost-table tbody td {
  padding: 0.82rem 0.9rem;
  border-top: 1px solid #edf2f7;
  vertical-align: top;
  color: #24405b;
  font-size: 0.86rem;
}

.travel-cost-row:nth-child(odd) {
  background: rgba(248, 251, 255, 0.72);
}

.travel-cost-row:hover {
  background: rgba(233, 242, 250, 0.72);
}

.travel-cost-cell-type {
  font-weight: 800;
}

.travel-cost-cell-actions {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}

.travel-cost-empty {
  padding: 1rem;
  text-align: center;
  color: #6b7e92;
  font-size: 0.86rem;
}

.travel-action-bar {
  justify-content: flex-start;
  padding-top: 0.2rem;
}

.travel-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.6rem;
  padding: 0.25rem 0.65rem;
  border: 1px solid #d9e6f3;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 6px 16px rgba(18, 59, 95, 0.05);
  cursor: pointer;
}

/* Il checkbox e' un elemento flex dentro l'etichetta e non aveva ALCUNA regola di
   dimensione: restava alla taglia intrinseca, che Safari - a differenza di Chrome -
   lascia dilatare dall'algoritmo flex fino a diventare enorme. Stessa misura usata
   altrove nel progetto (.checkbox-group input[type="checkbox"]), piu' flex:none perche'
   il contenitore non possa piu' ridimensionarlo. */
.travel-checkbox-label input[type="checkbox"] {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
}

.travel-expense-tree {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.travel-expense-legend {
  display: grid;
  gap: 0.55rem;
  padding: 1rem 1.05rem;
  border-radius: 18px;
  border: 1px solid #d9e5ef;
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(242,247,252,0.98) 100%);
  box-shadow: 0 14px 32px rgba(15, 76, 129, 0.06);
}

.travel-expense-legend-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: #18334d;
}

.travel-expense-legend-copy {
  font-size: 0.86rem;
  line-height: 1.5;
  color: #5d7086;
}

.travel-expense-table-shell {
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid #dce7f1;
  background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
}

.travel-expense-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.travel-expense-table thead th {
  padding: 0.8rem 0.95rem;
  text-align: left;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6a8098;
  border-bottom: 1px solid rgba(216, 229, 241, 0.8);
  background: rgba(239, 245, 250, 0.7);
}

.travel-expense-table tbody td {
  padding: 0.82rem 0.95rem;
  border-bottom: 1px solid rgba(216, 229, 241, 0.68);
  vertical-align: top;
  color: #24405b;
  font-size: 0.92rem;
}

.travel-expense-table tbody tr:last-child td {
  border-bottom: 0;
}

.travel-expense-cell-label {
  font-weight: 800;
  color: #173753;
  white-space: nowrap;
}

.travel-expense-cell-value {
  font-weight: 800;
  color: #0f4c81;
}

.travel-expense-cell-detail,
.travel-expense-cell-attachment {
  color: #5f7489;
}

.travel-expense-cell-attachment {
  vertical-align: top;
}

.travel-expense-attachment-name {
  color: #173753;
  font-weight: 700;
  word-break: break-word;
}

.travel-expense-attachment-name-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: fit-content;
  max-width: 100%;
  padding: 0.3rem 0.55rem;
  border: 1px solid rgba(15, 76, 129, 0.18);
  border-radius: 999px;
  background: rgba(15, 76, 129, 0.08);
  color: #0f4c81;
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  word-break: break-word;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}


.travel-expense-attachment-name-btn:hover {
  background: rgba(15, 76, 129, 0.14);
  border-color: rgba(15, 76, 129, 0.28);
  text-decoration: none;
  transform: translateY(-1px);
}

.travel-expense-attachment-name-btn:focus-visible {
  outline: 2px solid rgba(15, 76, 129, 0.45);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.12);
}

.travel-attachment-dialog {
  width: min(1100px, calc(100vw - 2rem));
}

.travel-attachment-dialog-body {
  min-height: 60vh;
}

.travel-attachment-preview-surface {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 52vh;
  border: 1px solid #dbe6ef;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
  overflow: hidden;
}

.travel-attachment-preview-image,
.travel-attachment-preview-frame {
  width: 100%;
  min-height: 52vh;
  border: 0;
  background: #ffffff;
}

.travel-attachment-preview-image {
  object-fit: contain;
}

.travel-attachment-preview-fallback {
  display: grid;
  gap: 0.35rem;
  padding: 1rem;
  text-align: center;
  color: #5d7086;
}

.travel-attachment-preview-fallback-title {
  font-weight: 800;
  color: #18334d;
}

.travel-attachment-preview-fallback-copy {
  font-size: 0.9rem;
}

.travel-expense-cell-attachment .travel-expense-attachment-empty {
  color: #5f7489;
  font-size: 0.92rem;
}

.travel-expense-table-total td {
  background: rgba(15, 76, 129, 0.05);
  font-weight: 800;
  color: #173753;
}

body.theme-dark .travel-expense-table-shell {
  border-color: rgba(71, 85, 105, 0.6);
  background: linear-gradient(180deg, #111924 0%, #0d1520 100%);
}

body.theme-dark .travel-expense-table-edit input[type="text"],
body.theme-dark .travel-expense-table-edit input[type="number"] {
  background: #0f1720;
  color: #e6edf5;
  border-color: rgba(71, 85, 105, 0.85);
}

body.theme-dark .travel-expense-table thead th {
  color: #9fb2c5;
  border-bottom-color: rgba(71, 85, 105, 0.45);
  background: rgba(17, 25, 36, 0.92);
}

body.theme-dark .travel-expense-table tbody td {
  color: #e6edf5;
  border-bottom-color: rgba(71, 85, 105, 0.38);
}

body.theme-dark .travel-expense-cell-label,
body.theme-dark .travel-expense-cell-value {
  color: #e6edf5;
}

body.theme-dark .travel-expense-cell-detail,
body.theme-dark .travel-expense-cell-attachment {
  color: #c2d0de;
}

body.theme-dark .travel-expense-cell-attachment .travel-expense-attachment-name,
body.theme-dark .travel-expense-attachment-name-btn {
  color: #e6edf5;
}

body.theme-dark .travel-expense-attachment-name-btn {
  border-color: rgba(159, 178, 197, 0.28);
  background: rgba(17, 25, 36, 0.8);
}

body.theme-dark .travel-expense-attachment-name-btn:hover {
  background: rgba(17, 25, 36, 0.95);
  border-color: rgba(159, 178, 197, 0.4);
}

body.theme-dark .travel-expense-attachment-name-btn:focus-visible {
  outline-color: rgba(159, 178, 197, 0.55);
  box-shadow: 0 0 0 3px rgba(159, 178, 197, 0.12);
}

body.theme-dark .travel-attachment-preview-surface,
body.theme-dark .travel-attachment-preview-frame {
  border-color: rgba(71, 85, 105, 0.6);
  background: linear-gradient(180deg, #111924 0%, #0d1520 100%);
}

body.theme-dark .travel-attachment-preview-fallback {
  color: #c2d0de;
}

body.theme-dark .travel-attachment-preview-fallback-title {
  color: #e6edf5;
}

body.theme-dark .travel-expense-table-total td {
  background: rgba(125, 211, 252, 0.08);
  color: #f8fbff;
}

.travel-expense-table-wrap--edit {
  gap: 0.6rem;
}

.travel-expense-table-shell--edit {
  overflow-x: auto;
}

.travel-expense-table-edit {
  min-width: 920px;
}

.travel-expense-table-edit input[type="text"],
.travel-expense-table-edit input[type="number"],
.travel-expense-table-edit select {
  width: 100%;
}

.travel-expense-attachment-meta{
  margin-top: 0.22rem;
  font-size: 0.74rem;
  color: #6b7e92;
}

.travel-inbox-card {
  display: grid;
  gap: 1rem;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(216, 229, 241, 0.95);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(247,251,255,0.98) 100%);
  box-shadow: 0 16px 34px rgba(15, 76, 129, 0.08);
}

.travel-inbox-card .form-grid {
  gap: 0.85rem;
}

.travel-inbox-card .form-group input,
.travel-inbox-card .form-group select,
.travel-inbox-card .form-group textarea {
  border-radius: 12px;
}

.travel-inbox-card .vacation-item-actions {
  gap: 0.4rem;
}

.travel-inbox-card .hr-card-badge{
  background: linear-gradient(180deg, #ffffff 0%, #eef5fb 100%);
  border: 1px solid #d5e2ee;
  color: #23415b;
  box-shadow: 0 4px 12px rgba(15, 76, 129, 0.05);
}

body.theme-dark .travel-workspace .report-section {
  border-color: rgba(71, 85, 105, 0.75);
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.08), transparent 34%),
    linear-gradient(180deg, #16202c 0%, #111a24 100%);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
}

body.theme-dark .travel-stage-header {
  border-bottom-color: rgba(71, 85, 105, 0.72);
}

body.theme-dark .travel-stage-kicker {
  color: #7dd3fc;
}

body.theme-dark .travel-stage-copy h3,
body.theme-dark .travel-stage-stat strong,
body.theme-dark .travel-cost-composer-title,
body.theme-dark .travel-cost-table-title,
body.theme-dark .travel-expense-legend-title,
body.theme-dark .travel-inbox-card {
  color: #e7eef7;
}

body.theme-dark .travel-stage-copy p,
body.theme-dark .travel-cost-hint,
body.theme-dark .travel-cost-composer-copy,
body.theme-dark .travel-cost-composer-type-shell label,
body.theme-dark .travel-cost-composer-type-shell select,
body.theme-dark .travel-cost-table-copy,
body.theme-dark .travel-expense-legend-copy,
body.theme-dark .travel-expense-attachment-meta,
body.theme-dark .travel-cost-empty,
body.theme-dark .travel-cost-panel-copy {
  color: #9fb2c5;
}

body.theme-dark .travel-stage-stat,
body.theme-dark .travel-cost-composer,
body.theme-dark .travel-cost-composer-panel,
body.theme-dark .travel-cost-table-shell,
body.theme-dark .travel-expense-legend,
body.theme-dark .travel-inbox-card {
  border-color: rgba(71, 85, 105, 0.72);
  background: linear-gradient(180deg, #17212d 0%, #111924 100%);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
}

body.theme-dark .travel-stage-stat span,
body.theme-dark .travel-cost-composer-panel .form-group label {
  color: #9fb2c5;
}

body.theme-dark .travel-cost-table-shell {
  overflow-x: auto;
  overflow-y: hidden;
}

body.theme-dark .travel-cost-table thead th {
  background: #1a2431;
  border-bottom-color: rgba(71, 85, 105, 0.72);
  color: #b8c8d8;
}

body.theme-dark .travel-cost-table tbody td {
  border-top-color: rgba(71, 85, 105, 0.4);
  color: #d8e4ef;
}

body.theme-dark .travel-cost-row:nth-child(odd) {
  background: rgba(15, 23, 42, 0.35);
}

body.theme-dark .travel-cost-row:hover {
  background: rgba(51, 65, 85, 0.45);
}

body.theme-dark .travel-checkbox-label,
body.theme-dark .travel-inbox-card .hr-card-badge {
  border-color: rgba(71, 85, 105, 0.72);
  background: linear-gradient(180deg, #1a2431 0%, #15202a 100%);
  color: #dbe7f2;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
}

body.theme-dark .travel-approved-section {
  background: transparent;
}

body.theme-dark .travel-approved-section h4 {
  color: #e7eef7;
}

body.theme-dark .travel-expense-tree-readonly .form-group input[readonly] {
  background: #101923;
  color: #e6edf5;
}

body.theme-dark .travel-workspace .form-group input,
body.theme-dark .travel-workspace .form-group textarea,
body.theme-dark .travel-workspace .form-group select {
  background-color: #101923;
  border-color: #33465a;
  color: #e6edf5;
}

body.theme-dark .travel-workspace :is(input:not([type="file"]), select, textarea) {
  background: #101923;
  border-color: #33465a;
  color: #e6edf5;
}

body.theme-dark .travel-workspace :is(input:not([type="file"]), select, textarea):focus {
  border-color: #5b8bb8;
  box-shadow: 0 0 0 3px rgba(91, 139, 184, 0.16);
}

body.theme-dark .travel-workspace .form-group input:focus,
body.theme-dark .travel-workspace .form-group textarea:focus,
body.theme-dark .travel-workspace .form-group select:focus {
  background-color: #101923;
  border-color: #5b8bb8;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.14);
}

body.theme-dark .travel-workspace .form-group input:-webkit-autofill,
body.theme-dark .travel-workspace .form-group input:-webkit-autofill:hover,
body.theme-dark .travel-workspace .form-group input:-webkit-autofill:focus {
  -webkit-text-fill-color: #e6edf5;
  -webkit-box-shadow: 0 0 0 1000px #101923 inset;
  box-shadow: 0 0 0 1000px #101923 inset;
  caret-color: #e6edf5;
}
@media (max-width: 960px) {
  .travel-stage-header {
    flex-direction: column;
  }

  .travel-stage-stats {
    width: 100%;
    min-width: 0;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .travel-cost-composer,
  .travel-cost-table-wrap {
    gap: 0.65rem;
  }

  .travel-cost-composer-grid {
    grid-template-columns: 1fr;
  }

  .travel-cost-composer-actions {
    justify-content: stretch;
  }

  .travel-cost-composer-actions .btn {
    width: 100%;
  }

  .travel-expense-legend {
    padding: 0.9rem;
  }

  .travel-cost-table {
    min-width: 640px;
  }
}

.vacation-edit-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(235, 124, 5, 0.24);
  background: linear-gradient(180deg, #fff9f1 0%, #ffffff 100%);
}

.vacation-edit-banner strong {
  display: block;
  margin-bottom: 0.2rem;
}

.vacation-edit-banner p {
  margin: 0;
  color: #62778c;
  font-size: 0.84rem;
}

.vacation-lock-banner {
  border-color: rgba(194, 65, 12, 0.28);
  background: linear-gradient(180deg, #fff4ef 0%, #ffffff 100%);
}

.vacation-lock-banner[hidden] {
  display: none !important;
}

.vacation-lock-banner strong {
  color: #9a3412;
}

.vacation-hours-counter {
  margin: -0.15rem 0 0;
  padding: 0.45rem 0.7rem;
  border-radius: 12px;
  border: 1px solid #d9e4ee;
  background: linear-gradient(180deg, #f8fbfe 0%, #ffffff 100%);
  color: #496379;
  font-size: 0.8rem;
  line-height: 1.35;
}

.absence-calendar-toolbar {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.1rem 0 0.35rem;
}

.absence-calendar-toolbar-copy {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.absence-calendar-toolbar-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: nowrap;
  width: 100%;
}

.absence-calendar-zoom-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  flex: 0 0 auto;
}

.absence-calendar-zoom-switch .btn.active {
  background: linear-gradient(135deg, #eb7c05 0%, #f39c34 100%);
  border-color: #eb7c05;
  color: #fff;
  box-shadow: 0 10px 18px rgba(235, 124, 5, 0.15);
}

.absence-calendar-grid-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.absence-calendar-planner-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.2rem 0 0.1rem;
}

.absence-calendar-planner-header-copy {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.absence-calendar-planner-stats {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.absence-calendar-planner-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: #f3f7fb;
  border: 1px solid #dae5ee;
  color: #62778c;
  font-size: 0.78rem;
  font-weight: 600;
}

.absence-calendar-planner-stat strong {
  font-size: 0.95rem;
  color: #253f58;
}

.absence-calendar-view.is-week .absence-calendar-planner-date{
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.absence-calendar-view.is-week .absence-calendar-planner-date-copy{
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
}

.absence-calendar-view.is-week .absence-calendar-planner-date-copy strong{
  font-size: 0.8rem;
  font-weight: 700;
  color: #26415a;
}

.absence-calendar-view.is-week .absence-calendar-planner-date-copy span{
  font-size: 0.68rem;
  color: #6a7f92;
}

.absence-calendar-view.is-week .absence-calendar-weekdays {
  display: none;
}

.absence-calendar-view.is-week .absence-calendar-week-agenda {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.absence-calendar-view.is-week .absence-calendar-day {
  min-height: 0;
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
  display: grid;
  grid-template-columns: minmax(12rem, 18rem) minmax(0, 1fr);
  gap: 0.9rem;
  align-items: flex-start;
}

.absence-calendar-view.is-week .absence-calendar-day-number {
  min-width: 2rem;
  min-height: 2rem;
  font-size: 0.8rem;
}

.absence-calendar-view.is-week .absence-calendar-day-absences {
  gap: 0.35rem;
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-content: flex-start;
}

.absence-calendar-view.is-week .absence-calendar-chip {
  padding: 0.2rem 0.44rem;
  font-size: 0.68rem;
}

.absence-calendar-view.is-week .absence-calendar-holiday-label {
  font-size: 0.62rem;
}

.absence-calendar-legend {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.absence-calendar-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.76rem;
  color: #62778c;
  font-weight: 600;
}

.absence-calendar-legend-swatch {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.absence-calendar-legend-swatch.is-working {
  background: linear-gradient(180deg, #fff6eb 0%, #fffdf9 100%);
  border-color: rgba(235, 124, 5, 0.24);
}

.absence-calendar-legend-swatch.is-weekend {
  background: #eaf3fb;
  border-color: #d4e1ed;
}

.absence-calendar-legend-swatch.is-holiday {
  background: #ffe3c2;
  border-color: #f1bd73;
}

.absence-calendar-hint {
  padding: 0.65rem 0.9rem;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff7ec 0%, #ffffff 100%);
  border: 1px solid #f0d4aa;
  color: #8a4a00;
  font-size: 0.84rem;
  font-weight: 600;
}

.absence-calendar-weekdays,
.absence-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.55rem;
}

.absence-calendar-grid.is-week {
  align-items: stretch;
}

.absence-calendar-weekdays span {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6a7f92;
}

.absence-calendar-day {
  min-height: 7.4rem;
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  border-radius: 16px;
  border: 1px solid #e3ebf2;
  background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
  box-shadow: 0 10px 20px rgba(22, 38, 56, 0.04);
}

.absence-calendar-day.empty {
  min-height: 7.4rem;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.absence-calendar-day.is-today {
  border-color: rgba(235, 124, 5, 0.42);
  box-shadow: 0 12px 24px rgba(235, 124, 5, 0.08);
}

.absence-calendar-day.has-absences {
  background: linear-gradient(180deg, #fffaf3 0%, #ffffff 100%);
}

.absence-calendar-day.is-working {
  background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
}

.absence-calendar-day.is-weekend {
  background: linear-gradient(180deg, #eef5ff 0%, #f8fbff 100%);
  border-color: #d5e3f1;
}

.absence-calendar-day.is-holiday {
  background: linear-gradient(180deg, #fff5e8 0%, #ffffff 100%);
  border-color: rgba(235, 124, 5, 0.28);
}

.absence-calendar-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.absence-calendar-day-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  min-height: 1.75rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #edf4fb;
  color: #26415a;
  font-size: 0.78rem;
  font-weight: 700;
}

.absence-calendar-day.is-today .absence-calendar-day-number {
  background: linear-gradient(135deg, #eb7c05 0%, #f39c34 100%);
  color: #fff;
}

.absence-calendar-holiday-label {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  background: #ffe8c7;
  color: #8a4a00;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.absence-calendar-day-absences {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  overflow: hidden;
}

.absence-calendar-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  width: fit-content;
  padding: 0.22rem 0.48rem;
  border-radius: 999px;
  background: #eaf3fb;
  color: #27415a;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
}

.absence-calendar-chip-more {
  background: #ffecd2;
  color: #8a4a00;
}

/* Assenza PARZIALE (ore < ore giornaliere dell'utente): variante ambra + badge ore, per
   distinguerla a colpo d'occhio dalle assenze a giornata intera (chip azzurre). Le giornate
   intere restano invariate → nessun peso aggiunto all'interfaccia. */
.absence-calendar-chip.is-partial {
  align-items: flex-start;
  gap: 0.14rem;
  padding: 0.28rem 0.5rem;
  background: #fff2e0;
  color: #9a5a00;
  box-shadow: inset 0 0 0 1px #ffd8a8;
}

.absence-calendar-chip-main {
  display: block;
  max-width: 100%;
  font-size: 0.72rem;
  line-height: 1.15;
}

.absence-calendar-chip-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  min-width: 0;
}

.absence-calendar-chip-hours {
  display: inline-flex;
  align-items: center;
  padding: 0 0.34rem;
  border-radius: 999px;
  background: #ff8a00;
  color: #ffffff;
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1.45;
  white-space: nowrap;
}

.absence-calendar-chip-slot {
  display: inline-flex;
  align-items: center;
  padding: 0.08rem 0.34rem;
  border-radius: 999px;
  background: rgba(39, 65, 90, 0.08);
  color: inherit;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* Espansione cella giorno (solo vista mese): da collassata mostra le prime 3 persone, le altre
   si rivelano col toggle "+N / Comprimi" (stessa UX di .timesheet-day-more). Scopata al month
   grid per non toccare la vista settimana (agenda con la sua paginazione chip). */
.absence-calendar-grid .absence-calendar-day:not(.is-expanded) .absence-calendar-day-absences .absence-calendar-chip:nth-child(n+4) {
  display: none;
}

.absence-calendar-day-more {
  align-self: flex-start;
  margin-top: 0.1rem;
  border: 1px solid #cfe0f1;
  border-radius: 999px;
  background: rgba(10, 110, 209, 0.08);
  color: #0a4f95;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.18rem 0.5rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.absence-calendar-day-more:hover {
  background: rgba(10, 110, 209, 0.16);
  border-color: #9cc2e6;
}

.absence-calendar-day-more-hide { display: none; }
.absence-calendar-day.is-expanded .absence-calendar-day-more-show { display: none; }
.absence-calendar-day.is-expanded .absence-calendar-day-more-hide { display: inline; }

@media (max-width: 720px) {
  .vacation-edit-banner {
    flex-direction: column;
    align-items: stretch;
  }

  .absence-calendar-toolbar-controls {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }

  .absence-calendar-zoom-switch {
    width: 100%;
  }

  .absence-calendar-weekdays,
  .absence-calendar-grid {
    gap: 0.35rem;
  }

  .absence-calendar-planner-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .absence-calendar-view.is-week .absence-calendar-day {
    grid-template-columns: 1fr;
    gap: 0.55rem;
    padding: 0.75rem 0.8rem;
  }

  .absence-calendar-holiday-label {
    max-width: 100%;
  }

  .absence-calendar-chip {
    font-size: 0.67rem;
  }
}

.timesheet-month-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.65rem;
  margin-bottom: 0.9rem;
  padding: 0.15rem 0 0.35rem;
}

.timesheet-month-copy {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.timesheet-quick-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
}

.timesheet-quick-group {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.timesheet-month-controls {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  padding: 0.36rem;
  border-radius: 14px;
  background: linear-gradient(180deg, #f3f8ff 0%, #e9f2fb 100%);
  border: 1px solid #d8e5f3;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 8px 18px rgba(37, 69, 101, 0.08);
  width: auto;
  max-width: 100%;
  flex: 0 0 auto;
}

.month-nav-wrap {
  position: relative;
  min-width: 180px;
  width: 196px;
  flex: 0 0 196px;
}

.month-nav-input {
  width: 100%;
  min-width: 180px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid #b7cde4;
  background:
    linear-gradient(180deg, #ffffff 0%, #f5faff 100%);
  color: #173756;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 0.32rem 2.2rem 0.32rem 0.72rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 6px 14px rgba(25, 59, 93, 0.1);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.month-nav-input:hover {
  border-color: #89abd0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 8px 18px rgba(23, 59, 94, 0.14);
}

.month-nav-input:focus {
  outline: none;
  border-color: #3f7fbe;
  box-shadow:
    0 0 0 3px rgba(74, 133, 195, 0.2),
    0 10px 24px rgba(20, 56, 90, 0.2);
}

.month-nav-input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  border-radius: 9px;
  padding: 0.14rem;
  background: linear-gradient(180deg, rgba(69, 123, 180, 0.18) 0%, rgba(69, 123, 180, 0.08) 100%);
}

.month-nav-accent {
  position: absolute;
  right: 2.15rem;
  top: 6px;
  width: 1px;
  height: 24px;
  background: linear-gradient(180deg, rgba(131, 161, 192, 0) 0%, rgba(131, 161, 192, 0.75) 50%, rgba(131, 161, 192, 0) 100%);
  pointer-events: none;
}

.timesheet-calendar {
  border: 1px solid #e2ebf3;
  border-radius: 12px;
  padding: 0.65rem;
  background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
}

.timesheet-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.4rem;
}

.timesheet-calendar-week {
  margin-bottom: 0.45rem;
}

.timesheet-calendar-week span {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: #61778d;
}

.timesheet-day {
  min-height: 120px;
  border: 1px solid #d8e4f0;
  border-radius: 10px;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 0.42rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.timesheet-day.empty {
  min-height: 120px;
  border: 1px dashed #e5edf6;
  border-radius: 10px;
  background: #f9fbfe;
}

.timesheet-day.timesheet-day-working {
  background: linear-gradient(180deg, #fff4e6 0%, #ffecd0 100%);
}

.timesheet-day.timesheet-day-weekend {
  background: #ffffff;
}

.timesheet-day.timesheet-day-holiday {
  border-color: #f59e0b;
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.2);
}

/* Giornata completamente consuntivata: ore ordinarie = ore configurate del dipendente.
   Sovrascrive lo sfondo di default (lavorativo/weekend) per dare un feedback "completata". */
.timesheet-day.timesheet-day-complete {
  background: linear-gradient(180deg, #e7f7ec 0%, #d3f0dd 100%);
  border-color: #34a853;
  box-shadow: inset 0 0 0 1px rgba(52, 168, 83, 0.25);
}

.timesheet-day-holiday-label {
  display: inline-block;
  max-width: 100%;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  margin: 0.18rem 0 0.24rem;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #9a3412;
  background: rgba(251, 191, 36, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.timesheet-day-number {
  font-size: 0.9rem;
  font-weight: 600;
  color: #27415a;
}

.timesheet-day-hours {
  align-self: flex-start;
  font-size: 0.66rem;
  color: #0a6ed1;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 0.25rem;
}

.timesheet-day-hours-badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1.2;
  border-radius: 999px;
  padding: 0.16rem 0.42rem;
  margin-bottom: 0.2rem;
  max-width: 100%;
  color: #0b5cab;
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid rgba(37, 99, 235, 0.24);
}

.timesheet-day-overtime {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1.2;
  border-radius: 999px;
  padding: 0.16rem 0.42rem;
  margin-bottom: 0.2rem;
  max-width: 100%;
}

.timesheet-day-overtime {
  color: #92400e;
  background: rgba(251, 191, 36, 0.22);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.timesheet-day-input {
  width: 100%;
  border: 1px solid #c8d8e9;
  border-radius: 8px;
  padding: 0.26rem 0.35rem;
  font-size: 0.78rem;
  background: rgba(255, 255, 255, 0.95);
  margin-bottom: 0.28rem;
}

.timesheet-day-lines {
  width: 100%;
  display: grid;
  gap: 0.15rem;
}

/* Cella giorno collassata: mostra solo le prime 2 consuntivazioni; il bottone +N espande la
   cella all'altezza necessaria per vederle tutte (la riga della griglia cresce di conseguenza). */
.timesheet-day:not(.is-expanded) .timesheet-day-lines .timesheet-day-line-item:nth-child(n+3) {
  display: none;
}

.timesheet-day-more {
  align-self: flex-start;
  margin-top: 0.2rem;
  border: 1px solid #cfe0f1;
  border-radius: 999px;
  background: rgba(10, 110, 209, 0.08);
  color: #0a4f95;
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.16rem 0.5rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.timesheet-day-more:hover {
  background: rgba(10, 110, 209, 0.16);
  border-color: #9cc2e6;
}

.timesheet-day-more-hide { display: none; }
.timesheet-day.is-expanded .timesheet-day-more-show { display: none; }
.timesheet-day.is-expanded .timesheet-day-more-hide { display: inline; }

.timesheet-day-line-item {
  display: flex;
  align-items: center;
  gap: 0.28rem;
  min-width: 0;
}

.timesheet-day-line-item.is-vacation-linked {
  padding: 0.16rem 0.26rem;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(14, 116, 144, 0.09) 0%, rgba(6, 95, 70, 0.08) 100%);
  border: 1px solid rgba(14, 116, 144, 0.16);
}

.timesheet-day-line-button {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 0.3em;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  text-align: left;
}

.timesheet-day-line {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.68rem;
  color: #5f7386;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.timesheet-day-line-cat {
  flex: 0 0 auto;
  display: inline-block;
  padding: 0 0.32em;
  border-radius: 0.55em;
  background: #e2eaf2;
  color: #34506a;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.4;
}

.timesheet-day-line-button:hover .timesheet-day-line {
  color: #0f5ea6;
  text-decoration: underline;
}

.timesheet-day-line-item.is-vacation-linked .timesheet-day-line-button:hover .timesheet-day-line {
  color: #0f766e;
}

.timesheet-day-line-remove {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  border: 0;
  border-radius: 999px;
  background: rgba(190, 24, 93, 0.14);
  color: #be185d;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.timesheet-day-line-remove:hover {
  background: rgba(190, 24, 93, 0.2);
}

.timesheet-day-line-lock {
  flex: 0 0 auto;
  width: 0.9rem;
  height: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0f766e;
  font-size: 0.9rem;
  line-height: 1;
}

.timesheet-project-row {
  margin-bottom: 0.9rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.55rem;
  align-items: stretch;
}

.timesheet-project-field {
  min-width: 0;
}

.timesheet-project-dropdown {
  position: relative;
  border: 1px solid #dbe5ef;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 24px rgba(25, 59, 93, 0.08);
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.timesheet-project-dropdown:hover,
.timesheet-project-dropdown.is-open {
  border-color: #8eaed1;
  box-shadow: 0 14px 30px rgba(25, 59, 93, 0.12);
}

.timesheet-project-combobox-shell {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.55rem 0.7rem 0.55rem 0.95rem;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.timesheet-project-combobox-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: #173756;
  font-size: 0.96rem;
  font-weight: 700;
  padding: 0.16rem 0;
  box-shadow: none;
}

.timesheet-project-combobox-input::-ms-clear {
  display: none;
}

.timesheet-project-combobox-input::placeholder {
  color: #6b7f94;
  font-weight: 600;
}

.timesheet-project-combobox-toggle {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: rgba(87, 122, 157, 0.08);
  cursor: pointer;
}

.timesheet-project-dropdown-caret {
  width: 0.78rem;
  height: 0.78rem;
  border-right: 2px solid #4d6d8a;
  border-bottom: 2px solid #4d6d8a;
  transform: rotate(45deg);
  margin-right: 0.2rem;
  transition: transform 0.18s ease;
}

.timesheet-project-dropdown.is-open .timesheet-project-dropdown-caret {
  transform: rotate(-135deg);
}

.timesheet-project-dropdown-panel {
  display: none;
  border-top: 1px solid #e2ebf4;
  padding: 0.55rem 0.95rem 0.95rem;
  background: rgba(245, 249, 253, 0.95);
}

.timesheet-project-dropdown.is-open .timesheet-project-dropdown-panel {
  display: block;
}

/* Nel filtro del Riepilogo per Progetto il combobox sta in una riga di filtri: il pannello
   deve fluttuare (assoluto) così l'apertura non allunga la riga né riflowa i controlli sotto. */
.timesheet-project-summary-filters .timesheet-project-field {
  min-width: 240px;
  max-width: 320px;
  flex: 0 1 auto;
}

.timesheet-project-summary-filters .timesheet-project-dropdown {
  overflow: visible;
}

.timesheet-project-summary-filters .timesheet-project-dropdown.is-open .timesheet-project-dropdown-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 40;
  border: 1px solid #dbe5ef;
  border-top: 1px solid #e2ebf4;
  border-radius: 14px;
  box-shadow: 0 16px 34px rgba(25, 59, 93, 0.18);
}

.timesheet-project-options {
  margin-top: 0.65rem;
  display: grid;
  gap: 0.45rem;
  max-height: 240px;
  overflow: auto;
  padding-right: 0.2rem;
}

.timesheet-project-option {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
  padding: 0.72rem 0.8rem;
  border: 1px solid #d8e4f0;
  border-radius: 12px;
  background: #fff;
  color: #173756;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.timesheet-project-option:hover {
  border-color: #89abd0;
  box-shadow: 0 10px 20px rgba(37, 69, 101, 0.08);
  transform: translateY(-1px);
}

.timesheet-project-option.is-selected {
  border-color: #6e96c2;
  background: linear-gradient(180deg, #f4f9ff 0%, #e9f3ff 100%);
  box-shadow: inset 0 0 0 1px rgba(110, 150, 194, 0.18);
}

.timesheet-project-option-name {
  font-size: 0.9rem;
  font-weight: 700;
}

.timesheet-project-option-desc {
  font-size: 0.74rem;
  color: #61778d;
  line-height: 1.3;
}

.timesheet-project-empty {
  padding: 0.65rem 0.2rem;
  font-size: 0.78rem;
  color: #6e8396;
}

.timesheet-project-field-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.4rem;
}

.timesheet-project-result-count {
  font-size: 0.72rem;
  font-weight: 700;
  color: #597086;
  white-space: nowrap;
}

.timesheet-project-filter-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.timesheet-project-filter-input-wrap input {
  flex: 1 1 auto;
  min-width: 0;
}

.timesheet-project-clear {
  flex: 0 0 auto;
  white-space: nowrap;
}

.timesheet-project-hint {
  margin-top: 0.3rem;
  font-size: 0.72rem;
  line-height: 1.3;
  color: #6e8396;
}

.timesheet-project-field input,
.timesheet-project-field select {
  width: 100%;
}

@media (max-width: 720px) {
  .timesheet-month-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.8rem;
  }

  .timesheet-month-controls {
    flex-wrap: wrap;
    width: 100%;
  }

  .month-nav-wrap {
    min-width: 0;
    width: 100%;
    flex: 1 1 220px;
  }

  .month-nav-input {
    min-width: 0;
  }

  .timesheet-project-row {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .timesheet-project-dropdown-toggle {
    padding: 0.82rem 0.9rem;
  }

  .timesheet-project-options {
    max-height: 210px;
  }

  .timesheet-project-field-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }

  .timesheet-project-filter-input-wrap {
    flex-wrap: wrap;
  }

  .timesheet-project-clear {
    width: 100%;
  }
}

/* Cards */
.card {
  background-color: var(--card-background);
  border-radius: 18px;
  border: 1px solid rgba(221, 227, 234, 0.9);
  box-shadow: 0 14px 36px rgba(25, 37, 50, 0.08);
  overflow: hidden;
}

.card.sticky {
  position: sticky;
  top: 1.35rem;
}

.card-header {
  background: linear-gradient(180deg, #fbfcfd 0%, #f4f7fa 100%);
  padding: 1.15rem 1.4rem;
  border-bottom: 1px solid var(--border-color);
}

.card-header h2 {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--primary-color);
}

.editor-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.editor-header-actions {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 0.6rem;
  overflow: visible;
  max-width: 100%;
  min-width: 0;
  flex: 1 1 auto;
}

@media (min-width: 1025px) {
  #app.app-workspace-mode .editor-panel .card {
    display: flex;
    flex-direction: column;
  }

  #app.app-workspace-mode .editor-panel .tab-content {
    order: 1;
    padding-bottom: 128px;
  }

  #app.app-workspace-mode .editor-panel .tabs {
    order: 2;
    position: fixed;
    left: 0;
    right: auto;
    bottom: 14px;
    z-index: 120;
    display: flex;
    gap: 8px;
    width: auto;
    max-width: none;
    box-sizing: border-box;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    padding: 8px;
    padding-right: 14px;
    border: 1px solid #dbe7f4;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 12px 26px rgba(15, 37, 68, 0.14);
    backdrop-filter: blur(8px);
  }

  #app.app-workspace-mode .editor-panel .tabs .tab-btn {
    flex: 0 0 auto;
    min-width: max-content;
    white-space: nowrap;
  }

  #app.app-workspace-mode .editor-panel .tabs .tab-btn span {
    display: inline !important;
    white-space: nowrap;
  }

  #app.app-workspace-mode .preview-panel .preview-scroll,
  #app.app-workspace-mode .preview-panel .card-body {
    padding-bottom: 128px;
  }

  #app.app-workspace-mode .editor-panel .tabs::-webkit-scrollbar {
    height: 8px;
  }

  #app.app-workspace-mode .editor-panel .tabs::-webkit-scrollbar-track {
    background: transparent;
  }

  #app.app-workspace-mode .editor-panel .tabs::-webkit-scrollbar-thumb {
    background: rgba(120, 136, 160, 0.55);
    border-radius: 999px;
  }

  #app.app-workspace-mode .editor-panel .card-footer {
    display: none !important;
  }

  #app.app-workspace-mode .editor-panel #prevBtn,
  #app.app-workspace-mode .editor-panel #nextBtn {
    display: none !important;
  }

  #app.app-workspace-mode .editor-panel .editor-inline-actions {
    display: inline-flex !important;
  }

  #app.app-workspace-mode .editor-panel .editor-more-dropdown {
    position: relative;
    display: inline-flex;
  }

  #app.app-workspace-mode .editor-panel #editorMoreToggle {
    display: inline-flex !important;
  }

  #app.app-workspace-mode .editor-panel #editorMoreMenu {
    display: none;
  }

  #app.app-workspace-mode .editor-panel #editorMoreMenu.open {
    display: flex !important;
  }

  #app.app-workspace-mode .editor-panel #editorMoreMenu .editor-more-menu-item {
    width: 100%;
    flex: 1 1 auto;
  }
}

#cvEditorTitle {
  white-space: nowrap;
  flex-shrink: 0;
}

.editor-header-actions .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.editor-more-dropdown {
  position: relative;
  flex: 0 0 auto;
}

.editor-more-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  min-width: 220px;
  display: none;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.55rem;
  border: 1px solid #dce5ee;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 26px rgba(26, 38, 52, 0.14);
  z-index: 40;
}

.editor-more-menu.open {
  display: flex;
}

.editor-more-menu-item {
  width: 100%;
  justify-content: flex-start;
}

.editor-inline-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

@media (max-width: 1024px) {
  #app.app-workspace-mode .editor-panel .editor-inline-actions {
    display: inline-flex;
  }

  #app.app-workspace-mode .editor-panel .editor-inline-actions .btn {
    width: auto !important;
    flex: 0 0 auto !important;
    min-height: 40px;
    border-radius: 11px;
    font-size: 0.76rem;
    padding: 0.5rem 0.75rem;
  }
}


.floating-save-btn {
  display: none;
}

#app.app-workspace-mode .floating-save-btn {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 121;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(15, 37, 68, 0.25);
}

.preview-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.preview-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.card-body {
  padding: 1.25rem;
}

.archive-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
}

.archive-header p {
  margin-top: 0.18rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.archive-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.feature-menu-header h2 {
  color: #203246;
}

.feature-menu-panel {
  position: sticky;
  top: 5.5rem;
  align-self: start;
  max-height: calc(100vh - 6.5rem);
}

.feature-menu-panel .card.sticky {
  position: static;
  top: auto;
  max-height: calc(100vh - 6.5rem);
  display: flex;
  flex-direction: column;
}

.feature-menu-panel .feature-menu-body {
  overflow: auto;
  scrollbar-gutter: stable;
}

.feature-menu-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.85rem;
}

.feature-menu-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 0.2rem;
}

.feature-menu-group-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.78rem 0.92rem 0.78rem 0.86rem;
  font-weight: 900;
  font-size: 0.84rem;
  letter-spacing: 0.06em;
  border: 1px solid #d7e0ea;
  border-radius: 12px;
  background: linear-gradient(180deg, #f7faff 0%, #edf4fb 100%);
  color: #1d3146;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.feature-menu-group-toggle::before {
  content: none !important;
  display: none !important;
}

.feature-menu-group-toggle-label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  flex: 1 1 auto;
  font-weight: inherit;
  letter-spacing: inherit;
}

.feature-menu-group.is-active .feature-menu-group-toggle,
.feature-menu-group-toggle.active {
  color: var(--accent-color, #f0821d);
}

.feature-menu-group.is-active .feature-menu-group-toggle {
  border-color: rgba(240, 130, 29, 0.5);
  background: linear-gradient(180deg, #fff8ee 0%, #ffe9cb 100%);
  box-shadow: 0 8px 18px rgba(240, 130, 29, 0.12);
  text-shadow: 0 0 0.01px currentColor;
  border-left: 4px solid var(--accent-color, #f0821d);
  padding-left: 0.62rem;
}

.feature-menu-group-toggle-icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 1rem;
  background-color: currentColor;
  opacity: 0.9;
  -webkit-mask: var(--feature-menu-group-icon) center / contain no-repeat;
  mask: var(--feature-menu-group-icon) center / contain no-repeat;
}

.feature-menu-group-toggle::after {
  content: "⌄";
  position: absolute;
  right: 0.9rem;
  top: 50%;
  width: 0.9rem;
  height: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  transform: translateY(-52%);
  transition: transform 0.18s ease;
  opacity: 0.95;
}

.feature-menu-group.is-collapsed .feature-menu-group-toggle::after {
  transform: translateY(-52%) rotate(180deg);
}

.feature-menu-group[data-menu-group="profile"] .feature-menu-group-toggle {
  --feature-menu-group-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 12a5 5 0 1 0-5-5 5 5 0 0 0 5 5Zm0 2c-4.42 0-8 2.69-8 6v2h16v-2c0-3.31-3.58-6-8-6Z'/%3E%3C/svg%3E");
}

.feature-menu-group[data-menu-group="resources"] .feature-menu-group-toggle {
  --feature-menu-group-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 5h18v2H3V5Zm0 6h18v2H3v-2Zm0 6h18v2H3v-2ZM6 4h2v4H6V4Zm10 6h2v4h-2v-4Zm-4 6h2v4h-2v-4Z'/%3E%3C/svg%3E");
}

.feature-menu-group[data-menu-group="timesheet"] .feature-menu-group-toggle {
  --feature-menu-group-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 2h2v2h6V2h2v2h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2V2Zm12 8H5v10h14V10Zm-9.8 6.8 1.4 1.4 4.8-4.8-1.4-1.4-3.4 3.4-1.4-1.4-1.4 1.4Z'/%3E%3C/svg%3E");
}

.feature-menu-group[data-menu-group="lifecycle"] .feature-menu-group-toggle {
  --feature-menu-group-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 3a9 9 0 0 0-9 9h2a7 7 0 1 1 2.05 4.95L5 14H1v8h2v-4.42A9 9 0 1 0 12 3Zm1 4h-2v5.17l4.1 2.46 1-1.72-3.1-1.86V7Z'/%3E%3C/svg%3E");
}

.feature-menu-group[data-menu-group="analytics"] .feature-menu-group-toggle {
  --feature-menu-group-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 3h2v16h16v2H3V3Zm4 10h3v4H7v-4Zm5-6h3v10h-3V7Zm5 3h3v7h-3v-7Z'/%3E%3C/svg%3E");
}

.feature-menu-group[data-menu-group="organization"] .feature-menu-group-toggle {
  --feature-menu-group-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 4h18v4H3V4Zm0 6h8v10H3V10Zm10 0h8v10h-8V10ZM6 7h2V5H6v2Zm10 0h2V5h-2v2ZM6 13h2v2H6v-2Zm10 0h2v2h-2v-2Z'/%3E%3C/svg%3E");
}

.feature-menu-group[data-menu-group="communications"] .feature-menu-group-toggle {
  --feature-menu-group-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 4h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H8l-4 4V6a2 2 0 0 1 2-2Zm2 4v2h12V8H6Zm0 4v2h8v-2H6Z'/%3E%3C/svg%3E");
}

.feature-menu-group[data-menu-group="payroll"] .feature-menu-group-toggle {
  --feature-menu-group-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6 3h9l5 5v11a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2Zm8 1.5V9h4.5L14 4.5ZM8 12h8v1.5H8V12Zm0 3h8v1.5H8V15Zm0-6h4v1.5H8V9Z'/%3E%3C/svg%3E");
}

.feature-menu-group[data-menu-group="support"] .feature-menu-group-toggle {
  --feature-menu-group-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 4h16a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-7l-5 4v-4H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Zm2 4v2h12V8H6Zm0 4v2h8v-2H6Z'/%3E%3C/svg%3E");
}

.feature-menu-group[data-menu-group="system"] .feature-menu-group-toggle {
  --feature-menu-group-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='m19.14 12.94.03-.94-.03-.94 2.03-1.58a.5.5 0 0 0 .12-.64l-1.92-3.32a.5.5 0 0 0-.6-.22l-2.39.96a7.5 7.5 0 0 0-1.62-.94l-.36-2.54a.5.5 0 0 0-.5-.42h-3.84a.5.5 0 0 0-.5.42l-.36 2.54c-.57.23-1.11.55-1.62.94l-2.39-.96a.5.5 0 0 0-.6.22L2.7 8.84a.5.5 0 0 0 .12.64l2.03 1.58-.03.94.03.94L2.82 14.52a.5.5 0 0 0-.12.64l1.92 3.32c.13.23.4.32.64.22l2.35-.94c.5.39 1.05.71 1.65.95l.36 2.51c.04.24.25.42.5.42h3.84a.5.5 0 0 0 .5-.42l.36-2.51c.6-.24 1.15-.56 1.65-.95l2.35.94c.24.1.51.01.64-.22l1.92-3.32a.5.5 0 0 0-.12-.64l-2.03-1.58ZM12 15.5A3.5 3.5 0 1 1 12 8a3.5 3.5 0 0 1 0 7.5Z'/%3E%3C/svg%3E");
}

.feature-menu-group-toggle::after {
  content: none !important;
  display: none !important;
}

.feature-menu-group-toggle-chevron {
  margin-left: auto;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  font-size: 1.15rem;
  line-height: 1;
  font-weight: 900;
  opacity: 0.98;
  transition: transform 0.18s ease;
}

.feature-menu-group.is-collapsed .feature-menu-group-toggle-chevron {
  transform: rotate(180deg);
}

.feature-menu-group-items {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.2rem 0 0 0.85rem;
  margin-left: 0.3rem;
  border-left: 2px solid rgba(227, 233, 240, 0.95);
}

.feature-menu-group-items .feature-menu-btn {
  justify-content: flex-start;
  padding: 0.56rem 0.72rem 0.56rem 0.78rem;
  font-size: 0.76rem;
  font-weight: 500;
  color: #4b6178;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
}

.feature-menu-group.is-active .feature-menu-group-items {
  border-left-color: rgba(240, 130, 29, 0.5);
}

.feature-menu-group.is-active .feature-menu-group-items .feature-menu-btn {
  font-weight: 600;
  color: #30455c;
  opacity: 0.98;
}

.feature-menu-inline-icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
  opacity: 0.9;
}

.feature-menu-inline-icon svg {
  width: 1rem;
  height: 1rem;
  display: block;
  fill: currentColor;
}

.feature-menu-group.is-collapsed .feature-menu-group-items {
  display: none;
}

.feature-menu-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  border: 1px solid #e3e9f0;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  color: #284057;
  border-radius: 11px;
  padding: 0.68rem 0.8rem;
  text-align: left;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.menu-notification-badge {
  min-width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffb347 0%, #ff7a00 100%);
  color: #fff6eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
  font-weight: 800;
  padding: 0 0.26rem;
  line-height: 1;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 18px rgba(255, 122, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

body.theme-dark .menu-notification-badge {
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
  color: #10151d;
  box-shadow: 0 8px 18px rgba(245, 158, 11, 0.22);
  border-color: rgba(255, 255, 255, 0.08);
}

.feature-menu-btn:hover {
  border-color: rgba(235, 124, 5, 0.36);
  transform: translateY(-1px);
}

.feature-menu-btn.active {
  border-color: rgba(235, 124, 5, 0.58);
  background: linear-gradient(180deg, #fff6ea 0%, #fff1de 100%);
  color: #8a4500;
  box-shadow: 0 10px 18px rgba(235, 124, 5, 0.14);
}

.archive-body {
  padding: 0.9rem;
}

.archive-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.archive-empty {
  padding: 1rem;
  border: 1px dashed var(--border-color);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.875rem;
  background-color: #fafafa;
}

.archive-item {
  border: 1px solid #e5ebf1;
  border-radius: 14px;
  padding: 0.8rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.archive-item-title {
  font-weight: 600;
  color: #22364a;
  margin-bottom: 0.25rem;
  font-size: 0.92rem;
}

.archive-item-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.archive-item-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.archive-item-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.archive-item:hover {
  transform: translateY(-1px);
  border-color: rgba(235, 124, 5, 0.28);
  box-shadow: 0 10px 18px rgba(36, 52, 70, 0.06);
}

.archive-panel .card.sticky {
  top: 1.35rem;
}

.report-card {
  min-height: 100%;
}

.report-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
}

.report-header p {
  margin-top: 0.25rem;
  color: var(--text-muted);
  max-width: 640px;
}

.report-header-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.candidates-view-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem;
  border: 1px solid #dde6f0;
  border-radius: 999px;
  background: #f8fbff;
}

.candidates-view-btn {
  border-radius: 999px;
}

.candidates-view-btn.active {
  border-color: rgba(235, 124, 5, 0.58);
  background: linear-gradient(180deg, #fff6ea 0%, #fff1de 100%);
  color: #8a4500;
}

.report-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.coach-chat-messages {
  min-height: 340px;
  max-height: 56vh;
  border: 1px solid #e4eaf0;
  border-radius: 14px;
  background: #fcfdff;
}

.coach-chat-input {
  border: 1px solid #e4eaf0;
  border-radius: 14px;
  background: #ffffff;
}

.report-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.report-metric {
  padding: 1rem 1.1rem;
  border: 1px solid #e4eaf0;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff8ef 0%, #ffffff 100%);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.report-metric-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.report-metric-value {
  font-size: 1.15rem;
  color: #203246;
}

.report-section {
  border: 1px solid #e4eaf0;
  border-radius: 16px;
  padding: 1.1rem;
  background: #fcfdff;
}

/* Flatten delle sezioni di primo livello dentro una card report: la .card ? gi?
   l'unico contenitore, quindi la sezione non ridisegna bordo/sfondo/ombra
   annidati (niente "doppia cornice"). Resta un blocco a tutta larghezza con
   l'inset uniforme del card-body; più sezioni si separano con un divisore.
   Il :not() preserva eventuali sotto-sezioni annidate (sotto-card) col loro frame.
   NB: oltre a border/background serve box-shadow:none — l'ombra ereditata dal
   layer di tema globale (.report-section { box-shadow: var(--shadow-soft) })
   è proprio la "cornice fantasma" che altrimenti resta visibile. */
.report-body .report-section:not(.report-section .report-section) {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.report-body .report-section:not(.report-section .report-section) + .report-section {
  border-top: 1px solid var(--border-color);
  padding-top: 1.25rem;
}

/* Dark: il "Cards and panels" layer (~riga 15187) riapplica border + box-shadow
   a .report-section con !important, quindi qui serve un override più specifico e
   altrettanto !important per mantenere la sezione piatta anche in tema scuro. */
body.theme-dark .report-body .report-section:not(.report-section .report-section) {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.theme-dark .report-body .report-section:not(.report-section .report-section) + .report-section {
  border-top: 1px solid var(--border) !important;
}

.report-section-heading h3 {
  font-size: 1rem;
  color: #203246;
}

.report-section-heading p {
  margin-top: 0.25rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.report-cv-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.report-cv-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.95rem 1rem;
  border: 1px solid #e5ebf1;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.report-cv-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.report-cv-title {
  font-weight: 600;
  color: #22364a;
}

.report-cv-main {
  min-width: 0;
}

.report-cv-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.profile-match-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(10, 110, 209, 0.25);
  background: rgba(10, 110, 209, 0.08);
  color: #0a4f95;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.report-cv-meta {
  margin-top: 0.2rem;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.recruiting-pipeline {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(5, minmax(220px, 1fr));
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.recruiting-column {
  border: 1px solid #e4eaf0;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  min-height: 320px;
  display: flex;
  flex-direction: column;
}

.recruiting-column[data-recruiting-stage="nuovi"] {
  border-color: #cfe5ff;
  background: linear-gradient(180deg, #f5faff 0%, #eef6ff 100%);
}

.recruiting-column[data-recruiting-stage="nuovi"] .recruiting-column-header {
  background: rgba(58, 122, 254, 0.08);
}

.recruiting-column[data-recruiting-stage="in_valutazione"] {
  border-color: #ffe2b8;
  background: linear-gradient(180deg, #fffaf2 0%, #fff4e5 100%);
}

.recruiting-column[data-recruiting-stage="in_valutazione"] .recruiting-column-header {
  background: rgba(243, 156, 18, 0.12);
}

.recruiting-column[data-recruiting-stage="in_colloquio"] {
  border-color: #d7c8ff;
  background: linear-gradient(180deg, #f9f5ff 0%, #f1e9ff 100%);
}

.recruiting-column[data-recruiting-stage="in_colloquio"] .recruiting-column-header {
  background: rgba(123, 63, 228, 0.12);
}

.recruiting-column[data-recruiting-stage="assunto"] {
  border-color: #cbeed8;
  background: linear-gradient(180deg, #f3fcf7 0%, #eaf8f1 100%);
}

.recruiting-column[data-recruiting-stage="assunto"] .recruiting-column-header {
  background: rgba(39, 174, 96, 0.12);
}

.recruiting-column[data-recruiting-stage="scartato"] {
  border-color: #f3cccc;
  background: linear-gradient(180deg, #fff6f6 0%, #ffeded 100%);
}

.recruiting-column[data-recruiting-stage="scartato"] .recruiting-column-header {
  background: rgba(192, 57, 43, 0.11);
}

.recruiting-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 0.75rem 0.55rem;
  border-bottom: 1px solid #e7edf3;
}

.recruiting-column-header h3 {
  font-size: 0.86rem;
  color: #22364a;
}

.recruiting-column-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  border: 1px solid rgba(235, 124, 5, 0.35);
  color: #8a4500;
  background: #fff3e1;
  font-size: 0.72rem;
  font-weight: 700;
}

.recruiting-column-body {
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 260px;
}

.recruiting-card {
  border: 1px solid #dfe7ef;
  border-radius: 12px;
  background: #ffffff;
  padding: 0.65rem;
  cursor: grab;
  box-shadow: 0 4px 8px rgba(32, 50, 70, 0.05);
}

.recruiting-card:active {
  cursor: grabbing;
}

.recruiting-card-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #203246;
}

.recruiting-card-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.45rem;
}

.recruiting-card-title {
  flex: 1;
  min-width: 0;
}

.recruiting-card-header-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.recruiting-card-open-btn {
  padding: 0.18rem 0.4rem;
  font-size: 0.66rem;
  line-height: 1.25;
  white-space: nowrap;
}

.recruiting-card-meta {
  margin-top: 0.25rem;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.recruiting-card-role {
  margin-top: 0.35rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: #35506a;
}

.onboarding-shell {
  display: grid;
  grid-template-columns: minmax(240px, 0.75fr) minmax(0, 2fr);
  gap: 1rem;
}

.onboarding-list-panel {
  border: 1px solid #e4edf6;
  border-radius: 12px;
  background: #fcfeff;
  padding: 0.8rem;
  align-self: start;
  position: sticky;
  top: 0.4rem;
}

.onboarding-list-header {
  font-size: 0.85rem;
  font-weight: 700;
  color: #2d4b65;
  margin-bottom: 0.55rem;
}

.onboarding-list {
  display: grid;
  gap: 0.45rem;
  max-height: 68vh;
  overflow: auto;
  padding-right: 0.2rem;
}

.offboarding-add-employee {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.62rem;
  padding: 0.45rem;
  border: 1px solid #deebf6;
  border-radius: 10px;
  background: #f7fbff;
}

.offboarding-add-employee .btn {
  justify-content: center;
}

.offboarding-header-actions {
  margin-top: 0.5rem;
  display: flex;
  justify-content: flex-end;
}

.onboarding-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
  gap: 1rem;
}

.onboarding-main {
  display: grid;
  gap: 0.8rem;
}

.onboarding-list-item {
  width: 100%;
  border: 1px solid #d9e5f1;
  border-radius: 10px;
  background: #f7fbff;
  color: #234761;
  padding: 0.55rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
  align-items: center;
  text-align: left;
}

.onboarding-list-item-main {
  min-width: 0;
}

.onboarding-list-item-name {
  color: #234761;
  font-weight: 700;
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.onboarding-list-item-meta {
  margin-top: 0.18rem;
  color: #5e7790;
  font-size: 0.74rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.onboarding-list-item-side {
  display: grid;
  justify-items: end;
  gap: 0.16rem;
}

.onboarding-list-item-percent {
  color: #8f4b00;
  font-size: 0.76rem;
  font-weight: 700;
}

.onboarding-list-item-status {
  color: #6b7f94;
  font-size: 0.7rem;
  font-weight: 600;
}

.onboarding-list-item.active {
  border-color: #eb7c05;
  background: #fff2e0;
}

.onboarding-card {
  border: 1px solid #e4edf6;
  border-radius: 12px;
  background: #fcfeff;
  padding: 0.8rem;
}

.onboarding-header-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.onboarding-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  border: 1px solid #e7c66f;
  background: #fff7de;
  color: #8f5a00;
  padding: 0.2rem 0.58rem;
  font-size: 0.76rem;
  font-weight: 700;
}

.onboarding-progress-track {
  margin-top: 0.5rem;
  height: 10px;
  border-radius: 999px;
  background: #eaf1f7;
  overflow: hidden;
}

.onboarding-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #eb7c05 0%, #f2aa54 100%);
}

.onboarding-progress-label {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: #4d667d;
}

.cv-import-progress-dialog {
  max-width: 520px;
}

.cv-import-spinner-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 0.9rem;
}

.cv-import-spinner {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 4px solid rgba(235, 124, 5, 0.16);
  border-top-color: #eb7c05;
  animation: cv-import-spin 0.9s linear infinite;
}

@keyframes cv-import-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.cv-import-progress-file-name {
  margin-bottom: 0.6rem;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  background: rgba(235, 124, 5, 0.08);
  border: 1px solid rgba(235, 124, 5, 0.18);
  color: #6b3d08;
  font-size: 0.82rem;
  font-weight: 700;
  word-break: break-word;
}

.cv-import-progress-status {
  margin-top: 0.35rem;
  text-align: center;
  font-size: 0.82rem;
  color: #5e7388;
}

.onboarding-section {
  border: 1px solid #e4edf6;
  border-radius: 10px;
  background: #ffffff;
  margin-top: 0.55rem;
}

.onboarding-section > summary {
  cursor: pointer;
  padding: 0.58rem 0.68rem;
  font-weight: 700;
  color: #2a4a64;
}

.onboarding-checklist {
  padding: 0 0.68rem 0.65rem;
  display: grid;
  gap: 0.45rem;
}

.onboarding-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: center;
}

.onboarding-item-label {
  font-size: 0.82rem;
  color: #2d4b65;
}

.workflow-select {
  min-width: 156px;
  height: 36px;
  padding: 0.4rem 2rem 0.4rem 0.7rem;
  border: 1px solid #d5e3f1;
  border-radius: 10px;
  background-color: #f7fbff;
  color: #244760;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #557a9b 50%),
    linear-gradient(135deg, #557a9b 50%, transparent 50%),
    linear-gradient(to right, #dce9f5, #dce9f5);
  background-position:
    calc(100% - 15px) calc(50% - 3px),
    calc(100% - 10px) calc(50% - 3px),
    calc(100% - 2.1rem) 50%;
  background-size: 5px 5px, 5px 5px, 1px 60%;
  background-repeat: no-repeat;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.workflow-select:hover:not(:disabled) {
  border-color: #9fc0df;
  background-color: #ffffff;
}

.workflow-select:focus {
  outline: none;
  border-color: #5c9dd6;
  box-shadow: 0 0 0 3px rgba(10, 110, 209, 0.16);
  background-color: #ffffff;
}

.workflow-select:disabled {
  cursor: not-allowed;
  opacity: 0.75;
}

.onboarding-sidebar {
  display: grid;
  gap: 0.7rem;
}

.onboarding-alert-list {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.onboarding-alert {
  border: 1px solid #f5d6a0;
  background: #fff7e8;
  border-radius: 8px;
  padding: 0.4rem 0.5rem;
  color: #8c5b12;
  font-size: 0.78rem;
}

.global-seats-banner {
  width: 100%;
  border-bottom: 1px solid #f0c36d;
  background: #fff4d6;
  padding: 0.65rem 1rem;
  color: #8c5b12;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.4;
}

.global-seats-banner[hidden] {
  display: none;
}

@media (max-width: 1100px) {
  .onboarding-shell {
    grid-template-columns: 1fr;
  }

  .onboarding-list-panel {
    position: static;
  }

  .onboarding-layout {
    grid-template-columns: 1fr;
  }

  .onboarding-header-grid {
    grid-template-columns: 1fr;
  }
}

.hr-visual-hub {
  margin-top: 1rem;
}

.hr-generated-insights {
  margin-top: 1rem;
}

.hr-view-btn {
  border: 1px solid #d8e2ec;
  border-radius: 999px;
  background: #fff;
  color: #35506a;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.34rem 0.68rem;
  cursor: pointer;
  transition: all 0.18s ease;
}

.hr-view-btn:hover {
  border-color: rgba(10, 110, 209, 0.4);
}

.hr-view-btn.active {
  border-color: rgba(10, 110, 209, 0.58);
  background: #eaf4ff;
  color: #0a4f95;
}

/* Selettore Area (Analisi HR per team/area) */
.hr-area-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.2rem 0 1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid #e4ecf4;
}

.hr-area-tab {
  border: 1px solid #d8e2ec;
  border-radius: 999px;
  background: #fff;
  color: #35506a;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.36rem 0.8rem;
  cursor: pointer;
  transition: all 0.18s ease;
}

.hr-area-tab:hover {
  border-color: rgba(10, 110, 209, 0.4);
}

.hr-area-tab.active {
  border-color: rgba(10, 110, 209, 0.58);
  background: #0a6ed1;
  color: #fff;
}

/* Card Overview per Area (cliccabile) */
.hr-area-overview-card {
  text-align: left;
  cursor: pointer;
  border: 1px solid #e1e9f1;
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.hr-area-overview-card:hover {
  border-color: rgba(10, 110, 209, 0.45);
  box-shadow: 0 6px 18px rgba(18, 29, 41, 0.1);
  transform: translateY(-2px);
}

.hr-area-metrics {
  display: flex;
  gap: 1.4rem;
  margin-top: 0.6rem;
}

.hr-area-stale-badge {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: #fef0e1;
  color: #a85d00;
  font-size: 0.7rem;
  font-weight: 700;
}

.hr-area-open {
  display: block;
  margin-top: 0.7rem;
  color: #0a6ed1;
  font-size: 0.76rem;
  font-weight: 700;
}

.hr-risk-badge.muted { color: #7088a0; }

.hr-zoom-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  background: rgba(18, 29, 41, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.hr-zoom-dialog {
  width: min(1100px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow: hidden;
  background: #fff;
  border: 1px solid #d9e2ec;
  border-radius: 16px;
  box-shadow: 0 24px 42px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
}

.hr-zoom-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #e2eaf2;
  background: #f8fbff;
}

.hr-zoom-header h3 {
  color: #1f3a53;
  font-size: 1rem;
}

.hr-zoom-body {
  padding: 1rem;
  overflow: auto;
}

.hr-zoom-body .hr-card {
  width: 100%;
  margin: 0;
  min-width: 860px;
}

.dossier-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1rem;
}

.dossier-nav {
  border: 1px solid #e2eaf2;
  border-radius: 14px;
  background: #fbfdff;
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  height: fit-content;
}

.dossier-nav-btn {
  border: 1px solid #dde6ef;
  border-radius: 10px;
  background: #fff;
  color: #2f4a62;
  text-align: left;
  padding: 0.56rem 0.68rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.dossier-nav-btn.active {
  border-color: rgba(10, 110, 209, 0.55);
  background: #eaf4ff;
  color: #0a4f95;
}

.dossier-content {
  border: 1px solid #e2eaf2;
  border-radius: 14px;
  background: #fff;
  padding: 1rem;
  min-height: 420px;
}

.dossier-identity {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid #e8eef4;
}

.dossier-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #d9e7f5;
  box-shadow: 0 6px 14px rgba(26, 58, 88, 0.12);
}

.dossier-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #0a6ed1 0%, #5ba6f0 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.dossier-employee-title {
  font-size: 1.05rem;
  color: #1f3a53;
  margin-bottom: 0.2rem;
}

.dossier-employee-meta {
  color: #5b7288;
  font-size: 0.82rem;
  margin-bottom: 0.85rem;
}

.dossier-section-title {
  font-size: 0.85rem;
  color: #2c4a63;
  text-transform: uppercase;
  margin: 0.7rem 0 0.35rem;
}

.dossier-list {
  margin: 0;
  padding-left: 1rem;
  color: #334f67;
  font-size: 0.83rem;
}

.dossier-list li {
  margin-bottom: 0.3rem;
}

.dossier-item-card {
  border: 1px solid #e4ebf2;
  border-radius: 11px;
  background: #fcfeff;
  padding: 0.7rem 0.75rem;
  margin-bottom: 0.55rem;
}

.dossier-item-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: #25425c;
}

.dossier-item-subtitle {
  font-size: 0.77rem;
  color: #60778d;
  margin-top: 0.2rem;
}

.dossier-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.dossier-kpi {
  border: 1px solid #e4ebf2;
  border-radius: 10px;
  padding: 0.55rem 0.6rem;
  background: #fafdff;
}

.dossier-kpi span {
  display: block;
  font-size: 0.7rem;
  color: #5a7086;
  text-transform: uppercase;
}

.dossier-kpi strong {
  display: block;
  margin-top: 0.15rem;
  color: #203c55;
  font-size: 0.88rem;
}

.dossier-insight-actions {
  margin: 0.35rem 0 0.75rem;
  display: flex;
  justify-content: flex-start;
}

.insight-stale-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0.5rem 0 0.75rem;
  padding: 0.6rem 0.875rem;
  background: #fffbeb;
  border: 1px solid var(--warning);
  border-radius: 8px;
  color: #92400e;
  font-size: var(--text-sm);
  line-height: 1.5;
}

.insight-stale-banner::before {
  content: '⚠';
  flex-shrink: 0;
  font-size: 1rem;
}

.candidate-comments-section {
  margin-top: 1rem;
  border-top: 1px solid #e8eef4;
  padding-top: 0.8rem;
}

.candidate-comment-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.candidate-interview-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.candidate-comment-form textarea {
  width: 100%;
  border: 1px solid #d7e2ee;
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  resize: vertical;
  font-size: 0.82rem;
  color: #27445d;
  background: #ffffff;
}

.candidate-comments-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.candidate-comment-item {
  border: 1px solid #e4ebf2;
  border-radius: 10px;
  background: #fcfeff;
  padding: 0.6rem 0.7rem;
}

.candidate-comment-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  font-size: 0.75rem;
  color: #62798f;
}

.candidate-comment-meta strong {
  color: #2a465f;
  font-size: 0.78rem;
}

.candidate-comment-text {
  margin-top: 0.3rem;
  color: #2f4c65;
  font-size: 0.82rem;
  white-space: pre-wrap;
}

.candidate-comment-actions {
  margin-top: 0.45rem;
  display: flex;
  justify-content: flex-end;
}

.communications-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.payroll-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.2fr);
  gap: 1rem;
  align-items: start;
}

.communications-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.95rem 1rem;
}

.communications-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin: 0.95rem 0 0.85rem;
}

.communications-filter-bar .btn.is-active {
  border-color: rgba(235, 124, 5, 0.45);
  background: rgba(235, 124, 5, 0.12);
  color: #8a4b00;
  box-shadow: 0 10px 22px rgba(235, 124, 5, 0.1);
}

.communications-inbox-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.15fr);
  gap: 1rem;
  align-items: start;
}

.communications-detail {
  min-width: 0;
}

.communications-recipient-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.communications-recipient-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.communications-recipient-list {
  display: grid;
  gap: 0.65rem;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.communications-recipient-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  padding: 0.8rem 0.9rem;
  border: 1px solid #e4ebf2;
  border-radius: 12px;
  background: #fcfeff;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.communications-recipient-item.is-selected {
  border-color: rgba(235, 124, 5, 0.55);
  background: rgba(235, 124, 5, 0.08);
  box-shadow: 0 8px 18px rgba(235, 124, 5, 0.1);
}

.communications-recipient-copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.communications-recipient-copy strong {
  color: #2a465f;
}

.communications-recipient-copy span {
  color: #62798f;
  font-size: 0.9rem;
  word-break: break-word;
}

.communications-list .support-request-item.is-unread {
  border-color: rgba(235, 124, 5, 0.4);
  box-shadow: 0 10px 22px rgba(235, 124, 5, 0.08);
}

.dossier-skill-bars {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.48rem;
}

.dossier-skill-bar-row {
  display: grid;
  grid-template-columns: 110px 1fr 42px;
  align-items: center;
  gap: 0.55rem;
}

.dossier-skill-bar-row span {
  font-size: 0.75rem;
  color: #334f67;
}

.dossier-skill-bar-row strong {
  font-size: 0.74rem;
  color: #203c55;
  text-align: right;
}

.dossier-skill-bar-track {
  height: 8px;
  border-radius: 999px;
  background: #e8eff6;
  overflow: hidden;
}

.dossier-skill-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0a6ed1 0%, #5ca9ff 100%);
  border-radius: 999px;
}

@media (max-width: 900px) {
  .dossier-layout {
    grid-template-columns: 1fr;
  }

  .candidate-interview-form-grid {
    grid-template-columns: 1fr;
  }

  .dossier-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .dossier-grid {
    grid-template-columns: 1fr;
  }
}

.hr-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.hr-card {
  border: 1px solid #e2eaf2;
  border-radius: 14px;
  background: #fff;
  padding: 0.9rem;
}

.hr-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.hr-card-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.hr-chart-zoom-btn {
  padding: 0.18rem 0.52rem;
  font-size: 0.68rem;
}

.hr-card-header h4 {
  color: #1f3a53;
  font-size: 0.92rem;
}

.hr-card-badge {
  display: inline-flex;
  padding: 0.16rem 0.48rem;
  border-radius: 999px;
  border: 1px solid rgba(10, 110, 209, 0.25);
  background: rgba(10, 110, 209, 0.08);
  color: #0a4f95;
  font-size: 0.66rem;
  font-weight: 700;
}

.hr-card-badge.is-warning {
  border-color: rgba(217, 119, 6, 0.25);
  background: rgba(217, 119, 6, 0.10);
  color: #9a5a03;
}

.hr-card-badge.is-success {
  border-color: rgba(22, 163, 74, 0.25);
  background: rgba(22, 163, 74, 0.10);
  color: #0f6b35;
}

.hr-card-badge.is-danger {
  border-color: rgba(220, 38, 38, 0.25);
  background: rgba(220, 38, 38, 0.10);
  color: #a31d1d;
}

.hr-matrix {
  overflow-x: auto;
  padding-bottom: 0.2rem;
}

.hr-matrix-header,
.hr-matrix-row {
  display: grid;
  grid-template-columns: 180px repeat(6, 70px);
  gap: 0.35rem;
  align-items: center;
  width: max-content;
  min-width: 100%;
}

.hr-matrix-header {
  font-size: 0.68rem;
  font-weight: 700;
  color: #405a72;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.hr-matrix-row {
  margin-bottom: 0.35rem;
}

.hr-matrix-name {
  font-size: 0.74rem;
  color: #2d4760;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hr-matrix-cell {
  width: 70px;
  min-height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid rgba(31, 58, 83, 0.1);
}

.hr-matrix-cell.level-1 { background: #ffe9e8; color: #9a2b22; }
.hr-matrix-cell.level-2 { background: #fff3e0; color: #995a02; }
.hr-matrix-cell.level-3 { background: #fff9d6; color: #7a6700; }
.hr-matrix-cell.level-4 { background: #e8f8ea; color: #1b6f34; }
.hr-matrix-cell.level-5 { background: #dff0ff; color: #0b4f91; }

.hr-radar-layout {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(140px, 0.8fr);
  gap: 0.8rem;
}

.hr-radar-box {
  border: 1px dashed #d6e1eb;
  border-radius: 12px;
  background: #fbfeff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
}

.hr-radar-svg {
  width: 100%;
  max-width: 220px;
  height: auto;
}

.hr-radar-ring {
  fill: none;
  stroke: #d9e6f2;
  stroke-width: 1;
}

.hr-radar-axis {
  stroke: #d6e2ee;
  stroke-width: 1;
}

.hr-radar-polygon {
  fill: rgba(10, 110, 209, 0.24);
  stroke: #0a6ed1;
  stroke-width: 2;
}

.hr-radar-card.technical .hr-radar-box {
  background: linear-gradient(180deg, #f7fbff 0%, #eef6ff 100%);
  border-color: #c7dbf1;
}

.hr-radar-card.technical .hr-card-badge {
  background: #e7f2ff;
  color: #0d4f8f;
  border-color: #b8d5f3;
}

.hr-radar-polygon.technical {
  fill: rgba(10, 110, 209, 0.24);
  stroke: #0a6ed1;
}

.hr-radar-card.soft .hr-radar-box {
  background: linear-gradient(180deg, #fff8f2 0%, #fff1e4 100%);
  border-color: #f0d7bf;
}

.hr-radar-card.soft .hr-card-badge {
  background: #fff1e2;
  color: #8a4c0c;
  border-color: #f1cfa9;
}

.hr-radar-polygon.soft {
  fill: rgba(235, 124, 5, 0.24);
  stroke: #eb7c05;
  stroke-dasharray: 4 2;
}

.hr-radar-label {
  font-size: 7px;
  font-weight: 700;
  fill: #46617a;
}

.hr-radar-kpi {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.hr-radar-legend {
  margin: 0;
  padding: 0.45rem 0.55rem;
  list-style: none;
  border: 1px solid #e4ebf2;
  border-radius: 10px;
  background: #fbfdff;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.22rem;
}

.hr-radar-legend li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.7rem;
  color: #3e5a73;
}

.hr-radar-legend strong {
  color: #1f3e57;
  font-size: 0.72rem;
}

.hr-kpi {
  border: 1px solid #e4ebf2;
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  background: #fcfeff;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.hr-kpi span {
  font-size: 0.68rem;
  text-transform: uppercase;
  color: #587088;
  font-weight: 700;
}

.hr-kpi strong {
  font-size: 0.85rem;
  color: #253f57;
}

.hr-risk-badge.ok { color: #107e3e; }
.hr-risk-badge.warn { color: #a85d00; }
.hr-risk-badge.risk { color: #bb0000; }

.hr-insights-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.hr-insights-grid h5 {
  font-size: 0.74rem;
  text-transform: uppercase;
  color: #4a637a;
  margin-bottom: 0.25rem;
}

.hr-insight-list {
  margin: 0;
  padding-left: 1rem;
  font-size: 0.76rem;
  color: #1f4f35;
}

.hr-insight-list.gap {
  color: #8f3d2f;
}

.hr-insight-list li {
  margin-bottom: 0.18rem;
}

.hr-timeline {
  margin-top: 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.hr-timeline-step {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.5rem;
  border: 1px solid #e1e9f1;
  border-radius: 999px;
  font-size: 0.7rem;
  color: #5c7389;
  background: #f9fbfe;
}

.hr-timeline-step span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e6edf5;
  color: #38516a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
}

.hr-timeline-step.active {
  border-color: rgba(16, 126, 62, 0.3);
  background: #eefaf2;
  color: #1d6940;
}

.hr-timeline-step.active span {
  background: #caeeda;
  color: #125d33;
}

.hr-timeline-explainer {
  margin-top: 0.55rem;
  font-size: 0.75rem;
  color: #4a637a;
  line-height: 1.45;
}

.employee-profile-card {
  margin-top: 0.75rem;
  border: 1px solid #e6ecf2;
  border-radius: 12px;
  background: #ffffff;
  padding: 0.75rem;
}

.employee-profile-card.compact {
  margin-top: 0.6rem;
  padding: 0.65rem;
}

.employee-profile-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
}

.employee-profile-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #d9e7f5;
  flex-shrink: 0;
}

.employee-profile-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #0a6ed1 0%, #5ba6f0 100%);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.employee-profile-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #234159;
}

.employee-profile-summary {
  margin-top: 0.45rem;
  font-size: 0.78rem;
  color: #324b63;
}

.employee-profile-summary-empty {
  color: var(--text-muted);
}

.employee-profile-badges {
  margin-top: 0.35rem;
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.employee-profile-badges--report {
  margin: 0.35rem 0 0.8rem;
}

.my-team-member-badges {
  margin-top: 0.2rem;
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.employee-profile-grid {
  margin-top: 0.55rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.employee-profile-section h4 {
  font-size: 0.72rem;
  color: #32516b;
  margin-bottom: 0.28rem;
  text-transform: uppercase;
}

.employee-profile-section ul {
  margin: 0;
  padding-left: 1rem;
  font-size: 0.75rem;
  color: #334f67;
}

.employee-profile-section li {
  margin-bottom: 0.18rem;
}

.employee-profile-list-empty {
  color: var(--text-muted);
}

.employee-profile-card.compact .employee-profile-grid {
  grid-template-columns: 1fr;
}

.archive-chat-toggle {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #eb7c05 0%, #f4a340 100%);
  color: white;
  box-shadow: 0 12px 24px rgba(235, 124, 5, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1200;
}

.archive-chat-toggle:hover {
  transform: translateY(-1px);
}

.archive-chat-panel {
  position: fixed;
  right: 1.5rem;
  bottom: 5.9rem;
  width: min(380px, calc(100vw - 2rem));
  height: 520px;
  background-color: var(--card-background);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.16);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1200;
}

.archive-chat-panel.expanded {
  width: min(760px, calc(100vw - 2rem));
  height: min(82vh, 860px);
  bottom: 1.5rem;
}

.archive-chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.78rem 0.95rem 0.72rem;
  background: linear-gradient(180deg, #fff0de 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border-color);
}

.archive-chat-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.archive-chat-header-main {
  min-width: 0;
}

.archive-chat-header h3 {
  color: var(--primary-color);
  font-size: 1rem;
  line-height: 1.2;
}

.archive-chat-header p {
  margin-top: 0.1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.archive-chat-close-btn {
  min-width: 34px;
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  line-height: 1;
}

.archive-chat-expand-btn {
  min-width: 34px;
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
}

.archive-chat-reset-btn {
  min-width: 34px;
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
}

.archive-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background-color: #fcfcfc;
}

.archive-chat-message {
  display: inline-block;
  width: fit-content;
  max-width: 92%;
  padding: 0.62rem 0.78rem;
  border-radius: 14px;
  font-size: 0.875rem;
  line-height: 1.35;
  text-align: left;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.archive-chat-provider-badge {
  display: inline-flex;
  margin-bottom: 0.35rem;
  padding: 0.16rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(10, 110, 209, 0.25);
  background: rgba(10, 110, 209, 0.08);
  color: #0a4f95;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.archive-chat-message.user {
  align-self: flex-end;
  background-color: #ebf3fc;
  color: var(--text-color);
}

.archive-chat-message.assistant {
  align-self: flex-start;
  background-color: #fff3e3;
  color: var(--text-color);
}

.archive-chat-message.typing {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.75rem;
}

.archive-chat-typing-label {
  font-size: 0.78rem;
  color: #6a6d70;
}

.archive-chat-typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
}

.archive-chat-typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d17a1f;
  opacity: 0.35;
  animation: chatTypingPulse 1.1s infinite ease-in-out;
}

.archive-chat-typing-dots span:nth-child(2) {
  animation-delay: 0.16s;
}

.archive-chat-typing-dots span:nth-child(3) {
  animation-delay: 0.32s;
}

@keyframes chatTypingPulse {
  0%, 80%, 100% { opacity: 0.35; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}

.archive-chat-input {
  padding: 1rem;
  border-top: 1px solid var(--border-color);
  background-color: white;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.archive-chat-input textarea {
  width: 100%;
  resize: none;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  font: inherit;
}

.archive-chat-input textarea:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(10, 110, 209, 0.1);
}

.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(180deg, #ffffff 0%, #fafbfd 100%);
}

.footer-right {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Tabs */
.tabs {
  display: flex;
  background: linear-gradient(180deg, #fff6ec 0%, #f8fafc 100%);
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
  padding: 0 0.6rem;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1rem 0.82rem;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  border-radius: 12px 12px 0 0;
}

.tab-btn:hover {
  color: var(--primary-color);
  background-color: rgba(53, 74, 95, 0.05);
}

.tab-btn.active {
  color: #203246;
  background-color: white;
  border-bottom-color: var(--primary-color);
  box-shadow: 0 8px 18px rgba(32, 50, 70, 0.06);
}

.tab-btn svg {
  flex-shrink: 0;
}

@media (max-width: 1024px) {
  .tab-btn span {
    display: none;
  }

  .tab-btn {
    padding: 0.75rem;
  }

  .report-header,
  .editor-header-row,
  .report-cv-item {
    flex-direction: column;
    align-items: stretch;
  }

  .report-header-actions {
    justify-content: stretch;
  }

  .editor-header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .preview-header-row {
    flex-direction: column;
    align-items: stretch;
  }

  .preview-header-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .report-cv-actions {
    justify-content: stretch;
  }

  .employee-profile-grid {
    grid-template-columns: 1fr;
  }

  .hr-grid,
  .hr-insights-grid,
  .hr-radar-layout {
    grid-template-columns: 1fr;
  }

  .hr-matrix-header,
  .hr-matrix-row {
    grid-template-columns: 150px repeat(6, 62px);
  }

  .hr-matrix-cell {
    width: 62px;
  }
}

/* Tab Content */
.tab-content {
  padding: 1.25rem;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* Forms */
.form-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.vacation-request-row.full-width {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .vacation-request-row.full-width {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-color);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font-size: 0.875rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  background-color: #fcfdfe;
}

/* Altezza uniforme per combo e selettori data/mese in tutte le pagine: gli input
   date/month renderebbero altrimenti piu alti delle select (controlli nativi). */
.form-group select,
.form-group input[type="date"],
.form-group input[type="month"] {
  height: 40px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(10, 110, 209, 0.1);
}

.ai-translation-panel {
  margin-top: 1.5rem;
  padding: 1.25rem;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff8ef 0%, #ffffff 100%);
}

.ai-translation-header {
  margin-bottom: 1rem;
}

.ai-translation-header h3 {
  color: var(--primary-color);
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.ai-translation-header p{
  color: var(--text-muted);
  font-size: 0.875rem;
}

body.theme-dark .ai-translation-panel,
body.theme-dark .ai-translation-panel {
  border-color: #3b536b;
  background: linear-gradient(180deg, #1a2734 0%, #141f2a 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

body.theme-dark .ai-translation-header h3,
body.theme-dark .ai-translation-header h3 {
  color: #ffd29a;
}

body.theme-dark .ai-translation-header p,
body.theme-dark #aiTargetLanguageLabel,
body.theme-dark .ai-translation-header p,
body.theme-dark #aiTargetLanguageLabel{
  color: #c7d7e8;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* Photo Upload */
.photo-upload {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.photo-preview {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background-color: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px dashed var(--border-color);
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-preview svg {
  color: var(--text-muted);
}

#profilePhotoInput {
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-color);
}

#profilePhotoInput::file-selector-button {
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: #f8fbff;
  color: var(--primary-color);
  cursor: pointer;
  margin-right: 0.6rem;
}

#profilePhotoInput::-webkit-file-upload-button {
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: #f8fbff;
  color: var(--primary-color);
  cursor: pointer;
  margin-right: 0.6rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border: none;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  box-shadow: 0 10px 20px rgba(235, 124, 5, 0.18);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: white;
}

.btn-secondary:hover {
  background-color: #0854a0;
}

.btn-outline {
  background-color: white;
  color: #203246;
  border: 1px solid var(--border-color);
}

.btn-outline:hover {
  background-color: #f6f8fa;
  border-color: rgba(235, 124, 5, 0.28);
}

.btn-danger {
  background-color: var(--error-color);
  color: white;
}

.btn-danger:hover {
  background-color: #990000;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
}

/* Entry Cards */
.entry-card {
  background-color: #fbfcfd;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.entry-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.entry-title {
  font-weight: 600;
  color: var(--primary-color);
}

.entry-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (max-width: 600px) {
  .entry-grid {
    grid-template-columns: 1fr;
  }
}

/* Checkbox */
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* Suggested Skills */
.suggested-skills {
  margin-bottom: 1rem;
}

.suggested-skills h4 {
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.skill-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-badge {
  padding: 0.375rem 0.75rem;
  background-color: #f0f0f0;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.skill-badge:hover {
  background-color: var(--secondary-color);
  color: white;
  border-color: var(--secondary-color);
}

/* Preview Styles */
.preview-scroll {
  max-height: 720px;
  overflow-y: auto;
  background: linear-gradient(180deg, #f7f9fb 0%, #ffffff 12%);
}

.cv-preview {
  background-color: white;
}

.cv-preview.mini {
  font-size: 0.75rem;
}

.cv-preview-header {
  background-color: white;
  padding: 1.5rem;
  border-top: 6px solid var(--primary-color);
  border-bottom: 1px solid #ccc;
}

.cv-preview-logo-wrapper {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 1rem;
}

.cv-preview-logo {
  width: 160px;
  max-height: 50px;
  object-fit: contain;
}

.cv-preview.mini .cv-preview-logo {
  width: 110px;
  max-height: 35px;
}

.cv-preview.mini .cv-preview-header {
  padding: 1rem;
}

.cv-preview-body {
  padding: 0;
}

.cv-preview.mini .cv-preview-body {
  padding: 0;
}

.cv-preview-section {
  margin-bottom: 0;
  border-bottom: 1px solid #ccc;
}

.cv-preview.mini .cv-preview-section {
  margin-bottom: 0;
}

.cv-preview-section-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: white;
  background-color: var(--primary-color);
  padding: 0.5rem 1.5rem;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cv-preview.mini .cv-preview-section-title {
  font-size: 0.75rem;
  padding: 0.375rem 1rem;
}

.cv-preview-entry {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1.5rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #eee;
}

.cv-preview.mini .cv-preview-entry {
  grid-template-columns: 80px 1fr;
  gap: 1rem;
  padding: 0.75rem 1rem;
}

.cv-export-surface {
  color: #1f2937;
}

.cv-export-surface .cv-preview-entry,
.cv-export-surface .cv-preview-section,
.cv-export-surface .cv-preview-body{
  color: #1f2937;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
}

.toast {
  background-color: var(--primary-color);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  margin-top: 0.5rem;
  animation: slideIn 0.3s ease;
  max-width: 340px;
}

.toast.success {
  background-color: var(--success-color);
}

.toast.error {
  background-color: var(--error-color);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .header-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.55rem;
    text-align: left;
  }

  .main-content {
    padding: 1rem;
  }

  .entry-grid {
    grid-template-columns: 1fr;
  }

  .cv-preview-entry-header {
    flex-direction: column;
  }

  .cv-preview-skills-grid {
    grid-template-columns: 1fr;
  }
}

/* Session Dialog */
.session-dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

#cvImportProgressDialog {
  z-index: 1200;
}

.session-dialog {
  background-color: var(--card-background);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  max-width: 400px;
  width: 90%;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.session-dialog-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.session-dialog-header h2 {
  font-size: 1.25rem;
  color: var(--text-color);
  margin: 0;
}

.session-dialog-body {
  padding: 1.5rem;
  color: var(--text-muted);
}

.session-dialog-body p {
  margin: 0;
  line-height: 1.6;
}

.app-text-input-control {
  width: 100%;
  min-height: 110px;
  margin-top: 0.85rem;
  resize: vertical;
  border: 1px solid #d7e5f3;
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  color: #133c62;
  background: #ffffff;
  box-shadow: inset 0 1px 2px rgba(13, 31, 49, 0.04);
}

.app-text-input-helper {
  margin-top: 0.65rem !important;
  color: #62778c;
  font-size: 0.82rem;
}

.app-text-input-dialog-number {
  width: min(430px, 92vw);
}

.app-text-input-dialog-number .session-dialog-header {
  background: linear-gradient(135deg, rgba(240, 130, 29, 0.13), rgba(255, 255, 255, 0.98));
}

.app-text-input-dialog-number .session-dialog-body {
  display: grid;
  gap: 0.2rem;
}

.app-text-input-dialog-number .app-text-input-control {
  min-height: 0;
  height: 58px;
  resize: none;
  overflow: hidden;
  text-align: center;
  font-size: 1.8rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: #9a4a08;
  background: linear-gradient(180deg, #fffaf4 0%, #fff3e7 100%);
  border-color: rgba(240, 130, 29, 0.38);
  box-shadow: 0 12px 28px rgba(240, 130, 29, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.app-text-input-dialog-number .app-text-input-control:focus {
  border-color: #f0821d;
  box-shadow: 0 0 0 4px rgba(240, 130, 29, 0.16), 0 14px 30px rgba(240, 130, 29, 0.14);
  outline: none;
}

.session-dialog-footer {
  padding: 1rem 1.5rem;
  background-color: #fafbfc;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  border-radius: 0 0 8px 8px;
}

.timesheet-project-dialog-error {
  margin: 0;
  padding: 0.75rem 1.5rem;
  color: #bf1f26;
  background-color: #fdecea;
  border-top: 1px solid #f5c2c0;
  font-size: 0.92rem;
}

.timesheet-project-dialog-error[hidden] {
  display: none;
}

.timesheet-project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: flex-end;
  margin-bottom: 0.8rem;
}

.timesheet-project-filters .form-group {
  margin-bottom: 0;
  flex: 1 1 160px;
  min-width: 140px;
}

.timesheet-project-filters .btn {
  flex: 0 0 auto;
}

.timesheet-hours-detail-toggle {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.timesheet-hours-detail-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.timesheet-hours-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--border-color);
}

.timesheet-hours-detail-row:last-child {
  border-bottom: none;
}

.timesheet-hours-detail-name {
  font-weight: 500;
}

.timesheet-hours-detail-value {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.timesheet-hours-detail-empty {
  padding: 1rem 0.9rem;
  color: var(--text-secondary, #6a6d70);
  text-align: center;
}

.timesheet-hours-detail-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 2px solid var(--border-color);
  font-weight: 700;
  font-size: 1.05rem;
}

.timesheet-summary-table-wrap {
  margin-top: 1rem;
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: var(--surface-color, #ffffff);
}

.timesheet-summary-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.timesheet-summary-table th,
.timesheet-summary-table td {
  padding: 0.7rem 0.6rem;
  border-bottom: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  text-align: center;
  white-space: nowrap;
}

.timesheet-summary-day-header.is-saturday,
.timesheet-summary-day-cell.is-saturday {
  background: color-mix(in srgb, var(--card-bg, #ffffff) 82%, rgba(84, 147, 207, 0.22) 18%);
}

.timesheet-summary-day-header.is-offday,
.timesheet-summary-day-cell.is-offday {
  background: color-mix(in srgb, var(--card-bg, #ffffff) 82%, rgba(224, 106, 106, 0.22) 18%);
}

.timesheet-summary-day-cell.is-vacation {
  background: color-mix(in srgb, var(--card-bg, #ffffff) 78%, rgba(255, 197, 77, 0.28) 22%);
  font-weight: 700;
}

.timesheet-summary-table th:last-child,
.timesheet-summary-table td:last-child {
  border-right: none;
}

.timesheet-summary-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: color-mix(in srgb, var(--card-bg, #ffffff) 92%, var(--accent-color, #f0821d) 8%);
  font-weight: 700;
}

.timesheet-summary-table-name,
.timesheet-summary-table thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--card-bg, #ffffff);
  text-align: left;
  min-width: 220px;
}

.timesheet-summary-table thead th:first-child {
  z-index: 3;
}

.timesheet-summary-table-type,
.timesheet-summary-table thead th:nth-child(2) {
  position: sticky;
  left: 220px;
  z-index: 2;
  background: var(--card-bg, #ffffff);
  min-width: 68px;
}

.timesheet-summary-table thead th:nth-child(2) {
  z-index: 3;
}

.timesheet-summary-table-row.is-overtime td {
  font-weight: 700;
}

/* Riga di una tipologia oraria non ordinaria (es. Reperibilità) nel riepilogo. */
.timesheet-summary-table-row.is-category td {
  background: color-mix(in srgb, var(--card-bg, #ffffff) 88%, rgba(10, 110, 209, 0.14) 12%);
}

.timesheet-summary-table-row.is-category .timesheet-summary-table-type {
  font-weight: 700;
  color: #0a4f95;
}

.timesheet-summary-repeat-name {
  color: var(--text-secondary, #6a6d70);
}

/* Riepilogo per Progetto: colonna sotto-gruppo + righe subtotale/totale evidenziate. */
.timesheet-summary-table-sub {
  text-align: left;
  white-space: nowrap;
}

.timesheet-summary-cell-total {
  font-weight: 700;
}

.timesheet-summary-cell-days {
  font-weight: 800;
  text-align: center;
}

/* Intestazioni e colonne dei totali enfatizzate con colore; l'ultima colonna (Tot. GG) in
   grassetto più marcato. Scopato alla tabella del nuovo report per non toccare il Riepilogativo. */
.timesheet-project-summary-table thead th {
  background: #d6e4f3;
  color: #0a3d6e;
  border-bottom: 2px solid #0a6ed1;
}

.timesheet-project-summary-table thead th.timesheet-summary-col-total {
  background: #bcd6ef;
}

.timesheet-project-summary-table .timesheet-summary-cell-total,
.timesheet-project-summary-table .timesheet-summary-cell-days {
  background: color-mix(in srgb, var(--card-bg, #ffffff) 80%, rgba(10, 110, 209, 0.16) 20%);
}

body.theme-dark .timesheet-project-summary-table thead th {
  background: rgba(120, 148, 184, 0.34);
  color: #e7eef8;
  border-bottom-color: rgba(120, 168, 224, 0.7);
}

body.theme-dark .timesheet-project-summary-table thead th.timesheet-summary-col-total {
  background: rgba(120, 148, 184, 0.46);
}

body.theme-dark .timesheet-project-summary-table .timesheet-summary-cell-total,
body.theme-dark .timesheet-project-summary-table .timesheet-summary-cell-days {
  background: rgba(120, 148, 184, 0.2);
}

.timesheet-summary-table-row.is-subtotal td {
  background: color-mix(in srgb, var(--card-bg, #ffffff) 92%, rgba(10, 110, 209, 0.10) 8%);
  font-weight: 600;
}

.timesheet-summary-table-row.is-grouptotal td {
  background: color-mix(in srgb, var(--card-bg, #ffffff) 84%, rgba(10, 110, 209, 0.18) 16%);
  font-weight: 700;
}

.timesheet-summary-table-row.is-grandtotal td {
  background: color-mix(in srgb, var(--card-bg, #ffffff) 74%, rgba(10, 110, 209, 0.28) 26%);
  font-weight: 700;
}

body.theme-dark .timesheet-summary-table-row.is-subtotal td {
  background: rgba(120, 148, 184, 0.16);
}

body.theme-dark .timesheet-summary-table-row.is-grouptotal td {
  background: rgba(120, 148, 184, 0.26);
}

body.theme-dark .timesheet-summary-table-row.is-grandtotal td {
  background: rgba(120, 148, 184, 0.36);
}

body.theme-dark .timesheet-summary-table-wrap {
  background: #0f1b2d;
  border-color: rgba(120, 148, 184, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

body.theme-dark .timesheet-summary-table {
  color: #e7eef8;
}

body.theme-dark .timesheet-summary-table th,
body.theme-dark .timesheet-summary-table td {
  border-color: rgba(120, 148, 184, 0.22);
  color: #e7eef8;
  background: #132238;
}

body.theme-dark .timesheet-summary-day-header.is-saturday,
body.theme-dark .timesheet-summary-day-cell.is-saturday {
  background: #26405d;
}

body.theme-dark .timesheet-summary-day-header.is-offday,
body.theme-dark .timesheet-summary-day-cell.is-offday {
  background: #4a2f35;
}

body.theme-dark .timesheet-summary-day-cell.is-vacation {
  background: #5d4517;
  color: #fff7df;
}

body.theme-dark .timesheet-summary-table thead th {
  background: #1b314d;
  color: #f4f8fd;
}

body.theme-dark .timesheet-summary-table-name,
body.theme-dark .timesheet-summary-table thead th:first-child {
  background: #132238;
  color: #f4f8fd;
}

body.theme-dark .timesheet-summary-table-type,
body.theme-dark .timesheet-summary-table thead th:nth-child(2) {
  background: #132238;
  color: #f4f8fd;
}

body.theme-dark .timesheet-summary-table-row.is-overtime td {
  font-weight: 700;
}

body.theme-dark .timesheet-summary-table-row.is-overtime .timesheet-summary-table-name,
body.theme-dark .timesheet-summary-table-row.is-overtime .timesheet-summary-table-type {
  background: rgba(240, 130, 29, 0.18);
}

body.theme-dark .timesheet-summary-repeat-name {
  color: #9fb4cf;
}

.session-dialog-footer .btn {
  min-width: 120px;
}

.translation-dialog-card {
  width: min(560px, 94vw);
  max-width: 560px;
}

.translation-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.translation-dialog-card .session-dialog-body {
  padding-top: 1rem;
}

.timesheet-project-dialog {
  width: min(920px, 96vw);
  max-width: 920px;
}

.timesheet-project-dialog .session-dialog-body {
  max-height: min(70vh, 720px);
  overflow-y: auto;
}

.translation-dialog-card .ai-translation-panel {
  margin-top: 0;
}

/* ========================================
   Professional Visual Refresh
======================================== */

body {
  background:
    radial-gradient(1100px 520px at 8% -12%, rgba(235, 124, 5, 0.1) 0%, rgba(235, 124, 5, 0) 62%),
    radial-gradient(900px 500px at 105% 18%, rgba(10, 110, 209, 0.08) 0%, rgba(10, 110, 209, 0) 58%),
    var(--background-color);
}

.auth-gateway {
  min-height: 100dvh;
  height: auto;
  background: linear-gradient(90deg, #f7f8fa 0%, #f7f8fa 50%, #edf1f8 50%, #edf1f8 100%);
  display: grid;
  place-items: center;
  padding: 0 1rem;
  overflow-x: hidden;
  overflow-y: auto;
}

.auth-gateway-shell {
  width: 100%;
  max-height: none;
  display: grid;
  place-items: center;
}

.auth-login-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 3vw, 4rem);
  align-items: start;
  width: 100%;
  max-height: none;
  transform: translateY(-40px);
}

.auth-showcase {
  position: relative;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 0;
  justify-self: start;
  width: min(700px, 100%);
  margin-left: clamp(24px, 6vw, 120px);
}

.auth-brand {
  position: static;
  margin-top: -24px;
  margin-bottom: 0.45rem;
}

.auth-brand-logo {
  width: clamp(290px, 34vw, 460px);
  max-width: 100%;
  height: auto;
  margin-bottom: 0;
}

.auth-showcase h1 {
  margin: 0;
  color: #11314f;
  font-size: clamp(2.2rem, 4vw, 4.1rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.auth-showcase h1 span {
  color: #f0821d;
}

.auth-showcase > p {
  margin: 1.35rem 0 0;
  color: #6a7e93;
  max-width: 520px;
  font-size: 1.06rem;
  line-height: 1.7;
}

.auth-benefits {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  max-width: 500px;
}

.auth-benefit-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 0.9rem;
  align-items: center;
}

.auth-benefit-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid #e8edf4;
  color: #f0821d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.auth-benefit-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.auth-benefit-item h3 {
  margin: 0;
  color: #16314c;
  font-size: 1.1rem;
}

.auth-benefit-item p {
  margin: 0.2rem 0 0;
  color: #6c8095;
  font-size: 0.95rem;
  line-height: 1.45;
}

.auth-panel {
  background: #ffffff;
  border: 1px solid #e6ecf4;
  border-radius: 28px;
  padding: clamp(1.2rem, 2.5vw, 2rem);
  box-shadow: 0 26px 60px rgba(17, 49, 79, 0.08);
  align-self: start;
  justify-self: start;
  width: min(560px, 100%);
  max-width: 560px;
  max-height: calc(100dvh - 2rem);
  margin-top: clamp(230px, 24vh, 300px);
  margin-left: clamp(18px, 3.5vw, 56px);
  margin-right: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.auth-panel-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
  gap: 0.8rem;
}

.auth-lock-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #fff5ea;
  color: #f0821d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.auth-screen {
  padding: 0.2rem;
}

.auth-card {
  max-width: 100%;
  margin: 0;
}

.auth-card h2 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.8rem, 2vw, 2.2rem);
  line-height: 1.15;
  color: #143650;
}

.auth-card p {
  margin: 0 0 1.1rem;
  color: #6c8196;
  font-size: 1rem;
}

.auth-mobile-head {
  display: none;
}

.auth-mobile-only,
.auth-input-icon,
.auth-mobile-utility{
  display: none;
}

.auth-card .form-group {
  margin-bottom: 0.9rem;
}

.auth-card .auth-input-shell {
  width: 100%;
  display: block;
}

.auth-card .form-group label {
  color: #1a3853;
  font-weight: 600;
}

.auth-card .form-group input {
  width: 100%;
  display: block;
  box-sizing: border-box;
  border: 1px solid #dbe4ee;
  border-radius: 12px;
  height: 48px;
  background: #fcfdff;
  color: #21394f;
}

.auth-card .form-group input::placeholder {
  color: #8da0b4;
}

.auth-card .auth-input-shell {
  position: relative;
}

.auth-password-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #6c7f94;
  cursor: pointer;
  padding: 0;
}

.auth-password-toggle svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus-visible {
  color: #f0821d;
  outline: none;
}

.auth-input-group-password input {
  padding-right: 42px;
}

.auth-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.92rem;
  color: #5d7388;
}

.auth-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: #f0821d;
}

.auth-link-btn {
  border: none;
  background: transparent;
  color: #f0821d;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0;
}

.auth-submit-btn {
  width: 100%;
  border-radius: 12px;
  min-height: 48px;
  font-size: 1.05rem;
}

.auth-switch-text {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.94rem;
}

.auth-error {
  color: #bf1f26;
  margin: 0.1rem 0 0.8rem;
  font-size: 0.92rem;
}

.auth-error.auth-info {
  color: #1a7f37;
}

.auth-helper-text {
  margin: 4px 0 12px;
  color: #5b6f86;
  font-size: 12px;
}

.auth-privacy-checkbox {
  margin: 4px 0 12px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #2d3f56;
  font-size: 13px;
}

.auth-privacy-checkbox input {
  margin-top: 2px;
}

.ai-inline-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.02rem 0.24rem;
  border: 1px solid #f0bf8a;
  background: #fff1e2;
  color: #9a4a00;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1;
  cursor: help;
  vertical-align: middle;
  margin-left: 0.3rem;
  transform: translateY(-0.5px);
}

/* Keep AI badge compact even inside headings with inherited span typography */
h1 .ai-inline-badge,
h2 .ai-inline-badge,
h3 .ai-inline-badge,
h4 .ai-inline-badge,
h5 .ai-inline-badge,
h6 .ai-inline-badge {
  font-size: 0.68rem !important;
  line-height: 1 !important;
}

.btn .ai-inline-badge {
  font-size: 0.62rem !important;
  line-height: 1 !important;
  margin-left: 0.24rem;
}

.settings-helper-text {
  margin: 0 0 10px;
  color: #5b6f86;
  font-size: 12px;
}

.data-minimization-note {
  margin: 4px 0 0;
  color: #5b6f86;
  font-size: 12px;
  line-height: 1.4;
}

.data-minimization-note.compact {
  margin: 2px 0 6px;
}

.app-footer-policy a{
  color: #1f5bd8;
  text-decoration: underline;
  font-weight: 600;
}

.app-footer-policy {
  padding: 8px 16px 18px;
  text-align: center;
  font-size: 13px;
}

@media (max-width: 1100px) {
  .auth-gateway {
    background: linear-gradient(180deg, #f7f8fa 0%, #edf1f8 100%);
    padding: 0.8rem;
    height: auto;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .auth-login-layout {
    grid-template-columns: 1fr;
    gap: 1.4rem;
    transform: none;
  }

  .auth-showcase {
    margin-left: 0;
    justify-self: center;
  }

  .auth-brand {
    position: static;
    margin-top: 0;
    margin-bottom: 0.9rem;
  }

  .auth-panel {
    max-width: 700px;
    margin-top: 0;
    margin-left: 0;
    margin-right: 0;
    justify-self: center;
    align-self: center;
    max-height: calc(100dvh - 1.6rem);
  }
}

@media (max-width: 1024px) {
  #authScreenSignin,
  #authScreenSignup,
  #authScreenReset {
    min-height: 0;
    display: block;
  }

  .auth-gateway {
    background:
      radial-gradient(140% 120% at 0% 0%, #f8fafc 0%, #f1f5f9 62%, #eef2f7 100%);
    min-height: 100vh;
    height: auto;
    padding: 28px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body.theme-dark .auth-gateway {
    background: radial-gradient(140% 120% at 0% 0%, #1a2736 0%, #162332 62%, #13202e 100%);
  }

  .auth-gateway-shell {
    width: 100%;
    max-height: none;
    display: flex;
    justify-content: center;
  }

  .auth-login-layout {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    max-height: none;
    min-height: auto;
    transform: none;
  }

  .auth-showcase {
    display: none !important;
  }

  .auth-panel {
    width: min(100%, 390px);
    max-width: 390px;
    margin: 0 auto;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .auth-panel-header {
    display: none;
  }

  .auth-screen {
    padding: 0;
  }

  #authScreenSignin .auth-mobile-head,
  #authScreenSignup .auth-mobile-head,
  #authScreenReset .auth-mobile-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0;
    margin-bottom: 0;
  }

  .auth-mobile-logo {
    width: auto;
    height: 64px;
    display: block;
    margin-bottom: 32px;
  }

  .auth-mobile-title {
    margin: 0;
    font-size: 34px;
    line-height: 1.1;
    font-weight: 700;
    color: #0f2544;
  }

  .auth-mobile-subtitle {
    margin: 8px 0 36px;
    font-size: 16px;
    color: #64748b;
    line-height: 1.4;
  }

  #authScreenSignin .auth-desktop-copy,
  #authScreenSignup .auth-desktop-copy,
  #authScreenReset .auth-desktop-copy {
    display: none;
  }

  .auth-card {
    font-size: 14px;
    margin: 0;
    padding: 0 8px;
  }

  #authScreenSignin .auth-input-group,
  #authScreenSignup .auth-input-group,
  #authScreenReset .auth-input-group,
  #authScreenSignin .auth-mobile-utility,
  #authScreenSignin .auth-submit-btn,
  #authScreenSignup .auth-submit-btn,
  #authScreenReset .auth-submit-btn,
  #authScreenSignin .auth-error,
  #authScreenSignup .auth-error,
  #authScreenReset .auth-error {
    width: 100%;
    max-width: 352px;
    margin-left: auto;
    margin-right: auto;
  }

  .auth-card .form-group {
    margin-bottom: 14px;
  }

  .auth-card .form-group label {
    font-size: 14px;
    margin-bottom: 8px;
    display: inline-block;
    color: #0f2544;
    font-weight: 600;
  }

  #authScreenSignin .auth-input-shell,
  #authScreenSignup .auth-input-shell,
  #authScreenReset .auth-input-shell {
    position: relative;
    width: 100%;
  }

  #authScreenSignin .auth-mobile-only,
  #authScreenSignup .auth-mobile-only {
    display: block;
  }

  #authScreenSignin .auth-input-icon,
  #authScreenSignup .auth-input-icon,
  #authScreenReset .auth-input-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    pointer-events: none;
  }

  #authScreenSignin .auth-input-icon svg,
#authScreenSignup .auth-input-icon svg,
#authScreenReset .auth-input-icon svg,
#authScreenSignin .auth-password-toggle svg,
#authScreenSignup .auth-password-toggle svg,
#authScreenReset .auth-password-toggle svg{
    width: 20px;
    height: 20px;
    fill: currentColor;
  }

  #authScreenSignin .auth-input-group input,
  #authScreenSignup .auth-input-group input,
  #authScreenReset .auth-input-group input {
    width: 100%;
    display: block;
    box-sizing: border-box;
    padding-left: 44px;
  }

  #authScreenSignin .auth-password-toggle,
  #authScreenSignup .auth-password-toggle,
  #authScreenReset .auth-password-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
  }

  #authScreenSignin .auth-input-group-password input,
  #authScreenSignup .auth-input-group-password input,
  #authScreenReset .auth-input-group-password input {
    padding-right: 42px;
  }

  .auth-card .form-group input,
  .auth-card .form-group select,
  .auth-card .form-group textarea {
    height: 56px;
    border-radius: 16px;
    font-size: 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 24px rgba(15, 37, 68, 0.04);
    color: #0f2544;
  }

  #authScreenSignin .auth-input-group input::placeholder,
  #authScreenSignup .auth-input-group input::placeholder,
  #authScreenReset .auth-input-group input::placeholder {
    color: #94a3b8;
  }

  #authScreenSignin .auth-input-group input:focus,
  #authScreenSignup .auth-input-group input:focus,
  #authScreenReset .auth-input-group input:focus {
    border-color: rgba(255, 122, 0, 0.45);
    box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.12), 0 10px 26px rgba(15, 37, 68, 0.06);
    outline: none;
  }

  .auth-submit-btn{
    width: 100%;
    height: 56px;
    min-height: 56px;
    border-radius: 16px;
    border: 0;
    background: linear-gradient(135deg, #ff7a00, #ff8f1f);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    margin-top: 22px;
    box-shadow: 0 14px 28px rgba(255, 122, 0, 0.24);
  }

  #authScreenSignin .auth-mobile-utility {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 10px 0 0;
  }

  #authScreenSignin .auth-mobile-inline-switch {
    color: #64748b;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.2;
    text-align: center;
    margin: 0;
  }

  #authScreenSignin .auth-mobile-inline-switch .auth-link-btn,
  #authScreenSignin .auth-mobile-inline-forgot .auth-link-btn {
    color: #f0821d;
    font-size: 14px;
    font-weight: 600;
  }

  #authScreenSignin .auth-mobile-inline-forgot {
    margin: 0;
    text-align: center;
  }

  .auth-switch-text {
    margin-top: 28px;
    font-size: 14px;
    color: #64748b;
    text-align: center;
  }

  #authScreenSignin .auth-switch-text.auth-signup-row {
    display: none;
  }

  #authScreenSignin .auth-desktop-forgot {
    display: none;
  }

  .auth-switch-text .auth-link-btn {
    font-size: 14px;
    color: #f0821d;
    font-weight: 600;
  }

  .auth-error {
    margin: 8px 0 0;
    font-size: 13px;
  }
}
.label-with-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.pro-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.08rem 0.4rem;
  border-radius: 999px;
  border: 1px solid #e9a126;
  background: #fff4da;
  color: #9b5a00;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.settings-tabs {
  display: flex;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
}

.settings-tab-btn {
  border: 1px solid #e3e9f0;
  background: #fff;
  color: #284057;
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.settings-tab-btn.active {
  border-color: rgba(235, 124, 5, 0.58);
  background: linear-gradient(180deg, #fff6ea 0%, #fff1de 100%);
  color: #8a4500;
}

.settings-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.75rem;
}

.settings-theme-card {
  border: 1px solid #e3e9f0;
  border-radius: 12px;
  background: #fff;
  padding: 0.9rem;
}

.settings-theme-card h4 {
  margin: 0;
  color: #143650;
}

.settings-theme-card p {
  margin: 0.25rem 0 0.75rem;
  color: #526f86;
}

.settings-theme-options {
  display: inline-flex;
  gap: 0.55rem;
}

.settings-toggle-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0;
  cursor: pointer;
}

.settings-toggle-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.settings-toggle-row strong {
  display: block;
  color: #143650;
}

.settings-toggle-row small {
  display: block;
  margin-top: 0.18rem;
  color: #5c7287;
  line-height: 1.35;
}

.settings-version-meta {
  margin-top: 0.7rem;
  display: grid;
  gap: 0.45rem;
}

.settings-version-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  border: 1px solid #e4eaf0;
  border-radius: 10px;
  padding: 0.45rem 0.6rem;
  background: #fff;
}

.settings-version-item span {
  font-size: 0.82rem;
  color: #61778d;
}

.settings-version-item strong {
  font-size: 0.85rem;
  color: #253f59;
}

.settings-users-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.support-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.support-form {
  display: grid;
  gap: 0.85rem;
}

.support-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.support-attachment-preview {
  margin-top: 0.45rem;
  border: 1px dashed #cbd8e4;
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  color: #61778d;
  background: #f8fbff;
  font-size: 0.86rem;
}

.support-attachment-preview.has-file {
  border-style: solid;
  border-color: rgba(48, 116, 184, 0.35);
  color: #244d73;
  background: #eef6ff;
}

.support-requests-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.support-request-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: start;
  border: 1px solid #dfe7ef;
  border-radius: 10px;
  padding: 0.8rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.support-request-item.is-selected {
  border-color: rgba(235, 124, 5, 0.48);
  box-shadow: 0 10px 20px rgba(235, 124, 5, 0.12);
}

.support-request-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}

.support-request-title-row h5 {
  margin: 0;
  color: #143650;
}

.support-request-status {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 0.12rem 0.48rem;
  background: #eaf4ff;
  color: #245780;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.support-request-meta,
.support-request-attachment,
.support-request-no-attachment {
  color: #61778d;
  font-size: 0.82rem;
}

.support-request-main p {
  margin: 0.5rem 0;
  color: #33495f;
  white-space: pre-wrap;
}

.support-request-actions {
  display: flex;
  justify-content: flex-end;
}

.support-request-detail {
  margin-top: 1rem;
}

.support-detail-card {
  border: 1px solid #dfe7ef;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 0.9rem;
}

.support-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.support-detail-header h5 {
  margin: 0;
  color: #143650;
}

.support-detail-header p {
  margin: 0.25rem 0 0;
  color: #61778d;
  font-size: 0.84rem;
}

.support-detail-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.support-detail-form .form-group.full-width {
  grid-column: 1 / -1;
}

.support-detail-form input[readonly],
.support-detail-form textarea[readonly] {
  cursor: default;
  color: #33495f;
  background: #f7fafc;
}

.support-detail-attachment {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  border: 1px solid #dfe7ef;
  border-radius: 8px;
  padding: 0.65rem;
  background: #f8fbff;
}

.support-detail-attachment strong {
  color: #143650;
}

.support-detail-attachment span {
  color: #61778d;
  font-size: 0.84rem;
}

.support-detail-attachment-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-left: auto;
}

body.theme-dark .support-attachment-preview {
  border-color: rgba(148, 163, 184, 0.36);
  background: rgba(15, 23, 42, 0.34);
  color: #cbd5e1;
}

body.theme-dark .support-attachment-preview.has-file {
  border-color: rgba(96, 165, 250, 0.42);
  background: rgba(30, 64, 175, 0.22);
  color: #dbeafe;
}

body.theme-dark .support-request-item {
  border-color: rgba(148, 163, 184, 0.28);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.82) 0%, rgba(30, 41, 59, 0.76) 100%);
}

body.theme-dark .support-request-item.is-selected {
  border-color: rgba(245, 158, 11, 0.54);
  box-shadow: 0 10px 20px rgba(245, 158, 11, 0.12);
}

body.theme-dark .support-request-title-row h5,
body.theme-dark .support-request-main p,
body.theme-dark .support-detail-header h5,
body.theme-dark .support-detail-attachment strong {
  color: #e5edf6;
}

body.theme-dark .support-request-meta,
body.theme-dark .support-request-attachment,
body.theme-dark .support-request-no-attachment,
body.theme-dark .support-detail-header p,
body.theme-dark .support-detail-attachment span {
  color: #aebed0;
}

body.theme-dark .support-detail-card,
body.theme-dark .support-detail-attachment {
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.42);
}

@media (max-width: 900px) {
  .support-layout,
  .support-request-item,
  .support-detail-form {
    grid-template-columns: 1fr;
  }

  .support-request-actions,
  .support-form-actions,
  .support-detail-attachment-actions {
    justify-content: stretch;
  }

  .support-request-actions .btn,
  .support-form-actions .btn,
  .support-detail-attachment-actions .btn {
    width: 100%;
  }
}

.settings-role-controls {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
  margin: 0.85rem 0 1rem;
}

.settings-role-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.settings-role-summary-item {
  border: 1px solid #dbe5ef;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 0.55rem 0.65rem;
}

.settings-role-summary-item span {
  display: block;
  font-size: 0.74rem;
  color: #6a7f93;
  margin-bottom: 0.2rem;
}

.settings-role-summary-item strong {
  color: #1f3a55;
  font-size: 0.9rem;
}

.settings-role-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin: 0.3rem 0 0.65rem;
}

.settings-role-toolbar-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.settings-role-status {
  font-size: 0.82rem;
  font-weight: 600;
  color: #5a7288;
}

.settings-role-table-wrap {
  overflow-x: auto;
  border: 1px solid #dfe7ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.settings-role-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
  table-layout: fixed;
  font-size: 0.82rem;
}

.settings-role-table th,
.settings-role-table td {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid #e5edf4;
  border-right: 1px solid #e5edf4;
  text-align: left;
  vertical-align: top;
  word-break: break-word;
}

.settings-role-table th {
  background: #f7fafc;
  color: #23415d;
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 1;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.72rem;
}

.settings-role-table tbody tr:nth-child(even) td {
  background: #fcfdff;
}

.settings-role-table tbody tr.is-visible-for-role td:first-child strong {
  color: #0f5a2c;
}

.settings-role-table th.is-selected-role,
.settings-role-table td.is-selected-role {
  background: #fff3e1;
  color: #9a5300;
  font-weight: 700;
}

.settings-role-table th:nth-child(1),
.settings-role-table td:nth-child(1) {
  width: 260px;
}

.settings-role-table th:nth-child(2),
.settings-role-table td:nth-child(2) {
  width: 200px;
}

.settings-role-table th:nth-child(n + 3),
.settings-role-table td:nth-child(n + 3) {
  width: 125px;
  text-align: center;
}

.settings-role-sticky-col {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
}

.settings-role-table th.settings-role-sticky-col {
  z-index: 3;
}

.settings-role-table :is(th.settings-role-sticky-col:nth-child(1), td.settings-role-sticky-col:nth-child(1)) {
  left: 0;
  font-weight: 700;
}

.settings-role-table :is(th.settings-role-sticky-col:nth-child(2), td.settings-role-sticky-col:nth-child(2)) {
  left: 260px;
}

.settings-role-table tbody td.settings-role-flag {
  text-align: center;
  padding: 0.25rem;
}

.settings-role-flag-btn {
  width: 100%;
  min-height: 32px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  color: #214d2f;
  font-family: Consolas, 'Courier New', monospace;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.settings-role-flag-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(235, 124, 5, 0.28);
  box-shadow: 0 4px 10px rgba(19, 34, 51, 0.08);
}

.settings-role-flag-btn.is-off {
  color: #8da1b4;
  background: linear-gradient(180deg, #fefefe 0%, #f6f9fc 100%);
  border-color: #dbe5ef;
}

.settings-role-flag-btn.is-on {
  color: #0f5a2c;
  background: linear-gradient(180deg, #edf9f1 0%, #dcf2e3 100%);
  border-color: #bfe0ca;
}

.settings-role-flag-btn.is-locked,
.settings-role-flag-btn:disabled {
  cursor: not-allowed;
  opacity: 0.82;
  box-shadow: none;
}

.settings-role-table tbody tr.is-locked-row td {
  background: rgba(58, 95, 133, 0.03);
}

.settings-role-table tbody tr.is-visible-for-role td.settings-role-flag {
  background: #f4fbf7;
}

.settings-role-legend {
  margin: 0 0 0.65rem;
  color: #6a7f93;
  font-size: 0.82rem;
}

.settings-role-visible-block {
  margin-top: 1rem;
}

.settings-role-visible-block h5 {
  margin: 0 0 0.65rem;
  color: #23415d;
}

.settings-role-visible-list {
  display: grid;
  gap: 0.7rem;
}

.settings-role-visible-group {
  border: 1px solid #dfe7ef;
  border-radius: 12px;
  background: #fff;
  padding: 0.75rem 0.8rem;
}

.settings-role-visible-group h6 {
  margin: 0 0 0.55rem;
  color: #23415d;
  font-size: 0.88rem;
}

.settings-role-visible-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.settings-role-visible-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d6e2ee;
  border-radius: 999px;
  padding: 0.28rem 0.6rem;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  color: #28415d;
  font-size: 0.8rem;
}

.settings-role-visible-empty {
  margin: 0;
  color: #6a7f93;
}

.settings-security-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.settings-org-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.settings-org-form-grid {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.settings-org-pools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.settings-org-pool {
  border: 1px solid #e4ebf2;
  border-radius: 12px;
  background: #fff;
  padding: 0.6rem;
  min-height: 180px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.settings-org-pool h5 {
  margin: 0 0 0.45rem;
  color: #22405a;
  font-size: 0.86rem;
}

.settings-org-pool-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 210px;
  overflow-y: auto;
}

.settings-org-user-chip {
  border: 1px solid #dce7f1;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 0.42rem 0.52rem;
  cursor: grab;
}

.settings-org-user-chip:active {
  cursor: grabbing;
}

.settings-org-user-chip strong {
  display: flex;
  color: #233f59;
  font-size: 0.82rem;
}

.settings-org-user-chip span {
  color: #617d94;
  font-size: 0.76rem;
}

.settings-org-tree-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.settings-org-branch-card {
  border: 1px solid #e4ebf2;
  border-radius: 13px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  padding: 0.75rem 0.82rem;
}

.settings-org-tree-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
}

.settings-org-tree-actions {
  display: inline-flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.settings-org-quick-menu {
  margin-top: 0.55rem;
  border: 1px solid #d9e5f2;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fbff 0%, #f2f7ff 100%);
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  box-shadow: 0 10px 24px rgba(15, 37, 68, 0.12);
  animation: orgQuickMenuIn 0.2s ease;
  transform-origin: top right;
}

.settings-org-quick-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.settings-org-quick-row label {
  color: #36556f;
  font-size: 0.78rem;
  font-weight: 700;
}

.settings-org-quick-controls {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.settings-org-quick-controls .workflow-select {
  min-width: 0;
  flex: 1;
}

.settings-org-branch-card.has-quick-open {
  box-shadow: 0 10px 20px rgba(15, 37, 68, 0.08);
}

@keyframes orgQuickMenuIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.settings-org-tree-node {
  margin-top: 0.62rem;
  padding-left: 0.95rem;
  border-left: 2px dashed #d2dfeb;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.settings-org-dropzone {
  border: 1px dashed #c7d7e6;
  border-radius: 11px;
  background: #f8fbff;
  padding: 0.52rem 0.55rem;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.settings-org-dropzone label {
  display: block;
  color: #395a76;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
}

.settings-org-drop-list {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
}

.settings-org-drop-user {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.my-team-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.my-team-groups {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.my-team-group {
  display: flex;
  flex-direction: column;
  gap: 0.56rem;
}

.my-team-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.my-team-group-header h3 {
  margin: 0;
  font-size: 0.96rem;
  color: #2b4965;
}

.my-team-group-header span {
  font-size: 0.76rem;
  color: #6b849c;
  font-weight: 700;
}

.my-team-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
}

.my-team-search {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid #d9e5f1;
  border-radius: 12px;
  background: #fff;
  padding: 0 0.72rem;
  min-height: 44px;
}

.my-team-search svg {
  width: 18px;
  height: 18px;
  stroke: #6d8499;
  fill: none;
  stroke-width: 1.8;
}

.my-team-search input {
  border: 0;
  outline: none;
  width: 100%;
  min-width: 0;
  font-size: 0.9rem;
  background: transparent;
  color: #1e3a55;
}

.my-team-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  color: #5f7b92;
  font-size: 0.78rem;
  font-weight: 700;
}

.my-team-sort select {
  min-height: 40px;
  border: 1px solid #d9e5f1;
  border-radius: 10px;
  background: #fff;
  color: #1f3e5a;
  padding: 0 0.62rem;
  font-size: 0.84rem;
  font-weight: 600;
}

.my-team-members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem;
}

.my-team-member-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid #e4ebf2;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 0.82rem;
  box-shadow: 0 8px 20px rgba(15, 37, 68, 0.06);
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.my-team-member-card:hover,
.my-team-member-card:focus-visible {
  transform: translateY(-1px);
  border-color: #cfddea;
  box-shadow: 0 12px 24px rgba(15, 37, 68, 0.1);
  outline: none;
}

.my-team-member-avatar {
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2f80ed 0%, #4aa4ff 100%);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 6px 14px rgba(47, 128, 237, 0.22);
}

.my-team-member-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.my-team-member-main {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.24rem;
}

.my-team-member-title-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.my-team-member-title-row h4 {
  margin: 0;
  color: #1d3b56;
  font-size: 1.02rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-team-member-role {
  margin: 0;
  color: #5f7b92;
  font-size: 0.84rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-team-member-actions {
  margin-top: 0.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.my-team-member-actions .btn {
  min-height: 30px;
  padding: 0.28rem 0.62rem;
  border-radius: 10px;
  font-size: 0.76rem;
  font-weight: 700;
}

.my-team-profile {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.my-team-profile-dossier .dossier-layout {
  grid-template-columns: 220px minmax(0, 1fr);
}

.my-team-breadcrumb {
  display: inline-flex;
}

.my-team-profile-card {
  border: 1px solid #deebf5;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 1rem;
  box-shadow: 0 10px 24px rgba(15, 37, 68, 0.06);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.my-team-empty-state {
  border: 1px dashed #d7e2ee;
  border-radius: 14px;
  background: #f9fbfe;
  padding: 1rem;
  text-align: center;
}

.my-team-empty-state h4 {
  margin: 0 0 0.25rem;
  color: #1d3b56;
}

.my-team-empty-state p {
  margin: 0;
  color: #68829a;
}

.my-team-member-card.is-skeleton {
  cursor: default;
  pointer-events: none;
}

.skeleton-block,
.skeleton-line {
  position: relative;
  overflow: hidden;
  background: #e7eef6;
  border-radius: 8px;
}

.skeleton-block::after,
.skeleton-line::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.72) 50%, transparent 100%);
  animation: myTeamSkeletonPulse 1.15s infinite;
}

.skeleton-line {
  height: 10px;
}

.skeleton-line.w-65 { width: 65%; }
.skeleton-line.w-45 { width: 45%; }
.skeleton-line.w-35 { width: 35%; }

@keyframes myTeamSkeletonPulse {
  to {
    transform: translateX(100%);
  }
}

.settings-org-drop-user .settings-org-user-chip {
  flex: 1;
}

.settings-org-dropzone.drag-over,
.settings-org-pool.drag-over {
  border-color: #4391d2;
  background: #edf6ff;
  box-shadow: 0 0 0 3px rgba(67, 145, 210, 0.14);
}

@media (max-width: 720px) {
  .my-team-toolbar {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .my-team-group-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .my-team-sort {
    justify-content: space-between;
    width: 100%;
  }

  .my-team-sort select {
    flex: 1;
  }

  .my-team-members-grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .my-team-member-card {
    align-items: flex-start;
    padding: 0.88rem;
  }

  .my-team-member-main {
    width: 100%;
  }

  .my-team-member-title-row h4,
  .my-team-member-role {
    white-space: normal;
    overflow: visible;
    text-overflow: initial;
  }

  .my-team-member-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 0.45rem;
  }

  .my-team-member-actions .btn {
    width: 100%;
    min-height: 38px;
    justify-content: center;
  }

  .my-team-profile-card {
    padding: 0.85rem;
  }

  .my-team-profile-dossier .dossier-layout {
    grid-template-columns: 1fr;
  }

  #app.app-myteam-mode .my-team-profile-dossier .dossier-nav {
    position: sticky;
    top: 0;
    z-index: 6;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 0.5rem;
    padding: 0.45rem 0 0.65rem;
    margin-bottom: 0.85rem;
    background: linear-gradient(180deg, rgba(248, 251, 255, 0.98) 0%, rgba(248, 251, 255, 0.92) 100%);
    border-bottom: 1px solid #e2ebf5;
  }

  #app.app-myteam-mode .my-team-profile-dossier .dossier-nav::-webkit-scrollbar {
    display: none;
  }

  #app.app-myteam-mode .my-team-profile-dossier .dossier-nav-btn {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0 0.82rem;
    border-radius: 12px;
  }

  #app.app-myteam-mode .my-team-profile-dossier .dossier-content {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  .settings-org-grid {
    grid-template-columns: 1fr;
  }
  .settings-org-pools {
    grid-template-columns: 1fr;
  }
  .settings-org-quick-controls {
    flex-direction: column;
    align-items: stretch;
  }
  .settings-org-quick-controls .btn {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .my-team-search {
    min-height: 42px;
    padding: 0 0.62rem;
  }

  .my-team-search input {
    font-size: 0.86rem;
  }

  .my-team-sort {
    font-size: 0.74rem;
  }

  .my-team-sort select {
    min-height: 38px;
    font-size: 0.8rem;
  }

  .my-team-member-avatar {
    width: 42px;
    height: 42px;
    min-width: 42px;
    font-size: 0.88rem;
  }

  .my-team-member-title-row h4 {
    font-size: 0.96rem;
  }

  .my-team-member-role {
    font-size: 0.8rem;
  }
}

.settings-user-item {
  border: 1px solid #dbe5ef;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 0.95rem 1rem;
  display: grid;
  grid-template-columns: minmax(190px, 1.2fr) minmax(220px, 1fr) minmax(220px, 1fr) minmax(160px, auto) auto;
  gap: 0.75rem 0.85rem;
  align-items: center;
  box-shadow: 0 10px 24px rgba(28, 54, 82, 0.04);
}

.settings-user-item-hours {
  grid-template-columns: minmax(190px, 1.2fr) minmax(170px, 0.9fr) minmax(210px, 1fr) minmax(220px, 1fr) minmax(150px, auto) auto;
}

.settings-user-item-hours input {
  width: 100%;
}

.settings-user-meta-type,
.settings-user-meta-hours {
  padding: 0.35rem 0.55rem;
  border: 1px solid #dbe5ef;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
}

.settings-user-type-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.settings-user-type-row select {
  min-width: 118px;
}

.settings-user-actions {
  display: flex;
  justify-content: flex-end;
}

.settings-user-item-hours .settings-user-actions .btn {
  min-width: 110px;
}

.settings-user-meta-type .hr-card-badge {
  white-space: nowrap;
}
.settings-user-meta strong {
  font-size: 0.98rem;
}

.settings-user-item .settings-user-meta span {
  line-height: 1.35;
}

.settings-user-meta strong {
  display: block;
  color: #17354e;
}

.settings-user-meta span {
  color: #546f86;
  font-size: 0.8rem;
}

.settings-audit-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.settings-audit-item {
  border: 1px solid #e4ebf2;
  border-radius: 10px;
  background: #fff;
  padding: 0.65rem 0.75rem;
}

.settings-audit-item strong {
  color: #17354e;
}

.settings-audit-item span {
  display: block;
  font-size: 0.8rem;
  color: #546f86;
  margin-top: 0.15rem;
}

.header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
}

.header-title h1 {
  font-size: 1.72rem;
  letter-spacing: -0.04em;
}

.main-content {
  padding-top: 2.2rem;
  gap: 1.2rem;
}

.card {
  border: 1px solid rgba(219, 228, 238, 0.96);
  box-shadow:
    0 16px 34px rgba(25, 37, 50, 0.08),
    0 2px 6px rgba(25, 37, 50, 0.04);
}

.card-header {
  padding: 1rem 1.25rem;
}

.card-header h2 {
  letter-spacing: -0.02em;
}

.feature-menu-btn {
  padding: 0.72rem 0.86rem;
  border-radius: 12px;
}

.feature-menu-btn.active {
  border-color: rgba(235, 124, 5, 0.62);
  box-shadow: 0 10px 20px rgba(235, 124, 5, 0.14);
}

.archive-item,
.report-cv-item {
  border-radius: 13px;
  border: 1px solid #e4ebf3;
}

.archive-item:hover,
.report-cv-item:hover {
  transform: translateY(-2px);
  border-color: rgba(10, 110, 209, 0.28);
  box-shadow: 0 12px 24px rgba(25, 37, 50, 0.08);
}

.report-header {
  align-items: center;
}

.report-metric {
  border-radius: 14px;
  border: 1px solid #e1e9f1;
  background: linear-gradient(180deg, #fffaf4 0%, #ffffff 100%);
}

.report-metric-value {
  font-size: 1.22rem;
  letter-spacing: -0.02em;
}

.employee-profile-card {
  border-radius: 11px;
  background: linear-gradient(180deg, #ffffff 0%, #fafdff 100%);
}

.dossier-nav {
  border-radius: 12px;
}

.dossier-nav-btn {
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.dossier-nav-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(10, 110, 209, 0.34);
}

.hr-card {
  border-radius: 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.hr-card-header h4 {
  letter-spacing: -0.01em;
}

.hr-kpi {
  border-radius: 11px;
}

.hr-matrix-cell {
  border-radius: 11px;
}

.btn {
  border-radius: 11px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  box-shadow: 0 10px 20px rgba(235, 124, 5, 0.2);
}

.btn-primary:hover {
  box-shadow: 0 14px 24px rgba(235, 124, 5, 0.24);
}

.btn-outline {
  background: linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%);
}

.tabs {
  padding: 0.15rem 0.55rem 0;
  border-bottom-color: #e4ebf2;
}

.tab-btn {
  padding: 0.82rem 0.95rem 0.76rem;
  border-radius: 11px 11px 0 0;
}

.form-group input,
.form-group select,
.form-group textarea {
  border-radius: 11px;
  background: #fbfdff;
}

.entry-card {
  border-radius: 13px;
  padding: 1.05rem;
}

.archive-chat-panel {
  border: 1px solid #dce5ef;
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.16);
}

.archive-chat-header {
  background: linear-gradient(180deg, #fff4e7 0%, #ffffff 100%);
}

.archive-chat-message {
  border-radius: 13px;
}

.archive-chat-message.user {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.56);
}

.archive-chat-message.assistant {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

/* ========================================
   Executive Layout Upgrade
======================================== */

body {
  background:
    radial-gradient(1200px 560px at 0% -20%, rgba(235, 124, 5, 0.08) 0%, rgba(235, 124, 5, 0) 62%),
    radial-gradient(920px 520px at 108% 8%, rgba(10, 110, 209, 0.07) 0%, rgba(10, 110, 209, 0) 60%),
    #edf2f7;
}

body.theme-dark {
  background:
    radial-gradient(1200px 560px at 0% -20%, rgba(235, 124, 5, 0.12) 0%, rgba(235, 124, 5, 0) 62%),
    radial-gradient(920px 520px at 108% 8%, rgba(10, 110, 209, 0.12) 0%, rgba(10, 110, 209, 0) 60%),
    #0f151d;
}

.header {
  position: sticky;
  top: 0;
  z-index: 1100;
  background: #ffffff;
  color: #1f3348;
  border-bottom: 1px solid #dce5ef;
  box-shadow: 0 8px 24px rgba(19, 34, 51, 0.08);
  padding: 0.28rem 2rem 0.32rem;
}

.header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #eb7c05 0%, #f4a340 54%, #ffd2a4 100%);
}

.header-content {
  position: relative;
}

.header-logo-wrapper {
  gap: 1.05rem;
  padding: 0;
  border-radius: 12px;
  background: transparent;
  border: none;
  box-shadow: none;
}

.header-logo {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #edf1f5;
  padding: 0;
}

.header-title h1 {
  color: #1f3348;
  font-size: 1.62rem;
  letter-spacing: -0.035em;
  display: none;
}

.header-title p {
  color: #4f6275;
  opacity: 1;
  font-size: 0.9rem;
  display: none;
}

.main-content {
  padding-top: 1.55rem;
}

.card {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border: 1px solid #dbe5ef;
  box-shadow:
    0 16px 34px rgba(19, 34, 51, 0.07),
    0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.card-header {
  background: linear-gradient(180deg, #ffffff 0%, #f7fafe 100%);
  border-bottom: 1px solid #dfe8f1;
}

.card-header h2 {
  color: #20384f;
}

.report-card .card-header,
.hr-panel .card-header,
.dossier-panel .card-header,
.vacation-panel .card-header,
.timesheet-panel .card-header {
  position: relative;
}

.report-card .card-header::after,
.hr-panel .card-header::after,
.dossier-panel .card-header::after,
.vacation-panel .card-header::after,
.timesheet-panel .card-header::after {
  content: "";
  position: absolute;
  left: 1.25rem;
  bottom: 0;
  width: 80px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #eb7c05 0%, #f3ab54 100%);
}

.feature-menu-btn {
  background: linear-gradient(180deg, #ffffff 0%, #f6f9fd 100%);
  border-color: #e2eaf2;
  color: #294158;
}

.feature-menu-btn.active {
  background: linear-gradient(180deg, #fff4e6 0%, #ffeed8 100%);
  border-color: rgba(235, 124, 5, 0.56);
  color: #7f4100;
}

.report-metric {
  background: linear-gradient(180deg, #ffffff 0%, #fff8ef 100%);
  border: 1px solid #e3ebf3;
}

.report-section {
  background: linear-gradient(180deg, #ffffff 0%, #fafdff 100%);
  border: 1px solid #e3ebf2;
}

.archive-item,
.report-cv-item {
  background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
  border: 1px solid #e2ebf3;
}

.archive-item:hover,
.report-cv-item:hover {
  border-color: rgba(235, 124, 5, 0.38);
  box-shadow: 0 12px 24px rgba(22, 38, 56, 0.09);
}

.btn-primary {
  background: linear-gradient(135deg, #eb7c05 0%, #f39c34 100%);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #de7403 0%, #ea922e 100%);
}

.btn-outline {
  border: 1px solid #d8e2ec;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
}

.btn-outline:hover {
  border-color: rgba(235, 124, 5, 0.4);
  background: #fff;
}

/* ========================================
   Dark Theme Professional Override
======================================== */

body.theme-dark {
  --background-color: #0c121a;
  --card-background: #141d27;
  --border-color: #273444;
  --text-color: #e6edf5;
  --text-muted: #97a9bd;
  background:
    radial-gradient(1200px 560px at 0% -20%, rgba(235, 124, 5, 0.1) 0%, rgba(235, 124, 5, 0) 62%),
    radial-gradient(920px 520px at 108% 8%, rgba(10, 110, 209, 0.13) 0%, rgba(10, 110, 209, 0) 60%),
    #0c121a;
  color: var(--text-color);
}

body.theme-dark .header {
  background: linear-gradient(180deg, #111a25 0%, #101925 100%);
  color: #e6edf5;
  border-bottom: 1px solid #253445;
  box-shadow: 0 10px 28px rgba(2, 7, 14, 0.48);
}

body.theme-dark .header::before {
  background: linear-gradient(90deg, #d87308 0%, #e79232 55%, #f4c28f 100%);
}

body.theme-dark .header-logo {
  background: #0f1620;
  border-color: #273545;
}

body.theme-dark .card,
body.theme-dark .report-section,
body.theme-dark .archive-item,
body.theme-dark .report-cv-item,
body.theme-dark .dossier-item-card,
body.theme-dark .settings-user-item,
body.theme-dark .settings-tab-panel,
body.theme-dark .settings-theme-card,
body.theme-dark .entry-card {
  background: linear-gradient(180deg, #16212c 0%, #131d28 100%) !important;
  border-color: #2a394a !important;
  box-shadow:
    0 14px 30px rgba(2, 8, 16, 0.34),
    0 1px 0 rgba(255, 255, 255, 0.03) inset;
}

body.theme-dark .settings-role-summary-item,
body.theme-dark .settings-role-table-wrap,
body.theme-dark .settings-role-visible-group {
  background: linear-gradient(180deg, #16212c 0%, #131d28 100%);
  border-color: #2a394a;
}

body.theme-dark .settings-role-summary-item span,
body.theme-dark .settings-role-visible-empty,
body.theme-dark .settings-role-table th,
body.theme-dark .settings-role-table td {
  color: #c3d2e1;
}

body.theme-dark .settings-role-summary-item strong,
body.theme-dark .settings-role-visible-block h5,
body.theme-dark .settings-role-visible-group h6,
body.theme-dark .settings-role-table th {
  color: #e8f0f8;
}

body.theme-dark .settings-role-toolbar {
  color: #c3d2e1;
}

body.theme-dark .settings-role-status {
  color: #a7b9ca;
}

body.theme-dark .settings-role-table th {
  background: #172533;
}

body.theme-dark .settings-role-table tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02);
}

body.theme-dark .settings-role-table th.is-selected-role,
body.theme-dark .settings-role-table td.is-selected-role {
  background: rgba(235, 124, 5, 0.16);
  color: #ffd3a0;
}

body.theme-dark .settings-role-table th,
body.theme-dark .settings-role-table td {
  border-color: #2a394a;
}

body.theme-dark .settings-role-sticky-col {
  background: #16212c;
}

body.theme-dark .settings-role-table tbody td.settings-role-flag {
  color: #97d8aa;
}

body.theme-dark .settings-role-table tbody tr.is-visible-for-role td.settings-role-flag {
  background: rgba(15, 90, 44, 0.22);
}

body.theme-dark .settings-role-flag-btn {
  background: linear-gradient(180deg, #172533 0%, #13202d 100%);
  color: #d5e3ef;
  border-color: #2a394a;
  box-shadow: none;
}

body.theme-dark .settings-role-flag-btn.is-off {
  color: #8fa3b7;
  background: linear-gradient(180deg, #16212c 0%, #111b25 100%);
  border-color: #263547;
}

body.theme-dark .settings-role-flag-btn.is-on {
  color: #a8e1bc;
  background: linear-gradient(180deg, #163121 0%, #12281c 100%);
  border-color: #1f5f3a;
}

body.theme-dark .settings-role-flag-btn.is-locked,
body.theme-dark .settings-role-flag-btn:disabled {
  opacity: 0.75;
  box-shadow: none;
}

body.theme-dark .settings-role-table tbody tr.is-locked-row td {
  background: rgba(58, 95, 133, 0.18);
}

body.theme-dark .settings-role-flag-btn:hover {
  border-color: #f0a24f;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.26);
}

body.theme-dark .settings-role-visible-chip {
  background: linear-gradient(180deg, #172533 0%, #13202d 100%);
  border-color: #31465a;
  color: #d5e3ef;
}

body.theme-dark .card-header {
  background: linear-gradient(180deg, #1a2632 0%, #16222e 100%);
  border-bottom-color: #2a394a;
}

body.theme-dark .card-header h2,
body.theme-dark .feature-menu-header h2,
body.theme-dark .report-metric-value,
body.theme-dark .report-section-heading h3,
body.theme-dark .dossier-employee-title,
body.theme-dark .dossier-item-title,
body.theme-dark .hr-card-header h4,
body.theme-dark .settings-theme-card h4,
body.theme-dark .auth-card h2 {
  color: #e7eef7;
}

body.theme-dark .report-header p,
body.theme-dark .report-metric-label,
body.theme-dark .archive-item-meta,
body.theme-dark .report-cv-meta,
body.theme-dark .dossier-employee-meta,
body.theme-dark .dossier-item-subtitle,
body.theme-dark .settings-theme-card p,
body.theme-dark .auth-card p {
  color: #99abbe;
}

body.theme-dark .feature-menu-btn {
  background: linear-gradient(180deg, #1a2632 0%, #17222e 100%);
  border-color: #2b3a4b;
  color: #dbe6f2;
}

body.theme-dark .feature-menu-btn:hover {
  border-color: #3f5368;
  box-shadow: 0 8px 18px rgba(2, 8, 16, 0.3);
}

body.theme-dark .feature-menu-btn.active {
  background: linear-gradient(180deg, #3a2a19 0%, #322414 100%);
  border-color: rgba(235, 124, 5, 0.6);
  color: #ffd8ac;
}

body.theme-dark .settings-tab-btn,
body.theme-dark .dossier-nav-btn,
body.theme-dark .tab-btn {
  background: linear-gradient(180deg, #1a2632 0%, #17222e 100%);
  border-color: #2b3a4b;
  color: #d6e2ee;
}

body.theme-dark .settings-tab-btn.active,
body.theme-dark .dossier-nav-btn.active,
body.theme-dark .tab-btn.active {
  background: linear-gradient(180deg, #2b3a4e 0%, #243344 100%);
  border-color: #42607d;
  color: #dcedff;
}

body.theme-dark .btn-outline {
  background: linear-gradient(180deg, #1b2733 0%, #18222d 100%);
  border-color: #2d3d4f;
  color: #dce8f4;
}

body.theme-dark .btn-outline:hover {
  background: #202e3d;
  border-color: #48627f;
}

body.theme-dark input,
body.theme-dark textarea,
body.theme-dark select,
body.theme-dark .form-group input,
body.theme-dark .form-group textarea,
body.theme-dark .form-group select {
  background: #101923;
  border-color: #33465a;
  color: #e6edf5;
}

body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder {
  color: #7f95ab;
}

body.theme-dark .auth-password-toggle {
  color: #9fb1c6;
}

body.theme-dark .auth-password-toggle:hover,
body.theme-dark .auth-password-toggle:focus-visible {
  color: #ff9a3d;
}

body.theme-dark .report-metric {
  background: linear-gradient(180deg, #1b2733 0%, #18222d 100%);
  border-color: #2d3d4f;
}

body.theme-dark .report-section,
body.theme-dark .dossier-content,
body.theme-dark .dossier-nav,
body.theme-dark .candidate-comment-item,
body.theme-dark .onboarding-card,
body.theme-dark .onboarding-section,
body.theme-dark .coach-chat-input,
body.theme-dark .coach-chat-messages,
body.theme-dark .hr-radar-box,
body.theme-dark .hr-radar-legend,
body.theme-dark .hr-kpi {
  background: linear-gradient(180deg, #16212c 0%, #131d28 100%);
  border-color: #2b3a4b;
}

body.theme-dark .candidate-comment-form textarea {
  background: #101923;
  border-color: #33465a;
  color: #e6edf5;
}

body.theme-dark .cv-import-progress-file-name {
  background: rgba(235, 124, 5, 0.12);
  border-color: rgba(242, 170, 84, 0.26);
  color: #ffd29a;
}

body.theme-dark .cv-import-spinner {
  border-color: rgba(242, 154, 63, 0.16);
  border-top-color: #f29a3f;
}

body.theme-dark .cv-import-progress-status {
  color: #b7c7d8;
}

body.theme-dark .cv-import-progress-dialog {
  background: linear-gradient(180deg, #182430 0%, #131d28 100%);
  border: 1px solid #3b536b;
  box-shadow: 0 26px 54px rgba(0, 0, 0, 0.42);
}

body.theme-dark .cv-import-progress-dialog .session-dialog-body,
body.theme-dark .cv-import-progress-dialog .session-dialog-body p {
  color: #d5e3f1;
}

body.theme-dark .cv-import-progress-dialog .cv-import-progress-file-name {
  background: rgba(242, 154, 63, 0.14);
  border-color: rgba(242, 170, 84, 0.28);
  color: #ffd7a9;
}

body.theme-dark .candidate-interview-form-grid input,
body.theme-dark .candidate-interview-form-grid select {
  background: #101923;
  border-color: #33465a;
  color: #e6edf5;
}

body.theme-dark .candidate-comment-meta,
body.theme-dark .candidate-comment-text {
  color: #c8d6e4;
}

body.theme-dark .communications-recipient-item {
  background: #18222d;
  border-color: #2a3644;
}

body.theme-dark .communications-recipient-item.is-selected {
  background: rgba(235, 124, 5, 0.16);
  border-color: rgba(235, 124, 5, 0.45);
}

body.theme-dark .communications-recipient-copy strong {
  color: #eef4fb;
}

body.theme-dark .communications-recipient-copy span {
  color: #a9bbcf;
}

body.theme-dark .communications-list .support-request-item.is-unread {
  border-color: rgba(235, 124, 5, 0.45);
}

body.theme-dark .communications-filter-bar .btn.is-active {
  border-color: rgba(251, 191, 36, 0.42);
  background: rgba(245, 158, 11, 0.2);
  color: #fde68a;
}

body.theme-dark .onboarding-item-label,
body.theme-dark .onboarding-progress-label {
  color: #c8d6e4;
}

body.theme-dark .onboarding-list-panel {
  background: linear-gradient(180deg, #16212c 0%, #131d28 100%);
  border-color: #2b3a4b;
}

body.theme-dark .onboarding-list-header,
body.theme-dark .onboarding-list-item-name {
  color: #d6e4f2;
}

body.theme-dark .onboarding-list-item-meta,
body.theme-dark .onboarding-list-item-status {
  color: #b7c8d8;
}

body.theme-dark .onboarding-list-item {
  background: #16212c;
  border-color: #2f4256;
  color: #d6e4f2;
}

body.theme-dark .onboarding-list-item-percent {
  color: #ffd59e;
}

body.theme-dark .onboarding-list-item.active {
  border-color: #cc8b2f;
  background: #3a2b19;
}

body.theme-dark .offboarding-add-employee {
  border-color: #33475b;
  background: #142130;
}

body.theme-dark .workflow-select,
body.theme-dark .asset-status-select {
  background-color: #101923;
  border-color: #33485d;
  color: #d8e6f3;
  background-image:
    linear-gradient(45deg, transparent 50%, #8fb4d6 50%),
    linear-gradient(135deg, #8fb4d6 50%, transparent 50%),
    linear-gradient(to right, #39506a, #39506a);
}

body.theme-dark .workflow-select:hover:not(:disabled),
body.theme-dark .asset-status-select:hover:not(:disabled) {
  border-color: #4e6c89;
  background-color: #15212d;
}

body.theme-dark .workflow-select:focus,
body.theme-dark .asset-status-select:focus {
  border-color: #6da8de;
  box-shadow: 0 0 0 3px rgba(109, 168, 222, 0.2);
}

body.theme-dark .asset-cards-shell {
  background: linear-gradient(180deg, #15202b 0%, #121b25 100%);
  border-color: #2b3a4b;
}

body.theme-dark .asset-cards-title {
  color: #d6e4f2;
}

body.theme-dark .asset-cards-count {
  background: #1f3143;
  border-color: #395066;
  color: #c8def6;
}

body.theme-dark .asset-card {
  background: #15212d;
  border-color: #2b3a4b;
}

body.theme-dark .asset-card.editable {
  background: linear-gradient(180deg, #172533 0%, #14212d 100%);
}

body.theme-dark .asset-card-title,
body.theme-dark .asset-card-value {
  color: #d6e4f2;
}

body.theme-dark .asset-card-field label {
  color: #9fb8cf;
}

body.theme-dark .asset-field-input,
body.theme-dark .asset-field-textarea {
  background: #101923;
  border-color: #33485d;
  color: #d8e6f3;
}

body.theme-dark .asset-status-pill.status-active {
  color: #9ee4ba;
  background: #183327;
  border-color: #2f5d47;
}

body.theme-dark .asset-status-pill.status-returned {
  color: #a8c9ff;
  background: #1a2f4c;
  border-color: #31527c;
}

body.theme-dark .asset-status-pill.status-lost {
  color: #ffc1c1;
  background: #452222;
  border-color: #7a3d3d;
}

body.theme-dark .timesheet-calendar,
body.theme-dark .timesheet-day,
body.theme-dark .timesheet-day.empty,
body.theme-dark .vacation-item,
body.theme-dark .vacation-edit-banner,
body.theme-dark .absence-calendar-day,
body.theme-dark .absence-calendar-day.empty{
  background: linear-gradient(180deg, #182431 0%, #15202b 100%);
  border-color: #2d3d4f;
}

body.theme-dark .timesheet-day.timesheet-day-working {
  background: linear-gradient(180deg, #3b2f1f 0%, #322818 100%);
  border-color: #7b5a2a;
}

body.theme-dark .timesheet-day-input {
  background: #0f1822;
  border-color: #3a4d60;
  color: #e8eef6;
}

body.theme-dark .timesheet-day-more {
  background: rgba(88, 150, 214, 0.14);
  border-color: #3a4d60;
  color: #cfe3fb;
}

body.theme-dark .timesheet-day-more:hover {
  background: rgba(88, 150, 214, 0.24);
  border-color: #587a9c;
}

body.theme-dark .absence-calendar-day.has-absences {
  background: linear-gradient(180deg, #1a2531 0%, #15202b 100%);
}

body.theme-dark .absence-calendar-day.is-working {
  background: linear-gradient(180deg, #1b2638 0%, #162131 100%) !important;
  border-color: rgba(255, 122, 0, 0.42) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 122, 0, 0.12);
}

body.theme-dark .absence-calendar-day.is-weekend {
  background: linear-gradient(180deg, #111b2a 0%, #0e1724 100%) !important;
  border-color: rgba(100, 116, 139, 0.45) !important;
}

body.theme-dark .absence-calendar-day.is-holiday {
  background: linear-gradient(180deg, #2b2113 0%, #17202b 100%) !important;
  border-color: rgba(255, 166, 38, 0.82) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 166, 38, 0.3) !important;
}

body.theme-dark .absence-calendar-planner-stat {
  background: #182431;
  border-color: #2d3d4f;
  color: #b8c8d9;
}

body.theme-dark .absence-calendar-planner-stat strong {
  color: #e6edf5;
}

body.theme-dark .absence-calendar-view.is-week .absence-calendar-day{
  background: linear-gradient(180deg, #182431 0%, #15202b 100%);
}

body.theme-dark .absence-calendar-day.is-working .absence-calendar-day-number {
  color: #ffd6ad !important;
}

body.theme-dark .absence-calendar-day.is-weekend .absence-calendar-day-number {
  color: #a9b9cc !important;
}

body.theme-dark .absence-calendar-day.is-holiday .absence-calendar-holiday-label {
  color: #ffd6ad;
  background: rgba(255, 138, 0, 0.2);
  border: 1px solid rgba(255, 166, 38, 0.55);
}

body.theme-dark .absence-calendar-view.is-week .absence-calendar-planner-date-copy strong{
  color: #d8e6f3;
}

body.theme-dark .absence-calendar-view.is-week .absence-calendar-planner-date-copy span{
  color: #9cb0c3;
}

body.theme-dark .absence-calendar-weekdays span {
  color: #9cb0c3;
}

body.theme-dark .absence-calendar-zoom-switch .btn.active {
  background: linear-gradient(135deg, #eb7c05 0%, #f39c34 100%);
  border-color: #f39c34;
  color: #fff;
}

body.theme-dark .absence-calendar-legend-item {
  color: #9cb0c3;
}

body.theme-dark .absence-calendar-legend-swatch.is-working {
  background: linear-gradient(180deg, #3a2c1b 0%, #1a2531 100%);
  border-color: #7a5628;
}

body.theme-dark .absence-calendar-legend-swatch.is-weekend {
  background: #182531;
  border-color: #314355;
}

body.theme-dark .absence-calendar-legend-swatch.is-holiday {
  background: #563b19;
  border-color: #9b6a28;
}

body.theme-dark .absence-calendar-hint {
  background: linear-gradient(180deg, #2a2113 0%, #18222d 100%);
  border-color: #7b5a2a;
  color: #f2c998;
}

body.theme-dark .absence-calendar-day-number {
  background: #203244;
  color: #e6edf5;
}

body.theme-dark .absence-calendar-day.is-today .absence-calendar-day-number {
  background: linear-gradient(135deg, #eb7c05 0%, #f39c34 100%);
  color: #fff;
}

body.theme-dark .absence-calendar-chip {
  background: rgba(57, 110, 181, 0.2);
  color: #d8e6f4;
}

body.theme-dark .absence-calendar-chip-more {
  background: rgba(235, 124, 5, 0.18);
  color: #f4c18f;
}

body.theme-dark .absence-calendar-chip.is-partial {
  background: rgba(255, 138, 0, 0.16);
  color: #f4c18f;
  box-shadow: inset 0 0 0 1px rgba(255, 138, 0, 0.4);
}

body.theme-dark .absence-calendar-chip-main {
  color: inherit;
}

body.theme-dark .absence-calendar-chip-meta {
  color: inherit;
}

body.theme-dark .absence-calendar-chip-hours {
  background: #ff8a00;
  color: #1a1204;
}

body.theme-dark .absence-calendar-chip-slot {
  background: rgba(255, 255, 255, 0.08);
  color: #f7d7aa;
}

body.theme-dark .absence-calendar-day-more {
  background: rgba(88, 150, 214, 0.14);
  border-color: #3a4d60;
  color: #cfe3fb;
}

body.theme-dark .absence-calendar-day-more:hover {
  background: rgba(88, 150, 214, 0.24);
  border-color: #587a9c;
}

body.theme-dark .absence-calendar-holiday-label {
  background: #563b19;
  color: #f4c18f;
}

body.theme-dark .vacation-edit-banner p {
  color: #b8c8d9;
}

body.theme-dark .vacation-lock-banner {
  border-color: rgba(248, 113, 113, 0.28);
  background: linear-gradient(180deg, #2a1f23 0%, #1c2028 100%);
}

body.theme-dark .vacation-lock-banner strong {
  color: #ffb4a0;
}

body.theme-dark .vacation-hours-counter {
  border-color: #314355;
  background: linear-gradient(180deg, #172431 0%, #15202b 100%);
  color: #c8d6e4;
}

body.theme-dark .timesheet-month-controls {
  background: linear-gradient(180deg, #1b2a38 0%, #172433 100%);
  border-color: #31465a;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 24px rgba(4, 10, 17, 0.32);
}

body.theme-dark .month-nav-input {
  background: linear-gradient(180deg, #101b26 0%, #0e1823 100%);
  border-color: #3c546b;
  color: #deebf8;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 8px 18px rgba(2, 7, 13, 0.34);
}

body.theme-dark .month-nav-input:hover {
  border-color: #597a9c;
}

body.theme-dark .month-nav-input:focus {
  border-color: #6fa0d1;
  box-shadow:
    0 0 0 3px rgba(88, 150, 214, 0.2),
    0 12px 24px rgba(2, 8, 15, 0.4);
}

body.theme-dark .timesheet-project-dropdown {
  border-color: #31465a;
  background: linear-gradient(180deg, #182533 0%, #14202d 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 12px 26px rgba(2, 8, 15, 0.34);
}

body.theme-dark .timesheet-project-dropdown:hover,
body.theme-dark .timesheet-project-dropdown.is-open {
  border-color: #6f8faf;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 16px 30px rgba(2, 8, 15, 0.42);
}

body.theme-dark .timesheet-project-combobox-input {
  color: #e6f0fa;
}

body.theme-dark .timesheet-project-combobox-input::placeholder {
  color: #91a7bc;
}

body.theme-dark .timesheet-project-combobox-toggle {
  background: rgba(120, 152, 186, 0.12);
}

body.theme-dark .timesheet-project-dropdown-caret {
  border-right-color: #89a5c1;
  border-bottom-color: #89a5c1;
}

body.theme-dark .timesheet-project-dropdown-panel {
  border-top-color: #2d4155;
  background: rgba(18, 29, 40, 0.96);
}

body.theme-dark .timesheet-project-option {
  border-color: #304457;
  background: linear-gradient(180deg, #172431 0%, #13202b 100%);
  color: #deebf8;
}

body.theme-dark .timesheet-project-option:hover {
  border-color: #6c8eaf;
  box-shadow: 0 12px 22px rgba(2, 8, 15, 0.28);
}

body.theme-dark .timesheet-project-option.is-selected {
  border-color: #7fa2c7;
  background: linear-gradient(180deg, #203244 0%, #1a2a38 100%);
  box-shadow: inset 0 0 0 1px rgba(127, 162, 199, 0.2);
}

body.theme-dark .timesheet-project-option-name {
  color: #eef5fb;
}

body.theme-dark .timesheet-project-option-desc,
body.theme-dark .timesheet-project-empty,
body.theme-dark .timesheet-project-hint {
  color: #9cb0c3;
}

body.theme-dark .feature-section-favorite-btn {
  background: linear-gradient(180deg, #152233 0%, #101a28 100%);
  border-color: #31465a;
  color: #deebf8;
  box-shadow: 0 10px 24px rgba(2, 7, 13, 0.4);
}

body.theme-dark .feature-section-favorite-btn.is-favorite {
  background: linear-gradient(180deg, #3a2d12 0%, #2f240f 100%);
  border-color: #8f6a1a;
  color: #ffe2a1;
}

body.theme-dark .feature-menu-favorite-mark {
  color: #ffd57b;
}

body.theme-dark .settings-toggle-row strong,
body.theme-dark .settings-toggle-row small {
  color: #deebf8;
}

body.theme-dark .month-nav-input::-webkit-calendar-picker-indicator {
  background: linear-gradient(180deg, rgba(109, 165, 220, 0.26) 0%, rgba(109, 165, 220, 0.14) 100%);
}

body.theme-dark .month-nav-accent {
  background: linear-gradient(180deg, rgba(102, 142, 179, 0) 0%, rgba(102, 142, 179, 0.65) 50%, rgba(102, 142, 179, 0) 100%);
}

/* Settings: dark mode fine tuning */
body.theme-dark .settings-panel .report-body {
  gap: 1rem;
}

body.theme-dark .settings-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.3rem;
  border: 1px solid #2d3d4f;
  border-radius: 12px;
  background: linear-gradient(180deg, #121c27 0%, #111923 100%);
  margin-bottom: 1rem;
}

body.theme-dark .settings-tab-btn {
  min-height: 36px;
  padding: 0.48rem 0.82rem;
  border-radius: 9px;
  font-size: 0.81rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

body.theme-dark .settings-tab-btn:hover {
  border-color: #48627f;
  background: linear-gradient(180deg, #203041 0%, #1c2a39 100%);
}

body.theme-dark .settings-tab-btn.active {
  background: linear-gradient(180deg, #2f4359 0%, #2a3c50 100%);
  border-color: #5f7d9a;
  color: #edf6ff;
  box-shadow:
    0 6px 16px rgba(2, 9, 18, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.theme-dark .settings-tab-panel {
  padding: 0.95rem;
  border-radius: 14px;
  border: 1px solid #2d3d4f !important;
  background: linear-gradient(180deg, #131d28 0%, #111a24 100%) !important;
}

body.theme-dark .settings-theme-card {
  border-radius: 12px;
  padding: 1rem;
  border: 1px solid #304254 !important;
  background: linear-gradient(180deg, #162330 0%, #13202c 100%) !important;
}

body.theme-dark .settings-theme-card h4 {
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}

body.theme-dark .settings-theme-card p {
  font-size: 0.88rem;
  margin-top: 0.32rem;
}

body.theme-dark .settings-theme-options {
  gap: 0.6rem;
}

body.theme-dark .settings-security-grid {
  gap: 0.9rem;
}

body.theme-dark .settings-security-grid label {
  color: #c4d3e3;
  font-weight: 600;
}

body.theme-dark .settings-toolbar {
  margin-top: 0.95rem;
  padding-top: 0.8rem;
  border-top: 1px solid #293a4c;
  gap: 0.55rem;
}

body.theme-dark .settings-user-item,
body.theme-dark .settings-audit-item {
  border: 1px solid #304254 !important;
  border-radius: 12px;
  background: linear-gradient(180deg, #172432 0%, #14202c 100%) !important;
}

body.theme-dark .settings-user-item:hover,
body.theme-dark .settings-audit-item:hover {
  border-color: #46617b !important;
  box-shadow: 0 10px 22px rgba(2, 8, 16, 0.3);
}

body.theme-dark .settings-user-meta strong,
body.theme-dark .settings-audit-item strong {
  color: #e8f0f8;
}

body.theme-dark .settings-user-meta span,
body.theme-dark .settings-audit-item span {
  color: #9db0c3;
}

body.theme-dark .settings-org-pool,
body.theme-dark .settings-org-branch-card,
body.theme-dark .settings-org-dropzone,
body.theme-dark .settings-org-user-chip,
body.theme-dark .settings-org-quick-menu {
  border-color: #304254 !important;
  background: linear-gradient(180deg, #172432 0%, #14202c 100%) !important;
}

body.theme-dark .settings-org-pool h5,
body.theme-dark .settings-org-dropzone label,
body.theme-dark .settings-org-user-chip strong,
body.theme-dark .settings-org-user-chip span,
body.theme-dark .settings-org-quick-row label {
  color: #b5c6d7;
}

body.theme-dark .settings-org-tree-node {
  border-left-color: #35516b;
}

body.theme-dark .my-team-member-card,
body.theme-dark .my-team-empty-state {
  border-color: #304254;
  background: linear-gradient(180deg, #172432 0%, #14202c 100%);
}

body.theme-dark .my-team-search,
body.theme-dark .my-team-sort select,
body.theme-dark .my-team-profile-card{
  border-color: #304254;
  background: linear-gradient(180deg, #172432 0%, #14202c 100%);
}

body.theme-dark .my-team-search input {
  color: #d7e5f3;
}

body.theme-dark .my-team-search svg {
  stroke: #9bb3c8;
}

body.theme-dark .my-team-member-title-row h4,
body.theme-dark .my-team-member-role{
  color: #e6eef7;
}

body.theme-dark .my-team-group-header h3 {
  color: #dce9f6;
}

body.theme-dark .my-team-empty-state p,
body.theme-dark .my-team-sort{
  color: #a4b6c9;
}

body.theme-dark .my-team-group-header span {
  color: #9db2c7;
}

body.theme-dark .my-team-empty-state h4 {
  color: #e6eef7;
}

body.theme-dark .my-team-member-avatar {
  box-shadow: 0 6px 14px rgba(30, 91, 165, 0.4);
}

body.theme-dark .skeleton-block,
body.theme-dark .skeleton-line {
  background: #223446;
}

body.theme-dark .settings-version-item {
  border-color: #304254;
  background: linear-gradient(180deg, #172432 0%, #14202c 100%);
}

body.theme-dark .settings-version-item span {
  color: #9db0c3;
}

body.theme-dark .settings-version-item strong {
  color: #e8f0f8;
}

body.theme-dark .settings-org-dropzone.drag-over,
body.theme-dark .settings-org-pool.drag-over {
  border-color: #5387b7 !important;
  background: linear-gradient(180deg, #1c2e3f 0%, #182736 100%) !important;
  box-shadow: 0 0 0 3px rgba(90, 142, 190, 0.2);
}

/* HR Insights readability boost in dark mode */
body.theme-dark .hr-card,
body.theme-dark .hr-radar-card .hr-radar-box,
body.theme-dark .hr-kpi,
body.theme-dark .hr-radar-legend{
  background: linear-gradient(180deg, #1a2531 0%, #16212c 100%) !important;
  border-color: #324558 !important;
}

body.theme-dark .hr-card-header h4,
body.theme-dark .hr-matrix-header,
body.theme-dark .hr-matrix-name,
body.theme-dark .hr-insights-grid h5,
body.theme-dark .hr-kpi strong,
body.theme-dark .hr-radar-legend strong{
  color: #e8f0f8 !important;
}

body.theme-dark .hr-kpi span,
body.theme-dark .hr-radar-legend li,
body.theme-dark .hr-timeline-step,
body.theme-dark .dossier-employee-meta,
body.theme-dark .report-header p{
  color: #b8c8d9 !important;
}

body.theme-dark .hr-card-badge {
  border-color: #6f90ad;
  background: rgba(108, 150, 193, 0.2);
  color: #e4f0ff;
}

body.theme-dark .hr-card-badge.is-warning {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.18);
  color: #ffd48a;
}

body.theme-dark .hr-card-badge.is-success {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.18);
  color: #adf0c6;
}

body.theme-dark .hr-card-badge.is-danger {
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(248, 113, 113, 0.18);
  color: #ffc3c3;
}

body.theme-dark .hr-radar-ring {
  stroke: #4a6178;
}

body.theme-dark .hr-radar-axis {
  stroke: #42586f;
}

body.theme-dark .hr-radar-label {
  fill: #d6e5f4;
}

body.theme-dark .hr-radar-polygon.technical {
  fill: rgba(90, 167, 245, 0.28);
  stroke: #79b8fb;
}

body.theme-dark .hr-radar-polygon.soft {
  fill: rgba(241, 160, 74, 0.24);
  stroke: #f3b469;
}

body.theme-dark .hr-insight-list {
  color: #c8f1d8;
}

body.theme-dark .hr-insight-list.gap {
  color: #ffc2b8;
}

body.theme-dark .hr-view-btn {
  background: linear-gradient(180deg, #1f2c3a 0%, #1a2531 100%);
  border-color: #385068;
  color: #d6e6f7;
}

body.theme-dark .hr-view-btn.active {
  background: linear-gradient(180deg, #2b3d52 0%, #25374b 100%);
  border-color: #6a8bad;
  color: #eef6ff;
}

body.theme-dark .hr-matrix-cell {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

/* ========================================
   Mobile Optimization Layer
======================================== */

@media (max-width: 980px) {
  .header {
    padding: 0.4rem 0.85rem 0.45rem;
  }

  .header-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.7rem;
  }

  .header-logo {
    width: clamp(120px, 38vw, 170px);
    height: auto;
    max-height: none;
  }

  .header-actions {
    width: auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
    min-width: 0;
  }

  #authUserInfo {
    margin-left: auto;
    width: auto;
    justify-content: flex-end;
    flex-wrap: nowrap;
    min-width: 0;
  }

  #authUserBadge {
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .main-content {
    padding: 0.95rem 0.7rem 1.25rem;
    gap: 0.85rem;
  }

  .card-header,
  .card-body {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

  .feature-menu-panel {
    max-height: none;
  }

  .feature-menu-panel .feature-menu-body {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 0.55rem;
    padding: 0.72rem;
    scrollbar-width: thin;
  }

  .feature-menu-btn {
    flex: 0 0 auto;
    width: auto;
    min-width: max-content;
    padding: 0.62rem 0.72rem;
  }

  .report-header,
  .archive-header {
    gap: 0.7rem;
  }

  .report-header-actions,
  .archive-header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .timesheet-month-controls {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .month-nav-wrap {
    flex: 1 1 220px;
  }

  .month-nav-input {
    min-width: 0;
    width: 100%;
  }

  .settings-tabs {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.15rem;
  }

  .feature-favorite-btn {
    top: 4.9rem;
    right: 0.7rem;
    padding: 0.52rem 0.75rem;
  }

  .report-header-actions.feature-section-primary-actions,
  .hr-card-header-actions.feature-section-primary-actions {
    width: 100% !important;
    margin-top: 0.7rem !important;
    margin-right: 0 !important;
    justify-content: flex-start !important;
  }

  .feature-section-favorite-slot {
    margin-left: auto !important;
    align-self: flex-start;
  }

  .feature-section-favorite-btn {
    margin-left: auto;
  }

  .feature-favorite-label {
    display: none;
  }

  .settings-tab-btn {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .settings-user-item {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .timesheet-calendar {
    overflow-x: auto;
  }

  #app.app-coach-mode .coach-chat-messages {
    min-height: 220px;
    max-height: 50vh;
  }

  #app.app-coach-mode .coach-chat-input {
    padding: 0.78rem;
    gap: 0.6rem;
  }

  #app.app-coach-mode .coach-chat-input textarea {
    min-height: 96px;
    font-size: 16px;
  }

  #app.app-coach-mode .coach-chat-input .btn {
    width: 100%;
  }
}

@media (max-width: 700px) {
  .header-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.55rem;
    text-align: left;
  }

  .header-logo-wrapper {
    min-width: 0;
    gap: 0.55rem;
  }

  .header-title {
    min-width: 0;
  }

  .header-title h1 {
    font-size: 1.15rem;
    line-height: 1.1;
  }

  .header-title p {
    font-size: 0.78rem;
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .header-actions {
    width: auto;
    justify-content: flex-end;
    flex-wrap: nowrap;
    min-width: 0;
  }

  #authUserInfo {
    margin-left: 0;
    justify-content: flex-end;
    flex-wrap: nowrap;
    min-width: 0;
  }

  #authUserBadge {
    max-width: 44vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .card-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    padding: 0.85rem 0.9rem;
  }

  .footer-right {
    width: 100%;
    justify-content: stretch;
  }

  .footer-right .btn {
    width: 100%;
  }

  .tab-content {
    padding: 0.95rem;
  }

  .timesheet-month-controls .btn {
    flex: 1 1 auto;
  }

  .tabs {
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }

  .tab-btn {
    min-height: 44px;
    min-width: 44px;
  }

  .report-cv-item,
  .archive-item,
  .dossier-item-card {
    padding: 0.68rem;
  }

  .archive-chat-toggle {
    right: 0.85rem;
    bottom: 0.85rem;
    width: 56px;
    height: 56px;
  }

  .archive-chat-panel,
  .archive-chat-panel.expanded {
    right: 0.65rem;
    left: 0.65rem;
    width: auto;
    height: min(78vh, 640px);
    bottom: 4.9rem;
  }

  .archive-chat-header p {
    display: none;
  }
}

@media (max-width: 480px) {
  .header {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }

  .main-content {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .card-header,
  .card-body {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .feature-menu-panel .feature-menu-body {
    gap: 0.45rem;
    padding: 0.58rem;
  }

  .feature-menu-btn {
    font-size: 0.77rem;
    padding: 0.58rem 0.62rem;
  }

  .report-header,
  .report-cv-item,
  .archive-item-title-row,
  .report-cv-title-row,
  .asset-cards-head,
  .asset-card-top,
  .vacation-item,
  .recruiting-card-header-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
  }

  .report-header-actions .btn,
.archive-header-actions .btn,
.report-cv-actions .btn{
    width: 100%;
  }

  .archive-item-actions,
.report-cv-actions,
.vacation-item-actions,
.offboarding-header-actions{
    width: 100%;
    justify-content: stretch;
    flex-wrap: wrap;
    gap: 0.45rem;
  }

  .archive-item-actions .btn,
.report-cv-actions .btn,
.vacation-item-actions .btn,
.offboarding-header-actions .btn{
    width: 100%;
  }

  .recruiting-card-header-actions {
    margin-left: 0;
    width: 100%;
    justify-content: stretch;
    gap: 0.45rem;
  }

  .recruiting-card-header-actions .btn {
    width: 100%;
  }

  .workflow-select,
  .asset-status-select {
    width: 100%;
    min-width: 0;
  }

  .month-nav-wrap {
    width: 100%;
    min-width: 0;
  }

  .archive-chat-panel,
  .archive-chat-panel.expanded {
    left: 0;
    right: 0;
    bottom: 0;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
  }

  .archive-chat-messages {
    padding: 0.75rem;
  }

  .archive-chat-input {
    padding: 0.7rem;
  }
}

@media (max-width: 380px) {
  .header-content {
    gap: 0.5rem;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .header-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.4rem;
  }

  .header-actions > * {
    width: auto;
    max-width: 100%;
  }

  #authUserInfo {
    margin-left: auto;
    justify-content: flex-end;
    flex-wrap: nowrap;
  }

  #authUserBadge {
    max-width: 38vw;
  }

  .main-content {
    padding-left: 0.4rem;
    padding-right: 0.4rem;
    gap: 0.7rem;
  }

  .card-header,
  .card-body,
  .tab-content,
  .report-section,
  .onboarding-card,
  .onboarding-list-panel,
  .asset-cards-shell {
    padding: 0.65rem;
  }

  .report-header-actions,
  .archive-header-actions,
  .preview-header-actions,
  .editor-header-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
  }

  .report-header-actions .btn,
  .archive-header-actions .btn,
  .preview-header-actions .btn,
  .editor-header-actions .btn {
    width: 100%;
  }

  .tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.32rem;
    padding: 0.28rem;
  }

  .tab-btn {
    width: 100%;
    justify-content: center;
    min-height: 40px;
    padding: 0.44rem 0.38rem;
    font-size: 0.74rem;
  }

  .tab-btn span {
    white-space: normal;
    line-height: 1.12;
  }

  .feature-menu-panel .feature-menu-body {
    gap: 0.35rem;
    padding: 0.45rem;
  }

  .feature-menu-btn {
    font-size: 0.72rem;
    padding: 0.5rem 0.54rem;
  }

  .report-metric {
    padding: 0.72rem 0.76rem;
    border-radius: 12px;
  }

  .report-metric-value {
    font-size: 1rem;
  }

  .archive-item,
  .report-cv-item,
  .dossier-item-card {
    padding: 0.58rem;
  }

  .onboarding-shell,
  .onboarding-layout {
    gap: 0.7rem;
  }

  .onboarding-list-item {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .onboarding-list-item-side {
    justify-items: start;
  }

  .onboarding-list-item-name,
  .onboarding-list-item-meta {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;
  }

  .timesheet-month-controls {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr;
  }

  .timesheet-month-controls .btn {
    width: 100%;
  }

  .month-nav-input,
  .workflow-select,
  .asset-status-select,
  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px;
  }

  .timesheet-calendar-grid {
    gap: 0.32rem;
  }

  .timesheet-day,
  .timesheet-day.empty {
    min-height: 98px;
    padding: 0.34rem;
  }

  .timesheet-day-input {
    font-size: 0.74rem;
    padding: 0.22rem 0.3rem;
  }

  #app.app-coach-mode .coach-chat-messages {
    min-height: 180px;
    max-height: 46vh;
  }
}

@media (max-width: 430px) {
  .auth-gateway {
    padding: 24px 20px;
  }

  .auth-panel {
    width: 100%;
    border-radius: 0;
    padding: 0;
    margin: 0;
    max-width: 100%;
    max-height: none;
    overflow: visible;
  }

  .auth-mobile-logo {
    width: auto;
    height: 56px;
    margin-bottom: 32px;
  }

  .auth-card .form-group {
    margin-bottom: 12px;
  }

  .auth-card .form-group input,
  .auth-card .form-group select,
  .auth-card .form-group textarea {
    height: 56px;
    font-size: 14px;
  }

  .auth-submit-btn{
    min-height: 56px;
    font-size: 16px;
  }
}

/* ========================================
   Feature Menu Icon Rail (Desktop)
======================================== */

@media (min-width: 1025px) {
  #app {
    --feature-menu-rail-width: 72px;
    --feature-menu-expanded-width: 240px;
  }

  #app:not(.menu-collapsed) .main-content {
    grid-template-columns: var(--feature-menu-rail-width) minmax(230px, 0.5fr) minmax(700px, 1.8fr) minmax(430px, 1.06fr);
  }

  #app:not(.menu-collapsed).app-dashboard-mode .main-content {
    grid-template-columns: var(--feature-menu-rail-width) minmax(0, 1fr);
  }

  #app:not(.menu-collapsed).app-workspace-mode .main-content {
    grid-template-columns: var(--feature-menu-rail-width) minmax(720px, 1.8fr) minmax(430px, 1.06fr);
  }

  #app:not(.menu-collapsed).app-hrinsights-mode .main-content,
  #app:not(.menu-collapsed).app-hiddengems-mode .main-content,
  #app:not(.menu-collapsed).app-dossier-mode .main-content,
  #app:not(.menu-collapsed).app-settings-mode .main-content,
  #app:not(.menu-collapsed).app-organization-mode .main-content,
  #app:not(.menu-collapsed).app-vacation-mode .main-content,
  #app:not(.menu-collapsed).app-timesheet-mode .main-content,
  #app:not(.menu-collapsed).app-myteam-mode .main-content,
  #app:not(.menu-collapsed).app-coach-mode .main-content,
  #app:not(.menu-collapsed).app-onboarding-mode .main-content,
  #app:not(.menu-collapsed).app-offboarding-mode .main-content {
    grid-template-columns: var(--feature-menu-rail-width) minmax(0, 1fr);
  }

  #app:not(.menu-collapsed) .feature-menu-panel {
    width: var(--feature-menu-rail-width);
    transition: width 0.2s ease;
    z-index: 20;
  }

  #app:not(.menu-collapsed) .feature-menu-panel:hover,
  #app:not(.menu-collapsed) .feature-menu-panel:focus-within {
    width: var(--feature-menu-expanded-width);
  }

  #app:not(.menu-collapsed) .feature-menu-header {
    display: none;
  }

  #app:not(.menu-collapsed) .feature-menu-panel:hover .feature-menu-header,
  #app:not(.menu-collapsed) .feature-menu-panel:focus-within .feature-menu-header {
    display: block;
  }

  #app:not(.menu-collapsed) .feature-menu-btn {
    justify-content: center;
    padding: 0.68rem;
  }

  #app:not(.menu-collapsed) .feature-menu-btn::before {
    content: "";
    width: 1.2rem;
    text-align: center;
    flex: 0 0 1.2rem;
  }

  #app:not(.menu-collapsed) .feature-menu-btn > span {
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: opacity 0.15s ease, max-width 0.15s ease;
  }

  #app:not(.menu-collapsed) .feature-menu-panel:hover .feature-menu-btn,
  #app:not(.menu-collapsed) .feature-menu-panel:focus-within .feature-menu-btn {
    justify-content: space-between;
    padding: 0.68rem 0.8rem;
  }

  #app:not(.menu-collapsed) .feature-menu-panel:hover .feature-menu-btn > span,
  #app:not(.menu-collapsed) .feature-menu-panel:focus-within .feature-menu-btn > span {
    opacity: 1;
    max-width: 220px;
  }
}

/* ========================================
   Asset Panel
======================================== */

#app:not(.app-asset-mode) .asset-panel {
  display: none;
}

#app.app-asset-mode .report-panel,
#app.app-asset-mode .editor-panel,
#app.app-asset-mode .preview-panel,
#app.app-asset-mode .archive-panel,
#app.app-asset-mode .coach-panel,
#app.app-asset-mode .hr-panel,
#app.app-asset-mode .hidden-gems-panel,
#app.app-asset-mode .dossier-panel,
#app.app-asset-mode .settings-panel,
#app.app-asset-mode .vacation-panel,
#app.app-asset-mode .timesheet-panel,
#app.app-asset-mode .onboarding-panel,
#app.app-asset-mode .offboarding-panel {
  display: none;
}

#app.app-asset-mode .main-content {
  grid-template-columns: minmax(72px, 72px) minmax(0, 1fr);
}

#app.menu-collapsed.app-asset-mode .main-content {
  grid-template-columns: minmax(0, 1fr);
}

.asset-cards-shell {
  border: 1px solid #dfeaf4;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  padding: 0.72rem;
}

.asset-cards-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.58rem;
  padding: 0 0.1rem;
}

.asset-cards-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #26455e;
  letter-spacing: 0.01em;
}

.asset-cards-count {
  min-width: 32px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 0.48rem;
  border: 1px solid #cfe0f0;
  background: #eef5ff;
  color: #244a6b;
  font-size: 0.72rem;
  font-weight: 700;
}

.asset-cards-grid {
  display: grid;
  gap: 0.62rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.asset-cards-grid.editable {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.asset-card {
  border: 1px solid #dfe9f3;
  border-radius: 12px;
  background: #ffffff;
  padding: 0.65rem;
  display: grid;
  gap: 0.55rem;
}

.asset-card.editable {
  background: linear-gradient(180deg, #ffffff 0%, #fafdff 100%);
}

.asset-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.55rem;
}

.asset-card-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: #1f405a;
}

.asset-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 0.55rem;
}

.asset-card-field {
  display: grid;
  gap: 0.22rem;
}

.asset-card-field.grow {
  flex: 1;
}

.asset-card-field.compact {
  min-width: 148px;
}

.asset-card-field.full {
  grid-column: 1 / -1;
}

.asset-card-field label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #5b7590;
}

.asset-card-value {
  font-size: 0.82rem;
  color: #2b4a64;
  min-height: 1.4rem;
}

.asset-field-input,
.asset-field-textarea {
  width: 100%;
  border: 1px solid #d7e5f3;
  border-radius: 9px;
  background: #f9fcff;
  color: #274660;
  padding: 0.42rem 0.52rem;
  font-size: 0.82rem;
}

.asset-field-input:focus,
.asset-field-textarea:focus {
  outline: none;
  border-color: #5c9dd6;
  box-shadow: 0 0 0 3px rgba(10, 110, 209, 0.14);
  background: #ffffff;
}

.asset-card-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
}

.asset-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.asset-filters .form-group {
  min-width: 0;
  margin-bottom: 0;
}

.asset-filters input,
.asset-filters select {
  width: 100%;
  min-width: 0;
}

.asset-filter-action .archive-header-actions {
  justify-content: flex-start;
}

#assetContent .onboarding-shell.asset-shell-mine {
  grid-template-columns: minmax(0, 1fr);
}

#assetContent .onboarding-shell.asset-shell-mine .onboarding-layout {
  grid-template-columns: minmax(0, 1fr);
}

#assetContent .onboarding-sidebar textarea {
  min-height: 120px;
}

.asset-col-serial {
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.78rem;
}

.asset-col-notes {
  color: #4a637a;
}

.asset-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 0.26rem 0.56rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.asset-status-pill.status-active {
  color: #125a35;
  background: #e9f8ef;
  border-color: #bde8cb;
}

.asset-status-pill.status-returned {
  color: #1c4f83;
  background: #e9f2ff;
  border-color: #c8dbff;
}

.asset-status-pill.status-lost {
  color: #8d2f2f;
  background: #fdeeee;
  border-color: #f7c9c9;
}

.asset-status-select {
  min-width: 150px;
}

.asset-status-select:focus {
  outline: none;
}

@media (max-width: 1024px) {
  #app.app-asset-mode .main-content {
    grid-template-columns: 1fr;
  }

  .asset-filters {
    grid-template-columns: 1fr;
  }
  .asset-cards-shell {
    padding: 0.56rem;
  }

  .asset-cards-grid,
  .asset-cards-grid.editable {
    grid-template-columns: 1fr;
  }

  .asset-card-grid {
    grid-template-columns: 1fr;
  }

  .asset-card-field.compact {
    min-width: 0;
  }
}

/* ========================================
   Premium SaaS Dashboard Restyle
======================================== */

:root {
  --ds-font-family: var(--font-main);
  --ds-bg: #eef4fb;
  --ds-surface: #ffffff;
  --ds-surface-soft: #f6f9ff;
  --ds-text: #12314f;
  --ds-text-muted: #5f7891;
  --ds-border: #dbe6f2;
  --ds-primary: #eb7c05;
  --ds-primary-hover: #d96f00;
  --ds-accent: #0f4c81;
  --ds-accent-soft: #e8f1ff;
  --ds-radius-sm: 10px;
  --ds-radius-md: 14px;
  --ds-radius-lg: 18px;
  --ds-shadow-sm: 0 8px 20px rgba(17, 42, 68, 0.08);
  --ds-shadow-md: 0 18px 40px rgba(17, 42, 68, 0.1);
  --ds-shadow-lg: 0 26px 54px rgba(15, 34, 56, 0.12);
  --ds-space-1: 0.5rem;
  --ds-space-2: 0.8rem;
  --ds-space-3: 1rem;
  --ds-space-4: 1.25rem;
  --ds-space-5: 1.6rem;
}

body {
  font-family: var(--ds-font-family);
  color: var(--ds-text);
  background:
    radial-gradient(circle at 8% 8%, rgba(15, 76, 129, 0.08) 0%, rgba(15, 76, 129, 0) 44%),
    radial-gradient(circle at 88% 0%, rgba(235, 124, 5, 0.1) 0%, rgba(235, 124, 5, 0) 42%),
    var(--ds-bg);
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(15, 76, 129, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 76, 129, 0.03) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.35;
}

#app,
.auth-gateway {
  position: relative;
  z-index: 1;
}

.header {
  background: rgba(255, 255, 255, 0.9);
  color: var(--ds-text);
  border-bottom: 1px solid var(--ds-border);
  box-shadow: var(--ds-shadow-sm);
  backdrop-filter: blur(12px);
  padding: 0.95rem 1.6rem;
}

.header-title h1 {
  color: var(--ds-accent);
  font-weight: 800;
}

.header-title p {
  color: var(--ds-text-muted);
  opacity: 1;
}

.card,
.auth-panel,
.session-dialog,
.archive-chat-panel {
  background: var(--ds-surface);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-lg);
  box-shadow: var(--ds-shadow-md);
}

.card-header {
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
  border-bottom-color: var(--ds-border);
}

.card-header h2 {
  color: var(--ds-accent);
}

.feature-menu-panel .card {
  background: linear-gradient(200deg, #f7fbff 0%, #f1f7ff 48%, #ffffff 100%);
}

.feature-menu-btn {
  border: 1px solid transparent;
  border-radius: var(--ds-radius-md);
  color: var(--ds-text);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.feature-menu-btn:hover {
  transform: translateY(-1px);
  border-color: #cbdcf0;
  background: #ffffff;
  box-shadow: 0 10px 20px rgba(22, 50, 79, 0.12);
}

.feature-menu-btn.active {
  background: linear-gradient(135deg, rgba(235, 124, 5, 0.16) 0%, rgba(235, 124, 5, 0.08) 100%);
  color: #8f4500;
  border-color: rgba(235, 124, 5, 0.34);
  box-shadow: 0 10px 18px rgba(235, 124, 5, 0.16);
}

.report-metric {
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-md);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: var(--ds-shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.report-metric:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(17, 45, 72, 0.14);
}

.report-metric-label {
  color: var(--ds-text-muted);
}

.report-metric-value {
  color: var(--ds-accent);
}

.archive-item,
.report-cv-item,
.dossier-item-card {
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-md);
  background: #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.archive-item:hover,
.report-cv-item:hover,
.dossier-item-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--ds-shadow-sm);
  border-color: #c4d8ee;
}

.btn {
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--ds-primary) 0%, #ff9f2d 100%);
  border-color: var(--ds-primary);
  box-shadow: 0 10px 20px rgba(235, 124, 5, 0.24);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--ds-primary-hover) 0%, #f28b13 100%);
  border-color: var(--ds-primary-hover);
  box-shadow: 0 14px 24px rgba(235, 124, 5, 0.28);
}

.btn-outline {
  border-color: #c5d7ea;
  color: var(--ds-accent);
  background: #ffffff;
}

.btn-outline:hover {
  border-color: #9db9d7;
  background: var(--ds-accent-soft);
  color: #083761;
}

.tab-btn,
.settings-tab-btn {
  border-radius: 11px;
  border: 1px solid transparent;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.tab-btn:hover,
.settings-tab-btn:hover {
  transform: translateY(-1px);
  border-color: #c9daed;
  background: #f7fbff;
}

.tab-btn.active,
.settings-tab-btn.active {
  background: linear-gradient(135deg, rgba(15, 76, 129, 0.14) 0%, rgba(15, 76, 129, 0.06) 100%);
  border-color: rgba(15, 76, 129, 0.28);
  color: var(--ds-accent);
  box-shadow: 0 8px 18px rgba(15, 76, 129, 0.12);
}

.settings-configuration-section {
  margin-top: 1.15rem;
}

/* Sezioni impostazioni piatte e con spaziatura uniforme in entrambi i temi. */
.settings-panel .report-body {
  gap: 1rem;
}

.settings-config-tabs{
  margin-bottom: 0.9rem;
}

.hr-card-badge,
.pro-badge,
.menu-notification-badge {
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hr-card-badge {
  color: var(--ds-accent);
  border: 1px solid #c3d8ef;
  background: #eef5ff;
}

.pro-badge {
  color: #9a4a00;
  border: 1px solid #f0bf8a;
  background: #fff1e2;
}

.menu-notification-badge {
  color: #ffffff;
  background: linear-gradient(135deg, #1b66ac 0%, #0f4c81 100%);
  box-shadow: 0 8px 16px rgba(15, 76, 129, 0.24);
}

#authUserBadge {
  padding: 0.42rem 0.72rem;
}

.photo-preview {
  border-radius: 14px;
  border: 1px dashed #b6cbe2;
  background: linear-gradient(180deg, #f9fcff 0%, #eef5ff 100%);
}

.photo-preview img {
  border-radius: 10px;
}

.toast-container {
  gap: 0.72rem;
}

.toast {
  border-radius: 12px;
  border: 1px solid #d2e1f1;
  background: #ffffff;
  color: #164066;
  box-shadow: 0 14px 28px rgba(20, 49, 77, 0.16);
  animation: toastInPremium 0.32s ease;
}

.toast.success {
  border-left: 4px solid #1f9d58;
}

.toast.error {
  border-left: 4px solid #dc4d39;
}

.toast.info {
  border-left: 4px solid #0f4c81;
}

.archive-chat-toggle {
  box-shadow: var(--ds-shadow-lg);
}

:is(button, a, input, select, textarea):focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(26, 95, 156, 0.22);
}

@keyframes toastInPremium {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

body.theme-dark {
  --ds-bg: #111c29;
  --ds-surface: #1a2736;
  --ds-surface-soft: #202f41;
  --ds-text: #e6eef8;
  --ds-text-muted: #9db3c8;
  --ds-border: #2f4359;
  --ds-accent-soft: rgba(58, 108, 156, 0.22);
}

body.theme-dark .header {
  background: rgba(16, 25, 37, 0.9);
}

body.theme-dark .card,
body.theme-dark .auth-panel,
body.theme-dark .archive-chat-panel,
body.theme-dark .session-dialog {
  background: var(--ds-surface);
  border-color: var(--ds-border);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.34);
}

body.theme-dark .btn-outline {
  background: rgba(20, 33, 47, 0.75);
  border-color: #3b536b;
  color: #c9dbee;
}

body.theme-dark .feature-menu-btn:hover,
body.theme-dark .archive-item:hover,
body.theme-dark .report-cv-item:hover,
body.theme-dark .dossier-item-card:hover {
  border-color: #4f6c89;
}

/* ========================================
   Premium Refinement Pass
======================================== */

:root {
  --ds-focus-ring: 0 0 0 3px rgba(15, 76, 129, 0.24);
}

.main-content {
  gap: 1.75rem;
}

.report-header p,
.archive-header p,
.header-title p,
.report-metric-label {
  color: #4f6983;
}

.feature-menu-panel .card-header {
  padding-bottom: 0.85rem;
}

.feature-menu-panel .feature-menu-body {
  padding: 0.72rem;
  gap: 0.45rem;
}

.feature-menu-btn {
  min-height: 42px;
  position: relative;
  font-weight: 700;
}

.feature-menu-btn::after {
  content: "";
  position: absolute;
  left: 0.38rem;
  top: 50%;
  width: 3px;
  height: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, #ff9f2d 0%, #eb7c05 100%);
  transform: translateY(-50%);
  transition: height 0.18s ease, opacity 0.18s ease;
  opacity: 0;
}

.feature-menu-btn.active::after {
  opacity: 1;
  height: 62%;
}

.feature-menu-btn .label-with-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.header {
  position: sticky;
  top: 0;
  z-index: 60;
}

.card-header h2,
.archive-item-title,
.report-cv-title,
.tab-btn.active,
.settings-tab-btn.active {
  letter-spacing: -0.01em;
}

.btn,
.tab-btn,
.settings-tab-btn,
.feature-menu-btn,
.archive-item,
.report-cv-item,
.report-metric {
  will-change: transform;
}

.btn:focus-visible,
.tab-btn:focus-visible,
.settings-tab-btn:focus-visible,
.feature-menu-btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  box-shadow: var(--ds-focus-ring);
}

.toast {
  min-width: 240px;
  max-width: min(92vw, 400px);
  font-weight: 600;
}

.archive-chat-toggle {
  border: 1px solid rgba(255, 255, 255, 0.58);
}

.archive-chat-toggle:hover {
  transform: translateY(-2px) scale(1.02);
}

.photo-preview {
  width: 136px;
  height: 136px;
  min-height: 136px;
}

@media (max-width: 1024px) {
  .main-content {
    gap: 1rem;
  }

  .header {
    padding: 0.82rem 0.92rem;
  }

  .feature-menu-panel .feature-menu-body {
    padding: 0.62rem;
    gap: 0.5rem;
  }

  .feature-menu-btn {
    min-height: 40px;
  }
}

@media (max-width: 700px) {
  .card {
    border-radius: 14px;
  }

  .card-header,
  .card-body,
  .tab-content {
    padding-left: 0.8rem;
    padding-right: 0.8rem;
  }

  .feature-menu-panel .feature-menu-body {
    padding: 0.5rem;
    gap: 0.45rem;
    scroll-padding: 0.45rem;
  }

  .feature-menu-btn {
    min-height: 38px;
    border-radius: 10px;
    padding: 0.52rem 0.62rem;
  }

  .feature-menu-btn::after {
    left: 0.28rem;
  }

  .btn {
    min-height: 38px;
  }

  .report-metric {
    padding: 0.72rem 0.8rem;
  }
}

@media (max-width: 480px) {
  .photo-preview {
    width: 112px;
    height: 112px;
    min-height: 112px;
  }

  .header {
    padding: 0.72rem 0.62rem;
  }

  .header-title h1 {
    font-size: 1.06rem;
  }

  .header-title p {
    font-size: 0.75rem;
  }

  .main-content {
    padding: 0.72rem 0.45rem 1rem;
    gap: 0.72rem;
  }

  .feature-menu-panel .feature-menu-body {
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid #d8e6f4;
  }

  .feature-menu-btn {
    font-size: 0.75rem;
    min-height: 36px;
  }

  .toast-container {
    right: 0.52rem;
    left: 0.52rem;
  }

  .toast {
    width: 100%;
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .tab-btn,
  .settings-tab-btn,
  .feature-menu-btn,
  .archive-item,
  .report-cv-item,
  .report-metric,
  .archive-chat-toggle,
  .toast {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
}

body.theme-dark .report-header p,
body.theme-dark .archive-header p,
body.theme-dark .header-title p,
body.theme-dark .report-metric-label {
  color: #a9bfd4;
}

body.theme-dark .feature-menu-btn.active {
  color: #ffd8b0;
  border-color: rgba(235, 124, 5, 0.48);
}

body.theme-dark .feature-menu-panel .feature-menu-body {
  background: rgba(20, 35, 49, 0.54);
  border-radius: 12px;
}

body.theme-dark .feature-menu-btn::after {
  background: linear-gradient(180deg, #ffb76a 0%, #eb7c05 100%);
}

.archive-empty-rich {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 0.5rem;
  padding: 1.05rem 0.9rem;
  border-radius: 14px;
  border: 1px dashed #c7d8ea;
  background: linear-gradient(180deg, #fbfdff 0%, #f2f8ff 100%);
}

.archive-empty-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(15, 76, 129, 0.14) 0%, rgba(15, 76, 129, 0.07) 100%);
  border: 1px solid #c9dcef;
  color: #0f4c81;
}

.archive-empty-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.archive-empty-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  color: #143a60;
}

.archive-empty-text {
  margin: 0;
  font-size: 0.82rem;
  color: #2e4f6e;
}

.archive-empty-helper {
  margin: 0;
  font-size: 0.76rem;
  color: #6a8098;
}

.archive-empty-actions {
  margin-top: 0.2rem;
}

.archive-empty-actions .archive-empty-action {
  min-width: 148px;
}

@media (min-width: 1025px) {
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature]::before {
    content: "";
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    background-color: currentColor;
    -webkit-mask: var(--feature-menu-icon) center / contain no-repeat;
    mask: var(--feature-menu-icon) center / contain no-repeat;
  }

  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="home"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 3 2 12h3v8h6v-6h2v6h6v-8h3L12 3Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="my-profile"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 12c2.761 0 5-2.239 5-5s-2.239-5-5-5-5 2.239-5 5 2.239 5 5 5Zm0 2c-3.866 0-7 3.134-7 7v1h14v-1c0-3.866-3.134-7-7-7Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="my-team"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 11a3 3 0 1 1 0-6 3 3 0 0 1 0 6Zm10 0a3 3 0 1 1 0-6 3 3 0 0 1 0 6ZM7 13c2.8 0 5 2.2 5 5v1H2v-1c0-2.8 2.2-5 5-5Zm10 0c2.8 0 5 2.2 5 5v1H12v-1c0-2.8 2.2-5 5-5Zm-5-2h0a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm0 2c2.3 0 4.2 1.6 4.8 3.8V19H7.2v-2.2A5 5 0 0 1 12 13Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="coach"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 5a3 3 0 0 1 3-3h10a3 3 0 0 1 3 3v7a3 3 0 0 1-3 3H10l-4.5 4a.5.5 0 0 1-.84-.37V15A3 3 0 0 1 2 12V5h2Zm3-1a1 1 0 0 0-1 1v8h11a1 1 0 0 0 1-1V5a1 1 0 0 0-1-1H7Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="dashboard"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 3h8v8H3V3Zm10 0h8v5h-8V3ZM3 13h5v8H3v-8Zm7 0h11v8H10v-8Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="hr"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 19h16v2H4zM6 10h3v7H6zm5-4h3v11h-3zm5 2h3v9h-3z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="hidden-gems"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='m12 2 7 4v6c0 5.25-3.438 9.74-7 11-3.562-1.26-7-5.75-7-11V6l7-4Zm0 3.05L7 7.89v4.06c0 4.2 2.64 7.86 5 8.95 2.36-1.09 5-4.75 5-8.95V7.89l-5-2.84Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="position-matching"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm0 2a8 8 0 1 1 0 16 8 8 0 0 1 0-16Zm0 3a5 5 0 1 0 0 10 5 5 0 0 0 0-10Zm0 2a3 3 0 1 1 0 6 3 3 0 0 1 0-6Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="timesheet"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 2h2v2h6V2h2v2h3a2 2 0 0 1 2 2v13a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3V6a2 2 0 0 1 2-2h3V2Zm13 8H4v9a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-9Zm-6 2v5h-2v-5h2Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="sickness"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M10 2h4v6h6v4h-6v6h-4v-6H4V8h6V2Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="sickness-team"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M10 2h4v3h3v4h-3v3h-4V9H7V5h3V2Zm-4 11h12v2H6v-2Zm0 4h12v2H6v-2Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="travel"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M10 2h4a2 2 0 0 1 2 2v1h3a2 2 0 0 1 2 2v5a2 2 0 0 1-1 1.73V19a2 2 0 0 1-2 2h-2v-2h2v-6H6v6h2v2H6a2 2 0 0 1-2-2v-5.27A2 2 0 0 1 3 11V7a2 2 0 0 1 2-2h3V4a2 2 0 0 1 2-2Zm0 3h4V4h-4v1Zm-5 5h14V7H5v3Zm2 7h2v2H7v-2Zm8 0h2v2h-2v-2Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="travel-approve"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M10 2h4a2 2 0 0 1 2 2v1h3a2 2 0 0 1 2 2v5a2 2 0 0 1-1 1.73V19a2 2 0 0 1-2 2h-2v-2h2v-6H6v6h2v2H6a2 2 0 0 1-2-2v-5.27A2 2 0 0 1 3 11V7a2 2 0 0 1 2-2h3V4a2 2 0 0 1 2-2Zm0 3h4V4h-4v1Zm-5 5h14V7H5v3Zm7 4.2 3.4 3.4 1.4-1.4-4.8-4.8-2.2 2.2-1.4-1.4-1.4 1.4 2.6 2.6 2.8-2.8Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="timesheet-employee"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 5a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V5Zm2 0v3h12V5H6Zm0 5v9h12v-9H6Zm2 2h4v2H8v-2Zm0 4h8v2H8v-2Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="vacation"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 20h10a4 4 0 0 0 0-8 5 5 0 0 0-9.8-1.4A4 4 0 0 0 7 20Zm10-2H7a2 2 0 1 1 .28-3.98l1.2.17.36-1.16a3 3 0 0 1 5.88.84v.13H17a2 2 0 1 1 0 4Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="vacation-approve"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M8 2h2v2h4V2h2v2h3a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h3V2Zm11 8H5v10h14V10Zm-8.3 5.3 5.2-5.2 1.4 1.4-6.6 6.6-3.1-3.1 1.4-1.4 1.7 1.7Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="recruiting"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M10 2a8 8 0 1 1 4.9 14.34l4.38 4.38-1.42 1.42-4.38-4.38A8 8 0 0 1 10 2Zm0 2a6 6 0 1 0 0 12 6 6 0 0 0 0-12Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="onboarding"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2 3 7v5c0 5.25 3.44 9.74 9 11 5.56-1.26 9-5.75 9-11V7l-9-5Zm0 3.2 6.8 3.78V12c0 4.23-2.62 7.8-6.8 8.95C7.82 19.8 5.2 16.23 5.2 12V8.98L12 5.2Zm-1 4.3v3H8v2h3v3h2v-3h3v-2h-3v-3h-2Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="offboarding"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 7a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3V7Zm3-1a1 1 0 0 0-1 1v2h14V7a1 1 0 0 0-1-1H6Zm13 5H5v6a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-6Zm-8 2h2v2h-2v-2Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="support"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 4h16a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-7l-5 4v-4H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Zm2 4v2h12V8H6Zm0 4v2h8v-2H6Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="support-mine"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M5 4h14a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Zm2 4v2h10V8H7Zm0 4v2h7v-2H7Zm0 4v2h5v-2H7Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="assets"],
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="my-assets"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 5a3 3 0 0 1 3-3h10a3 3 0 0 1 3 3v14a3 3 0 0 1-3 3H7a3 3 0 0 1-3-3V5Zm3-1a1 1 0 0 0-1 1v10h12V5a1 1 0 0 0-1-1H7Zm11 13H6v2a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1v-2Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="organization"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 11a3 3 0 1 1 0-6 3 3 0 0 1 0 6Zm10 0a3 3 0 1 1 0-6 3 3 0 0 1 0 6ZM7 13c2.8 0 5 2.2 5 5v1H2v-1c0-2.8 2.2-5 5-5Zm10 0c2.8 0 5 2.2 5 5v1H12v-1c0-2.8 2.2-5 5-5Zm-5-2h0a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm0 2c2.3 0 4.2 1.6 4.8 3.8V19H7.2v-2.2A5 5 0 0 1 12 13Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="employee-config"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm0 18a8 8 0 1 1 0-16 8 8 0 0 1 0 16Zm1-13h-2v6l5 3 1-1.73-4-2.37V7Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="kpi-config"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm0 2a8 8 0 1 1 0 16 8 8 0 0 1 0-16Zm0 3a5 5 0 1 0 0 10 5 5 0 0 0 0-10Zm0 2a3 3 0 1 1 0 6 3 3 0 0 1 0-6Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="settings"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='m19.14 12.94.03-.94-.03-.94 2.03-1.58a.5.5 0 0 0 .12-.64l-1.92-3.32a.5.5 0 0 0-.6-.22l-2.39.96a7.5 7.5 0 0 0-1.62-.94l-.36-2.54a.5.5 0 0 0-.5-.42h-3.84a.5.5 0 0 0-.5.42l-.36 2.54c-.57.23-1.11.55-1.62.94l-2.39-.96a.5.5 0 0 0-.6.22L2.7 8.84a.5.5 0 0 0 .12.64l2.03 1.58-.03.94.03.94L2.82 14.52a.5.5 0 0 0-.12.64l1.92 3.32c.13.23.4.32.64.22l2.35-.94c.5.39 1.05.71 1.65.95l.36 2.51c.04.24.25.42.5.42h3.84a.5.5 0 0 0 .5-.42l.36-2.51c.6-.24 1.15-.56 1.65-.95l2.35.94c.24.1.51.01.64-.22l1.92-3.32a.5.5 0 0 0-.12-.64l-2.03-1.58ZM12 15.5A3.5 3.5 0 1 1 12 8a3.5 3.5 0 0 1 0 7.5Z'/%3E%3C/svg%3E"); }

  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="vacation-approve"]::before {
    display: none !important;
    content: none !important;
  }

  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="support"]::before,
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="support-mine"]::before {
    display: none !important;
    content: none !important;
  }

  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="vacation-approve"] {
    display: flex;
    align-items: center;
    gap: 0.45rem;
  }

  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="vacation-approve"] .feature-menu-inline-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.2rem;
    height: 1.2rem;
    flex: 0 0 1.2rem;
    color: currentColor;
  }

  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="vacation-approve"] .feature-menu-inline-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
  }
}

body.theme-dark .archive-empty-rich {
  border-color: #476483;
  background: linear-gradient(180deg, #203041 0%, #1a2736 100%);
}

body.theme-dark .archive-empty-icon {
  border-color: #4b6885;
  background: rgba(76, 128, 179, 0.2);
  color: #c8def6;
}

body.theme-dark .archive-empty-title {
  color: #d7e8fa;
}

body.theme-dark .archive-empty-text {
  color: #b6c9db;
}

body.theme-dark .archive-empty-helper {
  color: #8ea5bb;
}

/* ========================================
   Skeleton Loading + Premium Dialogs
======================================== */

.archive-loading-skeleton {
  display: grid;
  gap: 0.68rem;
}

.archive-skeleton-card {
  border: 1px solid #dbe8f5;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  padding: 0.78rem;
  display: grid;
  gap: 0.45rem;
}

.skeleton-card-report {
  border-color: #d6e5f4;
  background: linear-gradient(180deg, #ffffff 0%, #f5faff 100%);
}

.archive-skeleton-line,
.archive-skeleton-chip {
  position: relative;
  overflow: hidden;
  background: #e4edf7;
  border-radius: 999px;
}

.archive-skeleton-line::after,
.archive-skeleton-chip::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, rgba(228, 237, 247, 0) 0%, rgba(255, 255, 255, 0.7) 50%, rgba(228, 237, 247, 0) 100%);
  animation: skeletonShimmer 1.25s ease-in-out infinite;
}

.archive-skeleton-line {
  height: 11px;
}

.archive-skeleton-line.w-92 { width: 92%; }
.archive-skeleton-line.w-80 { width: 80%; }
.archive-skeleton-line.w-70 { width: 70%; }
.archive-skeleton-line.w-45 { width: 45%; }

.archive-skeleton-actions {
  margin-top: 0.25rem;
  display: inline-flex;
  gap: 0.42rem;
}

.archive-skeleton-chip {
  width: 84px;
  height: 24px;
  border-radius: 10px;
}

@keyframes skeletonShimmer {
  100% {
    transform: translateX(100%);
  }
}

.session-dialog-overlay,
.hr-zoom-modal {
  backdrop-filter: blur(6px);
}

.session-dialog-overlay {
  background: linear-gradient(180deg, rgba(13, 24, 38, 0.55) 0%, rgba(13, 24, 38, 0.45) 100%);
}

.session-dialog {
  width: min(520px, 94vw);
  border-radius: 16px;
  border: 1px solid #d7e5f3;
  box-shadow: 0 24px 50px rgba(13, 31, 49, 0.28);
  overflow: hidden;
}

.session-dialog-header {
  padding: 1.15rem 1.2rem;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.session-dialog-header h2 {
  font-size: 1.14rem;
  font-weight: 800;
  color: #133c62;
}

.session-dialog-body {
  padding: 1.15rem 1.2rem;
}

.session-dialog-footer {
  padding: 0.88rem 1.2rem 1.05rem;
  background: linear-gradient(180deg, #f9fcff 0%, #f3f8ff 100%);
  border-top-color: #dbe7f3;
}

.translation-dialog-card {
  width: min(620px, 96vw);
  max-width: 620px;
}

.translation-dialog-card .session-dialog-body {
  max-height: min(66vh, 560px);
  overflow: auto;
}

.translation-dialog-header {
  position: sticky;
  top: 0;
  z-index: 2;
}

.hr-zoom-modal {
  background: linear-gradient(180deg, rgba(12, 24, 38, 0.58) 0%, rgba(12, 24, 38, 0.48) 100%);
}

.hr-zoom-dialog {
  border-color: #d6e5f4;
  box-shadow: 0 30px 60px rgba(10, 24, 39, 0.34);
}

.hr-zoom-header {
  padding: 1rem 1.1rem;
  background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
}

.hr-zoom-body {
  padding: 1.1rem;
}

body.theme-dark .archive-skeleton-card {
  border-color: #3f5770;
  background: linear-gradient(180deg, #213244 0%, #1a2838 100%);
}

body.theme-dark .archive-skeleton-line,
body.theme-dark .archive-skeleton-chip {
  background: #3b546e;
}

body.theme-dark .archive-skeleton-line::after,
body.theme-dark .archive-skeleton-chip::after {
  background: linear-gradient(90deg, rgba(59, 84, 110, 0) 0%, rgba(173, 198, 223, 0.38) 50%, rgba(59, 84, 110, 0) 100%);
}

body.theme-dark .session-dialog-overlay,
body.theme-dark .hr-zoom-modal {
  background: linear-gradient(180deg, rgba(6, 11, 17, 0.72) 0%, rgba(6, 11, 17, 0.62) 100%);
}

body.theme-dark .session-dialog {
  border-color: #466180;
  box-shadow: 0 30px 58px rgba(0, 0, 0, 0.45);
}

body.theme-dark .session-dialog-header,
body.theme-dark .session-dialog-footer,
body.theme-dark .hr-zoom-header {
  background: linear-gradient(180deg, #24374b 0%, #1d2d3f 100%);
  border-color: #405b77;
}

body.theme-dark .session-dialog-header h2 {
  color: #d8eafd;
}

body.theme-dark .app-text-input-control {
  color: #d8eafd;
  background: #182638;
  border-color: #405b77;
}

body.theme-dark .app-text-input-helper {
  color: #a9bed4;
}

body.theme-dark .app-text-input-dialog-number .session-dialog-header {
  background: linear-gradient(135deg, rgba(240, 130, 29, 0.18), #1d2d3f);
}

body.theme-dark .app-text-input-dialog-number .app-text-input-control {
  color: #ffd7a8;
  background: linear-gradient(180deg, rgba(240, 130, 29, 0.13), rgba(24, 38, 56, 0.96));
  border-color: rgba(251, 146, 60, 0.42);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

@media (prefers-reduced-motion: reduce) {
  .archive-skeleton-line::after,
  .archive-skeleton-chip::after {
    animation: none;
  }
}

/* ========================================
   Icon Consistency + Unified State Variants
======================================== */

.btn svg,
.tab-btn svg,
.editor-more-menu-item svg,
.archive-chat-toggle svg,
.archive-chat-header-actions .btn svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-sm svg {
  width: 16px;
  height: 16px;
  flex-basis: 16px;
}

.tab-btn svg {
  color: #3a638a;
}

.tab-btn.active svg {
  color: #0f4c81;
}

.settings-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.settings-tab-btn::before {
  content: "";
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  background-color: currentColor;
  -webkit-mask: var(--settings-tab-icon) center / contain no-repeat;
  mask: var(--settings-tab-icon) center / contain no-repeat;
  opacity: 0.92;
}

#settingsTabAppearanceBtn { --settings-tab-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2c5.523 0 10 4.477 10 10 0 2.21-1.79 4-4 4h-1a2 2 0 0 0-2 2v1a3 3 0 0 1-3 3C6.477 22 2 17.523 2 12S6.477 2 12 2Zm-4 8a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm8 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z'/%3E%3C/svg%3E"); }
#settingsTabPermissionsBtn { --settings-tab-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2 4 5v6c0 5 3.4 9.3 8 10.7 4.6-1.4 8-5.7 8-10.7V5l-8-3Zm0 4.2L17 8v3c0 3.65-2.3 6.87-5 7.9-2.7-1.03-5-4.25-5-7.9V8l5-1.8Zm-1 3.8h2v4h-2v-4Zm0 5h2v2h-2v-2Z'/%3E%3C/svg%3E"); }
#settingsTabUsersBtn { --settings-tab-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M16 11a4 4 0 1 0-3.999-4A4 4 0 0 0 16 11Zm-8 1a3 3 0 1 0-2.999-3A3 3 0 0 0 8 12Zm8 2c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4ZM8 14c-.34 0-.72.02-1.12.06A5.98 5.98 0 0 0 4 19v3h4v-3c0-1.58.58-2.89 1.5-3.86-.48-.08-.98-.14-1.5-.14Z'/%3E%3C/svg%3E"); }
#settingsTabRolesBtn { --settings-tab-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2a5 5 0 0 0-2 9.58V14H8a2 2 0 0 0-2 2v6h12v-6a2 2 0 0 0-2-2h-2v-2.42A5 5 0 0 0 12 2Zm0 2a3 3 0 1 1 0 6 3 3 0 0 1 0-6Zm-2 12h4v4h-4v-4Z'/%3E%3C/svg%3E"); }
#settingsTabHolidaysBtn { --settings-tab-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 2h2v2h6V2h2v2h3a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h3V2Zm13 8H4v10h16V10ZM6 8h12V6H6v2Zm4 4h4v4h-4v-4Z'/%3E%3C/svg%3E"); }
#settingsTabSecurityBtn { --settings-tab-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M17 9h-1V7a4 4 0 1 0-8 0v2H7a2 2 0 0 0-2 2v9h14v-9a2 2 0 0 0-2-2Zm-7-2a2 2 0 1 1 4 0v2h-4V7Zm2 10a2 2 0 1 1 0-4 2 2 0 0 1 0 4Z'/%3E%3C/svg%3E"); }
#settingsTabAuditBtn { --settings-tab-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M5 3h11l5 5v13a1 1 0 0 1-1 1H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2Zm10 1.5V9h4.5L15 4.5ZM8 13h8v1.5H8V13Zm0 3h8v1.5H8V16Zm0-6h5v1.5H8V10Z'/%3E%3C/svg%3E"); }

.settings-holidays-table td input,
.settings-holidays-table td select {
  width: 100%;
}

.settings-holiday-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
}

.settings-holiday-row-actions {
  white-space: nowrap;
}

.settings-holiday-auto-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 251, 255, 0.92) 100%);
}

.settings-holidays-table {
  min-width: 860px;
}

.settings-holidays-table thead th {
  background: linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
}

.settings-holidays-table tbody tr:hover td {
  background: #f9fcff;
}

.settings-holidays-table td {
  vertical-align: middle;
}

.settings-holidays-table td input,
.settings-holidays-table td select {
  min-height: 38px;
}

.settings-holidays-table td:nth-child(1) {
  min-width: 260px;
}

.settings-holidays-table td:nth-child(2),
.settings-holidays-table td:nth-child(3) {
  width: 120px;
}

.settings-holidays-table td:nth-child(4) {
  width: 120px;
}

.settings-holidays-table td:nth-child(5) {
  width: 110px;
}

.settings-role-visible-block {
  margin-top: 1rem;
}

.settings-role-visible-list {
  display: grid;
  gap: 0.65rem;
}

body.theme-dark .settings-user-meta-type,
body.theme-dark .settings-user-meta-hours {
  background: rgba(15, 23, 33, 0.72);
  border-color: rgba(88, 115, 147, 0.28);
}
body.theme-dark .settings-holidays-table thead th {
  background: linear-gradient(180deg, rgba(23, 35, 50, 0.95) 0%, rgba(18, 28, 40, 0.95) 100%);
}

body.theme-dark .settings-holiday-auto-item {
  background: linear-gradient(180deg, rgba(18, 28, 40, 0.95) 0%, rgba(14, 23, 34, 0.95) 100%);
}

.ui-state-card.ui-state-loading .ui-state-icon {
  background: linear-gradient(135deg, rgba(15, 76, 129, 0.2) 0%, rgba(15, 76, 129, 0.12) 100%);
}

.ui-state-card.ui-state-loading .ui-state-icon svg {
  animation: uiStateSpin 1.2s linear infinite;
}

.ui-state-card.ui-state-error {
  border-color: #f2c5c1;
  background: linear-gradient(180deg, #fff8f8 0%, #fff1f1 100%);
}

.ui-state-card.ui-state-error .ui-state-icon {
  border-color: #efc0bc;
  background: linear-gradient(135deg, rgba(214, 72, 56, 0.14) 0%, rgba(214, 72, 56, 0.08) 100%);
  color: #b93a2c;
}

.ui-state-card.ui-state-chat.ui-state-compact {
  gap: 0.35rem;
  padding: 0.78rem 0.65rem;
}

.ui-state-card.ui-state-chat.ui-state-compact .archive-empty-icon {
  width: 36px;
  height: 36px;
}

.ui-state-card.ui-state-chat.ui-state-compact .archive-empty-title {
  font-size: 0.84rem;
}

.ui-state-card.ui-state-chat.ui-state-compact .archive-empty-text {
  font-size: 0.76rem;
}

@keyframes uiStateSpin {
  to {
    transform: rotate(360deg);
  }
}

body.theme-dark .tab-btn svg {
  color: #9fb8d1;
}

body.theme-dark .tab-btn.active svg {
  color: #d6e8fb;
}

body.theme-dark .ui-state-card.ui-state-error {
  border-color: #7f4a49;
  background: linear-gradient(180deg, #3a2425 0%, #311d1f 100%);
}

body.theme-dark .ui-state-card.ui-state-error .ui-state-icon {
  border-color: #8e5555;
  color: #ffc4bf;
}

/* ========================================
   CSS Consolidation + A11y Contrast
======================================== */

:root {
  --ui-surface-card: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  --ui-border-soft: #d5e4f2;
  --ui-text-primary: #193f63;
  --ui-text-secondary: #355977;
  --ui-text-tertiary: #547089;
  --ui-radius-card: 14px;
  --ui-focus-ring-strong: 0 0 0 3px rgba(15, 76, 129, 0.3);
}

:is(.archive-empty-rich, .archive-skeleton-card, .session-dialog, .hr-zoom-dialog) {
  border-radius: var(--ui-radius-card);
}

.archive-empty-rich {
  border-color: var(--ui-border-soft);
  background: var(--ui-surface-card);
}

.archive-empty-title {
  color: var(--ui-text-primary);
}

.archive-empty-text,
.session-dialog-body {
  color: var(--ui-text-secondary);
}

.archive-empty-helper {
  color: var(--ui-text-tertiary);
}

.archive-skeleton-card {
  border-color: var(--ui-border-soft);
}

.session-dialog {
  border-color: var(--ui-border-soft);
}

.session-dialog :is(button, input, select, textarea):focus-visible,
.hr-zoom-dialog :is(button, input, select, textarea):focus-visible {
  box-shadow: var(--ui-focus-ring-strong);
}

@media (prefers-reduced-motion: reduce) {
  .ui-state-card.ui-state-loading .ui-state-icon svg {
    animation: none;
  }
}

body.theme-dark {
  --ui-surface-card: linear-gradient(180deg, #243548 0%, #1d2b3b 100%);
  --ui-border-soft: #45617e;
  --ui-text-primary: #d7e8f9;
  --ui-text-secondary: #c0d3e6;
  --ui-text-tertiary: #97b0c6;
}

/* Profile + Dashboard Avatar Size */
.dossier-avatar {
  width: 76px;
  height: 76px;
}

.dossier-avatar-fallback {
  font-size: 1.2rem;
}

.employee-profile-avatar {
  width: 44px;
  height: 44px;
}

.employee-profile-avatar-fallback {
  font-size: 0.88rem;
}

@media (max-width: 700px) {
  .dossier-avatar {
    width: 64px;
    height: 64px;
  }

  .employee-profile-avatar {
    width: 40px;
    height: 40px;
  }
}

/* ========================================
   Mockup Layout (Desktop)
======================================== */

@media (min-width: 1025px) {
  body {
    background:
      radial-gradient(circle at 10% 120%, rgba(28, 92, 157, 0.08) 0%, rgba(28, 92, 157, 0) 44%),
      #eef2f8;
  }

  .header {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 1rem 1.2rem 0.2rem;
    backdrop-filter: none;
  }

  .header-content {
    max-width: none;
    justify-content: flex-end;
  }

  .header-logo-wrapper {
    display: none;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-end;
  }

  #authUserInfo {
    gap: 0.8rem !important;
    display: inline-flex !important;
    align-items: center;
  }

  #authUserBadge {
    padding: 0.56rem 0.92rem;
    border-radius: 16px;
    border: 1px solid #d7e2f0;
    background: #f8fbff;
    color: #1f3f61;
    font-size: 0.86rem;
    font-weight: 700;
  }

  #authUserInfo > .btn {
    min-height: 44px;
    border-radius: 14px;
    padding-left: 1.05rem;
    padding-right: 1.05rem;
    border-color: #cedced;
    background: #f8fbff;
  }

  .main-content {
    max-width: none;
    margin: 0;
    padding: 0.75rem 1rem 1rem;
    gap: 1.1rem;
    align-items: start;
  }

  #app.app-dashboard-mode .main-content,
  #app.app-hrinsights-mode .main-content,
  #app.app-hiddengems-mode .main-content,
  #app.app-dossier-mode .main-content,
  #app.app-settings-mode .main-content,
  #app.app-organization-mode .main-content,
  #app.app-vacation-mode .main-content,
  #app.app-timesheet-mode .main-content,
  #app.app-coach-mode .main-content,
  #app.app-onboarding-mode .main-content,
  #app.app-offboarding-mode .main-content,
  #app.app-asset-mode .main-content,
  #app:not(.menu-collapsed).app-dashboard-mode .main-content,
  #app:not(.menu-collapsed).app-hrinsights-mode .main-content,
  #app:not(.menu-collapsed).app-hiddengems-mode .main-content,
  #app:not(.menu-collapsed).app-dossier-mode .main-content,
  #app:not(.menu-collapsed).app-settings-mode .main-content,
  #app:not(.menu-collapsed).app-organization-mode .main-content,
  #app:not(.menu-collapsed).app-myteam-mode .main-content,
  #app:not(.menu-collapsed).app-vacation-mode .main-content,
  #app:not(.menu-collapsed).app-timesheet-mode .main-content,
  #app:not(.menu-collapsed).app-coach-mode .main-content,
  #app:not(.menu-collapsed).app-onboarding-mode .main-content,
  #app:not(.menu-collapsed).app-offboarding-mode .main-content,
  #app:not(.menu-collapsed).app-asset-mode .main-content {
    grid-template-columns: 270px minmax(0, 1fr) !important;
  }

  #app.app-workspace-mode .main-content,
  #app:not(.menu-collapsed).app-workspace-mode .main-content {
    grid-template-columns: 270px minmax(760px, 1.7fr) minmax(400px, 1fr) !important;
  }

  #app:not(.menu-collapsed) .feature-menu-panel {
    width: 270px;
  }

  #app:not(.menu-collapsed) .feature-menu-panel:hover,
  #app:not(.menu-collapsed) .feature-menu-panel:focus-within {
    width: 270px;
  }

  .feature-menu-panel {
    top: 0.7rem;
    max-height: calc(100vh - 1.2rem);
  }

  .feature-menu-panel .card.sticky {
    max-height: calc(100vh - 1.2rem);
    border-radius: 20px;
    border: 1px solid #dbe5f2;
    background: #f7f9fd;
    box-shadow: 0 18px 34px rgba(19, 43, 68, 0.08);
  }

  .feature-menu-brand {
    padding: 1.15rem 1.1rem 0.85rem;
    border-bottom: 1px solid #e3ebf5;
    background: #f7f9fd;
  }

  .feature-menu-brand-logo {
    width: 146px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
  }

  .feature-menu-header,
  #app:not(.menu-collapsed) .feature-menu-header,
  #app:not(.menu-collapsed) .feature-menu-panel:hover .feature-menu-header,
  #app:not(.menu-collapsed) .feature-menu-panel:focus-within .feature-menu-header {
    display: none !important;
  }

  .feature-menu-panel .feature-menu-body {
    padding: 0.72rem;
    gap: 0.45rem;
    overflow: auto;
  }

  .feature-menu-btn,
  #app:not(.menu-collapsed) .feature-menu-btn,
  #app:not(.menu-collapsed) .feature-menu-panel:hover .feature-menu-btn,
  #app:not(.menu-collapsed) .feature-menu-panel:focus-within .feature-menu-btn {
    justify-content: flex-start !important;
    gap: 0.68rem;
    min-height: 48px;
    padding: 0.72rem 0.82rem !important;
    border-radius: 14px;
    color: #2b4a6a;
    border: 1px solid transparent;
    background: transparent;
    box-shadow: none;
  }

  #app:not(.menu-collapsed) .feature-menu-btn > span,
  #app:not(.menu-collapsed) .feature-menu-panel:hover .feature-menu-btn > span,
  #app:not(.menu-collapsed) .feature-menu-panel:focus-within .feature-menu-btn > span {
    opacity: 1 !important;
    max-width: none !important;
    white-space: normal;
    overflow: visible;
  }

  .feature-menu-btn:hover {
    border-color: #d5e3f3;
    background: #ffffff;
    color: #173d63;
  }

  .feature-menu-btn.active {
    border-color: #ffd0a0;
    background: linear-gradient(180deg, #fff6ed 0%, #fff1df 100%);
    color: #da6e00;
    box-shadow: 0 8px 18px rgba(235, 124, 5, 0.14);
  }

  .report-panel .report-card,
  .hr-panel .report-card,
  .coach-panel .report-card,
  .hidden-gems-panel .report-card,
  .settings-panel .report-card,
  .vacation-panel .report-card,
  .timesheet-panel .report-card {
    border-radius: 22px;
    border: 1px solid #dbe6f3;
    box-shadow: 0 20px 36px rgba(20, 46, 74, 0.08);
    overflow: hidden;
    background: #f9fbff;
  }

  .report-card .card-header {
    padding: 1.35rem 1.4rem 1.05rem;
    background: #f6f8fc;
  }

  .report-header h2 {
    font-size: 2.6rem;
    line-height: 1.1;
    color: #0f2f55;
    letter-spacing: -0.02em;
  }

  #dashboardSubtitle {
    margin-top: 0.55rem;
    font-size: 1.04rem;
    color: #4f6984;
    font-weight: 500;
  }

  .report-header-actions .btn-primary {
    min-height: 48px;
    border-radius: 14px;
    padding: 0.7rem 1.25rem;
    font-size: 0.96rem;
  }

  .report-card .card-body {
    padding: 0.95rem 1.2rem 1.15rem;
    background: #ffffff;
  }

  .report-metrics {
    gap: 0.8rem;
    margin-bottom: 0.5rem;
  }

  .report-metric {
    position: relative;
    padding: 1.05rem 1rem 1rem 4rem;
    border-radius: 18px;
    border: 1px solid #dde8f5;
    background: #f9fbff;
    box-shadow: none;
  }

  .report-metric::before {
    content: "";
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #eef4ff;
    border: 1px solid #d8e5f4;
    -webkit-mask: var(--metric-icon) center / 22px no-repeat;
    mask: var(--metric-icon) center / 22px no-repeat;
    background-color: #4b63dd;
  }

  .report-metric:nth-child(1) { --metric-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M16 11c1.66 0 3-1.57 3-3.5S17.66 4 16 4s-3 1.57-3 3.5 1.34 3.5 3 3.5Zm-8 0c1.66 0 3-1.57 3-3.5S9.66 4 8 4 5 5.57 5 7.5 6.34 11 8 11Zm0 2c-2.67 0-8 1.34-8 4v3h10v-3c0-1.41.69-2.66 1.76-3.61C10.62 13.14 9.24 13 8 13Zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 2 1.97 3.45v3h7v-3c0-2.66-5.33-4-8-4Z'/%3E%3C/svg%3E"); }
  .report-metric:nth-child(2) { --metric-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2a10 10 0 1 0 10 10A10.01 10.01 0 0 0 12 2Zm7.93 9h-3.11a15.72 15.72 0 0 0-1.2-5A8.03 8.03 0 0 1 19.93 11ZM12 4.06A13.72 13.72 0 0 1 14.82 11H9.18A13.72 13.72 0 0 1 12 4.06ZM4.07 13h3.11a15.72 15.72 0 0 0 1.2 5A8.03 8.03 0 0 1 4.07 13Zm3.11-2H4.07a8.03 8.03 0 0 1 4.31-5 15.72 15.72 0 0 0-1.2 5ZM12 19.94A13.72 13.72 0 0 1 9.18 13h5.64A13.72 13.72 0 0 1 12 19.94ZM15.62 18a15.72 15.72 0 0 0 1.2-5h3.11a8.03 8.03 0 0 1-4.31 5Z'/%3E%3C/svg%3E"); }
  .report-metric:nth-child(3) { --metric-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M19 4h-1V2h-2v2H8V2H6v2H5a2 2 0 0 0-2 2v13a3 3 0 0 0 3 3h12a3 3 0 0 0 3-3V6a2 2 0 0 0-2-2Zm0 15a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V10h14v9Zm0-11H5V6h14v2ZM12 12h5v2h-5v-2Z'/%3E%3C/svg%3E"); background-color: #ef8a00; }

  .report-cv-list {
    gap: 0.88rem;
    margin-top: 0.55rem;
  }

  .report-cv-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    border-radius: 20px;
    border: 1px solid #dce8f5;
    background: #fdfefe;
    padding: 1rem 1.05rem;
    box-shadow: 0 10px 24px rgba(24, 47, 73, 0.06);
  }

  .report-cv-actions {
    gap: 0.62rem;
    align-items: flex-start;
  }

  .report-cv-actions .btn {
    min-height: 42px;
    border-radius: 12px;
    padding: 0.52rem 0.92rem;
  }

  .report-cv-main .employee-profile-card:not(.compact) {
    margin-top: 0.8rem;
    border-radius: 16px;
    border: 1px solid #e1ebf6;
    background: #fbfdff;
    padding: 0.9rem;
  }
}

/* ========================================
   SaaS Light Refresh (Dashboard-first)
======================================== */

:root {
  --saas-bg: #f4f6fb;
  --saas-surface: #ffffff;
  --saas-surface-soft: #f8faff;
  --saas-text: #12213f;
  --saas-text-muted: #657795;
  --saas-border: #e5ebf4;
  --saas-accent: #ff8a00;
  --saas-accent-strong: #ee7300;
  --saas-pill: #ebf4ff;
  --saas-success: #17b26a;
  --saas-warning: #f79009;
  --saas-shadow-sm: 0 8px 24px rgba(19, 38, 69, 0.06);
  --saas-shadow-md: 0 16px 36px rgba(19, 38, 69, 0.08);
  --saas-radius-lg: 20px;
  --saas-radius-md: 16px;
  --saas-radius-sm: 12px;
}

body:not(.theme-dark) {
  background:
    radial-gradient(circle at 0% 100%, rgba(46, 123, 255, 0.08) 0%, rgba(46, 123, 255, 0) 42%),
    linear-gradient(180deg, #f7f9fe 0%, #f3f6fb 100%);
  color: var(--saas-text);
}

@media (min-width: 1025px) {
  .main-content {
    max-width: 1440px;
    margin: 0 auto;
    padding: 1.1rem 1.1rem 1.8rem;
    gap: 1.25rem;
  }

  #app.app-dashboard-mode .main-content,
  #app.app-hrinsights-mode .main-content,
  #app.app-hiddengems-mode .main-content,
  #app.app-dossier-mode .main-content,
  #app.app-settings-mode .main-content,
  #app.app-organization-mode .main-content,
  #app.app-myteam-mode .main-content,
  #app.app-vacation-mode .main-content,
  #app.app-timesheet-mode .main-content,
  #app.app-coach-mode .main-content,
  #app.app-onboarding-mode .main-content,
  #app.app-offboarding-mode .main-content,
  #app.app-asset-mode .main-content,
  #app:not(.menu-collapsed).app-dashboard-mode .main-content,
  #app:not(.menu-collapsed).app-hrinsights-mode .main-content,
  #app:not(.menu-collapsed).app-hiddengems-mode .main-content,
  #app:not(.menu-collapsed).app-dossier-mode .main-content,
  #app:not(.menu-collapsed).app-settings-mode .main-content,
  #app:not(.menu-collapsed).app-organization-mode .main-content,
  #app:not(.menu-collapsed).app-myteam-mode .main-content,
  #app:not(.menu-collapsed).app-vacation-mode .main-content,
  #app:not(.menu-collapsed).app-timesheet-mode .main-content,
  #app:not(.menu-collapsed).app-coach-mode .main-content,
  #app:not(.menu-collapsed).app-onboarding-mode .main-content,
  #app:not(.menu-collapsed).app-offboarding-mode .main-content,
  #app:not(.menu-collapsed).app-asset-mode .main-content {
    grid-template-columns: 254px minmax(0, 1fr) !important;
  }
}

.card {
  border-radius: var(--saas-radius-lg);
  border: 1px solid var(--saas-border);
  background: var(--saas-surface);
  box-shadow: var(--saas-shadow-sm);
}

.feature-menu-panel .card.sticky {
  background: #fcfdff;
  border: 1px solid var(--saas-border);
  box-shadow: var(--saas-shadow-sm);
}

.feature-menu-brand {
  border-bottom: 1px solid var(--saas-border);
  background: #fcfdff;
  padding: 1.35rem 1rem 0.95rem;
}

.feature-menu-panel .feature-menu-body {
  padding: 0.65rem;
  gap: 0.35rem;
}

.feature-menu-btn {
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: #2c3f5d;
  transition: all 0.2s ease;
}

.feature-menu-btn::before {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background-color: #63789a;
  background: linear-gradient(180deg, #f2f6fc 0%, #eaf0f8 100%);
  border: 1px solid #dce5f1;
}

.feature-menu-btn:hover {
  background: #ffffff;
  border-color: #dbe5f2;
  color: #152f54;
  transform: translateY(-1px);
}

.feature-menu-btn.active {
  color: var(--saas-accent-strong);
  border-color: #ffd8af;
  background: linear-gradient(180deg, #fffaf3 0%, #fff3e6 100%);
  box-shadow: 0 10px 22px rgba(255, 138, 0, 0.16);
}

.feature-menu-btn.active::before {
  background: linear-gradient(180deg, #fff2e1 0%, #ffe6c5 100%);
  border-color: #ffc983;
}

.report-panel .report-card {
  border-radius: var(--saas-radius-lg);
  border: 1px solid var(--saas-border);
  overflow: hidden;
  box-shadow: var(--saas-shadow-md);
  background: var(--saas-surface-soft);
}

.report-card .card-header {
  padding: 1.7rem 1.7rem 1.2rem;
  background: transparent;
  border-bottom: none;
}

.report-header {
  align-items: flex-start;
  gap: 1rem;
}

.report-header h2 {
  color: #0f1f3d;
  font-size: clamp(1.9rem, 2.6vw, 2.75rem);
  letter-spacing: -0.03em;
}

.report-header p {
  margin-top: 0.5rem;
  color: var(--saas-text-muted);
  font-size: 1rem;
}

.report-header-controls {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  align-items: flex-end;
  min-width: min(560px, 100%);
}

.report-header-tools {
  width: min(560px, 100%);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.6rem;
}

.report-header-secondary-tools {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.report-search {
  min-width: 240px;
  width: min(360px, 100%);
  height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0 0.82rem;
  border-radius: 14px;
  border: 1px solid #d6e1ef;
  background: #ffffff;
  box-shadow: 0 3px 10px rgba(27, 46, 72, 0.04);
}

.report-search svg {
  width: 18px;
  height: 18px;
  stroke: #7b8eac;
  stroke-width: 2;
  fill: none;
  flex: 0 0 auto;
}

.report-search input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.92rem;
  color: #1d3558;
}

.report-search input::placeholder {
  color: #8a9cb8;
}

.icon-only-btn {
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 14px;
}

.icon-only-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.report-header-actions {
  gap: 0.62rem;
}

.report-header-actions .btn-primary {
  min-height: 46px;
  border-radius: 14px;
  padding: 0.66rem 1.3rem;
  font-weight: 700;
}

@media (min-width: 1025px) {
  #app.app-dashboard-mode .report-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    row-gap: 1rem;
  }

  #app.app-dashboard-mode .report-header-main {
    min-width: 0;
  }

  #app.app-dashboard-mode .report-header-controls {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 1rem;
  }

  #app.app-dashboard-mode .report-header-tools {
    width: auto;
    min-width: 0;
    justify-content: flex-start;
  }

  #app.app-dashboard-mode .report-header-secondary-tools {
    width: 100%;
    margin-top: 0.7rem;
    justify-content: flex-start;
    grid-column: 1 / -1;
  }

  #app.app-dashboard-mode .report-search {
    width: min(360px, 100%);
  }

  #app.app-dashboard-mode .report-header-actions {
    justify-content: flex-end;
    align-self: start;
  }
}

.report-card .card-body {
  padding: 0 1.7rem 1.7rem;
  background: transparent;
}

.report-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.05rem;
}

.report-metric {
  position: relative;
  border-radius: var(--saas-radius-md);
  border: 1px solid var(--saas-border);
  background: var(--saas-surface);
  padding: 1.05rem 1rem 1.05rem 3.95rem;
  box-shadow: 0 2px 8px rgba(22, 43, 70, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.report-metric::before {
  content: "";
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid #dfebf8;
}

.report-metric:nth-child(1)::before { background: linear-gradient(180deg, #fff3e5 0%, #ffe8ca 100%); }
.report-metric:nth-child(2)::before { background: linear-gradient(180deg, #e9f1ff 0%, #dae8ff 100%); }
.report-metric:nth-child(3)::before { background: linear-gradient(180deg, #f2edff 0%, #e8defe 100%); }

.report-metric:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(22, 43, 70, 0.08);
}

.report-metric-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.69rem;
  font-weight: 700;
  color: #7a8ca8;
}

.report-metric-value {
  font-size: clamp(1.3rem, 1.9vw, 2rem);
  letter-spacing: -0.02em;
  color: #10213f;
}

.report-section {
  background: transparent;
  border: none;
  padding: 0;
}

.report-cv-list {
  gap: 1rem;
}

.report-cv-item {
  border-radius: var(--saas-radius-lg);
  border: 1px solid var(--saas-border);
  background: var(--saas-surface);
  padding: 1.35rem;
  gap: 1.15rem;
  box-shadow: 0 3px 12px rgba(22, 42, 67, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.archive-item:hover,
.report-cv-item:hover {
  border-color: #d4e1f2;
  box-shadow: 0 16px 28px rgba(21, 40, 65, 0.1);
  transform: translateY(-3px);
}

.report-cv-title {
  font-size: 1.9rem;
  letter-spacing: -0.02em;
  color: #0f2140;
}

.report-cv-meta {
  color: #6e809c;
  font-size: 0.9rem;
}

.profile-match-count {
  border-radius: 999px;
  padding: 0.3rem 0.62rem;
  font-size: 0.74rem;
  border: 1px solid #dbe8f8;
  background: #f4f8ff;
  color: #325a8e;
}

.employee-profile-card {
  margin-top: 0.78rem;
  border-radius: var(--saas-radius-md);
  border: 1px solid #e5edf7;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  padding: 0.95rem;
}

.employee-profile-header {
  display: flex;
  align-items: center;
  gap: 0.62rem;
  margin-bottom: 0.5rem;
}

.employee-profile-avatar {
  width: 52px;
  height: 52px;
  border: 2px solid #ffffff;
  box-shadow: 0 8px 16px rgba(18, 37, 62, 0.15);
}

.employee-profile-avatar-fallback {
  width: 52px;
  height: 52px;
  font-size: 1rem;
  background: linear-gradient(180deg, #7c9cff 0%, #5879ef 100%);
  color: #ffffff;
}

.employee-profile-title {
  font-size: 1.04rem;
  font-weight: 700;
  color: #152a4b;
}

.employee-profile-summary {
  color: #5f7290;
  font-size: 0.91rem;
  margin-bottom: 0.6rem;
}

.employee-profile-grid {
  gap: 0;
  border: 1px solid #e8eef7;
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
}

.employee-profile-section {
  padding: 0.8rem 0.88rem;
  min-height: 100%;
}

.employee-profile-section + .employee-profile-section {
  border-left: 1px solid #e8eef7;
}

.employee-profile-section h4 {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #627895;
  margin-bottom: 0.42rem;
}

.employee-profile-section h4::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  color: var(--saas-success);
  background: var(--saas-success);
  margin-right: 0.35rem;
  transform: translateY(-1px);
}

.employee-profile-section:nth-child(2) h4::before {
  background: var(--saas-warning);
}

.employee-profile-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.employee-profile-section li {
  position: relative;
  font-size: 0.88rem;
  color: #2d4568;
  padding-left: 1rem;
  line-height: 1.45;
}

.employee-profile-section li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--saas-success);
}

.employee-profile-section:nth-child(2) li::before {
  background: var(--saas-warning);
}

.employee-profile-section li:nth-child(n+4) {
  display: none;
}

.btn {
  border-radius: var(--saas-radius-sm);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  border: none;
  color: #ffffff;
  background: linear-gradient(135deg, var(--saas-accent) 0%, #ff9500 55%, var(--saas-accent-strong) 100%);
  box-shadow: 0 10px 20px rgba(255, 138, 0, 0.28);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #f27b00 0%, #ec6c00 100%);
}

.btn-outline {
  border-color: #d5e1ef;
  background: #ffffff;
  color: #29466e;
}

.btn-outline:hover {
  border-color: #b9cbe2;
  background: #f8fbff;
}

.skill-badge {
  border-radius: 999px;
  border: 1px solid #d9e8fa;
  background: var(--saas-pill);
  color: #254c84;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.34rem 0.74rem;
}

@media (max-width: 1240px) {
  .report-header-controls {
    width: 100%;
    min-width: 0;
    align-items: stretch;
  }

  .report-header-tools {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 1024px) {
  .report-card .card-header {
    padding: 1.2rem 1.1rem 0.95rem;
  }

  .report-card .card-body {
    padding: 0 1.1rem 1.1rem;
  }

  .report-header-controls,
  .report-header-tools {
    width: 100%;
    min-width: 0;
    align-items: stretch;
  }

  .report-header-tools {
    flex-wrap: wrap;
  }

  .report-search {
    width: 100%;
    min-width: 0;
  }

  .report-metrics {
    grid-template-columns: 1fr;
  }

  .report-cv-item {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .employee-profile-grid {
    grid-template-columns: 1fr;
  }

  .employee-profile-section + .employee-profile-section {
    border-left: none;
    border-top: 1px solid #e8eef7;
  }
}

/* ========================================
   Sidebar Focus Override (Image-like)
======================================== */

@media (min-width: 1025px) {
  #app:not(.menu-collapsed) .main-content,
  #app:not(.menu-collapsed).app-dashboard-mode .main-content,
  #app:not(.menu-collapsed).app-hrinsights-mode .main-content,
  #app:not(.menu-collapsed).app-hiddengems-mode .main-content,
  #app:not(.menu-collapsed).app-dossier-mode .main-content,
  #app:not(.menu-collapsed).app-settings-mode .main-content,
  #app:not(.menu-collapsed).app-organization-mode .main-content,
  #app:not(.menu-collapsed).app-myteam-mode .main-content,
  #app:not(.menu-collapsed).app-vacation-mode .main-content,
  #app:not(.menu-collapsed).app-timesheet-mode .main-content,
  #app:not(.menu-collapsed).app-coach-mode .main-content,
  #app:not(.menu-collapsed).app-onboarding-mode .main-content,
  #app:not(.menu-collapsed).app-offboarding-mode .main-content,
  #app:not(.menu-collapsed).app-asset-mode .main-content {
    grid-template-columns: 248px minmax(0, 1fr) !important;
  }

  #app:not(.menu-collapsed) .feature-menu-panel,
  #app:not(.menu-collapsed) .feature-menu-panel:hover,
  #app:not(.menu-collapsed) .feature-menu-panel:focus-within {
    width: 248px !important;
  }

  .feature-menu-panel {
    top: 0.9rem;
    max-height: calc(100vh - 1.6rem);
  }

  .feature-menu-panel .card.sticky {
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid #e6ecf5;
    box-shadow: 0 16px 30px rgba(17, 34, 59, 0.07);
  }

  .feature-menu-brand {
    padding: 1.35rem 1.05rem 0.95rem;
    background: #ffffff;
    border-bottom: 1px solid #edf2f8;
  }

  .feature-menu-brand-logo {
    width: 138px;
  }

  .feature-menu-panel .feature-menu-body {
    padding: 0.7rem 0.55rem 0.9rem;
    gap: 0.2rem;
  }

  .feature-menu-btn,
  #app:not(.menu-collapsed) .feature-menu-btn,
  #app:not(.menu-collapsed) .feature-menu-panel:hover .feature-menu-btn,
  #app:not(.menu-collapsed) .feature-menu-panel:focus-within .feature-menu-btn {
    position: relative;
    min-height: 44px;
    justify-content: flex-start !important;
    gap: 0.72rem;
    padding: 0.58rem 0.68rem 0.58rem 0.86rem !important;
    border-radius: 12px;
    border: 1px solid transparent;
    background: transparent;
    color: #3a4f6f;
    box-shadow: none;
  }

  .feature-menu-btn::before,
  #app:not(.menu-collapsed) .feature-menu-btn::before {
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 0;
    background: #6f84a4;
    opacity: 0.95;
  }

  .feature-menu-btn::after {
    content: "";
    position: absolute;
    left: -0.55rem;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 24px;
    border-radius: 999px;
    background: #ff8a00;
    transition: transform 0.18s ease;
  }

  .feature-menu-btn > span,
  #app:not(.menu-collapsed) .feature-menu-btn > span,
  #app:not(.menu-collapsed) .feature-menu-panel:hover .feature-menu-btn > span,
  #app:not(.menu-collapsed) .feature-menu-panel:focus-within .feature-menu-btn > span {
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 1 !important;
    max-width: none !important;
    white-space: normal;
    line-height: 1.2;
    color: inherit;
  }

  .feature-menu-btn:hover {
    color: #243f65;
    border-color: #e8eef7;
    background: #f9fbff;
    transform: none;
  }

  .feature-menu-btn.active {
    color: #f07b00;
    border-color: #ffe2bf;
    background: #fff6ea;
    box-shadow: none;
  }

  .feature-menu-btn.active::before {
    background: #f07b00;
  }

  .feature-menu-btn.active::after {
    transform: translateY(-50%) scaleY(1);
  }

  .feature-menu-btn .label-with-badge {
    gap: 0.4rem;
    min-width: 0;
  }

  .pro-badge,
  .menu-notification-badge {
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.24rem 0.42rem;
  }

  .pro-badge {
    color: #7a5a25;
    background: #fff3dc;
    border: 1px solid #ffe0aa;
  }

  .menu-notification-badge {
    color: #ffffff;
    background: #ff8a00;
    border: none;
  }
}

/* ========================================
   Mockup Sidebar Alignment (Desktop)
======================================== */

@media (min-width: 1025px) {
  :root {
    --mockup-sidebar-width: 260px;
  }

  .header {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    min-height: 0;
  }

  .header-content {
    max-width: none !important;
    padding: 0;
  }

  .header-logo-wrapper {
    display: none !important;
  }

  #app:not(.menu-collapsed) .main-content,
  #app:not(.menu-collapsed).app-dashboard-mode .main-content,
  #app:not(.menu-collapsed).app-hrinsights-mode .main-content,
  #app:not(.menu-collapsed).app-hiddengems-mode .main-content,
  #app:not(.menu-collapsed).app-dossier-mode .main-content,
  #app:not(.menu-collapsed).app-settings-mode .main-content,
  #app:not(.menu-collapsed).app-organization-mode .main-content,
  #app:not(.menu-collapsed).app-vacation-mode .main-content,
  #app:not(.menu-collapsed).app-timesheet-mode .main-content,
  #app:not(.menu-collapsed).app-coach-mode .main-content,
  #app:not(.menu-collapsed).app-onboarding-mode .main-content,
  #app:not(.menu-collapsed).app-offboarding-mode .main-content,
  #app:not(.menu-collapsed).app-asset-mode .main-content {
    max-width: none !important;
    margin: 0 !important;
    width: 100% !important;
    padding: 1rem 1.25rem 1.5rem calc(var(--mockup-sidebar-width) + 1rem) !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 1rem;
  }

  #app:not(.menu-collapsed).app-workspace-mode .main-content {
    max-width: none !important;
    margin: 0 !important;
    width: 100% !important;
    padding: 1rem 1.25rem 1.5rem calc(var(--mockup-sidebar-width) + 1rem) !important;
    grid-template-columns: minmax(720px, 1.68fr) minmax(390px, 1fr) !important;
    gap: 1rem;
  }

  #app:not(.menu-collapsed) .feature-menu-panel {
    position: fixed !important;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--mockup-sidebar-width) !important;
    max-height: 100vh !important;
    z-index: 55;
    margin: 0 !important;
    padding: 0 !important;
  }

  #app:not(.menu-collapsed) .feature-menu-panel .card.sticky {
    position: relative !important;
    top: 0 !important;
    height: 100vh;
    max-height: 100vh !important;
    border-radius: 0 22px 22px 0;
    border-left: 0;
    box-shadow: 0 12px 28px rgba(18, 36, 61, 0.09);
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  #app:not(.menu-collapsed) .feature-menu-panel .feature-menu-body {
    flex: 1;
    overflow: auto;
    padding: 0.65rem 0.55rem 6rem;
  }

  .header-actions {
    position: fixed;
    left: 0.75rem;
    bottom: 0.75rem;
    width: calc(var(--mockup-sidebar-width) - 1.5rem);
    justify-content: flex-start;
    z-index: 70;
    pointer-events: none;
  }

  #authUserInfo {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    width: 100%;
    border: 1px solid #e4ebf5;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 10px 20px rgba(16, 34, 58, 0.08);
    padding: 0.55rem;
    pointer-events: auto;
  }

  #authUserBadge {
    flex: 1;
    min-width: 0;
    margin: 0 !important;
    padding: 0.45rem 0.56rem;
    border-radius: 10px;
    border: 1px solid #e9eff8;
    background: #f7faff;
    color: #1f3558;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #authUserInfo > .btn {
    min-height: 36px;
    padding: 0.42rem 0.65rem;
    border-radius: 10px;
    font-size: 0.76rem;
  }

  #app.menu-collapsed .feature-menu-panel {
    display: none !important;
  }

  #app.menu-collapsed .header-actions {
    left: 1rem;
    width: auto;
  }
}

/* ========================================
   Employee Dashboard Typography (Mockup-like)
======================================== */

@media (min-width: 1025px) {
  #app.app-dashboard-mode #reportPanel .report-card .card-header {
    padding: 1.6rem 1.7rem 1.05rem;
  }

  #app.app-dashboard-mode #dashboardTitle {
    font-size: clamp(2rem, 2.25vw, 2.7rem);
    line-height: 1.08;
    letter-spacing: -0.03em;
    font-weight: 800;
    color: #0f2140;
  }

  #app.app-dashboard-mode #dashboardSubtitle {
    margin-top: 0.5rem;
    font-size: 1.02rem;
    line-height: 1.45;
    font-weight: 500;
    color: #607493;
    letter-spacing: -0.01em;
  }

  #app.app-dashboard-mode .report-metrics {
    margin-bottom: 1rem;
    gap: 0.95rem;
  }

  #app.app-dashboard-mode .report-metric-label {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #7a8ea9;
  }

  #app.app-dashboard-mode .report-metric-value {
    font-size: clamp(1.45rem, 1.7vw, 2.05rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    font-weight: 800;
    color: #102543;
  }

  #app.app-dashboard-mode .report-metric-value::after {
    display: block;
    margin-top: 0.26rem;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0;
    color: #7486a2;
  }

  #app.app-dashboard-mode .report-metric:nth-child(1) .report-metric-value::after {
    content: "+2 rispetto al mese scorso";
    color: #0f9f5d;
  }

  #app.app-dashboard-mode .report-metric:nth-child(2) .report-metric-value::after {
    content: "Lingua principale";
  }

  #app.app-dashboard-mode .report-metric:nth-child(3) .report-metric-value::after {
    content: "Archivio aggiornato";
  }

  #app.app-dashboard-mode .report-cv-item {
    padding: 1.2rem 1.2rem 1.1rem;
    gap: 1rem;
  }

  #app.app-dashboard-mode .report-cv-title {
    font-size: clamp(1.72rem, 1.95vw, 2.25rem);
    line-height: 1.08;
    letter-spacing: -0.025em;
    font-weight: 800;
    color: #0f2140;
  }

  #app.app-dashboard-mode .report-cv-meta {
    margin-top: 0.35rem;
    font-size: 0.93rem;
    line-height: 1.35;
    font-weight: 500;
    color: #6f82a0;
  }

  #app.app-dashboard-mode .report-cv-actions .btn {
    min-height: 44px;
    padding: 0.58rem 0.98rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
  }

  #app.app-dashboard-mode .employee-profile-card {
    padding: 1rem;
    border-radius: 16px;
  }

  #app.app-dashboard-mode .employee-profile-title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #172e51;
  }

  #app.app-dashboard-mode .employee-profile-summary {
    font-size: 0.92rem;
    line-height: 1.5;
    color: #5d7190;
  }

  #app.app-dashboard-mode .employee-profile-section h4 {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #607796;
    margin-bottom: 0.46rem;
  }

  #app.app-dashboard-mode .employee-profile-section li {
    font-size: 0.93rem;
    line-height: 1.55;
    color: #2f486c;
  }
}

@media (max-width: 1024px) {
  #app.app-dashboard-mode #dashboardTitle {
    font-size: clamp(1.45rem, 5.8vw, 1.95rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
  }

  #app.app-dashboard-mode #dashboardSubtitle {
    font-size: 0.93rem;
    line-height: 1.45;
  }

  #app.app-dashboard-mode .report-cv-title {
    font-size: clamp(1.2rem, 4.8vw, 1.55rem);
    line-height: 1.15;
  }

  #app.app-dashboard-mode .report-cv-meta,
  #app.app-dashboard-mode .employee-profile-summary,
  #app.app-dashboard-mode .employee-profile-section li {
    font-size: 0.9rem;
  }
}

/* ========================================
   Final SaaS Dashboard Polish
======================================== */

/* Solo le variabili che questo blocco INTRODUCE: le altre erano ripetizioni
   identiche del :root in cima al file e lo oscuravano, per cui modificare un
   colore la' non aveva effetto. */
:root {
  --bg: #f6f8fc;
  --surface: #ffffff;
  --text: #0f2544;
  --muted: #64748b;
  --blue-soft: #eef4ff;
  --purple-soft: #f1edff;
}

body:not(.theme-dark) {
  background: var(--bg);
  color: var(--text);
}

@media (min-width: 1025px) {
  #app.app-dashboard-mode .report-panel {
    max-width: 1240px;
    width: 100%;
    margin: 0 auto;
  }

  #app.app-dashboard-mode .report-card {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
  }

  #app.app-dashboard-mode .report-card .card-header {
    padding: 1.7rem 1.8rem 1.2rem;
  }

  #app.app-dashboard-mode .report-header {
    align-items: flex-start;
    gap: 1.25rem;
  }

  #app.app-dashboard-mode .report-header-controls {
    gap: 0.8rem;
  }

  #app.app-dashboard-mode .report-header-tools {
    width: min(560px, 100%);
  }

  #app.app-dashboard-mode .report-search {
    height: 48px;
    border-radius: 14px;
    border: 1px solid #d7e2f1;
    box-shadow: none;
  }

  #app.app-dashboard-mode .report-header-actions .btn-primary {
    min-height: 48px;
    padding: 0.7rem 1.24rem;
    border-radius: 14px;
    font-weight: 700;
    background: linear-gradient(135deg, #ff8f1f 0%, #ff7a00 58%, #ea6b00 100%);
    box-shadow: 0 12px 24px rgba(255, 122, 0, 0.24);
  }

  #app.app-dashboard-mode .report-card .card-body {
    padding: 0 1.8rem 1.8rem;
  }

  #app.app-dashboard-mode .report-metrics {
    margin-top: 0.2rem;
    margin-bottom: 1.2rem;
    gap: 1rem;
  }

  #app.app-dashboard-mode .report-metric {
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: none;
    padding: 1rem 1rem 0.95rem 3.9rem;
  }

  #app.app-dashboard-mode .report-metric::before {
    width: 40px;
    height: 40px;
    left: 0.95rem;
    border-radius: 12px;
    border: 1px solid #e1e9f6;
    background-color: #5772f6;
  }

  #app.app-dashboard-mode .report-metric:nth-child(1)::before {
    background: linear-gradient(180deg, #fff4e8 0%, #ffe9d1 100%);
    background-color: #f28b18;
  }

  #app.app-dashboard-mode .report-metric:nth-child(2)::before {
    background: linear-gradient(180deg, #edf4ff 0%, #e1ecff 100%);
    background-color: #3b82f6;
  }

  #app.app-dashboard-mode .report-metric:nth-child(3)::before {
    background: linear-gradient(180deg, #f4f0ff 0%, #ece4ff 100%);
    background-color: #7c3aed;
  }

  #app.app-dashboard-mode .report-cv-list {
    gap: 1rem;
  }

  #app.app-dashboard-mode .report-cv-item {
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    padding: 1.75rem;
    display: block;
  }

  #app.app-dashboard-mode .report-cv-main {
    width: 100%;
  }

  #app.app-dashboard-mode .report-cv-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
  }

  #app.app-dashboard-mode .report-cv-identity {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    min-width: 0;
    flex: 1;
  }

  #app.app-dashboard-mode .report-cv-avatar-wrap {
    flex: 0 0 auto;
  }

  #app.app-dashboard-mode .report-cv-avatar {
    width: 72px;
    height: 72px;
    border-radius: 999px;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 8px 20px rgba(15, 37, 68, 0.16);
  }

  #app.app-dashboard-mode .report-cv-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(180deg, #7d8dff 0%, #5f72f6 100%);
  }

  #app.app-dashboard-mode .report-cv-headline {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
  }

  #app.app-dashboard-mode .report-cv-title-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
  }

  #app.app-dashboard-mode .report-cv-title {
    font-size: clamp(2rem, 2.15vw, 2.45rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: #0f2544;
  }

  #app.app-dashboard-mode .report-cv-role {
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 760px;
  }

  #app.app-dashboard-mode .report-cv-meta-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-top: 0.15rem;
  }

  #app.app-dashboard-mode .report-cv-meta-item {
    font-size: 0.9rem;
    font-weight: 500;
    color: #70829e;
  }

  #app.app-dashboard-mode .report-cv-meta-item + .report-cv-meta-item::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: #9aabbf;
    margin-right: 0.7rem;
    transform: translateY(-2px);
  }

  #app.app-dashboard-mode .report-cv-experience-badge {
    margin-top: 0.5rem;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid #dbe6fb;
    background: #edf3ff;
    color: #2f4e86;
    font-size: 0.84rem;
    font-weight: 700;
    padding: 0.33rem 0.74rem;
  }

  #app.app-dashboard-mode .report-cv-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
  }

  #app.app-dashboard-mode .report-cv-actions .btn {
    min-height: 42px;
    border-radius: 12px;
    padding: 0.55rem 0.95rem;
    font-size: 0.94rem;
    font-weight: 600;
  }

  #app.app-dashboard-mode .employee-card-divider {
    height: 1px;
    margin: 1.2rem 0 1rem;
    background: linear-gradient(90deg, rgba(214, 225, 241, 0.4) 0%, rgba(214, 225, 241, 0.9) 30%, rgba(214, 225, 241, 0.4) 100%);
  }

  #app.app-dashboard-mode .employee-card-sections {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
  }

  #app.app-dashboard-mode .employee-card-section {
    padding: 1rem 1rem 0.95rem;
  }

  #app.app-dashboard-mode .employee-card-section + .employee-card-section {
    border-left: 1px solid #e8eef7;
  }

  #app.app-dashboard-mode .employee-card-section h4 {
    margin: 0 0 0.6rem;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 800;
    color: #607895;
  }

  #app.app-dashboard-mode .employee-card-strengths h4::before,
  #app.app-dashboard-mode .employee-card-gaps h4::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    margin-right: 0.4rem;
    transform: translateY(-1px);
  }

  #app.app-dashboard-mode .employee-card-strengths h4::before {
    background: var(--success);
  }

  #app.app-dashboard-mode .employee-card-gaps h4::before {
    background: var(--primary);
  }

  #app.app-dashboard-mode .employee-card-section ul {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  #app.app-dashboard-mode .employee-card-section li {
    position: relative;
    padding-left: 0.9rem;
    font-size: 0.94rem;
    color: #2f486b;
    line-height: 1.55;
  }

  #app.app-dashboard-mode .employee-card-strengths li::before,
  #app.app-dashboard-mode .employee-card-gaps li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55rem;
    width: 5px;
    height: 5px;
    border-radius: 999px;
  }

  #app.app-dashboard-mode .employee-card-strengths li::before {
    background: var(--success);
  }

  #app.app-dashboard-mode .employee-card-gaps li::before {
    background: var(--primary);
  }

  #app.app-dashboard-mode .employee-card-section li:nth-child(n+4) {
    display: none;
  }

  #app.app-dashboard-mode .employee-skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  #app.app-dashboard-mode .employee-skill-tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid #d7e5fb;
    background: #edf3ff;
    color: #2f4f86;
    padding: 0.32rem 0.72rem;
    font-size: 0.82rem;
    font-weight: 600;
  }

  #app:not(.menu-collapsed) .feature-menu-panel .card.sticky {
    border-radius: 0 20px 20px 0;
    background: #fff;
    border-color: var(--border);
  }

  .feature-menu-brand {
    border-bottom-color: #edf2f8;
  }

  #authUserInfo {
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
  }
}

@media (max-width: 1024px) {
  #app.app-dashboard-mode .employee-card-sections {
    grid-template-columns: 1fr;
    border: 1px solid #e8eef7;
    border-radius: 14px;
    overflow: hidden;
  }

  #app.app-dashboard-mode .employee-card-section + .employee-card-section {
    border-left: none;
    border-top: 1px solid #e8eef7;
  }
}

/* ========================================
   Dashboard Density Tuning
======================================== */

@media (min-width: 1025px) {
  :root {
    --mockup-sidebar-width: 254px;
  }

  #app:not(.menu-collapsed) .main-content,
  #app:not(.menu-collapsed).app-dashboard-mode .main-content,
  #app:not(.menu-collapsed).app-hrinsights-mode .main-content,
  #app:not(.menu-collapsed).app-hiddengems-mode .main-content,
  #app:not(.menu-collapsed).app-dossier-mode .main-content,
  #app:not(.menu-collapsed).app-settings-mode .main-content,
  #app:not(.menu-collapsed).app-organization-mode .main-content,
  #app:not(.menu-collapsed).app-vacation-mode .main-content,
  #app:not(.menu-collapsed).app-timesheet-mode .main-content,
  #app:not(.menu-collapsed).app-coach-mode .main-content,
  #app:not(.menu-collapsed).app-onboarding-mode .main-content,
  #app:not(.menu-collapsed).app-offboarding-mode .main-content,
  #app:not(.menu-collapsed).app-asset-mode .main-content {
    padding: 0.8rem 0.95rem 1.15rem calc(var(--mockup-sidebar-width) + 0.8rem) !important;
    gap: 0.85rem;
  }

  #app.app-dashboard-mode .report-panel {
    max-width: 1180px;
  }

  #app:not(.menu-collapsed) .feature-menu-panel .card.sticky {
    border-radius: 0 18px 18px 0;
  }

  .feature-menu-brand {
    padding: 1.15rem 0.95rem 0.78rem;
  }

  .feature-menu-brand-logo {
    width: 146px;
  }

  #app:not(.menu-collapsed) .feature-menu-panel .feature-menu-body {
    padding: 0.55rem 0.5rem 5.7rem;
  }

  .feature-menu-btn,
  #app:not(.menu-collapsed) .feature-menu-btn,
  #app:not(.menu-collapsed) .feature-menu-panel:hover .feature-menu-btn,
  #app:not(.menu-collapsed) .feature-menu-panel:focus-within .feature-menu-btn {
    min-height: 44px;
    padding: 0.5rem 0.62rem 0.5rem 0.8rem !important;
    border-radius: 12px;
  }

  .feature-menu-btn > span,
  #app:not(.menu-collapsed) .feature-menu-btn > span,
  #app:not(.menu-collapsed) .feature-menu-panel:hover .feature-menu-btn > span,
  #app:not(.menu-collapsed) .feature-menu-panel:focus-within .feature-menu-btn > span {
    font-size: 0.9rem;
  }

  #app.app-dashboard-mode #dashboardTitle {
    font-size: clamp(1.92rem, 2.15vw, 2.25rem);
  }

  #app.app-dashboard-mode #dashboardSubtitle {
    font-size: 0.96rem;
    margin-top: 0.38rem;
  }

  #app.app-dashboard-mode .report-header-tools {
    width: min(500px, 100%);
    gap: 0.5rem;
  }

  #app.app-dashboard-mode .report-search {
    height: 44px;
    border-radius: 12px;
    padding: 0 0.72rem;
  }

  #app.app-dashboard-mode .report-search input {
    font-size: 0.88rem;
  }

  #app.app-dashboard-mode .report-header-actions .btn-primary {
    min-height: 44px;
    padding: 0.6rem 1.08rem;
    border-radius: 12px;
    font-size: 0.9rem;
  }

  #app.app-dashboard-mode .report-card .card-header {
    padding: 1.35rem 1.45rem 0.95rem;
  }

  #app.app-dashboard-mode .report-card .card-body {
    padding: 0 1.45rem 1.35rem;
  }

  #app.app-dashboard-mode .report-metrics {
    gap: 0.72rem;
    margin-bottom: 0.82rem;
  }

  #app.app-dashboard-mode .report-metric {
    min-height: 110px;
    padding: 0.95rem 0.9rem 0.85rem 3.9rem;
    border-radius: 14px;
  }

  #app.app-dashboard-mode .report-metric::before {
    width: 48px;
    height: 48px;
    left: 0.82rem;
    border-radius: 12px;
  }

  #app.app-dashboard-mode .report-metric-value {
    font-size: clamp(1.6rem, 1.72vw, 1.84rem);
  }

  #app.app-dashboard-mode .report-cv-list {
    gap: 0.72rem;
  }

  #app.app-dashboard-mode .report-cv-item {
    padding: 1.35rem 1.35rem 1.15rem;
    border-radius: 20px;
  }

  #app.app-dashboard-mode .report-cv-top {
    gap: 0.75rem;
  }

  #app.app-dashboard-mode .report-cv-identity {
    gap: 0.82rem;
  }

  #app.app-dashboard-mode .report-cv-avatar {
    width: 64px;
    height: 64px;
  }

  #app.app-dashboard-mode .report-cv-avatar-fallback {
    font-size: 1.25rem;
  }

  #app.app-dashboard-mode .report-cv-title {
    font-size: clamp(1.62rem, 1.75vw, 1.78rem);
    line-height: 1.08;
  }

  #app.app-dashboard-mode .report-cv-role {
    font-size: 0.88rem;
  }

  #app.app-dashboard-mode .report-cv-meta-item {
    font-size: 0.81rem;
  }

  #app.app-dashboard-mode .report-cv-experience-badge {
    margin-top: 0.38rem;
    font-size: 0.76rem;
    padding: 0.24rem 0.56rem;
    width: fit-content;
    max-width: max-content;
  }

  #app.app-dashboard-mode .report-cv-actions {
    gap: 0.45rem;
  }

  #app.app-dashboard-mode .report-cv-actions .btn {
    min-height: 36px;
    padding: 0.43rem 0.74rem;
    font-size: 0.84rem;
    border-radius: 10px;
  }

  #app.app-dashboard-mode .report-cv-more-btn {
    width: 36px;
    min-width: 36px;
    padding: 0;
  }

  #app.app-dashboard-mode .employee-card-divider {
    margin: 0.9rem 0 0.7rem;
  }

  #app.app-dashboard-mode .employee-card-sections {
    grid-template-columns: 1.1fr 1.4fr 1fr;
  }

  #app.app-dashboard-mode .employee-card-section {
    padding: 0.8rem 0.85rem 0.75rem;
  }

  #app.app-dashboard-mode .employee-card-section + .employee-card-section {
    border-left: 1px solid #ebf0f8;
  }

  #app.app-dashboard-mode .employee-card-section h4 {
    margin-bottom: 0.48rem;
    font-size: 0.66rem;
    letter-spacing: 0.09em;
  }

  #app.app-dashboard-mode .employee-card-section li {
    font-size: 0.85rem;
    line-height: 1.5;
    padding-left: 0.75rem;
  }

  #app.app-dashboard-mode .employee-card-strengths li::before,
  #app.app-dashboard-mode .employee-card-gaps li::before {
    width: 4px;
    height: 4px;
    top: 0.56rem;
  }

  #app.app-dashboard-mode .employee-skill-tags {
    gap: 0.4rem;
  }

  #app.app-dashboard-mode .employee-skill-tag {
    font-size: 0.74rem;
    padding: 0.24rem 0.52rem;
  }
}

/* ========================================
   Full-width Desktop Layout
======================================== */

html,
body {
  width: 100%;
  min-height: 100vh;
}

#app {
  width: 100vw;
  min-height: 100vh;
}

@media (min-width: 1025px) {
  #authScreenSignin .auth-input-group,
  #authScreenSignup .auth-input-group,
  #authScreenReset .auth-input-group,
  #authScreenSignin .auth-input-shell,
  #authScreenSignup .auth-input-shell,
  #authScreenReset .auth-input-shell {
    width: 100%;
  }
}

@media (min-width: 1025px) {
  #app {
    display: flex;
    flex-direction: column;
  }

  #app:not(.menu-collapsed) {
    --mockup-sidebar-width: 260px;
  }

  #app:not(.menu-collapsed) .feature-menu-panel {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    flex: 0 0 var(--mockup-sidebar-width);
    width: var(--mockup-sidebar-width) !important;
    max-height: 100vh !important;
    margin: 0 !important;
    z-index: 55 !important;
  }

  .main-content,
  #app:not(.menu-collapsed) .main-content,
  #app:not(.menu-collapsed).app-dashboard-mode .main-content,
  #app:not(.menu-collapsed).app-hrinsights-mode .main-content,
  #app:not(.menu-collapsed).app-hiddengems-mode .main-content,
  #app:not(.menu-collapsed).app-dossier-mode .main-content,
  #app:not(.menu-collapsed).app-settings-mode .main-content,
  #app:not(.menu-collapsed).app-organization-mode .main-content,
  #app:not(.menu-collapsed).app-vacation-mode .main-content,
  #app:not(.menu-collapsed).app-timesheet-mode .main-content,
  #app:not(.menu-collapsed).app-coach-mode .main-content,
  #app:not(.menu-collapsed).app-onboarding-mode .main-content,
  #app:not(.menu-collapsed).app-offboarding-mode .main-content,
  #app:not(.menu-collapsed).app-asset-mode .main-content {
    flex: 1 1 auto;
    width: 100%;
    max-width: none !important;
    margin: 0 !important;
    padding: 1rem 2rem 1.4rem calc(var(--mockup-sidebar-width) + 2rem) !important;
    box-sizing: border-box;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 1rem;
  }

  #app:not(.menu-collapsed).app-workspace-mode .main-content {
    width: 100%;
    max-width: none !important;
    margin: 0 !important;
    padding: 1rem 2rem 1.4rem calc(var(--mockup-sidebar-width) + 2rem) !important;
    box-sizing: border-box;
    grid-template-columns: minmax(0, 1.72fr) minmax(0, 1fr) !important;
    gap: 1rem;
  }

  #app .report-panel,
  #app.app-dashboard-mode .report-panel,
  #app .report-card,
  #app .report-cv-list,
  #app .report-cv-item,
  #app .report-section,
  #app .archive-panel,
  #app .hr-panel,
  #app .coach-panel,
  #app .hidden-gems-panel,
  #app .settings-panel,
  #app .vacation-panel,
  #app .timesheet-panel,
  #app .dossier-panel,
  #app .editor-panel,
  #app .preview-panel {
    width: 100%;
    max-width: none !important;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
  }

  #app .report-metrics {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #app .report-cv-list,
  #app .report-cv-item {
    width: 100%;
  }

  :is(.page-shell, .dashboard-container, .content-wrapper, .page-wrapper, .content-container) {
    width: 100%;
    max-width: none;
    margin: 0;
    box-sizing: border-box;
  }
}

/* ========================================
   Premium Final Refinement
======================================== */

@media (min-width: 1025px) {
  #app.app-dashboard-mode .report-cv-item {
    padding: 1.2rem 1.25rem 1rem;
  }

  #app.app-dashboard-mode .report-cv-top {
    gap: 0.62rem;
  }

  #app.app-dashboard-mode .report-cv-identity {
    gap: 0.72rem;
  }

  #app.app-dashboard-mode .report-cv-avatar {
    width: 64px;
    height: 64px;
  }

  #app.app-dashboard-mode .report-cv-title {
    font-size: clamp(1.5rem, 1.65vw, 1.72rem);
    line-height: 1.08;
  }

  #app.app-dashboard-mode .report-cv-role {
    font-size: 0.85rem;
    margin-top: 0.04rem;
  }

  #app.app-dashboard-mode .report-cv-meta-row {
    margin-top: 0.06rem;
    gap: 0.55rem;
  }

  #app.app-dashboard-mode .report-cv-meta-item {
    font-size: 0.79rem;
  }

  #app.app-dashboard-mode .report-cv-experience-badge {
    margin-top: 0.28rem;
    padding: 0.2rem 0.5rem;
    font-size: 0.72rem;
    align-self: flex-start;
  }

  #app.app-dashboard-mode .employee-card-divider {
    margin: 0.72rem 0 0.58rem;
  }

  #app.app-dashboard-mode .employee-card-section {
    padding: 0.68rem 0.74rem 0.62rem;
  }

  #app.app-dashboard-mode .employee-card-section h4 {
    margin-bottom: 0.36rem;
    color: #1f395f;
    font-size: 0.65rem;
  }

  #app.app-dashboard-mode .employee-card-section li {
    font-size: 0.83rem;
    line-height: 1.5;
  }

  #app.app-dashboard-mode .report-metrics {
    gap: 0.62rem;
    margin-bottom: 0.72rem;
  }

  #app.app-dashboard-mode .report-metric {
    min-height: 108px;
    padding: 0.9rem 0.88rem 0.76rem 3.9rem;
  }

  #app.app-dashboard-mode .report-metric::before {
    width: 48px;
    height: 48px;
    border-radius: 13px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
  }

  #app.app-dashboard-mode .report-metric-value {
    font-size: clamp(1.52rem, 1.65vw, 1.74rem);
  }

  #app.app-dashboard-mode .report-cv-actions {
    align-items: center;
    gap: 0.42rem;
  }

  #app.app-dashboard-mode .report-cv-actions .btn {
    min-height: 34px;
    padding: 0.36rem 0.68rem;
    font-size: 0.8rem;
    border-radius: 10px;
  }

  #app.app-dashboard-mode .report-cv-more-btn {
    width: 34px;
    min-width: 34px;
    padding: 0;
  }

  #app:not(.menu-collapsed) .feature-menu-panel .feature-menu-body {
    padding: 0.52rem 0.52rem 5.45rem;
  }

  .feature-menu-btn,
  #app:not(.menu-collapsed) .feature-menu-btn,
  #app:not(.menu-collapsed) .feature-menu-panel:hover .feature-menu-btn,
  #app:not(.menu-collapsed) .feature-menu-panel:focus-within .feature-menu-btn {
    min-height: 44px;
    padding: 0.48rem 0.62rem 0.48rem 0.78rem !important;
  }

  .feature-menu-btn.active {
    background: #fff2e6;
    border-color: #ffd8b6;
    color: #e27000;
  }

  .feature-menu-btn.active::after {
    background: #ff7a00;
    transform: translateY(-50%) scaleY(1);
  }
}

/* ========================================
   Global Typography System
======================================== */

html,
body,
button,
input,
select,
textarea {
  font-family: var(--font-main);
}

h1,
h2,
h3 {
  color: #0f2544;
  letter-spacing: -0.01em;
}

h1 {
  font-size: var(--text-2xl);
  font-weight: 600;
  line-height: 1.15;
}

h2 {
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1.2;
}

h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1.25;
}

:is(.header-title p, .report-header p, .archive-header p, .report-cv-meta, .report-cv-meta-item, .employee-profile-summary, .archive-item-meta, .candidate-comment-meta span) {
  color: #64748b;
  font-size: var(--text-sm);
  line-height: 1.5;
}

:is(.report-metric-label, .employee-card-section h4, .employee-profile-section h4, .archive-header p, .ui-label) {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
  font-weight: 600;
  color: #7b8da5;
}

:is(.btn, .tab-btn, .settings-tab-btn, .feature-menu-btn, .dossier-nav-btn) {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0;
}

:is(.skill-badge, .employee-skill-tag, .hr-card-badge, .pro-badge, .menu-notification-badge, .report-cv-experience-badge, .profile-match-count) {
  font-size: 12px;
  font-weight: 500;
}

/* Timesheet: keep overtime metric aligned with other cards */
#app.app-timesheet-mode .report-metric:nth-child(3) {
  background: #ffffff !important;
}

#app.app-timesheet-mode .report-metric:nth-child(3)::before {
  background: linear-gradient(180deg, #edf4ff 0%, #e1ecff 100%) !important;
  background-color: #3b82f6 !important;
  border-color: #e1e9f6 !important;
}

/* Dashboard sort dropdown */
.dashboard-sort-dropdown {
  position: relative;
  display: inline-flex;
}

.report-header-tools .icon-only-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.report-header-tools .icon-only-btn svg {
  display: block;
  margin: 0 auto;
}

.dashboard-sort-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  min-width: 180px;
  display: none;
  flex-direction: column;
  gap: 0.32rem;
  padding: 0.48rem;
  border: 1px solid #dbe5f2;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 16px 30px rgba(16, 35, 58, 0.12);
  z-index: 120;
}

.dashboard-sort-menu.open {
  display: flex;
}

.dashboard-sort-menu-item {
  width: 100%;
  justify-content: flex-start;
}

.dashboard-sort-menu-item.active {
  border-color: #ffd8b6;
  background: #fff2e6;
  color: #e27000;
}

p,
span,
div {
  font-size: var(--text-base);
}

/* Keep inline emphasis inside headings at heading size */
h1 span,
h2 span,
h3 span,
h4 span,
h5 span,
h6 span {
  font-size: inherit !important;
  line-height: inherit;
}

:is(.btn span, .tab-btn span, .settings-tab-btn span, .feature-menu-btn span, .dossier-nav-btn span) {
  font-size: inherit;
}

/* Page-level heading/subtitle normalization across app sections */
:is(#dashboardTitle, #coachTitle, #hrInsightsTitle, #hiddenGemsTitle, #settingsTitle, #vacationTitle, #timesheetTitle, #onboardingTitle, #offboardingTitle, #assetTitle, #dossierTitle) {
  font-size: var(--text-2xl) !important;
  font-weight: 600 !important;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

:is(#dashboardSubtitle, #coachDescription, #hrInsightsDescription, #hiddenGemsDescription, #settingsDescription, #vacationDescription, #timesheetDescription, #onboardingDescription, #offboardingDescription, #assetDescription, #dossierDescription) {
  font-size: var(--text-sm) !important;
  color: #64748b !important;
  line-height: 1.5;
}

.report-header h2 {
  font-size: var(--text-2xl) !important;
  font-weight: 600 !important;
}

.report-header p {
  font-size: var(--text-sm) !important;
  color: #64748b !important;
}

/* Metric icon visibility boost (Dashboard + Timesheet) */
#app.app-dashboard-mode .report-metric::before,
#app.app-timesheet-mode .report-metric::before {
  width: 52px !important;
  height: 52px !important;
  border-radius: 12px !important;
  border: 1px solid #d3e2f7 !important;
  background: #eef4ff !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 6px 14px rgba(15, 37, 68, 0.1);
  -webkit-mask: none !important;
  mask: none !important;
  z-index: 0;
  pointer-events: none;
}

#app.app-dashboard-mode .report-metric::after,
#app.app-timesheet-mode .report-metric::after {
  content: "";
  position: absolute;
  left: calc(0.95rem + 13px);
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  background: #2f56e2;
  -webkit-mask: var(--metric-icon) center / contain no-repeat;
  mask: var(--metric-icon) center / contain no-repeat;
  opacity: 1;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.35));
  z-index: 0;
  pointer-events: none;
}

#app.app-dashboard-mode .report-metric,
#app.app-timesheet-mode .report-metric {
  padding-left: 4.55rem !important;
}

#app.app-dashboard-mode .report-metric > *,
#app.app-timesheet-mode .report-metric > * {
  position: relative;
  z-index: 1;
}

#app.app-dashboard-mode .report-metric:nth-child(1)::before,
#app.app-timesheet-mode .report-metric:nth-child(1)::before {
  background: linear-gradient(180deg, #fff4e8 0%, #ffe8cd 100%) !important;
}

#app.app-dashboard-mode .report-metric:nth-child(2)::before,
#app.app-timesheet-mode .report-metric:nth-child(2)::before {
  background: linear-gradient(180deg, #eef5ff 0%, #ddeaff 100%) !important;
}

#app.app-dashboard-mode .report-metric:nth-child(3)::before,
#app.app-timesheet-mode .report-metric:nth-child(3)::before {
  background: linear-gradient(180deg, #f5f1ff 0%, #eadeff 100%) !important;
}

#app.app-dashboard-mode .report-metric:nth-child(1)::after,
#app.app-timesheet-mode .report-metric:nth-child(1)::after {
  background: #d96d00;
}

#app.app-dashboard-mode .report-metric:nth-child(2)::after,
#app.app-timesheet-mode .report-metric:nth-child(2)::after {
  background: #165fd4;
}

#app.app-dashboard-mode .report-metric:nth-child(3)::after,
#app.app-timesheet-mode .report-metric:nth-child(3)::after {
  background: #5f2ecb;
}

/* Sidebar premium refinement */
#app:not(.menu-collapsed) .feature-menu-panel .card.sticky {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 1.2rem);
  border-radius: 18px;
}

#app:not(.menu-collapsed) .feature-menu-brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 24px 20px 16px;
}

#app:not(.menu-collapsed) .feature-menu-brand-logo {
  height: 42px;
  width: auto;
  max-width: 210px;
  object-fit: contain;
}

#app:not(.menu-collapsed) .feature-menu-header {
  padding: 0 20px 10px;
}

#app:not(.menu-collapsed) .feature-menu-header h2 {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8ca0bb;
}

#app:not(.menu-collapsed) .feature-menu-panel .feature-menu-body {
  flex: 1 1 auto;
  padding: 4px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#app:not(.menu-collapsed) .feature-menu-btn,
#app:not(.menu-collapsed) .feature-menu-panel:hover .feature-menu-btn,
#app:not(.menu-collapsed) .feature-menu-panel:focus-within .feature-menu-btn {
  min-height: 44px;
  border-radius: 12px;
  padding: 0.52rem 0.72rem 0.52rem 0.9rem !important;
}

#app:not(.menu-collapsed) .feature-menu-btn:hover {
  background: #f7f9fd;
}

#app:not(.menu-collapsed) .feature-menu-btn.active {
  background: #fff2e6;
  border-color: #ffd7b4;
  color: #dd7200;
}

#app:not(.menu-collapsed) .feature-menu-btn.active::after {
  width: 3px;
  border-radius: 999px;
  background: #ff7a00;
}

#app:not(.menu-collapsed) .feature-menu-bottom {
  margin-top: auto;
  padding: 12px 16px 14px;
  border-top: 1px solid #edf2fa;
}

#app:not(.menu-collapsed) .user-card {
  display: flex !important;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid #e6edf7;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(15, 37, 68, 0.05);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

#app:not(.menu-collapsed) .user-card:hover {
  background: #f8fbff;
  border-color: #dce7f6;
}

#app:not(.menu-collapsed) .avatar-small {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  background: linear-gradient(180deg, #f2f7ff 0%, #e5eeff 100%);
  border: 1px solid #d8e5f8;
  color: #1f4f9c;
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
}

#app:not(.menu-collapsed) .avatar-small span {
  line-height: 1;
}

#app:not(.menu-collapsed) .avatar-small-img {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
  display: block;
}

#app:not(.menu-collapsed) .user-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1 1 auto;
}

#app:not(.menu-collapsed) .user-name {
  display: block;
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: #0f2544;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#app:not(.menu-collapsed) .user-role {
  font-size: 11.5px;
  color: #7387a5;
  line-height: 1.25;
}

#app:not(.menu-collapsed) .user-logout-btn {
  min-height: 30px;
  padding: 0.2rem 0.48rem;
  font-size: 12px;
  border-radius: 9px;
}

/* Timesheet-specific metric icons and semantic accents */
#app.app-timesheet-mode .report-metric.metric-pending {
  --metric-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 2h6a2 2 0 0 1 2 2v1h2a2 2 0 0 1 2 2v13a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h2V4a2 2 0 0 1 2-2Zm0 3h6V4H9v1Zm0 5h6v2H9v-2Zm0 4h4v2H9v-2Z'/%3E%3C/svg%3E");
}

#app.app-timesheet-mode .report-metric.metric-employees {
  --metric-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M16 11c1.66 0 3-1.57 3-3.5S17.66 4 16 4s-3 1.57-3 3.5 1.34 3.5 3 3.5Zm-8 0c1.66 0 3-1.57 3-3.5S9.66 4 8 4 5 5.57 5 7.5 6.34 11 8 11Zm0 2c-2.67 0-8 1.34-8 4v3h10v-3c0-1.41.69-2.66 1.76-3.61C10.62 13.14 9.24 13 8 13Zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 2 1.97 3.45v3h7v-3c0-2.66-5.33-4-8-4Z'/%3E%3C/svg%3E");
}

#app.app-timesheet-mode .report-metric.metric-total-hours {
  --metric-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2a10 10 0 1 0 10 10A10.01 10.01 0 0 0 12 2Zm1 11h4v-2h-3V7h-2v6Z'/%3E%3C/svg%3E");
}

#app.app-timesheet-mode .report-metric.metric-month-status {
  --metric-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2a10 10 0 1 0 10 10A10.01 10.01 0 0 0 12 2Zm-1.1 14.4-3.3-3.3 1.4-1.4 1.9 1.9 4.2-4.2 1.4 1.4-5.6 5.6Z'/%3E%3C/svg%3E");
}

#app.app-timesheet-mode .report-metric.metric-overtime {
  --metric-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M13 2 4 14h6l-1 8 9-12h-6l1-8Z'/%3E%3C/svg%3E");
}

#app.app-timesheet-mode .report-metric.metric-pending::before {
  background: linear-gradient(180deg, #fff4e8 0%, #ffe8cd 100%) !important;
}

#app.app-timesheet-mode .report-metric.metric-employees::before,
#app.app-timesheet-mode .report-metric.metric-total-hours::before {
  background: linear-gradient(180deg, #eef5ff 0%, #ddeaff 100%) !important;
}

#app.app-timesheet-mode .report-metric.metric-month-status::before {
  background: linear-gradient(180deg, #ecfdf3 0%, #d9f8e7 100%) !important;
}

#app.app-timesheet-mode .report-metric.metric-overtime::before {
  background: linear-gradient(180deg, #fff1ea 0%, #ffe0d1 100%) !important;
}

#app.app-timesheet-mode .report-metric.metric-pending::after {
  background: #d96d00;
}

#app.app-timesheet-mode .report-metric.metric-employees::after,
#app.app-timesheet-mode .report-metric.metric-total-hours::after {
  background: #165fd4;
}

#app.app-timesheet-mode .report-metric.metric-month-status::after {
  background: #138a46;
}

#app.app-timesheet-mode .report-metric.metric-overtime::after {
  background: #de5a00;
}

/* Final hard override: sidebar logo fixed size */
#app:not(.menu-collapsed) .feature-menu-brand{
  padding: 24px 20px 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  overflow: visible !important;
  min-height: 72px !important;
}

#app:not(.menu-collapsed) .feature-menu-brand-logo {
  display: block !important;
  height: 58px !important;
  width: auto !important;
  max-height: none !important;
  max-width: none !important;
  min-height: 58px !important;
  min-width: 0 !important;
  transform: none !important;
  transform-origin: top left !important;
}

/* Keep login showcase title prominent */
.auth-showcase h1 {
  font-size: clamp(2.2rem, 4vw, 4.1rem) !important;
}

/* Button size normalization across dashboard/recruiting/timesheet headers */
#app .report-header-actions .btn,
#app .archive-header-actions .btn,
#app .timesheet-month-controls .btn {
  min-height: 42px !important;
  padding: 0.54rem 1rem !important;
  border-radius: 12px !important;
  font-size: var(--text-sm) !important;
  line-height: 1.2 !important;
}

#app .report-header-actions .btn-primary,
#app .archive-header-actions .btn-primary {
  box-shadow: 0 8px 16px rgba(255, 122, 0, 0.2) !important;
}

/* ========================================
   Global Theme Application Layer
======================================== */
body,
#app {
  background: var(--bg-app);
  color: var(--text-primary);
}

.card,
.report-section,
.archive-item,
.report-cv-item,
.timesheet-day,
.timesheet-day.empty,
.settings-tab-panel,
.settings-theme-card,
.entry-card {
  background: var(--bg-surface);
  border-color: var(--border);
  box-shadow: var(--shadow-soft);
}

.card {
  border-radius: var(--radius-lg);
}

.feature-menu-panel .card.sticky,
.feature-menu-panel {
  background: var(--bg-surface);
  border-color: var(--border);
}

.feature-menu-panel {
  border-right: 1px solid var(--border);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #ff9500 55%, var(--primary-hover) 100%);
  border-color: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover) 0%, #dc6700 100%);
  border-color: var(--primary-hover);
}

.btn-outline {
  background: var(--bg-surface);
  border-color: var(--border);
  color: var(--text-primary);
}

.btn-outline:hover {
  border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
  background: color-mix(in srgb, var(--primary-soft) 45%, var(--bg-surface));
}

.tag,
.skill-badge,
.employee-skill-tag,
.profile-match-count,
.report-cv-experience-badge {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 24%, var(--border));
}

:is(.header-title p, .report-header p, .archive-header p, .report-cv-meta, .report-cv-meta-item, .employee-profile-summary, .archive-item-meta, .candidate-comment-meta span, .user-role) {
  color: var(--text-secondary);
}

/* ========================================
   Premium Dark Theme Refinement
======================================== */
body.theme-dark {
  --bg-app: #070b16;
  --bg-surface: #101827;
  --bg-surface-soft: #162235;
  --bg-sidebar: #0c1422;

  --text-primary: #f8fafc;
  --text-secondary: #9aa8bd;
  --text-muted: #9aa8bd;

  --border: rgba(148, 163, 184, 0.14);
  --primary: #ff8a00;
  --primary-hover: #ff9f2f;
  --primary-soft: rgba(255, 138, 0, 0.14);
  --shadow-soft: 0 24px 60px rgba(0, 0, 0, 0.35);
}

/* Dashboard strengths/gaps readability boost in dark */
body.theme-dark #app.app-dashboard-mode :is(.employee-card-section li, .employee-card-strengths li, .employee-card-gaps li) {
  color: var(--text-secondary) !important;
}

body.theme-dark {
  background:
    radial-gradient(circle at top right, rgba(255, 138, 0, 0.08), transparent 30%),
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.08), transparent 35%),
    var(--bg-app) !important;
  color: var(--text-primary);
}

body.theme-dark #app {
  background: transparent;
  color: var(--text-primary);
}

/* Sidebar */
body.theme-dark #app:not(.menu-collapsed) .feature-menu-panel,
body.theme-dark #app:not(.menu-collapsed) .feature-menu-panel .card.sticky {
  background: var(--bg-sidebar) !important;
  border-color: var(--border) !important;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.34) !important;
}

body.theme-dark #app:not(.menu-collapsed) .feature-menu-panel {
  border-right: 1px solid var(--border) !important;
}

body.theme-dark #app:not(.menu-collapsed) .feature-menu-brand {
  background: transparent !important;
  border-bottom-color: var(--border) !important;
}

body.theme-dark #app:not(.menu-collapsed) .feature-menu-btn {
  color: var(--text-primary) !important;
}

body.theme-dark #app:not(.menu-collapsed) .feature-menu-btn:hover {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: transparent !important;
  color: var(--text-primary) !important;
}

body.theme-dark #app:not(.menu-collapsed) .feature-menu-btn.active {
  background: rgba(255, 138, 0, 0.12) !important;
  color: var(--primary) !important;
  border-left: 3px solid var(--primary) !important;
  border-color: transparent !important;
}

body.theme-dark #app:not(.menu-collapsed) .feature-menu-btn.active::after {
  display: none !important;
}

/* User card */
body.theme-dark #app:not(.menu-collapsed) .feature-menu-bottom {
  border-top-color: var(--border) !important;
}

body.theme-dark #app:not(.menu-collapsed) .user-card {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24) !important;
}

body.theme-dark #app:not(.menu-collapsed) .user-name {
  color: var(--text-primary) !important;
}

body.theme-dark #app:not(.menu-collapsed) .user-role {
  color: var(--text-secondary) !important;
}

body.theme-dark #app:not(.menu-collapsed) .user-logout-btn.btn-outline {
  background: rgba(255, 255, 255, 0.03) !important;
  border-color: var(--border) !important;
  color: var(--text-secondary) !important;
}

body.theme-dark #app:not(.menu-collapsed) .user-logout-btn.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: var(--text-primary) !important;
}

/* Cards and panels */
body.theme-dark :is(.card, .report-section, .archive-item, .report-cv-item, .settings-tab-panel, .settings-theme-card, .entry-card, .timesheet-day, .timesheet-day.empty, .timesheet-calendar) {
  background: linear-gradient(180deg, #101827 0%, #0d1524 100%) !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow-soft) !important;
}

body.theme-dark :is(.card-header, .employee-card-divider, .employee-card-section + .employee-card-section, .timesheet-calendar-week, .report-cv-meta-item + .report-cv-meta-item::before) {
  border-color: color-mix(in srgb, var(--border) 70%, transparent) !important;
}

/* Inputs */
body.theme-dark :is(input, select, textarea, .month-nav-input, .report-search) {
  background: #0b1220 !important;
  border: 1px solid var(--border) !important;
  color: var(--text-primary) !important;
}

body.theme-dark :is(input, textarea)::placeholder {
  color: var(--text-muted) !important;
}

/* Buttons */
body.theme-dark .btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%) !important;
  border-color: var(--primary) !important;
  color: #ffffff !important;
  box-shadow: 0 14px 26px rgba(255, 138, 0, 0.3) !important;
}

body.theme-dark .btn-primary:hover {
  background: linear-gradient(135deg, #ff9f2f 0%, #ff8a00 100%) !important;
}

body.theme-dark .btn-outline {
  background: rgba(255, 255, 255, 0.03) !important;
  border-color: var(--border) !important;
  color: var(--text-secondary) !important;
}

body.theme-dark .btn-outline:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: var(--text-primary) !important;
}

body.theme-dark #settingsThemeDarkBtn.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%) !important;
  border-color: var(--primary) !important;
}

body.theme-dark #settingsThemeLightBtn.btn-outline {
  background: rgba(255, 255, 255, 0.03) !important;
  border-color: var(--border) !important;
  color: var(--text-secondary) !important;
}

/* Text readability */
body.theme-dark :is(h1, h2, h3, h4, h5, h6, .report-cv-title, .employee-profile-title, .vacation-item-title, .archive-item-title) {
  color: var(--text-primary) !important;
}

body.theme-dark :is(.report-header p, .archive-header p, .employee-profile-summary, .report-cv-meta, .report-cv-meta-item, .archive-item-meta, .candidate-comment-meta span, .user-role) {
  color: var(--text-secondary) !important;
}

body.theme-dark :is(.report-metric-label, .employee-card-section h4, .employee-profile-section h4, .ui-label) {
  color: var(--text-muted) !important;
}

/* ========================================
   Dark Readability & Consistency Fixes
======================================== */
body.theme-dark :is(.card, .stat-card, .employee-card, .settings-card, .timesheet-card, .panel, .box, .report-metric, .settings-theme-card, .vacation-item, .asset-card) {
  background: var(--bg-surface) !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}

/* Timesheet stat-card specific fix: overtime must not stay white */
body.theme-dark #app.app-timesheet-mode .report-metric:nth-child(3) {
  background: var(--bg-surface) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border) !important;
}

body.theme-dark #app.app-timesheet-mode .report-metric:nth-child(3)::before {
  background: rgba(255, 138, 0, 0.16) !important;
  border-color: color-mix(in srgb, var(--primary) 30%, var(--border)) !important;
}

body.theme-dark #app.app-timesheet-mode .report-metric:nth-child(3)::after {
  background: var(--primary) !important;
}

/* Ensure metric typography stays readable */
body.theme-dark :is(.report-metric-value, .report-metric strong, .report-metric .value, .stat-card .value) {
  color: var(--text-primary) !important;
}

body.theme-dark :is(.report-metric-label, .stat-card .label, .settings-theme-card p, .vacation-item-meta) {
  color: var(--text-secondary) !important;
}

/* Sidebar user card */
body.theme-dark #app:not(.menu-collapsed) .user-card {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid var(--border) !important;
}

body.theme-dark #app:not(.menu-collapsed) .user-card :is(.user-name, #authUserBadge) {
  color: var(--text-primary) !important;
}

body.theme-dark #app:not(.menu-collapsed) .user-card .user-role {
  color: var(--text-secondary) !important;
}

body.theme-dark #app:not(.menu-collapsed) .user-card .avatar-small {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-primary) !important;
}

body.theme-dark #app:not(.menu-collapsed) .user-card .avatar-small-img {
  background: transparent !important;
}

body.theme-dark #app:not(.menu-collapsed) .user-card .user-logout-btn {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-primary) !important;
}

/* Secondary buttons */
body.theme-dark :is(.btn-outline, .btn-secondary) {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-primary) !important;
}

body.theme-dark :is(.btn-outline:hover, .btn-secondary:hover) {
  background: rgba(255, 255, 255, 0.08) !important;
}

/* Inputs, selects, textareas */
body.theme-dark :is(input, textarea, select) {
  background: #0b1220 !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}

body.theme-dark :is(input, textarea)::placeholder {
  color: var(--text-muted) !important;
}

/* Timesheet calendar readability */
body.theme-dark .timesheet-calendar {
  background: #101827 !important;
  border: 1px solid var(--border) !important;
}

body.theme-dark .timesheet-day {
  background: #0f1b2d !important;
  border: 1px solid var(--border) !important;
  color: var(--text-primary) !important;
}

body.theme-dark .timesheet-day.timesheet-day-working {
  background: linear-gradient(180deg, #1b2638 0%, #162131 100%) !important;
  border-color: rgba(255, 122, 0, 0.42) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 122, 0, 0.12);
}

body.theme-dark .timesheet-day.timesheet-day-weekend {
  background: linear-gradient(180deg, #111b2a 0%, #0e1724 100%) !important;
  border-color: rgba(100, 116, 139, 0.45) !important;
}

body.theme-dark .timesheet-day.timesheet-day-holiday {
  border-color: rgba(255, 166, 38, 0.82) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 166, 38, 0.3) !important;
}

body.theme-dark .timesheet-day.timesheet-day-complete {
  background: linear-gradient(180deg, #16301f 0%, #122819 100%) !important;
  border-color: rgba(52, 168, 83, 0.6) !important;
  box-shadow: inset 0 0 0 1px rgba(52, 168, 83, 0.3) !important;
}

body.theme-dark .timesheet-day-holiday-label {
  color: #ffd6ad !important;
  background: rgba(255, 138, 0, 0.2) !important;
  border-color: rgba(255, 166, 38, 0.55) !important;
}

body.theme-dark .timesheet-day.empty {
  background: #101827 !important;
}

body.theme-dark .timesheet-day.timesheet-day-working .timesheet-day-number {
  color: #ffd6ad !important;
}

body.theme-dark .timesheet-day.timesheet-day-weekend .timesheet-day-number {
  color: #a9b9cc !important;
}

body.theme-dark .timesheet-day-input {
  background: #0b1220 !important;
  color: var(--text-primary) !important;
}

body.theme-dark :is(.timesheet-day-number, .timesheet-day-hours, .timesheet-day-line, .timesheet-calendar-week span) {
  color: var(--text-primary) !important;
}

body.theme-dark .timesheet-day-line-button:hover .timesheet-day-line {
  color: #8fc4ff !important;
}

body.theme-dark .timesheet-day-line-item.is-vacation-linked {
  background: linear-gradient(180deg, rgba(13, 148, 136, 0.16) 0%, rgba(8, 145, 178, 0.12) 100%) !important;
  border-color: rgba(45, 212, 191, 0.24) !important;
}

body.theme-dark .timesheet-day-line-item.is-vacation-linked .timesheet-day-line-button:hover .timesheet-day-line {
  color: #8ff3df !important;
}

body.theme-dark .timesheet-day-line-remove {
  color: #ffc1d6 !important;
  background: rgba(225, 29, 72, 0.2) !important;
}

body.theme-dark .timesheet-day-line-lock {
  color: #8ff3df !important;
}

body.theme-dark .timesheet-day-hours-badge {
  color: #cfe5ff !important;
  background: rgba(64, 140, 255, 0.16) !important;
  border-color: rgba(96, 165, 250, 0.32) !important;
}

body.theme-dark .timesheet-day-overtime {
  color: #ffd6ad !important;
  background: rgba(255, 166, 38, 0.16) !important;
  border-color: rgba(255, 166, 38, 0.34) !important;
}

/* ========================================
   My Profile + Sidebar User Box Refinement
======================================== */
.employee-profile-card,
.employee-profile-card.compact {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: 0 8px 22px rgba(15, 37, 68, 0.08);
}

.employee-profile-title {
  color: var(--text-primary) !important;
}

.employee-profile-summary,
.employee-profile-section li {
  color: var(--text-secondary) !important;
}

.employee-profile-section h4 {
  color: var(--text-muted) !important;
}

.employee-profile-grid {
  background: color-mix(in srgb, var(--bg-surface) 96%, #dfe9f7) !important;
  border: 1px solid var(--border) !important;
}

.employee-profile-section + .employee-profile-section {
  border-left: 1px solid var(--border) !important;
}

#app:not(.menu-collapsed) .user-card {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border) !important;
}

#app:not(.menu-collapsed) .user-name,
#app:not(.menu-collapsed) #authUserBadge {
  color: var(--text-primary) !important;
}

#app:not(.menu-collapsed) .user-role {
  color: var(--text-secondary) !important;
}

#app:not(.menu-collapsed) .user-logout-btn {
  border-color: var(--border) !important;
}

body.theme-dark .employee-profile-card,
body.theme-dark .employee-profile-card.compact {
  background: linear-gradient(180deg, #101827 0%, #0d1524 100%) !important;
  border-color: var(--border) !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.32) !important;
}

body.theme-dark .employee-profile-grid {
  background: rgba(255, 255, 255, 0.02) !important;
  border-color: var(--border) !important;
}

body.theme-dark .employee-profile-section + .employee-profile-section {
  border-left-color: var(--border) !important;
}

/* ========================================
   Dark Mode Audit: Final Hard Overrides
======================================== */
body.theme-dark :is(.card, .panel, .box, .section, .stat-card, .profile-card, .employee-card, .asset-card, .settings-card, .empty-state, .info-box, .form-card) {
  background: var(--bg-surface) !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}

/* Settings + asset surfaces that were still bright */
body.theme-dark :is(.settings-theme-card, .settings-version-item, .settings-org-pool, .settings-org-branch-card, .settings-org-dropzone, .settings-user-item, .settings-audit-item, .settings-tab-btn) {
  background: var(--bg-surface) !important;
  border-color: var(--border) !important;
  color: var(--text-primary) !important;
}

body.theme-dark :is(.settings-theme-card p, .settings-version-item span, .settings-org-user-chip span, .settings-user-meta span, .settings-audit-item span) {
  color: var(--text-secondary) !important;
}

body.theme-dark :is(.settings-theme-card h4, .settings-version-item strong, .settings-org-user-chip strong, .settings-user-meta strong, .settings-audit-item strong) {
  color: var(--text-primary) !important;
}

/* Asset + onboarding shared cards/fields */
body.theme-dark :is(.onboarding-card, .onboarding-section, .onboarding-list-item, .offboarding-add-employee, .asset-cards-shell, .asset-card) {
  background: var(--bg-surface) !important;
  border-color: var(--border) !important;
  color: var(--text-primary) !important;
}

body.theme-dark :is(.onboarding-list-item.active, .onboarding-status-pill, .asset-status-pill, .asset-cards-count) {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: var(--border) !important;
  color: var(--text-primary) !important;
}

body.theme-dark :is(.asset-card-field label, .onboarding-progress-label, .onboarding-list-item-meta, .asset-col-notes, .asset-col-serial) {
  color: var(--text-secondary) !important;
}

body.theme-dark :is(.asset-col-name, .asset-card-value, .onboarding-list-item-name) {
  color: var(--text-primary) !important;
}

/* Inputs/selects/textarea (including readonly/disabled) */
body.theme-dark :is(input, textarea, select, .asset-field-input, .asset-field-textarea, .month-nav-input, .timesheet-day-input) {
  background: #0b1220 !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}

body.theme-dark :is(input[readonly], input:disabled, select:disabled, textarea:disabled, .asset-field-input[readonly], .asset-field-textarea[readonly]) {
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--text-secondary) !important;
  border-color: var(--border) !important;
}

body.theme-dark :is(input, textarea)::placeholder {
  color: var(--text-muted) !important;
}

/* Empty/information states */
body.theme-dark :is(.archive-empty, .archive-empty-rich, .ui-state-card, .placeholder-box, .notice, .alert, .message-box, .archive-skeleton-card, .onboarding-alert, .archive-chat-message) {
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--text-secondary) !important;
  border: 1px dashed var(--border) !important;
}

body.theme-dark :is(.archive-empty-title, .ui-state-card .archive-empty-title, .archive-empty-icon, .onboarding-alert strong) {
  color: var(--text-primary) !important;
}

/* Profile/stat boxes */
body.theme-dark :is(.dossier-kpi, .hr-card, .profile-match-count, .employee-profile-grid, .employee-profile-section) {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: var(--border) !important;
}

body.theme-dark :is(.dossier-kpi span, .employee-profile-section h4) {
  color: var(--text-muted) !important;
}

body.theme-dark :is(.dossier-kpi strong, .employee-profile-summary, .employee-profile-section li) {
  color: var(--text-secondary) !important;
}

/* Sidebar footer user card full dark */
body.theme-dark :is(.user-card, .sidebar-user, .user-footer) {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-primary) !important;
}

body.theme-dark :is(.user-card input, .sidebar-user input, .user-footer input) {
  background: transparent !important;
  color: var(--text-primary) !important;
  border: none !important;
}

/* Sidebar bottom name field: remove legacy pill box styling */
#app:not(.menu-collapsed) #authUserInfo.user-card #authUserBadge {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  text-align: left;
  color: var(--text-primary) !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.theme-dark #app:not(.menu-collapsed) #authUserInfo.user-card #authUserBadge {
  color: var(--text-primary) !important;
}

/* Sidebar active marker: enforce visible orange bar in light theme */
body:not(.theme-dark):not([data-theme="dark"]) #app:not(.menu-collapsed) .feature-menu-btn.active::after {
  content: "";
  display: block !important;
  opacity: 1 !important;
  left: -0.55rem;
  top: 50%;
  width: 3px;
  height: 24px;
  border-radius: 999px;
  background: var(--primary) !important;
  transform: translateY(-50%) scaleY(1) !important;
}

/* Sidebar active label/icon color: enforce orange in light theme */
body:not(.theme-dark):not([data-theme="dark"]) #app:not(.menu-collapsed) .feature-menu-btn.active,
body:not(.theme-dark):not([data-theme="dark"]) #app:not(.menu-collapsed) .feature-menu-btn.active > span,
body:not(.theme-dark):not([data-theme="dark"]) #app:not(.menu-collapsed) .feature-menu-btn.active .label-with-badge {
  color: var(--primary) !important;
}

body:not(.theme-dark):not([data-theme="dark"]) #app:not(.menu-collapsed) .feature-menu-btn.active::before {
  background: var(--primary) !important;
  background-color: var(--primary) !important;
  border-color: color-mix(in srgb, var(--primary) 55%, white) !important;
}

/* Keep active state while sidebar is hovered/focused (light theme) */
body:not(.theme-dark):not([data-theme="dark"]) #app:not(.menu-collapsed) .feature-menu-panel:hover .feature-menu-btn.active,
body:not(.theme-dark):not([data-theme="dark"]) #app:not(.menu-collapsed) .feature-menu-panel:focus-within .feature-menu-btn.active {
  color: var(--primary) !important;
  background: var(--primary-soft) !important;
  border-color: #ffd7b4 !important;
}

body:not(.theme-dark):not([data-theme="dark"]) #app:not(.menu-collapsed) .feature-menu-panel:hover .feature-menu-btn.active > span,
body:not(.theme-dark):not([data-theme="dark"]) #app:not(.menu-collapsed) .feature-menu-panel:focus-within .feature-menu-btn.active > span,
body:not(.theme-dark):not([data-theme="dark"]) #app:not(.menu-collapsed) .feature-menu-panel:hover .feature-menu-btn.active .label-with-badge,
body:not(.theme-dark):not([data-theme="dark"]) #app:not(.menu-collapsed) .feature-menu-panel:focus-within .feature-menu-btn.active .label-with-badge {
  color: var(--primary) !important;
}

body:not(.theme-dark):not([data-theme="dark"]) #app:not(.menu-collapsed) .feature-menu-panel:hover .feature-menu-btn.active::before,
body:not(.theme-dark):not([data-theme="dark"]) #app:not(.menu-collapsed) .feature-menu-panel:focus-within .feature-menu-btn.active::before {
  background: var(--primary) !important;
  background-color: var(--primary) !important;
  border-color: color-mix(in srgb, var(--primary) 55%, white) !important;
}

body:not(.theme-dark):not([data-theme="dark"]) #app:not(.menu-collapsed) .feature-menu-panel:hover .feature-menu-btn.active::after,
body:not(.theme-dark):not([data-theme="dark"]) #app:not(.menu-collapsed) .feature-menu-panel:focus-within .feature-menu-btn.active::after {
  opacity: 1 !important;
  background: var(--primary) !important;
  transform: translateY(-50%) scaleY(1) !important;
}

/* Profile readability refinement (light) */
body:not(.theme-dark):not([data-theme="dark"]) :is(.employee-profile-summary, .employee-profile-section li, .employee-profile-list-empty, .dossier-list li, .dossier-item-subtitle, .dossier-employee-meta) {
  color: #3c5677 !important;
}

body:not(.theme-dark):not([data-theme="dark"]) :is(.employee-profile-section h4, .dossier-section-title) {
  color: #4f6684 !important;
}

body:not(.theme-dark):not([data-theme="dark"]) #app.app-dashboard-mode :is(.employee-card-strengths li, .employee-card-gaps li, .employee-card-section li) {
  color: #37516f !important;
}

/* Profile readability refinement (dark) */
body.theme-dark :is(.employee-profile-summary, .employee-profile-section li, .employee-profile-list-empty, .dossier-list li, .dossier-item-subtitle, .dossier-employee-meta) {
  color: var(--text-secondary) !important;
}

body.theme-dark :is(.employee-profile-section h4, .dossier-section-title) {
  color: color-mix(in srgb, var(--text-secondary) 86%, var(--text-primary)) !important;
}

body.theme-dark #app.app-dashboard-mode :is(.employee-card-strengths li, .employee-card-gaps li, .employee-card-section li) {
  color: var(--text-secondary) !important;
}

/* Recruiting switch readability (dark) */
body.theme-dark .candidates-view-switch {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid var(--border) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03) !important;
}

body.theme-dark .candidates-view-switch .candidates-view-btn {
  background: transparent !important;
  border-color: transparent !important;
  color: var(--text-secondary) !important;
}

body.theme-dark .candidates-view-switch .candidates-view-btn:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: var(--text-primary) !important;
}

body.theme-dark .candidates-view-switch .candidates-view-btn.active {
  background: var(--primary-soft) !important;
  border-color: color-mix(in srgb, var(--primary) 55%, transparent) !important;
  color: var(--primary) !important;
  box-shadow: 0 8px 18px rgba(255, 138, 0, 0.16) !important;
}

/* Dark mode logos */
body.theme-dark .header-logo {
  content: url("../img/logo_dark_mode.png");
  width: clamp(185px, 23vw, 290px) !important;
  height: 60px !important;
  max-height: 60px !important;
  object-fit: cover !important;
  object-position: center !important;
}

body.theme-dark .feature-menu-brand-logo {
  content: url("../img/logo_dark_mode.png");
  height: 58px !important;
  width: auto !important;
  max-height: none !important;
  max-width: none !important;
  min-height: 58px !important;
  object-fit: contain !important;
}

/* Recruiting/Candidates sections readability (dark) */
body.theme-dark .recruiting-column {
  background: linear-gradient(180deg, #121c2d 0%, #0f1727 100%) !important;
  border-color: var(--border) !important;
}

body.theme-dark .recruiting-column[data-recruiting-stage="nuovi"] {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.12) 0%, rgba(59, 130, 246, 0.06) 100%) !important;
}

body.theme-dark .recruiting-column[data-recruiting-stage="in_valutazione"] {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.12) 0%, rgba(245, 158, 11, 0.06) 100%) !important;
}

body.theme-dark .recruiting-column[data-recruiting-stage="in_colloquio"] {
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.14) 0%, rgba(139, 92, 246, 0.07) 100%) !important;
}

body.theme-dark .recruiting-column[data-recruiting-stage="assunto"] {
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.12) 0%, rgba(34, 197, 94, 0.06) 100%) !important;
}

body.theme-dark .recruiting-column[data-recruiting-stage="scartato"] {
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.12) 0%, rgba(239, 68, 68, 0.06) 100%) !important;
}

body.theme-dark .recruiting-column-header {
  border-bottom-color: var(--border) !important;
}

body.theme-dark .recruiting-column-header h3 {
  color: var(--text-primary) !important;
}

body.theme-dark .recruiting-column-count {
  background: var(--primary-soft) !important;
  border-color: color-mix(in srgb, var(--primary) 55%, transparent) !important;
  color: var(--primary) !important;
}

body.theme-dark .recruiting-card {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: var(--border) !important;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25) !important;
}

body.theme-dark .recruiting-card-title {
  color: var(--text-primary) !important;
}

body.theme-dark .recruiting-card-meta {
  color: var(--text-secondary) !important;
}

body.theme-dark .recruiting-card-role {
  color: var(--text-primary) !important;
}

body.theme-dark .recruiting-card-open-btn.btn-outline {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: var(--border) !important;
  color: var(--text-primary) !important;
}

body.theme-dark :is(.candidate-comment-meta, .candidate-comment-text) {
  color: var(--text-secondary) !important;
}

body.theme-dark .candidate-comment-meta strong {
  color: var(--text-primary) !important;
}

/* Workspace (Editor CV) dark-mode cleanup: remove remaining white blocks */
body.theme-dark #app.app-workspace-mode :is(.editor-panel .card, .preview-panel .card, .tab-content, .tab-panel, .form-section, .entry-card, .suggested-skills, .info-box, .preview-scroll) {
  background: var(--bg-surface) !important;
  border-color: var(--border) !important;
  color: var(--text-primary) !important;
}


body.theme-dark #app.app-workspace-mode .editor-more-menu {
  background: var(--bg-surface) !important;
  border-color: var(--border) !important;
  color: var(--text-primary) !important;
}

body.theme-dark #app.app-workspace-mode :is(.tabs, .card-footer) {
  background: rgba(255, 255, 255, 0.02) !important;
  border-color: var(--border) !important;
}

body.theme-dark #app.app-workspace-mode :is(.form-group label, .suggested-skills h4, .preview-language-control label) {
  color: var(--text-secondary) !important;
}

body.theme-dark #app.app-workspace-mode .photo-preview {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: var(--border) !important;
}

body.theme-dark #app.app-workspace-mode :is(#profilePhotoInput::file-selector-button, #profilePhotoInput::-webkit-file-upload-button) {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: var(--border) !important;
  color: var(--text-primary) !important;
}

/* CV preview blocks in editor side panel */
body.theme-dark #app.app-workspace-mode :is(.cv-preview, .cv-preview-header, .cv-preview-body, .cv-preview-section, .cv-preview-entry, .cv-preview-soft-skill, .cv-preview-language-item) {
  background: #0f1727 !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}

/* Keep CV preview as white paper even in dark mode */
body.theme-dark #app.app-workspace-mode :is(.cv-preview, .cv-preview-header, .cv-preview-body, .cv-preview-section, .cv-preview-entry, .cv-preview-soft-skill, .cv-preview-language-item) {
  background: #ffffff !important;
  color: #1f2f46 !important;
  border-color: #dfe6ef !important;
}

body.theme-dark #app.app-workspace-mode .cv-preview {
  border: 1px solid #d9e2ee !important;
  border-radius: 12px !important;
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.28),
    0 2px 0 rgba(255, 255, 255, 0.75) inset !important;
}

/* ========================================
   Mobile App Shell v1
======================================== */

@media (max-width: 1024px) {
  #app {
    background:
      radial-gradient(120% 120% at 0% 0%, #f8fafd 0%, #f2f6fb 58%, #eef3f9 100%);
    min-height: 100vh;
    padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }

  body.theme-dark #app {
    background:
      radial-gradient(120% 120% at 0% 0%, #162333 0%, #121e2c 58%, #101a26 100%);
  }

  .header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e6edf7;
    box-shadow: none;
    padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px;
  }

  body.theme-dark .header {
    background: rgba(16, 26, 38, 0.9);
    border-bottom-color: #2c3f56;
  }

  .header-content {
    max-width: none;
    min-height: 40px;
  }

  .header-logo-wrapper {
    gap: 0.55rem;
    display: flex !important;
    align-items: center;
  }

  .header-logo {
    display: block;
    width: auto;
    height: 30px;
    max-height: none;
    object-fit: contain;
    object-position: left center;
  }

  .header-title {
    display: none;
  }

  .main-content {
    max-width: none;
    margin: 0;
    padding: 14px 12px 12px;
    gap: 0.85rem;
    grid-template-columns: 1fr !important;
  }

  #app.app-workspace-mode .main-content,
  #app:not(.menu-collapsed).app-workspace-mode .main-content,
  #app.app-dashboard-mode .main-content,
  #app.app-hrinsights-mode .main-content,
  #app.app-hiddengems-mode .main-content,
  #app.app-dossier-mode .main-content,
  #app.app-settings-mode .main-content,
  #app.app-organization-mode .main-content,
  #app.app-vacation-mode .main-content,
  #app.app-timesheet-mode .main-content,
  #app.app-coach-mode .main-content,
  #app.app-onboarding-mode .main-content,
  #app.app-offboarding-mode .main-content,
  #app.app-asset-mode .main-content,
  #app:not(.menu-collapsed).app-dashboard-mode .main-content,
  #app:not(.menu-collapsed).app-hrinsights-mode .main-content,
  #app:not(.menu-collapsed).app-hiddengems-mode .main-content,
  #app:not(.menu-collapsed).app-dossier-mode .main-content,
  #app:not(.menu-collapsed).app-settings-mode .main-content,
  #app:not(.menu-collapsed).app-organization-mode .main-content,
  #app:not(.menu-collapsed).app-vacation-mode .main-content,
  #app:not(.menu-collapsed).app-timesheet-mode .main-content,
  #app:not(.menu-collapsed).app-coach-mode .main-content,
  #app:not(.menu-collapsed).app-onboarding-mode .main-content,
  #app:not(.menu-collapsed).app-offboarding-mode .main-content,
  #app:not(.menu-collapsed).app-asset-mode .main-content {
    grid-template-columns: 1fr !important;
  }

  .archive-panel {
    display: none !important;
  }

  .report-card,
  .hr-panel .report-card,
  .coach-panel .report-card,
  .hidden-gems-panel .report-card,
  .settings-panel .report-card,
  .vacation-panel .report-card,
  .timesheet-panel .report-card,
  .dossier-panel .report-card {
    border-radius: 18px;
    border: 1px solid #dde6f2;
    box-shadow: 0 10px 24px rgba(16, 38, 66, 0.07);
    overflow: hidden;
  }

  .report-card .card-header {
    padding: 1rem 1rem 0.8rem;
  }

  .report-card .card-body {
    padding: 0.85rem 1rem 1rem;
  }

  .report-header h2 {
    font-size: 1.34rem;
    line-height: 1.15;
    letter-spacing: -0.01em;
  }

  .report-header p {
    font-size: 0.9rem;
    margin-top: 0.22rem;
  }

  .feature-menu-panel {
    position: fixed !important;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto !important;
    max-height: none !important;
    z-index: 55;
    padding: 0 10px calc(8px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, rgba(246, 249, 253, 0) 0%, rgba(246, 249, 253, 0.94) 36%, rgba(246, 249, 253, 1) 100%);
  }

  #app.menu-collapsed .feature-menu-panel {
    display: block !important;
  }

  body.theme-dark .feature-menu-panel {
    background: linear-gradient(180deg, rgba(14, 24, 36, 0) 0%, rgba(14, 24, 36, 0.94) 36%, rgba(14, 24, 36, 1) 100%);
  }

  .feature-menu-panel .card.sticky {
    position: static !important;
    top: auto !important;
    max-height: none !important;
    border-radius: 18px;
    border: 1px solid #dde6f2;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 26px rgba(17, 39, 67, 0.12);
    backdrop-filter: blur(8px);
    overflow: hidden;
  }

  body.theme-dark .feature-menu-panel .card.sticky {
    border-color: #2b3d52;
    background: rgba(20, 32, 46, 0.94);
  }

  .feature-menu-brand,
  .feature-menu-header,
  .feature-menu-bottom {
    display: none !important;
  }

  .feature-menu-panel .feature-menu-body {
    padding: 6px;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(86px, 1fr);
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }

  .feature-menu-panel .feature-menu-body::-webkit-scrollbar {
    display: none;
  }

  #app:not(.menu-collapsed) .feature-menu-panel,
  #app:not(.menu-collapsed) .feature-menu-panel:hover,
  #app:not(.menu-collapsed) .feature-menu-panel:focus-within {
    width: 100% !important;
  }

  #app:not(.menu-collapsed) .feature-menu-panel .card.sticky,
  #app:not(.menu-collapsed) .feature-menu-panel:hover .card.sticky,
  #app:not(.menu-collapsed) .feature-menu-panel:focus-within .card.sticky {
    display: block !important;
    max-height: 76px !important;
    min-height: 76px !important;
    height: 76px !important;
  }

  #app:not(.menu-collapsed) .feature-menu-panel .feature-menu-body,
  #app:not(.menu-collapsed) .feature-menu-panel:hover .feature-menu-body,
  #app:not(.menu-collapsed) .feature-menu-panel:focus-within .feature-menu-body {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap !important;
    padding: 6px !important;
    max-height: 74px !important;
    min-height: 74px !important;
    height: 74px !important;
  }

  .feature-menu-btn,
  #app:not(.menu-collapsed) .feature-menu-btn,
  #app:not(.menu-collapsed) .feature-menu-panel:hover .feature-menu-btn,
  #app:not(.menu-collapsed) .feature-menu-panel:focus-within .feature-menu-btn {
    min-height: 58px;
    padding: 7px 8px !important;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center !important;
    align-items: center;
    gap: 4px;
    border: 1px solid transparent;
    background: transparent;
    box-shadow: none;
  }

  .feature-menu-btn::before,
  #app:not(.menu-collapsed) .feature-menu-btn::before {
    width: 18px;
    height: 18px;
    margin: 0;
  }

  .feature-menu-btn > span,
  #app:not(.menu-collapsed) .feature-menu-btn > span,
  #app:not(.menu-collapsed) .feature-menu-panel:hover .feature-menu-btn > span,
  #app:not(.menu-collapsed) .feature-menu-panel:focus-within .feature-menu-btn > span {
    font-size: 0.68rem;
    line-height: 1.15;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    opacity: 1 !important;
  }

  .feature-menu-btn.active {
    background: #fff5ea;
    border-color: #ffd7ac;
    color: #e77800;
  }
}

@media (max-width: 1024px) {
  #app .main-content {
    padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important;
  }

  #app .feature-menu-panel,
  #app .feature-menu-panel:hover,
  #app .feature-menu-panel:focus-within,
  #app.menu-collapsed .feature-menu-panel {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: fixed !important;
    inset: auto 0 0 0 !important;
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-height: 86px !important;
    min-height: 86px !important;
    height: 86px !important;
    z-index: 70 !important;
    transform: none !important;
  }

  #app .feature-menu-panel .card.sticky {
    display: block !important;
    max-height: 78px !important;
    min-height: 78px !important;
    height: 78px !important;
  }

  #app .feature-menu-panel .feature-menu-body {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }
}

.mobile-bottom-nav {
  display: none;
}

.mobile-header-icon-btn,
.mobile-dashboard-fab {
  display: none;
}

.mobile-more-menu-overlay {
  display: none;
}

@media (max-width: 1024px) {
  #app .feature-menu-panel {
    display: none !important;
  }

  #app .main-content {
    padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    height: calc(64px + env(safe-area-inset-bottom, 0px));
    padding: 6px 10px calc(6px + env(safe-area-inset-bottom, 0px));
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid #e6edf7;
    backdrop-filter: blur(8px);
  }

  body.theme-dark .mobile-bottom-nav {
    background: rgba(18, 29, 42, 0.96);
    border-top-color: #2b3d52;
  }

  .mobile-bottom-nav-btn {
    border: 0;
    background: transparent;
    color: #6d8098;
    border-radius: 12px;
    min-height: 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 4px 2px;
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
  }

  .mobile-bottom-nav-icon {
    font-size: 1rem;
    line-height: 1;
  }

  .mobile-bottom-nav-btn.active {
    color: #f0821d;
    background: #fff4e8;
  }

  .mobile-more-menu-overlay {
    position: fixed;
    inset: 0;
    /* Keep overlay above workspace editor sticky layers (tabs/header at 120/130). */
    z-index: 320;
    background: rgba(8, 18, 30, 0.42);
    display: none;
    align-items: flex-end;
    justify-content: stretch;
  }

  .mobile-more-menu-sheet {
    width: 100%;
    max-height: min(72vh, 560px);
    position: relative;
    z-index: 321;
    background: #ffffff;
    border-radius: 18px 18px 0 0;
    border-top: 1px solid #dce7f3;
    box-shadow: 0 -10px 28px rgba(16, 38, 66, 0.18);
    overflow: hidden;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  }

  .mobile-more-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid #e6edf7;
  }

  .mobile-more-menu-head h3 {
    margin: 0;
    font-size: 1rem;
    color: #173354;
  }

  .mobile-more-menu-list {
    padding: 8px;
    max-height: calc(min(72vh, 560px) - 64px);
    overflow: auto;
    display: grid;
    gap: 6px;
  }

  .mobile-more-menu-group {
    display: grid;
    gap: 6px;
  }

  .mobile-more-menu-group-toggle {
    width: 100%;
    min-height: 46px;
    border-radius: 12px;
    border: 1px solid #dfe8f2;
    background: linear-gradient(180deg, #ffffff 0%, #f6f9fd 100%);
    color: #18314d;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 800;
    text-align: left;
  }

  .mobile-more-menu-group-toggle-label {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    flex: 1 1 auto;
  }

  .mobile-more-menu-group-toggle-icon {
    width: 1rem;
    height: 1rem;
    flex: 0 0 1rem;
    background-color: currentColor;
    opacity: 0.92;
    -webkit-mask: var(--mobile-more-menu-group-icon) center / contain no-repeat;
    mask: var(--mobile-more-menu-group-icon) center / contain no-repeat;
  }

  .mobile-more-menu-group[data-mobile-group="profile"] .mobile-more-menu-group-toggle {
    --mobile-more-menu-group-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 12a5 5 0 1 0-5-5 5 5 0 0 0 5 5Zm0 2c-4.42 0-8 2.69-8 6v2h16v-2c0-3.31-3.58-6-8-6Z'/%3E%3C/svg%3E");
  }

  .mobile-more-menu-group[data-mobile-group="resources"] .mobile-more-menu-group-toggle {
    --mobile-more-menu-group-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 5h18v2H3V5Zm0 6h18v2H3v-2Zm0 6h18v2H3v-2ZM6 4h2v4H6V4Zm10 6h2v4h-2v-4Zm-4 6h2v4h-2v-4Z'/%3E%3C/svg%3E");
  }

  .mobile-more-menu-group[data-mobile-group="timesheet"] .mobile-more-menu-group-toggle {
    --mobile-more-menu-group-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 2h2v2h6V2h2v2h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2V2Zm12 8H5v10h14V10Zm-9.8 6.8 1.4 1.4 4.8-4.8-1.4-1.4-3.4 3.4-1.4-1.4-1.4 1.4Z'/%3E%3C/svg%3E");
  }

  .mobile-more-menu-group[data-mobile-group="lifecycle"] .mobile-more-menu-group-toggle {
    --mobile-more-menu-group-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 3a9 9 0 0 0-9 9h2a7 7 0 1 1 2.05 4.95L5 14H1v8h2v-4.42A9 9 0 1 0 12 3Zm1 4h-2v5.17l4.1 2.46 1-1.72-3.1-1.86V7Z'/%3E%3C/svg%3E");
  }

  .mobile-more-menu-group[data-mobile-group="organization"] .mobile-more-menu-group-toggle {
    --mobile-more-menu-group-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 4h18v4H3V4Zm0 6h8v10H3V10Zm10 0h8v10h-8V10ZM6 7h2V5H6v2Zm10 0h2V5h-2v2ZM6 13h2v2H6v-2Zm10 0h2v2h-2v-2Z'/%3E%3C/svg%3E");
  }

  .mobile-more-menu-group[data-mobile-group="communications"] .mobile-more-menu-group-toggle {
    --mobile-more-menu-group-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 4h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H8l-4 4V6a2 2 0 0 1 2-2Zm2 4v2h12V8H6Zm0 4v2h8v-2H6Z'/%3E%3C/svg%3E");
  }

  .mobile-more-menu-group[data-mobile-group="payroll"] .mobile-more-menu-group-toggle {
    --mobile-more-menu-group-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6 3h9l5 5v11a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2Zm8 1.5V9h4.5L14 4.5ZM8 12h8v1.5H8V12Zm0 3h8v1.5H8V15Zm0-6h4v1.5H8V9Z'/%3E%3C/svg%3E");
  }

  .mobile-more-menu-group[data-mobile-group="system"] .mobile-more-menu-group-toggle {
    --mobile-more-menu-group-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='m19.14 12.94.03-.94-.03-.94 2.03-1.58a.5.5 0 0 0 .12-.64l-1.92-3.32a.5.5 0 0 0-.6-.22l-2.39.96a7.5 7.5 0 0 0-1.62-.94l-.36-2.54a.5.5 0 0 0-.5-.42h-3.84a.5.5 0 0 0-.5.42l-.36 2.54c-.57.23-1.11.55-1.62.94l-2.39-.96a.5.5 0 0 0-.6.22L2.7 8.84a.5.5 0 0 0 .12.64l2.03 1.58-.03.94.03.94L2.82 14.52a.5.5 0 0 0-.12.64l1.92 3.32c.13.23.4.32.64.22l2.35-.94c.5.39 1.05.71 1.65.95l.36 2.51c.04.24.25.42.5.42h3.84a.5.5 0 0 0 .5-.42l.36-2.51c.6-.24 1.15-.56 1.65-.95l2.35.94c.24.1.51.01.64-.22l1.92-3.32a.5.5 0 0 0-.12-.64l-2.03-1.58ZM12 15.5A3.5 3.5 0 1 1 12 8a3.5 3.5 0 0 1 0 7.5Z'/%3E%3C/svg%3E");
  }

  .mobile-more-menu-group-toggle-chevron {
    flex: 0 0 auto;
    font-size: 1.05rem;
    line-height: 1;
    font-weight: 900;
    opacity: 0.9;
    transition: transform 0.18s ease;
  }

  .mobile-more-menu-group.is-collapsed .mobile-more-menu-group-toggle-chevron {
    transform: rotate(180deg);
  }

  .mobile-more-menu-group-items {
    display: grid;
    gap: 6px;
    padding-left: 12px;
  }

  .mobile-more-menu-group.is-collapsed .mobile-more-menu-group-items {
    display: none;
  }

  .mobile-more-menu-item {
    width: 100%;
    min-height: 44px;
    border-radius: 12px;
    border: 1px solid #e4ecf6;
    background: #ffffff;
    color: #1d3a5d;
    text-align: left;
    padding: 10px 12px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
  }

  .mobile-more-menu-item-child {
    padding-left: 16px;
    min-height: 42px;
  }

  .mobile-more-menu-item.active {
    border-color: #ffd6aa;
    background: #fff5e9;
    color: #d97300;
  }

  .mobile-more-menu-empty {
    margin: 0;
    color: #667b95;
    font-size: 0.9rem;
    padding: 12px;
  }

  body.theme-dark .mobile-bottom-nav-btn {
    color: #93a8bf;
  }

  body.theme-dark .mobile-bottom-nav-btn.active {
    color: #ff9d3c;
    background: rgba(255, 143, 31, 0.16);
  }

  body.theme-dark .mobile-more-menu-sheet {
    background: #162334;
    border-top-color: #2c3f56;
  }

  body.theme-dark .mobile-more-menu-head {
    border-bottom-color: #2c3f56;
  }

  body.theme-dark .mobile-more-menu-head h3 {
    color: #d7e5f5;
  }

  body.theme-dark .mobile-more-menu-item {
    background: #1a2b3f;
    border-color: #2f445d;
    color: #c8d9eb;
  }

  body.theme-dark .mobile-more-menu-item.active {
    background: rgba(255, 143, 31, 0.16);
    border-color: rgba(255, 143, 31, 0.42);
    color: #ffb468;
  }

  body.theme-dark .mobile-more-menu-group-toggle {
    background: #1a2b3f;
    border-color: #2f445d;
    color: #d6e5f5;
  }

  body.theme-dark .mobile-more-menu-group-toggle-icon {
    background-color: currentColor;
  }

  body.theme-dark .mobile-more-menu-group-toggle-chevron {
    color: #d6e5f5;
  }
}

@media (max-width: 1024px) {
  .header-logo {
    content: url("../img/logo_sidebar.png");
    width: auto !important;
    height: 40px !important;
    max-height: 40px !important;
    object-fit: contain !important;
    object-position: left center !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 0 !important;
  }

  body.theme-dark .header-logo {
    content: url("../img/logo_dark_mode.png");
    width: auto !important;
    height: 40px !important;
    max-height: 40px !important;
    object-fit: contain !important;
    object-position: left center !important;
  }
}

/* ========================================
   Mobile Archive App Layout
======================================== */
@media (max-width: 1024px) {
  #app.app-dashboard-mode {
    background: linear-gradient(180deg, #f8fafc 0%, #f3f6fb 100%);
  }

  #app.app-dashboard-mode .header {
    position: sticky;
    top: 0;
    z-index: 95;
    min-height: 56px;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.94);
    color: #0f2544;
    box-shadow: none;
    border-bottom: 1px solid #e6edf7;
    backdrop-filter: blur(8px);
  }

  #app.app-dashboard-mode .header-content {
    position: relative;
    max-width: none;
    width: 100%;
    min-height: 56px;
    justify-content: center;
  }

  #app.app-dashboard-mode .header-title {
    display: none !important;
  }

  #app.app-dashboard-mode .header-logo-wrapper {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    gap: 0;
  }

  #app.app-dashboard-mode .header-logo {
    width: auto !important;
    height: 46px !important;
    max-height: 46px !important;
    object-fit: contain !important;
    object-position: center center !important;
  }

  #app.app-dashboard-mode .header-actions {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
    padding: 0 2px;
  }

  #app.app-dashboard-mode .mobile-header-icon-btn {
    pointer-events: auto;
    display: inline-flex;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #0f2544;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
  }

  #app.app-dashboard-mode .mobile-header-icon-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  #app.app-dashboard-mode .main-content {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    padding: 12px 16px calc(108px + env(safe-area-inset-bottom, 0px)) !important;
    margin: 0 !important;
  }

  #app.app-dashboard-mode .report-panel {
    width: 100%;
  }

  #app.app-dashboard-mode .report-card {
    border: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
  }

  #app.app-dashboard-mode .report-card .card-header {
    padding: 0 !important;
    margin-bottom: 12px;
  }

  #app.app-dashboard-mode .report-header {
    display: block;
  }

  #app.app-dashboard-mode .report-header:has(.feature-section-favorite-slot) {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
  }

  #app.app-dashboard-mode .report-header:has(.feature-section-favorite-slot) > :first-child {
    order: 1;
    flex: 1 1 0;
    min-width: 0;
  }

  #app.app-dashboard-mode .report-header:has(.feature-section-favorite-slot) .feature-section-favorite-slot {
    order: 2;
    margin-left: auto;
    flex: 0 0 auto;
  }

  #app.app-dashboard-mode .report-header:has(.feature-section-favorite-slot) .report-header-controls,
  #app.app-dashboard-mode .report-header:has(.feature-section-favorite-slot) .report-header-actions.feature-section-primary-actions {
    order: 3;
    flex: 0 0 100%;
    width: 100%;
    margin-top: 0.7rem;
    justify-content: flex-start;
  }

  #app.app-dashboard-mode #dashboardTitle {
    margin-top: 16px;
    font-size: 22px !important;
    line-height: 1.2;
    font-weight: 600;
    color: #0f2544;
    letter-spacing: -0.01em;
  }

  #app.app-dashboard-mode #dashboardSubtitle {
    margin-top: 4px;
    margin-bottom: 14px;
    font-size: 14px !important;
    line-height: 1.4;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #app.app-dashboard-mode .report-header-controls {
    display: block;
  }

  #app.app-dashboard-mode .report-header-tools {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
    width: 100%;
  }

  #app.app-dashboard-mode .report-search {
    width: 100%;
    height: 44px;
    border-radius: 12px;
    border: 1px solid #d9e3ef;
    background: #ffffff;
    box-shadow: none;
    padding: 0 12px;
  }

  #app.app-dashboard-mode .report-search svg {
    width: 18px;
    height: 18px;
    color: #64748b;
  }

  #app.app-dashboard-mode .report-search input {
    height: 100%;
    font-size: 0.95rem;
  }

  #app.app-dashboard-mode #dashboardSortBtn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    padding: 0;
  }

  #app.app-dashboard-mode .report-header-actions {
    display: none !important;
  }

  #app.app-dashboard-mode .report-card .card-body {
    padding: 0 !important;
  }

  #app.app-dashboard-mode .report-metrics {
    margin: 14px -2px 12px;
    padding: 0 2px 4px;
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
  }

  #app.app-dashboard-mode .report-metrics::-webkit-scrollbar {
    display: none;
  }

  #app.app-dashboard-mode .report-metric {
    min-width: 214px;
    flex: 0 0 214px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid #e3ebf5;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 37, 68, 0.05);
    scroll-snap-align: start;
  }

  #app.app-dashboard-mode .report-metric::before {
    display: none !important;
  }

  #app.app-dashboard-mode .report-metric-label {
    font-size: 0.82rem;
    color: #5d718d;
    letter-spacing: 0;
    text-transform: none;
  }

  #app.app-dashboard-mode .report-metric-value {
    margin-top: 6px;
    font-size: 1.85rem;
    line-height: 1.05;
    color: #0f2544;
    font-weight: 700;
  }

  #app.app-dashboard-mode .report-section {
    margin-top: 10px;
  }

  #app.app-dashboard-mode .report-cv-list {
    display: grid;
    gap: 12px;
    margin: 0;
  }

  #app.app-dashboard-mode .report-cv-item {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 37, 68, 0.05);
    padding: 12px 14px;
  }

  #app.app-dashboard-mode .report-cv-main {
    width: 100%;
  }

  #app.app-dashboard-mode .report-cv-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  #app.app-dashboard-mode .report-cv-identity {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
  }

  #app.app-dashboard-mode .report-cv-avatar,
  #app.app-dashboard-mode .report-cv-avatar-fallback {
    width: 40px;
    height: 40px;
    border-radius: 999px;
  }

  #app.app-dashboard-mode .report-cv-avatar-fallback {
    font-size: 1rem;
    font-weight: 700;
  }

  #app.app-dashboard-mode .report-cv-headline {
    min-width: 0;
    display: grid;
    gap: 2px;
  }

  #app.app-dashboard-mode .report-cv-title-row {
    display: block;
  }

  #app.app-dashboard-mode .profile-match-count,
  #app.app-dashboard-mode .report-cv-experience-badge {
    display: none;
  }

  #app.app-dashboard-mode .report-cv-title {
    font-size: 1.08rem;
    font-weight: 700;
    color: #0f2544;
    line-height: 1.24;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #app.app-dashboard-mode .report-cv-role {
    font-size: 0.84rem;
    color: #475569;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #app.app-dashboard-mode .report-cv-meta-row {
    margin-top: 2px;
    gap: 8px;
  }

  #app.app-dashboard-mode .report-cv-meta-item {
    font-size: 0.78rem;
    color: #6b7d95;
  }

  #app.app-dashboard-mode .report-cv-meta-item + .report-cv-meta-item::before {
    opacity: 0.6;
  }

  #app.app-dashboard-mode .report-cv-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
  }

  #app.app-dashboard-mode .report-cv-actions .btn {
    min-height: 34px;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0 10px;
    white-space: nowrap;
  }

  #app.app-dashboard-mode .report-cv-actions .btn.btn-outline {
    background: #f8fbff;
    border-color: #cddcf0;
    color: #1f4f9e;
  }

  #app.app-dashboard-mode .report-cv-open-btn {
    min-width: 98px;
    font-weight: 700;
  }

  #app.app-dashboard-mode .report-cv-actions-mobile {
    margin-top: 8px;
    margin-left: 52px;
    justify-content: flex-start;
  }

  #app.app-dashboard-mode .report-cv-actions .btn-danger {
    display: none;
  }

  #app.app-dashboard-mode .report-cv-more-btn {
    width: 34px;
    min-width: 34px;
    padding: 0;
  }

  #app.app-dashboard-mode .report-cv-more-btn span {
    font-size: 1rem;
    line-height: 1;
  }

  #app.app-dashboard-mode .mobile-dashboard-fab {
    position: fixed;
    right: 16px;
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    width: 56px;
    height: 56px;
    border-radius: 999px;
    border: 0;
    background: linear-gradient(135deg, #ff7a00, #ff951f);
    color: #ffffff;
    font-size: 2rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 24px rgba(255, 122, 0, 0.3);
    z-index: 94;
    cursor: pointer;
  }

  #app.app-dashboard-mode .archive-chat-toggle {
    display: none !important;
  }

  body.theme-dark #app.app-dashboard-mode .header {
    background: rgba(20, 31, 44, 0.94);
    color: #dbe8f7;
    border-bottom-color: #2a3b51;
  }

  body.theme-dark #app.app-dashboard-mode .mobile-header-icon-btn {
    color: #dbe8f7;
  }

  body.theme-dark #app.app-dashboard-mode .report-metric,
  body.theme-dark #app.app-dashboard-mode .report-cv-item {
    background: #172638;
    border-color: #2a3d55;
    box-shadow: 0 8px 18px rgba(3, 10, 20, 0.35);
  }

  body.theme-dark #app.app-dashboard-mode #dashboardTitle,
  body.theme-dark #app.app-dashboard-mode .report-cv-title {
    color: #e5effa;
  }

  body.theme-dark #app.app-dashboard-mode #dashboardSubtitle,
  body.theme-dark #app.app-dashboard-mode .report-cv-role,
  body.theme-dark #app.app-dashboard-mode .report-cv-meta-item,
  body.theme-dark #app.app-dashboard-mode .report-metric-label {
    color: #9fb1c7;
  }

  body.theme-dark #app.app-dashboard-mode .report-metric-value {
    color: #f6fbff;
  }

  body.theme-dark #app.app-dashboard-mode .report-cv-actions .btn.btn-outline {
    background: rgba(155, 178, 210, 0.12);
    border-color: rgba(155, 178, 210, 0.35);
    color: #dbe8fb;
  }
}

@media (max-width: 380px) {
  #app.app-dashboard-mode .header {
    padding: 0 10px;
  }

  #app.app-dashboard-mode .header-logo {
    height: 38px !important;
    max-height: 38px !important;
  }

  #app.app-dashboard-mode .main-content {
    padding: 10px 12px calc(106px + env(safe-area-inset-bottom, 0px)) !important;
  }

  #app.app-dashboard-mode #dashboardTitle {
    font-size: 20px !important;
  }

  #app.app-dashboard-mode #dashboardSubtitle {
    white-space: normal;
    font-size: 13px !important;
    line-height: 1.35;
  }

  #app.app-dashboard-mode .report-header-tools {
    gap: 8px;
  }

  #app.app-dashboard-mode .report-search,
  #app.app-dashboard-mode #dashboardSortBtn {
    height: 42px;
  }

  #app.app-dashboard-mode .report-metric {
    min-width: 186px;
    flex-basis: 186px;
    padding: 14px;
  }

  #app.app-dashboard-mode .report-metric-value {
    font-size: 1.58rem;
  }

  #app.app-dashboard-mode .report-cv-item {
    padding: 11px 12px;
  }

  #app.app-dashboard-mode .report-cv-top {
    align-items: flex-start;
    gap: 8px;
    flex-wrap: nowrap;
  }

  #app.app-dashboard-mode .report-cv-identity {
    gap: 10px;
  }

  #app.app-dashboard-mode .report-cv-avatar,
  #app.app-dashboard-mode .report-cv-avatar-fallback {
    width: 36px;
    height: 36px;
  }

  #app.app-dashboard-mode .report-cv-title {
    font-size: 1rem;
  }

  #app.app-dashboard-mode .report-cv-role {
    font-size: 0.8rem;
  }

  #app.app-dashboard-mode .report-cv-actions {
    margin-left: auto !important;
    gap: 6px;
    width: auto !important;
    justify-content: flex-end !important;
    align-self: flex-start;
    flex: 0 0 auto;
  }

  #app.app-dashboard-mode .report-cv-actions .btn {
    min-height: 30px;
    font-size: 0.74rem;
    padding: 0 9px;
  }

  #app.app-dashboard-mode .report-cv-actions-mobile {
    width: 100% !important;
    margin-left: 0 !important;
    justify-content: flex-start !important;
    margin-top: 7px;
  }

  #app.app-dashboard-mode .report-cv-actions-mobile .report-cv-open-btn {
    min-height: 32px;
    padding: 0 10px;
    font-size: 0.74rem;
  }

  #app.app-dashboard-mode .mobile-dashboard-fab {
    width: 52px;
    height: 52px;
    bottom: calc(82px + env(safe-area-inset-bottom, 0px));
  }

  .mobile-bottom-nav {
    height: calc(62px + env(safe-area-inset-bottom, 0px));
    padding: 5px 8px calc(5px + env(safe-area-inset-bottom, 0px));
  }

  .mobile-bottom-nav-btn {
    font-size: 0.64rem;
    min-height: 48px;
  }
}

@media (max-width: 1024px) {
  #app.app-dashboard-mode .report-metrics {
    display: none !important;
  }

  /* Global mobile shell: same top bar across all sections */
  #app .header {
    position: sticky;
    top: 0;
    /* Header must stay above workspace floating controls while scrolling. */
    z-index: 220;
    min-height: 56px;
    padding: 0 12px !important;
    background: rgba(255, 255, 255, 0.94) !important;
    color: #0f2544 !important;
    border-bottom: 1px solid #e6edf7;
    box-shadow: none !important;
    backdrop-filter: blur(8px);
  }

  #app .header-content {
    position: relative;
    max-width: none;
    width: 100%;
    min-height: 56px;
    justify-content: center;
  }

  #app .header-title {
    display: none !important;
  }

  #app .header-logo-wrapper {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    gap: 0;
  }

  #app .header-logo {
    width: auto !important;
    height: 46px !important;
    max-height: 46px !important;
    object-fit: contain !important;
    object-position: center center !important;
  }

  #app .header-actions {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
    padding: 0 2px;
    z-index: 225;
  }

  #app .mobile-header-icon-btn {
    pointer-events: auto;
    display: inline-flex;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #0f2544;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
  }

  #app .mobile-header-icon-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  /* Remove footer nav on mobile */
  .mobile-bottom-nav {
    display: none !important;
  }

  /* Remove extra bottom spacing reserved for footer nav */
  #app .main-content {
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Keep some room only where FAB exists */
  #app.app-dashboard-mode .main-content {
    padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px)) !important;
  }

  #app.app-dashboard-mode .mobile-dashboard-fab {
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  }

  body.theme-dark #app .header {
    background: rgba(20, 31, 44, 0.94) !important;
    color: #dbe8f7 !important;
    border-bottom-color: #2a3b51;
  }

  body.theme-dark #app .mobile-header-icon-btn {
    color: #dbe8f7;
  }

  /* Dossier mobile: footer tab menu premium */
  #app.app-dossier-mode .main-content {
    padding-bottom: calc(116px + env(safe-area-inset-bottom, 0px)) !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  #app.app-dossier-mode .dossier-panel,
  #app.app-dossier-mode .dossier-panel .report-card,
  #app.app-dossier-mode .dossier-panel .dossier-layout,
  #app.app-dossier-mode .dossier-panel .dossier-content {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
  }

  #app.app-dossier-mode .dossier-panel .report-card {
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow-x: hidden;
  }

  #app.app-dossier-mode .dossier-panel .card-header {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    padding-bottom: 0.65rem;
  }

  #app.app-dossier-mode .dossier-panel .report-header-actions {
    width: auto !important;
    margin-left: auto;
    justify-content: flex-end !important;
    align-items: center !important;
    flex-direction: row !important;
    gap: 0.5rem;
    align-self: flex-end;
  }

  #app.app-dossier-mode .dossier-panel .report-header-actions .btn {
    width: auto !important;
    min-width: max-content;
  }

  #app.app-coach-mode .coach-panel .report-header-actions {
    width: auto !important;
    margin-left: auto;
    justify-content: flex-end !important;
    align-items: center !important;
    flex-direction: row !important;
    gap: 0.5rem;
    align-self: flex-end;
  }

  #app.app-coach-mode .coach-panel .report-header-actions .btn {
    width: auto !important;
    min-width: max-content;
  }

  #app.app-dashboard-mode .report-header-actions {
    display: flex !important;
    width: auto !important;
    margin-left: auto;
    margin-top: 0.5rem;
    justify-content: flex-end !important;
    align-items: center !important;
    flex-direction: row !important;
    gap: 0.5rem;
    align-self: flex-end;
  }

  #app.app-dashboard-mode .report-header-actions .btn {
    width: auto !important;
    min-width: max-content;
  }

  #app.app-dossier-mode .dossier-panel .dossier-body {
    padding: 0 !important;
  }

  #app.app-dossier-mode .dossier-layout {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }

  #app.app-dossier-mode .dossier-content {
    width: calc(100% - 2px);
    max-width: calc(100% - 2px);
    margin: 0 auto;
    border-radius: 16px;
    border: 1px solid #e1eaf5;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 10px 24px rgba(15, 37, 68, 0.06);
    min-height: calc(100vh - 260px);
    padding: 0.95rem;
    overflow-x: hidden;
  }

  #app.app-dossier-mode .dossier-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    z-index: 110;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 16px;
    border: 1px solid #d9e5f3;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 26px rgba(15, 37, 68, 0.14);
    backdrop-filter: blur(10px);
    padding: 8px;
  }

  #app.app-dossier-mode .dossier-nav::-webkit-scrollbar {
    display: none;
  }

  #app.app-dossier-mode .dossier-nav-btn {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid #d7e3f2;
    background: #f8fbff;
    color: #2f4964;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    text-align: center;
  }

  #app.app-dossier-mode .dossier-nav-btn.active {
    border-color: #ffcf9c;
    background: linear-gradient(135deg, #ff7a00, #ff9b2f);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(255, 122, 0, 0.28);
  }

  #app.app-dossier-mode .dossier-nav-btn .pro-badge {
    font-size: 0.62rem;
    padding: 0.1rem 0.32rem;
  }

  body.theme-dark #app.app-dossier-mode .dossier-content {
    border-color: #2b3e57;
    background: linear-gradient(180deg, #172638 0%, #142235 100%);
    box-shadow: 0 12px 24px rgba(3, 10, 20, 0.36);
  }

  body.theme-dark #app.app-dossier-mode .dossier-nav {
    border-color: #2d415a;
    background: rgba(21, 34, 49, 0.9);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.42);
  }

  body.theme-dark #app.app-dossier-mode .dossier-nav-btn {
    border-color: #38506c;
    background: #1b2d42;
    color: #cfe0f5;
  }
}

@media (max-width: 380px) {
  #app.app-dossier-mode .dossier-content {
    width: 100%;
    max-width: 100%;
  }

  #app.app-dossier-mode .main-content {
    padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px)) !important;
  }

  #app.app-dossier-mode .dossier-nav {
    left: 8px;
    right: 8px;
    gap: 6px;
    padding: 7px;
  }

  #app.app-dossier-mode .dossier-nav-btn {
    min-height: 36px;
    padding: 0 10px;
    border-radius: 10px;
    font-size: 0.74rem;
  }

  #app.app-dossier-mode .dossier-panel .report-header-actions {
    gap: 0.4rem;
  }

  #app.app-dossier-mode .dossier-panel .report-header-actions .btn {
    padding-left: 0.6rem;
    padding-right: 0.6rem;
  }

  #app.app-coach-mode .coach-panel .report-header-actions {
    gap: 0.4rem;
  }

  #app.app-coach-mode .coach-panel .report-header-actions .btn {
    padding-left: 0.6rem;
    padding-right: 0.6rem;
  }

  #app.app-dashboard-mode .report-header-actions {
    margin-top: 0.4rem;
    gap: 0.4rem;
  }

  #app.app-dashboard-mode .report-header-actions .btn {
    padding-left: 0.6rem;
    padding-right: 0.6rem;
  }
}

@media (max-width: 1024px) {
  /* Premium mobile editor UX */
  #app.app-workspace-mode .preview-panel {
    display: none !important;
  }

  #app.app-workspace-mode .main-content {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    padding: 10px 14px calc(106px + env(safe-area-inset-bottom, 0px)) !important;
  }

  #app.app-workspace-mode .editor-panel .card {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  #app.app-workspace-mode .editor-panel .card-header {
    position: sticky;
    top: 8px;
    z-index: 130;
    padding: 0.35rem 0.2rem 0.7rem;
    background: rgba(247, 251, 255, 0.92);
    border: 0;
    backdrop-filter: blur(10px);
  }

  #app.app-workspace-mode .editor-panel .editor-header-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.55rem;
  }

  #app.app-workspace-mode .editor-panel #cvEditorTitle {
    font-size: 1.2rem;
    line-height: 1.2;
    color: #0f2544;
    margin: 0;
    white-space: nowrap;
    flex-shrink: 0;
    text-align: left;
    width: 100%;
  }

  #app.app-workspace-mode .editor-panel .editor-header-actions {
    width: 100%;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
    overflow: visible;
    padding: 0.35rem;
    border: 1px solid #dfe8f2;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(245, 250, 255, 0.96) 100%);
    box-shadow: 0 8px 18px rgba(15, 37, 68, 0.08);
    overflow-x: auto;
    scrollbar-width: none;
  }

  #app.app-workspace-mode .editor-panel .editor-header-actions::-webkit-scrollbar {
    display: none;
  }

  #app.app-workspace-mode .editor-panel .editor-header-actions .btn {
    width: auto;
    min-height: 40px;
    border-radius: 11px;
    font-size: 0.76rem;
    padding: 0.5rem 0.75rem;
    max-width: 100%;
  }

  /* Force premium compact action bar on mobile workspace (override generic mobile stacks). */
  #app.app-workspace-mode .editor-panel .editor-header-actions {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 0.5rem !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap !important;
  }

  #app.app-workspace-mode .editor-panel .editor-header-actions .btn,
  #app.app-workspace-mode .editor-panel .editor-more-dropdown {
    width: auto !important;
    flex: 0 0 auto !important;
    max-width: 100% !important;
  }

  #app.app-workspace-mode .editor-panel #backToProfileBtn {
    display: inline-flex !important;
    position: static !important;
    left: auto !important;
    z-index: auto !important;
  }

  #app.app-workspace-mode .editor-panel .editor-header-actions #editorMoreToggle {
    min-width: 40px;
    justify-content: center;
    padding-left: 0.6rem;
    padding-right: 0.6rem;
  }

  /* Mobile smart mode: show all actions inline only when JS marks they fit. */
  #app.app-workspace-mode .editor-panel .editor-header-actions.mobile-actions-expanded #editorMoreToggle {
    display: none !important;
  }

  #app.app-workspace-mode .editor-panel .editor-header-actions.mobile-actions-expanded #editorMoreMenu {
    display: inline-flex !important;
    position: static !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.5rem !important;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  #app.app-workspace-mode .editor-panel .editor-header-actions.mobile-actions-expanded #editorMoreMenu .editor-more-menu-item {
    width: auto !important;
    flex: 0 0 auto !important;
  }

  #app.app-workspace-mode .editor-panel .tab-content {
    border: 1px solid #e2eaf4;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 10px 24px rgba(15, 37, 68, 0.08);
    padding: 0.9rem 0.85rem calc(96px + env(safe-area-inset-bottom, 0px));
  }

  #app.app-workspace-mode .editor-panel .tab-panel.active {
    animation: editorTabFade 0.2s ease-out;
  }

  @keyframes editorTabFade {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
  }

  #app.app-workspace-mode .editor-panel .tabs {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    z-index: 120;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px;
    border: 1px solid #dbe7f4;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 26px rgba(15, 37, 68, 0.14);
    backdrop-filter: blur(10px);
  }

  #app.app-workspace-mode .editor-panel .tabs::-webkit-scrollbar {
    display: none;
  }

  #app.app-workspace-mode .editor-panel .tab-btn {
    flex: 0 0 auto;
    min-width: 84px;
    min-height: 50px;
    border: 1px solid #d7e4f2;
    border-radius: 12px;
    background: #f8fbff;
    padding: 6px 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2px;
    border-bottom: 1px solid #d7e4f2;
    color: #304b65;
  }

  #app.app-workspace-mode .editor-panel .tab-btn svg {
    width: 16px;
    height: 16px;
  }

  #app.app-workspace-mode .editor-panel .tab-btn span {
    display: block !important;
    font-size: 0.64rem;
    line-height: 1.1;
    text-align: center;
    max-width: 76px;
    white-space: normal;
  }

  #app.app-workspace-mode .editor-panel .tab-btn.active {
    color: #ffffff;
    border-color: #ffbd7a;
    background: linear-gradient(135deg, #ff7a00, #ff9726);
    box-shadow: 0 8px 16px rgba(255, 122, 0, 0.28);
  }

  #app.app-workspace-mode .editor-panel .tab-btn.active svg {
    stroke: currentColor;
  }

  #app.app-workspace-mode .editor-panel .card-footer {
    display: none !important;
  }

  #app.app-workspace-mode .floating-save-btn {
    display: inline-flex !important;
    right: 14px;
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    left: auto;
    width: auto !important;
    max-width: max-content;
    z-index: 95;
    min-height: 44px;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    box-shadow: 0 12px 24px rgba(15, 37, 68, 0.28);
  }

  #app.app-workspace-mode .editor-panel .form-group input,
  #app.app-workspace-mode .editor-panel .form-group select,
  #app.app-workspace-mode .editor-panel .form-group textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    min-height: 46px;
    border-radius: 12px;
  }

  #app.app-workspace-mode .editor-panel .form-group textarea {
    min-height: 104px;
  }

  #app.app-workspace-mode .editor-panel .form-grid,
  #app.app-workspace-mode .editor-panel .form-group,
  #app.app-workspace-mode .editor-panel .form-section {
    min-width: 0;
  }

  #app.app-workspace-mode .editor-panel .photo-upload {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  #app.app-workspace-mode .editor-panel #profilePhotoInput {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: block;
    box-sizing: border-box;
  }

  body.theme-dark #app.app-workspace-mode .editor-panel #cvEditorTitle {
    color: #e4eefb;
  }

  body.theme-dark #app.app-workspace-mode .editor-panel .card-header {
    background: rgba(20, 32, 46, 0.9);
    border-bottom: 1px solid rgba(86, 111, 136, 0.4);
  }

  body.theme-dark #app.app-workspace-mode .editor-panel .editor-header-actions {
    border-color: #314b66;
    background: linear-gradient(180deg, rgba(25, 40, 57, 0.96) 0%, rgba(21, 35, 50, 0.96) 100%);
    box-shadow: 0 10px 22px rgba(6, 12, 20, 0.45);
  }

  body.theme-dark #app.app-workspace-mode .editor-panel .tab-content {
    border-color: #2c3f57;
    background: linear-gradient(180deg, #172638 0%, #142235 100%);
    box-shadow: 0 12px 24px rgba(3, 10, 20, 0.36);
  }

  body.theme-dark #app.app-workspace-mode .editor-panel .tabs {
    border-color: #314962;
    background: rgba(21, 34, 49, 0.92);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.42);
  }

  body.theme-dark #app.app-workspace-mode .editor-panel .tab-btn {
    border-color: #38506c;
    background: #1b2d42;
    color: #cfe0f5;
  }
}

@media (max-width: 380px) {
  #app.app-workspace-mode .main-content {
    padding: 10px 12px calc(102px + env(safe-area-inset-bottom, 0px)) !important;
  }

  #app.app-workspace-mode .editor-panel .tabs {
    left: 8px;
    right: 8px;
    gap: 6px;
    padding: 7px;
  }

  #app.app-workspace-mode .editor-panel .tab-btn {
    min-width: 76px;
    min-height: 46px;
    padding: 6px 8px;
  }

  #app.app-workspace-mode .editor-panel .tab-btn span {
    font-size: 0.62rem;
  }

  #app.app-workspace-mode .editor-panel .photo-preview {
    width: 88px;
    height: 88px;
  }

  #app.app-workspace-mode .editor-panel #profilePhotoInput::file-selector-button,
  #app.app-workspace-mode .editor-panel #profilePhotoInput::-webkit-file-upload-button {
    margin-right: 0.4rem;
    padding: 0.38rem 0.6rem;
  }

}

@media (max-width: 1024px) {
  /* Dossier Insight: same compact width as profile sections */
  #app.app-dossier-mode .dossier-content .hr-card,
  #app.app-dossier-mode .dossier-content .hr-grid,
  #app.app-dossier-mode .dossier-content .hr-radar-layout,
  #app.app-dossier-mode .dossier-content .hr-insights-grid,
  #app.app-dossier-mode .dossier-content .dossier-skill-bars {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  #app.app-dossier-mode .dossier-content .hr-card {
    padding: 0.78rem;
    overflow: hidden;
  }

  #app.app-dossier-mode .dossier-content .hr-card-header {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  #app.app-dossier-mode .dossier-content .hr-insights-grid,
  #app.app-dossier-mode .dossier-content .hr-radar-layout {
    grid-template-columns: 1fr;
  }

  #app.app-dossier-mode .dossier-content .hr-radar-box {
    width: 100%;
    min-width: 0;
    padding: 0.2rem;
  }

  #app.app-dossier-mode .dossier-content .hr-radar-svg {
    width: 100%;
    max-width: 186px;
    margin: 0 auto;
    display: block;
  }

  #app.app-dossier-mode .dossier-content .hr-radar-label {
    font-size: 6px;
  }

  #app.app-dossier-mode .dossier-content :is(h4, h5, p, li, span, strong) {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

@media (max-width: 1024px) {
  /* Other Insight section (Hidden Gems), excluding the general HR Insights page */
  #app.app-hiddengems-mode .hidden-gems-panel .hr-generated-insights,
  #app.app-hiddengems-mode .hidden-gems-panel .hr-card,
  #app.app-hiddengems-mode .hidden-gems-panel .hr-insights-grid,
  #app.app-hiddengems-mode .hidden-gems-panel .hr-insight-list {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  #app.app-hiddengems-mode .hidden-gems-panel .hr-card {
    padding: 0.78rem;
    border-radius: 14px;
    overflow: hidden;
  }

  #app.app-hiddengems-mode .hidden-gems-panel .hr-card-header {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.45rem;
  }

  #app.app-hiddengems-mode .hidden-gems-panel .hr-insights-grid {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  #app.app-hiddengems-mode .hidden-gems-panel :is(h4, h5, p, li, span, strong) {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

@media (max-width: 1024px) {
  /* General HR Insights page */
  #app.app-hrinsights-mode .hr-panel .report-body,
  #app.app-hrinsights-mode .hr-panel .hr-generated-insights,
  #app.app-hrinsights-mode .hr-panel .hr-visual-hub,
  #app.app-hrinsights-mode .hr-panel .hr-grid,
  #app.app-hrinsights-mode .hr-panel .hr-card,
  #app.app-hrinsights-mode .hr-panel .hr-insights-grid,
  #app.app-hrinsights-mode .hr-panel .hr-radar-layout,
  #app.app-hrinsights-mode .hr-panel .hr-radar-box,
  #app.app-hrinsights-mode .hr-panel .hr-radar-kpi,
  #app.app-hrinsights-mode .hr-panel .hr-radar-legend,
  #app.app-hrinsights-mode .hr-panel .hr-matrix {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  #app.app-hrinsights-mode .hr-panel .hr-grid,
  #app.app-hrinsights-mode .hr-panel .hr-insights-grid,
  #app.app-hrinsights-mode .hr-panel .hr-radar-layout {
    grid-template-columns: 1fr;
  }

  #app.app-hrinsights-mode .hr-panel .hr-card {
    padding: 0.78rem;
    border-radius: 14px;
    overflow: hidden;
  }

  #app.app-hrinsights-mode .hr-panel .hr-card-header {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.45rem;
  }

  #app.app-hrinsights-mode .hr-panel .hr-matrix {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #app.app-hrinsights-mode .hr-panel .hr-radar-svg {
    width: 100%;
    max-width: 186px;
    margin: 0 auto;
    display: block;
  }

  #app.app-hrinsights-mode .hr-panel .hr-radar-label {
    font-size: 6px;
  }

  #app.app-hrinsights-mode .hr-panel :is(h4, h5, p, li, span, strong) {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

@media (max-width: 1024px) {
  /* Global mobile symmetry for app sections */
  #app:is(
    .app-dashboard-mode,
    .app-hrinsights-mode,
    .app-hiddengems-mode,
    .app-dossier-mode,
    .app-timesheet-mode,
    .app-onboarding-mode,
    .app-offboarding-mode,
    .app-asset-mode,
    .app-organization-mode
  ) .main-content {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
    box-sizing: border-box !important;
    overflow-x: hidden;
  }

  #app:is(
    .app-dashboard-mode,
    .app-hrinsights-mode,
    .app-hiddengems-mode,
    .app-dossier-mode,
    .app-timesheet-mode,
    .app-onboarding-mode,
    .app-offboarding-mode,
    .app-asset-mode,
    .app-organization-mode
  ) :is(
    .report-panel,
    .hr-panel,
    .hidden-gems-panel,
    .dossier-panel,
    .timesheet-panel,
    .onboarding-panel,
    .offboarding-panel,
    .asset-panel,
    .organization-panel
  ) {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
  }

  #app:is(
    .app-dashboard-mode,
    .app-hrinsights-mode,
    .app-hiddengems-mode,
    .app-dossier-mode,
    .app-timesheet-mode,
    .app-onboarding-mode,
    .app-offboarding-mode,
    .app-asset-mode,
    .app-organization-mode
  ) :is(
    .report-card,
    .report-body,
    .card-body,
    .dossier-content,
    .hr-visual-hub,
    .hr-generated-insights
  ) {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden;
  }
}

@media (max-width: 380px) {
  #app:is(
    .app-dashboard-mode,
    .app-hrinsights-mode,
    .app-hiddengems-mode,
    .app-dossier-mode,
    .app-timesheet-mode,
    .app-onboarding-mode,
    .app-offboarding-mode,
    .app-asset-mode,
    .app-organization-mode
  ) .main-content {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}

@media (max-width: 1024px) {
  /* Hard centering fix: prevent 100vw drift and asymmetric content */
  #app {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  #app .main-content {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
  }

  #app .main-content > * {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
  }

  #app.app-dossier-mode .dossier-content {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
  }

  /* Unified button layout across key mobile sections */
  #app.app-dossier-mode .dossier-panel .report-header-actions,
  #app.app-coach-mode .coach-panel .report-header-actions,
  #app.app-dashboard-mode .report-panel .report-header-actions {
    width: auto !important;
    margin-left: 0 !important;
    margin-right: auto !important;
    justify-content: flex-start !important;
    align-items: center !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    align-self: flex-start !important;
  }

  #app.app-dossier-mode .dossier-panel .report-header-actions .btn,
  #app.app-coach-mode .coach-panel .report-header-actions .btn,
  #app.app-dashboard-mode .report-panel .report-header-actions .btn {
    width: auto !important;
    min-width: max-content !important;
  }

}

@media (max-width: 380px) {
  #app.app-dossier-mode .dossier-panel .report-header-actions,
  #app.app-coach-mode .coach-panel .report-header-actions,
  #app.app-dashboard-mode .report-panel .report-header-actions {
    gap: 0.4rem !important;
  }

  #app.app-dossier-mode .dossier-panel .report-header-actions .btn,
  #app.app-coach-mode .coach-panel .report-header-actions .btn,
  #app.app-dashboard-mode .report-panel .report-header-actions .btn {
    padding-left: 0.6rem !important;
    padding-right: 0.6rem !important;
  }
}

@media (max-width: 1024px) {
  /* Final mobile override: dashboard create button readability */
  #app.app-dashboard-mode .report-panel .report-header-actions > .btn.btn-primary.btn-sm {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 40px !important;
    padding: 0.5rem 0.85rem !important;
    border-radius: 12px !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
    flex: 0 0 auto !important;
    box-shadow: 0 8px 16px rgba(255, 122, 0, 0.22) !important;
  }

  #app.app-dashboard-mode .report-panel .report-header-actions > .btn.btn-primary.btn-sm span {
    display: inline-block !important;
    white-space: nowrap !important;
  }
}

@media (max-width: 380px) {
  #app.app-dashboard-mode .report-panel .report-header-actions > .btn.btn-primary.btn-sm {
    min-height: 38px !important;
    padding: 0.45rem 0.72rem !important;
    font-size: 0.78rem !important;
  }
}

@media (max-width: 1024px) {
  /* Dashboard button cleanup: remove conflicting mobile overrides */
  #app.app-dashboard-mode .report-panel .report-header-actions > .btn.btn-primary.btn-sm {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 38px !important;
    padding: 0.45rem 0.75rem !important;
    border-radius: 10px !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
    flex: 0 0 auto !important;
    box-shadow: none !important;
    border-bottom: 0 !important;
    position: static !important;
    transform: none !important;
  }

  #app.app-dashboard-mode .report-panel .report-header-actions > .btn.btn-primary.btn-sm::after,
  #app.app-dashboard-mode .report-panel .report-header-actions > .btn.btn-primary.btn-sm::before {
    content: none !important;
    display: none !important;
  }

  #app.app-dashboard-mode .report-panel .report-header-actions > .btn.btn-primary.btn-sm span {
    display: inline !important;
    white-space: nowrap !important;
  }
}

@media (max-width: 1024px) {
  /* Keep only single FAB (+) in Employee/Recruiting mobile dashboards */
  #app.app-dashboard-mode .archive-chat-toggle,
#app.app-dashboard-mode .archive-chat-panel{
    display: none !important;
  }

  #app.app-dashboard-mode .mobile-dashboard-fab button,
  #app.app-dashboard-mode .mobile-dashboard-fab .btn {
    display: none !important;
  }
}

@media (max-width: 1024px) {
  /* Remove FAB (+) completely on mobile dashboard/recruiting */
  #app.app-dashboard-mode .mobile-dashboard-fab {
    display: none !important;
  }

  #app.app-dashboard-mode .main-content {
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

@media (max-width: 1024px) {
  /* Mobile premium corners: archive/recruiting/insights containers */
  #app.app-dashboard-mode .report-card,
  #app.app-hrinsights-mode .report-card {
    border-radius: 18px !important;
    border: 1px solid #dbe6f3 !important;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
    box-shadow: 0 10px 24px rgba(15, 37, 68, 0.07) !important;
    overflow: hidden !important;
  }

  #app.app-dashboard-mode .report-search,
  #app.app-dashboard-mode #dashboardSortBtn,
  #app.app-dashboard-mode .report-cv-item {
    border-radius: 14px !important;
  }

  #app.app-hrinsights-mode .hr-panel .hr-generated-insights,
  #app.app-hrinsights-mode .hr-panel .hr-visual-hub,
  #app.app-hrinsights-mode .hr-panel .hr-card,
  #app.app-hrinsights-mode .hr-panel .hr-radar-box,
  #app.app-hrinsights-mode .hr-panel .hr-radar-legend,
  #app.app-hrinsights-mode .hr-panel .hr-matrix {
    border-radius: 14px !important;
  }

  #app.app-dashboard-mode .recruiting-column,
  #app.app-dashboard-mode .recruiting-card {
    border-radius: 14px !important;
    overflow: hidden;
  }
}

@media (max-width: 1024px) {
  /* Dark-theme parity for mobile rounded containers */
  body.theme-dark #app.app-dashboard-mode .report-card,
  body.theme-dark #app.app-hrinsights-mode .report-card {
    border-radius: 18px !important;
    border: 1px solid var(--border) !important;
    background: linear-gradient(180deg, #131f2d 0%, #0f1a28 100%) !important;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28) !important;
  }

  body.theme-dark #app.app-dashboard-mode .report-search,
  body.theme-dark #app.app-dashboard-mode #dashboardSortBtn,
  body.theme-dark #app.app-dashboard-mode .report-cv-item {
    border-radius: 14px !important;
  }

  body.theme-dark #app.app-hrinsights-mode .hr-panel :is(
    .hr-generated-insights,
    .hr-visual-hub,
    .hr-card,
    .hr-radar-box,
    .hr-radar-legend,
    .hr-matrix
  ) {
    border-radius: 14px !important;
  }

  body.theme-dark #app.app-dashboard-mode :is(.recruiting-column, .recruiting-card) {
    border-radius: 14px !important;
  }

  /* Remove lighter header rectangle in dark mobile forms */
  body.theme-dark #app:is(.app-dashboard-mode, .app-hrinsights-mode) .report-card .card-header {
    background: transparent !important;
    border-bottom-color: color-mix(in srgb, var(--border) 72%, transparent) !important;
  }

  body.theme-dark #app:is(.app-dashboard-mode, .app-hrinsights-mode) .report-card .card-header::after {
    opacity: 0.9;
  }
}

@media (max-width: 1024px) {
  /* Mobile header profile menu (avatar + logout) */
  #app .mobile-profile-menu-wrap {
    position: relative;
    pointer-events: auto;
    z-index: 230;
  }

  #app .mobile-header-profile-btn {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid #d9e4f2;
    background: #ffffff;
    overflow: hidden;
  }

  #app .mobile-header-profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  #app .mobile-header-profile-avatar-fallback {
    width: 100%;
    height: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.76rem;
    font-weight: 700;
    color: #0f2544;
    background: linear-gradient(180deg, #f7fbff 0%, #eef4fb 100%);
  }

  #app .mobile-profile-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 190px;
    border-radius: 12px;
    border: 1px solid #dbe6f3;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 37, 68, 0.14);
    padding: 6px;
    /* Profile dropdown always above header/editor interactive elements. */
    z-index: 240;
  }

  #app .mobile-profile-menu-user {
    padding: 6px 10px 8px;
    border-bottom: 1px solid #e8eff8;
    margin-bottom: 6px;
  }

  #app .mobile-profile-menu-name {
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.2;
    color: #0f2544;
  }

  #app .mobile-profile-menu-role {
    margin-top: 2px;
    font-size: 0.74rem;
    line-height: 1.2;
    color: #6b7f97;
  }

  #app .mobile-profile-menu-item {
    width: 100%;
    min-height: 36px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #0f2544;
    font-size: 0.86rem;
    font-weight: 600;
    text-align: left;
    padding: 0 10px;
    cursor: pointer;
  }

  #app .mobile-profile-menu-item:hover {
    background: #f6f9fe;
  }

  body.theme-dark #app .mobile-header-profile-btn {
    border-color: #31465f;
    background: #152435;
  }

  body.theme-dark #app .mobile-header-profile-avatar-fallback {
    color: #e6eef8;
    background: linear-gradient(180deg, #21374d 0%, #1a2d40 100%);
  }

  body.theme-dark #app .mobile-profile-menu {
    border-color: #2f455d;
    background: #152435;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
  }

  body.theme-dark #app .mobile-profile-menu-user {
    border-bottom-color: #2b4158;
  }

  body.theme-dark #app .mobile-profile-menu-name {
    color: #e6eef8;
  }

  body.theme-dark #app .mobile-profile-menu-role {
    color: #9eb2c9;
  }

  body.theme-dark #app .mobile-profile-menu-item {
    color: #e6eef8;
  }

  body.theme-dark #app .mobile-profile-menu-item:hover {
    background: rgba(255, 255, 255, 0.08);
  }
}

@media (max-width: 1024px) {
  /* Archive + Recruiting mobile rhythm alignment */
  #app.app-dashboard-mode .report-card .card-header {
    margin-bottom: 16px !important;
  }

  #app.app-dashboard-mode .report-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
  }

  #app.app-dashboard-mode #dashboardTitle {
    margin-top: 0 !important;
    font-size: var(--text-2xl) !important;
    line-height: 1.15 !important;
    font-weight: 600 !important;
    letter-spacing: -0.01em !important;
  }

  #app.app-dashboard-mode #dashboardSubtitle {
    margin-top: 0.5rem !important;
    margin-bottom: 1rem !important;
    font-size: var(--text-sm) !important;
    line-height: 1.5 !important;
    white-space: normal !important;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #app.app-dashboard-mode .report-header-tools {
    gap: 10px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  #app.app-dashboard-mode .report-card .card-body {
    padding: 0.95rem 0 0.95rem !important;
  }

  #app.app-dashboard-mode .report-body {
    gap: 1rem !important;
  }

  #app.app-dashboard-mode .report-section {
    margin-top: 0 !important;
  }

  #app.app-dashboard-mode .report-cv-list {
    gap: 1rem !important;
    margin-top: 0 !important;
  }

  #app.app-dashboard-mode .report-cv-item {
    padding: 14px !important;
  }

  #app.app-dashboard-mode .recruiting-pipeline {
    margin-top: 0 !important;
    gap: 1rem !important;
  }

  #app.app-dashboard-mode .recruiting-column-header {
    padding: 12px 14px !important;
  }

  #app.app-dashboard-mode .recruiting-column-body {
    gap: 10px !important;
    padding: 10px !important;
  }
}

@media (max-width: 1024px) {
  /* Final spacing fix: archive/recruiting content inset like other sections */
  #app.app-dashboard-mode .report-card .card-header {
    padding: 14px 14px 10px !important;
    margin-bottom: 0 !important;
  }

  #app.app-dashboard-mode #dashboardTitle {
    margin: 0 !important;
  }

  #app.app-dashboard-mode #dashboardSubtitle {
    margin: 6px 0 0 !important;
  }

  #app.app-dashboard-mode .report-header-controls {
    margin-top: 12px !important;
  }

  #app.app-dashboard-mode .report-card .card-body {
    padding: 12px 14px 14px !important;
  }

  #app.app-dashboard-mode .report-body {
    gap: 14px !important;
  }

  #app.app-dashboard-mode .report-section {
    margin-top: 0 !important;
    padding-top: 2px !important;
  }

  #app.app-dashboard-mode .report-cv-list {
    margin-top: 0 !important;
    gap: 12px !important;
  }

  #app.app-dashboard-mode .report-cv-item {
    margin: 0 !important;
  }

  #app.app-dashboard-mode .recruiting-pipeline {
    margin-top: 0 !important;
    padding-top: 2px !important;
  }
}

@media (min-width: 1025px) {
  #app.app-dashboard-mode .report-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: start !important;
    row-gap: 1rem !important;
  }

  #app.app-dashboard-mode .report-header > :first-child {
    order: 1 !important;
  }

  #app.app-dashboard-mode .report-header-controls {
    order: 2 !important;
    width: 100% !important;
    margin-top: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: start !important;
    gap: 1rem !important;
  }

  #app.app-dashboard-mode .report-header-tools {
    order: 1 !important;
    width: auto !important;
    min-width: 0 !important;
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 0.6rem !important;
  }

  #app.app-dashboard-mode .report-search {
    width: min(360px, 100%) !important;
  }

  #app.app-dashboard-mode .report-header-actions {
    order: 2 !important;
    justify-content: flex-end !important;
    align-self: start !important;
  }
}

@media (max-width: 1024px) {
  /* Dossier title/subtitle spacing parity */
  #app.app-dossier-mode .dossier-panel .card-header {
    padding: 14px 14px 10px !important;
    margin-bottom: 0 !important;
  }

  #app.app-dossier-mode #dossierTitle {
    margin: 0 !important;
  }

  #app.app-dossier-mode #dossierDescription {
    margin: 6px 0 0 !important;
  }

  #app.app-dossier-mode .dossier-panel .report-header-actions {
    margin-top: 12px !important;
  }
}

@media (max-width: 1024px) {
  /* Visible scroll bar for mobile section tabs (Profile + CV editor) */
  #app.app-dossier-mode .dossier-nav,
  #app.app-workspace-mode .editor-panel .tabs {
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 116, 139, 0.65) transparent;
    padding-bottom: 6px !important;
  }

  #app.app-dossier-mode .dossier-nav::-webkit-scrollbar,
  #app.app-workspace-mode .editor-panel .tabs::-webkit-scrollbar {
    display: block !important;
    height: 4px;
  }

  #app.app-dossier-mode .dossier-nav::-webkit-scrollbar-track,
  #app.app-workspace-mode .editor-panel .tabs::-webkit-scrollbar-track {
    background: transparent;
  }

  #app.app-dossier-mode .dossier-nav::-webkit-scrollbar-thumb,
  #app.app-workspace-mode .editor-panel .tabs::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.65);
    border-radius: 999px;
  }

  body.theme-dark #app.app-dossier-mode .dossier-nav,
  body.theme-dark #app.app-workspace-mode .editor-panel .tabs {
    scrollbar-color: rgba(148, 163, 184, 0.7) transparent;
  }

  body.theme-dark #app.app-dossier-mode .dossier-nav::-webkit-scrollbar-thumb,
  body.theme-dark #app.app-workspace-mode .editor-panel .tabs::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.72);
  }
}

@media (min-width: 1025px) {
  /* Hard mode switch: desktop only above 768px */
  #app .feature-menu-panel {
    display: block !important;
  }

  #app .mobile-header-menu-btn,
  #app .mobile-profile-menu-wrap,
  #app #mobileMoreMenuOverlay,
  #app .mobile-bottom-nav {
    display: none !important;
  }

  #app .header-actions {
    position: static !important;
    inset: auto !important;
    pointer-events: auto !important;
    padding: 0 !important;
    justify-content: flex-end !important;
  }
}

@media (max-width: 0px) {
  /* Desktop compact mode: neutralize mobile/tablet overrides */
  #app .main-content {
    display: grid !important;
    width: 100% !important;
    max-width: 1560px !important;
    margin: 0 auto !important;
    padding: 1.2rem 1rem 1.5rem !important;
    gap: 1rem !important;
    align-items: start !important;
    overflow-x: visible !important;
  }

  #app:not(.menu-collapsed).app-dashboard-mode .main-content,
  #app:not(.menu-collapsed).app-hrinsights-mode .main-content,
  #app:not(.menu-collapsed).app-hiddengems-mode .main-content,
  #app:not(.menu-collapsed).app-dossier-mode .main-content,
  #app:not(.menu-collapsed).app-settings-mode .main-content,
  #app:not(.menu-collapsed).app-organization-mode .main-content,
  #app:not(.menu-collapsed).app-vacation-mode .main-content,
  #app:not(.menu-collapsed).app-timesheet-mode .main-content,
  #app:not(.menu-collapsed).app-coach-mode .main-content,
  #app:not(.menu-collapsed).app-onboarding-mode .main-content,
  #app:not(.menu-collapsed).app-offboarding-mode .main-content,
  #app:not(.menu-collapsed).app-asset-mode .main-content {
    grid-template-columns: minmax(210px, 0.42fr) minmax(0, 1fr) !important;
  }

  #app:not(.menu-collapsed).app-workspace-mode .main-content {
    grid-template-columns: minmax(210px, 0.42fr) minmax(0, 1.35fr) minmax(340px, 0.9fr) !important;
  }

  #app.menu-collapsed.app-dashboard-mode .main-content,
  #app.menu-collapsed.app-hrinsights-mode .main-content,
  #app.menu-collapsed.app-hiddengems-mode .main-content,
  #app.menu-collapsed.app-dossier-mode .main-content,
  #app.menu-collapsed.app-settings-mode .main-content,
  #app.menu-collapsed.app-organization-mode .main-content,
  #app.menu-collapsed.app-vacation-mode .main-content,
  #app.menu-collapsed.app-timesheet-mode .main-content,
  #app.menu-collapsed.app-coach-mode .main-content,
  #app.menu-collapsed.app-onboarding-mode .main-content,
  #app.menu-collapsed.app-offboarding-mode .main-content,
  #app.menu-collapsed.app-asset-mode .main-content {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  #app.menu-collapsed.app-workspace-mode .main-content {
    grid-template-columns: minmax(0, 1.4fr) minmax(340px, 0.9fr) !important;
  }

  #app .feature-menu-panel,
  #app .feature-menu-panel:hover,
  #app .feature-menu-panel:focus-within,
  #app.menu-collapsed .feature-menu-panel {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: sticky !important;
    top: 5.5rem !important;
    inset: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    margin: 0 !important;
    width: auto !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: calc(100vh - 6.5rem) !important;
    z-index: 20 !important;
    transform: none !important;
  }

  #app .feature-menu-panel .card.sticky {
    position: static !important;
    max-height: calc(100vh - 6.5rem) !important;
    min-height: 0 !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
  }

  #app .feature-menu-panel .feature-menu-body {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    overflow: auto !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    scrollbar-gutter: stable !important;
    max-height: none !important;
    height: auto !important;
    padding: 0.85rem !important;
    gap: 0.5rem !important;
  }

  #app .mobile-header-menu-btn,
  #app .mobile-profile-menu-wrap,
  #app #mobileMoreMenuOverlay,
  #app .mobile-bottom-nav {
    display: none !important;
  }

  #app .header-actions {
    position: static !important;
    inset: auto !important;
    pointer-events: auto !important;
    padding: 0 !important;
    justify-content: flex-end !important;
  }
}

@media (max-width: 1024px) {
  /* Timesheet mobile: hide secondary metrics */
  #app.app-timesheet-mode .report-metric.metric-total-hours,
  #app.app-timesheet-mode .report-metric.metric-month-status,
  #app.app-timesheet-mode .report-metric.metric-overtime {
    display: none !important;
  }
}

/* Dashboard assistant button: dark theme contrast fix */
body.theme-dark .archive-chat-toggle {
  background: linear-gradient(135deg, #ff8f1f 0%, #ff7600 55%, #e66400 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.38) !important;
  color: #ffffff !important;
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset,
    0 0 18px rgba(255, 138, 0, 0.3) !important;
}

body.theme-dark .archive-chat-toggle svg {
  width: 22px !important;
  height: 22px !important;
  stroke: #ffffff !important;
  stroke-width: 2.2 !important;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35));
}

/* Archive assistant panel: dark parity for employees and candidates archives */
body.theme-dark :is(.archive-chat-panel, .archive-chat-panel.expanded) {
  background: linear-gradient(180deg, #111b29 0%, #0d1624 100%) !important;
  border-color: #2a3b52 !important;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.42) !important;
}

body.theme-dark .archive-chat-header {
  background: linear-gradient(180deg, #162436 0%, #132133 100%) !important;
  border-bottom-color: #2a3b52 !important;
}

body.theme-dark .archive-chat-header :is(h3, p) {
  color: #e7eef8 !important;
}

body.theme-dark .archive-chat-header .btn {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: #2f435e !important;
  color: #d7e3f3 !important;
}

body.theme-dark .archive-chat-messages {
  background: #0d1522 !important;
}

body.theme-dark .archive-chat-message.user {
  background: rgba(59, 130, 246, 0.2) !important;
  color: #edf3fb !important;
  border: 1px solid rgba(96, 165, 250, 0.34) !important;
}

body.theme-dark .archive-chat-message.assistant {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #e8eff9 !important;
  border: 1px solid #2a3b52 !important;
}

body.theme-dark .archive-chat-provider-badge {
  background: rgba(96, 165, 250, 0.16) !important;
  border-color: rgba(96, 165, 250, 0.34) !important;
  color: #b8d7ff !important;
}

body.theme-dark .archive-chat-input {
  background: #101a28 !important;
  border-top-color: #2a3b52 !important;
}

body.theme-dark .archive-chat-input textarea {
  background: #091325 !important;
  color: #e7eef8 !important;
  border-color: #2f435e !important;
}

body.theme-dark .archive-chat-input textarea::placeholder {
  color: #8ea5c1 !important;
}

@media (max-width: 1024px) {
  /* Mobile dark: force assistant/chat surfaces to dark palette (prevent light overrides) */
  body.theme-dark :is(.archive-chat-panel, .archive-chat-panel.expanded) {
    background: linear-gradient(180deg, #111b29 0%, #0d1624 100%) !important;
    border-color: #2a3b52 !important;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.42) !important;
  }

  body.theme-dark .archive-chat-header {
    background: linear-gradient(180deg, #162436 0%, #132133 100%) !important;
    border-bottom-color: #2a3b52 !important;
  }

  body.theme-dark .archive-chat-header :is(h3, p) {
    color: #e7eef8 !important;
  }

  body.theme-dark .archive-chat-header .btn {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: #2f435e !important;
    color: #d7e3f3 !important;
  }

  body.theme-dark .archive-chat-messages {
    background: #0d1522 !important;
  }

  body.theme-dark .archive-chat-message.user {
    background: rgba(59, 130, 246, 0.2) !important;
    color: #edf3fb !important;
    border: 1px solid rgba(96, 165, 250, 0.34) !important;
  }

  body.theme-dark .archive-chat-message.assistant {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #e8eff9 !important;
    border: 1px solid #2a3b52 !important;
  }

  body.theme-dark .archive-chat-input {
    background: #101a28 !important;
    border-top-color: #2a3b52 !important;
  }

  body.theme-dark .archive-chat-input textarea {
    background: #091325 !important;
    color: #e7eef8 !important;
    border-color: #2f435e !important;
  }

  body.theme-dark .archive-chat-input textarea::placeholder {
    color: #8ea5c1 !important;
  }

  /* Coach inline chat parity in dark mobile */
  body.theme-dark #app.app-coach-mode :is(.coach-chat-messages, .coach-chat-input) {
    background: linear-gradient(180deg, #111b29 0%, #0d1624 100%) !important;
    border-color: #2a3b52 !important;
  }
}

@media (max-width: 1024px) {
  /* Onboarding stage actions (Assunto): keep "Riporta in valutazione" + "Apri profilo" readable on mobile */
  #app.app-dashboard-mode .recruiting-column[data-recruiting-stage="assunto"] .recruiting-card-header-row,
  #app.app-onboarding-mode .recruiting-column[data-recruiting-stage="assunto"] .recruiting-card-header-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.55rem !important;
  }

  #app.app-dashboard-mode .recruiting-column[data-recruiting-stage="assunto"] .recruiting-card-header-actions,
  #app.app-onboarding-mode .recruiting-column[data-recruiting-stage="assunto"] .recruiting-card-header-actions {
    width: 100% !important;
    margin-left: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 0.5rem !important;
  }

  #app.app-dashboard-mode .recruiting-column[data-recruiting-stage="assunto"] .recruiting-card-open-btn,
  #app.app-onboarding-mode .recruiting-column[data-recruiting-stage="assunto"] .recruiting-card-open-btn {
    width: auto !important;
    min-width: max-content !important;
    min-height: 36px !important;
    padding: 0.46rem 0.78rem !important;
    border-radius: 11px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
    flex: 0 0 auto !important;
  }
}

@media (max-width: 380px) {
  #app.app-dashboard-mode .recruiting-column[data-recruiting-stage="assunto"] .recruiting-card-open-btn,
  #app.app-onboarding-mode .recruiting-column[data-recruiting-stage="assunto"] .recruiting-card-open-btn {
    min-height: 34px !important;
    padding: 0.42rem 0.68rem !important;
    font-size: 0.76rem !important;
  }
}

/* Dossier insight readability: skill radar KPI + skill matrix text contrast */
#app.app-dossier-mode .dossier-content .hr-radar-legend li {
  color: #2f4b66 !important;
  font-weight: 600;
}

#app.app-dossier-mode .dossier-content .hr-radar-legend strong {
  color: #173653 !important;
  font-weight: 800;
}

#app.app-dossier-mode .dossier-content .hr-kpi span {
  color: #425e79 !important;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

#app.app-dossier-mode .dossier-content .hr-kpi strong {
  color: #173653 !important;
  font-size: 0.9rem;
  font-weight: 800;
}

#app.app-dossier-mode .dossier-content .dossier-skill-bar-row span {
  color: #2f4b66 !important;
  font-weight: 700;
}

#app.app-dossier-mode .dossier-content .dossier-skill-bar-row strong {
  color: #173653 !important;
  font-weight: 800;
}

body.theme-dark #app.app-dossier-mode .dossier-content .hr-radar-legend li {
  color: #d3e2f2 !important;
}

body.theme-dark #app.app-dossier-mode .dossier-content .hr-radar-legend strong {
  color: #f3f8ff !important;
}

body.theme-dark #app.app-dossier-mode .dossier-content .hr-kpi span {
  color: #d7e5f4 !important;
}

body.theme-dark #app.app-dossier-mode .dossier-content .hr-kpi strong {
  color: #f5f9ff !important;
}

body.theme-dark #app.app-dossier-mode .dossier-content .dossier-skill-bar-row span {
  color: #d3e2f2 !important;
}

body.theme-dark #app.app-dossier-mode .dossier-content .dossier-skill-bar-row strong {
  color: #f3f8ff !important;
}

/* Vacation approve: explicit metric icons (light + dark) */
#app.app-vacation-mode .report-metric.metric-vacation-pending {
  --metric-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 2h6a2 2 0 0 1 2 2v1h2a2 2 0 0 1 2 2v13a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h2V4a2 2 0 0 1 2-2Zm0 3h6V4H9v1Zm0 5h6v2H9v-2Zm0 4h4v2H9v-2Z'/%3E%3C/svg%3E");
}

#app.app-vacation-mode .report-metric.metric-vacation-employees {
  --metric-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M16 11c1.66 0 3-1.57 3-3.5S17.66 4 16 4s-3 1.57-3 3.5 1.34 3.5 3 3.5Zm-8 0c1.66 0 3-1.57 3-3.5S9.66 4 8 4 5 5.57 5 7.5 6.34 11 8 11Zm0 2c-2.67 0-8 1.34-8 4v3h10v-3c0-1.41.69-2.66 1.76-3.61C10.62 13.14 9.24 13 8 13Zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 2 1.97 3.45v3h7v-3c0-2.66-5.33-4-8-4Z'/%3E%3C/svg%3E");
}

#app.app-vacation-mode .report-metric.metric-vacation-last-update {
  --metric-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M19 4h-1V2h-2v2H8V2H6v2H5a2 2 0 0 0-2 2v13a3 3 0 0 0 3 3h12a3 3 0 0 0 3-3V6a2 2 0 0 0-2-2Zm0 15a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V10h14v9Zm0-11H5V6h14v2Z'/%3E%3C/svg%3E");
}

#app.app-vacation-mode .report-metric::before {
  width: 52px !important;
  height: 52px !important;
  border-radius: 12px !important;
  border: 1px solid #d3e2f7 !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 6px 14px rgba(15, 37, 68, 0.1) !important;
}

#app.app-vacation-mode .report-metric::after {
  content: "";
  position: absolute;
  left: calc(0.95rem + 13px);
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  -webkit-mask: var(--metric-icon) center / contain no-repeat;
  mask: var(--metric-icon) center / contain no-repeat;
  opacity: 1;
  z-index: 0;
  pointer-events: none;
}

#app.app-vacation-mode .report-metric {
  padding-left: 4.55rem !important;
}

#app.app-vacation-mode .report-metric.metric-vacation-pending::before {
  background: linear-gradient(180deg, #fff4e8 0%, #ffe8cd 100%) !important;
}

#app.app-vacation-mode .report-metric.metric-vacation-employees::before {
  background: linear-gradient(180deg, #eef5ff 0%, #ddeaff 100%) !important;
}

#app.app-vacation-mode .report-metric.metric-vacation-last-update::before {
  background: linear-gradient(180deg, #f5f1ff 0%, #eadeff 100%) !important;
}

#app.app-vacation-mode .report-metric.metric-vacation-pending::after {
  background: #d96d00 !important;
}

#app.app-vacation-mode .report-metric.metric-vacation-employees::after {
  background: #165fd4 !important;
}

#app.app-vacation-mode .report-metric.metric-vacation-last-update::after {
  background: #5f2ecb !important;
}

/* Mobile Timesheet UX: avoid compressed 7-column calendar */
@media (max-width: 1024px) {
  #app.app-timesheet-mode .timesheet-calendar {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    padding: 0.55rem !important;
    border-radius: 14px !important;
  }

  #app.app-timesheet-mode .timesheet-calendar-grid {
    min-width: 648px !important;
    gap: 0.42rem !important;
  }

  #app.app-timesheet-mode .timesheet-day,
  #app.app-timesheet-mode .timesheet-day.empty {
    min-height: 114px !important;
    padding: 0.42rem !important;
    border-radius: 12px !important;
  }

  #app.app-timesheet-mode .timesheet-day-number {
    font-size: 0.84rem !important;
  }

  #app.app-timesheet-mode .timesheet-day-input {
    min-height: 30px !important;
    font-size: 0.76rem !important;
    border-radius: 8px !important;
  }

  #app.app-timesheet-mode .timesheet-day-line {
    font-size: 0.66rem !important;
  }
}

@media (max-width: 430px) {
  #app.app-timesheet-mode .timesheet-calendar-grid {
    min-width: 602px !important;
  }
}

@media (min-width: 1025px) {
  /* Desktop: keep sidebar scroll behavior but hide vertical scrollbar */
  #app .feature-menu-panel .feature-menu-body,
  #app:not(.menu-collapsed) .feature-menu-panel .feature-menu-body,
  #app:not(.menu-collapsed) .feature-menu-panel:hover .feature-menu-body,
  #app:not(.menu-collapsed) .feature-menu-panel:focus-within .feature-menu-body {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }

  #app .feature-menu-panel .feature-menu-body::-webkit-scrollbar,
  #app:not(.menu-collapsed) .feature-menu-panel .feature-menu-body::-webkit-scrollbar,
  #app:not(.menu-collapsed) .feature-menu-panel:hover .feature-menu-body::-webkit-scrollbar,
  #app:not(.menu-collapsed) .feature-menu-panel:focus-within .feature-menu-body::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
  }
}

@media (min-width: 1025px) {
  /* Sidebar icon refresh: more consistent and readable set */
  #app:not(.menu-collapsed) .feature-menu-btn::before {
    width: 19px;
    height: 19px;
    opacity: 0.96;
    background: none !important;
    background-color: currentColor !important;
    background-image: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  #app:not(.menu-collapsed) .feature-menu-btn.active::before {
    background: none !important;
    background-color: currentColor !important;
    background-image: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="my-profile"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm0 5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 0 1 0-7Zm0 14a7.9 7.9 0 0 1-5.93-2.67C7.13 16.29 9.43 15 12 15s4.87 1.29 5.93 3.33A7.9 7.9 0 0 1 12 21Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="my-team"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M8 11a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm8 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6ZM2 19v-1c0-2.76 2.69-5 6-5s6 2.24 6 5v1H2Zm10 0v-1c0-.39-.05-.76-.14-1.12.66-.56 1.54-.88 2.52-.88 2.07 0 3.62 1.37 3.62 3v1H12Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="communications"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 4h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H8l-4 4V6a2 2 0 0 1 2-2Zm2 4v2h12V8H6Zm0 4v2h8v-2H6Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="communications-compose"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 5h16v10H7l-3 3V5Zm4 3v2h8V8H8Zm0 4v2h5v-2H8Zm9.71 5.29-1-1 1.41-1.41 1 1L17.7 19.3l-2.12.71.71-2.12 1.42-1.42Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="communications-inbox"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 4h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H8l-4 4V6a2 2 0 0 1 2-2Zm2 4v2h12V8H6Zm0 4v2h8v-2H6Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="payroll-manage"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6 3h9l5 5v11a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2Zm8 1.5V9h4.5L14 4.5ZM8 12h8v1.5H8V12Zm0 3h8v1.5H8V15Zm0-6h4v1.5H8V9Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="payroll-mine"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6 3h9l5 5v11a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2Zm8 1.5V9h4.5L14 4.5ZM8 12h8v1.5H8V12Zm0 3h8v1.5H8V15Zm0-6h4v1.5H8V9Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="coach"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 4h16a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H9l-5 4v-4H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Zm2 4v2h12V8H6Zm0 4v2h8v-2H6Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="dashboard"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 13h8v8H3v-8Zm10-10h8v8h-8V3ZM3 3h8v8H3V3Zm10 10h8v8h-8v-8Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="hr"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 20h18v2H3v-2Zm2-2h3V9H5v9Zm5 0h3V5h-3v13Zm5 0h3V12h-3v6Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="hidden-gems"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 21h6v-2H9v2Zm3-20a7 7 0 0 0-4.29 12.53c.8.62 1.29 1.53 1.29 2.52V17h6v-.95c0-.99.49-1.9 1.29-2.52A7 7 0 0 0 12 1Zm2.99 10.95A4.96 4.96 0 0 0 13 16h-2a4.96 4.96 0 0 0-1.99-4.05A5 5 0 1 1 14.99 11.95Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="position-matching"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm0 2a8 8 0 1 1 0 16 8 8 0 0 1 0-16Zm0 3a5 5 0 1 0 0 10 5 5 0 0 0 0-10Zm0 2a3 3 0 1 1 0 6 3 3 0 0 1 0-6Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="timesheet"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 2h2v2h6V2h2v2h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2V2Zm12 8H5v10h14V10Zm-9.8 6.8 1.4 1.4 4.8-4.8-1.4-1.4-3.4 3.4-1.4-1.4-1.4 1.4Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="sickness"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M10 2h4v6h6v4h-6v6h-4v-6H4V8h6V2Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="sickness-team"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M10 2h4v3h3v4h-3v3h-4V9H7V5h3V2Zm-4 11h12v2H6v-2Zm0 4h12v2H6v-2Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="timesheet-employee"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 5a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V5Zm2 0v3h12V5H6Zm0 5v9h12v-9H6Zm2 2h4v2H8v-2Zm0 4h8v2H8v-2Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="timesheet-approve"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 2h2v2h6V2h2v2h3a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h3V2Zm13 8H4v10h16V10Zm-9.2 2.2 1.4 1.4 4.1-4.1 1.4 1.4-5.5 5.5-2.8-2.8 1.4-1.4Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="timesheet-summary"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 4h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Zm2 3v2h12V7H6Zm0 4v6h3v-6H6Zm5 2v4h3v-4h-3Zm5-3v7h3v-7h-3Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="timesheet-project-summary"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 3h2v16h16v2H3V3Zm4 9h3v5H7v-5Zm5-6h3v11h-3V6Zm5 3h3v8h-3V9Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="projects"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 4h18v5H3V4Zm0 7h8v9H3v-9Zm10 0h8v9h-8v-9Zm1.5 2.5h5v1.5h-5v-1.5Zm-10 0h5v1.5h-5v-1.5Zm0 3h5V18h-5v-1.5Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="vacation"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 3a6 6 0 0 1 6 6c0 1.37-.46 2.64-1.24 3.66L12 22l-4.76-9.34A5.98 5.98 0 0 1 6 9a6 6 0 0 1 6-6Zm0 2a4 4 0 0 0-2.98 6.67L12 17.47l2.98-5.8A4 4 0 0 0 12 5Zm0 1.5a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="absence-calendar"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 2h2v2h6V2h2v2h3a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h3V2Zm13 8H4v10h16V10Zm-10 3h2v2h-2v-2Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="recruiting"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M10 2a8 8 0 1 1 5.29 14l4.35 4.35-1.42 1.42-4.35-4.35A8 8 0 0 1 10 2Zm0 2a6 6 0 1 0 0 12 6 6 0 0 0 0-12Zm.5 3.5h-1v2H7.5v1h2v2h1v-2h2v-1h-2v-2Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="onboarding"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 2h10a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2Zm0 2v16h10V4H7Zm2.2 8.8 1.4-1.4 2 2 3.2-3.2 1.4 1.4-4.6 4.6-3.4-3.4Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="offboarding"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 3h10v2H5v14h8v2H3V3Zm10.4 4.6L19.8 12l-6.4 4.4-1.1-1.6 3.7-2.6H8v-2h8l-3.7-2.6 1.1-1.6Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="analytics"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M22.7 19l-9.1-9.1c.9-2.3.4-5-1.5-6.9-2-2-5-2.4-7.4-1.3L9 6 6 9 1.6 4.7C.4 7.1.9 10.1 2.9 12.1c1.9 1.9 4.6 2.4 6.9 1.5l9.1 9.1c.4.4 1 .4 1.4 0l2.3-2.3c.5-.4.5-1.1.1-1.4Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="support"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 4h16a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H9l-5 4v-4H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Zm2 4v2h12V8H6Zm0 4v2h8v-2H6Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="support-mine"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M5 4h14a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Zm2 4v2h10V8H7Zm0 4v2h7v-2H7Zm0 4v2h5v-2H7Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="assets"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 7h18v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7Zm2 2v9h14V9H5Zm2-5h10a2 2 0 0 1 2 2H5a2 2 0 0 1 2-2Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="my-assets"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M8 2h8a2 2 0 0 1 2 2v6H6V4a2 2 0 0 1 2-2Zm-2 10h12v8a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2v-8Zm-3-1h2v2H3v-2Zm16 0h2v2h-2v-2Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="organization"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M10 3h4v4h-4V3Zm-6 14h4v4H4v-4Zm12 0h4v4h-4v-4ZM5 15h2v-3h4V9h2v3h4v3h2v-5h-6V7h-2v3H5v5Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="employee-config"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm0 18a8 8 0 1 1 0-16 8 8 0 0 1 0 16Zm1-13h-2v6l5 3 1-1.73-4-2.37V7Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="kpi-config"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm0 2a8 8 0 1 1 0 16 8 8 0 0 1 0-16Zm0 3a5 5 0 1 0 0 10 5 5 0 0 0 0-10Zm0 2a3 3 0 1 1 0 6 3 3 0 0 1 0-6Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="settings"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='m19.14 12.94.03-.94-.03-.94 2.03-1.58a.5.5 0 0 0 .12-.64l-1.92-3.32a.5.5 0 0 0-.6-.22l-2.39.96a7.5 7.5 0 0 0-1.62-.94l-.36-2.54a.5.5 0 0 0-.5-.42h-3.84a.5.5 0 0 0-.5.42l-.36 2.54c-.57.23-1.11.55-1.62.94l-2.39-.96a.5.5 0 0 0-.6.22L2.7 8.84a.5.5 0 0 0 .12.64l2.03 1.58-.03.94.03.94L2.82 14.52a.5.5 0 0 0-.12.64l1.92 3.32c.13.23.4.32.64.22l2.35-.94c.5.39 1.05.71 1.65.95l.36 2.51c.04.24.25.42.5.42h3.84a.5.5 0 0 0 .5-.42l.36-2.51c.6-.24 1.15-.56 1.65-.95l2.35.94c.24.1.51.01.64-.22l1.92-3.32a.5.5 0 0 0-.12-.64l-2.03-1.58ZM12 15.5A3.5 3.5 0 1 1 12 8a3.5 3.5 0 0 1 0 7.5Z'/%3E%3C/svg%3E"); }
  #app:not(.menu-collapsed) .feature-menu-btn[data-feature="configurations"] { --feature-menu-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 4h16v4H4V4Zm0 6h16v10H4V10Zm3 2v6h10v-6H7Zm1.5 1.5h7v3h-7v-3Z'/%3E%3C/svg%3E"); }

  #app:not(.menu-collapsed) .feature-menu-btn:hover {
    transform: none;
  }
}

#app.app-myteam-mode {
  --my-team-layout-gap: 1rem;
}

#app.app-myteam-mode .main-content {
  grid-template-columns: minmax(0, 1fr) !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding-left: 0 !important;
}

#app.app-myteam-mode #myTeamPanel {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: none !important;
  justify-self: stretch !important;
  align-self: stretch !important;
}

#app.app-myteam-mode #myTeamPanel .report-card,
#app.app-myteam-mode #myTeamPanel .card-body.report-body,
#app.app-myteam-mode #settingsMyTeamContent,
#app.app-myteam-mode .my-team-section,
#app.app-myteam-mode .my-team-toolbar,
#app.app-myteam-mode .my-team-groups,
#app.app-myteam-mode .my-team-group,
#app.app-myteam-mode .my-team-members-grid,
#app.app-myteam-mode .my-team-profile,
#app.app-myteam-mode .my-team-profile-card {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
}

#app.app-myteam-mode .my-team-members-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
}

#app.app-configurations-mode .main-content {
  grid-template-columns: minmax(210px, 0.42fr) minmax(0, 1fr);
}

#app.menu-collapsed.app-configurations-mode .main-content {
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 1025px) {
  #app.app-myteam-mode .main-content {
    padding-left: calc(var(--mockup-sidebar-width, 248px) + 1rem) !important;
  }

  #app.app-support-mode .main-content {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  #app:not(.menu-collapsed).app-support-mode .main-content {
    padding-left: calc(var(--mockup-sidebar-width, 260px) + 1rem) !important;
  }

  #app.menu-collapsed.app-support-mode .main-content {
    padding-left: 1.5rem !important;
  }

  #app.app-support-mode .support-panel,
  #app.app-support-mode #supportPanel,
  #app.app-support-mode #supportPanel .report-card {
    width: 100% !important;
    max-width: none !important;
    justify-self: stretch !important;
  }

  #app.app-support-mode .support-layout {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  #app.app-support-mode .support-form-card {
    width: 100% !important;
    max-width: none !important;
  }

  #app.app-communications-mode .main-content {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  #app:not(.menu-collapsed).app-communications-mode .main-content {
    padding-left: calc(var(--mockup-sidebar-width, 260px) + 1rem) !important;
  }

  #app.menu-collapsed.app-communications-mode .main-content {
    padding-left: 1.5rem !important;
  }

  #app.app-communications-mode .communications-panel,
  #app.app-communications-mode #communicationsPanel,
  #app.app-communications-mode #communicationsPanel .report-card {
    width: 100% !important;
    max-width: none !important;
    justify-self: stretch !important;
  }

  #app.app-payroll-mode .main-content {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  #app:not(.menu-collapsed).app-payroll-mode .main-content {
    padding-left: calc(var(--mockup-sidebar-width, 260px) + 1rem) !important;
  }

  #app.menu-collapsed.app-payroll-mode .main-content {
    padding-left: 1.5rem !important;
  }

  #app.app-payroll-mode .payroll-panel,
  #app.app-payroll-mode #payrollPanel,
  #app.app-payroll-mode #payrollPanel .report-card {
    width: 100% !important;
    max-width: none !important;
    justify-self: stretch !important;
  }
}

@media (max-width: 1024px) {
  #app.app-configurations-mode .main-content {
    grid-template-columns: 1fr;
  }

  .communications-layout {
    grid-template-columns: 1fr;
  }

  .communications-inbox-layout {
    grid-template-columns: 1fr;
  }

  .payroll-layout {
    grid-template-columns: 1fr;
  }

  .communications-form {
    grid-template-columns: 1fr;
  }
}

/* Absolute desktop sidebar lock: keep feature menu fixed in every desktop mode. */
@media (min-width: 1025px) {
  #app:not(.menu-collapsed) .feature-menu-panel,
  #app:not(.menu-collapsed) .feature-menu-panel:hover,
  #app:not(.menu-collapsed) .feature-menu-panel:focus-within {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    right: auto !important;
    width: var(--mockup-sidebar-width, 260px) !important;
    max-height: 100vh !important;
    min-height: 0 !important;
    margin: 0 !important;
    z-index: 999 !important;
    transform: none !important;
  }

  #app:not(.menu-collapsed) .feature-menu-panel .card.sticky {
    position: relative !important;
    top: 0 !important;
    height: 100vh !important;
    max-height: 100vh !important;
  }

  #app:not(.menu-collapsed).app-dashboard-mode .main-content,
  #app:not(.menu-collapsed).app-hrinsights-mode .main-content,
  #app:not(.menu-collapsed).app-hiddengems-mode .main-content,
  #app:not(.menu-collapsed).app-dossier-mode .main-content,
  #app:not(.menu-collapsed).app-settings-mode .main-content,
  #app:not(.menu-collapsed).app-organization-mode .main-content,
  #app:not(.menu-collapsed).app-myteam-mode .main-content,
  #app:not(.menu-collapsed).app-vacation-mode .main-content,
  #app:not(.menu-collapsed).app-timesheet-mode .main-content,
  #app:not(.menu-collapsed).app-coach-mode .main-content,
  #app:not(.menu-collapsed).app-onboarding-mode .main-content,
  #app:not(.menu-collapsed).app-offboarding-mode .main-content,
  #app:not(.menu-collapsed).app-asset-mode .main-content,
  #app:not(.menu-collapsed).app-support-mode .main-content,
  #app:not(.menu-collapsed).app-workspace-mode .main-content {
    padding-left: calc(var(--mockup-sidebar-width, 260px) + 1rem) !important;
  }
}

@media (min-width: 1025px) {
  #app .feature-menu-panel,
  #app .feature-menu-panel:hover,
  #app .feature-menu-panel:focus-within,
  #app.menu-collapsed .feature-menu-panel {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    right: auto !important;
    width: var(--mockup-sidebar-width, 260px) !important;
    max-height: 100vh !important;
    min-height: 0 !important;
    margin: 0 !important;
    z-index: 999 !important;
    transform: none !important;
  }

  #app .feature-menu-panel .card.sticky {
    position: relative !important;
    top: 0 !important;
    height: 100vh !important;
    max-height: 100vh !important;
  }

  #app .feature-menu-panel .feature-menu-body {
    height: calc(100vh - 1rem) !important;
    max-height: calc(100vh - 1rem) !important;
    overflow-y: auto !important;
  }
}

@media (min-width: 1025px) {
  #app.app-dashboard-mode .report-header:has(.feature-section-favorite-slot) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-rows: auto auto !important;
    column-gap: 1rem !important;
    row-gap: 0.85rem !important;
    align-items: start !important;
  }

  #app.app-dashboard-mode .report-header:has(.feature-section-favorite-slot) > :first-child {
    grid-column: 1 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
  }

  #app.app-dashboard-mode .report-header:has(.feature-section-favorite-slot) .feature-section-favorite-slot {
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    align-self: start !important;
    margin-left: 0 !important;
  }

  #app.app-dashboard-mode .report-header:has(.feature-section-favorite-slot) .report-header-controls {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  #app.app-dashboard-mode .report-header:has(.feature-section-favorite-slot) .report-header-tools {
    width: min(560px, 100%) !important;
    justify-content: flex-start !important;
  }

  #app.app-dashboard-mode .report-header:has(.feature-section-favorite-slot) .report-header-secondary-tools,
  #app.app-dashboard-mode .report-header:has(.feature-section-favorite-slot) .report-header-actions.feature-section-primary-actions {
    width: 100% !important;
    justify-content: flex-start !important;
    margin-left: 0 !important;
    align-self: flex-start !important;
  }

  #app.app-dashboard-mode .report-header:has(.feature-section-favorite-slot) .report-header-secondary-tools {
    margin-top: 0.05rem !important;
  }

  #app.app-dashboard-mode .report-header:has(.feature-section-favorite-slot) .report-header-actions.feature-section-primary-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.62rem !important;
    margin-top: 0.7rem !important;
  }
}


/* --- Gestione licenze (Configurazioni admin) ------------------------------ */
.licensing-head { display: flex; flex-wrap: wrap; gap: 16px; margin: 4px 0 16px; }
.licensing-head-item { display: flex; flex-direction: column; gap: 2px; min-width: 140px; }
.licensing-head-item strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.licensing-head-item strong.danger { color: var(--danger, #e5484d); }
.licensing-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.licensing-product-card { border: 1px solid var(--border-color, #e2e6ee); border-radius: 10px; padding: 12px 14px; background: var(--card-bg, #fff); }
.licensing-product-card.not-included { opacity: 0.7; }
.licensing-product-title { font-weight: 600; margin-bottom: 8px; }
.licensing-product-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 2px 0; }
.licensing-product-row strong { font-variant-numeric: tabular-nums; }
.licensing-badge { font-size: 12px; }
.licensing-change { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.licensing-plan-buttons { display: flex; flex-wrap: wrap; gap: 8px; }

/* ========================================
   Position Matching Panel (Ricerca per Posizione)
======================================== */

#app:not(.app-positionmatching-mode) .position-matching-panel {
  display: none;
}

#app.app-positionmatching-mode .report-panel,
#app.app-positionmatching-mode .editor-panel,
#app.app-positionmatching-mode .preview-panel,
#app.app-positionmatching-mode .archive-panel,
#app.app-positionmatching-mode .coach-panel,
#app.app-positionmatching-mode .hr-panel,
#app.app-positionmatching-mode .hidden-gems-panel,
#app.app-positionmatching-mode .dossier-panel,
#app.app-positionmatching-mode .settings-panel,
#app.app-positionmatching-mode .vacation-panel,
#app.app-positionmatching-mode .timesheet-panel,
#app.app-positionmatching-mode .onboarding-panel,
#app.app-positionmatching-mode .offboarding-panel {
  display: none;
}

#app.app-positionmatching-mode .main-content {
  grid-template-columns: minmax(210px, 0.42fr) minmax(0, 1fr);
}

#app.menu-collapsed.app-positionmatching-mode .main-content {
  grid-template-columns: minmax(0, 1fr);
}

.position-matching-panel #positionMatchingProfileSelect {
  min-width: 190px;
  padding: 0.36rem 0.5rem;
  border: 1px solid #d5dde6;
  border-radius: 8px;
  background: #ffffff;
  font: inherit;
}

.position-criteria-block {
  margin-top: 0.9rem;
}

.position-criteria-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.position-criteria-head h5 {
  margin: 0;
  font-size: 0.86rem;
  color: #32363a;
}

.position-criteria-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
}

/* I controlli delle righe criterio NON sono in .form-group → replico lo stile/altezza standard
   dei form (combo a 40px) così la select livello/lingua non resta più bassa delle altre combo. */
.position-criteria-row input[type="text"],
.position-criteria-row select {
  height: 40px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font-size: 0.875rem;
  font-family: inherit;
  background-color: #fcfdfe;
}

.position-criteria-row input[type="text"] {
  flex: 1 1 180px;
  min-width: 140px;
  padding: 0.625rem 0.75rem;
}

.position-criteria-row select {
  flex: 0 0 auto;
  padding: 0.5rem 0.75rem;
}

.position-criteria-required {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  color: #5b6770;
  white-space: nowrap;
}

.position-match-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.position-match-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.14rem 0.5rem;
  border-radius: 999px;
  font-size: 0.76rem;
  border: 1px solid #b6e3c2;
  background: #eaf7ee;
  color: #2f9e44;
}

.position-match-tag.is-missing {
  border-color: #f1c3c3;
  background: #fdf0f0;
  color: #c0392b;
}

.position-match-tag.is-partial {
  border-color: #f0d9a8;
  background: #fdf6e7;
  color: #a8781c;
}

.position-match-tag.is-ai {
  border-color: #c3d4f1;
  background: #eef3fd;
  color: #3a5ca8;
}

.hr-card.has-ai {
  border-left: 3px solid #3a5ca8;
}

.position-ai-block {
  margin-top: 0.55rem;
  padding-top: 0.5rem;
  border-top: 1px dashed #dbe3ec;
}

.position-ai-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.position-ai-label {
  font-size: 0.8rem;
  color: #5b6770;
}

.position-ai-rationale {
  margin: 0.4rem 0 0.3rem;
  font-size: 0.86rem;
  color: #32363a;
  line-height: 1.4;
}


.travel-approved-section {
  display: grid;
  gap: 0.65rem;
  padding-top: 0.1rem;
}

.travel-approved-section + .travel-approved-section {
  margin-top: 0.2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(214, 226, 236, 0.7);
}

.travel-approved-section h4 {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #173753;
}

.travel-expense-tree-readonly .form-group input[readonly] {
  background: #f4f8fc;
  color: #24405b;
}

body.theme-dark .travel-approved-section h4 {
  color: #e7eef7;
}

body.theme-dark .travel-expense-tree-readonly .form-group input[readonly] {
  background: #101923;
  color: #e6edf5;
}


.travel-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.travel-card-copy {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  width: 100%;
  flex: 1 1 auto;
}

.travel-card-kicker {
  display: inline-flex;
  width: fit-content;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: rgba(15, 76, 129, 0.1);
  color: #0f4c81;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.travel-card-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

.travel-card-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 120px;
  padding: 0.55rem 0.7rem;
  border-radius: 14px;
  border: 1px solid #d5e2ee;
  background: linear-gradient(180deg, #ffffff 0%, #eef5fb 100%);
  box-shadow: 0 4px 12px rgba(15, 76, 129, 0.05);
}

.travel-card-chip-label {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6a8098;
}

.travel-card-chip-value {
  font-size: 0.88rem;
  line-height: 1.3;
  color: #173753;
  word-break: break-word;
}

.travel-card-body{
  display: grid;
  gap: 0.85rem;
  width: 100%;
  min-width: 0;
}

.travel-card-linear{
  grid-template-columns: 1fr;
}

.travel-card-panel {
  display: grid;
  gap: 0.55rem;
  padding: 1rem 1.05rem;
  border-radius: 16px;
  border: 1px solid #dbe6ef;
  background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
  width: 100%;
  min-width: 0;
}

.travel-card-panel--wide {
  grid-column: 1 / -1;
}

.travel-card-label {
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6a8098;
  font-weight: 800;
}

.travel-card-text {
  white-space: pre-wrap;
  line-height: 1.6;
  color: #24405b;
  font-size: 0.92rem;
}

.travel-card-meta-list{
  display: grid;
  gap: 0.5rem;
  width: 100%;
}

.travel-cost-expenses-inline {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(216, 229, 241, 0.75);
}

.travel-card-info-row {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(216, 229, 241, 0.65);
}

.travel-card-info-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.travel-card-info-label {
  color: #6a8098;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex: 0 0 auto;
}

.travel-card-info-value {
  color: #173753;
  font-size: 0.96rem;
  text-align: left;
  word-break: break-word;
}

.travel-card-empty{
  color: #5f7489;
  font-size: 0.9rem;
  line-height: 1.55;
}

.travel-request-card-history {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  gap: 0.95rem;
}

.travel-request-card-history .travel-card-top {
  padding-bottom: 0.15rem;
  border-bottom: 1px solid rgba(214, 226, 236, 0.7);
}

.travel-history-collapse {
  display: grid;
  gap: 0.85rem;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

.travel-history-summary {
  list-style: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  cursor: pointer;
  padding: 0;
}

.travel-history-summary::-webkit-details-marker {
  display: none;
}

.travel-history-summary-main {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  width: 100%;
}

.travel-history-summary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.travel-history-details {
  display: grid;
  gap: 0.85rem;
}

.travel-history-collapse[open] .travel-history-summary {
  padding-bottom: 0.15rem;
  border-bottom: 1px solid rgba(214, 226, 236, 0.7);
}

.travel-history-collapse[open] .travel-history-summary::after {
  transform: rotate(180deg);
}

.travel-history-summary::after {
  content: 'v';
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  border: 1px solid #d5e2ee;
  color: #0f4c81;
  background: linear-gradient(180deg, #ffffff 0%, #eef5fb 100%);
  transition: transform 0.18s ease, background 0.18s ease;
}

.travel-history-summary:hover::after,
.travel-history-summary:focus-visible::after {
  background: linear-gradient(180deg, #f6fbff 0%, #e9f2fa 100%);
}

.travel-history-expanded .travel-card-top {
  display: none;
}

.travel-history-expanded {
  margin-top: 0;
}
.travel-card-actions,
.travel-card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
}

.travel-card-footer {
  padding-top: 0.1rem;
}

.travel-inbox-edit-panel {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.95rem;
}

.travel-inbox-edit-panel-body {
  width: 100%;
}

.travel-inbox-edit-actions {
  justify-content: flex-end;
  border-top: 1px solid rgba(216, 229, 241, 0.75);
  padding-top: 0.75rem;
}

body.theme-dark .travel-inbox-edit-actions {
  border-top-color: rgba(71, 85, 105, 0.45);
}

body.theme-dark .travel-card-kicker {
  background: rgba(125, 211, 252, 0.12);
  color: #7dd3fc;
}

body.theme-dark .travel-card-chip,
body.theme-dark .travel-card-panel {
  border-color: rgba(71, 85, 105, 0.72);
  background: linear-gradient(180deg, #17212d 0%, #111924 100%);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
}

body.theme-dark .travel-card-chip-label,
body.theme-dark .travel-card-info-label,
body.theme-dark .travel-card-label {
  color: #9fb2c5;
}

body.theme-dark .travel-card-chip-value,
body.theme-dark .travel-card-info-value,
body.theme-dark .travel-card-text,
body.theme-dark .travel-card-empty {
  color: #e6edf5;
}

body.theme-dark .travel-card-info-row {
  border-bottom-color: rgba(71, 85, 105, 0.4);
}

body.theme-dark .travel-request-card-history .travel-card-top {
  border-bottom-color: rgba(71, 85, 105, 0.5);
}

@media (max-width: 720px) {
  .travel-card-linear{
    grid-template-columns: 1fr;
  }

  .travel-card-top {
    flex-direction: column;
  }

  .travel-card-badges {
    justify-content: flex-start;
  }

  .travel-card-chip {
    min-width: 0;
    width: 100%;
  }

  .travel-card-info-row {
    grid-template-columns: 1fr;
  }

  .travel-card-info-value {
    text-align: left;
  }
}


/* ========================================
   Candidate Evaluation Panel
======================================== */

#app:not(.app-candidateevaluation-mode) .candidate-evaluation-panel {
  display: none;
}

#app.app-candidateevaluation-mode .report-panel,
#app.app-candidateevaluation-mode .editor-panel,
#app.app-candidateevaluation-mode .preview-panel,
#app.app-candidateevaluation-mode .archive-panel,
#app.app-candidateevaluation-mode .coach-panel,
#app.app-candidateevaluation-mode .hr-panel,
#app.app-candidateevaluation-mode .hidden-gems-panel,
#app.app-candidateevaluation-mode .dossier-panel,
#app.app-candidateevaluation-mode .settings-panel,
#app.app-candidateevaluation-mode .configurations-panel,
#app.app-candidateevaluation-mode .vacation-panel,
#app.app-candidateevaluation-mode .timesheet-panel,
#app.app-candidateevaluation-mode .onboarding-panel,
#app.app-candidateevaluation-mode .offboarding-panel,
#app.app-candidateevaluation-mode .organization-panel,
#app.app-candidateevaluation-mode .my-team-panel,
#app.app-candidateevaluation-mode .asset-panel,
#app.app-candidateevaluation-mode .support-panel,
#app.app-candidateevaluation-mode .communications-panel,
#app.app-candidateevaluation-mode .payroll-panel {
  display: none;
}

#app.app-candidateevaluation-mode .main-content {
  grid-template-columns: minmax(210px, 0.42fr) minmax(0, 1fr);
}

#app.menu-collapsed.app-candidateevaluation-mode .main-content {
  grid-template-columns: minmax(0, 1fr);
}

.candidate-evaluation-content {
  display: grid;
  gap: 1rem;
}

.candidate-evaluation-shell {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.45fr);
  gap: 1rem;
  align-items: start;
}

.candidate-evaluation-sidebar,
.candidate-evaluation-detail,
.candidate-evaluation-area-card,
.candidate-evaluation-result {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 18px;
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.candidate-evaluation-sidebar,
.candidate-evaluation-detail {
  padding: 1rem;
}

.candidate-evaluation-area-card {
  padding: 1rem;
  margin-bottom: 1rem;
}

.candidate-evaluation-detail-header,
.candidate-evaluation-score-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.candidate-evaluation-detail-header h3,
.candidate-evaluation-result h4,
.candidate-evaluation-insight-card h5{
  margin: 0;
  color: #111827;
}

/* E' una <label>, quindi di suo INLINE: min-width e padding verticale non riservano
   spazio e il riquadro finiva stampato sopra il titolo dell'area. Serve un box vero. */
.candidate-evaluation-area-select {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.6rem;
  min-width: 180px;
  border: 1px solid #d6dee8;
  border-radius: 12px;
  padding: 0.45rem 0.65rem;
  background: #ffffff;
  color: #172033;
  font: inherit;
}

.candidate-evaluation-area-select select {
  flex: 1;
  min-width: 0;
}

.candidate-evaluation-kpi-block {
  margin-top: 0.85rem;
}

.candidate-evaluation-kpi-block h4 {
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.candidate-evaluation-kpi-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.32rem 0.58rem;
  background: rgba(20, 184, 166, 0.13);
  color: #0f766e;
  font-size: 0.78rem;
  font-weight: 700;
}

.candidate-evaluation-list {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.75rem;
  max-height: 620px;
  overflow: auto;
  padding-right: 0.25rem;
}

.candidate-evaluation-list-item {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 15px;
  background: #ffffff;
  padding: 0.75rem;
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.candidate-evaluation-list-item:hover,
.candidate-evaluation-list-item.is-active {
  transform: translateY(-1px);
  border-color: rgba(20, 184, 166, 0.55);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.1);
}

.candidate-evaluation-empty-inline,
.candidate-evaluation-summary{
  color: #64748b;
  font-size: 0.86rem;
}

.candidate-evaluation-readiness {
  display: grid;
  place-items: center;
  min-width: 92px;
  aspect-ratio: 1;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 30%, #ccfbf1, #14b8a6);
  color: #073b36;
  font-weight: 900;
  box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.55);
}

.candidate-evaluation-result {
  margin-top: 1rem;
  padding: 1rem;
}

.candidate-evaluation-result-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.candidate-evaluation-score-track {
  overflow: hidden;
  height: 9px;
  border-radius: 999px;
  background: #e2e8f0;
}

.candidate-evaluation-score-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f766e, #2dd4bf);
}

.candidate-evaluation-insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.candidate-evaluation-insight-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  padding: 0.85rem;
  background: rgba(248, 250, 252, 0.85);
}

.candidate-evaluation-insight-card ul {
  margin: 0.55rem 0 0;
  padding-left: 1.05rem;
  color: #334155;
}

body.theme-dark .candidate-evaluation-sidebar,
body.theme-dark .candidate-evaluation-detail,
body.theme-dark .candidate-evaluation-area-card,
body.theme-dark .candidate-evaluation-result {
  border-color: rgba(148, 163, 184, 0.24);
  background: linear-gradient(145deg, #111827 0%, #0f172a 100%);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

body.theme-dark .candidate-evaluation-list-item,
body.theme-dark .candidate-evaluation-area-select,
body.theme-dark .candidate-evaluation-insight-card {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.92);
  color: #e5eefb;
}

body.theme-dark .candidate-evaluation-detail-header h3,
body.theme-dark .candidate-evaluation-result h4,
body.theme-dark .candidate-evaluation-insight-card h5{
  color: #f8fafc;
}

body.theme-dark .candidate-evaluation-empty-inline,
body.theme-dark .candidate-evaluation-summary,
body.theme-dark .candidate-evaluation-insight-card ul{
  color: #cbd5e1;
}

@media (max-width: 980px) {
  .candidate-evaluation-shell,
  .candidate-evaluation-insight-grid {
    grid-template-columns: 1fr;
  }

  .candidate-evaluation-result-head,
.candidate-evaluation-detail-header{
    align-items: flex-start;
    flex-direction: column;
  }
}


/* Candidate evaluation: UX refinement */
#app.app-candidateevaluation-mode .candidate-evaluation-panel {
  --candidate-evaluation-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 4h10a3 3 0 0 1 3 3v1h1a2 2 0 0 1 2 2v10H4V4Zm2 2v12h12v-8h-3V7a1 1 0 0 0-1-1H6Zm2 3h5v2H8V9Zm0 4h8v2H8v-2Zm11.4-9.6 1.2 1.2-2.2 2.2-1.2-1.2 2.2-2.2Z'/%3E%3C/svg%3E");
}

#app:not(.menu-collapsed) .feature-menu-btn[data-feature="candidate-evaluation"] {
  --feature-menu-icon: var(--candidate-evaluation-icon, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 4h10a3 3 0 0 1 3 3v1h1a2 2 0 0 1 2 2v10H4V4Zm2 2v12h12v-8h-3V7a1 1 0 0 0-1-1H6Zm2 3h5v2H8V9Zm0 4h8v2H8v-2Zm11.4-9.6 1.2 1.2-2.2 2.2-1.2-1.2 2.2-2.2Z'/%3E%3C/svg%3E"));
}

#app.app-candidateevaluation-mode .candidate-evaluation-shell {
  grid-template-columns: minmax(310px, 0.72fr) minmax(0, 1.7fr);
  gap: 1.15rem;
}

#app.app-candidateevaluation-mode .candidate-evaluation-sidebar,
#app.app-candidateevaluation-mode .candidate-evaluation-detail {
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(16px);
}

#app.app-candidateevaluation-mode .candidate-evaluation-area-card {
  border: 0;
  background: linear-gradient(135deg, #0f766e, #164e63);
  color: #ecfeff;
  box-shadow: 0 18px 40px rgba(15, 118, 110, 0.22);
}

#app.app-candidateevaluation-mode .candidate-evaluation-area-card h3,
#app.app-candidateevaluation-mode .candidate-evaluation-area-card strong,
#app.app-candidateevaluation-mode .candidate-evaluation-area-card .candidate-evaluation-kicker {
  color: #ffffff;
}

#app.app-candidateevaluation-mode .candidate-evaluation-area-card .candidate-evaluation-kpi-chip {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

#app.app-candidateevaluation-mode .candidate-evaluation-list-item {
  display: grid;
  gap: 0.2rem;
  padding: 0.9rem 1rem;
  border-radius: 18px;
}

#app.app-candidateevaluation-mode .candidate-evaluation-list-item strong {
  color: #0f172a;
  font-size: 0.95rem;
}

#app.app-candidateevaluation-mode .candidate-evaluation-list-item span,
#app.app-candidateevaluation-mode .candidate-evaluation-list-item small {
  color: #64748b;
}

#app.app-candidateevaluation-mode .candidate-evaluation-list-item.is-active {
  background: linear-gradient(135deg, #ecfeff, #ffffff);
  border-color: rgba(15, 118, 110, 0.65);
}

#app.app-candidateevaluation-mode .candidate-evaluation-detail-header {
  padding-bottom: 0.95rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

#app.app-candidateevaluation-mode .candidate-evaluation-detail-header p {
  margin: 0.25rem 0 0;
  color: #64748b;
}

#app.app-candidateevaluation-mode .candidate-evaluation-placeholder {
  min-height: 240px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px dashed rgba(15, 118, 110, 0.28);
  border-radius: 20px;
  background: rgba(236, 254, 255, 0.55);
  color: #0f766e;
  font-weight: 800;
}

#app.app-candidateevaluation-mode .candidate-evaluation-result {
  display: grid;
  gap: 1rem;
  border-radius: 22px;
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
}

#app.app-candidateevaluation-mode .candidate-evaluation-result-head {
  align-items: flex-start;
}

#app.app-candidateevaluation-mode .candidate-evaluation-score-row {
  grid-template-columns: minmax(105px, 0.75fr) minmax(120px, 1fr) auto;
}

body.theme-dark #app.app-candidateevaluation-mode .candidate-evaluation-sidebar,
body.theme-dark #app.app-candidateevaluation-mode .candidate-evaluation-detail,
body.theme-dark #app.app-candidateevaluation-mode .candidate-evaluation-result{
  background: rgba(15, 23, 42, 0.88);
  border-color: rgba(148, 163, 184, 0.22);
}

body.theme-dark #app.app-candidateevaluation-mode .candidate-evaluation-list-item strong {
  color: #f8fafc;
}

body.theme-dark #app.app-candidateevaluation-mode .candidate-evaluation-list-item span,
body.theme-dark #app.app-candidateevaluation-mode .candidate-evaluation-list-item small,
body.theme-dark #app.app-candidateevaluation-mode .candidate-evaluation-detail-header p {
  color: #cbd5e1;
}

body.theme-dark #app.app-candidateevaluation-mode .candidate-evaluation-list-item.is-active {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.18), rgba(15, 23, 42, 0.95));
}

@media (max-width: 1180px) {
  #app.app-candidateevaluation-mode .candidate-evaluation-shell{
    grid-template-columns: 1fr;
  }
}


/* Candidate evaluation: compact KPI compatibility score */
#app.app-candidateevaluation-mode .candidate-evaluation-readiness {
  min-width: 128px;
  width: auto;
  aspect-ratio: auto;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(204, 251, 241, 0.85), rgba(255, 255, 255, 0.94));
  color: #0f766e;
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.12);
}

#app.app-candidateevaluation-mode .candidate-evaluation-readiness span {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1.15;
  text-transform: uppercase;
}

#app.app-candidateevaluation-mode .candidate-evaluation-readiness strong {
  color: #0f172a;
  font-size: 1.35rem;
  line-height: 1;
}

#app.app-candidateevaluation-mode .candidate-evaluation-result-head h4 {
  margin: 0.15rem 0 0.35rem;
}

body.theme-dark #app.app-candidateevaluation-mode .candidate-evaluation-readiness {
  border-color: rgba(45, 212, 191, 0.26);
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.18), rgba(15, 23, 42, 0.95));
  color: #99f6e4;
}

body.theme-dark #app.app-candidateevaluation-mode .candidate-evaluation-readiness strong {
  color: #f8fafc;
}


/* Candidate evaluation: deterministic KPI shortlist */
.candidate-evaluation-list-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.candidate-evaluation-match-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0.22rem 0.48rem;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.12);
  color: #0f766e;
  font-size: 0.74rem;
  font-weight: 900;
  white-space: nowrap;
}

.candidate-evaluation-ai-actions {
  display: grid;
  gap: 0.45rem;
  margin: 0.75rem 0;
  padding: 0.75rem;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 16px;
  background: rgba(236, 254, 255, 0.55);
}

.candidate-evaluation-ai-actions span {
  color: #64748b;
  font-size: 0.82rem;
}

.candidate-evaluation-kpi-refine-btn {
  color: #ffffff;
  background: linear-gradient(135deg, #f0821d, #d86512);
  border: 1px solid rgba(240, 130, 29, 0.42);
  box-shadow: 0 10px 22px rgba(240, 130, 29, 0.22);
}

.candidate-evaluation-kpi-refine-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #ff922b, #c9570d);
  border-color: rgba(240, 130, 29, 0.58);
  box-shadow: 0 14px 28px rgba(240, 130, 29, 0.3);
  transform: translateY(-1px);
}

.candidate-evaluation-kpi-refine-btn:disabled {
  opacity: 0.62;
  cursor: not-allowed;
  box-shadow: none;
}

.candidate-evaluation-ai-summary {
  display: grid;
  gap: 0.18rem;
  margin-top: 0.35rem;
  padding: 0.55rem;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.08);
  color: #1e3a8a;
}

.candidate-evaluation-list-item.has-ai-summary {
  border-color: rgba(37, 99, 235, 0.24);
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.98));
}

.candidate-evaluation-list-item.has-ai-summary::before {
  content: "AI";
  align-self: flex-start;
  width: fit-content;
  padding: 0.16rem 0.42rem;
  border-radius: 999px;
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.1);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.candidate-evaluation-ai-summary strong {
  color: #1d4ed8 !important;
  font-size: 0.78rem !important;
}

.candidate-evaluation-ai-summary span {
  color: #334155 !important;
  font-size: 0.8rem;
}

body.theme-dark .candidate-evaluation-match-score {
  background: rgba(45, 212, 191, 0.16);
  color: #99f6e4;
}

body.theme-dark .candidate-evaluation-ai-actions {
  border-color: rgba(45, 212, 191, 0.18);
  background: rgba(15, 23, 42, 0.72);
}

body.theme-dark .candidate-evaluation-kpi-refine-btn {
  color: #fff7ed;
  background: linear-gradient(135deg, #f0821d, #b45309);
  border-color: rgba(251, 146, 60, 0.45);
  box-shadow: 0 10px 24px rgba(240, 130, 29, 0.18);
}

body.theme-dark .candidate-evaluation-kpi-refine-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #fb923c, #c2410c);
  box-shadow: 0 14px 30px rgba(240, 130, 29, 0.24);
}

body.theme-dark .candidate-evaluation-ai-summary {
  background: rgba(59, 130, 246, 0.14);
  color: #dbeafe;
}

body.theme-dark .candidate-evaluation-list-item.has-ai-summary {
  border-color: rgba(96, 165, 250, 0.28);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.92));
}

body.theme-dark .candidate-evaluation-list-item.has-ai-summary::before {
  color: #bfdbfe;
  background: rgba(96, 165, 250, 0.16);
}

body.theme-dark .candidate-evaluation-ai-summary strong,
body.theme-dark .candidate-evaluation-ai-summary span {
  color: #dbeafe !important;
}

/* --- Bottoni disabilitati -------------------------------------------------------------
   Nessuna regola stilava .btn:disabled: un bottone spento restava identico a uno attivo
   (stesso gradiente, stesso hover, stesso cursore),
quindi l'utente lo leggeva come
   cliccabile e interpretava il mancato effetto come un bug. Regola unica per entrambi i
   temi: desaturazione + opacita' invece di colori dedicati per variante. Il puntatore
   resta attivo di proposito,
cosi' il `title` esplicativo del bottone si vede. */
.btn:disabled,
.btn[disabled]{
  opacity: 0.5;
  filter: grayscale(1);
  cursor: not-allowed;
  box-shadow: none;
}

.btn:disabled:hover,
.btn[disabled]:hover{
  transform: none;
  opacity: 0.5;
  filter: grayscale(1);
  box-shadow: none;
}

/* --- Nota sotto il selettore di lingua ------------------------------------------------
   Dice all'utente che la traduzione dell'interfaccia e' ancora parziale: senza, il testo
   italiano residuo dentro una schermata inglese sembra un difetto invece di un lavoro in
   corso. Stessa scala tipografica delle descrizioni delle altre card impostazioni. */
.settings-language-note {
  margin: 0.6rem 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  opacity: 0.75;
}

/* --- Campi obbligatori e campi data ---------------------------------------------------
   Nasce da un caso reale su Safari: <input type="date"> vi si disegna senza il pulsante
   calendario che Chrome mostra, e un campo mai toccato somiglia a uno gia' compilato.
   L'utente premeva "Continua" convinto di aver riempito tutto e riceveva un rifiuto
   generico, senza modo di capire quale campo mancasse.

   Tre rimedi, in ordine di importanza:
   1. .is-invalid marca il campo effettivamente vuoto dopo un tentativo fallito;
   2. .is-required segna l'etichetta dei campi richiesti PRIMA del tentativo;
   3. l'icona qui sotto da' anche a Safari l'affordance "qui si sceglie una data".
   Il messaggio che nomina il campo sta in public/js/lib/formValidation.js: e' quello a
   risolvere il blocco, questi stili lo rendono evidente a colpo d'occhio. */

.form-group input.is-invalid,
.form-group select.is-invalid,
.form-group textarea.is-invalid,
input.is-invalid,
select.is-invalid,
textarea.is-invalid {
  border-color: #c0392b;
  background-color: rgba(192, 57, 43, 0.05);
}

.form-group input.is-invalid:focus,
.form-group select.is-invalid:focus,
.form-group textarea.is-invalid:focus {
  border-color: #c0392b;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.16);
}

body.theme-dark .form-group input.is-invalid,
body.theme-dark .form-group select.is-invalid,
body.theme-dark .form-group textarea.is-invalid,
body.theme-dark input.is-invalid,
body.theme-dark select.is-invalid,
body.theme-dark textarea.is-invalid {
  border-color: #e8756a;
  background-color: rgba(232, 117, 106, 0.12);
}

body.theme-dark .form-group input.is-invalid:focus,
body.theme-dark .form-group select.is-invalid:focus,
body.theme-dark .form-group textarea.is-invalid:focus {
  border-color: #e8756a;
  box-shadow: 0 0 0 3px rgba(232, 117, 106, 0.22);
}

.form-group label.is-required::after {
  content: ' *';
  color: #c0392b;
  font-weight: 700;
}

body.theme-dark .form-group label.is-required::after {
  color: #e8756a;
}

/* Un'icona di calendario per i browser che NON ne disegnano una.
   Chrome ha il suo pulsante nativo e va lasciato in pace: un primo tentativo lo rendeva
   trasparente per sovrapporgli questo disegno, e il risultato e' stato che il calendario
   non si apriva piu' al click. Qui dentro Chrome non entra proprio.

   La feature query e' il discriminante: -webkit-named-image e' implementata solo da
   Safari, quindi il blocco si applica li' e basta - niente sniffing dello user agent,
   niente JavaScript, e se un domani Safari disegnasse la sua icona basta togliere il
   blocco. Se la query fallisse, si perde l'icona e non altro.

   .month-nav-input e' escluso: il navigatore mese ha un indicatore stilizzato suo e in
   due punti vive dentro un .form-group, dove questa regola - piu' specifica - gli
   cambierebbe padding e aspetto. */
@supports (background: -webkit-named-image(i)) {
  .form-group input[type="date"]:not(.month-nav-input),
  .form-group input[type="month"]:not(.month-nav-input) {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23557a9b' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M8 3v4M16 3v4M3 10h18'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
    background-size: 16px 16px;
    padding-right: 2.2rem;
  }

  body.theme-dark .form-group input[type="date"]:not(.month-nav-input),
  body.theme-dark .form-group input[type="month"]:not(.month-nav-input) {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a9c6e4' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M8 3v4M16 3v4M3 10h18'/%3E%3C/svg%3E");
  }
}

/* Campo data non ancora valorizzato: cio' che si vede deve leggersi come "vuoto".
   I due browser rendono lo stato vuoto in modo diverso e nessuno dei due lo dichiara:
   Chrome scrive gg/mm/aaaa, Safari scrive LA DATA DI OGGI in testo pieno mentre value
   resta stringa vuota. Il caso Safari e' quello che ha originato la segnalazione: sullo
   schermo c'era 26/08/2026 e la validazione rifiutava, giustamente, un campo vuoto.

   Lo stato "vuoto" ce lo dice la validazione nativa: un campo required e vuoto e'
   :invalid, e torna :valid appena riceve una data. Nessun JavaScript, nessuna classe da
   sincronizzare. In pagina non esiste alcun <form>, quindi required non innesca la
   validazione nativa al submit: qui e' solo un'asserzione di stato (e migliora
   l'accessibilita', dove l'asterisco da solo non arriva). */
.form-group input[type="date"]:not(.month-nav-input):required:invalid,
.form-group input[type="month"]:not(.month-nav-input):required:invalid {
  color: #8da0b4;
}

.form-group input[type="date"]:not(.month-nav-input):required:invalid::-webkit-datetime-edit,
.form-group input[type="month"]:not(.month-nav-input):required:invalid::-webkit-datetime-edit {
  color: inherit;
}

body.theme-dark .form-group input[type="date"]:not(.month-nav-input):required:invalid,
body.theme-dark .form-group input[type="month"]:not(.month-nav-input):required:invalid {
  color: #7f95ab;
}
