@font-face {
  font-family: Zeyada;
  src: url('/Zeyada.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Montserrat;
  src: url('/Montserrat.ttf') format('truetype');
  font-weight: 100 900;
  font-display: swap;
}
* { box-sizing: border-box; }
:root {
  font-family: Montserrat, system-ui, sans-serif;
  color: #292344;
  background: #f6f5fa;
  --violet: #483789;
  --magenta: #a7569b;
  --cyan: #78c6d8;
  --muted: #625b75;
  --line: #e7e2ef;
  --tint: #f0ebfa;
}
body { margin: 0; min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: 15rem minmax(0, 1fr); grid-template-rows: 1fr auto; }
.app-footer { grid-column: 1 / -1; grid-row: 2; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: .6rem 1rem; padding: .55rem 1rem; color: #eee6ff; background: #231542; font-size: .72rem; text-align: center; }
.app-footer img { width: 4.7rem; height: auto; }
.update-notice { position: fixed; z-index: 8; inset: auto max(.8rem, env(safe-area-inset-right)) max(.8rem, env(safe-area-inset-bottom)) auto; margin: 0; width: min(calc(100% - 1.6rem), 21rem); padding: .85rem; border: 1px solid var(--line); border-radius: .75rem; background: white; box-shadow: 0 8px 32px #29234435; }
.update-notice strong { color: var(--violet); }
.update-notice::backdrop { background: transparent; pointer-events: none; }
.update-notice p { margin: .5rem 0 .75rem; color: var(--muted); font-size: .82rem; line-height: 1.45; }
.sidebar { background: white; border-right: 1px solid var(--line); }
.sidebar-tools { display: flex; align-items: center; gap: .4rem; margin: .9rem .85rem; }
.account-menu { position: relative; min-width: 0; flex: 1; }
.notifications-menu { position: relative; flex: 0 0 auto; }
.notifications-menu summary { position: relative; display: grid; place-items: center; width: 44px; min-height: 44px; border: 1px solid var(--line); border-radius: 50%; color: var(--violet); cursor: pointer; }
.notifications-menu summary:hover { background: var(--tint); }
.notifications-menu summary::-webkit-details-marker { display: none; }
.notification-bell { position: relative; width: .8rem; height: .85rem; border: 1.5px solid currentColor; border-radius: .5rem .5rem .15rem .15rem; }
.notification-bell::after { content: ''; position: absolute; bottom: -.25rem; left: 50%; width: .25rem; height: .12rem; border-radius: .16rem; transform: translateX(-50%); background: currentColor; }
.notifications-count { position: absolute; top: -.2rem; right: -.22rem; min-width: 1rem; height: 1rem; padding-inline: .15rem; border-radius: 1rem; background: var(--magenta); color: white; font-size: .64rem; font-weight: 750; text-align: center; line-height: 1rem; }
.notifications-panel { position: absolute; z-index: 6; left: 0; bottom: calc(100% + .4rem); width: min(20rem, calc(100vw - 1.4rem)); max-height: min(40dvh, 24rem); padding: .85rem; overflow: auto; color: #292344; background: white; border: 1px solid var(--line); border-radius: .75rem; box-shadow: 0 8px 26px #29234425; }
.notifications-panel h2 { margin: 0 0 .65rem; font-size: 1rem; }
.notifications-panel h3 { margin: .6rem 0 .3rem; color: var(--violet); font-size: .82rem; }
.notifications-panel p, .notifications-panel ul { margin: .2rem 0 .6rem; color: var(--muted); font-size: .78rem; }
.notifications-panel ul { padding-inline-start: 1rem; }
.notifications-panel li { margin-block: .25rem; }
.account-menu summary { display: flex; align-items: center; gap: .45rem; min-height: 44px; padding: .25rem .45rem; border: 1px solid var(--line); border-radius: 1.5rem; cursor: pointer; }
.account-menu summary::-webkit-details-marker, #app-nav summary::-webkit-details-marker { display: none; }
.account-menu strong { font-size: .78rem; color: var(--violet); overflow-wrap: anywhere; }
#account-avatar { flex: 0 0 1.9rem; display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; color: white; background: var(--violet); font-size: .72rem; font-weight: 750; }
.account-options { position: absolute; z-index: 5; inset: auto 0 calc(100% + .35rem); display: grid; gap: .35rem; padding: .4rem; background: white; border: 1px solid var(--line); border-radius: .7rem; box-shadow: 0 8px 24px #29234424; }
#mobile-nav { display: none; }
#login-screen {
  position: relative; isolation: isolate; display: grid; grid-column: 1 / -1;
  grid-template-columns: minmax(0, 28rem) minmax(0, 27rem); justify-content: center; align-items: center; gap: clamp(1rem, 7vw, 7rem);
  min-height: 0; overflow: hidden; padding: 2rem clamp(1rem, 5vw, 4rem);
  background: radial-gradient(ellipse at 13% 19%, #332165, transparent 58%), #100d25;
}
.login-glow { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.login-glow::before, .login-glow::after {
  content: ''; position: absolute; width: 75vmax; height: 70vmax; border-radius: 48%;
  filter: blur(3vmax); will-change: transform;
}
.login-glow::before {
  left: -27%; top: -40%; background: radial-gradient(ellipse, #b15d9e 10%, #714bb0 36%, transparent 67%);
  animation: login-drift 14s ease-in-out infinite alternate;
}
.login-glow::after {
  right: -29%; bottom: -46%; background: radial-gradient(ellipse, #79c9db 6%, #5260ab 37%, transparent 70%);
  animation: login-drift 18s ease-in-out -7s infinite alternate-reverse;
}
@keyframes login-drift { to { transform: translate(19%, 15%) rotate(23deg) scale(1.18); } }
.login-scene { display: grid; place-items: center; min-width: 0; perspective: 850px; pointer-events: none; }
.login-cubes { position: relative; width: min(100%, 25rem); aspect-ratio: 1; transform-style: preserve-3d; }
.login-cube {
  position: absolute; width: var(--edge); height: var(--edge); transform-style: preserve-3d;
  transform: rotateX(-25deg) rotateY(-34deg) rotateZ(8deg);
  animation: login-cube-drift var(--speed) ease-in-out infinite alternate;
}
.cube-violet { --edge: 34%; --cube-color: var(--violet); --speed: 15s; left: 25%; top: 26%; }
.cube-cyan { --edge: 20%; --cube-color: var(--cyan); --speed: 12s; left: 70%; top: 19%; animation-delay: -4s; }
.cube-magenta { --edge: 24%; --cube-color: var(--magenta); --speed: 17s; left: 61%; top: 69%; animation-delay: -8s; }
.login-cube span {
  position: absolute; inset: 0; backface-visibility: hidden;
  border: 1px solid #ffffff70; box-shadow: inset 0 0 20px #ffffff18;
  background: linear-gradient(145deg, color-mix(in srgb, var(--cube-color), white 26%), var(--cube-color));
}
.login-cube span:nth-child(1) { transform: translateZ(var(--depth)); }
.login-cube span:nth-child(2) { transform: rotateY(90deg) translateZ(var(--depth)); filter: brightness(.76); }
.login-cube span:nth-child(3) { transform: rotateY(180deg) translateZ(var(--depth)); filter: brightness(.92); }
.login-cube span:nth-child(4) { transform: rotateY(-90deg) translateZ(var(--depth)); filter: brightness(.8); }
.login-cube span:nth-child(5) { transform: rotateX(90deg) translateZ(var(--depth)); filter: brightness(1.2); }
.login-cube span:nth-child(6) { transform: rotateX(-90deg) translateZ(var(--depth)); filter: brightness(.66); }
.login-cubes { container-type: inline-size; }
.cube-violet { --depth: 17cqw; }
.cube-cyan { --depth: 10cqw; }
.cube-magenta { --depth: 12cqw; }
@keyframes login-cube-drift {
  50% { transform: translateY(-12px) rotateX(-46deg) rotateY(28deg) rotateZ(-11deg); }
  to { transform: translateY(12px) rotateX(20deg) rotateY(105deg) rotateZ(12deg); }
}
.login-glass {
  position: relative; width: min(100%, 27rem); padding: clamp(1.35rem, 4vw, 2.45rem); border: 1px solid #e5d7ff55;
  border-radius: 1.75rem; color: white; background: linear-gradient(144deg, #bba9ff30, #21183bbf 63%, #7d69b133);
  backdrop-filter: blur(24px); box-shadow: 0 24px 64px #090614a0, inset 0 1px 1px #ffffff6a, inset 0 -1px 0 #ffffff20;
}
.brand-diamond { display: block; flex: 0 0 auto; width: 2.65rem; aspect-ratio: 255 / 207; background: currentColor; mask: url('/brand/crystal-rrhh.png') center / contain no-repeat; }
.brand-rrhh { font-family: Zeyada, cursive; font-size: .75em; font-style: normal; font-weight: 400; line-height: 1; letter-spacing: 0; margin-inline-start: -.55em; position: relative; top: .43em; }
.brand-rrhh > :first-child { color: #914382; }
.brand-rrhh > :last-child { color: #28718a; }
.login-brand .brand-rrhh > :first-child { color: #e293d4; }
.login-brand .brand-rrhh > :last-child { color: var(--cyan); }
.login-glass .login-brand { display: flex; align-items: center; justify-content: center; gap: .7rem; margin: 0 0 1.45rem; color: white; font-size: clamp(1.25rem, 5vw, 2rem); font-weight: 780; letter-spacing: -.045em; white-space: nowrap; }
.login-brand .brand-diamond { width: clamp(2rem, 10vw, 3.25rem); }
.login-glass label { color: #f5eeff; font-size: .82rem; letter-spacing: .025em; }
.login-glass input:not([type=checkbox]) { color: #fff; border-color: #d9c8ff62; background: #100b2666; border-radius: .68rem; margin-top: .42rem; padding-inline: .8rem; }
.login-glass button[type=submit] { width: 100%; color: #1d143c; background: linear-gradient(110deg, #dfcaff, #c0dcfb); margin-top: .45rem; }
.login-glass button[type=submit]:hover { background: #eee4ff; }
.login-glass .login-link { display: block; margin-left: auto; padding: .35rem 0; background: transparent; color: #e2d5ff; font-size: .79rem; text-decoration: underline; text-underline-offset: .22em; }
.login-glass .login-link:hover { color: white; }
.login-glass button:disabled { opacity: .7; cursor: wait; }
.login-glass .notice { color: #29204b; }
@media (max-width: 760px) {
  #login-screen { grid-template-columns: minmax(0, 27rem); justify-items: center; }
  .login-scene { position: absolute; inset: 0; z-index: -1; opacity: .54; transform: translate(24%, -20%); }
  .login-cubes { width: min(90vw, 24rem); }
}
@media (prefers-reduced-motion: reduce) { .login-glow::before, .login-glow::after, .login-cube { animation: none; } }
header { display: grid; justify-items: center; gap: .75rem; padding: 1.65rem 1rem 1.25rem; color: var(--violet); font-size: .8rem; font-weight: 750; }
header img { display: block; width: 8rem; height: auto; }
.app-brand { display: flex; justify-content: center; align-items: center; gap: .55rem; color: var(--violet); letter-spacing: -.025em; white-space: nowrap; }
nav { display: grid; gap: .38rem; padding: .5rem .85rem; }
nav button { text-align: left; background: transparent; color: var(--muted); }
nav button:hover { background: #f7f4fb; }
nav button[aria-current] { background: var(--tint); color: var(--violet); box-shadow: inset 3px 0 var(--magenta); }
#app-nav summary { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: .55rem .85rem; border-radius: .5rem; list-style: none; color: var(--violet); font-size: .88rem; font-weight: 750; cursor: pointer; }
#app-nav summary:hover, .account-menu summary:hover { background: var(--tint); }
#app-nav summary::after { content: ''; width: .42rem; height: .42rem; border-right: 2px solid; border-bottom: 2px solid; transform: rotate(45deg); margin-right: .2rem; }
#app-nav details[open] > summary::after { transform: rotate(225deg); }
#app-nav details > button { display: block; width: calc(100% - .55rem); margin-left: .55rem; }
.import-preview-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .65rem 1rem; margin-top: 1rem; }
.import-preview-controls label { flex: 1 1 14rem; max-width: 22rem; margin: 0; }
.import-preview-controls p { flex-basis: 100%; margin: .15rem 0 0; color: var(--muted); font-size: .82rem; }
.import-preview-controls button:disabled { opacity: .55; cursor: default; }
button.import-drop { display: grid; gap: .5rem; place-items: center; width: 100%; min-height: 8rem; padding: 1rem; border: 2px dashed #a698c8; border-radius: .85rem; background: #faf8ff; color: var(--violet); }
button.import-drop:hover, button.import-drop.is-dragging { background: var(--tint); border-color: var(--violet); }
.import-drop > * { pointer-events: none; }
.import-drop span, #import-file-status { color: var(--muted); font-size: .82rem; }
#import-file-status { overflow-wrap: anywhere; }
main { min-width: 0; width: 100%; max-width: 105rem; margin-inline: auto; padding: clamp(1rem, 3vw, 2.5rem); }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { margin: 0; font-size: clamp(1.7rem, 4vw, 2.75rem); line-height: 1.12; letter-spacing: -.045em; }
h2 { margin: 0 0 1rem; color: #332758; font-size: 1.45rem; letter-spacing: -.025em; }
h3 { margin: 0 0 1rem; font-size: 1rem; }
article {
  background: white; border: 1px solid var(--line); border-radius: 1rem;
  padding: clamp(.9rem, 2vw, 1.4rem); margin-bottom: 1rem; min-width: 0;
  box-shadow: 0 4px 14px #36246a08;
}
.hero {
  display: flex; align-items: end; justify-content: space-between; gap: 1rem;
  background: linear-gradient(115deg, #39266d, #533b91 65%, #764b95);
  color: white; border-radius: 1.15rem; padding: clamp(1.2rem, 3.5vw, 2.8rem);
  box-shadow: inset 0 -4px var(--cyan); margin-bottom: 1.15rem;
}
.hero label { margin: 0; flex: 0 1 13rem; }
#dashboard-period { color: #eee8ff; margin: .65rem 0 0; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.metrics article { margin: 0; border-top: 3px solid var(--violet); }
.metrics article:nth-child(2) { border-top-color: var(--cyan); }
.metrics article:nth-child(3) { border-top-color: var(--magenta); }
.metrics article:nth-child(4) { border-top-color: #518cb4; }
.metrics h3 { margin-bottom: .5rem; color: var(--muted); font-size: .88rem; }
.metrics strong { display: block; font-size: clamp(1.5rem, 3vw, 2.15rem); font-variant-numeric: tabular-nums; color: #342659; overflow-wrap: anywhere; }
.metrics p, .dashboard-card p { color: var(--muted); font-size: .84rem; line-height: 1.5; }
.metrics p { margin: .35rem 0 0; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1rem; }
.dashboard-card { display: flex; flex-direction: column; align-items: stretch; }
.dashboard-card h2 { font-size: 1.05rem; }
#timeline-period { margin-top: 0; }
#absence-timeline { min-width: 42rem; }
.timeline-row { display: grid; grid-template-columns: 12.5rem minmax(0, 1fr); gap: .75rem; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--line); font-size: .84rem; }
.timeline-row small { display: block; color: var(--muted); margin-top: .2rem; line-height: 1.35; }
.timeline-track { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); align-items: center; min-height: 1.2rem; background: repeating-linear-gradient(to right, var(--tint) 0, var(--tint) calc(100% * 7 / 30 - 1px), white calc(100% * 7 / 30 - 1px), white calc(100% * 7 / 30)); }
.timeline-axis { background: transparent; color: var(--muted); font-size: .72rem; }
.timeline-axis span { white-space: nowrap; }
.timeline-vacation, .timeline-leave { height: .85rem; border-radius: .3rem; background: var(--violet); }
.timeline-leave { background: #a7569b; }
#vacation-calendar { min-width: 50rem; }
.vacation-row { display: grid; grid-template-columns: 12rem minmax(0, 1fr); align-items: stretch; border-bottom: 1px solid var(--line); font-size: .83rem; }
.vacation-row > :first-child { position: sticky; left: 0; z-index: 2; align-content: center; background: white; padding: .6rem .65rem .6rem 0; }
.vacation-row small { display: block; margin-top: .25rem; color: var(--muted); }
.vacation-track { display: grid; position: relative; grid-template-columns: repeat(var(--calendar-days), minmax(0, 1fr)); min-height: 2rem; background: #f4effb; }
.vacation-track > span { grid-row: 1; }
.vacation-axis { background: white; }
.vacation-axis span { align-self: stretch; overflow: hidden; padding: .5rem .2rem; border-left: 1px solid var(--line); white-space: nowrap; color: var(--muted); font-size: .75rem; }
.vacation-axis .vacation-current-month { color: var(--violet); background: var(--tint); font-weight: 750; }
.vacation-bar { align-self: center; z-index: 1; height: .9rem; border-radius: .25rem; background: var(--violet); }
.vacation-today { z-index: 2; justify-self: start; width: 2px; background: var(--magenta); }
#vacation-calendar-period { color: var(--muted); font-size: .85rem; }
.dashboard-card button { margin-top: auto; align-self: start; }
#work-chart { margin: 0 0 .75rem; }
.chart-row { display: grid; grid-template-columns: 5.7rem minmax(0, 1fr) auto; align-items: center; gap: .5rem; min-height: 2.25rem; font-size: .82rem; font-variant-numeric: tabular-nums; }
.chart-track { background: var(--tint); border-radius: 1rem; height: .68rem; }
.chart-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--violet), #8863b8); }
.overview-list { margin: 0 0 1rem; }
.overview-list div { display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding: .68rem 0; border-bottom: 1px solid var(--line); font-size: .85rem; }
.overview-list dd { margin: 0; font-weight: 750; color: var(--violet); }
.layout { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); gap: 1rem; align-items: start; }
.row { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem; }
.row > label { min-width: 0; max-width: 100%; }
label { display: block; font-weight: 650; font-size: .85rem; margin: 0 0 .8rem; }
input:not([type=checkbox]), select {
  display: block; width: 100%; min-width: 0; min-height: 44px; font: inherit; font-size: 1rem;
  color: inherit; background: white; border: 1px solid #bcb2cc; border-radius: .55rem;
  padding: .55rem; margin-top: .3rem;
}
.hero input[type=month] { color: #302354; border-color: transparent; }
input[type=checkbox] { accent-color: var(--violet); }
button {
  font: inherit; font-size: .88rem; min-height: 44px; font-weight: 700; color: white;
  background: var(--violet); border: 0; border-radius: .55rem; padding: .6rem .85rem; cursor: pointer;
}
button:hover { background: #392965; }
button.secondary { background: var(--tint); color: var(--violet); }
button.secondary:hover { background: #e8dff6; }
:focus-visible { outline: 3px solid #397c9e; outline-offset: 2px; }
.row button { margin-bottom: .75rem; }
fieldset { min-width: 0; border: 1px solid var(--line); border-radius: .55rem; margin: 0 0 .6rem; padding: .45rem .65rem; }
fieldset label { flex: 1 1 6rem; margin-bottom: 0; }
legend { font-size: .85rem; font-weight: 700; }
.scroll { overflow-x: auto; margin: .75rem 0 1rem; }
table { border-collapse: collapse; width: 100%; font-size: .84rem; }
th, td { text-align: left; padding: .65rem; border-bottom: 1px solid var(--line); }
th { background: var(--tint); color: var(--violet); }
.day-saturday { background: #e4f5fa; }
.day-sunday { background: #eee7f9; }
.day-holiday { background: #fae7f2; }
#details td:nth-child(2) { font-weight: 650; }
#message, .notice { padding: .8rem; border-radius: .55rem; background: #e4f4f7; }
#message.error, .notice.error { background: #fbe4ef; }
#employee-list { margin: 0; }
#employee-list td:first-child, #employee-list td:nth-child(3), #employee-list td:nth-child(5) { white-space: nowrap; }
#employee-list small { display: block; margin-top: .3rem; color: var(--muted); }
#employee-list th:last-child { text-align: right; }
.table-actions { display: flex; flex-wrap: nowrap; align-items: center; gap: .5rem; width: max-content; margin-inline-start: auto; }
.employee-icon, .holiday-icon { width: 44px; min-height: 44px; padding: 0; font-size: 1.32rem; line-height: 1; }
.employee-icon { position: relative; display: grid; place-items: center; flex: 0 0 auto; }
.employee-icon[data-sign] { padding-right: .65rem; }
.employee-icon[data-sign]::after { content: attr(data-sign); position: absolute; right: .32rem; bottom: .52rem; font-size: 1rem; }
.employee-user-icon { position: relative; width: 1rem; height: 1.15rem; }
.employee-user-icon::before, .employee-user-icon::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%); border: 1.5px solid currentColor; }
.employee-user-icon::before { top: 0; width: .39rem; height: .39rem; border-radius: 50%; }
.employee-user-icon::after { bottom: 0; width: .85rem; height: .4rem; border-radius: .55rem .55rem .18rem .18rem; }
.notice-eye { position: relative; width: 44px; padding: 0; }
.notice-eye::before, .notice-eye::after { content: ''; position: absolute; top: 50%; left: 50%; }
.notice-eye::before { width: .87rem; height: .87rem; border: 1.5px solid currentColor; border-radius: 75% 15%; transform: translate(-50%, -50%) rotate(45deg); }
.notice-eye::after { width: .29rem; height: .29rem; border-radius: 50%; background: currentColor; transform: translate(-50%, -50%); }
#vacation-notice-dialog { width: min(calc(100% - 1.5rem), 36rem); }
.vacation-notice-actions { flex-wrap: wrap; }
#employment-history { margin-top: 1rem; }
.floating-add {
  position: fixed; z-index: 1; right: max(1.25rem, env(safe-area-inset-right));
  bottom: max(1.25rem, env(safe-area-inset-bottom)); width: 3.6rem; height: 3.6rem;
  padding: 0; border-radius: 50%; font-size: 2rem; line-height: 1;
  box-shadow: 0 5px 18px #3426594d;
}
.floating-add:disabled { opacity: .6; cursor: wait; }
#employees { padding-bottom: 3.75rem; }
#employee-dialog {
  width: min(calc(100% - 1.5rem), 65rem); max-height: calc(100% - 1.5rem);
  padding: clamp(.8rem, 2vw, 1.4rem); border: 1px solid var(--line); border-radius: 1rem;
  background: #f6f5fa; color: inherit; box-shadow: 0 18px 55px #29234445;
}
#employee-dialog::backdrop { background: #21163799; }
#employee-dialog .dialog-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 0 .85rem; gap: .75rem;
}
.dialog-header h2, #employee-dialog article { margin: 0; }
#close-employee { min-width: 44px; font-size: 1.3rem; }
#profile-pending { color: var(--muted); font-size: .85rem; }
#holiday-list th:last-child { text-align: right; }
.holiday-actions, .dialog-actions { display: flex; justify-content: flex-end; gap: .5rem; }
.compact-dialog { width: min(calc(100% - 1.5rem), 28rem); border: 1px solid var(--line); border-radius: 1rem; padding: 1.25rem; color: inherit; }
.compact-dialog::backdrop { background: #21163799; }
button.danger { background: #9b2851; }
button.danger:hover { background: #7c1f40; }
.section-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.section-tabs button { background: white; color: var(--violet); border: 1px solid var(--line); }
.section-tabs button[aria-selected=true] { background: var(--violet); color: white; }
.participation-pie-wrap { position: relative; }
.participation-pie { position: relative; width: min(65%, 12rem); aspect-ratio: 1; border-radius: 50%; margin: 0 auto 1rem; cursor: pointer; animation: participation-appear .48s ease-out both; }
.participation-pie::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: var(--pie-highlight, none); pointer-events: none; }
.participation-tip, .participation-bar-action::after { z-index: 2; width: max-content; max-width: 100%; background: #292344; color: white; padding: .38rem .66rem; font-size: .78rem; font-weight: 650; border-radius: .42rem; pointer-events: none; text-align: center; }
.participation-tip { position: absolute; left: 50%; bottom: 0; margin: 0; transform: translate(-50%, 20%); }
.participation-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: .5rem; padding: 0; list-style: none; }
.participation-legend li { display: flex; gap: .45rem; align-items: center; font-size: .82rem; overflow-wrap: anywhere; }
.participation-legend span { flex: 0 0 .75rem; height: .75rem; border-radius: .15rem; }
.participation-legend button { min-height: 36px; color: inherit; background: transparent; padding: .2rem .3rem; text-align: left; font-size: inherit; font-weight: 500; transition: background .18s ease; }
.participation-legend button:hover { background: var(--tint); }
.participation-bars { display: grid; gap: .7rem; list-style: none; padding: 0; }
.participation-bars li { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(2.5rem, .9fr) 4.1rem; align-items: center; gap: .55rem; min-height: 1.6rem; padding: .15rem .25rem; border-radius: .4rem; font-size: .82rem; transition: background .18s ease; }
.participation-bars li > span:first-child { overflow-wrap: anywhere; }
.participation-bars strong { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.participation-bars li:hover, .participation-bars li:focus-within { background: var(--tint); }
.participation-bars .chart-track span { transform-origin: left center; animation: participation-grow .5s cubic-bezier(.2,.65,.3,1) both; }
.participation-bar-action { position: absolute; inset: 0; min-height: 0; padding: 0; background: transparent; }
.participation-bar-action:hover { background: transparent; }
.participation-bar-action::after { content: attr(data-tooltip); position: absolute; bottom: calc(100% + .2rem); right: 0; opacity: 0; transition: opacity .18s ease; }
.participation-bar-action:hover::after, .participation-bar-action:focus-visible::after { opacity: 1; }
#participation-dialog { max-height: min(85dvh, 46rem); width: min(calc(100% - 1.5rem), 38rem); }
#participation-days { max-height: 40dvh; overflow: auto; }
@keyframes participation-appear { from { opacity: .25; transform: scale(.94); } }
@keyframes participation-grow { from { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) {
  .participation-pie, .participation-bars .chart-track span { animation: none; }
  .participation-bars li, .participation-legend button, .participation-bar-action::after { transition: none; }
}
.export-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
[hidden] { display: none !important; }
@media (max-width: 1100px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 840px) {
  body { display: flex; flex-direction: column; }
  #login-screen, #app-main { flex: 1; }
  .sidebar { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: .3rem; border-right: 0; border-bottom: 1px solid var(--line); padding: .35rem .65rem; }
  header { display: flex; align-items: center; justify-content: space-between; padding: .5rem 1rem; }
  header img { width: 4.2rem; }
  .app-brand { justify-content: start; padding: .2rem 0; gap: .55rem; text-align: left; }
  .app-brand .brand-diamond { width: 1.85rem; }
  #mobile-nav { display: block; background: var(--tint); color: var(--violet); min-width: 44px; padding: .3rem; font-size: 1.2rem; }
  #app-nav { display: none; grid-column: 1 / -1; grid-row: 2; padding: .45rem 0; border-top: 1px solid var(--line); }
  #app-nav.mobile-open { display: grid; }
  .account-menu { margin: 0; }
  .sidebar-tools { margin: 0; }
  .notifications-panel { position: fixed; top: 3.65rem; right: .65rem; bottom: auto; left: auto; }
  .account-menu summary { padding: .25rem .4rem; }
  .account-options { inset: calc(100% + .35rem) 0 auto auto; min-width: 12rem; }
}
@media (max-width: 575px) {
  .hero { align-items: stretch; flex-direction: column; }
  .hero label { flex: initial; }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .metrics { gap: .65rem; }
  .metrics h3 { font-size: .8rem; }
  .metrics p { font-size: .75rem; }
}
@media (max-width: 400px) {
  #account-name { max-width: 4.2rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
