/**
 * Custom CSS for IntermitTracker
 * Modern, clean design with grid texture background
 */

/* Profile tiles: clip header/body to rounded frame. Info popovers use position:fixed (info_hover.html). */
.profile-tile {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  border-radius: 1rem; /* Tailwind rounded-2xl */
}

.profile-tile-header {
  box-sizing: border-box;
  max-width: 100%;
}

/* Nested blocks inside a profile tile (e.g. France Travail vs Mon entreprise). */
.profile-sub-tile {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background-color: #fafafa;
  padding: 1rem 1.25rem;
}

.profile-sub-tile + .profile-sub-tile {
  margin-top: 1rem;
}

.profile-sub-tile-title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
}

.profile-sub-tile--muted {
  opacity: 0.85;
}

.profile-sub-tile--disabled .profile-sub-tile-fields {
  pointer-events: none;
  opacity: 0.55;
}

/* Mon abonnement — status summary and pack list */
.profile-account-summary {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: linear-gradient(180deg, #fafafa 0%, #ffffff 100%);
  padding: 1rem 1.25rem;
}

.profile-account-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.profile-account-badge--paid {
  background-color: #dcfce7;
  color: #166534;
}

.profile-account-badge--trial {
  background-color: #e0f2fe;
  color: #0c4a6e;
}

.profile-account-badge--expired {
  background-color: #fef3c7;
  color: #92400e;
}

.profile-account-badge--neutral {
  background-color: #f3f4f6;
  color: #374151;
}

.profile-account-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.75rem 1.25rem;
  margin: 0;
}

.profile-account-fact {
  margin: 0;
}

.profile-account-fact dt {
  margin: 0 0 0.15rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7280;
}

.profile-account-fact dd {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #111827;
}

.profile-pack-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.profile-pack-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.625rem;
  background-color: #ffffff;
}

.profile-pack-item--included {
  border-color: #bbf7d0;
  background-color: #f0fdf4;
}

.profile-pack-item__name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
}

.profile-pack-item__status {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #6b7280;
  text-align: right;
}

.profile-pack-item--included .profile-pack-item__status {
  color: #15803d;
}

.profile-referral-input {
  font-variant-numeric: tabular-nums;
}

/* Declaration preview modal: France Travail / URSSAF main sections. */
.declaration-section {
  box-sizing: border-box;
  width: 100%;
}

.declaration-section + .declaration-section {
  margin-top: 1.75rem;
  padding-top: 0.25rem;
}

.declaration-section-title {
  margin: 0 0 1rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: #111827;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e5e7eb;
}

.declaration-section-lead {
  margin: -0.5rem 0 1rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: #6b7280;
}

/* Stats declaration preview modal — scoped to avoid affecting profile tiles. */
#stats-preview-modal {
  --stats-preview-col-date-w: 7.25rem;
  --stats-preview-col-num-w: 6.75rem;
  --stats-preview-col-primary-w: calc(
    100% - (2 * var(--stats-preview-col-date-w)) - (3 * var(--stats-preview-col-num-w))
  );
}

#stats-preview-modal .stats-preview-modal__dialog {
  box-shadow: var(--it-shadow-sonic-card, 0 18px 45px rgba(15, 23, 42, 0.08));
}

#stats-preview-modal .stats-preview-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1.25rem;
  background: linear-gradient(
    135deg,
    var(--it-color-primary, #8e2de2) 0%,
    var(--it-color-primary-dark, #4a00e0) 100%
  );
  color: var(--it-color-white, #fff);
}

#stats-preview-modal .stats-preview-modal__title {
  margin: 0;
  font-family: var(--it-font-display, Montserrat), system-ui, sans-serif;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.25;
  color: inherit;
}

#stats-preview-modal .stats-preview-modal__close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: 0.5rem;
  background: rgb(var(--it-color-white-rgb, 255 255 255) / 0.14);
  color: inherit;
  font-size: 1.375rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

#stats-preview-modal .stats-preview-modal__close:hover {
  background: rgb(var(--it-color-white-rgb, 255 255 255) / 0.24);
}

#stats-preview-modal .stats-preview-modal__close:focus-visible {
  outline: 2px solid var(--it-color-white, #fff);
  outline-offset: 2px;
}

#stats-preview-modal .stats-preview-modal__content {
  padding: 1.25rem 1.5rem 1.5rem;
  background-color: var(--it-color-accent50, #f5f3ff);
}

#stats-preview-modal .stats-preview-landscape-hint {
  border: 1px solid var(--it-color-accent200, #ddd6fe);
  border-radius: 0.75rem;
  background-color: var(--it-color-white, #fff);
  padding: 0.625rem 0.75rem;
  font-size: 0.75rem;
  color: var(--it-color-text, #1f2937);
}

#stats-preview-modal .stats-preview-landscape-hint svg {
  color: var(--it-color-primary, #8e2de2);
}

#stats-preview-modal .stats-preview-period {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--it-color-accent200, #ddd6fe);
  border-radius: var(--it-radius-input, 12px);
  background: linear-gradient(
    135deg,
    var(--it-color-white, #fff) 0%,
    var(--it-color-accent50, #f5f3ff) 100%
  );
  box-shadow: 0 1px 3px rgb(var(--it-color-primary-rgb, 142 45 226) / 0.08);
}

#stats-preview-modal .stats-preview-period__icon {
  flex-shrink: 0;
  font-size: 1.375rem;
  line-height: 1;
  color: var(--it-color-accent600, #7b22c7);
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

#stats-preview-modal .stats-preview-period__text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

#stats-preview-modal .stats-preview-period__label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--it-color-accent600, #7b22c7);
}

#stats-preview-modal .stats-preview-period__dates {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--it-color-text, #1f2937);
}

#stats-preview-modal .stats-preview-period__mode {
  font-size: 0.8125rem;
  color: var(--it-color-text-light, #6b7280);
}

#stats-preview-modal .stats-preview-section {
  overflow: hidden;
  border-radius: var(--it-radius-input, 12px);
  border: 1px solid rgb(var(--it-color-primary-rgb, 142 45 226) / 0.12);
  background-color: var(--it-color-white, #fff);
  box-shadow: 0 4px 14px rgb(var(--it-color-primary-dark-rgb, 74 0 224) / 0.06);
}

#stats-preview-modal .stats-preview-section + .stats-preview-section {
  margin-top: 1.25rem;
  padding-top: 0;
}

#stats-preview-modal .stats-preview-section__hero {
  padding: 0.625rem 1rem;
  background: linear-gradient(
    135deg,
    var(--it-color-primary, #8e2de2) 0%,
    var(--it-color-primary-dark, #4a00e0) 100%
  );
}

#stats-preview-modal .stats-preview-section__hero .declaration-section-title {
  margin: 0;
  padding: 0;
  border: none;
  font-family: var(--it-font-display, Montserrat), system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--it-color-white, #fff);
  text-align: center;
}

#stats-preview-modal .stats-preview-section__body {
  padding: 1rem 1rem 1.125rem;
}

#stats-preview-modal .stats-preview-section__body .declaration-section-lead {
  margin: 0 0 0.875rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  background-color: var(--it-color-accent50, #f5f3ff);
  border-left: 3px solid var(--it-color-primary, #8e2de2);
  font-size: 0.8125rem;
  color: var(--it-color-text, #1f2937);
}

#stats-preview-modal .stats-preview-sub-tile {
  border-color: var(--it-color-accent200, #ddd6fe);
  background: linear-gradient(
    180deg,
    var(--it-color-white, #fff) 0%,
    var(--it-color-accent50, #f5f3ff) 100%
  );
  box-shadow: inset 3px 0 0 var(--it-color-primary, #8e2de2);
}

#stats-preview-modal .stats-preview-sub-tile + .stats-preview-sub-tile {
  margin-top: 0.875rem;
}

#stats-preview-modal .stats-preview-sub-tile .profile-sub-tile-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.625rem;
  font-size: 0.9375rem;
  color: var(--it-color-ft-ring-worked, #6d28d9);
}

#stats-preview-modal .stats-preview-sub-tile .profile-sub-tile-title::before {
  content: '';
  flex-shrink: 0;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 9999px;
  background-color: var(--it-color-primary, #8e2de2);
}

#stats-preview-modal .stats-preview-sub-period {
  margin: -0.25rem 0 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--it-color-text-light, #6b7280);
}

#stats-preview-modal .stats-preview-sub-period__due {
  color: var(--it-color-accent600, #7b22c7);
}

#stats-preview-modal .stats-preview-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--it-color-border-subtle, #e5e7eb);
  border-radius: 0.625rem;
  background-color: var(--it-color-white, #fff);
}

#stats-preview-modal .stats-preview-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

#stats-preview-modal .stats-preview-table__col-primary {
  width: auto;
}

#stats-preview-modal .stats-preview-table--ft-aligned .stats-preview-table__col-primary {
  width: var(--stats-preview-col-primary-w);
}

#stats-preview-modal .stats-preview-table__col-date {
  width: var(--stats-preview-col-date-w);
}

#stats-preview-modal .stats-preview-table__col-num {
  width: var(--stats-preview-col-num-w);
}

#stats-preview-modal .stats-preview-table__col-spacer {
  width: var(--stats-preview-col-num-w);
}

#stats-preview-modal .stats-preview-table__cell-spacer {
  width: var(--stats-preview-col-num-w);
  padding: 0;
  border: none;
  font-size: 0;
  line-height: 0;
  overflow: hidden;
}

#stats-preview-modal .stats-preview-table__col-num-wide {
  width: 9.5rem;
}

#stats-preview-modal .stats-preview-table thead {
  background: linear-gradient(
    180deg,
    var(--it-color-accent100, #ede9fe) 0%,
    var(--it-color-accent50, #f5f3ff) 100%
  );
}

#stats-preview-modal .stats-preview-table th {
  padding: 0.625rem 0.75rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: left;
  color: var(--it-color-accent600, #7b22c7);
  border-bottom: 1px solid var(--it-color-accent200, #ddd6fe);
}

#stats-preview-modal .stats-preview-table td {
  padding: 0.625rem 0.75rem;
  color: var(--it-color-text, #1f2937);
  border-top: 1px solid var(--it-color-border-subtle, #e5e7eb);
}

#stats-preview-modal .stats-preview-table tbody tr:nth-child(even) {
  background-color: rgb(var(--it-color-accent50-rgb, 245 243 255) / 0.55);
}

#stats-preview-modal .stats-preview-table tbody tr:hover {
  background-color: var(--it-color-accent50, #f5f3ff);
}

#stats-preview-modal .stats-preview-table__primary {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#stats-preview-modal .stats-preview-table__date {
  white-space: nowrap;
}

#stats-preview-modal .stats-preview-table th.stats-preview-table__num,
#stats-preview-modal .stats-preview-table td.stats-preview-table__num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

#stats-preview-modal .stats-preview-table__amount {
  font-weight: 600;
  color: var(--it-color-ft-ring-worked, #6d28d9);
}

#stats-preview-modal .stats-preview-table tfoot {
  background-color: var(--it-color-accent100, #ede9fe);
  border-top: 2px solid var(--it-color-accent200, #ddd6fe);
  font-weight: 700;
  color: var(--it-color-text, #1f2937);
}

#stats-preview-modal .stats-preview-table__empty {
  padding: 1rem 0.75rem;
  text-align: center;
  color: var(--it-color-text-light, #6b7280);
}

#stats-preview-modal .stats-preview-table__hint {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--it-color-text-light, #6b7280);
  line-height: 1.35;
}

#stats-preview-modal .stats-preview-fields {
  display: grid;
  gap: 0.625rem;
  margin: 0;
}

@media (min-width: 640px) {
  #stats-preview-modal .stats-preview-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

#stats-preview-modal .stats-preview-field {
  margin: 0;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--it-color-border-subtle, #e5e7eb);
  border-radius: 0.5rem;
  background-color: var(--it-color-white, #fff);
}

#stats-preview-modal .stats-preview-field dt {
  margin: 0 0 0.25rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--it-color-text-light, #6b7280);
}

#stats-preview-modal .stats-preview-field dd {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--it-color-text, #1f2937);
}

#stats-preview-modal .stats-preview-field__hint {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--it-color-text-light, #6b7280);
}

#stats-preview-modal .stats-preview-field__amount {
  color: var(--it-color-ft-ring-worked, #6d28d9);
}

#stats-preview-modal .stats-preview-field__warning {
  color: #b45309;
}

#stats-preview-modal .stats-preview-empty-note {
  margin: 0;
  padding: 0.75rem;
  border-radius: 0.5rem;
  background-color: var(--it-color-accent50, #f5f3ff);
  font-size: 0.875rem;
  color: var(--it-color-text-light, #6b7280);
}

#stats-preview-modal .stats-preview-disclaimer {
  margin: 0.625rem 0 0;
  padding: 0.5rem 0.625rem;
  border-radius: 0.375rem;
  background-color: var(--it-color-accent50, #f5f3ff);
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--it-color-text-light, #6b7280);
}

.it-info-popover-wrap {
  position: relative;
  z-index: 2;
}

.it-info-popover-wrap:is(:hover, :focus-within) {
  z-index: 60;
}

/* All events page: month tiles — collapsed ≈ 3 rows, expanded ≈ 12 rows + scroll */
.events-month-scroll--collapsed {
  max-height: 12.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  transition: max-height 0.2s ease-out;
}

.events-month-scroll--expanded {
  max-height: min(42rem, 70vh);
  overflow-x: auto;
  overflow-y: auto;
  transition: max-height 0.2s ease-out;
}

.events-month-scroll--expanded thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

/*
 * Brand shell fallbacks: `design-tokens.css` must load before this file.
 * Ensures sidebar / page canvas / dashboard hero stay correct if the Tailwind Play CDN
 * misses custom `theme.extend` utilities (cache, scan order, or transient 404 on token assets).
 */
body.min-h-screen.bg-it-canvas {
  background-color: var(--it-color-canvas, #d4d4d8);
}

aside.bg-it-sidebar {
  background-color: var(--it-color-sidebar, #111827) !important;
  color: #f3f4f6;
}

/* Material Symbols Rounded — loaded after Tailwind preflight (base.html order). */
.material-symbols-rounded {
  font-family: 'Material Symbols Rounded', sans-serif;
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Sidebar nav icons: Material Symbols Rounded, 22px (Flutter MainBottomNav / MainTopBar). */
aside.bg-it-sidebar .material-symbols-rounded.it-sidebar-nav-icon {
  font-size: 22px;
  line-height: 1;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  color: rgba(243, 244, 246, 0.45);
}

aside.bg-it-sidebar .it-sidebar-nav-icon--active {
  color: var(--it-color-primary, #8e2de2);
}

/* Profile + settings icon (Flutter ProfileSettingsIcon variant B parity). */
.profile-settings-icon {
  --profile-settings-icon-size: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: var(--profile-settings-icon-size);
  height: var(--profile-settings-icon-size);
  color: rgba(243, 244, 246, 0.45);
}

aside.bg-it-sidebar .profile-settings-icon--active {
  color: var(--it-color-primary, #8e2de2);
}

.profile-settings-icon__glyph {
  font-size: var(--profile-settings-icon-size);
  line-height: 1;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.profile-settings-icon--header {
  --profile-settings-icon-size: 24px;
  color: currentColor;
}

/* Sidebar avatar edit affordance (pencil at bottom of circle). */
aside.bg-it-sidebar .sidebar-avatar-edit {
  position: absolute;
  right: -2px;
  bottom: -2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 9999px;
  background: var(--it-color-primary, #8e2de2);
  color: #fff;
  border: 2px solid var(--it-color-sidebar, #111827);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  transition: background-color 0.15s ease, transform 0.15s ease;
  z-index: 1;
}

aside.bg-it-sidebar .sidebar-avatar-edit:hover {
  background: var(--it-color-primary-dark, #4a00e0);
  transform: scale(1.05);
}

aside.bg-it-sidebar .sidebar-avatar-edit__icon {
  font-size: 0.625rem;
  line-height: 1;
  width: 0.625rem;
  height: 0.625rem;
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 20;
}

/* Profile avatar crop modal (Cropper.js). */
#avatar-crop-modal .avatar-crop-modal__stage {
  min-height: 16rem;
}

#avatar-crop-modal .avatar-crop-modal__stage .cropper-container {
  max-height: 60vh;
}

article.dashboard-hero.bg-gradient-to-r {
  background-color: transparent;
  background-image: linear-gradient(
    to right,
    var(--it-color-primary, #8e2de2),
    var(--it-color-primary-dark, #4a00e0)
  ) !important;
}

/* Texture optionnelle très discrète (gris) */
.bg-grid-texture {
  background-color: transparent;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 24px 24px;
  position: relative;
}

.bg-grid-texture::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 2px 2px, rgba(255, 255, 255, 0.22) 1px, transparent 0);
  background-size: 48px 48px;
  pointer-events: none;
}

/* Cartes principales plus foncées que le fond (nuances de gris) */
.sonic-card {
  border-radius: var(--it-radius-card);
  background-color: #ffffff; /* blanc pur */
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(17, 24, 39, 0.06); /* léger contour gris */
  overflow: hidden; /* clip inner fills to radius (stats cards; tooltips use fixed) */
}

.gradient-hero {
  background: linear-gradient(135deg, var(--it-color-primary) 0%, var(--it-color-primary-dark) 100%);
  color: var(--it-color-white);
  border-radius: var(--it-radius-card);
  box-shadow: var(--it-shadow-hero);
}

.gradient-hero h1,
.gradient-hero h2,
.gradient-hero h3,
.gradient-hero p {
  color: #ffffff;
}

/* Transitions on interactive / chrome elements only (avoid global * which feels sluggish). */
a,
button,
input,
select,
textarea,
.card-hover,
.btn-primary,
.btn-primary-teal,
.logo-icon {
  transition-property: color, background-color, border-color, transform, box-shadow;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 200ms;
}

/* Card hover effects */
.card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Logo animation */
.logo-icon {
  transition: transform 0.3s ease;
}

.logo-icon:hover {
  transform: scale(1.05);
}

/* Button styles - accent (purple) aligned with sidebar/branding */
.btn-primary {
  background: linear-gradient(135deg, var(--it-color-primary) 0%, var(--it-color-primary-dark) 100%);
  box-shadow: 0 4px 6px -1px rgba(142, 45, 226, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--it-color-accent600) 0%, var(--it-color-primary-dark-hover) 100%);
  box-shadow: 0 6px 8px -1px rgba(142, 45, 226, 0.4);
  transform: translateY(-1px);
}

/* Legacy teal primary (if needed elsewhere) */
.btn-primary-teal {
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
  box-shadow: 0 4px 6px -1px rgba(20, 184, 166, 0.3);
}

.btn-primary-teal:hover {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  box-shadow: 0 6px 8px -1px rgba(20, 184, 166, 0.4);
  transform: translateY(-1px);
}

/* Glass morphism effect for cards */
.glass-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
  /* Avoid page-wide horizontal scroll when main uses overflow-visible for popovers */
  overflow-x: clip;
}

/* Focus styles - accent aligned with brand */
input:focus,
textarea:focus,
select:focus,
button:focus {
  outline: none;
  ring-width: 2px;
  ring-color: var(--it-color-primary);
}

/* Custom Calendar Styles — week grid: 24 h × 50 px; dashboard caps the scroll viewport to ~8h–20h */
.calendar-week-view {
  --cal-slot-height: 50px;
  --cal-hours-count: 24;
  display: flex;
  flex-direction: column;
  height: 600px;
  overflow: hidden;
}

/*
 * Dashboard: week view uses a fixed-height scroll viewport (08h–20h); month view still
 * fills the agenda card next to the stats column.
 */
.dashboard-page .dashboard-layout-grid {
  min-height: 0;
}

/*
 * Employer availability dashboard: calendar + slot requests side by side on desktop.
 * Page fits the viewport; only the requests column scrolls internally when needed.
 */
@media (min-width: 1024px) {
  .employer-availability-dashboard {
    flex: 1 1 auto;
    min-height: 0;
    max-height: calc(100vh - 4rem);
  }

  .employer-availability-dashboard .employer-dashboard-layout-grid {
    flex: 1 1 auto;
    min-height: 0;
    align-content: start;
  }

  .employer-availability-dashboard .employer-dashboard-calendar-header,
  .employer-availability-dashboard .employer-dashboard-slots-header {
    min-height: 2.75rem;
  }

  .employer-availability-dashboard .employer-dashboard-calendar-card,
  .employer-availability-dashboard .employer-dashboard-slots-card-wrap {
    min-height: 0;
    height: 100%;
  }

  .employer-availability-dashboard .employer-slot-requests-card {
    min-height: 0;
    height: 100%;
  }

  .employer-availability-dashboard .employer-portfolio-blocks {
    min-height: 0;
    flex: 1 1 auto;
  }

  .employer-availability-dashboard #custom-calendar {
    width: 100%;
    min-width: 0;
  }

  .employer-availability-dashboard .calendar-month-header,
  .employer-availability-dashboard .calendar-week-header {
    box-sizing: border-box;
  }

  .employer-availability-dashboard .calendar-week-header .calendar-days-container,
  .employer-availability-dashboard .calendar-week-body .calendar-days-container {
    width: 100%;
    box-sizing: border-box;
  }

  .employer-availability-dashboard .calendar-month-header .calendar-weekday-header,
  .employer-availability-dashboard .calendar-month-body .calendar-month-grid {
    box-sizing: border-box;
  }
}

/* Employer shared page: hero, tabs, portfolio table, empty states */
.employer-pro-hero {
  box-shadow: var(--it-shadow-sonic-card, 0 18px 45px rgba(15, 23, 42, 0.1));
}

.employer-pro-hero__layout {
  align-items: center;
}

.employer-pro-hero__content {
  text-align: left;
}

.employer-pro-hero__subtitle {
  color: rgb(var(--it-color-white-rgb, 255 255 255) / 0.8);
}

.employer-pro-hero__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  border: 2px solid rgb(var(--it-color-white-rgb, 255 255 255) / 0.35);
  background: rgb(var(--it-color-white-rgb, 255 255 255) / 0.16);
  box-shadow: 0 4px 14px rgb(0 0 0 / 0.12);
  overflow: hidden;
}

.employer-pro-hero__avatar--photo {
  background: rgb(var(--it-color-white-rgb, 255 255 255) / 0.92);
}

.employer-pro-hero__photo {
  flex: none;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  object-position: center;
  display: block;
}

@media (min-width: 768px) {
  .employer-pro-hero__avatar {
    width: 4rem;
    height: 4rem;
  }
}

.employer-pro-hero__initials {
  font-family: var(--it-font-display, Montserrat), system-ui, sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--it-color-white, #fff);
}

.employer-pro-hero__tagline {
  color: rgb(var(--it-color-white-rgb, 255 255 255) / 0.92);
}

/* Intermittent onboarding: spotlight tour + dashboard CTA (shared with employer tour) */
.intermittent-onboarding-cta {
  margin-bottom: 0.75rem;
  border: 1px solid var(--it-color-accent200, #ddd6fe);
  border-radius: 1rem;
  background: linear-gradient(
    to right,
    var(--it-color-accent50, #f5f3ff),
    rgb(var(--it-color-white-rgb, 255 255 255) / 0.95)
  );
  box-shadow: 0 1px 3px rgb(var(--it-color-primary-rgb, 142 45 226) / 0.08);
}

.intermittent-onboarding-cta__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.875rem 1rem;
}

.intermittent-onboarding-cta__title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--it-color-text, #1f2937);
}

.intermittent-onboarding-cta__text {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--it-color-text-light, #6b7280);
  flex: 1 1 14rem;
  min-width: 0;
}

.intermittent-onboarding-cta__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.intermittent-onboarding-cta__start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.75rem;
  background: linear-gradient(
    to right,
    var(--it-color-accent500, #8e2de2),
    var(--it-color-accent700, #6d28d9)
  );
  color: var(--it-color-white, #fff);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 2px rgb(var(--it-color-primary-rgb, 142 45 226) / 0.2);
}

.intermittent-onboarding-cta__start:hover {
  filter: brightness(1.05);
}

.intermittent-onboarding-cta__later {
  padding: 0.5rem 0.75rem;
  border: none;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--it-color-text-light, #6b7280);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
}

.intermittent-onboarding-cta__later:hover {
  color: var(--it-color-text, #1f2937);
  background: rgb(var(--it-color-primary-rgb, 142 45 226) / 0.06);
}

.intermittent-onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 55;
  pointer-events: none;
}

/* Employer slot-request modal is z-70; lift tour above it during modal steps. */
.intermittent-onboarding-overlay.employer-onboarding--above-modal {
  z-index: 80;
}

.intermittent-onboarding-overlay.employer-onboarding--above-modal
  .intermittent-onboarding-tooltip {
  z-index: 81;
}

.intermittent-onboarding-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgb(15 23 42 / 0.45);
  pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding-top: var(--spot-top, 50%);
  padding-left: var(--spot-left, 50%);
  padding-right: calc(100% - var(--spot-left, 50%) - var(--spot-width, 0px));
  padding-bottom: calc(100% - var(--spot-top, 50%) - var(--spot-height, 0px));
}

.intermittent-onboarding-tooltip {
  position: fixed;
  z-index: 58;
  width: min(22rem, calc(100vw - 1.5rem));
  padding: 0.875rem 1rem 1rem;
  border-radius: 1rem;
  border: 1px solid var(--it-color-accent200, #ddd6fe);
  background: var(--it-color-white, #fff);
  box-shadow: 0 10px 30px rgb(15 23 42 / 0.18);
  pointer-events: auto;
}

.intermittent-onboarding-tooltip__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.intermittent-onboarding-tooltip__nav {
  display: inline-flex;
  align-items: center;
  gap: 0.125rem;
}

.intermittent-onboarding-tooltip__nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: none;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--it-color-accent700, #6d28d9);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.intermittent-onboarding-tooltip__nav-btn:hover:not(:disabled) {
  background: rgb(var(--it-color-primary-rgb, 142 45 226) / 0.1);
  color: var(--it-color-accent800, #5b21b6);
}

.intermittent-onboarding-overlay--centered::before {
  -webkit-mask: none;
  mask: none;
  padding: 0;
}

.intermittent-onboarding-tooltip__fallback {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--it-color-accent100, #ede9fe);
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--it-color-text-light, #6b7280);
}

.intermittent-onboarding-tooltip__fallback strong {
  color: var(--it-color-text, #1f2937);
  font-weight: 600;
}

.intermittent-onboarding-tooltip__nav-btn:disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.intermittent-onboarding-tooltip__chevron {
  width: 1.125rem;
  height: 1.125rem;
}

.intermittent-onboarding-tooltip__progress {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  background: var(--it-color-accent50, #f5f3ff);
  color: var(--it-color-accent700, #6d28d9);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.intermittent-onboarding-tooltip__skip {
  border: none;
  background: transparent;
  color: var(--it-color-text-light, #6b7280);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
}

.intermittent-onboarding-tooltip__skip:hover {
  background: rgb(var(--it-color-primary-rgb, 142 45 226) / 0.08);
  color: var(--it-color-text, #1f2937);
}

.intermittent-onboarding-tooltip__title {
  margin: 0 0 0.375rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--it-color-text, #1f2937);
  line-height: 1.35;
}

.intermittent-onboarding-tooltip__body {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--it-color-text-light, #6b7280);
}

.intermittent-onboarding-tooltip__body strong {
  color: var(--it-color-text, #1f2937);
  font-weight: 600;
}

.intermittent-onboarding-tooltip__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.75rem;
}

.intermittent-onboarding-tooltip__next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4375rem 0.875rem;
  border: none;
  border-radius: 0.625rem;
  background: var(--it-color-accent600, #7b22c7);
  color: var(--it-color-white, #fff);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.intermittent-onboarding-spotlight {
  position: relative;
  z-index: 57 !important;
  box-shadow: 0 0 0 3px rgb(142 45 226 / 0.55), 0 0 0 6px rgb(142 45 226 / 0.15);
  border-radius: 0.75rem;
}

.intermittent-onboarding-replay {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--it-color-accent600, #7b22c7);
  text-decoration: underline;
  text-underline-offset: 2px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.intermittent-onboarding-replay--on-accent {
  color: #fff;
  text-decoration: none;
  padding: 0.45rem 0.85rem;
  border-radius: 9999px;
  border: 1px solid rgb(255 255 255 / 0.55);
  background: rgb(255 255 255 / 0.12);
}

.intermittent-onboarding-replay--on-accent:hover {
  color: #fff;
  background: rgb(255 255 255 / 0.2);
  border-color: rgb(255 255 255 / 0.75);
}

.intermittent-onboarding-replay--sidebar {
  color: #e9d5ff;
  text-decoration: none;
  font-weight: 500;
}

.intermittent-onboarding-replay--sidebar:hover {
  color: #fff;
  background: rgb(255 255 255 / 0.08);
}

.intermittent-onboarding-replay:hover {
  color: var(--it-color-accent700, #6d28d9);
}

/* Employer PIN gate: welcoming lock badge + roomy code input */
.employer-pin-gate__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  background-color: var(--it-color-accent50, #f5f3ff);
  border: 1px solid var(--it-color-accent200, #ddd6fe);
  color: var(--it-color-accent600, #7b22c7);
}

.employer-pin-gate__input {
  font-size: 1.125rem;
  letter-spacing: 0.25em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.employer-pin-gate__input::placeholder {
  letter-spacing: 0.08em;
  font-size: 0.875rem;
  color: #9ca3af;
}

.employer-pro-tabs-bar {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.employer-pro-tabs-bar .employer-pro-tabs-segmented {
  align-self: auto;
  flex-shrink: 0;
}

.employer-onboarding-replay {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  margin-left: auto;
  flex-shrink: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--it-color-accent600, #7b22c7);
  text-decoration: none;
  background-color: var(--it-color-white, #fff);
  border: 1px solid rgb(var(--it-color-primary-rgb, 142 45 226) / 0.45);
  cursor: pointer;
  padding: 0.5rem 0.875rem;
  border-radius: 9999px;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgb(var(--it-color-primary-rgb, 142 45 226) / 0.08);
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.employer-onboarding-replay:hover {
  color: var(--it-color-accent700, #6d28d9);
  background-color: var(--it-color-accent50, #f5f3ff);
  border-color: var(--it-color-accent200, #ddd6fe);
  box-shadow: 0 2px 4px rgb(var(--it-color-primary-rgb, 142 45 226) / 0.12);
}

.employer-onboarding-replay:focus-visible {
  outline: 2px solid var(--it-color-primary, #8e2de2);
  outline-offset: 2px;
}

.employer-onboarding-replay--on-accent {
  color: #fff;
  background: rgb(255 255 255 / 0.12);
  border-color: rgb(255 255 255 / 0.55);
  box-shadow: none;
}

.employer-onboarding-replay--on-accent:hover {
  color: #fff;
  background: rgb(255 255 255 / 0.2);
  border-color: rgb(255 255 255 / 0.75);
  box-shadow: none;
}

.employer-onboarding-replay__icon {
  font-size: 1.125rem;
  line-height: 1;
}

.employer-pro-tabs-segmented {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 0.25rem;
  padding: 0.1875rem;
  border: 1px solid var(--it-color-border-muted, #d1d5db);
  border-radius: 9999px;
  background-color: var(--it-color-white, #fff);
  box-shadow: 0 1px 3px rgb(var(--it-color-primary-rgb, 142 45 226) / 0.06);
}

.employer-pro-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 7.5rem;
  padding: 0.5rem 1.125rem;
  border: 1px solid transparent;
  border-radius: 9999px;
  background: transparent;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: var(--it-color-text-light, #6b7280);
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.employer-pro-tab:not(.is-active):hover {
  background-color: var(--it-color-accent50, #f5f3ff);
  color: var(--it-color-text, #1f2937);
}

.employer-pro-tab.is-active {
  background-color: var(--it-color-accent50, #f5f3ff);
  border-color: var(--it-color-accent200, #ddd6fe);
  color: var(--it-color-accent600, #7b22c7);
  box-shadow: 0 1px 3px rgb(var(--it-color-primary-rgb, 142 45 226) / 0.14);
}

.employer-pro-tab:focus-visible {
  outline: 2px solid var(--it-color-primary, #8e2de2);
  outline-offset: 2px;
}

.employer-dashboard-section-heading {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  padding-left: 0.75rem;
  border-left: 3px solid var(--it-color-accent200, #ddd6fe);
}

.employer-dashboard-section-label {
  margin: 0;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--it-color-accent600, #7b22c7);
}

.employer-dashboard-section-title {
  margin: 0;
  font-family: var(--it-font-display, Montserrat), system-ui, sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--it-color-text, #1f2937);
}

@media (min-width: 640px) {
  .employer-dashboard-section-title {
    font-size: 1rem;
  }
}

.employer-dashboard-card {
  box-shadow: 0 4px 14px rgb(var(--it-color-primary-dark-rgb, 74 0 224) / 0.06);
}

/* Employer availability calendar legend */
.employer-calendar-legend {
  width: 100%;
}

.employer-calendar-legend__track {
  margin: 0 -0.125rem;
  padding: 0 0.125rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.employer-calendar-legend__track::-webkit-scrollbar {
  display: none;
}

.employer-calendar-legend__list {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.375rem;
  margin: 0;
  padding: 0;
  list-style: none;
  min-width: min-content;
}

.employer-calendar-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.1875rem 0.5rem 0.1875rem 0.375rem;
  border: 1px solid var(--it-color-border, #e5e7eb);
  border-radius: 9999px;
  background-color: rgb(249 250 251 / 0.9);
  font-size: 0.75rem;
  line-height: 1.25;
  color: #4b5563;
  white-space: nowrap;
}

.employer-calendar-legend__swatch {
  flex-shrink: 0;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.08);
}

.employer-calendar-legend__label {
  min-width: 0;
}

@media (min-width: 768px) {
  .employer-calendar-legend__track {
    margin: 0;
    padding: 0;
    overflow: visible;
  }

  .employer-calendar-legend__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.375rem 0.625rem;
    min-width: 0;
  }

  .employer-calendar-legend__item {
    width: 100%;
    white-space: normal;
  }
}

@media (min-width: 1024px) {
  .employer-calendar-legend__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.employer-pending-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.375rem;
  padding: 0.125rem 0.4375rem;
  border-radius: 9999px;
  background-color: var(--it-color-accent50, #f5f3ff);
  border: 1px solid var(--it-color-accent200, #ddd6fe);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--it-color-accent600, #7b22c7);
  vertical-align: middle;
}

.employer-portfolio-table-wrap {
  border: 1px solid var(--it-color-border-muted, #e5e7eb);
  border-radius: 0.75rem;
  background-color: var(--it-color-white, #fff);
  box-shadow: inset 0 1px 0 rgb(var(--it-color-primary-rgb, 142 45 226) / 0.04);
}

.employer-portfolio-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

.employer-portfolio-table thead tr {
  background: linear-gradient(
    180deg,
    var(--it-color-accent50, #f5f3ff) 0%,
    #f3f4f6 100%
  );
  border-bottom: 1px solid var(--it-color-accent200, #ddd6fe);
}

.employer-portfolio-sort-th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--it-color-text-light, #6b7280);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.employer-portfolio-sort-th:hover {
  background-color: rgb(var(--it-color-primary-rgb, 142 45 226) / 0.06);
  color: var(--it-color-text, #1f2937);
}

.employer-portfolio-sort-th.is-sorted {
  color: var(--it-color-accent600, #7b22c7);
  background-color: rgb(var(--it-color-primary-rgb, 142 45 226) / 0.08);
}

.employer-portfolio-sort-label {
  margin-right: 0.375rem;
}

.employer-portfolio-sort-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0.875rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--it-color-accent600, #7b22c7);
}

.employer-portfolio-sort-indicator.hidden {
  display: none;
}

.employer-portfolio-row {
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.15s ease;
}

.employer-portfolio-row:nth-child(even) {
  background-color: #fafafa;
}

.employer-portfolio-row:hover {
  background-color: var(--it-color-accent50, #f5f3ff);
}

.employer-portfolio-cell {
  padding: 0.8125rem 1rem;
  color: var(--it-color-text, #1f2937);
  vertical-align: middle;
}

.employer-portfolio-cell--date {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-weight: 500;
}

.employer-portfolio-sort-th--thumb,
.employer-portfolio-cell--thumb {
  width: 3.75rem;
  padding: 0.625rem 0.375rem;
  vertical-align: middle;
}

.employer-portfolio-thumb {
  display: block;
  border-radius: 0.375rem;
  background: var(--it-color-surface-muted, #f3f4f6);
  border: 1px solid var(--it-color-border-muted, #e5e7eb);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
}

/* Fixed poster box in table rows — contain preserves uploaded aspect ratio */
.employer-portfolio-cell--thumb .employer-portfolio-thumb,
.career-portfolio-poster-btn .employer-portfolio-thumb {
  width: 2.5rem;
  height: 3.375rem;
  max-width: 100%;
  margin-inline: auto;
  object-fit: contain;
  object-position: center;
  flex-shrink: 0;
}

.employer-portfolio-thumb--placeholder {
  width: 2.5rem;
  height: 3.375rem;
  flex-shrink: 0;
  background: linear-gradient(
    135deg,
    rgb(var(--it-color-primary-rgb, 142 45 226) / 0.08),
    rgb(var(--it-color-primary-rgb, 142 45 226) / 0.16)
  );
}

#career-portfolio-poster-preview {
  width: auto;
  max-height: 10rem;
  height: auto;
}

#career-portfolio-poster-preview-placeholder {
  width: 7rem;
  height: 10rem;
}

.career-portfolio-poster-btn {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.career-portfolio-poster-btn:hover .employer-portfolio-thumb,
.career-portfolio-poster-btn:focus-visible .employer-portfolio-thumb {
  box-shadow: 0 0 0 2px rgb(var(--it-color-primary-rgb, 142 45 226) / 0.35);
}

.career-portfolio-visibility-edit {
  cursor: pointer;
}

.career-portfolio-embargo-badge .material-symbols-rounded {
  font-size: 0.875rem;
  line-height: 1;
}

.employer-portfolio-blocks {
  gap: 1.25rem;
}

.employer-portfolio-faits__subtitle,
.employer-portfolio-experiences__subtitle {
  margin: 0;
}

.employer-portfolio-faits__list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.employer-portfolio-faits__item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--it-color-accent200, #ddd6fe);
  background: linear-gradient(
    135deg,
    var(--it-color-white, #fff) 0%,
    var(--it-color-accent50, #f5f3ff) 100%
  );
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

.employer-portfolio-faits__bullet {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  margin-top: 0.0625rem;
  border-radius: 9999px;
  background-color: var(--it-color-accent100, #ede9fe);
  color: var(--it-color-accent600, #7b22c7);
}

.employer-portfolio-faits__text {
  flex: 1 1 auto;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--it-color-text, #1f2937);
}

.employer-portfolio-faits__empty {
  margin-top: 0.25rem;
}

.employer-showcase-links__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.375rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 768px) {
  .employer-showcase-links__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.employer-showcase-links__item {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--it-color-text, #374151);
}

.employer-showcase-links__label {
  font-weight: 600;
}

.employer-showcase-links__sep {
  color: var(--it-color-text-muted, #6b7280);
}

.employer-showcase-links__url {
  color: var(--it-color-primary, #8e2de2);
  word-break: break-all;
  text-decoration: none;
}

.employer-showcase-links__url:hover {
  text-decoration: underline;
}

.employer-showcase-links__url:focus-visible {
  outline: 2px solid var(--it-color-primary, #8e2de2);
  outline-offset: 2px;
  border-radius: 0.25rem;
}

.employer-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2.5rem 1.5rem;
  border: 1px dashed var(--it-color-accent200, #ddd6fe);
  border-radius: 0.75rem;
  background: linear-gradient(
    180deg,
    var(--it-color-white, #fff) 0%,
    var(--it-color-accent50, #f5f3ff) 100%
  );
}

.employer-empty-state--compact {
  padding: 1.75rem 1.25rem;
}

.employer-empty-state__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 0.75rem;
  border-radius: 9999px;
  background-color: var(--it-color-accent50, #f5f3ff);
  color: var(--it-color-accent600, #7b22c7);
  border: 1px solid var(--it-color-accent200, #ddd6fe);
}

.employer-empty-state__title {
  margin: 0;
  font-family: var(--it-font-display, Montserrat), system-ui, sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--it-color-text, #1f2937);
}

.employer-empty-state__text {
  margin: 0.375rem 0 0;
  max-width: 22rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--it-color-text-light, #6b7280);
}

/* Override generic .calendar-week-view height:600px — fill agenda card next to stats tiles */
.dashboard-page #custom-calendar > .calendar-week-view {
  /* Must match dashboard.html scroll anchor (DAY_START_HOUR / DAY_END_HOUR). */
  --cal-default-view-start-hour: 8;
  --cal-default-view-end-hour: 20;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  max-height: none;
}

.dashboard-page .calendar-week-body {
  flex: 1 1 auto;
  min-height: 0;
  /* Viewport ≈ 08h00–20h00; full 0h–24h remains inside this scroll area */
  max-height: calc(
    (var(--cal-default-view-end-hour) - var(--cal-default-view-start-hour)) *
      var(--cal-slot-height, 50px)
  );
  /* Let syncScrollableHeaderPadding measure a real scrollbar width (stable gutter → 0px). */
  scrollbar-gutter: auto;
}

/* Vue semaine : ne pas étirer la carte sur toute la hauteur de la colonne stats */
.dashboard-page article.card-hover:has(#calendar-week-view:not(.hidden)) {
  flex: 0 1 auto;
}

.dashboard-page article.card-hover:has(#calendar-week-view:not(.hidden)) > #custom-calendar {
  flex: 0 1 auto;
}

.dashboard-page #custom-calendar:has(#calendar-week-view:not(.hidden)) > .calendar-week-view {
  flex: 0 1 auto;
}

.dashboard-page #custom-calendar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

/* Agenda card: calendar fills remaining column height below the toolbar */
.dashboard-page article.card-hover > #custom-calendar {
  flex: 1 1 auto;
  min-height: 0;
}

/* Override generic .calendar-month-view min-height:500px — fill agenda card */
.dashboard-page #custom-calendar > .calendar-month-view {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

/*
 * Tailwind ``hidden`` must beat ``#custom-calendar > .calendar-month-view`` (display:flex).
 */
.dashboard-page #custom-calendar > .calendar-month-view.hidden,
.dashboard-page #custom-calendar > .calendar-week-view.hidden {
  display: none !important;
}

/* Dashboard calendar widget: lighter chrome inspired by Google Calendar (light theme). */
.dashboard-page #custom-calendar {
  border-color: #dadce0;
  background: #fff;
}

.dashboard-page .calendar-week-header,
.dashboard-page .calendar-month-header {
  background-color: #fff;
  border-bottom-color: #dadce0;
}

/* Dashboard calendar: header/body grids share width; JS adds header padding-right = body scrollbar. */
.dashboard-page .calendar-month-header .calendar-weekday-header,
.dashboard-page .calendar-month-body .calendar-month-grid,
.dashboard-page .calendar-week-header .calendar-days-container,
.dashboard-page .calendar-week-body .calendar-days-container {
  box-sizing: border-box;
  width: 100%;
}

.dashboard-page .calendar-month-header,
.dashboard-page .calendar-week-header {
  box-sizing: border-box;
}

.dashboard-page .calendar-day-header {
  border-right-color: #dadce0;
  background-color: #fff;
}

.dashboard-page .calendar-day-header .day-name {
  color: #70757a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11px;
  font-weight: 600;
}

.dashboard-page .calendar-day-header .day-number {
  color: #3c4043;
  font-size: 22px;
  font-weight: 400;
}

.dashboard-page .calendar-day-header.today {
  background-color: #e8f0fe;
}

.dashboard-page .calendar-day-header.today .day-name,
.dashboard-page .calendar-day-header.today .day-number {
  color: #1967d2;
}

.dashboard-page .calendar-time-column {
  border-right-color: #dadce0;
  background-color: #fff;
}

.dashboard-page .calendar-time-slot {
  border-top-color: #e8eaed;
  color: #70757a;
  font-size: 11px;
}

.dashboard-page .calendar-day-column {
  border-right-color: #dadce0;
}

.dashboard-page .calendar-day-slot {
  border-top-color: #e8eaed;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 11.5px,
    rgba(60, 64, 67, 0.06) 11.5px,
    rgba(60, 64, 67, 0.06) 12.5px
  );
}

.dashboard-page .calendar-month-day {
  border-right-color: #dadce0;
  border-bottom-color: #dadce0;
  overflow: visible;
  min-height: 0;
}

/* Month grid: row height follows the tallest day so every event row can be shown (no clipping). */
.dashboard-page #custom-calendar .calendar-month-grid {
  grid-auto-rows: minmax(100px, auto);
}

.dashboard-page #custom-calendar .calendar-month-events {
  overflow: visible;
}

.dashboard-page .calendar-month-day.other-month {
  background-color: #f8f9fa;
}

.dashboard-page .calendar-month-day.today {
  background-color: #e8f0fe;
}

.dashboard-page .calendar-month-day.today .calendar-month-day-number {
  color: #1967d2;
}

.dashboard-page .calendar-weekday {
  border-right-color: #dadce0;
  color: #70757a;
}

.dashboard-page .calendar-month-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  /* Let syncScrollableHeaderPadding measure a real scrollbar width (stable gutter → 0px). */
  scrollbar-gutter: auto;
}

.calendar-week-header {
  display: flex;
  border-bottom: 2px solid #e5e7eb;
  background-color: #f9fafb;
  position: relative;
  /* Account for scrollbar width to keep alignment */
  /* padding-right will be set dynamically by JavaScript to match scrollbar width */
  box-sizing: border-box;
}

.calendar-time-column {
  width: 60px;
  flex-shrink: 0;
  border-right: 1px solid #e5e7eb;
}

.calendar-days-container {
  flex: 1;
  display: flex;
  min-width: 0; /* Prevent flex overflow */
}

.calendar-day-header {
  flex: 1;
  padding: 12px 8px;
  text-align: center;
  border-right: 1px solid #e5e7eb;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
}

.calendar-day-header.today {
  background-color: var(--it-color-accent100);
  color: var(--it-color-ft-ring-worked);
}

.calendar-day-header .day-name {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 4px;
}

.calendar-day-header .day-number {
  display: block;
  font-size: 16px;
  font-weight: 700;
}

.calendar-week-body {
  display: flex;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

/* Fix alignment: ensure header and body have same width calculation */
.calendar-week-view {
  display: flex;
  flex-direction: column;
  position: relative;
}

.calendar-week-header .calendar-days-container,
.calendar-week-body .calendar-days-container {
  width: 100%;
  box-sizing: border-box;
}

.calendar-time-slots {
  width: 60px;
  padding: 0 8px;
}

.calendar-time-slot {
  height: var(--cal-slot-height, 50px);
  min-height: var(--cal-slot-height, 50px);
  border-top: 1px solid #d1d5db;
  font-size: 11px;
  color: #6b7280;
  padding-top: 4px;
  text-align: right;
  box-sizing: border-box;
  margin: 0;
}

.calendar-day-columns {
  flex: 1;
  display: flex;
  position: relative;
}

.calendar-day-column {
  flex: 1;
  border-right: 1px solid #e5e7eb;
  position: relative;
  /* Full day height must match 24 × slot (scroll container clips; events use absolute Y) */
  min-height: calc(var(--cal-hours-count, 24) * var(--cal-slot-height, 50px));
  height: auto;
  overflow: visible;
  box-sizing: border-box;
}

.calendar-day-slot {
  height: var(--cal-slot-height, 50px);
  min-height: var(--cal-slot-height, 50px);
  max-height: var(--cal-slot-height, 50px);
  border-top: 1px solid #d1d5db;
  /* Quarter-hour guides (50px hour row → 12.5px step; matches SLOT_HEIGHT_PX in dashboard) */
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 11.5px,
    rgba(209, 213, 219, 0.55) 11.5px,
    rgba(209, 213, 219, 0.55) 12.5px
  );
  position: relative;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Busy layers under Google events (dashboard week view — pro / hold / overlay freebusy). */
.calendar-day-layer {
  position: absolute;
  left: 2px;
  right: 2px;
  border-radius: 4px;
  pointer-events: none;
  z-index: 2;
  opacity: 0.38;
  box-sizing: border-box;
  overflow: hidden;
}

.calendar-day-layer--pro {
  background: #7c3aed;
}

.calendar-day-layer--hold {
  background: #059669;
}

.calendar-day-layer--other {
  background: #9ca3af;
}

/* Google overlay colors: rgba is set inline; avoid double-fading with base layer opacity. */
.calendar-day-layer.calendar-day-layer--other-api {
  opacity: 1;
}

.calendar-day-layer-label {
  position: absolute;
  left: 4px;
  right: 4px;
  top: 2px;
  z-index: 1;
  max-width: calc(100% - 8px);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  color: #111827;
  text-shadow: 0 0 4px #fff, 0 0 8px #fff, 0 1px 0 #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.calendar-event {
  position: absolute;
  left: 2px;
  right: 2px;
  background: linear-gradient(135deg, var(--it-color-primary) 0%, var(--it-color-primary-dark) 100%);
  color: white;
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  overflow: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  z-index: 10;
  transition: all 0.2s ease;
  max-width: calc(100% - 4px);
  box-sizing: border-box;
  user-select: none;
}

.calendar-event:hover {
  z-index: 20;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.calendar-event.dragging {
  opacity: 0.9;
  cursor: grabbing;
  z-index: 40;
}

.calendar-event.resizing {
  opacity: 0.95;
  z-index: 40;
}

.calendar-event-resize-handle {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 45;
}

.calendar-event-resize-handle--top {
  top: 0;
  height: 8px;
  cursor: ns-resize;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0));
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
}

.calendar-event-resize-handle--bottom {
  bottom: 0;
  height: 8px;
  cursor: ns-resize;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0));
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
}

.calendar-event-time {
  font-size: 9px;
  opacity: 0.9;
  margin-bottom: 2px;
  line-height: 1.1;
}

.calendar-event-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1.2;
  width: 100%;
  box-sizing: border-box;
  padding-top: 6px;
  padding-bottom: 8px;
}

/* Employer public week: same week grid as dashboard; blocks are read-only (no drag). */
.calendar-event--employer-busy {
  cursor: default;
  pointer-events: none;
  z-index: 5;
}

.calendar-event--employer-interactive,
.employer-calendar-interactive {
  pointer-events: auto;
  cursor: pointer;
}

.employer-event--slot_request {
  background: #d97706 !important;
  border-color: #b45309 !important;
}

.employer-slot-request--pending {
  opacity: 0.5;
}

.calendar-event--employer-busy:hover {
  transform: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Access-level coloring for employer week view events */
.employer-event--own {
  background: #059669 !important;
  border-color: #047857 !important;
  pointer-events: auto;
}

.employer-event--same_company {
  background: #3b82f6 !important;
  border-color: #2563eb !important;
}

.employer-event--foreign {
  background: #7c3aed !important;
  border-color: #6d28d9 !important;
}

.employer-event--unavailability {
  background: #f43f5e !important;
  border-color: #e11d48 !important;
}

.employer-event--foreign-option {
  background: #8B4513 !important;
  border-color: #723710 !important;
}

.calendar-event-content--employer-compact {
  padding-top: 2px;
  padding-bottom: 2px;
  gap: 0;
}

.calendar-event-employer {
  font-weight: 600;
  font-size: 10px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  line-height: 1.2;
  max-width: 100%;
}

.calendar-event-title {
  font-weight: 500;
  font-size: 9px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  opacity: 0.95;
  line-height: 1.2;
  max-width: 100%;
}

.calendar-event-location {
  font-weight: 400;
  font-size: 8px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  opacity: 0.85;
  line-height: 1.2;
  max-width: 100%;
}

/* Month View */
.calendar-month-view {
  min-height: 500px;
}

.calendar-month-header {
  border-bottom: 2px solid #e5e7eb;
  background-color: #f9fafb;
}

.calendar-weekday-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid #e5e7eb;
}

.calendar-weekday {
  padding: 12px 8px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: #6b7280;
  border-right: 1px solid #e5e7eb;
}

.calendar-weekday:last-child {
  border-right: none;
}

.calendar-month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: 100px;
}

.calendar-month-day {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border-right: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  padding: 4px;
  min-height: 100px;
  position: relative;
  background-color: white;
  overflow: hidden;
}

.calendar-month-day.other-month {
  background-color: #f9fafb;
  color: #9ca3af;
}

.calendar-month-day.today {
  background-color: #fef3c7;
}

.calendar-month-day-number {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 2px;
}

.calendar-month-day.today .calendar-month-day-number {
  color: var(--it-color-ft-ring-worked);
  font-weight: 700;
}

.calendar-month-day.other-month .calendar-month-day-number {
  color: #9ca3af;
}

.calendar-month-events {
  position: relative;
  flex: 1 1 auto;
  min-height: 2.5rem;
  width: 100%;
  overflow: hidden;
}

.calendar-month-event {
  font-size: 10px;
  cursor: pointer;
  overflow: hidden;
  box-sizing: border-box;
  max-width: 100%;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  width: auto;
}

/* Pill chrome only — month agenda rows use ``--gcal-list`` (dot + title, no band) */
.calendar-month-event:not(.calendar-month-event--gcal-list) {
  background: linear-gradient(
    145deg,
    var(--it-color-accent50) 0%,
    var(--it-color-accent100) 55%,
    var(--it-color-accent200) 100%
  );
  color: var(--it-color-text);
  border: 1px solid rgb(var(--it-color-primary-rgb) / 0.2);
  border-radius: 4px;
  padding: 2px 5px 2px 4px;
}

.calendar-month-event-summary {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
  min-width: 0;
  height: 100%;
}

.calendar-month-event-dot {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  margin-top: 4px;
  border-radius: 9999px;
  background-color: var(--it-color-primary-dark);
  box-shadow: 0 0 0 1px rgb(var(--it-color-white-rgb) / 0.85);
}

.calendar-month-event-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  line-height: 1.15;
}

.calendar-month-event-times {
  font-size: 10px;
  font-weight: 600;
  color: var(--it-color-primary-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-month-event-employer {
  font-size: 9px;
  font-weight: 600;
  color: var(--it-color-accent600);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Plain text chips (e.g. employer availability month view) */
.calendar-month-event--plain {
  display: flex;
  align-items: center;
  gap: 6px;
}

.calendar-month-event-plain-text {
  flex: 1;
  min-width: 0;
  font-size: 9px;
  font-weight: 600;
  color: var(--it-color-primary-dark);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-month-event--plain .calendar-month-event-dot {
  margin-top: 0;
}

/* Pro availability owner view: layered chips (pro / hold / other calendars) */
.calendar-month-event--layer-pro {
  background: linear-gradient(145deg, #ede9fe 0%, #ddd6fe 55%, #c4b5fd 100%);
  border-color: rgba(91, 33, 182, 0.35);
  z-index: 3;
}
.calendar-month-event--layer-pro .calendar-month-event-dot {
  background-color: #5b21b2;
}
.calendar-month-event--layer-hold {
  background: linear-gradient(145deg, #d1fae5 0%, #a7f3d0 55%, #6ee7b7 100%);
  border-color: rgba(5, 122, 85, 0.35);
  z-index: 2;
}
.calendar-month-event--layer-hold .calendar-month-event-dot {
  background-color: #047857;
}
.calendar-month-event--layer-other {
  opacity: 0.55;
  background: linear-gradient(145deg, #f3f4f6 0%, #e5e7eb 60%, #d1d5db 100%);
  border-color: #9ca3af;
  z-index: 1;
}
.calendar-month-event--layer-other .calendar-month-event-dot {
  background-color: #6b7280;
}

/* Legacy class names kept for any cached HTML; map to new layout */
.calendar-month-event-time {
  font-size: 10px;
  font-weight: 600;
  color: var(--it-color-primary-dark);
}

.calendar-month-event-label {
  font-size: 9px;
  font-weight: 600;
  color: var(--it-color-accent600);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-month-event.resizing,
.calendar-month-event.dragging {
  opacity: 0.95;
  z-index: 40;
  cursor: ns-resize;
}

.calendar-month-event:not(.calendar-month-event--gcal-list):hover {
  background: linear-gradient(
    145deg,
    var(--it-color-accent100) 0%,
    var(--it-color-accent200) 50%,
    rgb(var(--it-color-accent200-rgb) / 0.92) 100%
  );
  border-color: rgb(var(--it-color-primary-rgb) / 0.35);
  box-shadow: 0 2px 10px rgb(var(--it-color-primary-dark-rgb) / 0.12);
}

.calendar-month-event--overflow {
  background: #6b7280 !important;
  color: var(--it-color-white) !important;
  border-color: #4b5563 !important;
}

.calendar-month-event--overflow:hover {
  background: #575e6a !important;
  border-color: #374151 !important;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);
}

/* Responsive */
@media (max-width: 768px) {
  .calendar-week-view {
    height: 400px;
  }
  
  .calendar-time-column {
    width: 45px;
  }
  
  .calendar-time-slot {
    height: 50px;
    font-size: 9px;
    padding-top: 2px;
  }
  
  .calendar-day-slot {
    height: 50px;
  }
  
  .calendar-event {
    font-size: 9px;
    padding: 3px 5px;
  }
  
  .calendar-event-time {
    font-size: 8px;
  }
  
  .calendar-event-employer {
    font-size: 9px;
  }
  
  .calendar-event-title {
    font-size: 8px;
  }
  
  .calendar-event-location {
    font-size: 7px;
  }
  
  .calendar-day-header {
    padding: 8px 4px;
    font-size: 11px;
  }
  
  .calendar-day-header .day-name {
    font-size: 9px;
  }
  
  .calendar-day-header .day-number {
    font-size: 14px;
  }
  
  .calendar-month-day {
    min-height: 70px;
    padding: 4px;
  }
  
  .calendar-month-day-number {
    font-size: 11px;
  }
  
  .calendar-month-event:not(.calendar-month-event--gcal-list) {
    font-size: 9px;
    padding: 2px 4px;
  }

  .calendar-month-event-times {
    font-size: 9px;
  }

  .calendar-month-event-employer {
    font-size: 8px;
  }

  .calendar-month-event--gcal-list .calendar-month-event-gcal-title {
    font-size: 10px;
  }

  .calendar-month-event--gcal-list[class*="employer-event--"] .calendar-month-event-gcal-time,
  .calendar-month-event--gcal-list[class*="employer-event--"] .calendar-month-event-gcal-title {
    font-size: 10px;
  }

  .calendar-month-event--gcal-list .calendar-month-event-gcal-dot {
    width: 5px;
    height: 5px;
  }

  .dashboard-page #custom-calendar .calendar-event--gcal-week .calendar-event-time {
    font-size: 9px;
  }
  
  .dashboard-page .calendar-toolbar-today-btn {
    font-size: 0.75rem;
    padding: 0.3125rem 0.5rem;
  }

  .dashboard-page .calendar-view-segment {
    min-width: 2.75rem;
    padding: 0.3125rem 0.5625rem;
    font-size: 0.625rem;
  }

  .dashboard-page .calendar-view-segment-check {
    width: 0.75rem;
    height: 0.75rem;
  }
}

/* Dashboard calendar toolbar — Material 3 parity with Flutter SegmentedButton */
.dashboard-page .calendar-toolbar {
  min-height: 2.25rem;
}

.dashboard-page .calendar-toolbar-nav {
  gap: 0.125rem;
}

.dashboard-page .calendar-toolbar-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: 9999px;
  background: transparent;
  color: var(--it-color-text-light, #6b7280);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.dashboard-page .calendar-toolbar-nav-btn:hover {
  background-color: var(--it-color-accent50, #f5f3ff);
  color: var(--it-color-accent600, #7b22c7);
}

.dashboard-page .calendar-toolbar-nav-icon {
  width: 1.125rem;
  height: 1.125rem;
}

.dashboard-page .calendar-toolbar-today-btn {
  border: none;
  background: transparent;
  padding: 0.375rem 0.625rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--it-color-accent600, #7b22c7);
  border-radius: 9999px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.dashboard-page .calendar-toolbar-today-btn:hover {
  background-color: var(--it-color-accent50, #f5f3ff);
  color: var(--it-color-primary, #8e2de2);
}

.dashboard-page .calendar-view-segmented {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 0.25rem;
  padding: 0.1875rem;
  border: 1px solid var(--it-color-border-muted, #d1d5db);
  border-radius: 9999px;
  background-color: #fff;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.05);
}

.dashboard-page .calendar-view-segment {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-width: 3.25rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid transparent;
  border-radius: 9999px;
  background: transparent;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: var(--it-color-text-light, #6b7280);
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.dashboard-page .calendar-view-segment-label {
  white-space: nowrap;
}

.dashboard-page .calendar-view-segment-check {
  display: none;
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
}

.dashboard-page .calendar-view-segment:not(.is-active):hover {
  background-color: var(--it-color-accent50, #f5f3ff);
  color: var(--it-color-text, #1f2937);
}

.dashboard-page .calendar-view-segment.is-active {
  background-color: var(--it-color-accent50, #f5f3ff);
  border-color: var(--it-color-accent200, #ddd6fe);
  color: var(--it-color-accent600, #7b22c7);
  box-shadow: 0 1px 2px rgba(123, 34, 199, 0.12);
}

.dashboard-page .calendar-view-segment.is-active .calendar-view-segment-check {
  display: block;
}

.dashboard-page .calendar-view-segment:focus-visible {
  outline: 2px solid var(--it-color-primary, #8e2de2);
  outline-offset: 1px;
}

/* Dashboard: calmer calendar chrome inside white card */
.dashboard-page .calendar-week-header {
  background-color: #fafafa;
  border-bottom-color: #e5e7eb;
}

/* Dashboard: slightly tighter week-day headers than default calendar (still readable) */
.dashboard-page .calendar-week-header .calendar-day-header {
  padding: 6px 5px;
}

.dashboard-page .calendar-day-header .day-name {
  margin-bottom: 2px;
  font-size: 10px;
}

.dashboard-page .calendar-day-header .day-number {
  font-size: 13px;
  line-height: 1.15;
}

.dashboard-page #custom-calendar {
  background-color: #fff;
}

/* Month view (Google list): dot + title — global so it does not inherit pill gradient */
.calendar-month-event--gcal-list {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  border-radius: 2px;
  padding: 0 2px 0 0;
  background-image: none !important;
  box-shadow: none !important;
  font-weight: 500;
  line-height: 1.15;
  color: #3c4043;
}

.calendar-month-event--gcal-list:not([class*="employer-event--"]) {
  background: transparent !important;
  border: none !important;
}

.calendar-month-event--gcal-list:not([class*="employer-event--"]):hover {
  background-color: #f1f3f4 !important;
  box-shadow: none !important;
  border: none !important;
}

.calendar-month-event--gcal-list[class*="employer-event--"]:hover {
  filter: brightness(0.95);
}

.calendar-month-event--gcal-list .calendar-month-event-gcal {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  min-width: 0;
  width: 100%;
}

.calendar-month-event--gcal-list .calendar-month-event-gcal-dot {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background-color: #9aa0a6;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.9);
}

.calendar-month-event--gcal-list .calendar-month-event-gcal-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  color: #3c4043;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Employer month view: larger title + access-colored pill (legend parity) */
.calendar-month-event--gcal-list[class*="employer-event--"] {
  align-items: center;
  border-width: 1px;
  border-style: solid;
}

.calendar-month-event--gcal-list[class*="employer-event--"]:hover {
  background-color: inherit;
}

.calendar-month-event--gcal-list[class*="employer-event--"] .calendar-month-event-gcal {
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.calendar-month-event--gcal-list[class*="employer-event--"] .calendar-month-event-gcal-dot {
  display: none;
}

.calendar-month-event--gcal-list[class*="employer-event--"] {
  padding: 2px 7px;
  border-radius: 9999px;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.35);
}

.calendar-month-event--gcal-list[class*="employer-event--"] .calendar-month-event-gcal-time {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  color: #ffffff;
  white-space: nowrap;
}

.calendar-month-event--gcal-list[class*="employer-event--"] .calendar-month-event-gcal-title {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
  border-radius: 0;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: transparent;
  box-shadow: none;
}

/* Week grid: flatter blocks closer to Google Calendar time grid */
.dashboard-page #custom-calendar .calendar-event--gcal-week {
  border-radius: 2px;
  border: 1px solid rgba(32, 33, 36, 0.12);
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.22);
  padding: 2px 5px 3px 6px;
}

.dashboard-page #custom-calendar .calendar-event--gcal-week:hover {
  transform: none;
  box-shadow: 0 1px 3px rgba(60, 64, 67, 0.32);
  z-index: 25;
}

.dashboard-page #custom-calendar .calendar-event--gcal-week .calendar-event-content {
  padding-top: 4px;
  padding-bottom: 6px;
  gap: 2px;
}

.dashboard-page #custom-calendar .calendar-event--gcal-week .calendar-event-time {
  margin-bottom: 0;
  font-size: 10px;
  font-weight: 600;
  opacity: 1;
}

.dashboard-page #custom-calendar .calendar-event--gcal-week .calendar-event-resize-handle--top {
  border-top-left-radius: 2px;
  border-top-right-radius: 2px;
}

.dashboard-page #custom-calendar .calendar-event--gcal-week .calendar-event-resize-handle--bottom {
  border-bottom-left-radius: 2px;
  border-bottom-right-radius: 2px;
}

/* Profile page - readonly fields */
.tile-field[readonly] {
  background-color: #f3f4f6 !important;
  cursor: not-allowed;
}

.tile-field.tile-readonly {
  pointer-events: none;
  opacity: 0.6;
  cursor: not-allowed;
}

/* Event form — clickable history combobox (modal + full page) */
.it-combobox {
  position: relative;
}

.it-combobox-field {
  display: flex;
  align-items: stretch;
  gap: 0.25rem;
}

.it-combobox-input {
  flex: 1 1 auto;
  min-width: 0;
}

.it-combobox-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  background: #fff;
  color: #4b5563;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.it-combobox-toggle:hover,
.it-combobox-toggle:focus {
  border-color: var(--it-color-accent-500, #14b8a6);
  color: var(--it-color-accent-700, #0f766e);
  outline: none;
}

.it-combobox-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.25rem);
  z-index: 80;
  max-height: 12rem;
  overflow-y: auto;
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  background: #fff;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
}

.it-combobox-option {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: #1f2937;
  cursor: pointer;
}

.it-combobox-option:hover,
.it-combobox-option:focus {
  background: #f0fdfa;
  color: #0f766e;
}

/* Event form — recurrence multi-date mini-calendar (brand violet selection) */
.it-recurrence-cal .day-cell {
  color: var(--it-color-text, #1f2937);
  background-color: var(--it-color-white, #fff);
  font-weight: 500;
}

.it-recurrence-cal .day-cell:hover {
  background-color: var(--it-color-accent50, #f5f3ff);
}

.it-recurrence-cal button.day-cell--selected {
  background-color: var(--it-color-primary, #8e2de2) !important;
  color: var(--it-color-white, #fff) !important;
  font-weight: 600;
  box-shadow: 0 1px 2px rgb(74 0 224 / 0.25);
}

.it-recurrence-cal button.day-cell--selected:hover {
  background-color: var(--it-color-accent600, #7b22c7) !important;
}

.it-recurrence-cal .day-cell:focus-visible {
  outline: 2px solid var(--it-color-primary, #8e2de2);
  outline-offset: 2px;
}

.it-recurrence-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  line-height: 1.25;
  background-color: var(--it-color-accent100, #ede9fe);
  color: var(--it-color-primary-dark, #4a00e0);
}

.it-recurrence-chip-remove {
  border: none;
  background: transparent;
  padding: 0;
  line-height: 1;
  cursor: pointer;
  color: var(--it-color-accent600, #7b22c7);
}

.it-recurrence-chip-remove:hover {
  color: var(--it-color-primary-dark, #4a00e0);
}

.it-recurrence-chip-remove:focus-visible {
  outline: 2px solid var(--it-color-primary, #8e2de2);
  outline-offset: 1px;
  border-radius: 2px;
}
