:root {
  --bg: #ffffff;
  --sidebar-bg: #ffffff;
  --sidebar-text: #46536b;
  --accent: #304a7b;
  --accent-dark: #243b68;
  --card-bg: #ffffff;
  --border: #e3e7ee;
  --text: #1f2430;
  --text-muted: #6b7280;
  --danger: #e0433c;
  --ok: #1fa971;
  --sem-critico: #e0433c;
  --sem-alto: #f0913c;
  --sem-medio: #f2c94c;
  --sem-normal: #1fa971;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}
.hidden { display: none !important; }

.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(420px, .88fr);
  background: #fff;
}
.login-welcome {
  min-height: 100vh; position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(30px, 5.5vw, 82px); background: #17264f; color: #fff;
}
.login-welcome::before {
  content: ''; position: absolute; z-index: -1; inset: 0;
  background: repeating-linear-gradient(145deg, transparent 0 72px, rgba(255,255,255,.045) 73px, transparent 74px 146px);
}
.welcome-brand { display: flex; align-items: center; gap: 13px; font-size: 16px; font-weight: 700; }
.welcome-mark { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.48); border-radius: 13px; font-size: 28px; line-height: 1; }
.welcome-copy { position: relative; z-index: 1; max-width: 510px; margin: auto 0; padding: 64px 0; }
.welcome-eyebrow { margin: 0 0 20px; color: #c9ceff; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.welcome-copy h2 { margin: 0 0 20px; color: white; font-size: clamp(36px, 4.4vw, 58px); font-weight: 700; line-height: 1.05; }
.welcome-copy > p:last-child { max-width: 390px; margin: 0; color: #e0e3ff; font-size: 15px; line-height: 1.7; }
.welcome-lines { position: absolute; z-index: -1; top: 18%; right: -18%; width: 62%; height: 63%; transform: rotate(-22deg); }
.welcome-lines span { position: absolute; inset: 0; border: 1px solid rgba(16,22,94,.24); }
.welcome-lines span:nth-child(2) { inset: 20px 26px -20px -26px; }
.welcome-lines span:nth-child(3) { inset: 40px 52px -40px -52px; }
.welcome-footer { margin: 0; color: #cbd0ff; font-size: 10px; font-weight: 700; letter-spacing: .1em; }
.welcome-footer span { padding: 0 6px; }
.login-form-panel { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 24px clamp(32px, 7vw, 108px); background: #fff; }
.login-card {
  width: min(100%, 410px); padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none;
}
.login-card h1 { margin: 0 0 8px; color: #202640; font-size: 31px; line-height: 1.15; }
.auth-logo { display: block; width: 200px; height: 200px; margin: 0 auto 12px; object-fit: contain; }
.auth-kicker { margin: 0 0 11px; color: #17264f; font-size: 10px; font-weight: 800; letter-spacing: .15em; }
.login-sub { margin: 0 0 20px; color: #7c8190; font-size: 13px; line-height: 1.5; }
.login-card label { display: block; font-size: 12px; font-weight: 650; margin: 12px 0 6px; color: #444a5c; }
.login-card input {
  width: 100%; min-height: 46px; padding: 11px 13px; border: 1px solid #d9dce5;
  border-radius: 5px; outline: none; background: #fff; font-size: 13px; color: #202640;
}
.login-card input:focus { border-color: #17264f; box-shadow: 0 0 0 3px rgba(23,38,79,.12); }
.login-card input::placeholder { color: #a0a4b0; }
.login-card .auth-submit {
  width: 100%; min-height: 46px; margin-top: 18px; padding: 11px 16px; border: 0;
  border-radius: 5px; background: #17264f; color: #fff; font-size: 13px; font-weight: 700; cursor: pointer;
}
.login-card .auth-submit:hover { background: #101b39; }
.login-card .link-button { display: block; width: auto; margin: 16px 0 0 auto; padding: 4px 0; border: 0; background: transparent; color: #17264f; font-size: 12px; cursor: pointer; }
.login-card .link-button:hover { color: #101b39; text-decoration: underline; }
.login-panel-footer { width: min(100%, 410px); margin: 20px 0 0; color: #a0a4b0; font-size: 11px; text-align: center; }
.login-card .error-msg { color: var(--danger); font-size: 12px; margin: 10px 0 0; min-height: 16px; }

@media (max-width: 760px) {
  .login-screen { grid-template-columns: minmax(0, 1fr); }
  .login-welcome { min-height: 245px; padding: 25px 26px; }
  .welcome-mark { width: 36px; height: 36px; font-size: 24px; }
  .welcome-copy { padding: 35px 0 15px; }
  .welcome-eyebrow { margin-bottom: 9px; font-size: 9px; }
  .welcome-copy h2 { margin-bottom: 9px; font-size: 32px; }
  .welcome-copy > p:last-child { max-width: 420px; font-size: 12px; line-height: 1.45; }
  .welcome-lines { top: 8%; right: -28%; width: 70%; height: 95%; }
  .welcome-footer { display: none; }
  .login-form-panel { min-height: 0; padding: 32px 26px 24px; }
  .login-card h1 { font-size: 28px; }
}

@media (min-width: 761px) and (max-height: 680px) {
  .login-welcome { padding-top: 24px; padding-bottom: 24px; }
  .welcome-copy { padding: 32px 0; }
  .welcome-eyebrow { margin-bottom: 12px; }
  .welcome-copy h2 { margin-bottom: 12px; font-size: clamp(32px, 4vw, 48px); }
  .login-form-panel { padding-top: 16px; padding-bottom: 16px; }
  .auth-logo { width: 160px; height: 160px; margin-bottom: 8px; }
  .login-sub { margin-bottom: 14px; }
  .login-card label { margin-top: 9px; }
  .login-card .auth-submit { margin-top: 13px; }
  .login-panel-footer { margin-top: 12px; }
}

.app { min-height: 100vh; height: 100vh; display: grid; grid-template-columns: 100px minmax(0, 1fr); overflow: hidden; background: var(--bg); }

.topbar {
  display: flex; flex-direction: column; gap: 0; min-width: 0; height: 100vh;
  background: var(--sidebar-bg); color: var(--text); padding: 22px 8px 16px;
  position: relative; z-index: 5; border-right: 1px solid var(--border);
  box-shadow: 4px 0 18px rgba(23,38,79,.12);
}
.topbar-brand { display: flex; justify-content: center; align-items: center; padding: 0 0 20px; color: var(--accent); font-size: 15px; font-weight: 750; }
.topbar-brand span:last-child { display: none; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 7px; background: #304a7b; color: white; font-size: 11px; font-weight: 800; }
.topbar-section-label { display: none; }
.topbar-nav { display: grid; gap: 6px; flex: 1; align-content: start; }
.topbar-link {
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; min-height: 64px; width: 100%;
  background: transparent; border: 0; color: var(--sidebar-text); text-align: center;
  padding: 7px 3px; border-radius: 6px; font-size: 10px; line-height: 1.2; cursor: pointer;
  transition: background-color .16s ease, color .16s ease;
}
.topbar-link:hover, .topbar-link:focus-visible { background: var(--accent); color: #fff; }
.topbar-link.active { background: #304a7b; color: white; box-shadow: inset 0 -2px #78a8ee; }
.nav-icon { display: grid; place-items: center; width: 26px; height: 26px; flex: 0 0 26px; border-radius: 7px; background: #f0f3f8; color: var(--accent); font-size: 16px; }
.topbar-link:hover .nav-icon, .topbar-link:focus-visible .nav-icon, .topbar-link.active .nav-icon { background: rgba(255,255,255,.18); color: #fff; }
.workspace-bar { position: sticky; z-index: 50; top: 0; display: flex; justify-content: space-between; align-items: center; gap: 18px; min-height: 76px; margin: 0 0 24px; border-bottom: 1px solid #dce3ec; background: var(--bg); color: #43516a; font-size: 12px; font-weight: 650; }
.workspace-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.workspace-brand img { width: 220px; height: 68px; flex: 0 0 auto; object-fit: contain; background: transparent; border: 0; border-radius: 0; }
.workspace-tools { display: flex; align-items: center; gap: 11px; }
.workspace-user { display: flex; align-items: center; gap: 8px; max-width: 210px; }
.workspace-user .current-user { overflow: hidden; color: #33415d; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.user-avatar, .user-avatar-image { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; overflow: hidden; border: 1px solid #d7deea; border-radius: 50%; background: #e5ebf5; color: #17264f; font-size: 11px; font-weight: 750; object-fit: cover; }
.notification-control { position: relative; }
.notification-bell {
  position: relative; display: grid; place-items: center; width: 38px; height: 38px; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--accent); font-size: 20px; cursor: pointer;
}
.notification-bell:hover { background: #e2e9f3; color: var(--accent-dark); }
.notification-count {
  position: absolute; top: -6px; right: -7px; min-width: 18px; height: 18px; padding: 0 4px;
  display: grid; place-items: center; border-radius: 10px; background: var(--danger); color: white;
  font-size: 10px; font-weight: 700; line-height: 1;
}
.notification-panel {
  position: fixed; z-index: 1001; top: 86px; right: 18px; width: min(410px, calc(100vw - 28px));
  max-height: min(70vh, 620px); overflow-y: auto; background: var(--card-bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 12px 36px #1e243344; padding: 14px;
}
.notification-panel h3 { margin: 0 0 10px; font-size: 15px; }
.notification-empty { margin: 0; padding: 16px 4px; color: var(--text-muted); font-size: 13px; }
.notification-item { border-top: 1px solid var(--border); padding: 12px 2px; }
.notification-item.is-read { opacity: .7; }
.notification-item strong { font-size: 13px; }
.notification-item p { margin: 5px 0 9px; font-size: 12.5px; line-height: 1.45; }
.notification-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.notification-actions .btn-primary { padding: 6px 9px; font-size: 12px; }
#logout-btn {
  padding: 7px 10px; border-radius: 7px; border: 1px solid #cbd5e4;
  background: #fff; color: var(--accent); cursor: pointer; font-size: 11px; font-weight: 650;
}
#logout-btn:hover { background: #f1f5fb; border-color: #9aabc5; }
#push-enable-btn { padding: 7px 10px; border-radius: 7px; border: 1px solid #cbd5e4; background: #fff; color: var(--accent); cursor: pointer; font-size: 11px; font-weight: 650; }
#push-enable-btn:hover { background: #f1f5fb; border-color: #9aabc5; }
#push-enable-btn:disabled { color: #fff; border-color: #657ca5; background: #657ca5; cursor: default; }
.theme-switch { position: relative; display: inline-flex; flex: 0 0 64px; width: 64px; height: 34px; cursor: pointer; }
.theme-switch-track {
  position: relative; display: block; width: 64px; height: 34px; overflow: hidden;
  border-radius: 999px; background: #e5e7eb; box-shadow: 0 3px 8px rgba(55,65,81,.2);
  transition: background-color .35s ease, box-shadow .35s ease;
}
.theme-switch-track::before,
.theme-switch-track::after {
  position: absolute; top: 50%; display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%; font-size: 14px;
  transition: transform .35s cubic-bezier(.2,.75,.25,1), opacity .25s ease, background-color .35s ease;
}
.theme-switch-track::before {
  left: 3px; content: '☀️'; background: #fff; transform: translateY(-50%);
}
.theme-switch-track::after {
  right: 3px; content: '🌙'; background: #d6e2f5; opacity: 0;
  transform: translateY(150%);
}
#theme-toggle:checked + .theme-switch-track { background: #17264f; box-shadow: 0 3px 9px rgba(23,38,79,.32); }
#theme-toggle:checked + .theme-switch-track::before { opacity: 0; transform: translateY(-150%) rotate(90deg); }
#theme-toggle:checked + .theme-switch-track::after { opacity: 1; transform: translateY(-50%) rotate(180deg); }
#theme-toggle:focus-visible + .theme-switch-track { outline: 3px solid #78a8ee; outline-offset: 3px; }

.content { min-width: 0; padding: 0 30px 30px; overflow-y: auto; }
.view-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 16px; flex-wrap: wrap; }
.toolbar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

@media (max-width: 760px) {
  .app { height: 100vh; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .topbar { height: auto; padding: 9px 12px 8px; }
  .topbar-brand { padding: 0 7px 8px; }
  .topbar-brand span:last-child { display: inline; }
  .topbar-section-label { display: none; }
  .topbar-nav { display: flex; overflow-x: auto; gap: 3px; padding-bottom: 2px; }
  .topbar-link { flex-direction: row; width: auto; min-width: max-content; min-height: 34px; padding: 6px 9px; font-size: 10.5px; }
  .nav-icon { display: none; }
  .content { padding: 0 14px 20px; }
  .workspace-bar { min-height: 92px; align-items: flex-start; flex-wrap: wrap; gap: 7px; padding: 8px 0; margin-bottom: 18px; }
  .workspace-brand { flex: 1 1 100%; gap: 10px; }
  .workspace-brand img { width: 200px; height: 62px; }
  .workspace-tools { width: 100%; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
  .workspace-user { max-width: 145px; }
  .workspace-user .current-user { max-width: 92px; }
  .notification-panel { top: 120px; right: 12px; }
}
@media print {
  @page { size: landscape; margin: 12mm; }
  .topbar, .list-toolbar, .view-header button, .toolbar-actions, .btn-primary, .btn-secondary,
  .btn-danger, .notification-control, .toast-stack, .modal-overlay, input[type="file"], .file-upload-label { display: none !important; }
  body, .app, .content { background: #fff !important; color: #111 !important; padding: 0 !important; }
  .table-wrap { overflow: visible !important; border: 0 !important; }
  .table-wrap > table { min-width: 0 !important; width: 100% !important; font-size: 9px !important; }
  th, td { padding: 4px 5px !important; white-space: normal !important; }
  .ef-section { break-inside: avoid; }
  .ef-grid { break-inside: avoid; }
  input, select, textarea { border: 0 !important; box-shadow: none !important; color: #111 !important; }
}
.view-title-group { display: flex; flex-direction: column; gap: 4px; }
.view-sub { color: var(--text-muted); margin-top: -8px; font-size: 13px; }
h2 { margin: 0 0 4px; }

.btn-back {
  align-self: flex-start; background: none; border: none; color: var(--accent);
  font-size: 13px; font-weight: 600; cursor: pointer; padding: 0; margin-bottom: 2px;
}
.btn-back:hover { text-decoration: underline; }
#modal-close { border: 1px solid var(--accent); border-radius: 5px; background: var(--accent); color: #fff; cursor: pointer; }
#modal-close:hover { background: var(--accent-dark); }

.search-input {
  width: 100%; max-width: 360px; padding: 10px 13px 10px 40px; margin-bottom: 14px;
  border: 1px solid #dce3ed; border-radius: 10px; outline: none; background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23768195' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 13px center; background-size: 17px;
  color: var(--text); font: inherit; font-size: 13px; transition: border-color .16s, box-shadow .16s;
}
.search-input::placeholder { color: #929bad; }
.search-input:focus { border-color: #8195b8; box-shadow: 0 0 0 3px rgba(48,74,123,.1); }
.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; }

.list-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-bottom: 14px; }
.list-toolbar .search-field { display: block; flex: 1 1 240px; max-width: 360px; min-width: min(220px, 100%); }
.list-toolbar .search-input { margin-bottom: 0; }
.list-toolbar .category-filter,
.attendance-toolbar select {
  min-height: 39px; max-width: 100%; padding: 8px 32px 8px 12px; border: 1px solid #e0e5ed;
  border-radius: 9px; appearance: none;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%23768195' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m2 4 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; color: #4b5669;
  font: inherit; font-size: 12px; outline: none; cursor: pointer;
  transition: border-color .16s, box-shadow .16s, background-color .16s;
}
.list-toolbar .category-filter:hover,
.attendance-toolbar select:hover { border-color: #c5cedc; background-color: #fbfcfe; }
.list-toolbar .category-filter:focus,
.attendance-toolbar select:focus { border-color: #8195b8; box-shadow: 0 0 0 3px rgba(48,74,123,.1); outline: none; }
.list-toolbar .view-toggle { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid #e3e8ef; border-radius: 9px; background: #f5f7fa; }
.list-toolbar .view-toggle-btn { min-height: 31px; padding: 6px 10px; border: 0; border-radius: 7px; background: transparent; color: #697589; font: inherit; font-size: 12px; cursor: pointer; }
.list-toolbar .view-toggle-btn:hover { color: var(--accent); }
.list-toolbar .view-toggle-btn.active { background: #fff; color: var(--accent); box-shadow: 0 1px 3px rgba(27,39,61,.12); }
.request-history-overlay { position: fixed; z-index: 1200; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(8,18,36,.62); }
.request-history-overlay.hidden { display: none; }
.request-history-dialog { display: grid; gap: 14px; width: min(100%, 1200px); max-height: min(92vh, 980px); overflow: auto; padding: 20px; border: 1px solid var(--border); border-radius: 12px; background: var(--card-bg); color: var(--text); box-shadow: 0 18px 55px rgba(0,0,0,.25); }
.request-history-header, .request-history-toolbar { display: flex; align-items: center; gap: 10px; }
.request-history-header { justify-content: space-between; }
.request-history-header h3 { margin: 0; font-size: 17px; }
.request-history-header p { margin: 5px 0 0; color: var(--text-muted); font-size: 12px; }
.request-history-toolbar label, .request-history-toolbar span { color: var(--text-muted); font-size: 12px; font-weight: 650; }
.request-history-toolbar select { min-height: 34px; max-width: 240px; padding: 6px 9px; border: 1px solid var(--border); border-radius: 6px; background: var(--card-bg); color: var(--text); font: inherit; }
@media (max-width: 640px) {
  .request-history-dialog { padding: 14px; }
  .request-history-toolbar { align-items: flex-start; flex-direction: column; }
}
.users-admin-layout, .roles-admin-layout { display: grid; gap: 18px; align-items: start; }
.users-admin-layout { grid-template-columns: minmax(0, 1fr); gap: 14px; }
.compensatory-layout { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(0, 1.7fr); gap: 18px; align-items: start; }
.compensatory-history-section { margin-top: 18px; }
.roles-admin-layout { grid-template-columns: minmax(0, 1fr); }
.user-create-card, .role-editor-card, .roles-list-section {
  min-width: 0; padding: 18px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--card-bg); box-shadow: 0 5px 18px rgba(38,52,93,.06);
}
.user-create-card h3, .users-list-header h3, .role-editor-card h3, .roles-list-section > h3 {
  margin: 0 0 14px; color: var(--text); font-size: 15px;
}
.users-info-banner { margin: 0 0 14px; padding: 10px 12px; border: 1px solid #c8dff5; border-radius: 7px; background: #eef7ff; color: #365b7d; font-size: 11px; line-height: 1.45; }
.user-create-card { width: min(100%, 340px); padding: 14px; border-radius: 8px; box-shadow: 0 2px 8px rgba(38,52,93,.05); }
.user-create-card h3 { margin-bottom: 10px; font-size: 13px; }
.user-create-card form { display: grid; gap: 8px; }
.user-create-card label, .role-editor-card > form > label {
  display: grid; gap: 5px; color: var(--text-muted); font-size: 11px; font-weight: 650;
}
.user-create-card input:not([type="checkbox"]), .user-create-card select, .user-create-card textarea, .role-editor-card input[name="name"] {
  width: 100%; min-height: 34px; padding: 7px 9px; border: 1px solid var(--border);
  border-radius: 5px; background: var(--card-bg); color: var(--text); font: inherit; font-size: 11px;
}
.user-create-card .user-active-toggle { display: flex; align-items: center; gap: 8px; }
.user-active-toggle input { accent-color: var(--accent); }
.user-create-card .btn-primary { justify-self: start; }
.user-permission-picker { min-width: 0; margin: 2px 0; padding: 10px; border: 1px solid var(--border); border-radius: 7px; }
.user-permission-picker legend { padding: 0 5px; color: var(--text); font-size: 11px; font-weight: 750; }
.user-permission-note { margin: 0 0 8px; color: var(--text-muted); font-size: 10px; line-height: 1.4; }
.user-permission-group + .user-permission-group { margin-top: 9px; }
.user-permission-group h4 { margin: 0 0 5px; color: var(--text); font-size: 11px; }
.user-permission-group label.checkbox-field { display: flex; align-items: flex-start; gap: 7px; margin: 5px 0; color: var(--text-muted); font-size: 10.5px; line-height: 1.35; }
.user-permission-group input[type="checkbox"] { flex: 0 0 auto; margin: 1px 0 0; accent-color: var(--accent); }
.users-list-section { min-width: 0; }
.users-list-header { margin-bottom: 8px; }
.users-list-header h3 { margin-bottom: 8px; font-size: 13px; }
.users-table-wrap > table { min-width: 1050px; }
.users-table-wrap .badge-active { background: #16875a; }
.users-table-wrap .badge-inactive { background: #8791a2; }
.form-error { min-height: 16px; margin: 0; color: var(--danger); font-size: 12px; }
.role-permission-groups { display: grid; gap: 10px; margin: 14px 0 10px; }
.role-permission-group { min-width: 0; margin: 0; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; }
.role-permission-group legend { padding: 0 5px; color: var(--text); font-size: 11px; font-weight: 750; }
.role-permission-option { display: flex; align-items: flex-start; gap: 8px; margin: 6px 0; color: var(--text-muted); font-size: 11px; line-height: 1.35; }
.role-permission-option input { flex: 0 0 auto; margin: 1px 0 0; accent-color: var(--accent); }
.role-permission-option input:disabled { cursor: not-allowed; }
.role-permission-note { margin: 8px 0 12px; color: var(--text-muted); font-size: 10px; line-height: 1.5; }
.role-editor-card { width: min(100%, 350px); padding: 14px; border-radius: 8px; box-shadow: 0 2px 8px rgba(38,52,93,.05); }
.role-editor-card h3 { margin-bottom: 10px; font-size: 13px; }
.role-editor-card form { display: grid; gap: 8px; }
.role-editor-card form > label { display: grid; gap: 5px; color: var(--text-muted); font-size: 11px; font-weight: 650; }
.role-editor-card form > label input { width: 100%; min-height: 34px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 5px; background: var(--card-bg); color: var(--text); font: inherit; font-size: 11px; }
.role-editor-card form > .form-error { min-height: 0; }
.role-editor-card form > .btn-primary { justify-self: start; min-height: 30px; padding: 6px 12px; font-size: 11px; }
.roles-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.role-card { min-width: 0; padding: 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); }
.role-card-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.role-card-heading h4 { margin: 0; color: var(--text); font-size: 13px; }
.role-card-heading span { display: inline-block; margin-top: 4px; color: var(--text-muted); font-size: 10px; }
.role-card-heading .role-system-badge { margin: 0; padding: 3px 7px; border-radius: 12px; background: #e8eef9; color: #344b9a; font-weight: 700; }
.role-card-title { display: grid; gap: 3px; }
.role-card-title > span { margin: 0; }
.role-name-field { display: grid; gap: 5px; color: var(--text-muted); font-size: 10px; font-weight: 650; }
.role-name-field input { width: min(100%, 340px); min-height: 34px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 5px; background: var(--card-bg); color: var(--text); font: inherit; font-size: 12px; }
.role-card-permissions { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin: 12px 0; }
.role-permission-group { background: var(--card-bg); }
.role-permission-group legend { line-height: 1.35; }
.role-permission-option { min-height: 28px; }
.role-card-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding-top: 10px; border-top: 1px solid var(--border); }
.role-card-actions button { padding: 6px 9px; font-size: 11px; }
.vacation-history-picker { display: grid; gap: 4px; color: var(--text-muted); font-size: 11px; font-weight: 650; }
.vacation-history-picker select, .vacation-year-toolbar select {
  min-height: 34px; max-width: 240px; padding: 6px 9px; border: 1px solid var(--border);
  border-radius: 6px; background: var(--card-bg); color: var(--text); font: inherit;
}
.vacation-year-overlay { position: fixed; z-index: 1200; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(8,18,36,.62); }
.vacation-year-overlay.hidden { display: none; }
.vacation-year-dialog { display: grid; gap: 14px; width: min(100%, 900px); max-height: min(92vh, 980px); overflow: auto; padding: 20px; border: 1px solid var(--border); border-radius: 12px; background: var(--card-bg); color: var(--text); box-shadow: 0 18px 55px rgba(0,0,0,.25); }
.vacation-year-header, .vacation-year-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.vacation-year-header h3 { margin: 0; font-size: 17px; }
.vacation-year-header p { margin: 5px 0 0; color: var(--text-muted); font-size: 12px; }
.vacation-year-toolbar label { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 12px; font-weight: 650; }
.vacation-year-export-years { display: grid; gap: 5px; margin: 0; padding: 6px 9px; border: 1px solid var(--border); border-radius: 6px; }
.vacation-year-export-years legend { padding: 0 4px; color: var(--text-muted); font-size: 11px; font-weight: 650; }
.vacation-year-export-years > div { display: flex; flex-wrap: wrap; gap: 8px; }
.vacation-year-export-years label { display: inline-flex; align-items: center; gap: 4px; color: var(--text); font-size: 11px; }
.vacation-year-export-years input { accent-color: var(--accent); }
.vacation-year-comparison { overflow-x: auto; }
.vacation-year-comparison table { min-width: 420px; width: 100%; border-collapse: collapse; }
.vacation-year-comparison th, .vacation-year-comparison td { padding: 8px 10px; border: 1px solid var(--border); text-align: left; font-size: 12px; }
.vacation-year-comparison th { background: var(--bg); color: var(--text); }
.vacation-year-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.vacation-year-fields label { display: grid; gap: 5px; color: var(--text-muted); font-size: 11px; font-weight: 650; }
.vacation-year-fields input { min-height: 34px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); font: inherit; }
.vacation-year-attachments { padding-top: 12px; border-top: 1px solid var(--border); }
.vacation-year-attachments h4 { margin: 0 0 10px; font-size: 13px; }
.vacation-year-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.vacation-year-upload input { max-width: 100%; color: var(--text-muted); font-size: 11px; }
.vacation-year-attachments ul { display: grid; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.vacation-year-attachments li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 11px; }
@media (max-width: 640px) {
  .vacation-year-dialog { padding: 14px; }
  .vacation-year-header, .vacation-year-toolbar { align-items: stretch; flex-direction: column; }
  .vacation-year-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.attendance-toolbar input {
  min-height: 38px; padding: 8px 10px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--card-bg); color: var(--text); font-size: 14px;
}
.attendance-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0 14px; }
.attendance-toolbar label { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.attendance-table { min-width: 1800px !important; }
.attendance-history-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin: 8px 0 14px; }
.attendance-history-filters label { display: grid; gap: 5px; color: var(--text-muted); font-size: 13px; font-weight: 600; }
.attendance-history-filters input { min-height: 38px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--card-bg); color: var(--text); font: inherit; }
.attendance-history-summary { color: var(--text-muted); font-size: 13px; }
.attendance-history-table { min-width: 1200px !important; }
@media print {
  .attendance-history-filters { display: none !important; }
  .attendance-history-page-header { margin-bottom: 8px; }
  .attendance-history-table { min-width: 0 !important; }
}

.hr-agenda-layout { display: grid; grid-template-columns: 258px minmax(0, 1fr); min-height: min(820px, calc(100vh - 132px)); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff; }
.agenda-sidebar { display: flex; flex-direction: column; padding: 18px 15px 12px; border-right: 1px solid var(--border); background: #fff; }
.agenda-sidebar-brand { display: flex; align-items: center; gap: 9px; padding: 0 4px 16px; color: #263943; font-size: 13px; font-weight: 750; }
.agenda-brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; background: #176b67; color: #fff; font-size: 10px; }
.agenda-profile-card { display: grid; grid-template-columns: 42px minmax(0, 1fr) 28px; align-items: center; gap: 9px; padding: 10px 4px 15px; border-bottom: 1px solid var(--border); }
.agenda-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #e8f1ef; }
.agenda-profile-copy { display: grid; gap: 3px; min-width: 0; }
.agenda-profile-copy strong { overflow: hidden; color: #263943; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.agenda-profile-copy span { overflow: hidden; color: var(--text-muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.agenda-icon-button, .agenda-mini-header button, .agenda-nav-buttons button { border: 1px solid var(--accent); border-radius: 7px; background: var(--accent); color: #fff; cursor: pointer; }
.agenda-icon-button { width: 28px; height: 28px; }
.agenda-mini-header { display: flex; justify-content: space-between; align-items: center; margin: 16px 0 9px; color: #263943; font-size: 12px; }
.agenda-mini-header button { width: 26px; height: 25px; font-size: 18px; line-height: 1; }
.agenda-mini-header button, .agenda-nav-buttons button { border-color: #cbd5e4; background: #fff; color: var(--accent); }
.agenda-mini-calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.agenda-mini-weekday, .agenda-mini-day { display: grid; place-items: center; min-width: 0; aspect-ratio: 1; color: #64757a; font-size: 10px; }
.agenda-mini-day { border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.agenda-mini-day:hover { background: #edf3f2; }
.agenda-mini-day.is-selected { background: var(--accent); color: #fff; }
.agenda-mini-day.is-today:not(.is-selected) { box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent); font-weight: 700; }
.agenda-mini-day.is-outside { color: #b5bfc1; }
.agenda-team-section { margin-top: 22px; border-top: 1px solid var(--border); padding-top: 14px; }
.agenda-team-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.agenda-team-heading h3 { margin: 0; color: #263943; font-size: 12px; }
.agenda-team-heading span { color: var(--text-muted); font-size: 11px; }
.agenda-team-member { display: flex; align-items: center; gap: 8px; padding: 6px 2px; }
.agenda-team-member img, .agenda-team-avatar { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; object-fit: cover; background: #e8f1ef; }
.agenda-team-avatar { display: grid; place-items: center; color: #176b67; font-size: 10px; font-weight: 700; }
.agenda-team-member span { overflow: hidden; color: #44565a; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.agenda-sidebar-foot { margin-top: auto; padding: 16px 4px 0; color: #819093; font-size: 10px; }
.agenda-main { min-width: 0; padding: 20px 22px; background: #f8faf9; }
.agenda-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.agenda-date-nav, .agenda-nav-buttons, .agenda-toolbar-actions { display: flex; align-items: center; gap: 8px; }
.agenda-date-nav { flex-wrap: wrap; }
.agenda-nav-buttons button { min-width: 34px; height: 32px; padding: 0 9px; font-size: 13px; }
.agenda-nav-buttons button:hover, .agenda-mini-header button:hover { border-color: #9aabc5; background: #f1f5fb; color: var(--accent-dark); }
.agenda-icon-button:hover { border-color: var(--accent-dark); background: var(--accent-dark); }
.agenda-date-nav h2 { margin: 0 0 0 6px; color: #243b3a; font-size: 19px; font-weight: 650; }
.agenda-view-toggle { display: flex; padding: 2px; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.agenda-view-toggle button { border: 0; border-radius: 5px; padding: 6px 11px; background: transparent; color: var(--accent); cursor: pointer; font-size: 12px; }
.agenda-view-toggle button.active { background: var(--accent); color: #fff; }
#agenda-new-event { background: var(--accent); border-color: var(--accent); }
#agenda-new-event:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.agenda-calendar { min-width: 0; }
.agenda-week-scroll { overflow-x: auto; border: 1px solid #dfe7e5; border-radius: 6px; background: #fff; }
.agenda-week-grid { display: grid; grid-template-columns: 54px repeat(7, minmax(100px, 1fr)); min-width: 820px; }
.agenda-week-head { position: sticky; top: 0; z-index: 3; display: contents; }
.agenda-week-corner, .agenda-week-day-head { position: sticky; top: 0; z-index: 2; min-height: 54px; border-bottom: 1px solid #dfe7e5; background: #fff; }
.agenda-week-day-head { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-left: 1px solid #edf0ef; color: #5e7073; font-size: 10px; text-transform: uppercase; }
.agenda-week-day-head strong { color: #263b3a; font-size: 17px; font-weight: 650; }
.agenda-week-day-head.is-today strong { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: var(--accent); color: #fff; }
.agenda-week-axis { position: relative; grid-column: 1; grid-row: 2; color: #7b898b; font-size: 10px; }
.agenda-week-axis span { position: absolute; right: 7px; transform: translateY(-50%); }
.agenda-week-days { grid-column: 2 / -1; grid-row: 2; display: grid; grid-template-columns: repeat(7, minmax(100px, 1fr)); }
.agenda-week-day { position: relative; min-height: 840px; border-left: 1px solid #edf0ef; background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 55px, #edf0ef 56px); }
.agenda-week-event { position: absolute; z-index: 1; left: 4px; right: 4px; overflow: hidden; padding: 7px 8px; border: 0; border-radius: 6px; background: var(--event-color); color: var(--event-text); box-shadow: 0 2px 5px #17264f20; text-align: left; cursor: pointer; }
.agenda-week-event strong { display: block; overflow: hidden; font-size: 12px; font-weight: 750; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.agenda-week-event .agenda-event-time { display: block; margin-top: 3px; overflow: hidden; color: inherit; font-size: 10px; opacity: .82; text-overflow: ellipsis; white-space: nowrap; }
.agenda-event-assignees { display: flex !important; align-items: center; gap: 5px; margin-top: 5px !important; overflow: hidden; color: inherit !important; font-size: 9px !important; opacity: .95; }
.agenda-event-avatars, .agenda-month-avatars { display: inline-flex; align-items: center; flex: 0 0 auto; padding-left: 2px; }
.agenda-event-avatar { display: grid; place-items: center; width: 23px; height: 23px; flex: 0 0 23px; margin-left: -3px; overflow: hidden; border: 2px solid color-mix(in srgb, var(--event-color) 72%, white); border-radius: 50%; background: #fff; object-fit: cover; }
.agenda-event-avatar-initials { color: #243b3a; font-size: 8px; font-weight: 750; }
.agenda-event-avatar-extra { color: #243b3a; font-size: 8px; }
.agenda-week-event.is-completed, .agenda-month-event.is-completed { opacity: .58; }
.agenda-week-event.is-completed strong, .agenda-month-event.is-completed { text-decoration: line-through; }
.agenda-month-view { overflow-x: auto; border: 1px solid #dfe7e5; border-radius: 6px; background: #fff; }
.agenda-month-grid { display: grid; grid-template-columns: repeat(7, minmax(100px, 1fr)); min-width: 700px; }
.agenda-month-weekday { padding: 9px 6px; border-bottom: 1px solid #dfe7e5; color: #748285; font-size: 10px; font-weight: 700; text-align: center; text-transform: uppercase; }
.agenda-month-cell { min-height: 112px; padding: 6px; border-right: 1px solid #edf0ef; border-bottom: 1px solid #edf0ef; cursor: pointer; }
.agenda-month-cell:nth-child(7n) { border-right: 0; }
.agenda-month-cell.is-outside { background: #fafbfb; }
.agenda-month-cell.is-selected { box-shadow: inset 0 0 0 2px #176b67; }
.agenda-month-date { display: grid; place-items: center; width: 24px; height: 24px; margin-bottom: 4px; color: #405052; font-size: 11px; }
.agenda-month-date.is-today { border-radius: 50%; background: #176b67; color: #fff; }
.agenda-month-event { display: flex; justify-content: space-between; align-items: center; gap: 4px; width: 100%; min-height: 28px; overflow: hidden; margin: 3px 0; padding: 4px 5px; border: 0; border-radius: 4px; background: var(--event-color); color: var(--event-text); text-align: left; cursor: pointer; }
.agenda-month-event-title { min-width: 0; overflow: hidden; font-size: 10px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.agenda-month-avatar { display: grid; place-items: center; width: 19px; height: 19px; flex: 0 0 19px; margin-left: -3px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--event-color) 72%, white); border-radius: 50%; background: #fff; object-fit: cover; color: #243b3a; font-size: 7px; font-weight: 750; }
.agenda-month-event .agenda-month-avatars { max-width: 46px; }
.agenda-month-more { color: #748285; font-size: 9px; }
.agenda-empty { padding: 35px 16px; color: var(--text-muted); font-size: 13px; text-align: center; }

@media (max-width: 900px) {
  .hr-agenda-layout { grid-template-columns: 1fr; }
  .agenda-sidebar { display: grid; grid-template-columns: minmax(190px, .8fr) minmax(220px, 1.2fr); gap: 0 20px; border-right: 0; border-bottom: 1px solid var(--border); }
  .agenda-sidebar-brand, .agenda-profile-card, .agenda-sidebar-foot { grid-column: 1 / -1; }
  .agenda-mini-header { grid-column: 1; }
  .agenda-mini-calendar { grid-column: 1; }
  .agenda-team-section { grid-column: 2; grid-row: 2 / span 2; margin-top: 12px; border-top: 0; }
  .agenda-main { padding: 16px; }
}
@media (max-width: 560px) {
  .agenda-sidebar { grid-template-columns: 1fr; }
  .agenda-mini-header, .agenda-mini-calendar, .agenda-team-section { grid-column: 1; grid-row: auto; }
  .agenda-mini-calendar { max-width: 310px; }
  .agenda-team-section { margin-top: 12px; border-top: 1px solid var(--border); }
  .agenda-main { padding: 12px 9px; }
  .agenda-date-nav h2 { font-size: 16px; }
  .agenda-toolbar-actions { width: 100%; justify-content: space-between; }
}
.view-toggle { display: flex; gap: 2px; background: var(--card-bg); border: 1px solid var(--border); border-radius: 8px; padding: 2px; }
.view-toggle-btn { border: none; background: none; padding: 6px 10px; border-radius: 6px; cursor: pointer; font-size: 14px; color: var(--text-muted); }
.view-toggle-btn.active { background: var(--accent); color: white; }

.mosaic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.mosaic-card { min-width: 0; background: var(--card-bg); border: 1px solid var(--border); border-radius: 8px; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.mosaic-card-image { display: block; width: 76px; height: 76px; flex: 0 0 76px; object-fit: cover; border-radius: 50%; border: 2px solid #d2e6e2; background: #e8f2f0; }
.mosaic-card-title { font-weight: 700; font-size: 14.5px; }
.mosaic-card-subtitle { font-size: 12.5px; color: var(--text-muted); margin-top: -4px; }
.mosaic-card-badges { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0; }
.mosaic-card-fields { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.mosaic-card-field { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.mosaic-card-field span { color: var(--text-muted); }
.mosaic-card-field strong { text-align: right; font-weight: 600; }
.mosaic-card-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.empty-state-text { color: var(--text-muted); font-size: 13.5px; padding: 24px; text-align: center; grid-column: 1 / -1; }

.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px; margin-top: 8px; }
.menu-card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px;
  padding: 24px 16px; text-align: center; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  transition: box-shadow .15s, transform .15s;
}
.menu-card:hover { box-shadow: 0 8px 20px rgba(20,25,40,.08); transform: translateY(-2px); }
.menu-card-icon {
  width: 56px; height: 56px; border-radius: 12px; display: flex; align-items: center;
  justify-content: center; font-size: 26px;
}
.menu-card-title { font-weight: 700; font-size: 14px; }
.menu-card-desc { font-size: 12px; color: var(--text-muted); line-height: 1.4; }

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--accent); color: white; border: 1px solid var(--accent); padding: 9px 15px;
  border-radius: 7px; box-shadow: 0 2px 4px rgba(35, 55, 94, .12);
  font-size: 13px; font-weight: 650; line-height: 1.2; white-space: nowrap; cursor: pointer;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); box-shadow: 0 3px 8px rgba(35, 55, 94, .18); }
.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: #fff; color: var(--accent); border: 1px solid #cbd5e4;
  padding: 6px 10px; border-radius: 7px; box-shadow: 0 1px 2px rgba(31, 41, 55, .04);
  font-size: 12px; font-weight: 600; line-height: 1.25; white-space: nowrap; cursor: pointer;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease;
}
.btn-secondary:hover { background: #f1f5fb; border-color: #9aabc5; color: var(--accent-dark); }
.btn-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: #fff; color: #b42318; border: 1px solid #f0c4c0;
  padding: 6px 10px; border-radius: 7px; font-size: 12px; font-weight: 600;
  line-height: 1.25; white-space: nowrap; cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.btn-danger:hover { background: #fff1f0; border-color: #df9b95; color: #912018; }
.btn-primary:focus-visible, .btn-secondary:focus-visible, .btn-danger:focus-visible,
#modal-close:focus-visible { outline: 3px solid #91b5ed; outline-offset: 2px; }
.btn-primary:disabled, .btn-secondary:disabled, .btn-danger:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.toast-stack { position: fixed; z-index: 1000; top: 72px; right: 20px; display: grid; gap: 8px; width: min(360px, calc(100vw - 32px)); }
.toast { background: #fff; border: 1px solid #e7b1ad; border-left: 4px solid var(--danger); border-radius: 6px; box-shadow: 0 8px 24px #1e243322; padding: 12px 14px; font-size: 13px; }
.toast strong { display: block; margin-bottom: 3px; }

.dashboard-page { width: min(100%, 1480px); margin: 0 auto; padding-bottom: 20px; animation: dashboard-enter .35s ease-out both; }
@keyframes dashboard-enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.dashboard-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 20px; }
.dashboard-eyebrow { margin: 0 0 4px; color: #96700a; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.dashboard-heading h2 { margin: 0; font-size: 25px; color: #192344; }
.dashboard-period { margin: 5px 0 0; color: var(--text-muted); font-size: 12.5px; }
.dashboard-heading-actions { display: flex; align-items: center; gap: 10px; }
.dashboard-heading-actions .btn-primary, .dashboard-heading-actions .btn-secondary { flex: 0 0 auto; }
.dashboard-history-control { display: flex; align-items: center; gap: 7px; color: var(--text-muted); font-size: 11px; }
.dashboard-history-control select { max-width: 180px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: #293456; font: inherit; }
.dashboard-overview { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.headcount-panel, .gender-panel { min-height: 176px; border: 1px solid #e4e8f0; border-radius: 8px; background: #fff; }
.headcount-panel { position: relative; display: flex; flex-direction: column; justify-content: center; overflow: hidden; padding: 20px 22px; background: #17264f; color: #fff; border-color: #17264f; box-shadow: 0 8px 20px rgba(23,38,79,.16); }
.headcount-panel-active { background: #00b84a; border-color: #00a542; box-shadow: 0 8px 20px rgba(0,184,74,.2); }
.headcount-panel-leave { background: #f5a400; border-color: #df9300; box-shadow: 0 8px 20px rgba(245,164,0,.2); }
.headcount-label { position: relative; z-index: 1; color: rgba(255,255,255,.84); font-size: 12px; font-weight: 600; }
.headcount-panel > strong { position: relative; z-index: 1; margin: 7px 0 13px; color: #fff; font-size: 48px; line-height: 1; font-variant-numeric: tabular-nums; }
.headcount-foot { position: relative; z-index: 1; display: flex; align-items: center; gap: 7px; color: rgba(255,255,255,.86); font-size: 12px; }
.headcount-sparkline { position: absolute; right: 12px; bottom: 9px; width: 68%; height: 42px; overflow: visible; opacity: .38; }
.headcount-sparkline path:first-child { fill: none; stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; }
.headcount-sparkline path:last-child { fill: none; stroke: rgba(255,255,255,.7); stroke-width: 1; vector-effect: non-scaling-stroke; }
.headcount-dot { width: 7px; height: 7px; border-radius: 50%; background: #54d5a8; }
.gender-panel { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 20px; border-top: 3px solid #c953d7; }
.gender-male-panel { border-top-color: #10aeba; }
.gender-copy { min-width: 0; display: flex; flex-direction: column; }
.gender-kicker { color: var(--text-muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.gender-copy h3 { margin: 4px 0 2px; color: #2a3150; font-size: 15px; }
.gender-count { color: #202944; font-size: 29px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.gender-share { margin-top: 5px; color: var(--text-muted); font-size: 11px; }
.gender-ring { --gender-fill: 0%; --gender-color: #c953d7; width: 120px; aspect-ratio: 1; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--gender-color) 0 var(--gender-fill), #e4e7ed var(--gender-fill) 100%); transform: rotate(-90deg); }
.gender-ring-male { --gender-color: #10aeba; }
.gender-ring-center { width: 82%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: #fff; transform: rotate(90deg); }
.gender-ring-center svg { width: 48px; height: 48px; fill: var(--gender-color); }
.dashboard-kpis, .dashboard-charts { margin-top: 20px; }
.dashboard-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.dashboard-section-heading h3 { margin: 0; color: #222a45; font-size: 15px; }
.dashboard-section-heading > span { color: var(--text-muted); font-size: 11px; }
.kpi-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.kpi-card { min-height: 88px; padding: 14px 15px; border: 1px solid #e3e7ef; border-left: 3px solid #485c9a; border-radius: 6px; background: #fff; }
.kpi-card .kpi-value { color: #1c2746; font-size: 23px; font-weight: 750; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-card .kpi-label { margin-top: 7px; color: var(--text-muted); font-size: 11px; line-height: 1.25; }
.kpi-teal, .kpi-blue, .kpi-purple, .kpi-cyan, .kpi-green, .kpi-orange { border-left-color: #4961af; }
.kpi-warning { border-left-color: #eab308; }
.secondary-kpi-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.secondary-kpi { min-height: 59px; display: flex; flex-direction: column; justify-content: space-between; gap: 7px; padding: 11px 14px; border: 1px solid #e3e7ef; border-radius: 9px; background: linear-gradient(145deg, #fff, #f8faff); box-shadow: 0 3px 10px #26345d0a; }
.secondary-kpi span { color: var(--text-muted); font-size: 10.5px; line-height: 1.3; }
.secondary-kpi strong { color: #293456; font-size: 16px; font-variant-numeric: tabular-nums; }
.secondary-kpi-critical { border-color: #b42318; background: #c62828; box-shadow: 0 5px 16px #b4231833; }
.secondary-kpi-critical span, .secondary-kpi-critical strong { color: #fff; }
.secondary-kpi-high { border-color: #c65d00; background: linear-gradient(145deg, #f79009, #c65d00); box-shadow: 0 5px 16px #c65d0033; }
.secondary-kpi-high span, .secondary-kpi-high strong { color: #fff; }
.secondary-kpi-green { border-color: #16764e; background: linear-gradient(145deg, #16875a, #116b48); box-shadow: 0 5px 16px #16764e33; }
.secondary-kpi-green span, .secondary-kpi-green strong { color: #fff; }
.secondary-kpi-warning { border-color: #b77900; background: linear-gradient(145deg, #e9a800, #c88700); box-shadow: 0 5px 16px #b7790033; }
.secondary-kpi-warning span, .secondary-kpi-warning strong { color: #fff; }
.secondary-kpi-teal, .secondary-kpi-blue { border-color: #4961af; background: linear-gradient(145deg, #eef1ff, #dfe5ff); }
.secondary-kpi-teal strong, .secondary-kpi-blue strong { color: #344b9a; }
.chart-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-areas: "requests requests requests" "hiring expedientes trainings";
  align-items: stretch; gap: 14px;
}
.chart-card { min-width: 0; background: linear-gradient(155deg, #fff, #fbfcff); border: 1px solid #e3e7ef; border-radius: 12px; padding: 17px 19px; box-shadow: 0 5px 18px #26345d0b; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.chart-card-hiring { grid-area: hiring; display: flex; flex-direction: column; background: linear-gradient(145deg, #fff, #f5f7fc); border-color: #dce4f1; box-shadow: 0 8px 24px rgba(48,74,123,.1); }
.chart-card.chart-card-hiring canvas { width: 100% !important; height: 220px !important; }
.chart-card-requests { grid-area: requests; background: linear-gradient(145deg, #fff, #f4f7fc); border-color: #dce4f1; box-shadow: 0 8px 24px rgba(48,74,123,.1); }
.chart-card.chart-card-requests canvas { height: 250px !important; filter: drop-shadow(0 4px 5px rgba(48,74,123,.12)); }
.chart-card-expedientes { grid-area: expedientes; display: flex; flex-direction: column; background: linear-gradient(145deg, #fff, #f4f7fc); border-color: #dce4f1; box-shadow: 0 8px 24px rgba(48,74,123,.1); }
.chart-card.chart-card-expedientes canvas { flex: 1; width: 100% !important; min-height: 190px; max-height: 220px; filter: drop-shadow(0 4px 5px rgba(48,74,123,.12)); }
.chart-card-trainings { grid-area: trainings; display: flex; flex-direction: column; }
.training-rings { display: flex; flex: 1; min-height: 220px; align-items: center; justify-content: center; gap: clamp(22px, 4vw, 48px); }
.training-ring-item { display: grid; justify-items: center; gap: 5px; }
.training-ring {
  position: relative; width: clamp(68px, 7vw, 88px); height: clamp(68px, 7vw, 88px);
  filter: drop-shadow(0 2px 4px rgba(48,74,123,.14));
}
.training-ring svg { display: block; width: 100%; height: 100%; transform: rotate(-90deg); }
.training-ring circle { fill: none; stroke-width: 4; }
.training-ring-track { stroke: #e7ebf2; }
.training-ring-progress {
  stroke: var(--training-ring-color); stroke-linecap: round; stroke-dasharray: 100;
  animation: training-ring-fill 1.1s cubic-bezier(.22,.8,.3,1) both;
}
.training-ring-item:nth-child(2) .training-ring-progress { animation-delay: .15s; }
@keyframes training-ring-fill { from { stroke-dashoffset: 100; } to { stroke-dashoffset: var(--training-ring-offset); } }
.training-ring > span { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text); font-size: 11px; font-weight: 750; }
.training-ring-label { color: var(--text-muted); font-size: 10px; font-weight: 650; }
.training-ring-count { color: var(--text-muted); font-size: 9px; }
.chart-card:hover { border-color: #cbd4eb; box-shadow: 0 9px 24px #26345d14; transform: translateY(-2px); }
.chart-card h3 { margin: 0 0 14px; color: #293456; font-size: 13px; font-weight: 700; }
.chart-card canvas { width: 100%; height: 220px !important; }

@media (max-width: 1100px) {
  .dashboard-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .headcount-panel { min-height: 125px; }
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .secondary-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .users-admin-layout, .roles-admin-layout, .compensatory-layout { grid-template-columns: minmax(0, 1fr); }
  .user-create-card { width: min(100%, 340px); }
  .chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: "requests requests" "hiring expedientes" "trainings trainings";
  }
  .chart-card.chart-card-requests canvas { height: 220px !important; }
  .chart-card-trainings .training-rings { gap: clamp(40px, 10vw, 90px); }
}
@media (max-width: 640px) {
  .dashboard-heading { align-items: flex-start; }
  .dashboard-heading h2 { font-size: 22px; }
  .dashboard-heading-actions { flex-wrap: wrap; justify-content: flex-end; }
  .dashboard-heading-actions .btn-primary, .dashboard-heading-actions .btn-secondary { padding: 8px 10px; font-size: 12px; }
  .dashboard-overview { grid-template-columns: minmax(0, 1fr); }
  .headcount-panel { grid-column: auto; min-height: 118px; }
  .gender-panel { min-height: 146px; padding: 14px 16px; }
  .gender-ring { width: 104px; }
  .gender-ring-center svg { width: 41px; height: 41px; }
  .kpi-grid, .secondary-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-card { min-height: 78px; padding: 12px; }
  .kpi-card .kpi-value { font-size: 20px; }
  .secondary-kpi { min-height: 64px; }
  .chart-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "requests" "hiring" "expedientes" "trainings";
  }
  .chart-card.chart-card-hiring canvas { height: 210px !important; }
  .chart-card.chart-card-expedientes canvas { min-height: 190px; max-height: 210px; }
  .chart-card-trainings .training-rings { min-height: 190px; gap: 28px; }
  .dashboard-section-heading > span { text-align: right; }
}

.table-wrap { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.table-wrap-scroll { overflow-x: auto; }
.table-wrap-scroll > table { min-width: 1200px; }
.employee-table-wrap { overflow-x: auto; scrollbar-color: #aebbd0 #eef1f5; scrollbar-width: auto; }
.employee-table-wrap > table { min-width: 1420px; }
.employee-table-wrap::-webkit-scrollbar { height: 12px; }
.employee-table-wrap::-webkit-scrollbar-track { border-top: 1px solid #e3e7ee; border-radius: 0 0 12px 12px; background: #f1f3f7; }
.employee-table-wrap::-webkit-scrollbar-thumb { border: 3px solid #f1f3f7; border-radius: 10px; background: #aebbd0; }
.employee-table-wrap::-webkit-scrollbar-thumb:hover { background: #8798b3; }
.table-wrap td button { margin: 2px 3px 2px 0; }
.transfers-table-wrap { max-height: min(68vh, 720px); overflow: auto; }
.transfers-table-wrap > table { min-width: 1250px; }
.transfer-history-overlay { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(15,18,28,.55); }
.transfer-history-sheet { display: flex; flex-direction: column; width: min(1280px, 100%); height: min(88vh, 900px); padding: 24px; border-radius: 14px; background: var(--card-bg); box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.transfer-history-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.transfer-history-header h2 { margin: 0; }
.transfer-history-header p { margin: 6px 0 0; color: var(--text-muted); }
.transfer-history-table-wrap { flex: 1; min-height: 0; overflow: auto; }
.transfer-history-table-wrap > table { min-width: 1000px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--text-muted); font-weight: 600; font-size: 12.5px; text-transform: uppercase; }
tr:last-child td { border-bottom: none; }
.empty-row td { text-align: center; color: var(--text-muted); padding: 24px; white-space: normal; }

.badge { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; color: white; }
.badge-critico { background: var(--sem-critico); }
.badge-alto { background: var(--sem-alto); }
.badge-medio { background: var(--sem-medio); color: #4a3a00; }
.badge-normal { background: var(--sem-normal); }
.badge-gray { background: #9aa2b1; }
.badge-permanente { background: #4f6df5; }
.badge-contrato { background: #f0913c; }
.badge-servicios_profesionales { background: #0f9d8a; }
.badge-consultoria { background: #8b5cf6; }
.badge-servicios_profesionales { background: #9b59b6; }

.checklist-group { margin-bottom: 16px; }
.checklist-group h4 { margin: 0 0 8px; font-size: 12.5px; text-transform: uppercase; color: var(--text-muted); }
.checklist-item { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 13.5px; }
.checklist-item input[type=checkbox] { width: 16px; height: 16px; }
.checklist-item.na { opacity: .55; }
.checklist-na-toggle { font-size: 11px; color: var(--accent); background: none; border: none; cursor: pointer; margin-left: auto; }
.request-evidence-panel { margin-top: 8px; padding: 16px; border: 1px solid var(--border); border-radius: 10px; background: #f8faff; }
.request-evidence-panel > p { margin: 0 0 12px; color: var(--text-muted); font-size: 12px; line-height: 1.5; }
.file-upload-field { display: grid; gap: 8px; color: var(--text-muted); font-size: 12px; font-weight: 650; }
.file-upload-label {
  position: relative; display: block; width: min(100%, 360px); min-height: 154px; overflow: hidden;
  padding: 20px; border: 2px dashed #525252; border-radius: 24px; background: #ddd;
  box-shadow: 0 8px 24px -14px rgba(0,0,0,.72); color: #303030; cursor: pointer;
  transition: background-color .2s, border-color .2s, box-shadow .2s;
}
.file-upload-label:hover { background: #e7e7e7; border-color: var(--accent); box-shadow: 0 10px 26px -12px rgba(0,0,0,.45); }
.file-upload-label:focus-within { outline: 3px solid #78a8ee; outline-offset: 3px; }
.file-upload-input { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-upload-input:disabled { cursor: not-allowed; }
.file-upload-design { display: flex; min-height: 110px; flex-direction: column; align-items: center; justify-content: center; gap: 7px; text-align: center; }
.file-upload-design svg { width: 34px; height: 34px; margin-bottom: 2px; fill: #525252; }
.file-upload-prompt { font-size: 12px; font-weight: 600; }
.browse-button { padding: 6px 14px; border-radius: 9px; background: #525252; color: #fff; font-size: 12px; font-weight: 600; transition: background-color .2s; }
.file-upload-label:hover .browse-button { background: #0e0e0e; }
.file-upload-name { max-width: 100%; overflow: hidden; color: #525252; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.file-upload-input:disabled ~ .file-upload-design { opacity: .55; }
.ef-photo-actions .file-upload-label { width: min(100%, 250px); min-height: 136px; padding: 12px; border-radius: 18px; }
.ef-photo-actions .file-upload-design { min-height: 108px; }
.request-evidence-upload { margin-bottom: 12px; }
.request-evidence-item { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 0 0; border-top: 1px solid #e4e9f1; font-size: 12px; }
.request-evidence-item span { flex: 1 1 220px; overflow-wrap: anywhere; }
.request-evidence-item small { color: var(--text-muted); }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(15,18,28,.5);
  display: flex; align-items: center; justify-content: center; z-index: 50;
}
.modal { background: white; border-radius: 12px; width: 420px; max-width: 92vw; max-height: 88vh; overflow-y: auto; }
.modal.modal-wide { width: 640px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-header h3 { margin: 0; font-size: 16px; }
#modal-close { border: none; background: none; font-size: 16px; cursor: pointer; color: var(--text-muted); }
#modal-form { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
#modal-form label { font-size: 13px; color: var(--text-muted); display: flex; flex-direction: column; gap: 5px; }
#modal-form input, #modal-form select, #modal-form textarea {
  padding: 9px 10px; border: 1px solid var(--border); border-radius: 7px; font-size: 14px; font-family: inherit;
}
#modal-form .form-error { color: var(--danger); font-size: 13px; min-height: 16px; }
#modal-form .modal-section { margin: 6px 0 -4px; font-size: 12px; text-transform: uppercase; color: var(--text-muted); border-top: 1px solid var(--border); padding-top: 12px; }
#modal-form .modal-section:first-child { border-top: none; padding-top: 0; }
#modal-form label.checkbox-field { flex-direction: row; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text); }
#modal-form label.checkbox-field input { width: 16px; height: 16px; }

.ef-section { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; margin-bottom: 16px; }
.ef-section h3 { margin: 0 0 14px; font-size: 14px; color: var(--text); border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.ef-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.ef-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; padding: 10px 0; border-top: 1px dashed var(--border); }
.ef-row:first-of-type { border-top: none; }
.ef-field { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--text-muted); }
.ef-field input, .ef-field textarea { padding: 8px 10px; border: 1px solid var(--border); border-radius: 7px; font-size: 13.5px; font-family: inherit; color: var(--text); }
.ef-field.ef-checkbox-field { flex-direction: row; align-items: center; gap: 8px; min-height: 38px; color: var(--text); }
.ef-checkbox-field input[type="checkbox"] { width: 16px; height: 16px; margin: 0; padding: 0; }
.ef-field textarea { min-height: 60px; resize: vertical; }
.ef-photo-row { display: flex; align-items: center; gap: 18px; }
.ef-photo-preview { width: 96px; height: 96px; border-radius: 10px; object-fit: cover; border: 1px solid var(--border); background: var(--bg); }
.ef-photo-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
#modal-form button[type=submit] {
  align-self: flex-start; margin-top: 4px; padding: 9px 16px; border: 1px solid var(--accent); border-radius: 7px;
  background: var(--accent); color: white; font-size: 13px; font-weight: 650; cursor: pointer;
}
#modal-form button[type=submit]:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

body.dark-theme {
  --bg: #101d38;
  --sidebar-bg: #17264f;
  --sidebar-text: #d3def0;
  --card-bg: #1b2d4c;
  --border: #34496d;
  --text: #edf2fb;
  --text-muted: #b4c1d8;
  color-scheme: dark;
}
body.dark-theme .app,
body.dark-theme .content,
body.dark-theme .workspace-bar { background: var(--bg); color: var(--text); }
body.dark-theme .topbar { border-color: var(--border); box-shadow: 4px 0 18px rgba(0,0,0,.3); }
body.dark-theme .topbar-brand,
body.dark-theme .workspace-user .current-user,
body.dark-theme .dashboard-heading h2,
body.dark-theme .dashboard-section-heading h3,
body.dark-theme .gender-copy h3,
body.dark-theme .gender-count,
body.dark-theme .kpi-card .kpi-value,
body.dark-theme .secondary-kpi strong,
body.dark-theme .chart-card h3,
body.dark-theme .agenda-sidebar-brand,
body.dark-theme .agenda-profile-copy strong,
body.dark-theme .agenda-mini-header,
body.dark-theme .agenda-team-heading h3,
body.dark-theme .agenda-team-member span,
body.dark-theme .agenda-date-nav h2 { color: var(--text); }
body.dark-theme .dashboard-eyebrow { color: #e0b84f; }
body.dark-theme .workspace-bar { border-color: var(--border); }
body.dark-theme .notification-panel,
body.dark-theme .menu-card,
body.dark-theme .mosaic-card,
body.dark-theme .kpi-card,
body.dark-theme .gender-panel,
body.dark-theme .chart-card,
body.dark-theme .table-wrap,
body.dark-theme .modal,
body.dark-theme .transfer-history-sheet,
body.dark-theme .ef-section,
body.dark-theme .hr-agenda-layout,
body.dark-theme .agenda-sidebar,
body.dark-theme .agenda-week-scroll,
body.dark-theme .agenda-week-corner,
body.dark-theme .agenda-week-day-head,
body.dark-theme .agenda-view-toggle,
body.dark-theme .view-toggle,
body.dark-theme .list-toolbar .view-toggle,
body.dark-theme .search-input,
body.dark-theme .list-toolbar .category-filter,
body.dark-theme .attendance-toolbar select,
body.dark-theme .attendance-toolbar input,
body.dark-theme .agenda-main,
body.dark-theme .request-evidence-panel,
body.dark-theme #modal-form input,
body.dark-theme #modal-form select,
body.dark-theme #modal-form textarea,
body.dark-theme .ef-field input,
body.dark-theme .ef-field textarea {
  background-color: var(--card-bg);
  color: var(--text);
  border-color: var(--border);
}
body.dark-theme .chart-card,
body.dark-theme .secondary-kpi:not(.secondary-kpi-critical):not(.secondary-kpi-high):not(.secondary-kpi-green):not(.secondary-kpi-warning):not(.secondary-kpi-teal):not(.secondary-kpi-blue) {
  background: var(--card-bg);
}
body.dark-theme .chart-card-requests { border-color: var(--border); }
body.dark-theme .chart-card-requests canvas { filter: drop-shadow(0 4px 5px rgba(0,0,0,.2)); }
body.dark-theme .chart-card-hiring { background: linear-gradient(145deg, var(--card-bg), #172235); border-color: var(--border); }
body.dark-theme .chart-card-hiring canvas { filter: none; }
body.dark-theme .chart-card-expedientes { background: linear-gradient(145deg, var(--card-bg), #172235); border-color: var(--border); }
body.dark-theme .chart-card-expedientes canvas { filter: drop-shadow(0 4px 5px rgba(0,0,0,.2)); }
body.dark-theme .training-ring-track { stroke: #354257; }
@media (prefers-reduced-motion: reduce) {
  .training-ring-progress { animation: none; stroke-dashoffset: var(--training-ring-offset); }
}
body.dark-theme .agenda-main { background: #172235; }
body.dark-theme .agenda-week-day-head strong,
body.dark-theme .agenda-date-nav h2 { color: var(--text); }
body.dark-theme .agenda-mini-day:hover,
body.dark-theme .list-toolbar .view-toggle,
body.dark-theme .list-toolbar .view-toggle-btn.active { background: #2b3a50; }
body.dark-theme .role-card-heading .role-system-badge { background: #263b60; color: #c5d5f2; }
body.dark-theme .agenda-view-toggle button { color: #c6d0e0; }
body.dark-theme th { background: #202d40; color: #c1cbda; }
body.dark-theme td,
body.dark-theme .request-evidence-item { border-color: var(--border); }
body.dark-theme .file-upload-label { background: #26354b; border-color: #71809a; color: var(--text); }
body.dark-theme .file-upload-label:hover { background: #30435e; border-color: #91a9d1; }
body.dark-theme .file-upload-design svg,
body.dark-theme .file-upload-name { fill: #d0d8e6; color: #d0d8e6; }
body.dark-theme .browse-button { background: #405675; }
body.dark-theme .file-upload-label:hover .browse-button { background: #172235; }
body.dark-theme .user-avatar { background: #293950; border-color: var(--border); color: #e5eaf2; }
