.attendance-success {
  box-shadow: 0 18px 40px rgba(25, 135, 84, 0.12);
}

/* Edit these variables to resize the Attendance page. */
.workforce-planner {
  --attendance-row-height: var(--planner-row-height);
  --attendance-id-width: 5.2rem;
  --attendance-employee-width: clamp(13.5rem, 17vw, 17.5rem);
  --attendance-day-width: var(--planner-day-width);
  --attendance-action-width: 6.95rem;
  --attendance-font-size: clamp(0.74rem, 0.7rem + 0.12vw, 0.82rem);
  --attendance-cell-padding: 0.4rem 0.45rem;
}

.attendance-intro__eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #0d6efd;
  margin-bottom: 0.35rem;
}

.attendance-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: #e9ecef;
  color: #495057;
}

.attendance-pill--muted {
  background: #e9ecef;
  color: #495057;
}

.attendance-pill--primary {
  background: rgba(13, 110, 253, 0.12);
  color: #0d6efd;
}

.attendance-pill--success {
  background: rgba(25, 135, 84, 0.14);
  color: #198754;
}

.attendance-pill--warning {
  background: rgba(255, 193, 7, 0.18);
  color: #8a6d00;
}

.attendance-pill--danger {
  background: rgba(220, 53, 69, 0.14);
  color: #dc3545;
}

.scanner-stage {
  position: relative;
  min-height: 280px;
  aspect-ratio: 1 / 1;
  border-radius: 1.25rem;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.08), transparent 38%),
    linear-gradient(180deg, #0f172a 0%, #111827 100%);
  border: 1px solid rgba(13, 110, 253, 0.18);
}

.scanner-stage__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #0f172a;
}

.scanner-stage__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 1.5rem;
  text-align: center;
  color: #f8fafc;
}

.scanner-stage__frame {
  position: absolute;
  inset: 12%;
  border-radius: 1rem;
  pointer-events: none;
}

.scanner-stage__frame::before,
.scanner-stage__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: inherit;
}

.scanner-stage__frame::after {
  inset: 12% 14%;
  border-color: rgba(13, 110, 253, 0.28);
}

@media (max-width: 575.98px) {
  .scanner-stage {
    min-height: 220px;
  }

  .scanner-stage__frame {
    inset: 10%;
  }
}

/* Attendance page styles moved from Attendance.cshtml */
.attendance-page__header {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.attendance-page__logo {
  max-width: 190px;
  max-height: 72px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.attendance-table {
  font-size: var(--attendance-font-size);
}

.planner-app-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.planner-app-panel {
    min-width: 0;
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
    border-radius: 1.25rem;
    border: 1px solid #dbe5ef;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.planner-app-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.planner-app-employee-list,
.planner-app-week,
.planner-app-timeline,
.planner-app-open-shifts {
    display: grid;
    gap: 0.75rem;
}

.planner-mobile-employee,
.planner-mobile-day,
.planner-mobile-open-shift {
    border: 1px solid #dbe5ef;
    border-radius: 1rem;
    background: #fff;
    padding: 0.9rem;
    text-align: left;
    width: 100%;
}

.planner-mobile-employee {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.planner-mobile-employee__avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e8f1ff;
    color: #104f9c;
    font-weight: 700;
    flex: 0 0 auto;
}

.planner-mobile-employee__copy {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
}

.planner-mobile-employee__copy strong,
.planner-mobile-day__head strong {
    color: #0f172a;
}

.planner-mobile-employee__status {
    font-size: 0.78rem;
    color: #6b7280;
}

.planner-mobile-day__head,
.planner-mobile-timeline__card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
}

.planner-mobile-day__label,
.planner-mobile-timeline__day {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
}

.planner-mobile-day__badge,
.planner-mobile-timeline__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3rem;
    padding: 0.35rem 0.55rem;
    border-radius: 999px;
    background: #eef4ff;
    color: #1d4ed8;
    font-size: 0.78rem;
    font-weight: 700;
}

.planner-mobile-day__meta,
.planner-mobile-day__actions,
.planner-mobile-timeline__body,
.planner-mobile-timeline__chips {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.planner-mobile-day__meta {
    color: #4b5563;
    font-size: 0.82rem;
    justify-content: space-between;
}

.planner-mobile-day__actions {
    margin-top: 0.2rem;
}

.planner-mobile-day__action {
    flex: 1 1 calc(33.333% - 0.35rem);
    min-width: 0;
}

.employee-hover-trigger {
  padding: 0;
  border: 0;
  background: none;
  color: #1f2937;
  font: inherit;
  font-weight: 600;
  text-align: left;
  transition: color 0.18s ease;
}

.employee-hover-trigger:hover,
.employee-hover-trigger:focus-visible,
.employee-hover-trigger[aria-expanded="true"] {
  color: #0d6efd;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.employee-hover-card {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1080;
  width: min(26rem, calc(100vw - 1.5rem));
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.98);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.employee-hover-card.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

    .employee-hover-card__surface {
        border: 1px solid rgba(201, 209, 227, 0.95);
        border-radius: 1.4rem;
        background: #f7f9fc;
        box-shadow: 0 24px 48px rgba(36, 52, 88, 0.18);
        overflow: hidden;
    }

    .employee-hover-card__header {
        display: flex;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem 1rem 0.75rem;
    }

    .employee-hover-card__avatar,
    .employee-hover-card__avatar-fallback {
        flex: 0 0 5.25rem;
        width: 5.25rem;
        height: 5.25rem;
        border-radius: 50%;
    }

    .employee-hover-card__avatar {
        object-fit: cover;
        border: 2px solid rgba(255, 255, 255, 0.9);
    }

    .employee-hover-card__avatar-fallback {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(145deg, #0f4c81, #6db0e6);
        color: #fff;
        font-size: 1.4rem;
        font-weight: 700;
        letter-spacing: 0.05em;
    }

    .employee-hover-card__identity {
        min-width: 0;
        flex: 1 1 auto;
        padding-top: 0.15rem;
    }

    .employee-hover-card__identity h3 {
        margin: 0;
        color: #202939;
        font-size: 1.85rem;
        line-height: 1.1;
        font-weight: 500;
    }

    .employee-hover-card__identity p {
        margin: 0.35rem 0 0;
        color: #5b6374;
        font-size: 0.95rem;
        word-break: break-word;
    }

    .employee-hover-card__edit {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.4rem;
        height: 2.4rem;
        border-radius: 999px;
        color: #4d596d;
        text-decoration: none;
        transition: background-color 0.18s ease, color 0.18s ease;
    }

    .employee-hover-card__edit:hover,
    .employee-hover-card__edit:focus-visible {
        background: rgba(13, 110, 253, 0.12);
        color: #0d6efd;
    }

    .employee-hover-card__actions {
        display: flex;
        gap: 0.55rem;
        padding: 0 1rem 0.85rem;
    }

    .employee-hover-card__action {
        border: 1px solid #ccd5e3;
        background: #fff;
        color: #4c5a70;
        text-decoration: none;
        transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
    }

    .employee-hover-card__action:hover,
    .employee-hover-card__action:focus-visible {
        transform: translateY(-1px);
        border-color: #9ec8ec;
        box-shadow: 0 10px 18px rgba(70, 107, 151, 0.12);
    }

    .employee-hover-card__action--primary {
        flex: 1 1 auto;
        min-width: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.7rem;
        padding: 0.9rem 1rem;
        border-radius: 999px;
        background: #bdddff;
        border-color: #bdddff;
        color: #15324d;
        font-size: 0.95rem;
        font-weight: 600;
    }

    .employee-hover-card__action--round {
        flex: 0 0 3.2rem;
        width: 3.2rem;
        height: 3.2rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        font-size: 1rem;
    }

    .employee-hover-card__action[disabled] {
        opacity: 0.45;
        pointer-events: none;
        box-shadow: none;
        transform: none;
    }

    .employee-hover-card__details {
        margin: 0 1rem 0.2rem;
        padding: 0.95rem 1rem;
        border-radius: 1rem;
        background: #e9edf5;
    }

    .employee-hover-card__detail-row {
        display: flex;
        align-items: flex-start;
        gap: 0.75rem;
        color: #505a69;
    }

    .employee-hover-card__detail-row + .employee-hover-card__detail-row {
        margin-top: 0.55rem;
    }

    .employee-hover-card__detail-row i {
        width: 1rem;
        margin-top: 0.15rem;
        color: #69758b;
        text-align: center;
    }

    .employee-hover-card__detail-row span,
    .employee-hover-card__detail-row a {
        min-width: 0;
        color: inherit;
        text-decoration: none;
        word-break: break-word;
    }

    .employee-hover-card__detail-row a {
        color: #0d6efd;
    }

    .employee-hover-card__footer-link {
        display: inline-flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 1rem 1.25rem;
        border-top: 1px solid rgba(206, 214, 228, 0.95);
        color: #0d6efd;
        font-size: 0.95rem;
        font-weight: 600;
        text-decoration: none;
    }

    .employee-hover-card__footer-link:hover,
    .employee-hover-card__footer-link:focus-visible {
        background: rgba(13, 110, 253, 0.05);
    }

    .shift-cell {
        background-color: #f8f9fa !important;
        color: #6c757d !important;
    }

    .attendance-table--autofit {
        table-layout: auto;
        width: max-content;
        min-width: 100%;
    }

    .attendance-table--autofit th,
    .attendance-table--autofit td {
        width: auto !important;
        min-width: 0 !important;
        white-space: nowrap;
    }

    .attendance-table--autofit .shift-cell {
        min-width: 0 !important;
    }

    .shift-cell:not(.shift-cell--selected):hover {
        filter: brightness(1.05);
    }

    .shift-cell--theme-clear {
        background-color: #f8f9fa !important;
        color: #6c757d !important;
    }

    .shift-cell--theme-primary {
        background-color: #0d6efd !important;
        color: #ffffff !important;
    }

    .shift-cell--theme-secondary {
        background-color: #6c757d !important;
        color: #ffffff !important;
    }

    .shift-cell--theme-success {
        background-color: #198754 !important;
        color: #ffffff !important;
    }

    .shift-cell--theme-info {
        background-color: #0dcaf0 !important;
        color: #212529 !important;
    }

    .shift-cell--theme-warning {
        background-color: #ffc107 !important;
        color: #212529 !important;
    }

    .shift-cell--theme-danger {
        background-color: #dc3545 !important;
        color: #ffffff !important;
    }

    .shift-cell--theme-dark {
        background-color: #212529 !important;
        color: #ffffff !important;
    }

    .shift-cell--theme-light {
        background-color: #f8f9fa !important;
        color: #212529 !important;
    }

    .shift-cell {
        transition: background-color 0.15s ease, box-shadow 0.15s ease;
        user-select: none;
        -webkit-user-select: none;
    }

    .shift-cell--selected {
        background-color: #cfe2ff !important;
        box-shadow: inset 0 0 0 2px #0d6efd;
    }

    body.attendance-drag-copying .shift-cell {
        cursor: copy !important;
    }

    .shift-popup {
        position: fixed;
        z-index: 9999;
        min-width: 280px;
        max-width: min(360px, calc(100vw - 24px));
        border: 1px solid rgba(13, 110, 253, 0.16);
        border-radius: 18px;
        background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
        box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
        overflow: hidden;
    }

    .shift-popup__header {
        padding: 1rem 1rem 0.8rem;
        border-bottom: 1px solid #e8eef7;
        background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
    }

    .shift-popup__eyebrow {
        font-size: 0.68rem;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: #6c757d;
        margin-bottom: 0.25rem;
    }

    .shift-popup__title {
        font-size: 1rem;
        font-weight: 700;
        color: #0f172a;
        line-height: 1.2;
    }

    .shift-popup__subtitle {
        margin-top: 0.25rem;
        font-size: 0.84rem;
        color: #64748b;
    }

    .shift-popup__list {
        padding: 0.75rem;
        display: flex;
        flex-direction: column;
        gap: 0.45rem;
        max-height: min(340px, calc(100vh - 150px));
        overflow: auto;
    }

    .shift-option-btn {
        width: 100%;
        border: 1px solid transparent;
        border-radius: 14px;
        padding: 0.72rem 0.8rem;
        text-align: left;
        background: #f8fafc;
        color: #0f172a;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    }

    .shift-option-btn:hover {
        transform: translateY(-1px);
        background: #eef4ff;
        border-color: #bfd3ff;
        box-shadow: 0 8px 20px rgba(13, 110, 253, 0.08);
    }

    .shift-option-btn.is-selected {
        background: #e7f1ff;
        border-color: #0d6efd;
        box-shadow: inset 0 0 0 1px rgba(13, 110, 253, 0.08);
    }

    .shift-option-btn__meta {
        min-width: 0;
        display: flex;
        align-items: flex-start;
        gap: 0.75rem;
        flex: 1 1 auto;
    }

    .shift-option-btn__code {
        flex-shrink: 0;
        min-width: 3.1rem;
        font-weight: 700;
        text-align: center;
    }

    .shift-option-btn__text {
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 0.12rem;
    }

    .shift-option-btn__label {
        font-weight: 600;
        line-height: 1.2;
    }

    .shift-option-btn__kind {
        font-size: 0.78rem;
        color: #64748b;
    }

    .shift-option-btn__check {
        color: #0d6efd;
        flex-shrink: 0;
        opacity: 0;
        transform: scale(0.9);
        transition: opacity 0.15s ease, transform 0.15s ease;
    }

    .shift-option-btn.is-selected .shift-option-btn__check {
        opacity: 1;
        transform: scale(1);
    }

    .shift-popup__footer {
        padding: 0.7rem 1rem 0.9rem;
        border-top: 1px solid #e8eef7;
        background: #fbfdff;
        font-size: 0.76rem;
        color: #64748b;
    }

    #quickFillPreviewText {
        min-height: 1.25rem;
    }

    .table th, .table td {
        vertical-align: middle;
    }

    body.attendance-page {
        background:
            radial-gradient(circle at top right, rgba(79, 139, 207, 0.12), transparent 32%),
            linear-gradient(180deg, #f3f7fb 0%, #eaf0f7 100%);
    }

    .workforce-planner {
        --planner-bg: #eef3f9;
        --planner-surface: #ffffff;
        --planner-surface-strong: #f8fbff;
        --planner-border: #d6e0ec;
        --planner-border-strong: #b7c7dc;
        --planner-ink: #112338;
        --planner-muted: #5b6b7d;
        --planner-primary: #155a9c;
        --planner-primary-strong: #0e4578;
        --planner-primary-soft: #e5f0fb;
        --planner-success: #1f7a56;
        --planner-success-soft: #e7f6ef;
        --planner-warning: #9a6700;
        --planner-warning-soft: #fff4d6;
        --planner-danger: #b42318;
        --planner-danger-soft: #fdecec;
        --planner-shadow: 0 12px 26px rgba(17, 35, 56, 0.07);
        --planner-compact-gap: clamp(0.65rem, 0.52rem + 0.35vw, 1rem);
        --planner-card-radius: clamp(0.75rem, 0.68rem + 0.25vw, 1rem);
        --planner-control-height: clamp(2.1rem, 1.92rem + 0.35vw, 2.45rem);
        --planner-day-width: clamp(2.75rem, 2.45rem + 0.35vw, 3.5rem);
        --planner-row-height: clamp(3.35rem, 3.05rem + 0.55vw, 4.15rem);
        --planner-sidebar-width: clamp(18.75rem, 22vw, 22.5rem);
        --attendance-row-height: var(--planner-row-height);
        --attendance-id-width: 5.2rem;
        --attendance-employee-width: clamp(13.5rem, 17vw, 17.5rem);
        --attendance-day-width: var(--planner-day-width);
        --attendance-action-width: 6.95rem;
        color: var(--planner-ink);
        padding-bottom: 2rem;
        padding-left: clamp(0.55rem, 0.35rem + 0.7vw, 1rem);
        padding-right: clamp(0.55rem, 0.35rem + 0.7vw, 1rem);
    }

    .workforce-planner > * + * {
        margin-top: var(--planner-compact-gap);
    }

    .planner-section-eyebrow,
    .planner-hero__eyebrow {
        margin: 0 0 0.3rem;
        color: #6e7f93;
        font-size: 0.74rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .planner-alert {
        border: 0;
        border-radius: 1rem;
        box-shadow: 0 12px 24px rgba(17, 35, 56, 0.07);
    }

    .planner-hero {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: var(--planner-compact-gap);
        padding: clamp(0.9rem, 0.78rem + 0.55vw, 1.25rem);
        border: 1px solid rgba(202, 217, 234, 0.65);
        border-radius: var(--planner-card-radius);
        background:
            radial-gradient(circle at top right, rgba(173, 214, 255, 0.34), transparent 32%),
            linear-gradient(135deg, #0f2747 0%, #184774 54%, #f4f9ff 180%);
        box-shadow: var(--planner-shadow);
        color: #f8fbff;
    }

    .planner-hero__main,
    .planner-hero__branding {
        display: flex;
        gap: clamp(0.75rem, 0.68rem + 0.3vw, 1rem);
        min-width: 0;
    }

    .planner-hero__main {
        flex: 1 1 auto;
        flex-direction: column;
    }

    .planner-hero__logo {
        width: clamp(3rem, 2.6rem + 0.9vw, 3.75rem);
        height: clamp(3rem, 2.6rem + 0.9vw, 3.75rem);
        border-radius: 0.8rem;
        background: rgba(255, 255, 255, 0.92);
        object-fit: contain;
        padding: 0.55rem;
        box-shadow: 0 10px 24px rgba(8, 23, 42, 0.18);
    }

    .planner-hero__logo--fallback {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: #0f2747;
        font-size: 1.35rem;
        font-weight: 700;
    }

    .planner-hero__copy {
        min-width: 0;
        max-width: 58rem;
    }

    .planner-hero__copy h1 {
        margin: 0;
        font-size: clamp(1.35rem, 1.1rem + 0.85vw, 2rem);
        line-height: 1.12;
        letter-spacing: -0.015em;
    }

    .planner-hero__lead {
        max-width: 46rem;
        margin: 0.42rem 0 0;
        color: rgba(245, 250, 255, 0.84);
        font-size: clamp(0.82rem, 0.78rem + 0.2vw, 0.95rem);
        line-height: 1.42;
    }

    .planner-hero__chips,
    .planner-hero__actions,
    .planner-board__actions,
    .planner-summary-badges,
    .planner-workflow__actions {
        display: flex;
        flex-wrap: wrap;
        gap: 0.45rem;
    }

    .planner-chip {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        min-height: 1.9rem;
        padding: 0.28rem 0.62rem;
        border-radius: 999px;
        font-size: clamp(0.72rem, 0.68rem + 0.16vw, 0.82rem);
        font-weight: 600;
        white-space: nowrap;
    }

    .planner-chip--glass {
        background: rgba(255, 255, 255, 0.12);
        color: #ffffff;
        border: 1px solid rgba(255, 255, 255, 0.16);
        backdrop-filter: blur(10px);
    }

    .planner-chip--success,
    .planner-side-card__badge--success {
        background: rgba(226, 247, 236, 0.18);
        color: #d6ffe9;
        border: 1px solid rgba(214, 255, 233, 0.2);
    }

    .planner-chip--warning,
    .planner-side-card__badge--warning {
        background: rgba(255, 224, 161, 0.18);
        color: #fff1d2;
        border: 1px solid rgba(255, 224, 161, 0.22);
    }

    .planner-chip--soft {
        background: var(--planner-primary-soft);
        color: var(--planner-primary-strong);
        border: 1px solid #c7dcf3;
    }

    .planner-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.42rem;
        min-height: var(--planner-control-height);
        padding: 0.42rem 0.72rem;
        border-radius: 0.7rem;
        border: 1px solid transparent;
        font-size: clamp(0.78rem, 0.74rem + 0.14vw, 0.9rem);
        font-weight: 600;
        transition: transform 0.15s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
    }

    .planner-btn:hover,
    .planner-btn:focus-visible,
    .planner-row-action:hover,
    .planner-row-action:focus-visible,
    .planner-view-toggle__button:hover,
    .planner-view-toggle__button:focus-visible {
        transform: translateY(-1px);
        box-shadow: 0 12px 24px rgba(17, 35, 56, 0.1);
    }

    .planner-btn--primary {
        background: var(--planner-primary);
        border-color: var(--planner-primary);
        color: #ffffff;
    }

    .planner-btn--primary:hover,
    .planner-btn--primary:focus-visible {
        background: var(--planner-primary-strong);
        border-color: var(--planner-primary-strong);
        color: #ffffff;
    }

    .planner-btn--secondary,
    .planner-view-toggle__button,
    .planner-row-action--ghost {
        background: var(--planner-surface);
        border-color: var(--planner-border);
        color: var(--planner-ink);
    }

    .planner-btn--secondary:hover,
    .planner-btn--ghost:hover,
    .planner-view-toggle__button:hover,
    .planner-row-action--ghost:hover {
        border-color: var(--planner-border-strong);
        background: #f8fbff;
    }

    .planner-btn--ghost {
        background: transparent;
        border-color: var(--planner-border);
        color: #38536f;
    }

    .planner-btn--ghost:hover,
    .planner-btn--ghost:focus-visible {
        background: #f7fbff;
        border-color: var(--planner-border-strong);
        color: #12385e;
    }

    .planner-hero .planner-btn--primary {
        background: #ffffff;
        border-color: #ffffff;
        color: #11345a;
    }

    .planner-hero .planner-btn--primary:hover,
    .planner-hero .planner-btn--primary:focus-visible {
        background: #f5faff;
        color: #0b2d4e;
    }

    .planner-hero .planner-btn--secondary,
    .planner-hero .planner-btn--ghost {
        background: rgba(255, 255, 255, 0.14);
        border-color: rgba(255, 255, 255, 0.22);
        color: #ffffff;
    }

    .planner-hero .planner-btn--secondary:hover,
    .planner-hero .planner-btn--secondary:focus-visible,
    .planner-hero .planner-btn--ghost:hover,
    .planner-hero .planner-btn--ghost:focus-visible {
        background: rgba(255, 255, 255, 0.2);
        color: #ffffff;
    }

    .planner-btn[disabled],
    .planner-row-action[disabled],
    .planner-view-toggle__button[disabled] {
        opacity: 0.58;
        pointer-events: none;
        box-shadow: none;
        transform: none;
    }

    .planner-control-panel,
    .planner-board,
    .planner-side-card,
    .planner-kpi-card {
        border: 1px solid var(--planner-border);
        border-radius: var(--planner-card-radius);
        background: var(--planner-surface);
        box-shadow: var(--planner-shadow);
    }

    .planner-control-panel {
        padding: clamp(0.8rem, 0.72rem + 0.3vw, 1rem);
    }

    .planner-control-panel__header,
    .planner-board__header,
    .planner-side-card__header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 0.75rem;
        min-width: 0;
    }

    .planner-control-panel__header h2,
    .planner-board__header h2,
    .planner-side-card__header h3 {
        margin: 0;
        color: var(--planner-ink);
        font-size: clamp(1rem, 0.94rem + 0.3vw, 1.24rem);
    }

    .planner-control-panel__header p:not(.planner-section-eyebrow),
    .planner-board__header p:not(.planner-section-eyebrow),
    .planner-side-card__header p:not(.planner-section-eyebrow) {
        color: var(--planner-muted);
    }

    .planner-view-toggle {
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        gap: 0.25rem;
        padding: 0.2rem;
        border-radius: 999px;
        background: #edf3f9;
        border: 1px solid #dbe5f0;
    }

    .planner-view-toggle__button {
        min-width: 5.8rem;
        min-height: 2rem;
        border-radius: 999px;
        padding: 0.35rem 0.65rem;
        font-size: 0.82rem;
    }

    .planner-view-toggle__button.is-active {
        background: var(--planner-primary);
        color: #ffffff;
        border-color: var(--planner-primary);
        box-shadow: 0 10px 18px rgba(21, 90, 156, 0.2);
    }

    .planner-toggle-button {
        min-height: 2rem;
        gap: 0.45rem;
        white-space: nowrap;
    }

    .planner-toggle-button__icon {
        font-size: 0.82rem;
    }

    .planner-filters {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
        gap: 0.65rem;
        margin-top: 0.75rem;
    }

    .planner-filters__field {
        min-width: 0;
    }

    .planner-filters .form-label {
        margin-bottom: 0.25rem;
        color: var(--planner-muted);
        font-size: 0.76rem;
        font-weight: 600;
    }

    .planner-filters .form-control,
    .planner-filters .form-select,
    .planner-drawer .form-control,
    .planner-drawer .form-select {
        min-height: var(--planner-control-height);
        border-color: #cfdae8;
        border-radius: 0.7rem;
        box-shadow: none;
        font-size: 0.86rem;
    }

    .planner-search-input {
        position: relative;
    }

    .planner-search-input i {
        position: absolute;
        top: 50%;
        left: 0.95rem;
        transform: translateY(-50%);
        color: #6f8094;
        pointer-events: none;
    }

    .planner-search-input .form-control {
        padding-left: 2.65rem;
    }

    .planner-kpis {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 0.65rem;
    }

    .planner-kpi-card {
        padding: clamp(0.58rem, 0.5rem + 0.25vw, 0.8rem);
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 0.18rem;
        min-height: clamp(4.85rem, 4.25rem + 0.9vw, 5.8rem);
        background:
            linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    }

    .planner-kpi-card__label,
    .planner-kpi-card__meta {
        color: var(--planner-muted);
    }

    .planner-kpi-card__label {
        font-size: clamp(0.66rem, 0.62rem + 0.14vw, 0.74rem);
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }

    .planner-kpi-card strong {
        font-size: clamp(1.15rem, 0.95rem + 0.55vw, 1.62rem);
        line-height: 1.05;
        letter-spacing: -0.015em;
        color: var(--planner-ink);
    }

    .planner-kpi-card__meta {
        font-size: clamp(0.68rem, 0.64rem + 0.12vw, 0.78rem);
        line-height: 1.28;
    }

    .planner-shell {
        display: grid;
        grid-template-columns: minmax(0, 1fr) var(--planner-sidebar-width);
        gap: var(--planner-compact-gap);
        align-items: start;
    }

    .planner-shell.is-sidebar-collapsed {
        grid-template-columns: minmax(0, 1fr);
    }

    .planner-shell.is-sidebar-collapsed .planner-shell__sidebar {
        display: none;
    }

    .planner-shell__main {
        display: grid;
        gap: var(--planner-compact-gap);
        min-width: 0;
    }

    .planner-shell__sidebar {
        display: grid;
        gap: 0.65rem;
        min-width: 0;
        position: static;
        align-self: start;
    }

    .planner-board {
        min-width: 0;
        padding: clamp(0.75rem, 0.65rem + 0.35vw, 1rem);
    }

    .planner-summary-actions {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 0.65rem;
        flex-wrap: wrap;
    }

    .planner-summary-content {
        margin-top: 0.7rem;
    }

    .planner-board--summary.is-collapsed .planner-summary-content {
        display: none;
    }

    .planner-board__body {
        margin-top: 0.65rem;
        position: relative;
        min-width: 0;
    }

    .planner-selection-banner {
        margin-top: 0.65rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.65rem;
        padding: 0.55rem 0.7rem;
        border-radius: 0.75rem;
        border: 1px solid #dbe6f2;
        background: linear-gradient(180deg, #f8fbff 0%, #f2f7fd 100%);
    }

    .planner-selection-banner__copy,
    .planner-selection-banner__actions {
        display: flex;
        align-items: center;
        gap: 0.45rem;
        flex-wrap: wrap;
    }

    .planner-selection-banner__copy span,
    .planner-selection-banner__count {
        color: var(--planner-muted);
        font-size: 0.78rem;
    }

    .planner-empty-state {
        min-height: 16rem;
        display: grid;
        place-items: center;
        gap: 0.8rem;
        padding: 2rem;
        border: 1px dashed #c9d7e6;
        border-radius: 1.25rem;
        background: #f8fbff;
        text-align: center;
        color: var(--planner-muted);
    }

    .planner-empty-state__icon {
        width: 4rem;
        height: 4rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 1.25rem;
        background: #e6f0fa;
        color: var(--planner-primary);
        font-size: 1.35rem;
    }

    .planner-table-wrap,
    .planner-summary-table-wrap {
        position: relative;
        border: 1px solid #d7e2ee;
        border-radius: 0.8rem;
        background: var(--planner-surface);
        overflow: auto;
        max-height: min(72vh, 46rem);
        max-width: 100%;
        min-width: 0;
        overscroll-behavior: contain;
        overscroll-behavior-x: contain;
        scrollbar-gutter: stable both-edges;
    }

    .planner-table-wrap::after {
        content: "";
        position: sticky;
        right: 0;
        top: 0;
        z-index: 8;
        width: 0.65rem;
        height: 100%;
        float: right;
        background: linear-gradient(270deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0));
        pointer-events: none;
    }

    .attendance-table {
        margin-bottom: 0;
        min-width: max-content;
        width: max-content;
        border-collapse: separate;
        border-spacing: 0;
        font-size: clamp(0.74rem, 0.7rem + 0.12vw, 0.82rem);
        color: var(--planner-ink);
        background: #ffffff;
    }

.attendance-table th,
.attendance-table td {
  padding: var(--attendance-cell-padding);
  height: var(--attendance-row-height);
  min-height: var(--attendance-row-height);
  border-color: #d9e2ec !important;
  white-space: nowrap;
}

    .attendance-table thead th {
        position: sticky;
        top: 0;
        z-index: 6;
        background: #173a63;
        color: #ffffff;
        border-bottom-width: 0;
        box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08);
    }

.attendance-table__day-header {
  min-width: var(--attendance-day-width);
  width: var(--attendance-day-width);
  max-width: var(--attendance-day-width);
  text-align: center;
  padding: var(--attendance-cell-padding) !important;
}

    .attendance-table__day-number,
    .attendance-table__day-weekday {
        display: block;
    }

    .attendance-table__day-number {
        font-size: clamp(0.78rem, 0.74rem + 0.18vw, 0.92rem);
        font-weight: 700;
        line-height: 1.1;
    }

    .attendance-table__day-weekday {
        margin-top: 0.06rem;
        color: rgba(255, 255, 255, 0.8);
        font-size: clamp(0.55rem, 0.52rem + 0.12vw, 0.66rem);
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }

    .attendance-table__sticky-id,
    .attendance-table__sticky-name,
    .attendance-table__sticky-action {
        position: sticky;
        background: #ffffff;
    }

    .attendance-table__sticky-id {
        left: 0;
        z-index: 5;
        min-width: var(--attendance-id-width);
        width: var(--attendance-id-width);
        max-width: var(--attendance-id-width);
        box-shadow: 1px 0 0 #d7e2ee;
        background: #fbfdff;
    }

    .attendance-table__sticky-name {
        left: var(--attendance-id-width);
        z-index: 5;
        min-width: var(--attendance-employee-width);
        width: var(--attendance-employee-width);
        max-width: var(--attendance-employee-width);
        box-shadow: 1px 0 0 #d7e2ee;
        background: #ffffff;
    }

    .attendance-table__sticky-action {
        right: 0;
        z-index: 5;
        min-width: var(--attendance-action-width);
        width: var(--attendance-action-width);
        max-width: var(--attendance-action-width);
        box-shadow: -1px 0 0 #d7e2ee;
        background: #ffffff;
        text-align: center;
    }

    .attendance-table thead .attendance-table__sticky-id,
    .attendance-table thead .attendance-table__sticky-name,
    .attendance-table thead .attendance-table__sticky-action {
        z-index: 7;
        background: #173a63;
        color: #ffffff;
    }

    .planner-employee-row[hidden] {
        display: none !important;
    }

    .planner-employee-id {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 3.75rem;
        padding: 0.22rem 0.38rem;
        border-radius: 999px;
        background: #e8f0f8;
        color: #12385e;
        font-weight: 700;
        letter-spacing: 0.01em;
    }

    .planner-employee-cell {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 0.45rem;
        min-width: 0;
    }

    .planner-employee-cell__main,
    .planner-employee-cell__meta {
        display: flex;
        min-width: 0;
    }

    .planner-employee-cell__main {
        flex: 1 1 auto;
        flex-direction: column;
        gap: 0.18rem;
    }

    .planner-employee-cell__meta {
        flex-wrap: wrap;
        gap: 0.25rem 0.4rem;
    }

    .planner-employee-cell__meta span {
        color: var(--planner-muted);
        font-size: 0.72rem;
    }

.shift-cell {
  min-width: var(--attendance-day-width);
  width: var(--attendance-day-width);
  max-width: var(--attendance-day-width);
  height: var(--attendance-row-height);
  padding: var(--attendance-cell-padding) !important;
  text-align: center;
  font-weight: 700;
  vertical-align: middle;
  cursor: pointer;
}

.shift-display {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: clamp(1.75rem, 1.55rem + 0.45vw, 2.12rem);
  padding: 0.22rem;
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.16);
  font-size: clamp(0.68rem, 0.64rem + 0.14vw, 0.78rem);
  letter-spacing: 0.01em;
}

    .shift-cell--selected .shift-display {
        background: rgba(255, 255, 255, 0.32);
    }

    .planner-row-actions {
        display: grid;
        grid-template-columns: repeat(3, minmax(1.8rem, 1fr));
        gap: 0.28rem;
    }

    .planner-row-actions--compact {
        grid-template-columns: repeat(3, minmax(0, 2rem));
        justify-content: center;
        gap: 0.32rem;
    }

    .planner-row-action {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.25rem;
        width: 100%;
        min-height: 1.85rem;
        padding: 0.28rem 0.35rem;
        border-radius: 0.55rem;
        border: 1px solid var(--planner-border);
        font-size: 0.72rem;
        font-weight: 700;
        transition: transform 0.15s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
    }

    .planner-row-action__label {
        display: inline;
    }

    .planner-row-action--icon {
        width: 2rem;
        min-width: 2rem;
        min-height: 2rem;
        padding: 0;
        border-radius: 0.7rem;
        gap: 0;
        box-shadow: 0 6px 14px rgba(17, 35, 56, 0.08);
    }

    .planner-row-action--icon i {
        font-size: 0.88rem;
    }

    .planner-row-action--primary {
        background: #123d68;
        border-color: #123d68;
        color: #ffffff;
    }

    .planner-row-action--primary:hover,
    .planner-row-action--primary:focus-visible {
        background: #0f3457;
        color: #ffffff;
    }

    .planner-list-view {
        display: grid;
        gap: 1rem;
    }

    .planner-list-card {
        border: 1px solid #d7e3ef;
        border-radius: 1.15rem;
        background: #ffffff;
        box-shadow: 0 12px 28px rgba(17, 35, 56, 0.06);
        overflow: hidden;
    }

    .planner-list-card__header,
    .planner-list-card__footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        padding: 1rem 1.1rem;
    }

    .planner-list-card__header {
        border-bottom: 1px solid #e4ecf5;
    }

    .planner-list-card__identity {
        display: flex;
        align-items: center;
        gap: 0.85rem;
        min-width: 0;
    }

    .planner-list-card__avatar {
        flex: 0 0 3rem;
        width: 3rem;
        height: 3rem;
        border-radius: 0.95rem;
        background: linear-gradient(135deg, #dbeaf9, #eff6fd);
        color: #0f416f;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 0.98rem;
        font-weight: 800;
        overflow: hidden;
    }

    .planner-list-card__avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .planner-list-card__identity h3 {
        margin: 0;
        font-size: 1rem;
    }

    .planner-list-card__meta,
    .planner-list-card__stats {
        display: flex;
        flex-wrap: wrap;
        gap: 0.35rem 0.65rem;
        color: var(--planner-muted);
        font-size: 0.83rem;
    }

    .planner-list-card__body {
        padding: 1rem 1.1rem;
    }

    .planner-list-card__timeline {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(6.3rem, 1fr));
        gap: 0.65rem;
    }

    .planner-list-card__day {
        appearance: none;
        display: flex;
        flex-direction: column;
        gap: 0.35rem;
        padding: 0.72rem 0.75rem;
        border-radius: 0.95rem;
        border: 1px solid #dfe8f2;
        background: #f8fbff;
        text-align: left;
        cursor: pointer;
    }

    .planner-list-card__day-label {
        color: var(--planner-muted);
        font-size: 0.76rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }

    .planner-list-card__shift {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 2rem;
        padding: 0.35rem 0.55rem;
        border-radius: 0.75rem;
        font-weight: 700;
        font-size: 0.82rem;
    }

    .planner-list-card__shift--empty {
        background: #f0f3f7;
        color: #77879a;
    }

    .planner-list-card__day-meta {
        color: var(--planner-muted);
        font-size: 0.77rem;
        line-height: 1.35;
    }

    .planner-list-card__footer {
        border-top: 1px solid #e4ecf5;
        background: #fbfdff;
    }

    .planner-list-card__actions {
        display: flex;
        flex-wrap: wrap;
        gap: 0.6rem;
    }

    .planner-summary-table {
        margin-bottom: 0;
        min-width: max-content;
        width: max-content;
        font-size: clamp(0.68rem, 0.64rem + 0.12vw, 0.78rem);
    }

    .planner-summary-table th,
    .planner-summary-table td {
        min-width: 3rem;
        padding: 0.28rem 0.38rem !important;
        line-height: 1.2;
        white-space: nowrap;
    }

    .planner-summary-table th:first-child,
    .planner-summary-table td:first-child {
        min-width: 11.5rem;
    }

    .planner-summary-table th:last-child,
    .planner-summary-table td:last-child {
        min-width: 5.2rem;
    }

    .planner-summary-table thead th {
        position: sticky;
        top: 0;
        z-index: 2;
        background: #eff4fa;
        vertical-align: top;
    }

    .planner-summary-table__shift-heading {
        min-width: 11.5rem;
    }

    .planner-summary-table__date-heading,
    .planner-summary-table__total-heading {
        min-width: 6.9rem;
    }

    .planner-summary-table__shift-cell {
        min-width: 11.5rem;
        white-space: normal;
    }

    .planner-summary-table__heading-label {
        display: block;
        color: #6b7d90;
        font-size: 0.68rem;
        font-weight: 700;
        letter-spacing: 0.05em;
        text-transform: uppercase;
    }

    .planner-summary-table__heading-value {
        display: block;
        margin-top: 0.16rem;
        color: var(--planner-ink);
        font-weight: 800;
    }

    .planner-summary-shift-column {
        display: grid;
        justify-items: start;
        gap: 0.24rem;
        min-width: 6.8rem;
    }

    .planner-summary-shift-column__badge {
        min-height: 1.55rem;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .planner-summary-shift-column__name {
        color: var(--planner-ink);
        font-weight: 800;
        line-height: 1.2;
        white-space: normal;
    }

    .planner-summary-shift-column__kind {
        color: var(--planner-muted);
        font-size: 0.68rem;
        line-height: 1.2;
        white-space: normal;
    }

    .planner-summary-table__date-cell {
        display: grid;
        gap: 0.12rem;
    }

    .planner-summary-table__date-cell span {
        color: var(--planner-muted);
        font-size: 0.68rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    .planner-summary-table tbody tr.is-under {
        background: #fff8e5;
    }

    .planner-summary-table tbody tr.is-over {
        background: #eef8f2;
    }

    .planner-summary-table tbody th:first-child,
    .planner-summary-table thead th:first-child {
        position: sticky;
        left: 0;
    }

    .planner-summary-table thead th:first-child {
        z-index: 4;
        background: #eff4fa;
    }

    .planner-summary-table tbody th:first-child {
        z-index: 3;
    }

    .planner-summary-table tbody th:first-child {
        background: #ffffff;
        box-shadow: 1px 0 0 #d7e2ee;
    }

    .planner-side-card {
        min-width: 0;
        padding: clamp(0.7rem, 0.62rem + 0.25vw, 0.9rem);
    }

    .planner-side-card.is-collapsed {
        padding-bottom: clamp(0.6rem, 0.56rem + 0.16vw, 0.78rem);
    }

    .planner-side-card__badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 2.55rem;
        min-height: 1.65rem;
        padding: 0.22rem 0.48rem;
        border-radius: 999px;
        background: #eaf1f8;
        color: #35506d;
        font-size: 0.7rem;
        font-weight: 800;
        border: 1px solid #d7e2ee;
    }

    .planner-side-card__badge--neutral {
        background: #f4f6f9;
        color: #516072;
    }

    .planner-side-card__badge--warning {
        background: #fff4d6;
        color: #845400;
        border-color: #efd79a;
    }

    .planner-side-card__badge--success {
        background: #e7f6ef;
        color: #1f7a56;
        border-color: #c9e7d7;
    }

    .planner-side-card__actions {
        display: inline-flex;
        align-items: center;
        justify-content: flex-end;
        gap: 0.45rem;
        flex-wrap: wrap;
        flex-shrink: 0;
    }

    .planner-side-card__toggle {
        width: 2rem;
        min-width: 2rem;
        min-height: 2rem;
        padding: 0;
        border-radius: 999px;
    }

    .planner-side-card__toggle .planner-toggle-button__icon {
        transition: transform 0.18s ease;
    }

    .planner-side-card.is-collapsed .planner-side-card__toggle .planner-toggle-button__icon {
        transform: translateX(0.04rem);
    }

    .planner-side-card__content {
        min-width: 0;
    }

    .planner-side-card__list,
    .planner-drawer__list,
    .planner-legend {
        display: grid;
        gap: 0.5rem;
        margin-top: 0.62rem;
    }

    .planner-insight-item,
    .planner-legend__item {
        display: grid;
        gap: 0.12rem;
        padding: 0.55rem 0.62rem;
        border: 1px solid #e1e9f3;
        border-radius: 0.7rem;
        background: #fbfdff;
    }

    .planner-insight-item strong,
    .planner-legend__item strong {
        color: var(--planner-ink);
    }

    .planner-insight-item span,
    .planner-legend__item span,
    .planner-workflow__copy,
    .planner-workflow__meta {
        color: var(--planner-muted);
        font-size: 0.78rem;
        line-height: 1.35;
    }

    .planner-legend__item {
        grid-template-columns: auto 1fr;
        align-items: center;
        gap: 0.5rem;
    }

    .planner-workflow {
        margin-top: 0.62rem;
        display: grid;
        gap: 0.55rem;
    }

    .planner-workflow__copy {
        margin: 0;
    }

    .planner-workflow__meta {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .planner-drawer-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1040;
        background: rgba(15, 23, 42, 0.42);
        opacity: 0;
        transition: opacity 0.18s ease;
    }

    .planner-drawer-backdrop.is-open {
        opacity: 1;
    }

    .planner-drawer {
        position: fixed;
        top: 0;
        right: 0;
        z-index: 1050;
        width: min(30rem, 100vw);
        height: 100vh;
        display: flex;
        flex-direction: column;
        background: #ffffff;
        border-left: 1px solid #d9e3ee;
        box-shadow: -18px 0 36px rgba(15, 23, 42, 0.14);
        transform: translateX(100%);
        transition: transform 0.2s ease;
    }

    .planner-drawer.is-open {
        transform: translateX(0);
    }

    .planner-drawer__header,
    .planner-drawer__body {
        padding: 1.2rem 1.2rem 1rem;
    }

    .planner-drawer__header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 1rem;
        border-bottom: 1px solid #e3ebf4;
    }

    .planner-drawer__header h2 {
        margin: 0;
        font-size: 1.45rem;
    }

    .planner-drawer__meta {
        margin: 0.35rem 0 0;
        color: var(--planner-muted);
    }

    .planner-drawer__close {
        width: 2.5rem;
        height: 2.5rem;
        border: 0;
        border-radius: 999px;
        background: #eef4fa;
        color: #38536f;
    }

    .planner-drawer__body {
        overflow: auto;
        display: grid;
        gap: 1rem;
    }

    .planner-drawer__summary {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.8rem;
    }

    .planner-drawer__summary-card {
        padding: 0.95rem 1rem;
        border-radius: 1rem;
        border: 1px solid #dce6f0;
        background: #f8fbff;
    }

    .planner-drawer__summary-card span {
        display: block;
        color: var(--planner-muted);
        font-size: 0.82rem;
        margin-bottom: 0.3rem;
    }

    .planner-drawer__summary-card strong {
        font-size: 1.2rem;
        color: var(--planner-ink);
    }

    .planner-drawer__field-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.85rem;
    }

    .planner-drawer__field {
        min-width: 0;
    }

    .planner-drawer__actions {
        display: flex;
        flex-wrap: wrap;
        gap: 0.7rem;
    }

    .planner-drawer__section {
        display: grid;
        gap: 0.6rem;
    }

    @@media print {
        body.attendance-page .planner-hero,
        body.attendance-page .planner-control-panel,
        body.attendance-page .planner-shell__sidebar,
        body.attendance-page .planner-drawer,
        body.attendance-page .planner-drawer-backdrop {
            box-shadow: none !important;
            border-color: #d5dce4 !important;
        }
    }

    @@media (min-width: 1280px) {
        .planner-shell__sidebar {
            position: sticky;
            top: 0.75rem;
            max-height: calc(100vh - 1.5rem);
            overflow: auto;
            padding-right: 0.1rem;
        }
    }

    @@media (max-width: 1535.98px) {
        .workforce-planner {
            --planner-day-width: clamp(2.65rem, 2.42rem + 0.24vw, 3.15rem);
            --planner-row-height: clamp(3.25rem, 3rem + 0.35vw, 3.85rem);
            --planner-sidebar-width: clamp(18.5rem, 21vw, 21rem);
        }

        .planner-row-action__label {
            display: none;
        }

        .attendance-table {
            --attendance-employee-width: clamp(12.5rem, 16vw, 15rem);
            --attendance-action-width: 6.75rem;
        }
    }

    @@media (max-width: 1199.98px) {
        body.attendance-page.auth-shell .app-topbar.d-md-none {
            display: flex !important;
        }

        body.attendance-page.auth-shell .app-sidebar.d-md-block:not(.show) {
            display: none !important;
        }

        body.attendance-page.auth-shell .app-sidebar.d-md-block.show {
            display: block !important;
        }

        body.attendance-page.auth-shell .app-main,
        body.attendance-page.auth-shell .app-footer {
            margin-left: 0;
            width: 100%;
        }

        .planner-shell {
            grid-template-columns: 1fr;
        }

        .planner-shell__sidebar {
            position: static;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            align-items: stretch;
        }
    }

    @@media (min-width: 768px) and (max-width: 1023.98px) {
        .planner-app-layout {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }
    }

    @@media (max-width: 991.98px) {
        .workforce-planner {
            --planner-day-width: 2.75rem;
            --planner-row-height: 3.35rem;
        }

        .planner-hero,
        .planner-control-panel__header,
        .planner-board__header,
        .planner-selection-banner {
            flex-direction: column;
        }

        .planner-summary-actions {
            width: 100%;
            align-items: stretch;
            justify-content: stretch;
        }

        .planner-hero__branding,
        .planner-hero__main {
            width: 100%;
        }

        .planner-drawer__field-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .attendance-table {
            --attendance-id-width: 4.5rem;
            --attendance-employee-width: 12rem;
            --attendance-action-width: 6rem;
        }

        .planner-side-card__header {
            gap: 0.55rem;
        }

        .planner-side-card__actions {
            width: 100%;
            justify-content: space-between;
        }

        .planner-shell__sidebar {
            grid-template-columns: 1fr;
        }
    }

    @@media (max-width: 767.98px) {
        html,
        body.attendance-page {
            overflow-x: hidden;
        }

        body.attendance-page .container-fluid,
        body.attendance-page .workforce-planner,
        body.attendance-page .planner-hero,
        body.attendance-page .planner-control-panel,
        body.attendance-page .planner-kpis,
        body.attendance-page .planner-shell,
        body.attendance-page .planner-app-view,
        body.attendance-page .planner-board,
        body.attendance-page .planner-side-card,
        body.attendance-page .planner-app-panel {
            width: 100%;
            max-width: 100%;
            box-sizing: border-box;
        }

        .workforce-planner {
            --planner-day-width: 2.2rem;
            --planner-row-height: 3rem;
            padding-left: 0;
            padding-right: 0;
        }

        .planner-hero {
            padding: 1rem;
        }

        .planner-hero__branding,
        .planner-hero__actions,
        .planner-control-panel__header,
        .planner-board__header,
        .planner-selection-banner,
        .planner-app-panel__header {
            flex-direction: column;
            align-items: stretch;
        }

        .planner-hero__actions .planner-btn,
        .planner-board__actions .planner-btn,
        .planner-selection-banner__actions .planner-btn {
            width: 100%;
            min-width: 0;
        }

        .planner-hero__actions,
        .planner-board__actions,
        .planner-selection-banner__actions {
            width: 100%;
        }

        .planner-kpis {
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 0.6rem;
        }

        .planner-kpi-card {
            padding: 0.8rem 0.75rem;
            min-width: 0;
        }

        .planner-kpi-card__label {
            font-size: 0.72rem;
        }

        .planner-kpi-card strong {
            font-size: 1.35rem;
            line-height: 1.05;
        }

        .planner-kpi-card__meta {
            font-size: 0.72rem;
        }

        .planner-control-panel,
        .planner-board,
        .planner-side-card,
        .planner-app-panel {
            padding-left: 0.8rem;
            padding-right: 0.8rem;
            border-radius: 1rem;
        }

        .planner-app-layout {
            grid-template-columns: 1fr;
        }

        .planner-view-toggle {
            display: none;
        }

        .planner-shell__sidebar {
            gap: 0.75rem;
        }

        .planner-app-view {
            display: none !important;
        }

        .planner-app-metric {
            padding: 0.8rem 0.75rem;
        }

        .planner-app-metric span {
            font-size: 0.72rem;
        }

        .planner-app-metric strong {
            font-size: 1.15rem;
        }

        .planner-app-layout,
        .planner-app-employee-list,
        .planner-app-week,
        .planner-app-timeline,
        .planner-app-open-shifts {
            grid-template-columns: 1fr;
            gap: 0.6rem;
        }

        .planner-mobile-timeline__card {
            display: grid;
            gap: 0.45rem;
            padding: 0.85rem;
            border-radius: 0.95rem;
            border: 1px solid #dbe5ef;
            background: #fff;
        }

        .planner-mobile-timeline__card-header,
        .planner-mobile-timeline__body {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.75rem;
        }

        .planner-mobile-timeline__day {
            display: block;
            font-size: 0.72rem;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: #6b7280;
        }

        .planner-mobile-timeline__badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 3rem;
            padding: 0.35rem 0.55rem;
            border-radius: 999px;
            background: #eef4ff;
            color: #1d4ed8;
            font-size: 0.78rem;
            font-weight: 700;
        }

        .planner-mobile-timeline__body {
            color: #4b5563;
            font-size: 0.82rem;
        }

        .planner-mobile-timeline__action {
            padding: 0.35rem 0.7rem;
            font-size: 0.8rem;
        }

        .planner-view-toggle,
        .planner-shell,
        .planner-board,
        .planner-summary-content,
        .planner-summary-table-wrap,
        .planner-calendar-view,
        .planner-table-wrap {
            display: none !important;
        }
    }

    @@media print {
        body.attendance-page .app-topbar,
        body.attendance-page .sidebar,
        body.attendance-page .app-menu-toggle,
        body.attendance-page .attendance-print-hide,
        body.attendance-page .modal,
        body.attendance-page .btn-close {
            display: none !important;
        }

        body.attendance-page .app-main {
            padding: 0 !important;
        }

        body.attendance-page .container-fluid {
            margin-top: 0 !important;
            padding-left: 0 !important;
            padding-right: 0 !important;
        }

        body.attendance-page .attendance-table {
            font-size: 0.72rem;
        }

        body.attendance-page .attendance-table .btn {
            display: none !important;
        }
    }

    @@media (max-width: 575.98px) {
        .employee-hover-card {
            width: min(24rem, calc(100vw - 1rem));
        }

        .employee-hover-card__header {
            gap: 0.8rem;
        }

        .employee-hover-card__avatar,
        .employee-hover-card__avatar-fallback {
            flex-basis: 4.5rem;
            width: 4.5rem;
            height: 4.5rem;
        }

        .employee-hover-card__identity h3 {
            font-size: 1.5rem;
        }
    }

