.talent-time-off-dialog,
.time-off-management-dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: min(90vh, 900px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  color: var(--ink);
  box-shadow: 0 26px 72px rgba(8, 38, 76, .27);
}

.time-off-management-dialog { width: min(1040px, calc(100vw - 32px)); }
.talent-time-off-dialog::backdrop,
.time-off-management-dialog::backdrop { background: rgba(7, 25, 50, .7); }
.talent-time-off-dialog > section,
.time-off-management-dialog > section { max-height: inherit; overflow: auto; padding: 24px; }
.talent-time-off-dialog .modal-title,
.time-off-management-dialog .modal-title { margin-bottom: 18px; }
.talent-time-off-dialog .modal-title h2,
.time-off-management-dialog .modal-title h2 { margin: 0; font-size: 24px; }
.talent-time-off-dialog .modal-close,
.time-off-management-dialog .modal-close { cursor: pointer; }

.talent-time-off-open { border-color: #b8c9da; color: var(--navy); }
.time-off-management-open { position: relative; }
.time-off-action-count {
  display: inline-grid;
  min-width: 20px;
  min-height: 20px;
  margin-left: 7px;
  padding: 1px 6px;
  place-items: center;
  border-radius: 999px;
  background: #eaf2fb;
  color: #174f80;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.time-off-feedback {
  margin-bottom: 14px;
  padding: 11px 13px;
  border: 1px solid #cfe2d9;
  border-radius: 10px;
  background: #edf8f3;
  color: #185c47;
  font-size: 13px;
}
.time-off-feedback.error { border-color: #f0c6ba; background: #fff3ef; color: #8b341d; }

.time-off-request-form {
  display: grid;
  gap: 15px;
  padding: 18px;
  border: 1px solid #d8e3ee;
  border-radius: 14px;
  background: #fbfcfe;
}
.time-off-date-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.time-off-request-form label,
.time-off-management-filters label,
.time-off-decision label {
  display: grid;
  gap: 6px;
  color: #263e59;
  font-size: 13px;
  font-weight: 750;
}
.time-off-request-form label > span,
.time-off-decision label > span { color: #687b90; font-size: 11px; font-weight: 600; }
.time-off-request-form input,
.time-off-request-form textarea,
.time-off-management-filters input,
.time-off-management-filters select,
.time-off-decision textarea {
  width: 100%;
  min-height: 42px;
  box-sizing: border-box;
  padding: 9px 11px;
  border: 1px solid #c7d5e3;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
.time-off-request-form textarea,
.time-off-decision textarea { min-height: 70px; resize: vertical; }
.time-off-request-form input:focus,
.time-off-request-form textarea:focus,
.time-off-management-filters input:focus,
.time-off-management-filters select:focus,
.time-off-decision textarea:focus {
  border-color: #2f79b8;
  outline: 3px solid rgba(47, 121, 184, .15);
}
.time-off-request-form label > small { color: #718296; font-size: 11px; font-weight: 500; }
.time-off-form-actions { display: flex; justify-content: flex-end; }

.time-off-scope-note,
.time-off-ineligible,
.time-off-management-summary {
  padding: 13px 14px;
  border: 1px solid #d8e4ef;
  border-radius: 11px;
  background: #f1f6fb;
  color: #4a6078;
  font-size: 12px;
}
.time-off-scope-note strong,
.time-off-ineligible strong { color: var(--navy); font-size: 13px; }
.time-off-scope-note p,
.time-off-ineligible p,
.time-off-management-summary p { margin: 4px 0 0; line-height: 1.45; }

.time-off-history,
.time-off-management-section { margin-top: 22px; }
.time-off-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}
.time-off-section-heading .eyebrow { margin: 0 0 2px; }
.time-off-section-heading h3 { margin: 0; color: var(--navy); font-size: 18px; }
.time-off-section-heading > span {
  display: inline-grid;
  min-width: 30px;
  min-height: 30px;
  place-items: center;
  border-radius: 999px;
  background: #eef3f8;
  color: var(--navy);
  font-size: 12px;
  font-weight: 800;
}

.time-off-history-list { display: grid; gap: 9px; }
.time-off-history-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px 14px;
  padding: 13px 14px;
  border: 1px solid #dfe7f0;
  border-radius: 11px;
  background: #fff;
}
.time-off-history-card strong,
.time-off-history-card small { display: block; }
.time-off-history-card small { margin-top: 3px; color: #66798e; }
.time-off-history-card > p { grid-column: 1 / -1; margin: 0; color: #4a6077; font-size: 12px; line-height: 1.45; }
.time-off-history-card > p span,
.time-off-note span { display: block; margin-bottom: 2px; color: #6c7e91; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.time-off-history-state { display: flex; align-items: center; gap: 8px; }

.time-off-status {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: #f5eddd;
  color: #80591e;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.time-off-status.approved { background: #e3f3ec; color: #17654e; }
.time-off-status.declined { background: #fbeae5; color: #984023; }
.time-off-status.cancelled { background: #edf1f5; color: #5c6d7e; }

.time-off-management-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.time-off-management-summary span { color: #52687f; }
.time-off-management-summary strong { margin-right: 4px; color: var(--navy); font-size: 23px; }
.time-off-management-summary p { max-width: 610px; text-align: right; }
.time-off-management-filters {
  display: grid;
  grid-template-columns: minmax(150px, .6fr) minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
}
.time-off-management-card {
  margin-bottom: 10px;
  padding: 15px;
  border: 1px solid #dce5ee;
  border-radius: 12px;
  background: #fff;
}
.time-off-management-card.pending { border-left: 4px solid #d59a3b; }
.time-off-management-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.time-off-management-card > header strong,
.time-off-management-card > header small { display: block; }
.time-off-management-card > header strong { color: var(--navy); font-size: 15px; }
.time-off-management-card > header small { margin-top: 3px; color: #61768c; }
.time-off-management-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 13px 0; }
.time-off-management-card dl > div { padding: 9px 10px; border-radius: 8px; background: #f5f8fb; }
.time-off-management-card dt { color: #738397; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.time-off-management-card dd { margin: 3px 0 0; color: #29435f; font-size: 12px; font-weight: 700; }
.time-off-note { margin: 10px 0; color: #405a73; font-size: 12px; line-height: 1.45; }
.time-off-note.muted { color: #748598; }
.time-off-decision { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: end; margin-top: 12px; padding-top: 12px; border-top: 1px solid #e2e9f0; }
.time-off-decision > small { color: #6e8195; font-size: 10px; }
.time-off-decision > small.error { color: #9b341c; font-weight: 700; }
.time-off-decision > div { display: flex; grid-row: 1 / span 2; grid-column: 2; gap: 8px; }

.time-off-loading,
.time-off-error,
.time-off-empty { padding: 38px 16px; color: #61758a; text-align: center; }
.time-off-error strong { display: block; color: #923a21; font-size: 17px; }
.time-off-error p { margin: 6px 0 15px; }
.time-off-empty { padding: 24px 12px; border: 1px dashed #d6e0ea; border-radius: 10px; background: #fbfcfd; }

@media (max-width: 720px) {
  .talent-time-off-dialog,
  .time-off-management-dialog { width: calc(100vw - 18px); max-height: 94vh; }
  .talent-time-off-dialog > section,
  .time-off-management-dialog > section { padding: 16px; }
  .talent-time-off-dialog .modal-title h2,
  .time-off-management-dialog .modal-title h2 { font-size: 21px; }
  .time-off-date-grid,
  .time-off-management-filters,
  .time-off-management-card dl { grid-template-columns: 1fr; }
  .time-off-management-summary { display: block; }
  .time-off-management-summary p { text-align: left; }
  .time-off-decision { grid-template-columns: 1fr; }
  .time-off-decision > div { grid-area: auto; justify-content: flex-end; }
}

@media (max-width: 480px) {
  .time-off-history-card { grid-template-columns: 1fr; }
  .time-off-history-state { justify-content: space-between; }
  .time-off-history-card > p { grid-column: 1; }
  .time-off-management-card > header { align-items: stretch; flex-direction: column; }
  .time-off-form-actions .button,
  .time-off-decision .button { flex: 1; }
}
