:root {
  --navy: #07375f;
  --navy-2: #0b4d82;
  --blue: #0d73cf;
  --sky: #e6f3ff;
  --ink: #13243a;
  --muted: #627084;
  --line: #dce5ee;
  --panel: #ffffff;
  --soft: #f4f7fb;
  --weekend: #eef0f3;
  --holiday: #fff2d6;
  --ok: #1e9f5d;
  --warn: #d9851f;
  --bad: #d94b5c;
  --shadow: 0 20px 40px rgba(9, 35, 61, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #eef3f8;
  color: var(--ink);
  font-family: "Barlow Condensed", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.icon {
  width: 1em;
  height: 1em;
  flex: none;
  vertical-align: -0.15em;
}

.metric-icon .icon {
  width: 22px;
  height: 22px;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr auto;
  background: linear-gradient(135deg, #062a4c 0%, #0d558d 46%, #ffffff 46%);
  position: relative;
}

.login-brand {
  grid-column: 1;
  grid-row: 1;
  width: min(46vw, 700px);
  padding: clamp(82px, 11vh, 132px) 44px 44px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 18px;
  text-align: left;
  position: relative;
}

.login-brand-stack {
  position: absolute;
  top: 250px;
  left: 44px;
  display: grid;
  justify-items: start;
  gap: 18px;
  margin-top: 0;
  padding-top: 0;
}

.login-heidelberg {
  position: fixed;
  top: clamp(82px, 11vh, 132px);
  left: 50%;
  width: min(456px, 54vw);
  transform: translateX(-50%);
  margin-top: 2px;
  background: transparent;
}

.login-favicon {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2), 0 18px 32px rgba(0, 0, 0, 0.22);
}

.login-app-summary {
  display: grid;
  gap: 12px;
  justify-items: start;
  margin-top: 4px;
}

.login-app-summary h1 {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  font-size: 2.88rem;
  color: #3a9ad9;
  line-height: 1.1;
  margin: 0 0 12px;
}

.login-feature-list {
  display: grid;
  gap: 4px;
  margin-top: 18px;
}

.login-feature-list p {
  max-width: 420px;
  margin: 0;
  color: #fff;
  font-size: clamp(1.36rem, 2.7vw, 1.87rem);
  line-height: 1.25;
}

.login-feature-list span {
  color: #3a9ad9;
}

.clock-mark {
  display: inline-grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border-radius: 18px;
  background: #fff;
  color: var(--navy);
  font-weight: 900;
  box-shadow: var(--shadow);
  position: relative;
}

.clock-mark::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border: 3px solid var(--blue);
  border-radius: 50%;
  right: 7px;
  bottom: 7px;
}

.clock-mark::before {
  content: "";
  position: absolute;
  width: 8px;
  height: 3px;
  background: var(--blue);
  right: 17px;
  bottom: 18px;
  transform: rotate(38deg);
  transform-origin: left center;
}

.login-brand h1 {
  max-width: 520px;
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.8rem);
  line-height: 1;
  letter-spacing: 0;
}

.login-brand .login-app-summary h1 {
  max-width: 420px;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  font-size: 2.88rem;
  color: #3a9ad9;
  line-height: 1.1;
  margin: 0 0 12px;
}

.login-panel {
  grid-column: 1;
  grid-row: 1;
  align-self: stretch;
  justify-self: stretch;
  min-height: calc(100vh - 74px);
  position: relative;
  display: block;
  padding: 0 clamp(24px, 5vw, 80px);
  pointer-events: none;
}

.login-card {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(500px, 100%);
  background: var(--panel);
  border: 1px solid #e4ebf3;
  border-radius: 8px;
  padding: 30px 36px 26px;
  box-shadow: 0 24px 44px rgba(8, 47, 86, 0.16);
  pointer-events: auto;
}

.login-card h2 {
  margin: 0 0 6px;
  color: #082f56;
  font-size: 1.72rem;
  line-height: 1.1;
}

.login-card form {
  margin-top: 34px;
}

.login-field {
  margin-bottom: 24px;
}

.login-field label {
  color: #314b6c;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.login-field input {
  background: #eaf1fb;
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 42px;
}

.password-wrap span {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #7c8da2;
  font-size: 0.9rem;
}

.password-wrap .password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: auto;
  border: 0;
  background: transparent;
  padding: 6px;
  margin: 0;
  color: #7c8da2;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.password-wrap .password-toggle:hover {
  color: #42556d;
}

.password-wrap .password-toggle .icon {
  width: 18px;
  height: 18px;
}

.login-recovery {
  display: block;
  margin: 20px auto 0;
  border: 0;
  background: transparent;
  color: #6a5d58;
  text-decoration: underline;
  font-size: 0.92rem;
  box-shadow: none;
  padding: 0;
}

.privacy-panel {
  position: absolute;
  left: 50%;
  top: min(calc(50% + 300px), calc(100% - 180px));
  transform: translateX(-50%);
  width: min(460px, 100%);
  background: #f7f8fa;
  color: #5c6673;
  border-radius: 6px;
  padding: 16px 22px;
  text-align: center;
  font-size: 0.76rem;
  line-height: 1.55;
  margin-top: 0;
  pointer-events: auto;
}

.privacy-panel p {
  margin: 0;
}

.privacy-panel a {
  color: #0b57a3;
  font-weight: 800;
}

.login-footer {
  grid-column: 1 / -1;
  width: 100%;
  text-align: center;
  color: #6f7c89;
  font-size: 0.84rem;
  padding: 0 24px 18px;
}

.login-footer span {
  display: block;
  border-top: 1px solid #d8e0e8;
  margin: 0 -24px 18px;
}

.login-footer p {
  margin: 0;
  min-height: 26px;
  display: grid;
  place-items: center;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 210px 1fr;
}

.sidebar {
  background: #fff;
  border-right: 1px solid #cfd9e5;
  padding: 8px 10px 22px;
  position: sticky;
  top: 92px;
  height: calc(100vh - 92px);
}

.sidebar img {
  max-width: 185px;
  margin: 0 auto 28px;
  display: block;
}

.nav-title {
  color: #fff;
  background: linear-gradient(180deg, #0b56a8 0%, #002d66 100%);
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0;
  margin: 0 0 8px;
  padding: 4px 10px;
  text-transform: none;
}

.nav-btn {
  width: 100%;
  border: 0;
  background: transparent;
  color: #26445f;
  padding: 12px 12px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.nav-btn.active,
.nav-btn:hover {
  background: #eaf4ff;
  color: #064b83;
}

.topbar {
  height: 92px;
  background: var(--navy);
  color: #fff;
  display: grid;
  grid-template-columns: 340px 1fr 360px;
  align-items: center;
  gap: 20px;
  padding: 0 18px;
  border-bottom: 3px solid #0f95e8;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 18px rgba(2, 28, 54, 0.25);
}

.top-logo {
  height: 39px;
  justify-self: center;
  grid-column: 2;
  margin-bottom: 30px;
}

.product-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.product-brand .app-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.22), 0 0 18px rgba(255, 255, 255, 0.42);
}

.product-brand strong {
  display: block;
  font-size: 1.32rem;
  line-height: 1.1;
}

.product-brand span {
  display: block;
  margin-top: 7px;
  font-size: 0.82rem;
  font-weight: 400;
  color: #b9c4d0;
}

.top-links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 34px;
  min-width: 390px;
}

.top-links button {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.user-chip {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 0.7rem;
}

.user-chip .avatar {
  width: 28px;
  height: 28px;
  font-size: 0.78rem;
}

.avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #138adc;
  font-weight: 800;
}

.content {
  padding: 28px;
}

.hero-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 22px;
  box-shadow: 0 10px 24px rgba(15, 41, 69, 0.07);
}

.hero-bar h2,
.panel h3 {
  margin: 0;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.two {
  grid-template-columns: 1.35fr 0.85fr;
}

.grid.three {
  grid-template-columns: repeat(3, 1fr);
}

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

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 10px 24px rgba(15, 41, 69, 0.06);
}

.flush-table {
  padding: 0;
  overflow: hidden;
}

.flush-table h3 {
  padding: 18px 18px 0;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

.timer {
  text-align: center;
  padding: 28px 18px;
}

.timer-value {
  font-size: clamp(2.6rem, 8vw, 5.8rem);
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.week-chip-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px auto 6px;
  max-width: 760px;
}

.week-chip,
.device-tag,
.attention-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #ccd5df;
  border-radius: 999px;
  background: #eef1f4;
  color: #4e5e70;
  min-height: 28px;
  padding: 5px 9px;
  font-size: 0.78rem;
  font-weight: 400;
  white-space: nowrap;
}

.week-chip.open {
  background: #e4f2ff;
  border-color: #9acbf5;
  color: #07528c;
}

.week-chip.done,
.device-tag.approved {
  background: #e8f8ef;
  border-color: #9bd8b8;
  color: #11633a;
}

.device-tag.icon-only {
  min-width: 28px;
  justify-content: center;
  padding: 5px 7px;
}

.calendar-device-icon {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
  line-height: 1;
}

.device-tag.pending,
.attention-tag {
  background: #fff2d6;
  border-color: #eac05c;
  color: #8b5611;
}

.attention-tag {
  margin-left: 6px;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  min-width: 30px;
  border-radius: 999px;
  vertical-align: middle;
}

.attention-tag:hover {
  filter: brightness(0.98);
}

.timer-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.diet-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

.diet-row-state {
  justify-content: flex-start;
  margin-top: 20px;
}

.diet-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #edf0f3;
  color: #9099a6;
  font-weight: 400;
}

.diet-icon.on {
  background: #e8f8ef;
  color: var(--ok);
  border-color: #a8dfc3;
}

.primary,
.secondary,
.danger,
.ghost,
.accept,
.reject,
.admin-action {
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 10px 14px;
  font-weight: 400;
  color: #fff;
  box-shadow: 0 8px 16px rgba(8, 46, 83, 0.16);
}

.primary {
  background: linear-gradient(180deg, #00b9ff 0%, #0064a8 100%);
}

.secondary {
  background: linear-gradient(180deg, #0b56a8 0%, #002d66 100%);
}

.danger {
  background: linear-gradient(180deg, #ff1616 0%, #9d0013 100%);
}

.accept {
  background: linear-gradient(180deg, #00b9ff 0%, #0064a8 100%);
  color: #fff;
  min-width: 132px;
}

.reject {
  background: linear-gradient(180deg, #ff1616 0%, #9d0013 100%);
  color: #fff;
  min-width: 132px;
}

.compact-action {
  min-width: 82px;
  padding: 8px 10px;
  min-height: 32px;
}

.table-actions {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
}

.admin-action {
  background: linear-gradient(180deg, #0b56a8 0%, #002d66 100%);
  color: #fff;
}

.ghost {
  background: linear-gradient(180deg, #f7f7f7 0%, #a9a9a9 100%);
  border-color: #c5c5c5;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.field label {
  font-size: 0.82rem;
  font-weight: 800;
  color: #42556d;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cad6e3;
  border-radius: 6px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
}

textarea {
  min-height: 96px;
  resize: vertical;
}

.compact-textarea {
  min-height: 70px;
  max-height: 130px;
}

.muted {
  color: var(--muted);
}

.fine {
  font-size: 0.82rem;
}

.table-wrap {
  overflow-x: auto;
}

.sick-leave-table .spacer-line {
  margin-left: 18px;
  margin-right: 18px;
}

.sick-leave-table th,
.sick-leave-table td {
  padding-left: 18px;
  padding-right: 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  font-size: 0.78rem;
  color: #fff;
  background: #0b3159;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

tr.weekend {
  background: var(--weekend);
}

tr.holiday {
  background: var(--holiday);
}

.bar-track {
  width: min(360px, 100%);
  height: 12px;
  border-radius: 999px;
  background: #d9dee4;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: var(--w);
  max-width: 100%;
  background: linear-gradient(90deg, #0b60b2 0%, #1592e6 78%, #de3955 78%);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #eef3f8;
  color: #405971;
  font-size: 0.78rem;
  font-weight: 400;
}

.badge.ok {
  background: #e8f8ef;
  color: #12663d;
}

.badge.warn {
  background: #fff2d6;
  color: #8b5611;
}

.badge.bad {
  background: #fff0f2;
  color: #a9293c;
}

.calendar-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(110px, 1fr));
  gap: 10px;
}

.calendar-panel {
  padding: 0 0 18px;
  overflow: hidden;
}

.month-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 18px;
}

.month-toolbar h3 {
  color: var(--navy);
  font-size: 1.35rem;
  text-align: center;
}

.calendar-nav {
  background: linear-gradient(180deg, #61d7ff 0%, #0a95dc 100%);
  color: #fff;
}

.calendar-mode-toggle {
  min-width: 142px;
  font-weight: 400;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  padding: 0 18px 10px;
}

.calendar-weekdays span {
  min-height: 38px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: linear-gradient(180deg, #0b56a8 0%, #002d66 100%);
  color: #fff;
  font-weight: 400;
}

.calendar-month {
  display: grid;
  grid-template-columns: repeat(7, minmax(118px, 1fr));
  gap: 8px;
  padding: 0 18px;
}

.day-card {
  min-height: 120px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  display: grid;
  align-content: start;
}

.day-card.empty {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.day-date-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  width: 100%;
  border-radius: 6px;
  border: 1px solid #0a95dc;
  background: #eaf4ff;
  color: #063f72;
  padding: 5px 10px;
  margin-bottom: 10px;
}

.day-date-chip strong {
  color: #063f72;
  font-weight: 800;
}

.day-date-chip span {
  color: #063f72;
  font-weight: 400;
}

.day-kind {
  margin: 0 0 10px;
  color: #5f6d7c;
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-icon-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.calendar-icon-pill {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 4px;
}

.calendar-icon-pill b {
  font-size: 1.1rem;
  line-height: 1;
}

.calendar-icon-pill small {
  width: 100%;
  min-height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #eef3f8;
  color: #405971;
  font-size: 0.64rem;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 3px 5px;
}

.calendar-icon-pill.ok small {
  background: #e8f8ef;
  color: #12663d;
}

.calendar-icon-pill.hours small {
  background: #eaf4ff;
  color: #063f72;
}

.calendar-vacations {
  margin-top: 22px;
}

.calendar-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 16px 18px 0;
  flex-wrap: wrap;
}

.calendar-meal-total {
  color: #063f72;
}

.calendar-meal-total strong {
  font-weight: 800;
  color: #063f72;
}

.calendar-meal-total span {
  margin-left: 6px;
  color: #063f72;
  font-weight: 400;
}

.calendar-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.calendar-legend span {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #eef3f8;
  color: #405971;
  padding: 4px 8px;
  font-size: 0.74rem;
}

.attendance-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.attendance-strip span {
  min-width: 28px;
  min-height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 5px;
  background: #eef4fa;
  border: 1px solid #d7e3ef;
  color: #063f72;
}

.attendance-table th,
.attendance-table td {
  min-width: 28px;
  text-align: center;
  padding: 8px 6px;
}

.attendance-table th:nth-child(2),
.attendance-table td:nth-child(2) {
  min-width: 130px;
  text-align: left;
}

.attendance-table .attendance-weekend {
  background: #e6e8eb;
  color: #53606d;
}

.attendance-table .attendance-holiday {
  background: #e7f0f8;
  color: #375a76;
}

.report-section {
  padding: 18px;
}

.report-section.flush-table {
  padding: 0 0 18px;
}

.report-table-head {
  padding: 18px 18px 0;
}

.report-table-head p {
  margin: 6px 0 0;
}

.vacation-period-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  margin: 10px 0 16px;
  border-radius: 6px;
  background: #eef3f8;
  color: #405971;
  font-weight: 400;
}

.vacation-year-nav {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.vacation-year-nav span {
  min-width: 56px;
  text-align: center;
  color: #0070c0;
  font-weight: 400;
  font-size: 1.2rem;
}

.vacation-nav-btn {
  background: linear-gradient(180deg, rgba(7, 55, 95, 0.3), rgba(7, 55, 95, 0.16));
  color: #07375f;
  border-color: rgba(7, 55, 95, 0.24);
  box-shadow: none;
}

.vacation-nav-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.day-card.weekend {
  background: var(--weekend);
}

.day-card.holiday {
  background: var(--holiday);
}

.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.stat.report-red {
  background: linear-gradient(180deg, rgba(255, 22, 22, 0.3), rgba(255, 22, 22, 0.08));
  border-color: #ff1616;
}

.stat.report-orange {
  background: linear-gradient(180deg, rgba(239, 117, 0, 0.3), rgba(239, 117, 0, 0.08));
  border-color: #ef7500;
}

.stat.report-blue {
  background: linear-gradient(180deg, rgba(0, 185, 255, 0.3), rgba(0, 185, 255, 0.08));
  border-color: #00a9ea;
}

.stat strong {
  display: block;
  margin-top: 8px;
  font-size: 1.9rem;
  color: var(--navy);
}

.split-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.login-prompt-modal .split-actions {
  justify-content: flex-end;
  margin-top: 16px;
}

.login-prompt-modal .split-actions button {
  min-width: 96px;
  text-align: center;
}

.login-prompt-modal .ghost {
  background: linear-gradient(180deg, #ff1616 0%, #9d0013 100%);
  border-color: transparent;
  color: #fff;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin: 8px 0 14px;
}

.spacer-line {
  height: 1px;
  margin: 14px 0 18px;
  background: #d7e3ef;
}

.hidden {
  display: none !important;
}

.notice {
  padding: 12px 14px;
  border-radius: 6px;
  background: #eaf4ff;
  color: #164a73;
  border: 1px solid #c0ddf7;
}

.request-list {
  display: grid;
  gap: 10px;
}

.request-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.request-detail-card {
  padding: 14px 16px;
}

.request-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.request-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 18px;
}

.request-meta-grid p {
  margin: 0;
}

.request-meta-grid span {
  color: #42556d;
}

.request-status,
.request-flow-tag {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  color: #fff;
  font-size: 0.78rem;
}

.request-status.pending {
  background: linear-gradient(180deg, rgba(239, 117, 0, 0.85), rgba(239, 117, 0, 0.5));
}

.request-status.approved {
  background: linear-gradient(180deg, rgba(30, 159, 93, 0.85), rgba(30, 159, 93, 0.5));
}

.request-status.rejected {
  background: linear-gradient(180deg, rgba(217, 75, 92, 0.85), rgba(217, 75, 92, 0.5));
}

.request-flow-tag.entry {
  background: linear-gradient(180deg, rgba(58, 154, 217, 0.85), rgba(58, 154, 217, 0.5));
}

.request-flow-tag.exit {
  background: linear-gradient(180deg, rgba(0, 112, 192, 0.85), rgba(0, 112, 192, 0.5));
}

.request-info-box {
  border: 1px solid #d7e3ef;
  border-radius: 8px;
  background: #f9fcff;
  padding: 14px;
}

.request-info-box h4 {
  margin: 0 0 8px;
  color: var(--navy);
}

.compact-filter {
  min-width: 190px;
  margin-bottom: 0;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.filter-row .field {
  min-width: 200px;
  flex: 1;
}

.request-filter-bar {
  display: grid;
  justify-content: start;
  gap: 10px;
  margin: 18px 0;
  padding: 12px;
  border: 1px solid #d7e3ef;
  border-radius: 8px;
  background: #f9fcff;
}

.request-filter-bar label {
  color: #42556d;
}

.request-filter-bar .filter-row {
  display: grid;
  grid-template-columns: 230px 220px;
  align-items: center;
  gap: 12px;
}

.request-filter-bar .date-filter-row {
  grid-template-columns: 230px 150px 150px;
  align-items: end;
}

.request-filter-bar .check-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
}

.request-filter-bar input[type="checkbox"] {
  width: auto;
}

.request-filter-bar select {
  width: 220px;
  min-width: 0;
}

.date-filter-field {
  display: grid;
  gap: 4px;
}

.date-filter-field span {
  text-align: left;
  color: #42556d;
}

.request-filter-bar input[type="date"] {
  width: 150px;
  min-width: 0;
}

.request-table-wrap {
  margin-top: 10px;
}

.request-table th,
.request-table td {
  vertical-align: middle;
}

.request-layout {
  align-items: start;
}

.vacation-year {
  margin-top: 12px;
  border: 1px solid #d6e3f0;
  border-radius: 10px;
  padding: 12px;
  background: #f9fcff;
}

.vac-calendar-title {
  color: var(--navy);
  font-weight: 800;
  margin-bottom: 10px;
}

.vac-calendar-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.vac-month {
  border: 1px solid #d9e5f1;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.vac-month > strong {
  display: block;
  padding: 7px 8px;
  color: #fff;
  background: linear-gradient(180deg, #0b56a8 0%, #002d66 100%);
  font-size: 0.78rem;
  text-align: center;
}

.vac-weekdays,
.vac-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  padding: 0 7px;
}

.vac-weekdays {
  padding-top: 7px;
  color: #668199;
  font-size: 0.66rem;
  font-weight: 800;
  text-align: center;
}

.vac-days {
  padding-bottom: 7px;
}

.vac-day {
  min-height: 23px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #29465f;
  font-size: 0.68rem;
  padding: 0;
}

.vac-day:not(.empty):hover {
  background: #eaf4ff;
}

.vac-day.selected {
  background: #ffd84d;
  color: #412f00;
  font-weight: 800;
}

.vac-day.selected.approved {
  background: #50c878;
  color: #083b21;
}

.vac-day.selected.enjoyed {
  background: #d9dde2;
  color: #4d5965;
}

.vac-day.empty {
  pointer-events: none;
}

.page-title {
  min-height: 70px;
  border-bottom: 1px solid #cbd8e5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
}

.page-title h2 {
  margin: 0;
  color: #002e58;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.2;
}

.page-title-copy {
  display: grid;
  gap: 8px;
}

.page-title-copy p {
  margin: 0;
  color: #5f6d7c;
  font-size: 0.95rem;
}

.page-icon {
  color: #0078d7;
  font-size: 1.05rem;
  line-height: 1;
}

.breadcrumb {
  color: #1769ad;
  font-size: 0.84rem;
  margin-bottom: 12px;
}

.metric {
  display: flex;
  align-items: center;
  gap: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 10px 24px rgba(15, 41, 69, 0.06);
}

.metric.metric-blue {
  background: linear-gradient(180deg, rgba(23, 131, 209, 0.3), rgba(23, 131, 209, 0.08));
  border-color: #1783d1;
}

.metric.metric-green {
  background: linear-gradient(180deg, rgba(52, 147, 69, 0.3), rgba(52, 147, 69, 0.08));
  border-color: #349345;
}

.metric.metric-orange {
  background: linear-gradient(180deg, rgba(239, 117, 0, 0.3), rgba(239, 117, 0, 0.08));
  border-color: #ef7500;
}

.metric.metric-teal {
  background: linear-gradient(180deg, rgba(12, 154, 166, 0.3), rgba(12, 154, 166, 0.08));
  border-color: #0c9aa6;
}

.metric strong {
  display: block;
  font-size: 2rem;
  color: var(--navy);
  line-height: 1;
}

.metric p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.metric-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
}

.metric-icon.blue {
  background: #1783d1;
}

.metric-icon.green {
  background: #349345;
}

.metric-icon.orange {
  background: #ef7500;
}

.metric-icon.teal {
  background: #0c9aa6;
}

.role {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 4px;
  background: #0f8d3c;
  color: #fff;
  padding: 3px 8px;
  font-size: 0.76rem;
  font-weight: 400;
}

.role.admin {
  background: #6b1499;
}

.small {
  padding: 7px 10px;
  font-size: 0.82rem;
}

.link-user {
  border: 0;
  background: transparent;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  text-align: left;
}

.avatar.mini {
  width: 36px;
  height: 36px;
  background: #1984d2;
  color: #fff;
}

.avatar.huge {
  width: 82px;
  height: 82px;
  margin: 0 auto 16px;
  background: #07528c;
  color: #fff;
  font-size: 1.8rem;
}

.profile-grid {
  grid-template-columns: 380px 1fr;
}

.profile-card {
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 8px;
}

.profile-data {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin: 16px 0 24px;
}

.profile-data span {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}

hr {
  border: 0;
  border-top: 1px solid #cbd8e5;
  margin: 22px 0 16px;
}

.admin-form-grid {
  grid-template-columns: 400px 1fr;
  align-items: start;
}

.legend {
  margin-top: 16px;
}

.swatch {
  display: inline-block;
  width: 28px;
  height: 18px;
  border-radius: 3px;
  vertical-align: middle;
  margin-right: 8px;
  border: 1px solid #cbd8e5;
}

.swatch.grey {
  background: #e9ecef;
}

.swatch.yellow {
  background: #fff2d6;
  border-color: #ffd06a;
}

.wide {
  width: 100%;
}

.align-right {
  display: block;
  margin-left: auto;
}

.hours-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(90px, 1fr));
  gap: 14px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(8, 23, 38, 0.42);
  padding: 20px;
}

.modal {
  width: min(480px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.modal.modal-wide {
  width: min(860px, 100%);
}

.audit-json {
  max-height: 320px;
  overflow: auto;
  background: #f6f8fa;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

.panel-foot {
  margin-top: 14px;
  text-align: center;
}

@media (max-width: 1000px) {
  .app-shell,
  .login-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .grid.two,
  .grid.three,
  .grid.four,
  .admin-form-grid,
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .profile-data,
  .hours-grid,
  .vac-calendar-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

@media (max-width: 640px) {
  .topbar {
    height: auto;
    align-items: flex-start;
    flex-direction: column;
    padding: 18px;
  }

  .content {
    padding: 16px;
  }

  .hero-bar,
  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .calendar-week {
    grid-template-columns: 1fr;
  }

  .calendar-month,
  .calendar-weekdays {
    grid-template-columns: 1fr;
  }

  .month-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-data,
  .hours-grid,
  .vac-calendar-grid {
    grid-template-columns: 1fr;
  }

  /* La pantalla de login usa posicionamiento absoluto/fijo pensado para
     escritorio (offsets en px, coordenadas calculadas a partir de 50%+300px,
     etc.). En móvil eso hace que todo se superponga, así que aquí se convierte
     todo a flujo normal, apilado de arriba a abajo, sin position absolute/fixed. */
  .login-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: linear-gradient(180deg, #062a4c 0%, #0d558d 55%, #ffffff 55%);
  }

  .login-brand {
    position: static;
    width: 100%;
    padding: 32px 20px 20px;
    align-items: center;
    text-align: center;
    gap: 14px;
  }

  .login-brand-stack {
    position: static;
    width: 100%;
    justify-items: center;
    text-align: center;
    gap: 14px;
  }

  .login-heidelberg {
    position: static;
    transform: none;
    width: min(240px, 65vw);
    margin: 0 auto;
  }

  .login-favicon {
    width: 64px;
    height: 64px;
  }

  .login-app-summary {
    justify-items: center;
    text-align: center;
    margin-top: 0;
  }

  .login-app-summary h1,
  .login-brand .login-app-summary h1 {
    font-size: 2rem;
    text-align: center;
    margin: 0 0 6px;
  }

  .login-feature-list {
    justify-items: center;
    margin-top: 8px;
  }

  .login-feature-list p {
    font-size: 1rem;
    text-align: center;
  }

  .login-panel {
    position: static;
    min-height: auto;
    padding: 24px 16px 0;
  }

  .login-card {
    position: static;
    transform: none;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
  }

  .privacy-panel {
    position: static;
    transform: none;
    width: 100%;
    max-width: 440px;
    margin: 20px auto 0;
  }

  .login-footer {
    position: static;
    margin-top: 24px;
  }
}
