:root {
  --bg: #f6f4fb;
  --card: #ffffff;
  --sidebar: #111827;
  --sidebar-hover: #1f2937;
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --text: #172033;
  --muted: #7a8499;
  --border: #e7eaf0;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --info: #0284c7;
  --shadow: 0 8px 24px rgba(20, 30, 55, .06);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.session-message { margin: 0 0 16px; padding: 11px 13px; border: 1px solid rgba(220,38,38,.25); border-radius: 10px; background: rgba(220,38,38,.08); color: var(--danger); font-size: 13px; }
.session-idle-backdrop { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 20px; background: rgba(15, 18, 32, .52); backdrop-filter: blur(5px); }
.session-idle-card { width: min(440px, 100%); padding: 30px; border: 1px solid var(--border); border-radius: 20px; background: var(--card); color: var(--text); box-shadow: 0 24px 80px rgba(15, 18, 32, .24); animation: sessionPromptIn .22s ease-out both; }
.session-idle-icon { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 14px; background: rgba(79,70,229,.12); color: var(--primary); font-size: 24px; }
.session-idle-card h2 { margin: 18px 0 8px; font-size: 22px; }
.session-idle-card p { margin: 0; color: var(--muted); line-height: 1.55; }
.session-idle-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.session-idle-actions button { min-height: 42px; }
@keyframes sessionPromptIn { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at top left, #e9e7ff, transparent 35%), var(--bg);
}
.login-card {
  width: min(430px, 92vw);
  background: var(--card);
  padding: 42px;
  border-radius: 22px;
  box-shadow: 0 20px 60px rgba(20, 30, 55, .12);
}
.brand-mark {
  width: 52px; height: 52px; border-radius: 15px;
  display: grid; place-items: center;
  background: var(--primary); color: white; font-weight: 800;
  margin-bottom: 18px;
}
.brand-mark.small { width: 38px; height: 38px; border-radius: 11px; margin: 0; font-size: 13px; }
.login-card h1 { margin: 0 0 8px; font-size: 28px; }
.muted { color: var(--muted); }
.login-card label { display: block; margin: 20px 0 7px; font-size: 13px; font-weight: 600; }
.login-card input {
  width: 100%; padding: 13px 14px; border: 1px solid var(--border);
  border-radius: 10px; outline: none;
}
.login-card input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,.1); }
.primary-btn {
  border: 0; background: var(--primary); color: white; padding: 12px 18px;
  border-radius: 9px; font-weight: 700;
}
.primary-btn:hover { background: var(--primary-dark); }
.secondary-action-btn {
  border: 1px solid var(--primary);
  background: white;
  color: var(--primary);
  padding: 12px 18px;
  border-radius: 9px;
  font-weight: 700;
}
.secondary-action-btn:hover { background: #f5f6ff; }
.full { width: 100%; margin-top: 24px; }
.demo-note { font-size: 12px; color: var(--muted); margin-top: 22px; line-height: 1.5; }

.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 250px; background: var(--sidebar); color: #e5e7eb; padding: 20px 14px;
  position: fixed; left: 0; top: 0; bottom: 0; display: flex; flex-direction: column;
}
.sidebar-brand { display: flex; gap: 11px; align-items: center; padding: 4px 10px 25px; }
.sidebar-brand strong { display: block; color: white; font-size: 17px; }
.sidebar-brand span { display: block; color: #9ca3af; font-size: 10px; margin-top: 2px; }
.nav-label { font-size: 10px; letter-spacing: .12em; color: #6b7280; padding: 12px 12px 6px; }
.nav-item {
  width: 100%; border: 0; background: transparent; color: #cbd5e1;
  text-align: left; padding: 11px 12px; border-radius: 9px; margin: 2px 0;
  display: flex; gap: 11px; align-items: center; font-size: 13px;
}
.nav-item:hover { background: var(--sidebar-hover); color: white; }
.nav-item.active { background: #312e81; color: white; }
.sidebar-bottom { margin-top: auto; border-top: 1px solid #273244; padding-top: 12px; }
.logout { color: #fca5a5; }

.main { margin-left: 250px; width: calc(100% - 250px); }
.topbar {
  height: 72px; background: white; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 30px;
  position: sticky; top: 0; z-index: 10;
}
.breadcrumb { font-size: 13px; color: var(--muted); }
.top-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn { border: 0; background: transparent; color: #657089; font-size: 18px; padding: 7px; border-radius: 8px; }
.icon-btn:hover { background: #f1f3f7; }
.user-chip { display: flex; align-items: center; gap: 9px; margin-left: 8px; }
.avatar { width: 35px; height: 35px; border-radius: 50%; display: grid; place-items: center; background: #e0e7ff; color: #4338ca; font-weight: 700; }
.user-chip strong, .user-chip small { display: block; }
.user-chip strong { font-size: 12px; }
.user-chip small { color: var(--muted); font-size: 10px; margin-top: 2px; }

.content { padding: 28px 30px 45px; max-width: 1500px; margin: auto; }
.page-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.page-title h1 { margin: 0; font-size: 25px; }
.page-title p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card, .panel {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow);
}
.stat-card { padding: 19px; }
.stat-top { display: flex; justify-content: space-between; align-items: center; }
.stat-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: #eef2ff; color: var(--primary); }
.stat-label { font-size: 12px; color: var(--muted); }
.stat-value { font-size: 27px; font-weight: 750; margin-top: 10px; }
.stat-change { font-size: 11px; margin-top: 8px; color: var(--success); }

.grid-2 { display: grid; grid-template-columns: 1.25fr .75fr; gap: 18px; }
.panel { padding: 20px; }
.panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.panel-header h3 { margin: 0; font-size: 15px; }
.panel-header span { color: var(--muted); font-size: 11px; }

.table-wrap {
    width: 100%;
    overflow-x: auto;
}
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 10px; border-bottom: 1px solid var(--border); text-align: left; font-size: 12px; }
th { color: var(--muted); font-weight: 600; background: #fafbfc; }
td strong { font-size: 12px; }
.status { padding: 5px 9px; border-radius: 999px; font-size: 10px; font-weight: 700; display: inline-block; }
.status.active, .status.approved, .status.present, .status.completed { background: #dcfce7; color: #166534; }
.status.pending { background: #fef3c7; color: #92400e; }
.status.rejected, .status.absent, .status.inactive { background: #fee2e2; color: #991b1b; }
.status.in-progress { background: #dbeafe; color: #1e40af; }
.status.off-shift { background: #e5e7eb; color: #374151; }

.search-row { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.search-row input, .search-row select, .form-grid input, .form-grid select, .form-grid textarea {
  border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; background: white; outline: none;
}
.search-row input { min-width: 220px; }
.search-row input:focus, .search-row select:focus { border-color: var(--primary); }

.action-btn { border: 1px solid var(--border); background: white; padding: 7px 10px; border-radius: 7px; font-size: 11px; }
.action-btn:hover { background: #f5f6fa; }
.action-btn.danger { color: var(--danger); }

.chart { height: 240px; display: flex; align-items: flex-end; gap: 18px; padding: 15px 5px 0; }
.bar-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 7px; }
.bar { width: min(42px, 70%); background: linear-gradient(180deg, #6366f1, #818cf8); border-radius: 7px 7px 0 0; min-height: 8px; }
.bar-label { font-size: 10px; color: var(--muted); }
.bar-value { font-size: 10px; font-weight: 700; }

.timesheet-hours-chart { margin: 6px 0 18px; }
.timesheet-hours-summary { display: flex; align-items: baseline; gap: 7px; color: var(--muted); font-size: 12px; }
.timesheet-hours-summary strong { color: var(--text); font-size: 16px; }
.timesheet-daily-bars { display: grid; gap: 13px; margin: 14px 0; }
.timesheet-day-row { display: grid; grid-template-columns: 95px minmax(120px, 1fr) 82px; align-items: center; gap: 12px; }
.timesheet-day-label { color: var(--text); font-size: 12px; font-weight: 600; }
.timesheet-day-track { height: 18px; overflow: hidden; border-radius: 999px; background: #e5e7eb; }
.timesheet-day-bar { position: relative; display: flex; height: 100%; overflow: hidden; border-radius: inherit; }
.timesheet-hours-segment { display: block; height: 100%; }
.timesheet-day-total { color: var(--text); font-size: 12px; text-align: right; white-space: nowrap; }
.timesheet-page-actions { display: flex; align-items: center; gap: 9px; }
.timesheet-page-actions select { min-height: 34px; border: 1px solid var(--border); border-radius: 7px; background: white; padding: 0 9px; color: var(--text); }
@media (max-width: 600px) {
  .timesheet-day-row { grid-template-columns: 72px minmax(60px, 1fr) 68px; gap: 7px; }
  .timesheet-page-actions { flex-wrap: wrap; justify-content: flex-end; }
}

.timesheet-hours-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 14px; }
.timesheet-hours-legend-item { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--muted); font-size: 12px; }
.timesheet-hours-legend-item > span:nth-child(2) { flex: 1; overflow-wrap: anywhere; }
.timesheet-hours-legend-item strong { color: var(--text); white-space: nowrap; }
.timesheet-hours-swatch { flex: 0 0 11px; width: 11px; height: 11px; border-radius: 3px; }
.progress-row { margin-bottom: 18px; }
.progress-row .line { display: flex; justify-content: space-between; font-size: 11px; margin-bottom: 7px; }
.progress-track { height: 8px; background: #edf0f5; border-radius: 20px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--primary); border-radius: 20px; }

.employee-cell { display: flex; align-items: center; gap: 9px; }
.employee-avatar { width: 30px; height: 30px; border-radius: 50%; background: #eef2ff; color: #4338ca; display: grid; place-items: center; font-weight: 700; font-size: 10px; }

.form-panel { max-width: 850px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group label { display: block; font-size: 11px; font-weight: 700; margin-bottom: 6px; }
.form-group.full-width { grid-column: 1 / -1; }
.form-grid textarea { min-height: 90px; resize: vertical; width: 100%; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }

.empty { padding: 45px; text-align: center; color: var(--muted); }
#toast {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;

    width: 320px;
    padding: 16px;

    background: #1f1f2e;
    border: 1px solid #3a3a50;
    border-radius: 12px;

    color: white;
    z-index: 9999;

    opacity: 0;
    transform: translateX(120%);
    transition: all 0.3s ease;

    pointer-events: none;
}

#toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-icon {
    font-size: 22px;
}

.toast-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toast-content strong {
    font-size: 14px;
}

.toast-content span {
    font-size: 13px;
    color: #b8b8c8;
}
/* Dashboard-only visual refresh. Existing dashboard data and actions are unchanged. */
.dashboard-redesign {
  --dashboard-ink: #24243a;
  --dashboard-muted: #77788e;
  --dashboard-lilac: #f0edff;
  --dashboard-purple: #6255dc;
  color: var(--dashboard-ink);
  padding: 2px 4px 12px;
}
.dashboard-redesign > .page-title {
  position: relative;
  min-height: 148px;
  padding: 30px 34px;
  margin-bottom: 22px;
  overflow: hidden;
  border: 1px solid #d8d1ff;
  border-radius: 22px;
  background:
    radial-gradient(circle at 88% 20%, rgba(255,255,255,.7), transparent 22%),
    linear-gradient(112deg, #ded8ff 0%, #eeeaff 48%, #f5f2ff 100%);
  box-shadow: 0 14px 30px rgba(67, 56, 140, .11);
}
.dashboard-redesign > .page-title::after {
  position: absolute;
  right: 105px;
  bottom: -100px;
  width: 245px;
  height: 245px;
  border: 1px solid rgba(102, 86, 205, .14);
  border-radius: 50%;
  box-shadow: 0 0 0 24px rgba(255,255,255,.13), 0 0 0 50px rgba(255,255,255,.1);
  content: "";
  pointer-events: none;
}
.dashboard-redesign > .page-title h1 { color: #262344; font-size: 32px; letter-spacing: -.045em; }
.dashboard-redesign > .page-title p { color: #696783; font-size: 14px; }
.dashboard-redesign .primary-btn {
  position: relative;
  z-index: 1;
  min-height: 46px;
  padding-inline: 19px;
  border-radius: 12px;
  background: #5144cf;
  box-shadow: 0 8px 17px rgba(81,68,207,.24);
}
.dashboard-redesign .primary-btn:hover { background: #4034b9; }
.dashboard-redesign .cards { gap: 15px; margin-bottom: 21px; }
.dashboard-redesign .stat-card,
.dashboard-redesign .panel {
  border: 1px solid #eceaf4;
  border-radius: 17px;
  box-shadow: 0 8px 24px rgba(38, 38, 74, .055);
}
.dashboard-redesign .stat-card {
  position: relative;
  min-height: 162px;
  padding: 21px 22px;
  overflow: hidden;
}
.dashboard-redesign .stat-card:nth-child(1) { background: linear-gradient(145deg, #fff 38%, #f1efff); }
.dashboard-redesign .stat-card:nth-child(2) { background: linear-gradient(145deg, #fff 38%, #eaf5ff); }
.dashboard-redesign .stat-card:nth-child(3) { background: linear-gradient(145deg, #fff 38%, #fff0f5); }
.dashboard-redesign .stat-card:nth-child(4) { background: linear-gradient(145deg, #fff 38%, #f5efff); }
.dashboard-redesign .stat-card::after {
  position: absolute;
  right: -24px;
  bottom: -42px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255,255,255,.56);
  content: "";
}
.dashboard-redesign .stat-top,
.dashboard-redesign .stat-value,
.dashboard-redesign .stat-change { position: relative; z-index: 1; }
.dashboard-redesign .stat-label { color: #74758a; font-size: 12px; }
.dashboard-redesign .stat-icon { width: 40px; height: 40px; border-radius: 13px; background: #e8e4ff; color: #5144cf; }
.dashboard-redesign .stat-card:nth-child(2) .stat-icon { background: #e1f0ff; color: #3781c1; }
.dashboard-redesign .stat-card:nth-child(3) .stat-icon { background: #ffe4ee; color: #c45483; }
.dashboard-redesign .stat-card:nth-child(4) .stat-icon { background: #eee2ff; color: #875ac5; }
.dashboard-redesign .stat-value { margin-top: 14px; color: #25243a; font-size: 33px; letter-spacing: -.045em; }
.dashboard-redesign .stat-change { color: #85859a; font-size: 11px; }
.dashboard-redesign .grid-2 { grid-template-columns: minmax(0, 1.45fr) minmax(300px, .85fr); gap: 16px; }
.dashboard-redesign .panel { padding: 23px; }
.dashboard-redesign .panel-header { margin-bottom: 17px; }
.dashboard-redesign .panel-header h3 { color: #29283e; font-size: 16px; }
.dashboard-redesign .panel-header > span { padding: 5px 9px; border-radius: 999px; background: #f3f1ff; color: #6c61c9; }
.dashboard-redesign .chart { height: 250px; gap: 16px; padding: 20px 16px 0; }
.dashboard-redesign .bar-col { gap: 8px; }
.dashboard-redesign .bar { width: min(48px, 70%); border-radius: 10px 10px 4px 4px; background: linear-gradient(180deg, #9d91f2, #6559dc); }
.dashboard-redesign .bar-col:nth-child(2n) .bar { background: linear-gradient(180deg, #c5a8ed, #9571d3); }
.dashboard-redesign .bar-col:nth-child(3n) .bar { background: linear-gradient(180deg, #f1aac5, #d96f9b); }
.dashboard-redesign .bar-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-redesign .progress-row { margin: 22px 0 23px; }
.dashboard-redesign .progress-row .line { color: #5e5e74; font-size: 12px; }
.dashboard-redesign .progress-track { height: 9px; background: #efeff5; }
.dashboard-redesign .progress-fill { background: linear-gradient(90deg, #685be2, #a096f4); }
.dashboard-redesign .progress-row:nth-of-type(3) .progress-fill { background: linear-gradient(90deg, #e68db0, #f2b4ca); }
.dashboard-redesign .progress-row:nth-of-type(4) .progress-fill { background: linear-gradient(90deg, #e6a64f, #f4cb81); }
.dashboard-redesign .progress-row:nth-of-type(5) .progress-fill { background: linear-gradient(90deg, #8a85c9, #b7b3e1); }
.dashboard-redesign > .panel:last-child { margin-top: 16px !important; }
.dashboard-redesign > .panel:last-child .panel-header .action-btn { border-radius: 8px; }
.dashboard-team-panel { margin: 0 0 18px; }
.dashboard-team-panel .panel-header { margin-bottom: 16px; }
.dashboard-team-panel .panel-header > div > span { display: block; margin-top: 5px; color: #85859a; font-size: 11px; }
.dashboard-team-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.dashboard-profile-card {
  display: flex;
  min-width: 0;
  min-height: 176px;
  flex-direction: column;
  align-items: center;
  padding: 16px 12px 14px;
  border: 1px solid #eceaf4;
  border-radius: 15px;
  background: linear-gradient(155deg, #fff 45%, #f7f5ff);
  text-align: center;
  transition: transform .18s ease, box-shadow .18s ease;
}
.dashboard-profile-card:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(66, 54, 156, .1); }
.dashboard-profile-portrait { position: relative; margin-bottom: 9px; }
.dashboard-profile-avatar {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  background: linear-gradient(145deg, #c9c0ff, #8170e8);
  box-shadow: 0 4px 12px rgba(81,68,207,.2);
  color: #fff;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: .02em;
}
.dashboard-profile-card:nth-child(5n + 2) .dashboard-profile-avatar { background: linear-gradient(145deg, #9ed8cf, #4ea99c); box-shadow: 0 4px 12px rgba(42,151,136,.2); }
.dashboard-profile-card:nth-child(5n + 3) .dashboard-profile-avatar { background: linear-gradient(145deg, #f6c1d2, #d9799e); box-shadow: 0 4px 12px rgba(217,121,158,.2); }
.dashboard-profile-card:nth-child(5n + 4) .dashboard-profile-avatar { background: linear-gradient(145deg, #f5d6a4, #dc9d48); box-shadow: 0 4px 12px rgba(220,157,72,.2); }
.dashboard-profile-card:nth-child(5n + 5) .dashboard-profile-avatar { background: linear-gradient(145deg, #b9d5f2, #6d9dd0); box-shadow: 0 4px 12px rgba(109,157,208,.2); }
.dashboard-profile-presence { position: absolute; right: 0; bottom: 2px; width: 13px; height: 13px; border: 2px solid #fff; border-radius: 50%; }
.dashboard-profile-presence.is-active { background: #35b98a; }
.dashboard-profile-presence.is-inactive { background: #a4a7b2; }
.dashboard-profile-name { max-width: 100%; overflow: hidden; color: #29283e; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-profile-role { max-width: 100%; overflow: hidden; color: #66647d; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-profile-department { max-width: 100%; margin-top: 3px; padding: 4px 8px; overflow: hidden; border-radius: 999px; background: #f0edff; color: #6559bd; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-team-empty { grid-column: 1 / -1; }
@media (max-width: 1050px) {
  .dashboard-redesign .grid-2 { grid-template-columns: 1fr; }
  .dashboard-team-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .dashboard-redesign { padding-inline: 0; }
  .dashboard-redesign > .page-title { align-items: flex-start; gap: 16px; padding: 22px 20px; }
  .dashboard-redesign > .page-title h1 { font-size: 27px; }
  .dashboard-redesign > .page-title .primary-btn { padding-inline: 12px; font-size: 11px; }
  .dashboard-redesign .chart { height: 200px; }
  .dashboard-team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Compact icon rail inspired by the supplied dashboard reference. */
@media (min-width: 761px) {
  .sidebar {
    width: 76px;
    align-items: center;
    padding: 18px 9px 14px;
    overflow-x: hidden;
    overflow-y: auto;
    background: #101116;
    transition: width .22s ease, padding .22s ease;
    z-index: 20;
  }
  .sidebar-brand { justify-content: center; width: 100%; padding: 3px 0 24px; }
  .sidebar-brand > div:last-child { display: none; }
  .sidebar-brand .brand-mark.small { width: 43px; height: 43px; border-radius: 14px; }
  .sidebar nav { width: 100%; }
  .sidebar .nav-label { display: none; }
  .sidebar .nav-item {
    justify-content: center;
    width: 48px;
    height: 46px;
    margin: 4px auto;
    padding: 0;
    border-radius: 14px;
    background: transparent;
    color: transparent;
    font-size: 0;
  }
  .sidebar .nav-item > span:not(.nav-glyph) { display: none; }
  .sidebar .nav-item .nav-glyph {
    display: grid;
    flex: 0 0 35px;
    width: 35px;
    height: 35px;
    place-items: center;
    border-radius: 12px;
    color: #a4a4b3;
    font-size: 18px;
    line-height: 1;
    transition: background .16s ease, color .16s ease, transform .16s ease;
  }
  .sidebar .nav-item:hover { background: transparent; }
  .sidebar .nav-item:hover .nav-glyph { background: #25242f; color: #fff; transform: translateY(-1px); }
  .sidebar .nav-item.active { background: transparent; }
  .sidebar .nav-item.active .nav-glyph { background: #5144cf; color: #fff; box-shadow: 0 5px 14px rgba(81,68,207,.28); }
  .sidebar .sidebar-bottom {
    width: 100%;
    padding-top: 12px;
    border-top-color: #292a32;
  }
  .sidebar .nav-item.logout .nav-glyph { color: #f28b91; }
  .main { width: calc(100% - 76px); margin-left: 76px; }
  .sidebar:hover,
  .sidebar:has(.nav-item:focus-visible) { width: 250px; align-items: stretch; padding: 20px 14px; }
  .sidebar:hover .sidebar-brand,
  .sidebar:has(.nav-item:focus-visible) .sidebar-brand { justify-content: flex-start; padding: 4px 10px 25px; }
  .sidebar:hover .sidebar-brand > div:last-child,
  .sidebar:has(.nav-item:focus-visible) .sidebar-brand > div:last-child { display: block; }
  .sidebar:hover .nav-label,
  .sidebar:has(.nav-item:focus-visible) .nav-label { display: block; }
  .sidebar:hover .nav-item,
  .sidebar:has(.nav-item:focus-visible) .nav-item {
    justify-content: flex-start;
    width: 100%;
    height: 42px;
    margin: 2px 0;
    padding: 7px 10px;
    gap: 10px;
    color: #cbd5e1;
    font-size: 13px;
  }
  .sidebar:hover .nav-item > span:not(.nav-glyph),
  .sidebar:has(.nav-item:focus-visible) .nav-item > span:not(.nav-glyph) { display: inline; white-space: nowrap; }
  .sidebar:hover .nav-item .nav-glyph,
  .sidebar:has(.nav-item:focus-visible) .nav-item .nav-glyph { background: transparent; box-shadow: none; transform: none; }
  .sidebar:hover .nav-item:hover,
  .sidebar:has(.nav-item:focus-visible) .nav-item:hover { background: var(--sidebar-hover); color: #fff; }
  .sidebar:hover .nav-item:hover .nav-glyph,
  .sidebar:has(.nav-item:focus-visible) .nav-item:hover .nav-glyph { background: transparent; color: #fff; }
  .sidebar:hover .nav-item.active,
  .sidebar:has(.nav-item:focus-visible) .nav-item.active { background: #29263f; color: #fff; }
  .sidebar:hover .nav-item.active .nav-glyph,
  .sidebar:has(.nav-item:focus-visible) .nav-item.active .nav-glyph { background: transparent; color: #fff; }
  .sidebar:hover .sidebar-bottom,
  .sidebar:has(.nav-item:focus-visible) .sidebar-bottom { width: 100%; }
  .sidebar:hover ~ .main,
  .sidebar:has(.nav-item:focus-visible) ~ .main { width: calc(100% - 250px); margin-left: 250px; transition: width .22s ease, margin-left .22s ease; }
  .main { transition: width .22s ease, margin-left .22s ease; }
}

#mobileMenu { display: none; }

@media (max-width: 1050px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .sidebar { width: 250px; align-items: stretch; padding: 20px 14px; transform: translateX(-100%); transition: .2s; z-index: 20; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-brand { justify-content: flex-start; width: auto; padding: 4px 10px 25px; }
  .sidebar-brand > div:last-child { display: block; }
  .sidebar nav { width: auto; }
  .sidebar .nav-label { display: block; }
  .sidebar .nav-item { justify-content: flex-start; width: 100%; height: auto; margin: 2px 0; padding: 11px 12px; color: #cbd5e1; font-size: 13px; }
  .sidebar .nav-item > span { display: inline; }
  .sidebar .nav-item .nav-glyph { display: inline; flex: initial; width: auto; height: auto; color: inherit; font-size: inherit; background: transparent; }
  .sidebar .nav-item.active { background: #312e81; }
  .sidebar .sidebar-bottom { width: auto; }
  .main { margin-left: 0; width: 100%; }
  #mobileMenu { display: inline-block; }
  .content { padding: 20px 15px 35px; }
  .topbar { padding: 0 15px; }
  .user-chip { display: none; }
  .cards { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.full-width { grid-column: auto; }
}

.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper input {
    width: 100%;
    padding-right: 45px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);

    border: none;
    background: transparent;

    cursor: pointer;

    font-size: 18px;
    padding: 4px;

    color: #666;
}

.password-toggle:hover {
    color: #333;
}


/* =========================
   REPORTS
========================= */

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.report-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.report-stat-grid > div {
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    text-align: center;
    background: #fafafa;
}

.report-stat-grid strong {
    display: block;
    font-size: 24px;
    margin-bottom: 5px;
}

.report-stat-grid span {
    display: block;
    font-size: 12px;
    color: var(--muted);
}

.attendance-report-context,
.attendance-report-note {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.attendance-report-note {
    margin: 14px 2px 0;
}

@media (max-width: 900px) {

    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

}

@media (max-width: 600px) {

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

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

}

/* =========================
   PROJECT TABLE
========================= */

.project-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.project-table th,
.project-table td {
    padding: 14px 12px;
    vertical-align: middle;
    text-align: left;
}

/* PROJECT */
.project-table th:nth-child(1),
.project-table td:nth-child(1) {
    width: 16%;
}

/* DESCRIPTION */
.project-table th:nth-child(2),
.project-table td:nth-child(2) {
    width: 34%;
}

/* START DATE */
.project-table th:nth-child(3),
.project-table td:nth-child(3) {
    width: 14%;
}

/* END DATE */
.project-table th:nth-child(4),
.project-table td:nth-child(4) {
    width: 14%;
}

/* STATUS */
.project-table th:nth-child(5),
.project-table td:nth-child(5) {
    width: 12%;
}

/* ACTIONS */
.project-table th:nth-child(6),
.project-table td:nth-child(6) {
    width: 10%;
}

/* Keep description under control */
.project-table .description-cell {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.5;
}

/* Keep action buttons on one line */
.project-table td:last-child {
    white-space: nowrap;
}

/* Prevent project name from breaking awkwardly */
.project-table td:first-child strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attendance-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.attendance-action-buttons {
    display: flex;
    gap: 10px;
}

.attendance-action-buttons .primary-btn {
    min-width: 132px;
}

.attendance-action-note {
    color: var(--muted);
    font-size: 12px;
    text-align: right;
}

.attendance-action-buttons .primary-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

@media (max-width: 640px) {
    .attendance-action-buttons {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
}


/* Dashboard: airy bento layout with violet accents and gentle entrance motion. */
.dash-hero {
    min-height: 158px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
    padding: 28px 32px;
    border: 1px solid #e8e4fa;
    border-radius: 22px;
    background: linear-gradient(115deg, #fff 0%, #f5f2ff 58%, #ebe6ff 100%);
    box-shadow: 0 14px 38px rgba(53, 41, 112, .07);
}
.dash-hero > div, .dash-add-button { position: relative; z-index: 1; }
.dash-hero h1 { margin: 8px 0 5px; font-size: clamp(27px, 3vw, 36px); letter-spacing: -.04em; }
.dash-hero p { margin: 0; color: #74718a; font-size: 14px; }
.dash-eyebrow { color: #8475c8; font-size: 9px; font-weight: 800; letter-spacing: .16em; }
.dash-add-button { border-radius: 12px; padding: 13px 18px; box-shadow: 0 8px 18px rgba(79, 70, 229, .2); }
.dash-add-button span { font-size: 17px; margin-right: 4px; }
.dash-hero-orb { position: absolute; border-radius: 50%; background: rgba(126, 105, 226, .09); pointer-events: none; }
.dash-hero-orb-one { width: 210px; height: 210px; right: 120px; top: -115px; }
.dash-hero-orb-two { width: 145px; height: 145px; right: 25px; bottom: -105px; background: rgba(187, 174, 246, .2); }
.dash-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.dash-stat-card { min-height: 150px; padding: 19px 20px; border: 1px solid rgba(231, 228, 242, .95); border-radius: 18px; background: rgba(255,255,255,.92); box-shadow: 0 9px 26px rgba(35, 31, 67, .045); transition: transform .25s ease, box-shadow .25s ease; }
.dash-stat-card:hover, .dash-profile-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(47, 39, 92, .1); }
.dash-stat-top { display: flex; align-items: center; justify-content: space-between; color: #77748d; font-size: 12px; }
.dash-stat-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; color: var(--primary); background: #f0edff; font-size: 18px; }
.dash-stat-card strong { display: block; margin-top: 12px; color: #201b38; font-size: 31px; line-height: 1; letter-spacing: -.04em; }
.dash-stat-card small { display: block; margin-top: 9px; color: #858198; font-size: 10px; }
.dash-stat-green .dash-stat-icon { color: #298b70; background: #e7f7f0; }
.dash-stat-orange .dash-stat-icon { color: #bd7c2e; background: #fff3e2; }
.dash-stat-blue .dash-stat-icon { color: #5d73ba; background: #edf1ff; }
.dash-main-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(290px, .85fr); gap: 16px; margin-bottom: 16px; }
.dash-surface { min-width: 0; padding: 21px 22px; border: 1px solid #e9e7f0; border-radius: 19px; background: #fff; box-shadow: 0 9px 28px rgba(35, 31, 67, .045); }
.dash-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 17px; }
.dash-section-heading h2 { margin: 5px 0 0; color: #26223d; font-size: 16px; letter-spacing: -.02em; }
.dash-heading-badge { padding: 6px 10px; border-radius: 999px; color: #7568b5; background: #f3f0ff; font-size: 10px; font-weight: 700; }
.dash-dept-chart { min-height: 220px; display: flex; align-items: flex-end; justify-content: space-around; gap: 12px; padding: 12px 5px 0; }
.dash-dept-column { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.dash-dept-column strong { color: #37314e; font-size: 11px; }
.dash-dept-bar { height: 155px; width: min(54px, 72%); display: flex; align-items: flex-end; overflow: hidden; border-radius: 13px 13px 5px 5px; background: linear-gradient(180deg,#f7f5fc,#fbfaff); }
.dash-dept-bar span { display: block; width: 100%; border-radius: 12px 12px 4px 4px; background: linear-gradient(180deg,#9c8bee,#6755dc); transform-origin: bottom; animation: dash-bar-rise .75s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--bar-order, 1) * 80ms + 250ms); }
.dash-dept-column small { max-width: 100%; overflow: hidden; color: #858198; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.dash-attendance-total { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #6653d3; background: #f1eeff; font-weight: 800; }
.dash-panel-caption { margin: -10px 0 17px; color: #9290a1; font-size: 11px; }
.dash-attendance-row { margin: 16px 0; }
.dash-attendance-row > div:first-child { display: flex; justify-content: space-between; margin-bottom: 8px; color: #6e6b81; font-size: 11px; }
.dash-attendance-row strong { color: #29253e; }
.dash-attendance-track { height: 8px; overflow: hidden; border-radius: 20px; background: #f0eff5; }
.dash-attendance-track span { display: block; height: 100%; border-radius: inherit; background: var(--bar-color); animation: dash-track-fill .8s ease-out both; transform-origin: left; }
.dash-team-surface, .dash-recent-surface { margin-bottom: 16px; }
.dash-profile-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.dash-profile-card { min-width: 0; padding: 15px; border: 1px solid #efedf4; border-radius: 15px; background: linear-gradient(150deg,#fff,#fcfbff); transition: transform .25s ease, box-shadow .25s ease; }
.dash-profile-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.dash-avatar { display: grid; place-items: center; width: 43px; height: 43px; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 2px 10px rgba(44,38,78,.1); font-size: 11px; font-weight: 800; }
.dash-avatar-lilac { color: #5948bd; background: #e8e2ff; }
.dash-avatar-mint { color: #267a66; background: #ddf2e9; }
.dash-avatar-peach { color: #a05d3d; background: #ffeadc; }
.dash-avatar-blue { color: #4a62a3; background: #e2eaff; }
.dash-profile-card .status { font-size: 9px; }
.dash-profile-card h3 { overflow: hidden; margin: 0; color: #2d2941; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.dash-profile-card > p { overflow: hidden; margin: 5px 0 13px; color: #89869b; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.dash-profile-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px; padding-top: 10px; border-top: 1px solid #f0eef5; color: #9996a8; font-size: 9px; }
.dash-text-button { border: 0; padding: 7px 0 7px 8px; color: #6653d3; background: transparent; font-size: 11px; font-weight: 700; white-space: nowrap; }
.dash-text-button:hover { color: #4434b3; }
.dash-recent-surface .panel-header { display: none; }
.dash-enter { animation: dash-enter .55s cubic-bezier(.2,.75,.25,1) both; animation-delay: calc(var(--enter-order, 0) * 55ms); }
.dash-enter .dash-stat-card { animation: none; }
@keyframes dash-enter { from { opacity: 0; transform: translateY(14px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes dash-bar-rise { from { transform: scaleY(.08); } to { transform: scaleY(1); } }
@keyframes dash-track-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (max-width: 1050px) {
    .dash-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dash-profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .dash-hero { min-height: 0; align-items: flex-start; flex-direction: column; padding: 23px; }
    .dash-add-button { align-self: flex-start; }
    .dash-main-grid { grid-template-columns: 1fr; }
    .dash-stat-grid { gap: 10px; }
    .dash-stat-card { min-height: 135px; padding: 15px; }
    .dash-profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dash-section-heading { align-items: flex-start; }
    .dash-text-button { white-space: normal; text-align: right; }
}
@media (max-width: 420px) {
    .dash-stat-grid { grid-template-columns: 1fr 1fr; }
    .dash-stat-card strong { font-size: 26px; }
    .dash-surface { padding: 17px 15px; }
    .dash-profile-grid { gap: 8px; }
    .dash-profile-card { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .dash-enter, .dash-dept-bar span, .dash-attendance-track span { animation: none !important; }
    .dash-stat-card, .dash-profile-card { transition: none; }
}


/* People directory pages: shared employee, department and designation styling. */
.directory-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 3px 0 19px; }
.directory-hero h1 { margin: 6px 0 4px; color: #211d37; font-size: 29px; letter-spacing: -.035em; }
.directory-hero p { margin: 0; color: #858198; font-size: 13px; }
.directory-hero .primary-btn { flex: 0 0 auto; border-radius: 11px; padding: 12px 16px; box-shadow: 0 7px 16px rgba(79,70,229,.17); }
.directory-hero .primary-btn span { margin-right: 4px; font-size: 16px; }
.directory-eyebrow { color: #8a7acb; font-size: 9px; font-weight: 800; letter-spacing: .15em; }
.directory-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-bottom: 16px; }
.directory-metric { display: flex; align-items: center; gap: 13px; min-height: 82px; padding: 15px 18px; border: 1px solid #ebe8f3; border-radius: 15px; background: #fff; box-shadow: 0 6px 18px rgba(35,31,67,.035); }
.directory-metric-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; border-radius: 13px; font-size: 18px; }
.directory-metric-icon.violet { color: #6553d5; background: #f0edff; }
.directory-metric-icon.green { color: #278666; background: #e5f6ee; }
.directory-metric-icon.peach { color: #bf7d38; background: #fff2e2; }
.directory-metric small, .directory-metric strong { display: block; }
.directory-metric small { color: #858198; font-size: 10px; }
.directory-metric strong { margin-top: 4px; color: #29253e; font-size: 21px; }
.directory-panel { padding: 20px 21px 8px; border: 1px solid #e9e7f0; border-radius: 18px; background: #fff; box-shadow: 0 9px 28px rgba(35,31,67,.045); }
.directory-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 17px; }
.directory-toolbar h2 { display: flex; align-items: center; gap: 9px; margin: 5px 0 0; color: #29253e; font-size: 16px; }
.directory-count { display: inline-grid; place-items: center; min-width: 23px; height: 22px; padding: 0 6px; border-radius: 999px; color: #6958ca; background: #f0edff; font-size: 10px; }
.directory-filters { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.directory-search { display: flex; align-items: center; gap: 7px; min-width: min(300px, 40vw); height: 38px; padding: 0 11px; border: 1px solid #e7e4ef; border-radius: 10px; color: #8b86a1; background: #fff; }
.directory-search:focus-within { border-color: #9d91e8; box-shadow: 0 0 0 3px rgba(100,83,213,.08); }
.directory-search > span { font-size: 19px; line-height: 1; }
.directory-search input { width: 100%; min-width: 0; border: 0; outline: 0; color: #302c45; background: transparent; font-size: 11px; }
.directory-search input::placeholder { color: #a19daf; }
.directory-filters select { height: 38px; max-width: 155px; padding: 0 10px; border: 1px solid #e7e4ef; border-radius: 10px; outline: 0; color: #57536b; background: #fff; font-size: 10px; }
.directory-filters select:focus { border-color: #9d91e8; }
.directory-clear { height: 38px; padding: 0 10px; border: 1px solid #e7e4ef; border-radius: 10px; color: #6e6884; background: #fff; font-size: 10px; }
.directory-clear:hover { border-color: #cec7f1; color: #5b49c5; background: #faf9ff; }
.directory-table table { border-collapse: separate; border-spacing: 0; }
.directory-table th { padding: 12px 11px; color: #827d98; background: #f8f7fb; font-size: 9px; letter-spacing: .06em; }
.directory-table th:first-child { border-radius: 9px 0 0 9px; }
.directory-table th:last-child { border-radius: 0 9px 9px 0; }
.directory-table td { padding: 12px 11px; border-bottom: 1px solid #f0eef5; color: #363249; font-size: 11px; }
.directory-table tbody tr { transition: background .18s ease; }
.directory-table tbody tr:hover { background: #fbfaff; }
.directory-table .employee-cell { gap: 10px; }
.directory-table .employee-avatar { width: 36px; height: 36px; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(52,44,96,.1); font-size: 10px; }
.directory-table .employee-cell strong { color: #29253e; font-size: 11px; }
.employee-subline { display: inline-block; max-width: 240px; margin-top: 3px; overflow: hidden; color: #8a879c; font-size: 9px; text-overflow: ellipsis; vertical-align: bottom; white-space: nowrap; }
.directory-department-chip { display: inline-block; padding: 5px 8px; border-radius: 999px; color: #6553c5; background: #f0edff; font-size: 9px; font-weight: 700; }
.directory-designation { color: #625e74; }
.directory-table .status { padding: 5px 9px; font-size: 9px; }
.directory-table .action-btn { padding: 6px 9px; border-radius: 8px; font-size: 9px; }
.department-summary { display: flex; align-items: center; gap: 13px; min-height: 78px; margin-bottom: 17px; padding: 14px 18px; border: 1px solid #e8e4fa; border-radius: 15px; background: linear-gradient(100deg,#f3f0ff,#fff 75%); }
.department-summary-icon { display: grid; place-items: center; width: 43px; height: 43px; border: 1px solid #ded7ff; border-radius: 13px; color: #6553d5; background: #fff; font-size: 19px; }
.department-summary strong, .department-summary small { display: block; }
.department-summary strong { color: #302b46; font-size: 12px; }
.department-summary small { margin-top: 4px; color: #88849a; font-size: 10px; }
.department-summary-avatars { display: flex; margin-left: auto; padding-left: 12px; }
.department-summary-avatars span, .department-avatar-stack span { display: grid; place-items: center; width: 29px; height: 29px; margin-left: -7px; border: 2px solid #fff; border-radius: 50%; color: #5c4abf; background: #e8e3ff; font-size: 8px; font-weight: 800; }
.department-summary-avatars span:nth-child(3n+2), .department-avatar-stack span:nth-child(3n+2) { color: #27755e; background: #ddf3e9; }
.department-summary-avatars span:nth-child(3n), .department-avatar-stack span:nth-child(3n) { color: #a66240; background: #ffeadc; }
.department-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.department-card { min-width: 0; padding: 18px; border: 1px solid #ebe8f2; border-radius: 17px; background: #fff; box-shadow: 0 7px 22px rgba(35,31,67,.04); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; animation: dash-enter .45s ease both; }
.department-card:hover { transform: translateY(-3px); border-color: #dcd5fa; box-shadow: 0 13px 28px rgba(50,43,99,.09); }
.department-card-head { display: flex; align-items: center; justify-content: space-between; }
.department-icon, .designation-group-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: #6654d6; background: #f0edff; font-size: 19px; }
.department-card-blue .department-icon { color: #5574c2; background: #edf2ff; }
.department-card-peach .department-icon { color: #bd7a36; background: #fff1df; }
.department-card-mint .department-icon { color: #32866e; background: #e7f6ed; }
.department-more { border: 0; color: #9691a7; background: transparent; font-size: 20px; letter-spacing: 2px; }
.department-card h2 { margin: 14px 0 6px; color: #28243d; font-size: 16px; }
.department-card > p { min-height: 32px; margin: 0; color: #858198; font-size: 10px; line-height: 1.6; }
.department-card-members { display: flex; align-items: center; gap: 6px; margin-top: 15px; color: #88849a; font-size: 10px; }
.department-card-members strong { color: #363149; }
.department-avatar-stack { display: flex; padding-left: 7px; margin-right: 4px; }
.department-avatar-stack span { width: 26px; height: 26px; font-size: 7px; }
.department-view-team { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 13px; padding: 11px 0 0; border: 0; border-top: 1px solid #f0eef5; color: #6754d5; background: transparent; text-align: left; font-size: 10px; font-weight: 700; }
.department-view-team:hover { color: #4434b3; }
.directory-empty { grid-column: 1 / -1; padding: 50px 20px; border: 1px dashed #ddd8ee; border-radius: 16px; color: #89859c; background: rgba(255,255,255,.65); text-align: center; font-size: 12px; }
.designation-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; align-items: start; gap: 15px; }
.designation-groups { display: grid; gap: 13px; }
.designation-group { overflow: hidden; border: 1px solid #eae7f1; border-radius: 15px; background: #fff; box-shadow: 0 6px 20px rgba(35,31,67,.035); animation: dash-enter .4s ease both; }
.designation-group > header { display: flex; align-items: center; gap: 10px; padding: 13px 15px; background: #f4f1ff; }
.designation-group-icon { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; font-size: 15px; }
.designation-group > header strong { color: #302b45; font-size: 11px; }
.designation-group-count { margin-left: auto; padding: 5px 8px; border-radius: 999px; color: #70649f; background: rgba(255,255,255,.8); font-size: 9px; white-space: nowrap; }
.designation-group-blue > header { background: #f0f3ff; }
.designation-group-blue .designation-group-icon { color: #5674bf; background: #fff; }
.designation-group-mint > header { background: #edf8f2; }
.designation-group-mint .designation-group-icon { color: #32866e; background: #fff; }
.designation-group-peach > header { background: #fff4e8; }
.designation-group-peach .designation-group-icon { color: #b97939; background: #fff; }
.designation-group-neutral > header { background: #f7f6fa; }
.designation-table-heading, .designation-row { display: grid; grid-template-columns: 50px minmax(0, 1fr) minmax(105px, 150px); align-items: center; gap: 10px; padding: 10px 15px; }
.designation-table-heading { border-bottom: 1px solid #eeeaf4; color: #918ca2; background: #fbfafd; font-size: 9px; font-weight: 700; }
.designation-row { min-height: 43px; border-bottom: 1px solid #f1eff5; color: #4b465e; font-size: 10px; }
.designation-row:last-child { border-bottom: 0; }
.designation-row:hover { background: #fcfbff; }
.designation-index { color: #aaa5b8; font-size: 9px; }
.designation-name { color: #37324a; font-weight: 600; }
.designation-count { justify-self: start; padding: 5px 8px; border-radius: 999px; color: #6b5bc0; background: #f2efff; font-size: 9px; white-space: nowrap; }
.designation-aside { position: sticky; top: 92px; padding: 19px; border: 1px solid #e7e2fa; border-radius: 16px; background: linear-gradient(150deg,#f4f1ff,#fff 80%); }
.designation-aside > strong { display: block; margin-top: 14px; color: #29243e; font-size: 38px; letter-spacing: -.05em; }
.designation-aside h2 { margin: 0; color: #37314f; font-size: 13px; }
.designation-aside p { color: #87839a; font-size: 10px; line-height: 1.65; }
.designation-aside-note { display: flex; gap: 8px; margin-top: 17px; padding: 11px; border-radius: 11px; color: #6d638f; background: rgba(255,255,255,.8); font-size: 9px; line-height: 1.5; }
.designation-aside-note span:first-child { color: #765fe0; }
@media (max-width: 1050px) {
    .directory-toolbar { align-items: stretch; flex-direction: column; }
    .directory-filters { justify-content: flex-start; }
    .designation-layout { grid-template-columns: minmax(0, 1fr) 220px; }
}
@media (max-width: 760px) {
    .directory-hero { align-items: flex-start; flex-direction: column; }
    .directory-hero .primary-btn { align-self: flex-start; }
    .directory-metrics { gap: 8px; }
    .directory-metric { gap: 8px; min-height: 72px; padding: 10px; }
    .directory-metric-icon { width: 34px; height: 34px; flex-basis: 34px; }
    .directory-metric small { font-size: 9px; }
    .directory-metric strong { font-size: 18px; }
    .directory-panel { padding: 16px 13px 6px; }
    .directory-filters { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
    .directory-search { grid-column: 1 / -1; min-width: 0; }
    .directory-filters select { max-width: none; width: 100%; }
    .directory-table th, .directory-table td { padding: 10px 8px; }
    .department-grid { gap: 10px; }
    .department-card { padding: 14px; }
    .designation-layout { grid-template-columns: 1fr; }
    .designation-aside { position: static; }
}
@media (max-width: 520px) {
    .directory-metrics { grid-template-columns: 1fr; }
    .department-grid { grid-template-columns: 1fr; }
    .department-summary-avatars { display: none; }
    .designation-table-heading, .designation-row { grid-template-columns: 30px minmax(0, 1fr) minmax(85px, auto); gap: 7px; padding: 9px 10px; }
    .directory-table { overflow-x: auto; }
    .directory-table table { min-width: 700px; }
}
@media (prefers-reduced-motion: reduce) {
    .department-card, .designation-group { animation: none; transition: none; }
}


/* Shared slide-up entrance across rendered screens. */
#content > * { --screen-enter-delay: 0ms; }
#content > :nth-child(2) { --screen-enter-delay: 55ms; }
#content > :nth-child(3) { --screen-enter-delay: 110ms; }
#content > :nth-child(4) { --screen-enter-delay: 165ms; }
#content > :nth-child(5) { --screen-enter-delay: 220ms; }
#content > :nth-child(6) { --screen-enter-delay: 275ms; }
#content > *:not(.dash-enter),
#content > *:not(.dash-enter) .panel:not(.dash-enter),
#content > *:not(.dash-enter) .stat-card:not(.dash-enter),
#content > *:not(.dash-enter) .directory-metric:not(.dash-enter),
#content > *:not(.dash-enter) .department-card:not(.dash-enter),
#content > *:not(.dash-enter) .designation-group:not(.dash-enter),
#content > *:not(.dash-enter) .timesheet-card:not(.dash-enter),
#content > *:not(.dash-enter) .dashboard-card:not(.dash-enter) {
    animation: screen-panel-rise .68s cubic-bezier(.16, 1, .3, 1) both;
    animation-delay: var(--screen-enter-delay, 0ms);
    will-change: transform, opacity;
}
@keyframes screen-panel-rise {
    from { opacity: 0; transform: translate3d(0, 22px, 0) scale(.985); filter: blur(3px); }
    to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); filter: blur(0); }
}
@media (prefers-reduced-motion: reduce) {
    #content > *,
    #content > * .panel,
    #content > * .stat-card,
    #content > * .directory-metric,
    #content > * .department-card,
    #content > * .designation-group,
    #content > * .timesheet-card,
    #content > * .dashboard-card {
        animation: none !important;
        filter: none !important;
        transform: none !important;
    }
}


/* Persistent dark theme */
html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #15151e;
    --card: #20202c;
    --sidebar: #101018;
    --sidebar-hover: #272638;
    --primary: #7868f2;
    --primary-dark: #6656df;
    --text: #f0eef8;
    --muted: #aaa6bc;
    --border: #363545;
    --success: #4fd1a1;
    --warning: #f0b35f;
    --danger: #ff858d;
    --info: #69b8ef;
    --shadow: 0 10px 30px rgba(0, 0, 0, .2);
}
html[data-theme="dark"] body { background: var(--bg); color: var(--text); }
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .directory-panel,
html[data-theme="dark"] .directory-metric,
html[data-theme="dark"] .department-card,
html[data-theme="dark"] .designation-group,
html[data-theme="dark"] .dashboard-profile-card,
html[data-theme="dark"] .dash-stat-card,
html[data-theme="dark"] .dash-surface,
html[data-theme="dark"] .login-card,
html[data-theme="dark"] .form-panel,
html[data-theme="dark"] .department-summary,
html[data-theme="dark"] .designation-aside {
    color: var(--text);
    background: var(--card);
    border-color: var(--border);
    box-shadow: var(--shadow);
}
html[data-theme="dark"] .dash-hero { background: linear-gradient(115deg, #20202c 0%, #29263e 60%, #312b50 100%); border-color: #45405f; }
html[data-theme="dark"] .department-summary { background: linear-gradient(100deg,#29263e,#20202c 80%); }
html[data-theme="dark"] .designation-aside { background: linear-gradient(150deg,#29263e,#20202c 80%); }
html[data-theme="dark"] .directory-hero h1,
html[data-theme="dark"] .dash-hero h1,
html[data-theme="dark"] .dash-section-heading h2,
html[data-theme="dark"] .department-card h2,
html[data-theme="dark"] .designation-group > header strong,
html[data-theme="dark"] .designation-name,
html[data-theme="dark"] .directory-toolbar h2,
html[data-theme="dark"] .page-title h1,
html[data-theme="dark"] .panel-header h3,
html[data-theme="dark"] .dash-stat-card strong,
html[data-theme="dark"] .dash-profile-card h3,
html[data-theme="dark"] .directory-metric strong { color: var(--text); }
html[data-theme="dark"] .directory-hero p,
html[data-theme="dark"] .dash-hero p,
html[data-theme="dark"] .department-card > p,
html[data-theme="dark"] .dash-panel-caption,
html[data-theme="dark"] .dash-profile-card > p,
html[data-theme="dark"] .directory-metric small { color: var(--muted); }
html[data-theme="dark"] th { color: #c2bed1; background: #292936; border-color: var(--border); }
html[data-theme="dark"] td { color: #e4e1ee; border-color: var(--border); }
html[data-theme="dark"] .directory-table th { color: #c2bed1; background: #292936; }
html[data-theme="dark"] .directory-table td { color: #e4e1ee; border-color: #343342; }
html[data-theme="dark"] .directory-table tbody tr:hover,
html[data-theme="dark"] .designation-row:hover { background: #292837; }
html[data-theme="dark"] .directory-table .employee-cell strong,
html[data-theme="dark"] .directory-designation,
html[data-theme="dark"] .directory-metric strong,
html[data-theme="dark"] .department-card-members strong,
html[data-theme="dark"] .designation-aside h2 { color: #f0eef8; }
html[data-theme="dark"] .employee-subline,
html[data-theme="dark"] .directory-filters select,
html[data-theme="dark"] .designation-row,
html[data-theme="dark"] .dash-attendance-row > div:first-child { color: #c1bdcf; }
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .directory-search,
html[data-theme="dark"] .directory-filters select,
html[data-theme="dark"] .timesheet-page-actions select {
    color: #f0eef8;
    background-color: #292936;
    border-color: #454354;
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder { color: #a19db2; }
html[data-theme="dark"] .action-btn,
html[data-theme="dark"] .directory-clear,
html[data-theme="dark"] .secondary-action-btn,
html[data-theme="dark"] .icon-btn { color: #e5e2ef; background: #292936; border-color: #454354; }
html[data-theme="dark"] .icon-btn:hover,
html[data-theme="dark"] .action-btn:hover,
html[data-theme="dark"] .directory-clear:hover { background: #353346; }
html[data-theme="dark"] .employee-avatar,
html[data-theme="dark"] .avatar { border-color: #363447; }
html[data-theme="dark"] .department-view-team,
html[data-theme="dark"] .dash-text-button { color: #b8aaff; }
html[data-theme="dark"] .department-card-members,
html[data-theme="dark"] .designation-index,
html[data-theme="dark"] .designation-aside p,
html[data-theme="dark"] .designation-table-heading { color: #aaa6bc; }
html[data-theme="dark"] .designation-table-heading { background: #292936; border-color: var(--border); }
html[data-theme="dark"] .designation-row { border-color: #343342; }
html[data-theme="dark"] .designation-group > header { background: #29263e; }
html[data-theme="dark"] .designation-group-blue > header { background: #252c40; }
html[data-theme="dark"] .designation-group-mint > header { background: #22352f; }
html[data-theme="dark"] .designation-group-peach > header { background: #392e27; }
html[data-theme="dark"] .designation-group-neutral > header { background: #292936; }
html[data-theme="dark"] .designation-group-count,
html[data-theme="dark"] .designation-aside-note { color: #d0cbe0; background: #302e3d; }
html[data-theme="dark"] .progress-track,
html[data-theme="dark"] .dash-attendance-track,
html[data-theme="dark"] .timesheet-day-track { background: #343342; }
html[data-theme="dark"] .dash-dept-bar { background: linear-gradient(180deg,#292837,#242330); }
html[data-theme="dark"] .directory-department-chip { color: #d2caff; background: #383251; }
html[data-theme="dark"] .empty,
html[data-theme="dark"] .directory-empty { color: #b6b1c6; }
html[data-theme="dark"] .toast { background: #090910; }
html[data-theme="dark"] .theme-toggle { color: #f6d77b; }
html[data-theme="dark"] body,
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .directory-panel,
html[data-theme="dark"] .directory-metric,
html[data-theme="dark"] .department-card,
html[data-theme="dark"] .designation-group { transition: background-color .22s ease, color .22s ease, border-color .22s ease; }
@media (prefers-reduced-motion: reduce) {
    html[data-theme="dark"] body,
    html[data-theme="dark"] .topbar,
    html[data-theme="dark"] .panel,
    html[data-theme="dark"] .stat-card,
    html[data-theme="dark"] .directory-panel,
    html[data-theme="dark"] .directory-metric,
    html[data-theme="dark"] .department-card,
    html[data-theme="dark"] .designation-group { transition: none; }
}


/* Dark-mode contrast for dashboard team cards */
html[data-theme="dark"] .dash-profile-card {
    color: #f0eef8;
    background: linear-gradient(150deg, #2d2b3b, #252430);
    border-color: #454253;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .18);
}
html[data-theme="dark"] .dash-profile-card:hover {
    background: linear-gradient(150deg, #343146, #292735);
    border-color: #5b527d;
    box-shadow: 0 14px 28px rgba(0, 0, 0, .28);
}
html[data-theme="dark"] .dash-profile-card h3 { color: #f2efff; }
html[data-theme="dark"] .dash-profile-card > p { color: #c1bdd1; }
html[data-theme="dark"] .dash-profile-meta { color: #b1adbf; border-color: #454253; }
html[data-theme="dark"] .dash-avatar { border-color: #373545; }


/* Leave and projects page refinements */
.leave-page-header { align-items: center; }
.leave-page-header h1, .projects-page-header h1 { margin-bottom: 5px; color: #211d37; font-size: 29px; letter-spacing: -.035em; }
.leave-page-header p, .projects-page-header p { margin: 5px 0 0; color: #858198; font-size: 13px; }
.leave-page-header .primary-btn, .project-header-actions .primary-btn { border-radius: 11px; padding: 12px 17px; box-shadow: 0 7px 16px rgba(79,70,229,.17); }
.leave-summary-grid { gap: 13px; margin-bottom: 17px; }
.leave-summary-card { position: relative; min-height: 132px; overflow: hidden; padding: 19px; border-radius: 16px; }
.leave-summary-card::after { position: absolute; top: 17px; right: 17px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; font-size: 17px; font-weight: 700; }
.leave-summary-pending::after { content: "◷"; color: #b97928; background: #fff0d9; }
.leave-summary-approved::after { content: "✓"; color: #278666; background: #e2f6eb; }
.leave-summary-rejected::after { content: "×"; color: #bf5260; background: #ffeaed; }
.leave-summary-balance::after { content: "▣"; color: #6855d4; background: #efecff; }
.leave-summary-card .stat-value { margin-top: 13px; font-size: 28px; }
.leave-summary-card .stat-change { color: #88849a; font-size: 10px; }
.leave-requests-panel, .leave-types-panel { margin-top: 16px; padding: 21px; border-radius: 17px; }
.leave-requests-panel .panel-header { margin-bottom: 15px; }
.leave-requests-panel .panel-header h3, .leave-types-panel .panel-header h3 { color: #29253e; font-size: 16px; }
.leave-requests-table, .leave-types-panel table { border-collapse: separate; border-spacing: 0; }
.leave-requests-table th, .leave-types-panel th { padding: 12px 11px; color: #827d98; background: #f8f7fb; font-size: 9px; letter-spacing: .06em; }
.leave-requests-table th:first-child, .leave-types-panel th:first-child { border-radius: 9px 0 0 9px; }
.leave-requests-table th:last-child, .leave-types-panel th:last-child { border-radius: 0 9px 9px 0; }
.leave-requests-table td, .leave-types-panel td { padding: 13px 11px; border-bottom: 1px solid #f0eef5; color: #37334a; font-size: 11px; vertical-align: middle; }
.leave-requests-table tbody tr:hover, .leave-types-panel tbody tr:hover { background: #fbfaff; }
.leave-requests-table td small { display: inline-block; margin-top: 4px; color: #89859b; }
.projects-page-header { align-items: center; }
.project-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.project-header-actions .secondary-action-btn { border-color: #dcd7f1; color: #6554c7; background: #fff; }
.projects-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-bottom: 17px; }
.project-summary-card { position: relative; min-height: 132px; padding: 19px; border-radius: 16px; }
.project-summary-icon { position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: #6553d5; background: #efecff; font-size: 17px; }
.project-summary-active .project-summary-icon { color: #5377be; background: #edf2ff; }
.project-summary-complete .project-summary-icon { color: #278666; background: #e2f6eb; }
.project-summary-card .stat-value { margin-top: 12px; font-size: 28px; }
.project-summary-card .stat-change { color: #89859b; font-size: 10px; }
.projects-list-panel { padding: 21px; border-radius: 17px; }
.project-list-heading { margin-bottom: 17px; }
.project-list-heading h3 { margin: 5px 0 0; color: #29253e; font-size: 16px; }
.project-count-pill { padding: 6px 10px; border-radius: 999px; color: #7062b4; background: #f1efff; font-size: 10px; font-weight: 700; }
.project-feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.project-feature-card { display: flex; min-width: 0; flex-direction: column; padding: 16px; border: 1px solid #ece9f3; border-radius: 15px; background: linear-gradient(150deg,#fff,#fcfbff); box-shadow: 0 5px 16px rgba(35,31,67,.035); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; animation: screen-panel-rise .55s cubic-bezier(.16,1,.3,1) both; }
.project-feature-card:hover { transform: translateY(-4px); border-color: #d8d0f8; box-shadow: 0 13px 24px rgba(51,43,103,.1); }
.project-feature-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.project-feature-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: #6553d5; background: #efecff; font-size: 17px; }
.project-feature-blue .project-feature-icon { color: #5377be; background: #edf2ff; }
.project-feature-mint .project-feature-icon { color: #278666; background: #e2f6eb; }
.project-feature-peach .project-feature-icon { color: #b97928; background: #fff0d9; }
.project-feature-card h3 { min-height: 36px; margin: 14px 0 6px; color: #29253e; font-size: 13px; line-height: 1.4; }
.project-feature-card > p { display: -webkit-box; min-height: 44px; margin: 0 0 14px; overflow: hidden; color: #858198; font-size: 10px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.project-date-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; padding: 11px 0; border-top: 1px solid #f0eef5; }
.project-date-pair small, .project-date-pair strong { display: block; }
.project-date-pair small { margin-bottom: 4px; color: #9a96a9; font-size: 8px; font-weight: 700; letter-spacing: .07em; }
.project-date-pair strong { color: #5e5a70; font-size: 9px; font-weight: 600; }
.project-feature-footer { display: flex; justify-content: flex-end; padding-top: 10px; border-top: 1px solid #f0eef5; }
.project-feature-footer .action-btn { border-color: #e5e1f0; color: #6553c7; }
.project-empty-state { padding: 48px 20px; border: 1px dashed #ded9ed; border-radius: 14px; color: #858198; text-align: center; }
.project-empty-state > span { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; color: #6553d5; background: #f0edff; font-size: 20px; }
.project-empty-state h3 { margin: 12px 0 5px; color: #39344e; font-size: 15px; }
.project-empty-state p { margin: 0; font-size: 11px; }
@media (max-width: 1000px) {
    .project-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .leave-page-header, .projects-page-header { align-items: flex-start; flex-direction: column; }
    .project-header-actions { justify-content: flex-start; }
    .leave-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .projects-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .project-feature-grid { grid-template-columns: 1fr; }
    .leave-requests-panel, .leave-types-panel, .projects-list-panel { padding: 16px 13px; }
    .leave-requests-panel .table-wrap, .leave-types-panel .table-wrap { overflow-x: auto; }
    .leave-requests-table { min-width: 680px; }
}
@media (prefers-reduced-motion: reduce) {
    .project-feature-card { animation: none; transition: none; }
}


/* Inline task list on project directory cards */
.project-card-tasks { margin: 0 0 12px; padding: 10px 11px; border: 1px solid #eeebf5; border-radius: 11px; background: #faf9fd; }
.project-card-tasks-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; color: #514c66; font-size: 10px; }
.project-card-tasks-heading span { min-width: 21px; padding: 3px 6px; border-radius: 999px; color: #6553d5; background: #efecff; text-align: center; font-size: 9px; font-weight: 700; }
.project-task-list { display: grid; gap: 5px; max-height: 112px; margin: 0; padding: 0; overflow-y: auto; list-style: none; }
.project-task-list li { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-left: 12px; color: #716c82; font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; }
.project-task-list li > span { min-width: 0; }
.project-task-edit { flex: 0 0 auto; padding: 3px 7px; border: 1px solid #e5e1f0; border-radius: 7px; color: #6553c7; background: transparent; font: inherit; font-size: 9px; cursor: pointer; }
.project-task-edit:hover { border-color: #c9c0f3; background: #f0edff; }

.project-task-list li::before { position: absolute; top: .45em; left: 0; width: 5px; height: 5px; border-radius: 50%; background: #7664e8; content: ""; }
.project-task-empty { margin: 0; color: #918ca0; font-size: 10px; }

/* Dark project-card surfaces and typography */
html[data-theme="dark"] .project-feature-card {
    color: #f0eef8;
    background: linear-gradient(150deg, #2d2b3b, #252430);
    border-color: #454253;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .18);
}
html[data-theme="dark"] .project-feature-card:hover {
    background: linear-gradient(150deg, #343146, #292735);
    border-color: #5b527d;
}
html[data-theme="dark"] .project-card-tasks { background: #24232f; border-color: #454253; }
html[data-theme="dark"] .project-card-tasks-heading { color: #e5e1f1; }
html[data-theme="dark"] .project-card-tasks-heading span { color: #d5ceff; background: #38334f; }
html[data-theme="dark"] .project-task-list li { color: #c1bdd1; }
html[data-theme="dark"] .project-task-edit { color: #d5ceff; border-color: #504b68; }
html[data-theme="dark"] .project-task-edit:hover { background: #38334f; border-color: #7568a8; }

html[data-theme="dark"] .project-task-empty { color: #aaa6bc; }
html[data-theme="dark"] .project-feature-card h3 { color: #f2efff; }
html[data-theme="dark"] .project-feature-card > p { color: #c1bdd1; }
html[data-theme="dark"] .project-date-pair,
html[data-theme="dark"] .project-feature-footer { border-color: #454253; }
html[data-theme="dark"] .project-date-pair small { color: #aaa6bc; }
html[data-theme="dark"] .project-date-pair strong { color: #dedbea; }
html[data-theme="dark"] .project-feature-footer .action-btn { color: #d5ceff; background: #302e3d; border-color: #504b68; }
html[data-theme="dark"] .project-empty-state { color: #c1bdd1; border-color: #4b475d; background: #24232f; }
html[data-theme="dark"] .project-empty-state h3 { color: #f2efff; }


html[data-theme="dark"] .leave-requests-table tbody tr:hover,
html[data-theme="dark"] .leave-types-panel tbody tr:hover {
    background: #302e3d;
}
html[data-theme="dark"] .leave-requests-table tbody tr:hover td,
html[data-theme="dark"] .leave-types-panel tbody tr:hover td {
    color: #f0eef8;
    border-color: #454253;
}

/* Role-specific dashboard actions: quick links for admin/employee and approvals for HR. */
.dash-role-widget { position: relative; z-index: 1; width: min(420px, 48%); padding: 14px; border: 1px solid rgba(224, 218, 247, .9); border-radius: 16px; background: rgba(255,255,255,.82); box-shadow: 0 10px 25px rgba(58,46,113,.07); backdrop-filter: blur(8px); }
.dash-widget-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.dash-widget-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 11px; color: #5b48d4; background: #f0edff; font-size: 17px; font-weight: 800; }
.dash-widget-heading strong { display: block; color: #29253e; font-size: 12px; }
.dash-widget-heading small { display: block; margin-top: 3px; color: #858198; font-size: 9px; }
.dash-quick-link-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.dash-quick-link-grid button, .dash-approval-link { min-width: 0; display: flex; align-items: center; gap: 11px; border: 0; border-bottom: 1px solid #eeeaf8; border-radius: 0; padding: 10px 3px; color: #39344e; background: transparent; cursor: pointer; font: inherit; font-size: 11px; text-align: left; transition: color .18s ease, background .18s ease; }
.dash-quick-link-grid button { min-height: 78px; flex-direction: column; justify-content: center; gap: 7px; border: 1px solid #eeeaf8; border-radius: 11px; padding: 9px 5px; background: #fff; font-size: 9px; text-align: center; }
.dash-quick-link-grid button:hover, .dash-approval-link:hover { border-color: #d8d0f8; background: #faf9ff; }
.dash-quick-link-grid button > span { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 32px; border-radius: 11px; color: #6653d3; background: #f0edff; font-size: 15px; }
.dash-quick-link-grid button b { display: none; }
.dash-approval-link { width: 100%; margin-top: 7px; }
.dash-approval-symbol { display: grid; place-items: center; width: 27px; height: 27px; flex: 0 0 27px; border-radius: 9px; color: #6653d3; background: #f0edff; }
.dash-approval-link > span:nth-child(2) { flex: 1; }
.dash-approval-link > strong { min-width: 23px; padding: 4px 7px; border-radius: 999px; color: #5946c8; background: #f0edff; text-align: center; }
.dash-approval-link > b { color: #5b48d4; font-size: 9px; white-space: nowrap; }
html[data-theme="dark"] .dash-role-widget { border-color: #454253; background: rgba(39,37,51,.94); box-shadow: 0 12px 28px rgba(0,0,0,.2); }
html[data-theme="dark"] .dash-widget-heading strong { color: #f2efff; }
html[data-theme="dark"] .dash-widget-heading small { color: #b7b2c9; }
html[data-theme="dark"] .dash-quick-link-grid button, html[data-theme="dark"] .dash-approval-link { color: #e9e6f2; border-color: #454253; background: #302e3d; }
html[data-theme="dark"] .dash-quick-link-grid button:hover, html[data-theme="dark"] .dash-approval-link:hover { border-color: #665b8e; background: #39364a; }
html[data-theme="dark"] .dash-quick-link-grid button { border-color: #454253; background: #302e3d; }
html[data-theme="dark"] .dash-quick-link-grid button:hover { background: #39364a; }
html[data-theme="dark"] .dash-quick-link-grid button > span { color: #c3b8ff; background: #403a58; }
html[data-theme="dark"] .dash-quick-link-grid button b, html[data-theme="dark"] .dash-approval-link > b { color: #c3b8ff; }
@media (max-width: 760px) { .dash-role-widget { width: 100%; } }
@media (max-width: 460px) { .dash-quick-link-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .dash-quick-link-grid button, .dash-approval-link { transition: none; } }



/* Dashboard quick access placement and data-backed metric mini charts. */
.dash-quick-access-row { margin-bottom: 16px; }
.dash-quick-access-row .dash-role-widget { width: 100%; max-width: none; }
.dash-quick-access-row .dash-widget-heading { margin-bottom: 12px; }
.dash-quick-access-row .dash-quick-link-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.dash-quick-access-row .dash-quick-link-grid button { min-height: 92px; gap: 9px; border-color: #efedf7; border-radius: 13px; padding: 12px 8px; font-size: 10px; }
.dash-quick-access-row .dash-quick-link-grid button > span { width: 36px; height: 36px; flex-basis: 36px; border-radius: 12px; font-size: 16px; }
.dash-quick-access-row .dash-quick-link-grid button b { display: none; }
.dash-stat-value-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 12px; }
.dash-stat-value-row > strong { margin-top: 0; }
.dash-micro-chart { display: flex; align-items: flex-end; justify-content: flex-end; gap: 4px; width: 74px; height: 35px; flex: 0 0 74px; padding: 0 2px 2px; border-bottom: 1px solid #e9e6f2; }
.dash-micro-chart span { display: block; width: 7px; height: var(--bar-height); border-radius: 4px 4px 1px 1px; background: var(--bar-color); opacity: .88; transform-origin: bottom; animation: dash-bar-rise .65s cubic-bezier(.2,.8,.2,1) both; }
html[data-theme="dark"] .dash-quick-access-row .dash-quick-link-grid button { color: #e9e6f2; border-color: #454253; background: #302e3d; }
html[data-theme="dark"] .dash-quick-access-row .dash-quick-link-grid button:hover { background: #39364a; border-color: #665b8e; }
html[data-theme="dark"] .dash-micro-chart { filter: brightness(1.15); }
@media (max-width: 760px) { .dash-quick-access-row .dash-quick-link-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .dash-quick-access-row .dash-quick-link-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash-micro-chart { width: 60px; flex-basis: 60px; } }


/* Heartbeat-style dashboard sparklines. */
.dash-micro-chart { display: block; width: 80px; height: 36px; flex: 0 0 80px; padding: 0; border: 0; color: var(--chart-color, #6956dc); }
.dash-micro-chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.dash-micro-chart path { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 100; stroke-dashoffset: 100; animation: dash-sparkline-draw .9s ease-out forwards; }
@keyframes dash-sparkline-draw { to { stroke-dashoffset: 0; } }
@media (max-width: 420px) { .dash-micro-chart { width: 60px; flex-basis: 60px; } }
@media (prefers-reduced-motion: reduce) { .dash-micro-chart path { animation: none; stroke-dashoffset: 0; } }


/* Leave type cards: visual refresh for admin leave settings. */
.leave-types-panel { padding: 22px; }
.leave-types-panel .panel-header { margin-bottom: 18px; }
.leave-types-panel .panel-header h3 { margin: 0 0 5px; }
.leave-types-panel .panel-header button { border-radius: 10px; padding: 10px 14px; }
.leave-type-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.leave-type-card { display: flex; min-width: 0; min-height: 150px; flex-direction: column; justify-content: space-between; padding: 16px; border: 1px solid #ece9f4; border-radius: 15px; background: linear-gradient(145deg,#fff,#fbfaff); box-shadow: 0 5px 16px rgba(35,31,67,.035); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; animation: screen-panel-rise .5s cubic-bezier(.16,1,.3,1) both; }
.leave-type-card:hover { transform: translateY(-3px); border-color: #d8d0f8; box-shadow: 0 12px 24px rgba(51,43,103,.09); }
.leave-type-card-main { display: flex; align-items: flex-start; gap: 13px; }
.leave-type-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; border-radius: 13px; color: #6854d5; background: #efecff; font-size: 19px; font-weight: 700; }
.leave-type-accent-1 .leave-type-icon { color: #a34f9c; background: #f8e9f5; }
.leave-type-accent-2 .leave-type-icon { color: #5272bd; background: #eaf0ff; }
.leave-type-accent-3 .leave-type-icon { color: #b97928; background: #fff0dc; }
.leave-type-card-copy { min-width: 0; }
.leave-type-card-copy h4 { margin: 2px 0 5px; color: #29253e; font-size: 13px; line-height: 1.35; }
.leave-type-card-copy p { margin: 0; color: #858198; font-size: 10px; line-height: 1.55; }
.leave-type-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 16px 0 0 55px; }
.leave-type-limit { padding: 6px 10px; border: 1px solid #e6e0fa; border-radius: 999px; color: #6957c6; background: #f4f1ff; font-size: 9px; font-weight: 700; white-space: nowrap; }
.leave-type-edit { min-width: 74px; border-color: #ddd7ef; color: #5e4bc5; background: transparent; }
.leave-type-edit:hover { border-color: #bcb0ed; background: #f7f5ff; }
.leave-type-empty { grid-column: 1 / -1; padding: 40px 16px; border: 1px dashed #ded9ed; border-radius: 13px; color: #858198; text-align: center; font-size: 12px; }
html[data-theme="dark"] .leave-types-panel .panel-header h3 { color: #f2efff; }
html[data-theme="dark"] .leave-types-panel .panel-header span { color: #b7b2c9 !important; }
html[data-theme="dark"] .leave-types-panel .panel-header button { color: #e9e6f2; border-color: #504b68; background: #302e3d; }
html[data-theme="dark"] .leave-type-card { color: #f0eef8; border-color: #454253; background: linear-gradient(145deg,#2d2b3b,#252430); box-shadow: 0 8px 22px rgba(0,0,0,.16); }
html[data-theme="dark"] .leave-type-card:hover { border-color: #5b527d; background: linear-gradient(145deg,#343146,#292735); }
html[data-theme="dark"] .leave-type-card-copy h4 { color: #f2efff; }
html[data-theme="dark"] .leave-type-card-copy p { color: #c1bdd1; }
html[data-theme="dark"] .leave-type-limit { color: #d5ceff; border-color: #51496f; background: #38334d; }
html[data-theme="dark"] .leave-type-edit { color: #e1dcf3; border-color: #5b5670; background: transparent; }
html[data-theme="dark"] .leave-type-edit:hover { border-color: #8477bc; background: #38354a; }
html[data-theme="dark"] .leave-type-empty { color: #c1bdd1; border-color: #4b475d; }
@media (max-width: 760px) { .leave-type-card-grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .leave-types-panel { padding: 16px 13px; } .leave-type-card { padding: 13px; } .leave-type-card-footer { margin-left: 0; } }
@media (prefers-reduced-motion: reduce) { .leave-type-card { animation: none; transition: none; } }


/* Improve department count contrast in dark mode. */
html[data-theme="dark"] .department-summary strong { color: #f2efff; }
html[data-theme="dark"] .department-summary small { color: #b7b2c9; }
/* Reports: keep summary tiles readable in dark mode. */
html[data-theme="dark"] .report-stat-grid > div {
    color: #f0eef8;
    background: #292936;
    border-color: #454354;
}
html[data-theme="dark"] .report-stat-grid strong {
    color: #f4f1ff;
}
html[data-theme="dark"] .report-stat-grid span {
    color: #c1bdd1;
}

/* Reports filter layout: align controls and replace the browser date hint. */
.report-filter-panel { margin-bottom: 20px; padding: 20px 22px; }
.report-filter-panel .panel-header { margin-bottom: 16px; }
.report-filter-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(190px, 1fr));
    align-items: end;
    gap: 16px 20px;
}
.report-filter-grid .form-group { min-width: 0; margin: 0; }
.report-filter-grid label { display: block; margin-bottom: 7px; color: var(--text); font-size: 12px; font-weight: 650; }
.report-date-field { position: relative; }
.report-date-field::before {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 14px;
    color: var(--muted);
    content: attr(data-empty-label);
    font-size: 13px;
    pointer-events: none;
    transform: translateY(-50%);
}
.report-date-field.has-value::before { display: none; }
.report-date-field input[type="date"] { width: 100%; min-width: 0; }
.report-date-field:not(.has-value) input[type="date"]::-webkit-datetime-edit { visibility: hidden; }
.report-date-field.has-value input[type="date"]::-webkit-datetime-edit { visibility: visible; }
.report-generate-group .primary-btn { width: 100%; min-height: 46px; }
.report-page-actions { display: flex; align-items: center; justify-content: flex-end; }
html[data-theme="dark"] .report-filter-grid label { color: #e5e1f0; }
html[data-theme="dark"] .report-date-field::before { color: #aaa6bc; }
@media (min-width: 1100px) {
    .report-filter-grid { grid-template-columns: repeat(4, minmax(150px, 1fr)); }
}
@media (max-width: 650px) {
    .report-filter-grid { grid-template-columns: 1fr; gap: 13px; }
    .reports-page-title { align-items: flex-start; gap: 12px; }
    .report-page-actions .primary-btn { padding: 10px 12px; white-space: nowrap; }
}
/* Refined department filter dropdown on the Reports page. */
.report-department-group select {
    display: block;
    width: 100%;
    min-height: 46px;
    padding: 0 42px 0 14px;
    border: 1px solid #dedbea;
    border-radius: 11px;
    appearance: none;
    color: #302b45;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236e63c8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.report-department-group select:hover { border-color: #bdb5e5; }
.report-department-group select:focus-visible {
    border-color: #7568e8;
    outline: none;
    box-shadow: 0 0 0 3px rgba(117, 104, 232, .16);
}
.report-department-group select option { color: #302b45; background: #fff; }
html[data-theme="dark"] .report-department-group select {
    border-color: #454354;
    color: #f0eef8;
    background-color: #292936;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b8aaff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
html[data-theme="dark"] .report-department-group select:hover { border-color: #73699a; background-color: #302f40; }
html[data-theme="dark"] .report-department-group select:focus-visible { border-color: #9386ff; box-shadow: 0 0 0 3px rgba(147, 134, 255, .2); }
html[data-theme="dark"] .report-department-group select option { color: #f0eef8; background: #292936; }

/* Minimal attendance page refresh. */
.attendance-page { display: grid; gap: 18px; }
.attendance-page-heading { display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.attendance-heading-main { display: flex; align-items: center; gap: 18px; min-width: 0; }
.attendance-heading-main h1 { margin: 0; color: var(--text); font-size: 29px; letter-spacing: -.035em; }
.attendance-heading-main p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.attendance-date-chip { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); background: var(--card); font-size: 12px; font-weight: 600; }
.attendance-date-chip span { color: var(--primary); }
.attendance-header-tools { display: flex; align-items: center; justify-content: flex-end; gap: 18px; }
.attendance-rate-summary { width: min(250px, 25vw); min-width: 190px; }
.attendance-rate-line { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11px; }
.attendance-rate-line strong { color: var(--text); font-size: 15px; }
.attendance-rate-track { height: 7px; margin: 7px 0 5px; overflow: hidden; border-radius: 99px; background: rgba(125, 117, 153, .2); }
.attendance-rate-track span { display: block; width: var(--attendance-rate); height: 100%; border-radius: inherit; background: linear-gradient(90deg, #7665ed, #a18df7); }
.attendance-rate-summary small { color: var(--muted); font-size: 10px; }
.attendance-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.attendance-summary-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0; }
.attendance-stat-card { display: flex; align-items: center; gap: 14px; min-height: 110px; padding: 17px 19px; border-radius: 15px; }
.attendance-stat-icon { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; border-radius: 12px; color: #7564e5; background: rgba(117, 100, 229, .13); font-size: 9px; font-weight: 750; letter-spacing: .02em; }
.attendance-stat-copy { display: grid; gap: 4px; min-width: 0; }
.attendance-stat-copy .stat-label { color: var(--muted); font-size: 11px; }
.attendance-stat-copy .stat-value { margin: 0; color: var(--text); font-size: 27px; line-height: 1.05; }
.attendance-stat-copy small { color: var(--muted); font-size: 10px; }
.attendance-stat-late .attendance-stat-icon { color: #d6a04b; background: rgba(214, 160, 75, .13); }
.attendance-stat-checkout .attendance-stat-icon { color: #6d9fe2; background: rgba(109, 159, 226, .14); }
.attendance-records-panel { padding: 20px 21px; border-radius: 16px; }
.attendance-records-heading { align-items: center; margin-bottom: 15px; }
.attendance-records-heading h3 { margin: 0; color: var(--text); font-size: 15px; }
.attendance-records-heading p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.attendance-records-panel table { width: 100%; border-collapse: separate; border-spacing: 0; }
.attendance-records-panel th { padding: 12px 13px; color: var(--muted); font-size: 9px; letter-spacing: .055em; }
.attendance-records-panel td { padding: 14px 13px; color: var(--text); font-size: 11px; }
.attendance-employee-cell { display: flex; align-items: center; gap: 10px; }
.attendance-employee-avatar { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; color: #5d50d1; background: #efedff; font-size: 10px; font-weight: 750; }
.attendance-employee-cell strong, .attendance-employee-cell small { display: block; }
.attendance-employee-cell strong { color: var(--text); font-size: 11px; }
.attendance-employee-cell small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.attendance-empty-state { display: grid; justify-items: center; gap: 6px; padding: 28px 12px; color: var(--muted); text-align: center; }
.attendance-empty-state > span { color: var(--primary); font-size: 22px; }
.attendance-empty-state strong { color: var(--text); font-size: 12px; }
.attendance-empty-state small { font-size: 10px; }
html[data-theme="dark"] .attendance-stat-card,
html[data-theme="dark"] .attendance-records-panel { background: var(--card); border-color: var(--border); }
html[data-theme="dark"] .attendance-records-panel th { color: #bcb7cc; background: #292936; border-color: #3c3a4b; }
html[data-theme="dark"] .attendance-records-panel td { color: #e5e2ee; border-color: #393747; }
html[data-theme="dark"] .attendance-employee-cell strong,
html[data-theme="dark"] .attendance-empty-state strong { color: #f0eef8; }
html[data-theme="dark"] .attendance-employee-avatar { color: #d2caff; background: #383251; }
@media (max-width: 900px) {
    .attendance-page-heading { align-items: flex-start; flex-direction: column; }
    .attendance-header-tools { width: 100%; justify-content: space-between; }
    .attendance-rate-summary { width: min(360px, 100%); }
}
@media (max-width: 640px) {
    .attendance-heading-main { align-items: flex-start; flex-direction: column; gap: 10px; }
    .attendance-heading-main h1 { font-size: 25px; }
    .attendance-header-tools { align-items: flex-start; flex-direction: column; }
    .attendance-summary-cards { grid-template-columns: 1fr; }
    .attendance-stat-card { min-height: 88px; }
    .attendance-records-panel { padding: 15px 12px; }
    .attendance-records-panel .table-wrap { overflow-x: auto; }
    .attendance-records-panel table { min-width: 620px; }
}

/* Minimal leave and timesheet page polish. Visual-only; existing actions stay attached. */
.leave-page-header { margin-bottom: 22px; }
.leave-page-header h1 { font-size: clamp(25px, 2.2vw, 32px); letter-spacing: -.04em; }
.leave-summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.leave-summary-card { min-height: 116px; padding: 18px 20px; border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 8px 22px rgba(35,31,67,.035); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.leave-summary-card:hover { transform: translateY(-2px); border-color: #d8d0f8; box-shadow: 0 12px 24px rgba(51,43,103,.08); }
.leave-summary-card::after { top: 16px; right: 17px; width: 34px; height: 34px; border-radius: 11px; }
.leave-summary-card .stat-label { max-width: calc(100% - 42px); }
.leave-summary-card .stat-value { margin-top: 12px; font-size: 27px; letter-spacing: -.03em; }
.leave-requests-panel, .leave-types-panel { margin-top: 0; padding: 21px; border: 1px solid var(--border); border-radius: 17px; box-shadow: 0 10px 26px rgba(35,31,67,.035); }
.leave-requests-panel .panel-header, .leave-types-panel .panel-header { align-items: center; }
.leave-requests-table { min-width: 680px; }
.leave-requests-table th, .leave-types-panel th { padding: 12px 13px; font-size: 10px; }
.leave-requests-table td, .leave-types-panel td { padding: 14px 13px; font-size: 12px; }
.leave-requests-table tbody tr, .leave-types-panel tbody tr { transition: background-color .16s ease; }
.leave-requests-panel .panel-header .action-btn, .leave-types-panel .panel-header .action-btn { min-height: 36px; padding: 0 13px; border-radius: 9px; }
.leave-page-header > .primary-btn { min-height: 44px; }

.timesheet-page-header { align-items: center; margin-bottom: 18px; }
.timesheet-page-header h1 { margin-bottom: 5px; font-size: clamp(25px, 2.2vw, 32px); letter-spacing: -.04em; }
.timesheet-page-header p { margin-top: 4px; }
.timesheet-page-actions select { min-height: 40px; border-radius: 10px; padding: 0 13px; }
.timesheet-page-actions .action-btn { min-height: 40px; padding: 0 13px; border-radius: 10px; }
.timesheet-summary-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.timesheet-summary-cards .stat-card { min-height: 112px; padding: 18px 20px; border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 8px 22px rgba(35,31,67,.035); }
.timesheet-summary-cards .stat-value { margin-top: 10px; font-size: 27px; letter-spacing: -.03em; }
.timesheet-chart-panel, .timesheet-entries-panel, .timesheet-add-panel { margin-bottom: 18px; padding: 20px 22px; border: 1px solid var(--border); border-radius: 17px; box-shadow: 0 10px 26px rgba(35,31,67,.035); }
.timesheet-chart-panel .panel-header, .timesheet-entries-panel .panel-header, .timesheet-add-panel .panel-header { margin-bottom: 14px; }
.timesheet-chart-panel .panel-header h3, .timesheet-entries-panel .panel-header h3, .timesheet-add-panel .panel-header h3 { font-size: 16px; }
.timesheet-hours-chart { margin: 0; }
.timesheet-hours-summary { gap: 8px; font-size: 12px; }
.timesheet-hours-summary strong { font-size: 18px; }
.timesheet-daily-bars { gap: 12px; margin: 16px 0; }
.timesheet-day-row { grid-template-columns: 100px minmax(120px, 1fr) 78px; gap: 13px; }
.timesheet-day-track { height: 16px; background: #eeedf5; }
.timesheet-hours-legend { padding-top: 13px; border-top: 1px solid var(--border); }
.timesheet-hours-legend-item { font-size: 11px; }
.timesheet-entries-panel table { min-width: 640px; }
.timesheet-entries-panel th { padding: 12px 13px; font-size: 10px; }
.timesheet-entries-panel td { padding: 13px; font-size: 12px; }
.timesheet-add-panel { max-width: none; }
.timesheet-add-panel .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.timesheet-add-panel .form-group label { margin-bottom: 7px; font-size: 11px; }
.timesheet-add-panel .form-actions { margin-top: 0; }
.timesheet-add-panel .primary-btn, .timesheet-submit-row .primary-btn { min-height: 42px; border-radius: 10px; padding: 0 18px; }
.timesheet-submit-row { display: flex; align-items: center; justify-content: flex-end; gap: 13px; margin: -2px 0 4px; padding: 14px 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--panel); }
.timesheet-submit-row .muted { font-size: 11px; }

html[data-theme="dark"] .leave-summary-card,
html[data-theme="dark"] .timesheet-summary-cards .stat-card,
html[data-theme="dark"] .leave-requests-panel,
html[data-theme="dark"] .leave-types-panel,
html[data-theme="dark"] .timesheet-chart-panel,
html[data-theme="dark"] .timesheet-entries-panel,
html[data-theme="dark"] .timesheet-add-panel,
html[data-theme="dark"] .timesheet-submit-row { border-color: #393747; box-shadow: 0 10px 26px rgba(0,0,0,.12); }
html[data-theme="dark"] .leave-page-header h1,
html[data-theme="dark"] .leave-requests-panel .panel-header h3,
html[data-theme="dark"] .leave-types-panel .panel-header h3,
html[data-theme="dark"] .timesheet-page-header h1,
html[data-theme="dark"] .timesheet-chart-panel .panel-header h3,
html[data-theme="dark"] .timesheet-entries-panel .panel-header h3,
html[data-theme="dark"] .timesheet-add-panel .panel-header h3 { color: #f2efff; }
html[data-theme="dark"] .leave-page-header p,
html[data-theme="dark"] .timesheet-page-header p { color: #aaa6bc; }
html[data-theme="dark"] .leave-requests-table th,
html[data-theme="dark"] .leave-types-panel th { color: #bcb8cb; background: #292936; }
html[data-theme="dark"] .leave-requests-table td,
html[data-theme="dark"] .leave-types-panel td { color: #e4e1ee; border-color: #393747; }
html[data-theme="dark"] .leave-requests-table tbody tr:hover,
html[data-theme="dark"] .leave-types-panel tbody tr:hover { background: #302e3d; }
html[data-theme="dark"] .timesheet-day-track { background: #343342; }
html[data-theme="dark"] .timesheet-hours-legend { border-color: #393747; }
html[data-theme="dark"] .timesheet-page-actions select { color: #f0eef8; background: #292936; border-color: #454354; }
@media (max-width: 760px) {
    .leave-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .timesheet-summary-cards { grid-template-columns: 1fr; }
    .timesheet-page-header { align-items: flex-start; flex-direction: column; gap: 12px; }
    .timesheet-page-actions { width: 100%; justify-content: space-between; }
    .timesheet-add-panel .form-grid { grid-template-columns: 1fr; }
    .timesheet-chart-panel, .timesheet-entries-panel, .timesheet-add-panel { padding: 16px 13px; }
}
@media (max-width: 480px) {
    .leave-summary-grid { grid-template-columns: 1fr; }
    .timesheet-day-row { grid-template-columns: 76px minmax(50px, 1fr) 62px; gap: 7px; }
    .timesheet-day-label, .timesheet-day-total { font-size: 10px; }
    .timesheet-hours-legend { grid-template-columns: 1fr; }
    .timesheet-submit-row { align-items: stretch; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
    .leave-summary-card, .leave-requests-table tbody tr, .leave-types-panel tbody tr { transition: none; }
}

/* HR weekly timesheets: compact review table with clear expanded week details. */
.timesheet-hr-panel { padding: 20px 22px; border: 1px solid var(--border); border-radius: 17px; box-shadow: 0 10px 26px rgba(35,31,67,.035); }
.timesheet-hr-table { min-width: 900px; border-collapse: separate; border-spacing: 0; }
.timesheet-hr-table th { padding: 13px 12px; background: #f8f7fb; color: #827d98; font-size: 10px; }
.timesheet-hr-table th:first-child { border-radius: 9px 0 0 9px; }
.timesheet-hr-table th:last-child { border-radius: 0 9px 9px 0; }
.timesheet-hr-table td { padding: 14px 12px; border-bottom: 1px solid var(--border); font-size: 11px; vertical-align: middle; }
.timesheet-hr-table tbody tr:not(.submitted-timesheet-details) { transition: background-color .16s ease; }
.timesheet-hr-table tbody tr:not(.submitted-timesheet-details):hover { background: rgba(105,86,220,.045); }
.timesheet-hr-table [data-timesheet-details] { border-radius: 9px; padding: 8px 12px; }
.timesheet-hr-table [data-review-decision="Approved"] { border-radius: 9px; padding: 9px 12px; white-space: nowrap; }
.timesheet-hr-table [data-review-decision="Rejected"] { border-radius: 9px; padding: 8px 11px; white-space: nowrap; }
.timesheet-hr-table .submitted-timesheet-details > td { padding: 18px; background: #faf9fd; }
.timesheet-hr-table .submitted-timesheet-details .timesheet-hours-chart { margin-bottom: 18px; padding: 16px; border: 1px solid #eeebf5; border-radius: 13px; background: #fff; }
.timesheet-hr-table .submitted-timesheet-details .table-wrap { border: 1px solid var(--border); border-radius: 11px; }
.timesheet-hr-table .submitted-timesheet-details table { min-width: 600px; }
html[data-theme="dark"] .timesheet-hr-panel { border-color: #393747; box-shadow: 0 10px 26px rgba(0,0,0,.12); }
html[data-theme="dark"] .timesheet-hr-table th { color: #bcb8cb; background: #292936; }
html[data-theme="dark"] .timesheet-hr-table td { color: #e4e1ee; border-color: #393747; }
html[data-theme="dark"] .timesheet-hr-table tbody tr:not(.submitted-timesheet-details):hover { background: #292837; }
html[data-theme="dark"] .timesheet-hr-table .submitted-timesheet-details > td { background: #24232f; }
html[data-theme="dark"] .timesheet-hr-table .submitted-timesheet-details .timesheet-hours-chart { border-color: #393747; background: #292936; }
@media (max-width: 760px) { .timesheet-hr-panel { padding: 16px 13px; } .timesheet-hr-table .submitted-timesheet-details > td { padding: 12px; } }

/* Page-specific priority over the shared dashboard redesign rules. */
.dashboard-redesign .leave-page-header { margin-bottom: 20px; }
.dashboard-redesign .leave-page-header h1 { margin: 0; font-size: clamp(25px, 2vw, 31px); letter-spacing: -.035em; }
.dashboard-redesign .leave-page-header p { margin-top: 5px; font-size: 13px; }
.dashboard-redesign .leave-summary-grid .leave-summary-card { min-height: 116px; height: auto; padding: 18px 20px; border-radius: 15px; }
.dashboard-redesign .leave-summary-grid .leave-summary-card::after { top: 15px; right: 16px; width: 34px; height: 34px; }
.dashboard-redesign .leave-summary-grid .leave-summary-card .stat-value { margin-top: 11px; font-size: 27px; }
.dashboard-redesign .leave-summary-grid .leave-summary-card .stat-change { margin-top: 6px; font-size: 10px; }
.dashboard-redesign .leave-requests-panel, .dashboard-redesign .leave-types-panel { margin-top: 0; padding: 20px; border-radius: 16px; }
.dashboard-redesign .leave-requests-panel .panel-header { margin-bottom: 13px; }
.dashboard-redesign .leave-requests-panel .panel-header h3 { margin: 0; font-size: 16px; }
.dashboard-redesign .leave-requests-table th { padding: 12px 13px; font-size: 10px; }
.dashboard-redesign .leave-requests-table td { padding: 13px; font-size: 12px; }
.dashboard-redesign .leave-requests-table tbody tr:hover { background: rgba(105,86,220,.045); }
.dashboard-redesign .leave-requests-panel .panel-header .action-btn { min-height: 36px; border-radius: 9px; }
html[data-theme="dark"] .dashboard-redesign .leave-page-header h1,
html[data-theme="dark"] .dashboard-redesign .leave-requests-panel .panel-header h3,
html[data-theme="dark"] .dashboard-redesign .leave-types-panel .panel-header h3 { color: #f2efff; }
html[data-theme="dark"] .dashboard-redesign .leave-summary-grid .leave-summary-card { background: #211f2b; border-color: #393747; box-shadow: 0 8px 22px rgba(0,0,0,.12); }
html[data-theme="dark"] .dashboard-redesign .leave-requests-panel,
html[data-theme="dark"] .dashboard-redesign .leave-types-panel { background: #211f2b; border-color: #393747; box-shadow: 0 10px 26px rgba(0,0,0,.12); }
html[data-theme="dark"] .dashboard-redesign .leave-requests-table th { color: #bcb8cb; background: #292936; }
html[data-theme="dark"] .dashboard-redesign .leave-requests-table td { color: #e4e1ee; border-color: #393747; }
html[data-theme="dark"] .dashboard-redesign .leave-requests-table tbody tr:hover { background: #302e3d; }
@media (max-width: 760px) {
    .dashboard-redesign .leave-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-redesign .leave-requests-panel, .dashboard-redesign .leave-types-panel { padding: 16px 13px; }
}
@media (max-width: 480px) { .dashboard-redesign .leave-summary-grid { grid-template-columns: 1fr; } }


/* Employee Leave and Timesheet reference layouts. */
.leave-overview-grid{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(300px,.8fr);gap:18px;margin:18px 0}.leave-balance-panel,.leave-upcoming-panel{min-width:0;padding:22px;border:1px solid var(--border);border-radius:16px}.leave-balance-panel{display:grid;grid-template-columns:minmax(0,1fr) minmax(210px,.48fr);gap:20px;align-items:stretch}.leave-balance-main{align-self:center}.leave-section-kicker{display:block;color:#9785ff;font-size:9px;font-weight:800;letter-spacing:.15em}.leave-balance-main h2{margin:10px 0 5px;color:var(--text);font-size:18px}.leave-balance-number{display:flex;align-items:baseline;gap:9px;margin-top:7px;color:var(--text);font-size:clamp(38px,5vw,56px);font-weight:750;letter-spacing:-.055em}.leave-balance-number span{color:var(--muted);font-size:18px;font-weight:500;letter-spacing:0}.leave-balance-main>p{margin:5px 0 0;color:var(--muted);font-size:12px}.leave-status-list{display:grid;align-content:center;padding-left:18px;border-left:1px solid var(--border)}.leave-status-line{display:grid;grid-template-columns:42px 1fr auto;gap:11px;align-items:center;min-height:58px;border-bottom:1px solid var(--border);color:var(--muted);font-size:12px}.leave-status-line:last-child{border-bottom:0}.leave-status-icon,.leave-heading-icon{display:grid;place-items:center;width:36px;height:36px;border-radius:10px;color:#a88bff;background:rgba(113,76,255,.13);font-size:17px;font-weight:700}.leave-status-line strong{color:var(--text);font-size:17px}.leave-status-approved .leave-status-icon{color:#47d8a0;background:rgba(44,194,136,.12)}.leave-status-rejected .leave-status-icon{color:#ff7786;background:rgba(255,93,114,.12)}.leave-panel-heading{display:flex;align-items:center;gap:11px;margin-bottom:18px}.leave-panel-heading h3{margin:0;color:var(--text);font-size:16px}.leave-upcoming-card,.leave-upcoming-empty{display:flex;min-height:108px;flex-direction:column;justify-content:center;gap:9px;padding:16px;border:1px solid var(--border);border-radius:12px;background:rgba(113,76,255,.035)}.leave-upcoming-card strong,.leave-upcoming-empty strong{color:var(--text);font-size:15px}.leave-upcoming-card>span:last-child,.leave-upcoming-empty>span{color:var(--muted);font-size:11px}.leave-employee-requests{margin-top:18px}.leave-employee-requests table{min-width:650px}.leave-employee-requests th,.leave-employee-requests td{padding:13px 14px}
.timesheet-reference-header{align-items:flex-end;gap:18px;margin-bottom:18px}.timesheet-reference-header h1{font-size:clamp(30px,3vw,42px);letter-spacing:-.045em}.timesheet-reference-header p{font-size:14px}.timesheet-reference-actions{display:flex;align-items:center;gap:9px}.timesheet-week-control{display:flex;height:42px;align-items:center;gap:5px;padding:0 10px;border:1px solid var(--border);border-radius:10px;background:var(--card)}.timesheet-week-control>span{color:#a996ff;font-size:22px;line-height:1}.timesheet-week-control select{max-width:205px;border:0;outline:0;color:var(--text);background:transparent;font:inherit;font-size:11px}.timesheet-status-pill{display:inline-flex;height:40px;align-items:center;gap:8px;padding:0 13px;border:1px solid var(--border);border-radius:10px;color:#e9c56b;background:rgba(255,194,64,.05);font-size:11px;font-weight:700}.timesheet-status-pill i{width:9px;height:9px;border-radius:50%;background:#f3bd49}.timesheet-status-pill.approved i{background:#46d69a}.timesheet-status-pill.rejected i{background:#f36c7a}.timesheet-submit-top,.timesheet-add-shortcut{min-height:40px;border-radius:10px;padding:0 15px;white-space:nowrap}.timesheet-refresh-compact{width:40px;height:40px;padding:0;border-radius:10px;font-size:18px}.timesheet-reference-chart,.timesheet-reference-entries{margin-bottom:16px;padding:18px;border:1px solid var(--border);border-radius:15px}.timesheet-chart-heading,.timesheet-entries-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:13px}.timesheet-chart-heading h3,.timesheet-entries-heading h3{margin:0;color:var(--text);font-size:17px}.timesheet-overview-metrics{display:flex;align-items:center}.timesheet-overview-metrics>div{display:grid;min-width:118px;gap:4px;padding:0 18px;border-left:1px solid var(--border)}.timesheet-overview-metrics span{color:var(--muted);font-size:10px}.timesheet-overview-metrics strong{color:var(--text);font-size:16px}.timesheet-reference-chart .timesheet-hours-summary{display:none}.timesheet-reference-chart .timesheet-daily-bars{gap:0;margin:0}.timesheet-reference-chart .timesheet-day-row{grid-template-columns:55px 90px minmax(100px,1fr) 78px;min-height:38px;gap:12px;border-top:1px solid var(--border)}.timesheet-day-date{color:var(--muted);font-size:10px;white-space:nowrap}.timesheet-reference-chart .timesheet-day-track{height:11px}.timesheet-reference-chart .timesheet-day-total{font-size:11px}.timesheet-reference-chart .timesheet-hours-legend{display:flex;flex-wrap:wrap;gap:8px 20px;padding:12px 0 1px;border:0}.timesheet-reference-entries .table-wrap{border:1px solid var(--border);border-radius:10px}.timesheet-reference-entries table{min-width:720px}.timesheet-reference-entries th{padding:11px 13px;font-size:10px}.timesheet-reference-entries td{padding:12px 13px;font-size:11px}.timesheet-add-panel{scroll-margin-top:100px}
html[data-theme="dark"] .leave-balance-panel,html[data-theme="dark"] .leave-upcoming-panel,html[data-theme="dark"] .timesheet-reference-chart,html[data-theme="dark"] .timesheet-reference-entries{background:#1b1a26;border-color:#303047;box-shadow:0 8px 22px rgba(0,0,0,.12)}html[data-theme="dark"] .leave-upcoming-card,html[data-theme="dark"] .leave-upcoming-empty{background:#1d1c2b;border-color:#34334d}html[data-theme="dark"] .timesheet-week-control,html[data-theme="dark"] .timesheet-status-pill{background:#1c1b29;border-color:#36354e}html[data-theme="dark"] .timesheet-week-control select{color:#eeeaff}html[data-theme="dark"] .timesheet-week-control option{color:#eeeaff;background:#242331}html[data-theme="dark"] .timesheet-reference-chart .timesheet-day-track{background:#2a293d}
@media(max-width:900px){.leave-overview-grid{grid-template-columns:1fr}.timesheet-reference-header{align-items:flex-start;flex-direction:column}.timesheet-reference-actions{width:100%;flex-wrap:wrap}}@media(max-width:620px){.timesheet-day-row{grid-template-columns:37px 70px minmax(40px,1fr) 55px;gap:7px}.leave-balance-panel{grid-template-columns:1fr}.leave-status-list{padding:10px 0 0;border-top:1px solid var(--border);border-left:0}.timesheet-reference-actions{gap:7px}.timesheet-week-control{flex:1 1 100%;justify-content:space-between}.timesheet-week-control select{max-width:none;flex:1;text-align:center}.timesheet-overview-metrics{flex:1;justify-content:flex-end}.timesheet-overview-metrics>div{min-width:auto;padding:0 9px}.timesheet-chart-heading{align-items:flex-start;flex-direction:column}.timesheet-reference-chart .timesheet-day-row{grid-template-columns:37px 70px minmax(50px,1fr) 55px;gap:7px}.timesheet-day-date{font-size:9px}}


.timesheet-week-control button{display:grid;place-items:center;width:26px;height:30px;border:0;border-radius:6px;color:#a996ff;background:transparent;font-size:22px;line-height:1}.timesheet-week-control button:hover:not(:disabled){background:rgba(113,76,255,.12)}.timesheet-week-control button:disabled{opacity:.35;cursor:default}


/* HR review pages: restrained status accents and clear weekly overview. */
.dashboard-redesign .leave-hr-summary-grid .leave-summary-card { position: relative; overflow: hidden; border-left: 3px solid #7561e8; transition: transform .18s ease, box-shadow .18s ease; }
.dashboard-redesign .leave-hr-summary-grid .leave-summary-card:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(40,32,85,.09); }
.dashboard-redesign .leave-hr-summary-grid .leave-summary-pending { border-left-color: #e4a347; }
.dashboard-redesign .leave-hr-summary-grid .leave-summary-approved { border-left-color: #39a983; }
.dashboard-redesign .leave-hr-summary-grid .leave-summary-rejected { border-left-color: #d86c7e; }
.dashboard-redesign .leave-hr-summary-grid .leave-summary-balance { border-left-color: #7561e8; }
.dashboard-redesign .leave-hr-requests .panel-header h3 { display:flex; align-items:center; gap:10px; }
.dashboard-redesign .leave-hr-requests .panel-header h3::before { content:""; width:8px; height:8px; border-radius:50%; background:#7561e8; box-shadow:0 0 0 4px rgba(117,97,232,.12); }
.timesheet-hr-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin:0 0 18px; }
.timesheet-hr-stat { display:grid; grid-template-columns:1fr auto; align-items:center; gap:4px 12px; min-width:0; padding:17px 19px; border:1px solid var(--border); border-left:3px solid #7561e8; border-radius:14px; background:var(--card); box-shadow:0 7px 20px rgba(35,31,67,.035); }
.timesheet-hr-stat span { color:var(--muted); font-size:11px; font-weight:600; }
.timesheet-hr-stat strong { grid-column:2; grid-row:1 / span 2; color:var(--text); font-size:26px; line-height:1; }
.timesheet-hr-stat small { color:var(--muted); font-size:10px; }
.timesheet-hr-stat-pending { border-left-color:#e4a347; }
.timesheet-hr-stat-draft { border-left-color:#8c83b8; }
.timesheet-hr-stat-approved { border-left-color:#39a983; }
.timesheet-hr-stat-rejected { border-left-color:#d86c7e; }
.timesheet-hr-panel-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:0 0 16px; }
.timesheet-hr-panel-heading h2 { margin:3px 0 4px; color:var(--text); font-size:17px; letter-spacing:-.02em; }
.timesheet-hr-panel-heading p { margin:0; color:var(--muted); font-size:11px; }
.timesheet-hr-kicker { color:#8471e9; font-size:9px; font-weight:800; letter-spacing:.13em; }
.timesheet-hr-count { flex:none; padding:7px 10px; border:1px solid var(--border); border-radius:999px; color:var(--muted); font-size:10px; }
.timesheet-hr-panel .table-wrap { border-radius:12px; }
html[data-theme="dark"] .timesheet-hr-stat { background:#1b1a26; border-color:#303047; box-shadow:0 8px 22px rgba(0,0,0,.12); }
html[data-theme="dark"] .timesheet-hr-stat strong, html[data-theme="dark"] .timesheet-hr-panel-heading h2 { color:#f2efff; }
html[data-theme="dark"] .timesheet-hr-count { border-color:#3b394d; background:#242331; }
html[data-theme="dark"] .dashboard-redesign .leave-hr-summary-grid .leave-summary-card:hover { box-shadow:0 12px 26px rgba(0,0,0,.2); }
@media(max-width:900px) { .timesheet-hr-summary { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:560px) { .timesheet-hr-summary { gap:9px; } .timesheet-hr-stat { padding:13px; } .timesheet-hr-stat strong { font-size:22px; } .timesheet-hr-panel-heading { align-items:flex-start; } }

/* Match the HR overview to the employee overview panel layout. */
.dashboard-redesign .leave-hr-summary-grid { display:none; }
.dashboard-redesign .leave-overview-grid .leave-balance-panel,
.dashboard-redesign .leave-overview-grid .leave-upcoming-panel { min-height:190px; }
.dashboard-redesign .leave-hr-requests { margin-top:18px; }
.dashboard-redesign .leave-hr-requests .panel-header h3 { display:flex; align-items:center; gap:10px; }
.dashboard-redesign .leave-hr-requests .panel-header h3::before { content:""; width:8px; height:8px; border-radius:50%; background:#7561e8; box-shadow:0 0 0 4px rgba(117,97,232,.12); }
.timesheet-hr-summary { grid-template-columns:repeat(3,minmax(0,1fr)); }
.timesheet-hr-stat-hours { border-left-color:#7561e8; }
@media(max-width:760px) { .dashboard-redesign .leave-overview-grid .leave-balance-panel,.dashboard-redesign .leave-overview-grid .leave-upcoming-panel { min-height:0; } }


/* Keep the time-entry form fields grouped in one clear row. */
.dashboard-redesign .timesheet-add-panel #timesheetEntryForm { display:grid; grid-template-columns:minmax(170px,.9fr) minmax(300px,1.45fr) minmax(125px,.55fr); align-items:end; gap:16px; }
.dashboard-redesign .timesheet-add-panel #timesheetEntryForm .form-group { min-width:0; margin:0; }
.dashboard-redesign .timesheet-add-panel #timesheetEntryForm .form-group.full-width,
.dashboard-redesign .timesheet-add-panel #timesheetEntryForm .form-actions.full-width { grid-column:1 / -1; }
.dashboard-redesign .timesheet-add-panel #timesheetEntryForm .form-group label { display:block; margin-bottom:7px; }
.dashboard-redesign .timesheet-add-panel #timesheetEntryForm input,
.dashboard-redesign .timesheet-add-panel #timesheetEntryForm select { width:100%; min-width:0; }
.dashboard-redesign .timesheet-add-panel #timesheetEntryForm textarea { min-height:88px; resize:vertical; }
.dashboard-redesign .timesheet-add-panel #timesheetEntryForm .form-actions { display:flex; justify-content:flex-start; margin:0; padding:0; }
.dashboard-redesign .timesheet-add-panel { padding:20px 22px; }
@media(max-width:850px) { .dashboard-redesign .timesheet-add-panel #timesheetEntryForm { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:560px) { .dashboard-redesign .timesheet-add-panel #timesheetEntryForm { grid-template-columns:1fr; gap:13px; } .dashboard-redesign .timesheet-add-panel #timesheetEntryForm .form-group.full-width,.dashboard-redesign .timesheet-add-panel #timesheetEntryForm .form-actions.full-width { grid-column:auto; } }

/* Active selector: the page wrapper does not use a dashboard-redesign class. */
#content .timesheet-add-panel #timesheetEntryForm.form-grid { grid-template-columns:minmax(180px,.85fr) minmax(300px,1.4fr) minmax(130px,.55fr); align-items:end; gap:16px; }
#content .timesheet-add-panel #timesheetEntryForm.form-grid > .form-group { min-width:0; margin:0; }
#content .timesheet-add-panel #timesheetEntryForm.form-grid > .form-group.full-width,
#content .timesheet-add-panel #timesheetEntryForm.form-grid > .form-actions.full-width { grid-column:1 / -1; }
#content .timesheet-add-panel #timesheetEntryForm.form-grid > .form-actions { justify-content:flex-start; margin:0; padding:0; }
#content .timesheet-add-panel #timesheetEntryForm input,
#content .timesheet-add-panel #timesheetEntryForm select { width:100%; min-width:0; }
@media(max-width:850px) { #content .timesheet-add-panel #timesheetEntryForm.form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:560px) { #content .timesheet-add-panel #timesheetEntryForm.form-grid { grid-template-columns:1fr; } }

/* Make the week label blend into its single surrounding control. */
#content .timesheet-week-control select,
#content .timesheet-reference-actions .timesheet-week-control select { appearance:none; -webkit-appearance:none; border:0; border-radius:0; outline:0; box-shadow:none; background:transparent !important; background-color:transparent !important; }
#content .timesheet-week-control select:focus,
#content .timesheet-reference-actions .timesheet-week-control select:focus { outline:0; box-shadow:none; }
html[data-theme="dark"] #content .timesheet-week-control select { color:#eeeaff; }

/* HR expanded timesheet chart: four columns for weekday, date, bar, and total. */
.timesheet-hr-table .submitted-timesheet-details .timesheet-day-row { display:grid; grid-template-columns:58px 96px minmax(120px,1fr) 88px; align-items:center; gap:12px; min-height:40px; }
.timesheet-hr-table .submitted-timesheet-details .timesheet-daily-bars { display:grid; gap:4px; margin:12px 0; }
.timesheet-hr-table .submitted-timesheet-details .timesheet-day-label { font-size:11px; font-weight:700; }
.timesheet-hr-table .submitted-timesheet-details .timesheet-day-date { font-size:10px; white-space:nowrap; }
.timesheet-hr-table .submitted-timesheet-details .timesheet-day-track { width:100%; height:12px; }
.timesheet-hr-table .submitted-timesheet-details .timesheet-day-total { font-size:11px; text-align:right; white-space:nowrap; }
.timesheet-hr-table .submitted-timesheet-details .timesheet-hours-legend { display:flex; flex-wrap:wrap; gap:10px 22px; padding-top:11px; border-top:1px solid var(--border); }
.timesheet-hr-table .submitted-timesheet-details .timesheet-day-bar { position:relative; }
.timesheet-hr-table .submitted-timesheet-details .timesheet-day-total-wrap { display:grid; justify-items:end; gap:2px; }
.timesheet-hr-table .submitted-timesheet-details .timesheet-day-state { color:#b7791f; font-size:10px; }
.timesheet-hr-table .submitted-timesheet-details .timesheet-day-skipped .timesheet-day-track { background:#f1edf8; }
.timesheet-overtime-overlay { position:absolute; top:0; right:0; bottom:0; border-left:1px solid rgba(255,255,255,.8); background:repeating-linear-gradient(135deg,rgba(245,158,11,.95) 0 5px,rgba(255,247,220,.9) 5px 8px); }
.timesheet-overtime-badge { color:#b7791f; font-size:9px; font-weight:700; white-space:nowrap; }
.timesheet-overtime-swatch { display:inline-block; width:13px; height:13px; border-radius:3px; background:repeating-linear-gradient(135deg,#f59e0b 0 4px,#fff3cd 4px 7px); }
html[data-theme="dark"] .timesheet-hr-table .submitted-timesheet-details .timesheet-day-skipped .timesheet-day-track { background:#343342; }
html[data-theme="dark"] .timesheet-hr-table .submitted-timesheet-details .timesheet-day-state,
html[data-theme="dark"] .timesheet-overtime-badge,

/* Employee time-entry list is grouped by weekday for a full selected-week view. */
.timesheet-week-entries-caption { margin:4px 0 0; color:var(--muted); font-size:11px; }
.timesheet-reference-entries tbody .timesheet-entry-day th { display:table-cell; padding:11px 14px; border-top:1px solid var(--border); color:var(--text); background:rgba(112,91,224,.055); font-size:12px; font-weight:700; text-align:left; }
.timesheet-entry-empty-day td { color:var(--muted); font-size:11px; font-style:italic; }
.timesheet-reference-entries tbody tr:not(.timesheet-entry-day):hover { background:rgba(112,91,224,.035); }
html[data-theme="dark"] .timesheet-reference-entries tbody .timesheet-entry-day th { background:rgba(143,121,255,.08); }
.timesheet-hr-table .submitted-timesheet-details .timesheet-hr-day-heading th { display:table-cell; padding:11px 13px; border-top:1px solid var(--border); color:var(--text); background:rgba(112,91,224,.055); font-size:12px; font-weight:700; text-align:left; }
.timesheet-hr-table .submitted-timesheet-details .timesheet-hr-empty-day td { padding:10px 13px; color:var(--muted); font-size:11px; font-style:italic; }
html[data-theme="dark"] .timesheet-hr-table .submitted-timesheet-details .timesheet-hr-day-heading th { background:rgba(143,121,255,.08); }
@media(max-width:680px) { .timesheet-hr-table .submitted-timesheet-details .timesheet-day-row { grid-template-columns:40px 72px minmax(60px,1fr) 58px; gap:6px; } .timesheet-hr-table .submitted-timesheet-details .timesheet-day-label,.timesheet-hr-table .submitted-timesheet-details .timesheet-day-total { font-size:9px; } .timesheet-hr-table .submitted-timesheet-details .timesheet-day-date { font-size:8px; } }


/* Compact role-directory panels shared by the people directories */
.employee-directory-layout, .department-directory-layout { display:grid; grid-template-columns:minmax(0, 1fr) 245px; align-items:start; gap:15px; }
.employee-directory-main, .department-directory-main { min-width:0; }
.employee-directory-main .directory-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); }
.role-directory-aside { position:sticky; top:92px; }
.role-directory-aside > strong { color:#29243e; }
.role-directory-facts { display:grid; margin-top:13px; border-top:1px solid #e7e2fa; }
.role-directory-facts > div { display:flex; align-items:flex-start; justify-content:space-between; gap:8px; padding:9px 0; border-bottom:1px solid #e7e2fa; color:#87839a; font-size:9px; line-height:1.45; }
.role-directory-facts b { max-width:58%; color:#37314f; text-align:right; overflow-wrap:anywhere; }
.designation-aside > strong { color:#29243e; }
html[data-theme="dark"] .designation-aside > strong,
html[data-theme="dark"] .role-directory-facts b { color:#f0eef8; }
html[data-theme="dark"] .role-directory-facts > div { color:#aaa6bc; border-color:#454253; }
@media (max-width: 1050px) {
  .employee-directory-layout, .department-directory-layout { grid-template-columns:minmax(0,1fr) 220px; }
}
@media (max-width: 760px) {
  .employee-directory-layout, .department-directory-layout { grid-template-columns:1fr; }
  .role-directory-aside { position:static; }
}

/* My Profile page */
.profile-page-title { margin-bottom: 22px; }
.profile-eyebrow { display:block; margin-bottom:7px; color:var(--primary); font-size:10px; font-weight:800; letter-spacing:.16em; text-transform:uppercase; }
.profile-hero { display:flex; align-items:center; gap:18px; min-height:132px; padding:24px 28px; margin-bottom:18px; background:linear-gradient(115deg, var(--card), color-mix(in srgb, var(--primary) 10%, var(--card))); }
.profile-avatar { display:grid; place-items:center; flex:0 0 76px; width:76px; height:76px; border:4px solid color-mix(in srgb, var(--primary) 16%, var(--card)); border-radius:24px; background:var(--primary); color:#fff; font-size:24px; font-weight:800; box-shadow:0 8px 22px color-mix(in srgb, var(--primary) 22%, transparent); }
.profile-identity { min-width:0; flex:1; }
.profile-identity .profile-eyebrow { margin-bottom:4px; }
.profile-identity h2 { margin:0; color:var(--text); font-size:22px; }
.profile-identity p { margin:5px 0 0; color:var(--muted); overflow-wrap:anywhere; }
.profile-role-pill { padding:8px 13px; border:1px solid color-mix(in srgb, var(--primary) 25%, var(--border)); border-radius:999px; background:color-mix(in srgb, var(--primary) 10%, var(--card)); color:var(--primary); font-size:12px; font-weight:750; text-transform:capitalize; }
.profile-content-grid { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(280px,1fr); gap:18px; align-items:stretch; }
.profile-info-panel, .profile-security-panel { padding:22px 24px; }
.profile-panel-heading { display:flex; align-items:center; gap:12px; margin-bottom:17px; }
.profile-panel-heading h2 { margin:0; color:var(--text); font-size:17px; }
.profile-panel-heading p { margin:4px 0 0; color:var(--muted); font-size:12px; }
.profile-heading-icon { display:grid; place-items:center; width:40px; height:40px; border-radius:13px; background:color-mix(in srgb, var(--primary) 12%, var(--card)); color:var(--primary); font-size:20px; font-weight:800; }
.profile-security-icon { background:color-mix(in srgb, var(--success) 13%, var(--card)); color:var(--success); }
.profile-details-list { margin:0; }
.profile-details-list > div { display:flex; align-items:center; justify-content:space-between; gap:20px; min-height:49px; border-top:1px solid var(--border); }
.profile-details-list dt { color:var(--muted); font-size:13px; }
.profile-details-list dd { margin:0; color:var(--text); font-size:13px; font-weight:700; text-align:right; overflow-wrap:anywhere; }
.profile-active-status { display:inline-flex; align-items:center; gap:6px; color:var(--success); }
.profile-active-status::before { content:""; width:7px; height:7px; border-radius:50%; background:currentColor; }
.profile-security-detail { display:flex; align-items:flex-start; gap:12px; padding:16px; border:1px solid var(--border); border-radius:14px; background:color-mix(in srgb, var(--bg) 65%, var(--card)); }
.profile-security-dot { flex:0 0 9px; width:9px; height:9px; margin-top:5px; border-radius:50%; background:var(--success); box-shadow:0 0 0 4px color-mix(in srgb, var(--success) 14%, transparent); }
.profile-security-detail strong { color:var(--text); font-size:13px; }
.profile-security-detail p { margin:5px 0 0; color:var(--muted); font-size:12px; line-height:1.5; }
.profile-security-note { margin-top:14px; padding-left:2px; color:var(--muted); font-size:11px; line-height:1.55; }
@media (max-width: 760px) {
  .profile-hero { align-items:flex-start; flex-wrap:wrap; padding:20px; }
  .profile-role-pill { margin-left:94px; }
  .profile-content-grid { grid-template-columns:1fr; }
  .profile-info-panel, .profile-security-panel { padding:19px; }
}
#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.websocket-notification {
    background-color: #333;
    color: white;
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 8px;
    font-size: 14px;
}

/* =====================================
   MOBILE EMS NAVIGATION
===================================== */

/* Hidden on desktop */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 760px) {

    /* Sidebar drawer */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(280px, 85vw);
        z-index: 1001;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        overflow-y: auto;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    /* Dark overlay behind open sidebar */
    #app.sidebar-menu-open::before {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 1000;
    }

    /* Main content */
    .main {
        width: 100%;
        margin-left: 0;
        min-width: 0;
    }

    .content {
        padding: 18px 14px 95px;
        width: 100%;
    }

    /* Compact header */
    .topbar {
        height: 60px;
        padding: 0 14px;
    }

    #mobileMenu {
        display: inline-block;
    }

    .user-chip {
        display: none;
    }

    .top-actions {
        gap: 5px;
    }

    /* Bottom navigation */
    .mobile-bottom-nav {
        position: fixed;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 900;
        min-height: 66px;
        padding: 7px 5px calc(7px + env(safe-area-inset-bottom));
        background: var(--card);
        border-top: 1px solid var(--border);
        box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.06);
    }

    .mobile-bottom-nav .nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        margin: 0;
        padding: 5px 2px;
        border-radius: 9px;
        background: transparent;
        color: var(--muted);
        font-size: 10px;
        text-align: center;
    }

    .mobile-bottom-nav .nav-item.active {
        background: transparent;
        color: var(--primary);
        font-weight: 700;
    }

    .mobile-nav-icon {
        font-size: 21px;
        line-height: 1;
    }

    /* Dashboard cards */
    .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    /* Forms */
    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-group.full-width {
        grid-column: auto;
    }

    /* Tables */
    .table-wrap,
    .directory-table {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table-wrap table,
    .directory-table table {
        min-width: 600px;
    }

    /* Profile */
    .profile-content-grid {
        grid-template-columns: 1fr;
    }

    .profile-hero {
        flex-wrap: wrap;
    }
}

/* Smaller phones */
@media (max-width: 420px) {

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

    .page-title h1 {
        font-size: 21px;
    }

    .content {
        padding-left: 11px;
        padding-right: 11px;
    }
}