:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #333d47;
  --muted: #767676;
  --line: #dee7f0;
  --accent: #0090d7;
  --accent-hover: #1d93cd;
  --accent-soft: #f4f8ff;
  --orange: #de6439;
  --shadow: 0 9px 15px rgba(0, 0, 0, 0.09);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(247, 248, 250, 0.38), rgba(247, 248, 250, 0.58) 42%, rgba(247, 248, 250, 0.84)),
    url("/static/deppa-nature-bg-v1.png") center top / cover fixed no-repeat,
    var(--bg);
  color: var(--text);
  font-family: "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.4;
  min-height: 100vh;
}

.topbar {
  position: relative;
  z-index: 2;
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  border-radius: 0 0 24px 24px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
}

.brand-logo {
  display: block;
  width: 152px;
  height: auto;
}

nav {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

a {
  color: var(--accent);
  text-decoration: none;
}

.symbols {
  display: none;
}

svg {
  width: 20px;
  height: 20px;
  fill: transparent;
  stroke: currentColor;
  stroke-width: 1.5;
  flex-shrink: 0;
}

nav a,
.nav-menu-trigger,
.filters a,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 15px;
  font-size: 14px;
  font-family: inherit;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

nav a:hover,
.nav-menu-trigger:hover,
.nav-dropdown:focus-within .nav-menu-trigger,
.nav-dropdown:hover .nav-menu-trigger,
.filters a:hover,
.button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.nav-menu-trigger {
  cursor: pointer;
}

.nav-dropdown {
  position: relative;
}

.nav-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 40;
  display: grid;
  min-width: 220px;
  gap: 4px;
  padding: 16px 8px 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.15s, transform 0.15s;
}

.nav-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -10px;
  height: 10px;
}

.nav-dropdown:hover .nav-menu,
.nav-dropdown:focus-within .nav-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-menu a {
  justify-content: flex-start;
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
}

.nav-menu a:hover,
.nav-menu a:focus-visible {
  background: var(--accent-soft);
}

.nav-action {
  border-color: var(--accent);
  color: var(--accent);
}

.button {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 500;
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.button.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: var(--shadow);
  color: #fff;
}

.button.danger {
  background: #b42318;
  border-color: #b42318;
  color: #fff;
}

.button.danger:hover {
  background: #912018;
  border-color: #912018;
  color: #fff;
  box-shadow: var(--shadow);
}

.page {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 40px), 1680px);
  max-width: none;
  margin: 0 auto;
  padding: 24px 0;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.portal-hero {
  align-items: center;
  min-height: 210px;
  padding: 34px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.portal-hero h1 {
  font-size: 46px;
}

.portal-dashboard {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
  margin-top: -8px;
  margin-bottom: 18px;
}

.compact-weather-dashboard {
  justify-content: end;
  margin-bottom: 8px;
}

.portal-welcome {
  grid-column: span 3;
  min-height: 170px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 24px;
  align-items: center;
  padding: 10px 0 18px;
}

.portal-welcome-copy {
  display: grid;
  gap: 10px;
}

.portal-kicker {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.portal-welcome h1 {
  max-width: 900px;
  font-family: "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(30px, 2.8vw, 46px);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.08;
}

.portal-welcome p {
  max-width: 680px;
  color: var(--muted);
  line-height: 1.5;
}

.portal-profile-photo,
.portal-profile-photo img,
.portal-profile-placeholder {
  width: 180px;
  height: 180px;
}

.portal-profile-photo {
  justify-self: end;
}

.portal-profile-photo img,
.portal-profile-placeholder {
  border: 1px solid var(--line);
  border-radius: 30px;
  background: #fff;
}

.portal-profile-photo img {
  object-fit: cover;
}

.portal-profile-placeholder {
  display: grid;
  place-items: center;
  color: #8a96a8;
}

.portal-profile-placeholder svg {
  width: 78px;
  height: 78px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.portal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.portal-weather {
  grid-column: 4 / 5;
  min-height: 104px;
  display: grid;
  justify-content: center;
  align-content: center;
  justify-items: end;
  gap: 9px;
  padding: 0 0 8px;
  text-align: right;
}

.portal-weather-main {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.portal-weather-main strong {
  color: var(--text);
  font-size: clamp(42px, 3.7vw, 64px);
  font-weight: 850;
  line-height: 1;
}

.portal-weather-main strong.muted {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: #607082;
  font-size: 18px;
  font-weight: 850;
  text-transform: uppercase;
}

.portal-weather-icon {
  display: inline-flex;
  width: 66px;
  height: 66px;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  background:
    radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.9), transparent 38%),
    linear-gradient(135deg, #fff4b8, #dff4ff);
  color: #d58b00;
  font-size: 32px;
  line-height: 1;
  box-shadow: 0 14px 28px rgba(0, 144, 215, 0.12);
}

.portal-weather-city {
  color: var(--text);
  font-size: 15px;
  font-weight: 850;
}

.portal-weather-caption {
  max-width: 230px;
  color: #667789;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.quick-action {
  min-height: 150px;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.quick-action:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.quick-action.primary {
  border-color: rgba(0, 144, 215, 0.26);
  background: #f4faff;
}

.quick-action.disabled {
  background: #fbfcfd;
}

.quick-action.disabled:hover {
  border-color: var(--line);
  box-shadow: none;
  transform: none;
}

.quick-action strong {
  font-size: 17px;
  line-height: 1.25;
}

.quick-action > span:last-child {
  color: var(--muted);
  line-height: 1.45;
}

.quick-action strong:last-child {
  align-self: center;
}

.travel-preview,
.hr-preview,
.docs-preview {
  position: relative;
  overflow: hidden;
}

.travel-preview .tile-icon {
  background: #e7f6fd;
  color: var(--accent);
}

.hr-preview .tile-icon {
  background: #eef8f3;
  color: #16805b;
}

.docs-preview .tile-icon {
  background: #f2f6ff;
  color: #366bd6;
}


.preview-note,
.hr-preview-note {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eff4f8;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.mini-grid,
.hr-mini-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  margin-top: 2px;
}

.mini-grid span,
.hr-mini-grid span {
  display: flex;
  align-items: center;
  min-height: 29px;
  padding: 6px 10px;
  border: 1px solid #e0e8ef;
  border-radius: 10px;
  background: #fff;
  color: #526171;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.docs-preview .mini-grid span {
  border-color: #dfe8f7;
  color: #4f6080;
}

.travel-preview .preview-note {
  background: #e2f4fc;
  color: #0477ad;
}

.travel-preview .mini-grid span {
  border-color: #cdeafa;
  color: #196d96;
}

.portal-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 18px;
}

.portal-panel {
  min-height: 260px;
}

.people-dashboard {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  scroll-margin-top: 18px;
}

.people-calendar-panel {
  grid-column: span 3;
}

.people-side-panel {
  grid-column: span 1;
}

.people-calendar-panel,
.people-side-panel {
  min-height: 320px;
}

.people-calendar {
  display: grid;
  gap: 7px;
}

.month-picker {
  position: relative;
  width: fit-content;
}

.month-picker summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
}

.month-picker summary::-webkit-details-marker {
  display: none;
}

.month-picker summary::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.15s;
}

.month-picker[open] summary::after {
  transform: rotate(225deg) translateY(-2px);
}

.month-picker h2 {
  margin: 0;
}

.month-picker-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 30;
  display: grid;
  width: min(520px, calc(100vw - 48px));
  gap: 14px;
  padding: 16px;
  border: 1px solid #d9e4ee;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}

.month-picker-year {
  display: grid;
  gap: 9px;
}

.month-picker-year strong {
  color: var(--text);
  font-size: 13px;
}

.month-picker-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
}

.month-picker-grid a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid #e0e8ef;
  border-radius: 10px;
  background: #f8fafc;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.month-picker-grid a:hover,
.month-picker-grid a.active {
  border-color: var(--accent);
  background: #e7f6fd;
  color: var(--accent);
}

.people-calendar-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.calendar-nav-button {
  display: inline-flex;
  min-width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid #d9e4ee;
  border-radius: 11px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.calendar-nav-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.calendar-nav-button svg {
  width: 17px;
  height: 17px;
}

.calendar-nav-button:not(.next) svg {
  transform: rotate(180deg);
}

.calendar-nav-button.today {
  min-width: 78px;
}

.people-weekdays,
.people-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
}

.people-weekdays div {
  padding: 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.people-weekdays div:nth-child(6),
.people-weekdays div:nth-child(7) {
  color: #d23b3b;
}

.people-day {
  position: relative;
  min-height: 108px;
  padding: 9px;
  border: 1px solid #e0e8ef;
  border-radius: 13px;
  background: #fff;
  overflow: visible;
}

.people-day.muted {
  background: #f7f9fb;
  color: var(--muted);
}

.people-day.weekend,
.people-day.holiday {
  border-color: #f0caca;
  background: #fff7f7;
}

.people-day.today {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 144, 215, 0.1);
}

.people-day-number {
  display: inline-flex;
  min-width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--text);
  font-weight: 800;
}

.people-day.weekend .people-day-number,
.people-day.holiday .people-day-number {
  color: #c83232;
}

.people-day.today .people-day-number {
  background: var(--accent);
  color: #fff;
}

.people-events {
  display: grid;
  gap: 5px;
  margin-top: 7px;
  min-width: 0;
}

.people-event {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding: 6px 8px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.people-event svg {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
}

.event-emoji {
  flex: 0 0 auto;
  font-size: 13px;
  line-height: 1;
}

.people-event span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.people-event.birthday {
  position: relative;
  overflow: visible;
  border: 1px solid #f4c64f;
  background: #fff0b8;
  color: #7a5600;
}

.people-event.vacation {
  position: relative;
  overflow: visible;
  border: 1px solid #75d7a1;
  background: #dff8ea;
  color: #0d6845;
}

.people-event.holiday {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  background: #ffe6e6;
  color: #ba2c2c;
}

.people-event.birthday:hover::after,
.people-event.vacation:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 20;
  width: max-content;
  max-width: 260px;
  padding: 8px 10px;
  border: 1px solid #b8ead0;
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  white-space: normal;
}

.people-event.birthday:hover::before,
.people-event.vacation:hover::before {
  content: "";
  position: absolute;
  left: 14px;
  bottom: calc(100% + 2px);
  z-index: 21;
  width: 10px;
  height: 10px;
  border-right: 1px solid #b8ead0;
  border-bottom: 1px solid #b8ead0;
  background: #fff;
  transform: rotate(45deg);
}

.people-event.birthday:hover::after {
  border-color: #f4c64f;
  color: #4f3900;
}

.people-event.birthday:hover::before {
  border-color: #f4c64f;
}

.people-day.holiday:hover::after {
  content: attr(data-holiday-title);
  position: absolute;
  left: 10px;
  bottom: calc(100% + 10px);
  z-index: 20;
  width: max-content;
  max-width: 260px;
  padding: 8px 10px;
  border: 1px solid #f0caca;
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  white-space: normal;
}

.people-day.holiday:hover::before {
  content: "";
  position: absolute;
  left: 24px;
  bottom: calc(100% + 4px);
  z-index: 21;
  width: 10px;
  height: 10px;
  border-right: 1px solid #f0caca;
  border-bottom: 1px solid #f0caca;
  background: #fff;
  transform: rotate(45deg);
}

.people-side-panel {
  display: grid;
  gap: 14px;
  align-content: start;
}

.people-side-panel.panel {
  padding: 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}

.people-side-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.section-title-row.compact {
  margin-bottom: 12px;
}

.section-title-row.compact h2 {
  margin: 0;
  font-size: 18px;
}

.people-list {
  display: grid;
  gap: 8px;
}

.people-list-item {
  display: grid;
  grid-template-columns: 40px 54px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  background: #f7f9fb;
}

.people-list-item strong {
  color: var(--accent);
  font-size: 13px;
}

.people-list-item span {
  overflow: hidden;
  color: var(--text);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-event-icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  color: var(--accent);
}

.side-event-icon svg {
  width: 19px;
  height: 19px;
}

.side-event-icon.birthday {
  border: 1px solid #f4c64f;
  background: #fff0b8;
  color: #a07000;
}

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

.holiday-info-item {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid #f0caca;
  border-radius: 13px;
  background: #fff8f8;
}

.holiday-info-head {
  display: grid;
  grid-template-columns: 40px 54px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
}

.side-event-emoji {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid #f0caca;
  border-radius: 11px;
  background: #fff;
  font-size: 20px;
  line-height: 1;
}

.side-event-emoji.birthday {
  border-color: #f4c64f;
  background: #fff0b8;
}

.holiday-info-head strong {
  color: #c83232;
  font-size: 13px;
}

.holiday-info-head span {
  color: var(--text);
  font-weight: 800;
  line-height: 1.25;
}

.holiday-info-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.holiday-info-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.holiday-info-item .holiday-info-fact {
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff;
  color: #8d4d4d;
}

.section-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.section-title-row h2 {
  margin-bottom: 4px;
}

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

.portal-section-list a {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
}

.portal-section-list a:hover {
  border-color: var(--accent);
}

.portal-section-list strong {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.hr-head {
  margin-bottom: 18px;
}

.hr-section-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.hr-section-card {
  min-height: 150px;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.hr-section-card.active:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.hr-section-card .tile-icon {
  background: #eef8f3;
  color: #16805b;
}

.hr-section-card strong {
  font-size: 18px;
  line-height: 1.25;
}

.hr-section-card.muted {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.78);
}

.hr-section-card.muted .tile-icon {
  background: #f4f7fa;
  color: #8a96a8;
}

.page-head.compact {
  margin-bottom: 18px;
}

.auth-head {
  max-width: 680px;
  justify-content: center;
  margin: 34px auto 18px;
  text-align: center;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 34px;
  line-height: 1.15;
}

h2 {
  font-size: 18px;
  margin-bottom: 14px;
}

.page-head p {
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.5;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.back-link {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 14px;
}

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.filters a.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.request-filter-panel {
  margin-bottom: 16px;
}

.request-filter-panel summary {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
}

.request-filters {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.request-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
}

.filter-wide {
  display: grid;
}

.filter-badge {
  display: inline-flex;
  min-width: 24px;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  line-height: 1;
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.table-filter-form {
  display: grid;
  gap: 10px;
}

.page:has(.requests-page-head) {
  width: min(calc(100% - 40px), 1680px);
}

.table-filter-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.requests-table th {
  min-width: 0;
}

.requests-table {
  min-width: 0;
  table-layout: fixed;
}

.requests-table th:nth-child(1),
.requests-table td:nth-child(1) {
  width: 7%;
}

.requests-table th:nth-child(2),
.requests-table td:nth-child(2) {
  width: 11%;
}

.requests-table th:nth-child(3),
.requests-table td:nth-child(3) {
  width: 17%;
}

.requests-table th:nth-child(4),
.requests-table td:nth-child(4) {
  width: 16%;
}

.requests-table th:nth-child(5),
.requests-table td:nth-child(5) {
  width: 22%;
}

.requests-table th:nth-child(6),
.requests-table td:nth-child(6) {
  width: 17%;
}

.requests-table th:nth-child(7),
.requests-table td:nth-child(7),
.requests-table th:nth-child(8),
.requests-table td:nth-child(8) {
  width: 5%;
  text-align: center;
}

.requests-table td {
  overflow-wrap: anywhere;
}

.sent-check {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #16a34a;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(22, 163, 74, 0.18);
}

.sent-empty {
  color: #9aa7b6;
  font-weight: 800;
}

.sent-note {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 999px;
  background: #eef4fa;
  color: #6b7785;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.clickable-row {
  cursor: pointer;
  transition: background 0.18s ease;
}

.clickable-row:hover,
.clickable-row:focus-visible {
  background: #f4f9fd;
}

.clickable-row:focus-visible {
  outline: 2px solid rgba(0, 144, 215, 0.28);
  outline-offset: -2px;
}

.th-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.table-filter-select {
  height: 38px;
  min-height: 38px;
  padding: 0 34px 0 10px;
  border-radius: 10px;
  font-size: 13px;
}

.table-wrap,
.panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  backdrop-filter: blur(12px);
}

.table-wrap {
  overflow: auto;
  border-radius: 15px;
}

.requests-table-wrap {
  width: 100%;
}

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

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  color: var(--muted);
  font-weight: 600;
  background: var(--accent-soft);
}

tr:last-child td {
  border-bottom: 0;
}

.empty-cell {
  color: var(--muted);
  text-align: center;
}

.phonebook-head {
  align-items: center;
}

.phonebook-filter-panel {
  margin-bottom: 16px;
}

.phonebook-filter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 12px;
}

.phonebook-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

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

.phonebook-table-wrap {
  border-radius: 18px;
}

.phonebook-table {
  min-width: 980px;
}

.phonebook-table th:nth-child(1),
.phonebook-table td:nth-child(1) {
  width: 23%;
}

.phonebook-table th:nth-child(2),
.phonebook-table td:nth-child(2) {
  width: 25%;
}

.phonebook-table th:nth-child(3),
.phonebook-table td:nth-child(3) {
  width: 17%;
}

.phonebook-table th:nth-child(4),
.phonebook-table td:nth-child(4) {
  width: 23%;
}

.phonebook-table th:nth-child(5),
.phonebook-table td:nth-child(5) {
  width: 12%;
}

.birthday-filter-grid {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.birthday-admin-panel {
  margin-bottom: 16px;
}

.birthday-admin-grid {
  grid-template-columns: minmax(260px, 1fr) minmax(110px, 0.3fr) minmax(170px, 0.4fr);
}

.birthday-table {
  min-width: 860px;
}

.birthday-table th:nth-child(1),
.birthday-table td:nth-child(1) {
  width: 46%;
}

.birthday-table th:nth-child(2),
.birthday-table td:nth-child(2) {
  width: 20%;
}

.birthday-table th:nth-child(3),
.birthday-table td:nth-child(3) {
  width: 22%;
}

.birthday-table th:nth-child(4),
.birthday-table td:nth-child(4) {
  width: 12%;
}

.compact-button {
  min-height: 36px;
  padding: 0 12px;
}

.zodiac-label {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f4f8ff;
  color: #446072;
  font-weight: 700;
  line-height: 1.2;
}

.phonebook-person {
  display: flex;
  align-items: center;
}

.department-pill {
  display: inline-flex;
  max-width: 100%;
  min-height: 30px;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f4f8ff;
  color: #446072;
  font-size: 13px;
  line-height: 1.25;
}

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

.phonebook-empty {
  padding-top: 18px;
}

.status {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  white-space: nowrap;
}

.status-large {
  min-height: 44px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 700;
}

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

.status-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.status-actions .button {
  width: 122px;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  box-shadow: none;
}

.request-head .page-actions {
  max-width: 720px;
}

.request-head-status-actions {
  justify-content: flex-end;
  gap: 7px;
}

.request-head-status-actions .button {
  min-height: 40px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: 16px;
}

.profile-summary {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.profile-summary strong {
  display: block;
  color: var(--text);
  font-size: 18px;
  line-height: 1.25;
}

.profile-summary span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
}

.profile-photo,
.profile-photo img,
.profile-photo-placeholder {
  width: 86px;
  height: 86px;
}

.profile-photo img,
.profile-photo-placeholder {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}

.profile-photo img {
  object-fit: cover;
}

.profile-photo-placeholder {
  display: grid;
  place-items: center;
  color: #8a96a8;
}

.profile-photo-placeholder svg {
  width: 50px;
  height: 50px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.request-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 16px;
  align-items: start;
}

.request-main,
.request-side {
  display: grid;
  gap: 16px;
}

.route-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}

.route-point {
  display: grid;
  gap: 7px;
}

.route-point span,
.route-point small {
  color: var(--muted);
  font-size: 13px;
}

.route-point strong {
  color: var(--text);
  font-size: 20px;
  line-height: 1.2;
}

.route-arrow {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 22px;
  font-weight: 700;
}

.request-card-grid {
  align-items: stretch;
}

.request-card-grid > .panel {
  display: flex;
  min-height: 100%;
  flex-direction: column;
}

.request-card-grid .data-list {
  flex: 1;
}

.request-simple-panel {
  display: grid;
  gap: 18px;
}

.request-status-actions {
  justify-content: flex-start;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.request-readable-wrap {
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(0, 144, 215, 0.16);
  border-radius: 15px;
  background: linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.request-readable-table {
  width: 100%;
  min-width: 0;
  border-collapse: separate;
  border-spacing: 0 8px;
  table-layout: auto;
}

.request-readable-table th,
.request-readable-table td {
  padding: 17px 18px;
  border-bottom: 0;
  vertical-align: middle;
  font-size: 16px;
  line-height: 1.35;
}

.request-readable-table th {
  width: 240px;
  border: 1px solid rgba(0, 144, 215, 0.14);
  border-right: 0;
  border-radius: 12px 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  background: #eef7ff;
}

.request-readable-table td {
  border: 1px solid rgba(0, 144, 215, 0.14);
  border-left: 0;
  border-radius: 0 12px 12px 0;
  color: var(--text);
  font-weight: 700;
  background: #fff;
}

.request-readable-table tr:hover th {
  background: #e6f3ff;
}

.request-readable-table tr:hover td {
  background: #fbfdff;
}

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

.request-simple-item {
  display: grid;
  gap: 6px;
  min-height: 78px;
  align-content: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.request-simple-item span,
.request-attachment-line span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.request-simple-item strong {
  color: var(--text);
  font-size: 17px;
  line-height: 1.35;
}

.request-attachment-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 4px;
}

.request-attachment-line strong {
  color: var(--text);
  font-size: 16px;
}

.request-extra-details {
  margin-top: 16px;
}

.purchase-panel {
  display: grid;
  gap: 18px;
  margin-top: 16px;
}

.purchase-form {
  display: grid;
  gap: 16px;
}

.purchase-lines {
  display: grid;
  gap: 12px;
}

.purchase-line {
  display: grid;
  grid-template-columns: 142px 104px 132px 150px;
  gap: 12px;
  align-items: start;
  justify-content: start;
  padding: 14px;
  border: 1px solid #dbe7f2;
  border-radius: 16px;
  background: #f8fbfe;
}

.purchase-line-title {
  min-height: 52px;
  display: flex;
  align-items: center;
  padding: 0 4px;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
}

.purchase-form input[type="file"] {
  font-size: 12px;
  padding: 13px;
  cursor: pointer;
}

.purchase-line label,
.purchase-line input,
.purchase-line select {
  min-width: 0;
}

.purchase-line input,
.purchase-line select {
  height: 42px;
  min-height: 42px;
  padding-left: 10px;
  padding-right: 10px;
}

.purchase-line select {
  padding-right: 34px;
  background-position: calc(100% - 8px) 50%;
}

.file-link {
  display: inline-flex;
  margin-top: 8px;
  font-weight: 700;
}

.file-ready {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  margin-top: 8px;
}

.file-ready-check {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #16a34a;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(22, 163, 74, 0.22);
}

.file-ready .file-link {
  min-width: 0;
  margin-top: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-summary-wrap {
  margin-top: 2px;
}

@media (max-width: 1100px) {
  .purchase-line {
    grid-template-columns: 126px 96px 124px 142px;
  }
}

.notice {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  background: #f0fdf4;
  color: #166534;
  font-weight: 700;
}

.request-extra-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 16px;
}

.request-extra-grid pre {
  max-height: 360px;
  overflow: auto;
  white-space: pre-wrap;
}

.calendar-panel {
  display: grid;
  gap: 16px;
}

.calendar-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 2px;
}

.calendar-title-row h2 {
  margin: 0;
  font-size: 24px;
}

.calendar-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.calendar-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--accent);
}

.calendar-dot.return {
  background: #de6439;
}

.calendar-dot.hotel {
  background: #24a148;
}

.trip-calendar {
  display: grid;
  gap: 8px;
}

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

.calendar-weekdays div {
  padding: 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.calendar-day {
  min-height: 158px;
  overflow: hidden;
  padding: 10px;
  border: 1px solid rgba(0, 144, 215, 0.14);
  border-radius: 14px;
  background: #fff;
}

.calendar-day.muted {
  background: rgba(255, 255, 255, 0.62);
}

.calendar-day.today {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 144, 215, 0.12);
}

.calendar-day-number {
  display: inline-flex;
  min-width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--text);
  font-weight: 800;
}

.calendar-day.today .calendar-day-number {
  background: var(--accent);
  color: #fff;
}

.calendar-events {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.calendar-event {
  display: block;
  padding: 8px;
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  background: #f7fbff;
  color: var(--text);
  font-size: 12px;
  line-height: 1.25;
}

.calendar-event:hover {
  color: var(--text);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

.calendar-event.return {
  border-left-color: #de6439;
  background: #fff7f2;
}

.calendar-event.hotel {
  border-left-color: #24a148;
  background: #f1fbf5;
}

.calendar-event-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.calendar-event strong {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  text-transform: uppercase;
}

.calendar-transport-icon {
  width: 15px;
  height: 15px;
}

.calendar-event em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.calendar-event small {
  color: var(--muted);
  font-size: 11px;
}

.panel {
  padding: 22px;
  border-radius: 15px;
}

.panel.narrow {
  max-width: 520px;
}

.panel.auth-panel {
  width: min(680px, 100%);
  max-width: 680px;
  margin: 0 auto;
  padding: 30px 34px;
}

.login-panel {
  box-shadow: var(--shadow);
}

.auth-panel .button {
  width: 100%;
  min-height: 52px;
}

.auth-panel input {
  min-height: 52px;
}

.auth-panel .hint {
  text-align: center;
}

.accent-panel {
  border-color: rgba(0, 144, 215, 0.24);
  background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
}

.form-panel {
  margin-top: 16px;
}

.danger-panel {
  border-color: rgba(180, 35, 24, 0.22);
  background: #fff7f6;
}

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

.admin-summary {
  align-items: stretch;
}

.metric-panel {
  display: flex;
  min-height: 205px;
  flex-direction: column;
  gap: 10px;
}

.metric-number {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 46px;
  font-weight: 800;
  line-height: 1;
}

.metric-panel .button {
  align-self: flex-start;
  margin-top: auto;
}

.stack-actions {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.stack-actions .button {
  width: 100%;
  justify-content: center;
  margin-top: 0;
}

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

.tile {
  display: flex;
  min-height: 132px;
  flex-direction: column;
  justify-content: flex-start;
  gap: 14px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.tile:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.tile strong {
  font-size: 18px;
}

.tile span,
.hint {
  color: var(--muted);
  line-height: 1.5;
}

.tile-icon {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: var(--accent-soft);
  color: var(--accent);
}

.tile-icon svg {
  width: 24px;
  height: 24px;
}

.alert {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #fecaca;
  border-radius: 6px;
  background: #fff1f2;
  color: #991b1b;
}

.alert.soft {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.tile.muted {
  background: #fbfcfd;
}

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

.list a {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: #fff;
}

.list-row {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.list a:hover {
  border-color: var(--accent);
  color: var(--text);
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.employee-list {
  margin-bottom: 14px;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-submit-row {
  display: flex;
  align-items: end;
}

.form-submit-row .button {
  width: 100%;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

input,
select {
  height: 48px;
}

select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' viewBox='0 0 20 20'%3E%3Cpath d='M6 8l4 4 4-4' stroke='%23767676' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: calc(100% - 14px) 50%;
  background-size: 20px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 2px 4px rgba(0, 144, 215, 0.2);
}

.field-invalid {
  color: #b42318;
}

.field-invalid input,
.field-invalid select,
.field-invalid textarea,
input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: #d92d20;
  background: #fff7f7;
  box-shadow: 0 0 0 1px rgba(217, 45, 32, 0.18);
}

.field-error {
  color: #b42318;
  font-size: 12px;
  line-height: 1.35;
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

textarea {
  min-height: 112px;
  padding-top: 14px;
  resize: vertical;
}

input[readonly] {
  background: #f7f8fa;
  color: var(--muted);
}

.travel-form {
  display: grid;
  gap: 16px;
}

.form-error-summary {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #f3b2ac;
  border-radius: 14px;
  background: #fff7f7;
  color: #b42318;
  font-weight: 700;
}

.form-section-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.form-section-head h2 {
  margin-bottom: 4px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 15px;
}

.checkbox-row input {
  width: 18px;
  min-height: 18px;
}

.route-extra-card {
  min-height: 120px;
  padding: 14px 16px;
  border: 1px solid rgba(0, 144, 215, 0.16);
  border-radius: 15px;
  background: #f7fbff;
}

.return-ticket-toggle,
.route-service-toggle {
  align-items: center;
  color: var(--text);
  font-weight: 700;
}

.return-ticket-toggle input,
.route-service-toggle input {
  margin: 0;
}

.return-fields,
.manual-fields {
  margin-top: 14px;
}

.return-fields.return-fields-wide {
  grid-column: 1 / -1;
  margin-top: 0;
}

.route-service-fields {
  grid-column: 1 / -1;
  margin-top: 0;
}

.route-service-name {
  min-height: 120px;
  justify-content: center;
}

.route-service-name input:disabled {
  color: var(--muted);
  background: #f2f6fa;
}

.full-label {
  margin-top: 14px;
}

.file-field input[type="file"] {
  padding: 12px;
  background: #fff;
}

.file-field-title {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-weight: 700;
}

.file-field-title svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
  stroke-width: 1.5;
}

.file-field .hint {
  margin-top: 6px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

.form-actions .button {
  min-width: 240px;
  min-height: 52px;
}

.employee-form {
  display: grid;
  gap: 18px;
}

.employee-card-layout {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.employee-photo-field,
.employee-type-card {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f7f8fa;
}

.employee-photo-box {
  position: relative;
  width: 112px;
  height: 112px;
}

.employee-photo-box img,
.employee-photo-placeholder {
  width: 112px;
  height: 112px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.employee-photo-box img {
  object-fit: cover;
}

.employee-photo-placeholder {
  display: grid;
  place-items: center;
  color: #8a96a8;
}

.employee-photo-placeholder svg {
  width: 58px;
  height: 58px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.employee-photo-upload {
  position: absolute;
  right: -8px;
  bottom: -8px;
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(0, 144, 215, 0.28);
  border-radius: 50%;
  background: #fff;
  color: var(--accent);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
  cursor: pointer;
}

.employee-photo-upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.employee-photo-upload svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  pointer-events: none;
}

.employee-photo-meta {
  display: grid;
  gap: 4px;
}

.employee-table-initial {
  display: inline-grid;
  place-items: center;
  background: #e8f3ff;
  color: var(--accent);
  font-weight: 800;
}

.field-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.segmented-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.segmented-choice label {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.segmented-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  clip-path: inset(50%);
}

.segmented-choice span {
  min-height: 44px;
  display: grid;
  place-items: center;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
  user-select: none;
}

.segmented-choice input:checked + span {
  border-color: rgba(0, 144, 215, 0.3);
  background: #e8f3ff;
  color: var(--accent);
  box-shadow: 0 8px 18px rgba(0, 144, 215, 0.12);
}

.segmented-choice label:hover span {
  color: var(--accent);
}

.segmented-choice input:focus-visible + span {
  outline: 2px solid rgba(0, 144, 215, 0.34);
  outline-offset: 2px;
}

.document-type-row {
  width: min(100%, 360px);
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  padding: 0;
}

.link-button.danger {
  color: #b42318;
}

.table-link {
  color: var(--accent);
  font-weight: 700;
}

.table-link:hover {
  color: var(--accent-hover);
}

.extra-documents {
  display: grid;
  gap: 14px;
}

.extra-document-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f7f8fa;
}

.extra-document-head {
  display: grid;
  grid-template-columns: minmax(220px, 360px) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.employee-submit {
  min-height: 64px;
  justify-content: center;
  font-size: 20px;
}

.employee-table-wrap {
  margin-top: 24px;
}

.employee-table-photo,
.employee-table-initial {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

.employee-table-photo {
  object-fit: cover;
  border: 1px solid var(--line);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(31, 41, 55, 0.38);
}

.modal-card {
  width: min(440px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(31, 41, 55, 0.22);
}

.modal-card h2 {
  margin-bottom: 8px;
}

.modal-card p {
  margin: 0;
  color: var(--muted);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.alert.success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.alert:not(.soft),
.notice {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 2000;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: min(360px, calc(100vw - 32px));
  min-height: 58px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 16px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
  font-weight: 800;
  animation: toast-in 180ms ease-out, toast-out 240ms ease-in 5.2s forwards;
}

.alert:not(.soft)::before,
.notice::before {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 20px;
  line-height: 1;
}

.alert.success::before,
.notice::before {
  content: "✓";
  background: #16a34a;
}

.alert:not(.success):not(.soft)::before {
  content: "!";
  background: #d92d20;
}

.toast-root {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 2000;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.feedback-toast {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
  font-weight: 800;
  animation: toast-in 180ms ease-out;
}

.feedback-toast .toast-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 20px;
  line-height: 1;
}

.feedback-toast.success {
  border-color: rgba(22, 101, 52, 0.18);
}

.feedback-toast.success .toast-icon {
  background: #16a34a;
}

.feedback-toast.error {
  border-color: rgba(180, 35, 24, 0.2);
}

.feedback-toast.error .toast-icon {
  background: #d92d20;
}

.feedback-toast.is-hiding {
  animation: toast-out 240ms ease-in forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

.steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  line-height: 1.5;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 14px 14px 14px 50px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 14px;
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

dl {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 10px 14px;
  margin: 0;
}

.data-list {
  grid-template-columns: minmax(118px, 0.42fr) minmax(0, 1fr);
  gap: 0 14px;
  border-top: 1px solid var(--line);
}

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

.data-list dt,
.data-list dd {
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: inherit;
  line-height: 1.5;
  padding: 16px;
  border-radius: 14px;
  background: #fbfcfd;
  border: 1px solid var(--line);
}

.integration-panel {
  display: grid;
  gap: 12px;
}

.integration-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.code-block {
  max-height: 360px;
  overflow: auto;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
}

.compact-details {
  display: block;
}

.compact-details summary {
  cursor: pointer;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
}

.compact-details pre {
  margin-top: 14px;
}

.service-access-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.service-access-card {
  display: grid;
  gap: 16px;
}

.service-access-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.service-access-head h2 {
  margin-bottom: 6px;
}

.service-access-reveal {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.service-access-reveal input,
.secret-field {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
}

.secret-field {
  width: 100%;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

.service-access-actions {
  align-items: center;
  flex-direction: row;
}

@media (max-width: 760px) {
  .portal-dashboard,
  .portal-columns,
  .hr-section-grid,
  .people-dashboard,
  .phonebook-filter-grid,
  .quick-actions {
    grid-template-columns: 1fr;
  }

  .portal-welcome,
  .portal-weather {
    min-height: auto;
  }

  .portal-welcome {
    grid-template-columns: 1fr;
    padding: 4px 0 12px;
  }

  .portal-profile-photo {
    justify-self: start;
    order: -1;
  }

  .portal-weather {
    align-items: flex-start;
    padding: 0 0 14px;
    text-align: left;
  }

  .portal-weather-main strong {
    font-size: 40px;
  }

  .portal-profile-photo,
  .portal-profile-photo img,
  .portal-profile-placeholder {
    width: 128px;
    height: 128px;
    border-radius: 24px;
  }

  .portal-profile-placeholder svg {
    width: 60px;
    height: 60px;
  }

  .portal-welcome h1 {
    font-size: 30px;
  }

  .employee-card-layout,
  .segmented-choice {
    grid-template-columns: 1fr;
  }

  .topbar,
  .page-head,
  .status-panel,
  .detail-grid {
    display: block;
  }

  .topbar {
    padding: 14px 18px;
    border-radius: 0 0 18px 18px;
  }

  .brand-logo {
    width: 126px;
  }

  nav {
    margin-top: 12px;
    flex-wrap: wrap;
  }

  .page {
    width: min(calc(100% - 24px), 1680px);
    padding: 16px 0;
  }

  .page-head .button {
    margin-top: 14px;
  }

  .page-actions {
    justify-content: flex-start;
    margin-top: 14px;
  }

  .status-actions {
    justify-content: flex-start;
    margin-top: 14px;
  }

  .portal-hero {
    min-height: auto;
    padding: 24px;
  }

  .portal-hero h1 {
    font-size: 34px;
  }

  .detail-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .request-layout,
  .route-panel {
    grid-template-columns: 1fr;
  }

  .request-simple-grid,
  .request-extra-grid {
    grid-template-columns: 1fr;
  }

  .calendar-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .people-calendar-actions {
    width: 100%;
  }

  .people-calendar-panel,
  .people-side-panel {
    grid-column: auto;
  }

  .calendar-nav-button.today {
    flex: 1;
  }

  .month-picker-panel {
    width: min(360px, calc(100vw - 40px));
  }

  .month-picker-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .trip-calendar {
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .calendar-weekdays,
  .calendar-week {
    min-width: 980px;
  }

  .request-attachment-line {
    align-items: flex-start;
    flex-direction: column;
  }

  .purchase-line {
    grid-template-columns: minmax(76px, 96px) minmax(94px, 124px) minmax(104px, 142px);
    justify-content: start;
  }

  .purchase-line-title {
    grid-column: 1 / -1;
    min-height: auto;
    padding: 0;
  }

  .route-arrow {
    transform: rotate(90deg);
  }

  .grid-3,
  .grid-2,
  .service-access-grid,
  .request-filter-grid,
  .birthday-admin-grid,
  .form-grid.two,
  .steps {
    grid-template-columns: 1fr;
  }

  .service-access-reveal {
    grid-template-columns: 1fr;
  }

  .list-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .data-list,
  dl {
    grid-template-columns: 1fr;
  }

  .data-list {
    grid-template-columns: minmax(104px, 0.42fr) minmax(0, 1fr);
  }
}
