:root {
  --rh-primary: #0f766e;
  --rh-primary-dark: #0d5c56;
  --rh-primary-light: #14b8a6;
  --rh-bg: #f0fdfa;
  --planning-present: #f0abcc;
  --planning-present-text: #9d174d;
  --rh-surface: #ffffff;
  --rh-border: #ccfbf1;
  --rh-text: #134e4a;
  --rh-muted: #64748b;
  --rh-danger: #dc2626;
  --rh-sidebar: #042f2e;
  --rh-sidebar-text: #ccfbf1;
  --rh-radius: 12px;
  --rh-shadow: 0 4px 24px rgba(15, 118, 110, 0.08);
  --rh-surface-soft: #ecfdf5;
  --rh-bubble-mine: #ccfbf1;
  --rh-sidebar-muted: #99f6e4;
  --rh-sidebar-highlight: #5eead4;
  --sidebar-width: 15.5rem;
  --font: "Barlow", "Segoe UI", system-ui, sans-serif;
  --font-display: "Barlow Condensed", "Barlow", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--rh-text);
  background: var(--rh-bg);
  line-height: 1.5;
}

a { color: var(--rh-primary); }

.auth-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: linear-gradient(145deg, var(--rh-sidebar) 0%, var(--rh-primary) 45%, var(--rh-primary-light) 100%);
}

.auth-content {
  width: 100%;
  max-width: 26rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.app-shell {
  min-height: 100vh;
  display: flex;
}

.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--rh-sidebar);
  color: var(--rh-sidebar-text);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  flex-shrink: 0;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: 1rem .85rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(255,255,255,.95);
  padding: 4px;
  flex-shrink: 0;
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.sidebar-brand-text strong {
  display: block;
  font-family: var(--font-display);
  font-size: .92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-brand-text span {
  display: block;
  font-size: .72rem;
  font-weight: 500;
  color: var(--rh-sidebar-muted);
  opacity: .9;
}

.auth-brand-block {
  text-align: center;
  margin-bottom: 1rem;
}

.auth-brand-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 16px;
  background: #fff;
  padding: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
}

.auth-brand-text {
  margin-top: .75rem;
  color: var(--rh-sidebar-text);
  font-weight: 700;
  font-size: 1.1rem;
}

.brand-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-preview-logo {
  width: 96px;
  height: 96px;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid var(--rh-border);
  background: #fff;
  padding: 8px;
}

.sidebar-account-hint {
  margin: .35rem 0 0;
  color: var(--rh-sidebar-muted);
  opacity: .85;
}

.sidebar-super-tools {
  padding: 0 .65rem .65rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-super-tools label {
  display: block;
  margin-bottom: .35rem;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--rh-sidebar-highlight);
}

.sidebar-super-tools select {
  width: 100%;
  padding: .55rem .65rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.95);
  color: var(--rh-text);
  font: inherit;
  font-size: .82rem;
}

.sidebar-nav {
  flex: 1;
  padding: .75rem .65rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
  overflow-y: auto;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .65rem .85rem;
  border-radius: 10px;
  color: var(--rh-sidebar-muted);
  text-decoration: none;
  font-size: .92rem;
}

.sidebar-nav a .nav-label {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
}

.sidebar-nav a .nav-badge,
.sidebar-nav a .badge {
  margin-left: 0;
  flex-shrink: 0;
}

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
  opacity: .92;
}

.nav-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.sidebar-nav a:hover .nav-icon,
.sidebar-nav a.active .nav-icon {
  opacity: 1;
}

.sidebar-account-nav,
.sidebar-account-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}

.sidebar-account-nav .nav-icon,
.sidebar-account-link .nav-icon {
  width: 1rem;
  height: 1rem;
}

.sidebar-notif-toggle {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  width: 100%;
}

.sidebar-notif-toggle .nav-icon {
  width: 1.1rem;
  height: 1.1rem;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: rgba(255,255,255,.1);
  color: #fff;
}

.sidebar-section {
  margin: .85rem .85rem .25rem;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--rh-sidebar-highlight);
  opacity: .75;
}

.sidebar-foot {
  padding: 1rem;
  border-top: 1px solid rgba(255,255,255,.08);
}

.sidebar-account {
  position: relative;
  padding: .65rem .65rem 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-account-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem .85rem;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  background: rgba(255,255,255,.08);
  color: var(--rh-sidebar-text);
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.sidebar-account-label {
  flex: 1;
  min-width: 0;
}

.sidebar-account-label strong {
  display: block;
  color: #fff;
  font-size: .88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-account-label span {
  display: block;
  color: var(--rh-sidebar-muted);
  font-size: .74rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-account-chevron {
  color: var(--rh-sidebar-highlight);
  font-size: .85rem;
  transition: transform .2s ease;
}

.sidebar-account.open .sidebar-account-chevron {
  transform: rotate(180deg);
}

.sidebar-account-menu {
  display: none;
  margin-top: .45rem;
  padding: .65rem;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  background: rgba(0,0,0,.18);
}

.sidebar-account.open .sidebar-account-menu {
  display: block;
}

.sidebar-account-head {
  padding-bottom: .65rem;
  margin-bottom: .65rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.sidebar-account-head strong {
  display: block;
  color: #fff;
  font-size: .9rem;
}

.sidebar-account-head .small {
  display: block;
  color: var(--rh-sidebar-muted);
  margin-top: .15rem;
}

.sidebar-account-meta {
  display: block;
  margin-top: .35rem;
  font-size: .72rem;
  color: var(--rh-sidebar-highlight);
  opacity: .9;
}

.sidebar-account-form {
  margin-bottom: .65rem;
}

.sidebar-account-form label {
  display: block;
  margin-bottom: .35rem;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--rh-sidebar-highlight);
}

.sidebar-account-form select {
  width: 100%;
  padding: .5rem .65rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.95);
  color: var(--rh-text);
  font: inherit;
  font-size: .82rem;
}

.sidebar-account-section {
  margin: .15rem 0 .35rem;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--rh-sidebar-highlight);
  opacity: .85;
}

.sidebar-account-nav {
  display: block;
  padding: .45rem .15rem;
  color: var(--rh-sidebar-text);
  text-decoration: none;
  font-size: .88rem;
}

.sidebar-account-nav:hover {
  color: #fff;
}

.sidebar-account-nav.is-active {
  color: var(--rh-sidebar-highlight);
  font-weight: 600;
  cursor: default;
}

.sidebar-account-inline-form {
  margin: 0;
}

.sidebar-account-inline-form .sidebar-account-nav {
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  font: inherit;
  cursor: pointer;
  padding: .45rem .15rem;
}

.sidebar-account-link {
  display: block;
  padding: .55rem .15rem 0;
  margin-top: .35rem;
  border-top: 1px solid rgba(255,255,255,.1);
  color: #fecaca;
  text-decoration: none;
  font-size: .88rem;
}

.sidebar-account-link:hover {
  color: #fff;
}

.impersonation-banner {
  margin-bottom: 1rem;
  padding: .75rem 1rem;
  border-radius: 10px;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  color: #92400e;
  font-size: .9rem;
}

.impersonation-banner-link {
  margin-left: .35rem;
  padding: 0;
  border: 0;
  background: none;
  color: #b45309;
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.sidebar-user {
  margin-bottom: .75rem;
  font-size: .85rem;
}

.sidebar-user strong {
  display: block;
  color: #fff;
}

.sidebar-user span {
  color: var(--rh-sidebar-muted);
  font-size: .78rem;
}

.app-body {
  flex: 1;
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.mobile-topbar {
  display: none;
}

.mobile-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: rgba(255,255,255,.1);
  color: #fff;
  cursor: pointer;
}

.mobile-menu-icon,
.mobile-menu-icon::before,
.mobile-menu-icon::after {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}

.mobile-menu-icon {
  position: relative;
}

.mobile-menu-icon::before,
.mobile-menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.mobile-menu-icon::before { top: -6px; }
.mobile-menu-icon::after { top: 6px; }

.mobile-menu-toggle[aria-expanded="true"] .mobile-menu-icon {
  background: transparent;
}

.mobile-menu-toggle[aria-expanded="true"] .mobile-menu-icon::before {
  transform: translateY(6px) rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] .mobile-menu-icon::after {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-width: 0;
  flex: 1;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.mobile-topbar-brand img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255,255,255,.95);
  padding: 3px;
  flex-shrink: 0;
}

.mobile-topbar-brand span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-backdrop {
  display: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.mobile-nav-open {
  overflow: hidden;
}

.app-main {
  flex: 1;
  padding: 1.5rem 1.25rem 2rem;
}

.container { width: 100%; max-width: 1100px; }

.card {
  background: var(--rh-surface);
  border: 1px solid var(--rh-border);
  border-radius: var(--rh-radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--rh-shadow);
}

.auth-card h1 { margin-top: 0; color: var(--rh-primary-dark); }

h1, h2, h3 { color: var(--rh-primary-dark); font-family: var(--font-display); }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1rem;
}

.stat-card {
  background: linear-gradient(135deg, var(--rh-surface-soft), #fff);
  border: 1px solid var(--rh-border);
  border-radius: var(--rh-radius);
  padding: 1rem 1.25rem;
}

.stat-card strong { display: block; font-size: 1.75rem; color: var(--rh-primary); }

label {
  display: block;
  font-size: .88rem;
  font-weight: 600;
  margin-bottom: .35rem;
  color: var(--rh-primary-dark);
}

input:not([type="radio"]):not([type="checkbox"]),
select,
textarea {
  width: 100%;
  padding: .6rem .75rem;
  border: 1px solid var(--rh-border);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}

input[type="radio"],
input[type="checkbox"] {
  width: auto;
  padding: 0;
  margin: 0;
  accent-color: var(--rh-primary);
}

input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--rh-primary-light);
  border-color: var(--rh-primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: .6rem 1rem;
  border: 0;
  border-radius: 8px;
  background: var(--rh-primary);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  background: var(--rh-primary-dark);
  color: #fff;
}

.btn-secondary {
  background: var(--rh-surface-soft);
  color: var(--rh-primary-dark);
  border: 1px solid var(--rh-border);
}

.btn-secondary:hover {
  background: #fff;
  color: var(--rh-primary-dark);
  border-color: var(--rh-primary);
}

.btn-block { width: 100%; }

.btn-danger { background: var(--rh-danger); }

.btn-danger:hover {
  background: #b91c1c;
  color: #fff;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 .35rem;
  border-radius: 999px;
  background: var(--rh-danger);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1;
  margin-left: auto;
}

.nav-badge {
  margin-left: 0;
  box-shadow: 0 0 0 2px var(--rh-sidebar);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}

th, td {
  padding: .65rem .5rem;
  border-bottom: 1px solid var(--rh-border);
  text-align: left;
}

th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--rh-muted); }

.small { font-size: .85rem; color: var(--rh-muted); }

.alert {
  padding: .75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: .92rem;
}

.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: var(--rh-surface-soft); color: var(--rh-primary-dark); border: 1px solid var(--rh-border); }
.alert-info { background: var(--rh-bg); color: var(--rh-primary-dark); border: 1px solid var(--rh-border); }

.status-pill {
  display: inline-block;
  padding: .15rem .55rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  background: var(--rh-surface-soft);
  color: var(--rh-primary-dark);
}

.status-pending_manager { background: #fef3c7; color: #92400e; }
.status-pending_hr { background: #dbeafe; color: #1e40af; }
.status-approved { background: #dcfce7; color: #166534; }
.status-rejected { background: #fee2e2; color: #991b1b; }

.perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .35rem 1rem;
}

.perm-grid label {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  font-weight: 500;
  margin: 0;
}

.perm-grid input { width: auto; margin-top: .2rem; }

.chat-layout { display: grid; grid-template-columns: 280px 1fr; gap: 1rem; min-height: 28rem; }
.chat-list, .chat-panel { min-height: 24rem; }
.chat-list { padding: 0; overflow: hidden; }
.chat-list-inner { max-height: 28rem; overflow-y: auto; }
.chat-item {
  display: block;
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--rh-border);
  text-decoration: none;
  color: inherit;
}
.chat-item:hover, .chat-item.active { background: var(--rh-surface-soft); }
.chat-item strong { display: block; color: var(--rh-primary-dark); }
.chat-messages {
  max-height: 22rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  margin-bottom: 1rem;
}
.chat-bubble {
  max-width: 80%;
  padding: .65rem .85rem;
  border-radius: 12px;
  background: var(--rh-surface-soft);
}
.chat-bubble.mine { margin-left: auto; background: var(--rh-bubble-mine); }
.chat-bubble .meta { font-size: .72rem; color: var(--rh-muted); margin-bottom: .25rem; }
.chat-attachment { margin-top: .45rem; font-size: .88rem; }
.chat-attachment a { font-weight: 600; }
.chat-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: .75rem;
}
.chat-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.chat-inline-form { margin: 0; }
.chat-deleted-label {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  color: #991b1b;
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: 999px;
  padding: .15rem .55rem;
  margin-left: .35rem;
  vertical-align: middle;
}
.chat-admin-note { margin: 0 0 .75rem; color: var(--rh-muted); }

.sidebar-notif {
  padding: 0 .65rem .65rem;
  position: relative;
}
.sidebar-notif-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem .85rem;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  background: rgba(255,255,255,.06);
  color: var(--rh-sidebar-text);
  font: inherit;
  cursor: pointer;
}
.sidebar-notif-toggle .badge { margin-left: auto; }
.rh-notif-dropdown {
  display: none;
  position: absolute;
  left: .65rem;
  right: .65rem;
  bottom: calc(100% + .35rem);
  background: #fff;
  color: var(--rh-text);
  border-radius: 12px;
  box-shadow: var(--rh-shadow);
  border: 1px solid var(--rh-border);
  z-index: 200;
  max-height: 20rem;
  overflow: hidden;
}
#rh-notif-dropdown.open .rh-notif-dropdown { display: block; }
.rh-notif-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  padding: .65rem .85rem;
  border-bottom: 1px solid var(--rh-border);
  font-weight: 600;
  color: var(--rh-primary-dark);
}
.rh-notif-panel { max-height: 16rem; overflow-y: auto; }
.rh-notif-item {
  display: block;
  padding: .65rem .85rem;
  border-bottom: 1px solid var(--rh-border);
  text-decoration: none;
  color: inherit;
}
.rh-notif-item.unread { background: var(--rh-surface-soft); }
.rh-notif-item strong { display: block; color: var(--rh-primary-dark); }
#rh-toast-container {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  max-width: 22rem;
}
.rh-toast {
  background: var(--rh-sidebar);
  color: var(--rh-sidebar-text);
  padding: .75rem 1rem;
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,.2);
  animation: rhToastIn .25s ease;
}
.rh-toast strong { display: block; margin-bottom: .2rem; }
.rh-toast span { font-size: .85rem; opacity: .9; }
.rh-toast-hide { opacity: 0; transition: opacity .3s; }
@keyframes rhToastIn {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.user-actions-cell {
  white-space: nowrap;
}

.user-inline-form {
  display: inline;
  margin: 0 0 0 .5rem;
}

.btn-link {
  padding: 0;
  border: none;
  background: none;
  color: var(--rh-primary);
  font: inherit;
  font-size: .85rem;
  cursor: pointer;
  text-decoration: underline;
}

.btn-link-danger {
  color: var(--rh-danger);
}

.theme-choice {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem 0;
  cursor: pointer;
}

.theme-choice input { width: auto; margin: 0; }

.theme-swatch {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  border: 1px solid var(--rh-border);
  flex-shrink: 0;
}

.workday-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: .55rem;
}

.workday-cell {
  padding: .5rem .55rem;
  border: 1px solid var(--rh-border);
  border-radius: 8px;
  background: #fff;
}

.workday-day {
  display: block;
  font-weight: 600;
  font-size: .88rem;
  margin-bottom: .35rem;
  color: var(--rh-primary-dark);
}

.workday-select {
  width: 100%;
  margin: 0;
  font-size: .88rem;
}

.planning-schedule-periods-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}

.planning-schedule-periods-table th,
.planning-schedule-periods-table td {
  padding: .45rem .55rem;
  border-bottom: 1px solid var(--rh-border);
  text-align: left;
  vertical-align: top;
}

.planning-schedule-periods-table th {
  font-weight: 600;
  color: var(--rh-primary-dark);
}

.planning-schedule-period-form .grid-2 {
  gap: .75rem;
}

.planning-schedule-periods .btn-small {
  padding: .25rem .55rem;
  font-size: .82rem;
}

.period-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  align-items: flex-start;
}

.period-edit-details {
  display: inline-block;
}

.period-edit-details summary {
  list-style: none;
  cursor: pointer;
}

.period-edit-details summary::-webkit-details-marker {
  display: none;
}

.period-edit-form {
  margin-top: .5rem;
  padding: .65rem;
  border: 1px solid var(--rh-border);
  border-radius: 8px;
  background: #fafafa;
  min-width: 16rem;
}

.planning-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
}

.planning-export-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}
.planning-export-label {
  color: var(--rh-muted, #64748b);
}

.planning-period-tabs {
  margin-bottom: 0.15rem;
}
.planning-period-tabs .planning-tab {
  font-weight: 600;
}

.planning-table-year .planning-month-col {
  min-width: 2.4rem;
  font-size: 0.72rem;
  text-align: center;
}

.planning-table-wrap-year {
  padding: 0.75rem;
  overflow: visible;
}
.planning-table-wrap-year > .planning-year-block {
  margin-bottom: 1.5rem;
}
.planning-table-wrap-year > .planning-year-block:last-child {
  margin-bottom: 0;
}
.planning-year-block-title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--rh-primary-dark);
  font-family: var(--font-display);
}
.planning-table-wrap-quarter {
  overflow-x: auto;
}
.planning-table-year-daily {
  min-width: 720px;
}
.planning-table-year-daily .planning-day-col-compact {
  min-width: 0.95rem;
  max-width: 1.15rem;
  padding: 0.2rem 0.05rem;
  font-size: 0.62rem;
  line-height: 1;
}
.planning-year-month-row .planning-year-month-head {
  background: #fce7f3;
  color: var(--planning-present-text);
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  padding: 0.35rem 0.15rem;
}
.planning-week-row .planning-week-head {
  background: #f1f5f9;
  color: #475569;
  font-size: 0.68rem;
  font-weight: 700;
  text-align: center;
  padding: 0.2rem 0.1rem;
  line-height: 1.1;
  border-bottom: 1px solid #e2e8f0;
}
.planning-table-year-daily .planning-week-row .planning-week-head {
  font-size: 0.58rem;
  padding: 0.12rem 0.05rem;
}
.planning-table-year-daily .planning-cell {
  min-width: 0.95rem;
  max-width: 1.15rem;
  padding: 0.15rem 0.05rem;
  font-size: 0.58rem;
  line-height: 1.1;
}
.planning-year-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  margin-bottom: 0;
}
.planning-year-nav label {
  margin: 0;
  font-weight: 600;
}
.planning-year-nav select {
  width: auto;
  min-width: 14rem;
  max-width: 100%;
}

.confidential-notes-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.75rem 0 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e2e8f0;
}
.confidential-notes-tab {
  border: none;
  background: transparent;
  padding: 0.45rem 0.75rem;
  border-radius: 0.45rem 0.45rem 0 0;
  cursor: pointer;
  color: #64748b;
  font-weight: 600;
}
.confidential-notes-tab.is-active {
  color: var(--rh-primary-dark, #0f766e);
  background: #f8fafc;
  box-shadow: inset 0 -2px 0 var(--rh-primary, #0f766e);
}
.confidential-notes-body {
  padding-top: 0.75rem;
}
.confidential-notes-panel {
  display: none;
}
.confidential-notes-panel.is-active {
  display: block;
}
.confidential-notes-editor {
  min-height: 220px;
  background: #fff;
}
.confidential-notes-editor .ql-container {
  min-height: 180px;
  font-size: 0.95rem;
}
.confidential-notes-meta {
  margin: 0.5rem 0 0;
  color: #64748b;
}
.confidential-notes-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e2e8f0;
}
.confidential-notes-status.is-error {
  color: #b91c1c;
}

.planning-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}
.planning-tab {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--rh-border);
  border-radius: 6px;
  background: #fff;
  text-decoration: none;
  color: var(--rh-primary-dark);
  font-weight: 500;
  font-size: 0.9rem;
}
.planning-tab:hover {
  border-color: var(--rh-primary);
  background: var(--rh-surface, #faf8fc);
}
.planning-tab.is-active {
  background: var(--rh-primary);
  border-color: var(--rh-primary);
  color: #fff;
}
.planning-tab.is-active:hover {
  background: var(--rh-primary-dark);
  border-color: var(--rh-primary-dark);
  color: #fff;
}
.planning-view-hint { margin: 0; }

.planning-row-heading td {
  background: var(--rh-primary-dark);
  color: #fff;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 0.4rem 0.5rem;
  position: sticky;
  left: 0;
  z-index: 2;
}
.planning-row-subheading td {
  background: color-mix(in srgb, var(--rh-primary) 12%, white);
  color: var(--rh-primary-dark);
  font-weight: 600;
  font-size: 0.78rem;
  padding: 0.3rem 0.5rem 0.3rem 0.85rem;
  border-top: 1px solid var(--rh-border);
}
.planning-row-note td {
  background: #f8fafc;
  color: var(--rh-muted);
  font-style: italic;
  padding: 0.35rem 0.5rem;
}
.planning-row-coach .planning-user-col {
  font-weight: 600;
  background: #f5f0fa;
}
.planning-row-team-end td {
  border-bottom: 3px solid var(--rh-primary-dark);
}
.planning-row-team-separator td {
  padding: 0;
  height: 0;
  line-height: 0;
  border-top: none;
  border-left: none;
  border-right: none;
  border-bottom: 4px solid #374151;
  background: transparent;
}
.planning-row-member .planning-user-col {
  padding-left: 1.35rem;
  background: #fff;
}
.planning-row-member .planning-user-col::before {
  content: "↳ ";
  color: var(--rh-muted);
  font-weight: 400;
}
.planning-user-sub {
  display: block;
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--rh-muted);
  margin-top: 0.1rem;
}

.planning-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem 1.25rem;
  font-size: .85rem;
}

.planning-legend-item {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

.planning-swatch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 4px;
  font-size: .72rem;
  font-weight: 700;
  border: 1px solid rgba(0,0,0,.08);
}

.planning-swatch-present {
  background: var(--planning-present);
  border: 1px solid #e879a9;
  color: transparent;
  font-size: 0;
}

.planning-swatch-half {
  color: transparent;
  font-size: 0;
  overflow: hidden;
  background: #f8fafc;
}
.planning-swatch-half-am {
  background: linear-gradient(180deg, var(--planning-present) 0 50%, #f8fafc 50% 100%);
}
.planning-swatch-half-pm {
  background: linear-gradient(180deg, #f8fafc 0 50%, var(--planning-present) 50% 100%);
}
.planning-swatch-badge {
  border-radius: 999px;
  font-size: .58rem;
  line-height: 1;
  padding: 0 .12rem;
  width: auto;
  min-width: 1.35rem;
}
.planning-swatch-vacances { background: #8b5cf6; color: #fff; }
.planning-swatch-maladie,
.planning-swatch-certificat,
.planning-swatch-accident { background: #dc2626; color: #fff; }
.planning-swatch-visite { background: #ea580c; color: #fff; }
.planning-swatch-entretien { background: #2563eb; color: #fff; font-size: .5rem; }
.planning-swatch-divers { background: #e2e8f0; color: #64748b; }
.planning-swatch-formation { background: #be185d; color: #fff; font-size: .5rem; }
.planning-swatch-non-work-border {
  background: #f8fafc;
  box-shadow: inset 0 0 0 2px #dc2626;
  color: transparent;
  font-size: 0;
}
.planning-swatch-pending {
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.55) 0,
    rgba(255, 255, 255, 0.55) 2px,
    transparent 2px,
    transparent 5px
  );
}
.planning-cell-pending {
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.55) 0,
    rgba(255, 255, 255, 0.55) 2px,
    transparent 2px,
    transparent 5px
  );
}
.planning-swatch-off { background: #f8fafc; }

.input-uppercase {
  text-transform: uppercase;
}

.planning-table-wrap {
  overflow: auto;
}

.planning-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .78rem;
}

.planning-table th,
.planning-table td {
  border: 1px solid var(--rh-border);
  padding: .35rem;
}

.planning-user-col {
  min-width: 10rem;
  max-width: 14rem;
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 1;
  text-align: left;
  font-weight: 500;
  white-space: nowrap;
  padding-left: 0.5rem;
  padding-right: 0.65rem;
}

.planning-day-col {
  min-width: 1.8rem;
  text-align: center;
  font-weight: 600;
}

.planning-weekend-hatch {
  background-color: #eef2f7;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(100, 116, 139, 0.22) 0,
    rgba(100, 116, 139, 0.22) 1px,
    transparent 1px,
    transparent 5px
  );
}
.planning-head-weekend {
  color: #64748b;
}
.planning-head-weekend.planning-weekend-hatch {
  background-color: #eef2f7;
}
.planning-cell-weekend {
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(100, 116, 139, 0.18) 0,
    rgba(100, 116, 139, 0.18) 1px,
    transparent 1px,
    transparent 5px
  );
}

.planning-head-holiday {
  background: #dbeafe;
  color: #1d4ed8;
}

.planning-head-closure {
  background: #e0e7ff;
  color: #4338ca;
}

.planning-head-holiday.planning-weekend-hatch,
.planning-head-closure.planning-weekend-hatch {
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(100, 116, 139, 0.22) 0,
    rgba(100, 116, 139, 0.22) 1px,
    transparent 1px,
    transparent 5px
  );
}
.planning-head-holiday.planning-weekend-hatch {
  background-color: #dbeafe;
}
.planning-head-closure.planning-weekend-hatch {
  background-color: #e0e7ff;
}

.planning-cell {
  text-align: center;
  font-weight: 700;
  min-width: 1.8rem;
  position: relative;
  padding: 0.35rem;
  vertical-align: middle;
}

.planning-cell-red-border {
  background-color: #f8fafc !important;
  box-shadow: inset 0 0 0 2px #dc2626;
}

.planning-cell-has-badge {
  background-color: #f8fafc;
  padding: 0.08rem 0.12rem;
  line-height: 0;
}

.planning-cell-badge {
  vertical-align: middle;
}

.planning-cell-absence-am,
.planning-cell-absence-pm {
  padding: 0;
  vertical-align: middle;
  min-height: 1.85rem;
  line-height: 0;
  position: relative;
  background-color: #f8fafc;
  background-repeat: no-repeat;
}

.planning-cell-absence-am {
  background-image: linear-gradient(180deg, #f8fafc 0 50%, var(--planning-present) 50% 100%);
}

.planning-cell-absence-pm {
  background-image: linear-gradient(180deg, var(--planning-present) 0 50%, #f8fafc 50% 100%);
}

.planning-cell-absence-am .planning-cell-badge {
  position: absolute;
  top: 6%;
  left: 50%;
  transform: translateX(-50%);
}

.planning-cell-absence-pm .planning-cell-badge {
  position: absolute;
  bottom: 6%;
  left: 50%;
  transform: translateX(-50%);
}

.planning-cell-absence-am.planning-cell-weekend {
  background-image:
    repeating-linear-gradient(
      -45deg,
      rgba(100, 116, 139, 0.18) 0,
      rgba(100, 116, 139, 0.18) 1px,
      transparent 1px,
      transparent 5px
    ),
    linear-gradient(180deg, #f8fafc 0 50%, var(--planning-present) 50% 100%);
}

.planning-cell-absence-pm.planning-cell-weekend {
  background-image:
    repeating-linear-gradient(
      -45deg,
      rgba(100, 116, 139, 0.18) 0,
      rgba(100, 116, 139, 0.18) 1px,
      transparent 1px,
      transparent 5px
    ),
    linear-gradient(180deg, var(--planning-present) 0 50%, #f8fafc 50% 100%);
}

.planning-cell-present-am,
.planning-cell-present-pm {
  padding: 0;
  vertical-align: middle;
  min-height: 1.85rem;
  line-height: 0;
  background-color: #f8fafc;
  background-repeat: no-repeat;
}
.planning-cell-present {
  background-color: var(--planning-present);
}
.planning-cell-present-am {
  background-image: linear-gradient(180deg, var(--planning-present) 0 50%, #f8fafc 50% 100%);
}
.planning-cell-present-pm {
  background-image: linear-gradient(180deg, #f8fafc 0 50%, var(--planning-present) 50% 100%);
}
.planning-cell-present.planning-cell-weekend {
  background-color: var(--planning-present);
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(100, 116, 139, 0.18) 0,
    rgba(100, 116, 139, 0.18) 1px,
    transparent 1px,
    transparent 5px
  );
}

.planning-cell-present-am.planning-cell-weekend {
  background-color: #f8fafc;
  background-image:
    repeating-linear-gradient(
      -45deg,
      rgba(100, 116, 139, 0.18) 0,
      rgba(100, 116, 139, 0.18) 1px,
      transparent 1px,
      transparent 5px
    ),
    linear-gradient(180deg, var(--planning-present) 0 50%, #f8fafc 50% 100%);
}
.planning-cell-present-pm.planning-cell-weekend {
  background-color: #f8fafc;
  background-image:
    repeating-linear-gradient(
      -45deg,
      rgba(100, 116, 139, 0.18) 0,
      rgba(100, 116, 139, 0.18) 1px,
      transparent 1px,
      transparent 5px
    ),
    linear-gradient(180deg, #f8fafc 0 50%, var(--planning-present) 50% 100%);
}

.planning-cell-course {
  background-color: #ddd6fe;
}
.planning-cell-course.planning-cell-weekend {
  background-color: #ddd6fe;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(100, 116, 139, 0.18) 0,
    rgba(100, 116, 139, 0.18) 1px,
    transparent 1px,
    transparent 5px
  );
}
.planning-cell-course-am,
.planning-cell-course-pm {
  padding: 0;
  vertical-align: middle;
  min-height: 1.85rem;
  line-height: 0;
  background-color: #f8fafc;
  background-repeat: no-repeat;
}
.planning-cell-course-am {
  background-image: linear-gradient(180deg, #ddd6fe 0 50%, #f8fafc 50% 100%);
}
.planning-cell-course-pm {
  background-image: linear-gradient(180deg, #f8fafc 0 50%, #ddd6fe 50% 100%);
}
.planning-cell-course-am.planning-cell-weekend {
  background-color: #f8fafc;
  background-image:
    repeating-linear-gradient(
      -45deg,
      rgba(100, 116, 139, 0.18) 0,
      rgba(100, 116, 139, 0.18) 1px,
      transparent 1px,
      transparent 5px
    ),
    linear-gradient(180deg, #ddd6fe 0 50%, #f8fafc 50% 100%);
}
.planning-cell-course-pm.planning-cell-weekend {
  background-color: #f8fafc;
  background-image:
    repeating-linear-gradient(
      -45deg,
      rgba(100, 116, 139, 0.18) 0,
      rgba(100, 116, 139, 0.18) 1px,
      transparent 1px,
      transparent 5px
    ),
    linear-gradient(180deg, #f8fafc 0 50%, #ddd6fe 50% 100%);
}

.personal-data-fieldset {
  border: 1px solid var(--rh-border);
  border-radius: 8px;
  padding: 1rem 1rem 0.5rem;
  margin: 0 0 1.25rem;
}
.personal-data-fieldset legend {
  font-weight: 600;
  color: var(--rh-primary-dark);
  padding: 0 0.35rem;
}
.personal-data-sub {
  font-size: 0.95rem;
  margin: 0.75rem 0 0.35rem;
  color: var(--rh-primary-dark);
}
.personal-data-inline,
.personal-data-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  margin-bottom: 0.65rem;
}
.personal-data-checks-col label { flex: 1 1 100%; }
.personal-data-week-table {
  width: 100%;
  max-width: 22rem;
  margin-bottom: 0.75rem;
  border-collapse: collapse;
}
.personal-data-week-table th,
.personal-data-week-table td {
  border: 1px solid var(--rh-border);
  padding: 0.35rem 0.5rem;
  text-align: center;
}
.personal-data-week-table th:first-child,
.personal-data-week-table td:first-child { text-align: left; }
.personal-data-course-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.35rem;
}
.personal-data-course-table th,
.personal-data-course-table td {
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid var(--rh-border);
  vertical-align: middle;
}
.personal-data-course-table select {
  width: 100%;
  min-width: 6.5rem;
  max-width: 100%;
}
.planning-month-title {
  margin: 0.35rem 0 0.75rem;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--rh-primary-dark);
  text-transform: capitalize;
}
.personal-data-consent { display: flex; gap: 0.5rem; align-items: flex-start; margin: 0.75rem 0; }
.personal-data-consent input { width: auto; margin-top: 0.2rem; }
.personal-data-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.personal-data-dl {
  display: grid;
  grid-template-columns: minmax(8rem, 12rem) 1fr;
  gap: 0.35rem 1rem;
  margin: 0 0 1rem;
  font-size: 0.9rem;
}
.personal-data-dl dt {
  font-weight: 600;
  color: var(--rh-muted);
  margin: 0;
}
.personal-data-dl dd { margin: 0; }
.personal-data-section-title {
  font-size: 1rem;
  margin: 1rem 0 0.5rem;
  color: var(--rh-primary-dark);
}

.leave-form-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rh-border);
}

.leave-form-section.leave-fields-hidden,
.leave-form-section[hidden],
.leave-half-day-fields.leave-fields-hidden,
.leave-half-day-fields[hidden],
#leave-period-range.leave-fields-hidden,
#leave-period-range[hidden],
#leave-period-single.leave-fields-hidden,
#leave-period-single[hidden] {
  display: none !important;
}
.leave-form-section h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}
.leave-form-identity {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.5rem 1rem;
  font-size: 0.95rem;
}
.leave-form-identity dt {
  font-weight: 600;
  color: var(--rh-muted);
  margin: 0;
}
.leave-form-identity dd { margin: 0 0 0.5rem; }
.leave-duration-options label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-right: 1rem;
}
.leave-type-hint {
  font-size: 0.9rem;
  color: var(--rh-muted);
  margin: 0.5rem 0 0;
}
.leave-request-detail {
  margin: 0.25rem 0 0.5rem;
  font-size: 0.9rem;
}
.leave-request-detail summary {
  cursor: pointer;
  color: var(--rh-primary);
}
.leave-detail-grid {
  display: grid;
  gap: 0.25rem 1rem;
  margin-top: 0.5rem;
}
.leave-detail-grid div {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: 0.5rem;
}
.leave-detail-grid dt { font-weight: 600; color: var(--rh-muted); margin: 0; }
.leave-detail-grid dd { margin: 0; }
.leave-coach-justify label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-right: 1rem;
  margin-bottom: 0;
  font-weight: 500;
}
.leave-clock-oubli .grid-2 { gap: 0.75rem 1rem; }
.leave-clock-subtitle {
  margin: 1rem 0 0.5rem;
  font-size: 0.95rem;
  color: var(--rh-muted);
  font-weight: 600;
}
.leave-clock-subtitle:first-of-type { margin-top: 0; }
.leave-list-heading {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}

.doc-section { margin-bottom: 1.25rem; }
.doc-section h2 { margin-top: 0; font-size: 1.15rem; }
.doc-section-desc { margin: 0 0 0.75rem; color: var(--rh-muted); }
.doc-empty { margin: 0; color: var(--rh-muted); }
.doc-list { margin: 0; padding-left: 1.25rem; }
.doc-list li { margin-bottom: 0.35rem; }
.doc-list-file { color: var(--rh-muted); }
.doc-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}
.doc-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0;
  border: 1px solid var(--rh-border);
  border-radius: var(--rh-radius);
  background: var(--rh-surface-soft);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  overflow: hidden;
}
.doc-card strong,
.doc-card .small,
.doc-card .doc-card-file {
  padding-left: 1rem;
  padding-right: 1rem;
}
.doc-card strong { padding-top: 0.5rem; }
.doc-card .doc-card-file { padding-bottom: 1rem; }
.doc-thumb {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: top center;
  background: var(--rh-border);
  border-bottom: 1px solid var(--rh-border);
}
.doc-thumb-small {
  width: 56px;
  height: 72px;
  border-radius: 4px;
  border: 1px solid var(--rh-border);
  flex-shrink: 0;
  object-fit: cover;
}
.doc-thumb-admin {
  width: 48px;
  height: 62px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--rh-border);
  vertical-align: middle;
}
.doc-admin-thumb-cell { width: 56px; text-align: center; }
.doc-admin-thumb-fallback { color: var(--rh-muted); }
.doc-list-with-thumb { list-style: none; padding-left: 0; }
.doc-list-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.65rem;
}
.doc-list-body { flex: 1; min-width: 0; }
.doc-list-thumb-link { flex-shrink: 0; line-height: 0; }
.doc-card:hover {
  border-color: var(--rh-primary);
  box-shadow: var(--rh-shadow);
}
.doc-card-icon {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--rh-primary);
}
.doc-card-file { color: var(--rh-muted); }
.doc-card-wrap { display: flex; flex-direction: column; gap: 0.35rem; }
.doc-inline-delete { margin-top: 0.25rem; }
.doc-owner { color: var(--rh-primary); font-weight: 500; }
.doc-subheading {
  margin: 1rem 0 0.5rem;
  font-size: 1rem;
  color: var(--rh-primary-dark);
}
.doc-subheading:first-of-type { margin-top: 0; }
.entry-forms-block { margin-bottom: 1rem; }
.entry-forms-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.entry-forms-item { margin: 0; }
.entry-forms-link {
  display: block;
  padding: 0.75rem 1rem;
  border: 1px solid var(--rh-border);
  border-radius: 8px;
  background: var(--rh-surface);
  text-decoration: none;
  color: inherit;
}
.entry-forms-link:hover { border-color: var(--rh-primary); background: var(--rh-surface-alt, #f8fafc); }
.entry-forms-title { display: block; font-weight: 600; color: var(--rh-primary-dark); }
.entry-forms-hint { display: block; margin-top: 0.15rem; color: var(--rh-muted); }
.entry-forms-done { margin: 0; color: var(--rh-muted); }
.entry-forms-manage { margin-bottom: 1rem; padding: 1rem; background: var(--rh-surface-alt, #f8fafc); border: 1px dashed var(--rh-border); border-radius: 8px; }
.entry-forms-manage-picker { margin-bottom: 0.75rem; max-width: 320px; }
.entry-forms-manage-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.entry-forms-manage-table th,
.entry-forms-manage-table td { padding: 0.45rem 0.5rem; border-bottom: 1px solid var(--rh-border); text-align: left; vertical-align: middle; }
.entry-forms-manage-table th:last-child,
.entry-forms-manage-table td:last-child { width: 120px; text-align: right; }
.entry-forms-reopen-form { margin: 0; display: inline; }
.personal-photo-block { margin-bottom: 1rem; }
.personal-photo-picker { margin-bottom: 0.75rem; max-width: 320px; }
.personal-photo-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0.75rem 0;
}
.personal-photo-preview { display: flex; flex-direction: column; gap: 0.35rem; }
.personal-photo-preview-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--rh-muted);
}
.personal-photo-stage {
  width: 240px;
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid var(--rh-border);
  overflow: hidden;
}
.personal-photo-stage--original {
  background: linear-gradient(135deg, #dbeafe 0%, #e2e8f0 100%);
}
.personal-photo-stage--cutout {
  background:
    linear-gradient(45deg, #94a3b8 25%, transparent 25%) 0 0 / 16px 16px,
    linear-gradient(-45deg, #94a3b8 25%, transparent 25%) 0 0 / 16px 16px,
    linear-gradient(45deg, transparent 75%, #94a3b8 75%) 0 0 / 16px 16px,
    linear-gradient(-45deg, transparent 75%, #94a3b8 75%) 0 0 / 16px 16px;
  background-color: #f8fafc;
}
.personal-photo-cutout,
.personal-photo-original { max-width: 100%; max-height: 100%; object-fit: contain; }
.personal-photo-placeholder {
  color: var(--rh-muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 1rem;
}
.personal-photo-upload { max-width: 420px; }
.personal-photo-status.is-error { color: #b91c1c; }
.personal-photo-block.is-processing { opacity: 0.75; pointer-events: none; }
.personal-photo-file-label { display: inline-block; cursor: pointer; }
.personal-photo-hint { margin-top: 0.35rem; color: var(--rh-muted); }
.btn-small { padding: 0.2rem 0.5rem; font-size: 0.8rem; }
.doc-admin-section-form { margin-bottom: 0.5rem; }
.doc-admin-section-form legend { font-weight: 600; color: var(--rh-primary-dark); }
.doc-admin-hr { border: none; border-top: 1px solid var(--rh-border); margin: 1rem 0; }
.doc-check-label { display: flex; align-items: center; gap: 0.35rem; margin-top: 1.5rem; }

.badge-new {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.12rem 0.4rem;
  border-radius: 3px;
  background: #e65100;
  color: #fff;
  vertical-align: middle;
  margin-left: 0.25rem;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.rh-muted { color: var(--rh-muted); }
.rh-dash-search {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  max-width: 36rem;
}
.rh-dash-search input[type="search"] {
  flex: 1;
  min-width: 12rem;
}
.admin-users-filters {
  margin-bottom: 0.25rem;
}
.admin-users-filter-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.admin-users-filter-row label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--rh-primary-dark);
  margin-bottom: 0.25rem;
}
.admin-users-filter-row--search input[type="search"] {
  width: 100%;
  max-width: 28rem;
}
.admin-users-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.75rem 1rem;
  align-items: end;
}
.admin-users-filter-row select {
  width: 100%;
}
.admin-users-filter-row--checkbox {
  display: flex;
  align-items: flex-end;
  min-height: 2.35rem;
}
.admin-users-filter-check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  margin: 0;
}
.admin-users-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.admin-users-result-count {
  margin: 0.35rem 0 0;
}
.rh-insured-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.85rem;
}
.rh-insured-tile {
  display: block;
  padding: 1rem 1.1rem;
  border: 1px solid var(--rh-border);
  border-radius: 10px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.rh-insured-tile:hover {
  border-color: var(--rh-primary);
  box-shadow: var(--rh-shadow);
}
.rh-insured-tile-head {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}
.rh-insured-avatar {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--rh-primary);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rh-insured-tile-title {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.rh-insured-tile-title strong {
  font-size: 1.05rem;
  color: var(--rh-primary-dark);
}
.rh-insured-tile-profile { color: var(--rh-primary); font-weight: 500; }
.rh-insured-tile-badge {
  flex-shrink: 0;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: var(--rh-primary);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.rh-insured-tile-stats {
  list-style: none;
  margin: 0.65rem 0 0;
  padding: 0;
  font-size: 0.88rem;
}
.rh-insured-tile-stats li { margin-bottom: 0.2rem; }
.rh-insured-tile-snippets {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--rh-border);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.rh-insured-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
}
.rh-insured-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.rh-insured-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
}
.rh-insured-photo-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 120px;
}
.rh-insured-photo-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--rh-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.rh-insured-photo-frame {
  width: 120px;
  height: 120px;
  border-radius: 10px;
  border: 1px solid var(--rh-border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rh-insured-photo-frame--original {
  background: linear-gradient(135deg, #dbeafe 0%, #e2e8f0 100%);
}
.rh-insured-photo-frame--cutout {
  background:
    linear-gradient(45deg, #94a3b8 25%, transparent 25%) 0 0 / 12px 12px,
    linear-gradient(-45deg, #94a3b8 25%, transparent 25%) 0 0 / 12px 12px,
    linear-gradient(45deg, transparent 75%, #94a3b8 75%) 0 0 / 12px 12px,
    linear-gradient(-45deg, transparent 75%, #94a3b8 75%) 0 0 / 12px 12px;
  background-color: #f8fafc;
}
.rh-insured-photo-frame a {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}
.rh-insured-photo-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.rh-insured-photo-empty {
  font-size: 0.78rem;
  color: var(--rh-muted);
  text-align: center;
  padding: 0.5rem;
}
.rh-insured-doc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.rh-insured-doc-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--rh-border);
}
.rh-insured-doc-item:last-child { border-bottom: none; }
.rh-insured-doc-body { flex: 1; min-width: 0; }
.rh-insured-doc-body .block { display: block; margin-top: 0.15rem; }
.rh-insured-doc-delete { margin-top: 0.5rem; }
.leave-cert-delete { margin-top: 0.75rem; }

.leave-admin-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}
.leave-admin-summary-card {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e8dff0);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.leave-admin-summary-card strong {
  font-size: 1.5rem;
  color: var(--primary, #6b3fa0);
}
.leave-admin-summary-total {
  border-color: #c4b5fd;
  background: #f5f0fa;
}
.leave-admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.leave-admin-filters .btn.active {
  background: var(--primary, #6b3fa0);
  color: #fff;
  border-color: var(--primary, #6b3fa0);
}
.leave-waiting-badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.85rem;
  font-weight: 600;
}
.leave-waiting-badge.is-late {
  background: #fee2e2;
  color: #991b1b;
}
.leave-admin-row-late {
  background: #fff7f7;
}
.leave-admin-force-form {
  margin-top: 0.5rem;
  padding: 0.75rem;
  border: 1px dashed #c4b5fd;
  border-radius: 8px;
  background: #faf8fc;
}
.leave-admin-actions form {
  margin-bottom: 0.25rem;
}
.rh-insured-notif-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.rh-insured-notif-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--rh-border);
}
.rh-insured-notif-list li.is-read { opacity: 0.75; }
.rh-insured-notif-list .block { display: block; margin-top: 0.2rem; }
.rh-insured-leave-table { width: 100%; font-size: 0.9rem; }

.org-admin-table { width: 100%; font-size: 0.9rem; }
.org-admin-table .org-order-input { width: 4.5rem; }
.org-admin-table .org-name-input { width: 100%; min-width: 10rem; }
.org-sort-form { display: inline-flex; gap: 0.2rem; margin: 0; }
.org-sort-form .btn-icon {
  padding: 0.15rem 0.45rem;
  font-size: 0.85rem;
  line-height: 1.2;
  border: 1px solid var(--rh-border);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}
.org-sort-form .btn-icon:hover { border-color: var(--rh-primary); }
.org-row-inactive { opacity: 0.72; }
.org-actions-cell { white-space: nowrap; }
.org-actions-cell .org-inline-form { display: inline; margin-left: 0.35rem; }
.org-check { display: inline-flex; align-items: center; gap: 0.25rem; }
.org-danger-zone { border-color: #fecaca; background: #fffbfb; }
.profile-create-perms summary { cursor: pointer; font-size: 1rem; }
.profile-create-perms .profile-perm-group { font-size: 0.95rem; margin: 0.75rem 0 0.35rem; }
.profile-copy-select { max-width: 24rem; }
.user-effective-rights { background: var(--rh-surface, #faf8fc); }
.effective-rights-list {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  columns: 2;
  column-gap: 1.5rem;
  font-size: 0.88rem;
}
@media (max-width: 700px) {
  .effective-rights-list { columns: 1; }
}

.doc-upload-dropzone {
  position: relative;
  margin-top: 0.35rem;
  padding: 1.25rem 1rem;
  border: 2px dashed var(--rh-border);
  border-radius: 8px;
  background: var(--rh-surface, #faf8fc);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.doc-upload-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.doc-upload-dropzone-prompt {
  margin: 0;
  color: var(--rh-muted);
  line-height: 1.45;
}
.doc-upload-dropzone-icon {
  display: block;
  font-size: 1.5rem;
  margin-bottom: 0.35rem;
  color: var(--rh-primary);
}
.doc-upload-browse.linklike {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--rh-primary);
  text-decoration: underline;
  cursor: pointer;
}
.doc-upload-browse.linklike:hover { color: var(--rh-primary-dark, var(--rh-primary)); }
.doc-upload-dropzone-file {
  margin: 0.5rem 0 0;
  font-weight: 500;
  color: var(--rh-primary-dark);
  word-break: break-all;
}
.doc-upload-dropzone--over {
  border-color: var(--rh-primary);
  background: color-mix(in srgb, var(--rh-primary) 8%, transparent);
}
.doc-upload-dropzone--filled {
  border-style: solid;
  border-color: color-mix(in srgb, var(--rh-primary) 35%, var(--rh-border));
}
.doc-upload-dropzone--error {
  border-color: #c62828;
  background: #ffebee;
}
.doc-upload-dropzone--error::after {
  content: attr(data-drop-error);
  display: block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #b71c1c;
}

@media (max-width: 1024px) {
  .mobile-topbar {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem .85rem;
    background: var(--rh-sidebar);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .45);
    z-index: 45;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
  }

  .sidebar-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 50;
    width: min(var(--sidebar-width), 88vw);
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
    transform: translateX(-100%);
    transition: transform .25s ease;
    box-shadow: 0 12px 40px rgba(0,0,0,.25);
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .app-main {
    padding: 1rem .85rem 1.5rem;
  }

  .card {
    padding: 1rem;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .grid-3,
  .chat-layout {
    grid-template-columns: 1fr;
  }

  .app-main .card {
    overflow-x: auto;
  }

  .planning-table-wrap {
    max-width: calc(100vw - 1.7rem);
  }

  .btn,
  .btn-secondary {
    min-height: 2.5rem;
  }

  .rh-stats-filter-toggle {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }

  .rh-stats-filter-panel {
    left: 0;
    right: 0;
    width: auto;
  }

  .planning-tabs {
    flex-wrap: wrap;
  }

  .planning-year-nav {
    flex-wrap: wrap;
  }

  .personal-data-week-table {
    max-width: 100%;
  }

  .perm-grid {
    grid-template-columns: 1fr;
  }

  .brand-preview {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .container {
    max-width: 100%;
  }

  h1 {
    font-size: 1.45rem;
  }

  .app-main table {
    font-size: .84rem;
  }

  th, td {
    padding: .5rem .4rem;
  }

  .chat-layout {
    min-height: auto;
  }

  .rh-insured-tile {
    min-height: 0;
  }

  .impersonation-banner {
    font-size: .82rem;
  }
}

@media (min-width: 1025px) {
  .mobile-topbar,
  .sidebar-backdrop {
    display: none !important;
  }
}

/* Tableau de bord RH (stats assurés) */
.rh-stats-page { max-width: 1100px; }
.rh-stats-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.rh-stats-head h1 { margin: 0; }
.rh-stats-head-actions { display: flex; gap: .5rem; align-items: flex-start; flex-wrap: wrap; }
.rh-stats-filter-menu { position: relative; }
.rh-stats-filter-toggle {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .15rem;
  min-width: 12rem;
  max-width: 320px;
  text-align: left;
  position: relative;
  padding-right: 2rem;
}
.rh-stats-filter-toggle-label { font-weight: 600; }
.rh-stats-filter-summary {
  font-size: .75rem;
  font-weight: 400;
  color: var(--rh-muted);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.rh-stats-filter-chevron {
  position: absolute;
  right: .65rem;
  top: 50%;
  transform: translateY(-50%);
  transition: transform .15s ease;
}
.rh-stats-filter-menu.open .rh-stats-filter-chevron { transform: translateY(-50%) rotate(180deg); }
.rh-stats-filter-panel {
  display: none;
  position: absolute;
  top: calc(100% + .45rem);
  right: 0;
  width: min(520px, calc(100vw - 2rem));
  z-index: 120;
  margin: 0;
  padding: 1rem;
  box-shadow: var(--rh-shadow);
}
.rh-stats-filter-menu.open .rh-stats-filter-panel { display: block; }
.rh-stats-filter-panel-head {
  margin-bottom: .85rem;
  padding-bottom: .65rem;
  border-bottom: 1px solid var(--rh-border);
}
.rh-stats-filter-panel-head strong { color: var(--rh-primary-dark); }
.rh-stats-filter { margin: 0; }
.rh-stats-filter-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: .25rem;
  padding-top: .65rem;
  border-top: 1px solid var(--rh-border);
}
.rh-stats-filter-row { margin-bottom: .75rem; }
.rh-stats-filter-label {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  color: var(--rh-muted);
  margin-bottom: .45rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.rh-stats-period-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.rh-stats-period-tab {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .65rem;
  border: 1px solid var(--rh-border);
  border-radius: 999px;
  font-size: .85rem;
  cursor: pointer;
  background: #fff;
}
.rh-stats-period-tab:has(input:checked) {
  border-color: var(--rh-primary);
  background: color-mix(in srgb, var(--rh-primary) 10%, white);
  color: var(--rh-primary);
}
.rh-stats-period-tab input { margin: 0; }
.rh-stats-kpi--highlight {
  border-color: var(--rh-primary);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--rh-primary) 25%, transparent);
}
.rh-stats-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.rh-stats-kpis--secondary {
  margin-bottom: 1.5rem;
  max-width: 420px;
}
.rh-stats-kpi--compact strong { font-size: 1.35rem; }
.rh-stats-kpi em {
  display: block;
  margin-top: .25rem;
  font-style: normal;
  color: var(--rh-muted);
  font-size: .78rem;
  line-height: 1.3;
}
.rh-stats-kpi span {
  display: block;
  margin-top: .35rem;
  font-size: .88rem;
  color: var(--rh-muted);
}
.rh-stats-kpi em { font-style: normal; color: var(--rh-muted); }
.rh-stats-birthdays-card { margin-bottom: 1rem; }
.rh-stats-birthdays-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem 1rem;
  margin-bottom: 1rem;
}
.rh-stats-birthdays-head h2 { margin: 0; font-size: 1.05rem; }
.rh-stats-birthdays-table-wrap { overflow-x: auto; }
.rh-stats-birthdays-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.rh-stats-birthdays-table th,
.rh-stats-birthdays-table td {
  padding: .5rem .65rem;
  border-bottom: 1px solid var(--rh-border);
  text-align: left;
  vertical-align: middle;
}
.rh-stats-birthdays-table th {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--rh-muted);
}
.rh-stats-birthdays-table tbody tr.is-today {
  background: color-mix(in srgb, var(--rh-primary) 8%, transparent);
}
.rh-stats-birthday-badge {
  display: inline-block;
  padding: .15rem .45rem;
  border-radius: 999px;
  background: var(--rh-primary);
  color: #fff;
  font-size: .78rem;
  font-weight: 600;
}
.rh-stats-birthdays-missing { margin: .85rem 0 0; }
.rh-stats-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.rh-stats-chart-card--wide { grid-column: 1 / -1; }
.rh-stats-chart-card h2 {
  margin: 0 0 1rem;
  font-size: 1.05rem;
}
.rh-stats-chart-wrap {
  position: relative;
  height: 240px;
}
.rh-stats-chart-wrap--wide { height: 280px; }
.rh-stats-chart-wrap--pyramid { height: 320px; }
.rh-stats-gender-legend {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.25rem;
}
.rh-stats-gender-legend li {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.rh-stats-dot {
  width: .65rem;
  height: .65rem;
  border-radius: 50%;
  display: inline-block;
}
.rh-stats-dot--m { background: #3b82f6; }
.rh-stats-dot--f { background: #ec4899; }
.rh-stats-dot--o { background: #a78bfa; }
.rh-stats-filter select {
  width: 100%;
  max-width: 520px;
  margin-top: .25rem;
}
.rh-stats-personal-card { margin-bottom: 1rem; }
.rh-stats-personal-card h2 {
  margin: 0 0 .75rem;
  font-size: 1rem;
}
.rh-stats-personal-dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .65rem 1rem;
  margin: 0;
}
.rh-stats-personal-dl > div {
  display: grid;
  gap: .15rem;
}
.rh-stats-personal-dl dt {
  font-size: .75rem;
  font-weight: 600;
  color: var(--rh-muted);
  text-transform: uppercase;
  letter-spacing: .02em;
}
.rh-stats-personal-dl dd { margin: 0; font-weight: 500; }

.site-footer {
  margin-top: auto;
  padding: .85rem 1.25rem;
  background: var(--rh-sidebar);
  color: var(--rh-sidebar-muted);
  border-top: 3px solid var(--rh-primary-light);
}

.auth-content .site-footer {
  width: 100%;
  max-width: 26rem;
  margin-left: auto;
  margin-right: auto;
  padding-top: 1.25rem;
  background: transparent;
  border-top: 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: inherit;
  text-decoration: none;
  transition: color .15s ease;
}

.footer-brand:hover {
  color: #fff;
}

.auth-content .footer-brand {
  color: rgba(255,255,255,.78);
}

.auth-content .footer-brand:hover {
  color: #fff;
}

.footer-copy {
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .02em;
}

.logo-xp {
  width: 30px;
  height: 30px;
  display: block;
  border-radius: 7px;
  object-fit: contain;
}

.license-readonly-banner {
  margin-bottom: 1rem;
  padding: .75rem 1rem;
  border-radius: 10px;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  color: #92400e;
  font-size: .9rem;
}

.license-readonly-banner a {
  color: #b45309;
  font-weight: 600;
}

body.license-readonly form:not(.license-write-allow) button[type="submit"],
body.license-readonly form:not(.license-write-allow) input[type="submit"] {
  opacity: 0.55;
  pointer-events: none;
  cursor: not-allowed;
}

.license-status-line {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: .15rem .55rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
}

.status-pill-active {
  background: #dcfce7;
  color: #166534;
}

.status-pill-inactive {
  background: #fee2e2;
  color: #991b1b;
}

.license-period-card {
  background: #f9fafb;
}

.license-period-details {
  font-size: 0.875rem;
  line-height: 1.7;
}

.license-info-body {
  font-size: 0.875rem;
  line-height: 1.7;
}

.license-info-body p {
  margin: 0 0 0.85rem;
}

.license-info-body p:last-child {
  margin-bottom: 0;
}

.license-info-edit {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border, #e5e7eb);
}

.license-info-edit summary {
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--accent, #2563eb);
  user-select: none;
}

.license-info-form {
  margin-top: 0.75rem;
}

.license-info-form textarea {
  width: 100%;
  min-height: 10rem;
  margin-top: 0.35rem;
}

.license-info-form-actions {
  margin-top: 0.75rem;
}

.license-dl {
  display: grid;
  gap: .55rem;
  margin: 0;
}

.license-dl > div {
  display: grid;
  gap: .1rem;
}

.license-dl dt {
  font-size: .75rem;
  font-weight: 600;
  color: var(--rh-muted);
  text-transform: uppercase;
  letter-spacing: .03em;
}

.license-dl dd {
  margin: 0;
}

.license-storage-bar {
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-top: .65rem;
}

.license-storage-bar span {
  display: block;
  height: 100%;
  background: var(--rh-primary);
}
.leave-rh-review {
  margin-top: .65rem;
  padding-top: .5rem;
  border-top: 1px solid var(--rh-border, #e2e8f0);
}
.leave-initials-input {
  max-width: 8rem;
  text-transform: uppercase;
}
.leave-rh-edit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: .5rem .75rem;
  margin: .35rem 0 .5rem;
}
.leave-row-form {
  margin: 0;
  padding: 0;
  border: 0;
}
.leave-row-form.leave-rh-review,
.leave-row-form .leave-rh-review {
  margin: 0;
  padding: 0;
  border: 0;
}
.leave-actions-compact {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  align-items: center;
}
.leave-actions-compact .btn {
  margin: 0;
}
.leave-comment-compact {
  min-width: 8rem;
  max-width: 12rem;
}
.leave-correct-details {
  margin-top: .4rem;
}
.leave-own-history {
  margin-top: 1.5rem;
  padding: .75rem 1rem;
}
.leave-own-history > summary {
  cursor: pointer;
  font-weight: 600;
  list-style: revert;
}
.leave-own-history > summary::-webkit-details-marker {
  display: revert;
}
.leave-history-table a {
  color: inherit;
  text-decoration: none;
}
.leave-history-table th a:hover {
  text-decoration: underline;
}
