:root {
    --portal-ink: #172033;
    --portal-muted: #667085;
    --portal-border: #e4e7ec;
    --portal-surface: #ffffff;
    --portal-page: #f6f8fb;
    --portal-accent: #e79a21;
}

body {
    min-width: 320px;
    background: var(--portal-page);
    color: var(--portal-ink);
}

.portal-combobox {
    position: relative;
}

.portal-combobox .form-control {
    padding-right: 2.65rem;
}

.portal-combobox-toggle {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 2.5rem;
    border: 0;
    border-radius: 0 0.375rem 0.375rem 0;
    background: transparent;
    color: #667085;
}

.portal-combobox-toggle:hover,
.portal-combobox-toggle:focus-visible {
    background: #f2f4f7;
    color: #344054;
}

.portal-combobox-menu {
    position: absolute;
    z-index: 1090;
    top: calc(100% + 0.3rem);
    left: 0;
    display: none;
    width: 100%;
    max-height: min(17rem, 42vh);
    overflow-y: auto;
    padding: 0.3rem;
    border: 1px solid #d0d5dd;
    border-radius: 0.5rem;
    background: #fff;
    box-shadow: 0 0.75rem 1.75rem rgba(16, 24, 40, 0.16);
}

.portal-combobox.is-open .portal-combobox-menu {
    display: block;
}

.portal-combobox-option {
    display: block;
    width: 100%;
    padding: 0.55rem 0.65rem;
    border: 0;
    border-radius: 0.35rem;
    background: transparent;
    color: var(--portal-ink);
    text-align: left;
}

.portal-combobox-option:hover,
.portal-combobox-option:focus-visible,
.portal-combobox-option.is-selected {
    outline: 0;
    background: #edf4ff;
}

.portal-combobox-option-title,
.portal-combobox-option-meta {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-combobox-option-title {
    font-size: 0.91rem;
    font-weight: 700;
}

.portal-combobox-option-meta {
    margin-top: 0.12rem;
    color: #667085;
    font-size: 0.78rem;
}

.portal-combobox-option-new {
    margin-top: 0.3rem;
    border-top: 1px solid #d0d5dd;
    border-radius: 0;
    color: #0d6efd;
}

.portal-combobox-option-new .portal-combobox-option-meta {
    color: #5b7bb5;
}

.portal-combobox-empty {
    padding: 0.7rem;
    color: #667085;
    font-size: 0.82rem;
}

.portal-nav {
    box-shadow: 0 2px 14px rgba(16, 24, 40, 0.16);
}

.portal-nav-inner {
    max-width: 1680px;
    padding-inline: clamp(1rem, 2.5vw, 2.5rem);
}

.portal-nav .navbar-brand {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.portal-nav .nav-link {
    white-space: nowrap;
}

.portal-nav-user {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.35rem;
    margin-left: auto;
}

.portal-nav-user .notification-dropdown {
    flex: 0 0 auto;
    margin-right: 1.25rem;
}

.portal-nav-user .notification-dropdown .nav-link {
    color: rgba(255, 255, 255, 0.75);
}

.portal-nav-user .notification-dropdown .nav-link:hover,
.portal-nav-user .notification-dropdown .nav-link:focus-visible {
    color: #fff;
}

.portal-main {
    max-width: 1680px;
    margin-inline: auto;
    padding: clamp(1rem, 2vw, 2rem) clamp(1rem, 2.5vw, 2.5rem) 3rem;
}

.portal-page-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.portal-eyebrow {
    color: var(--portal-accent);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.portal-page-title {
    font-size: clamp(1.35rem, 2.5vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.03em;
}

.portal-page-hint {
    color: var(--portal-muted);
    font-size: 0.9rem;
}

.portal-dashboard-brand {
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    gap: 0.35rem;
}

.portal-dashboard-brand-logo {
    display: block;
    width: min(9rem, 30vw);
    height: auto;
}

.calendar-panel {
    overflow: hidden;
    padding: clamp(0.75rem, 1.5vw, 1.25rem);
    border: 1px solid var(--portal-border);
    border-radius: 1rem;
    background: var(--portal-surface);
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.06);
}

.calendar-panel #calendar {
    min-height: 70vh !important;
}

.fc .fc-header-toolbar {
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.fc .fc-toolbar-chunk {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.fc .fc-toolbar-title {
    color: var(--portal-ink);
    font-size: clamp(1.2rem, 2vw, 1.65rem);
    letter-spacing: -0.03em;
}

.fc .fc-button-primary {
    border-color: #d0d5dd;
    background: #fff;
    color: #344054;
}

.fc .fc-button-primary:hover,
.fc .fc-button-primary:focus,
.fc .fc-button-primary:not(:disabled).fc-button-active {
    border-color: #98a2b3;
    background: #f2f4f7;
    color: var(--portal-ink);
}

.fc .fc-addJob-button {
    border-color: var(--portal-accent) !important;
    background: var(--portal-accent) !important;
}

.fc .fc-daygrid-day-frame {
    min-height: 7.5rem;
}

.fc .fc-daygrid-day-number {
    padding: 0.5rem 0.6rem;
    color: #475467;
    font-weight: 700;
}

.fc .fc-col-header-cell-cushion {
    padding-block: 0.6rem;
    color: #667085;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.fc .fc-daygrid-event {
    border-radius: 0.55rem;
    padding: 0.25rem 0.45rem;
    font-size: 0.8rem;
}

.fc .fc-daygrid-day-events {
    margin-bottom: 4px !important;
}

.fc .fc-more-link {
    display: inline-block;
    margin-top: 0.2rem;
    color: #475467;
    font-size: 0.75rem;
    font-weight: 700;
}

.fc .portal-inline-overflow-event {
    cursor: pointer;
}

.fc .portal-inline-overflow-event:hover {
    filter: brightness(0.97);
}

.portal-daily-summary {
    color: #607d8b;
    font-size: 0.75rem;
    line-height: 1.25;
    margin: 2px 4px 4px;
    padding: 0 1px;
}

#customerSearchWrapper {
    width: min(15rem, 100%);
}

#customerSearchWrapper .input-group {
    flex-wrap: nowrap;
}

.job-summary-card {
    height: 100%;
    padding: 1rem;
    border: 1px solid var(--portal-border);
    border-radius: 0.85rem;
    background: var(--portal-surface);
}

.job-summary-card h5 {
    margin-bottom: 0.75rem;
    color: var(--portal-ink);
    font-size: 0.95rem;
    font-weight: 700;
}

.job-summary-card .list-group-item {
    border-color: #eef0f3;
    font-size: 0.85rem;
}

.portal-dashboard {
    max-width: none;
}

.portal-dashboard-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 100%;
    padding: 1.25rem;
    border: 1px solid var(--portal-border);
    border-radius: 1rem;
    background: var(--portal-surface);
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.06);
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.portal-dashboard-card:hover,
.portal-dashboard-card:focus-visible {
    border-color: #b8c2d1;
    box-shadow: 0 12px 28px rgba(16, 24, 40, 0.1);
    color: inherit;
    transform: translateY(-2px);
}

.portal-dashboard-icon {
    display: inline-flex;
    flex: 0 0 3rem;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.85rem;
    color: #fff;
    font-size: 1.35rem;
}

.portal-dashboard-icon-calendar {
    background: #3b82f6;
}

.portal-dashboard-icon-tracking {
    background: #172033;
}

.portal-dashboard-icon-stocks {
    background: #0f766e;
}

.portal-dashboard-icon-capsule {
    background: #7c3aed;
}

.portal-dashboard-stock-card {
    align-items: flex-start;
}

.portal-dashboard-card-content {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    flex-direction: column;
    gap: 0.25rem;
}

.portal-dashboard-card-title {
    font-size: 1.05rem;
    font-weight: 700;
}

.portal-dashboard-card-text {
    color: var(--portal-muted);
    font-size: 0.9rem;
    line-height: 1.4;
}

.portal-dashboard-stock-examples {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.2rem;
}

.portal-dashboard-stock-example {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    color: var(--portal-ink);
    font-size: 0.82rem;
}

.portal-dashboard-stock-example-name {
    margin-left: 0.35rem;
    color: var(--portal-muted);
}

.portal-dashboard-stock-example-quantity {
    flex: 0 0 auto;
    color: var(--portal-ink);
    font-weight: 700;
    white-space: nowrap;
}

.portal-dashboard-arrow {
    color: var(--portal-muted);
    font-size: 1.1rem;
}

.portal-dashboard-todo {
    height: 100%;
    padding: 1.25rem;
    border: 1px solid var(--portal-border);
    border-radius: 1rem;
    background: var(--portal-surface);
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.06);
}

.portal-dashboard-todo-heading {
    margin-bottom: 1rem;
}

.portal-dashboard-todo-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.portal-dashboard-todo-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 3.8rem;
    padding: 0.7rem;
    border: 1px solid var(--portal-border);
    border-radius: 0.8rem;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.portal-dashboard-todo-item:hover,
.portal-dashboard-todo-item:focus-visible {
    border-color: #b8c2d1;
    box-shadow: 0 8px 18px rgba(16, 24, 40, 0.08);
    color: inherit;
    transform: translateY(-1px);
}

.portal-dashboard-todo-icon {
    display: inline-flex;
    flex: 0 0 2.35rem;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.65rem;
    font-size: 1rem;
}

.portal-dashboard-todo-icon-approval {
    background: #fff3cd;
    color: #9a6700;
}

.portal-dashboard-todo-icon-completion {
    background: #f2f4f7;
    color: #667085;
}

.portal-dashboard-todo-icon-cark {
    background: #fce7f3;
    color: #be185d;
}

.portal-dashboard-todo-icon-cark-match {
    background: #0f766e;
    color: #fff;
}

.portal-dashboard-todo-label {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.25;
}

.portal-dashboard-todo-count {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-width: 1.7rem;
    height: 1.7rem;
    padding-inline: 0.35rem;
    border-radius: 999px;
    background: #eef2f6;
    color: var(--portal-ink);
    font-size: 0.78rem;
    font-weight: 800;
}

.portal-dashboard-upcoming {
    max-width: none;
}

.portal-dashboard-upcoming > .row > [class*="col-"] {
    display: flex;
}

.portal-dashboard-upcoming .portal-appointment-card {
    width: 100%;
    height: 100%;
}

.portal-dashboard-capsule-card {
    height: 100%;
    padding: 1.25rem;
    border: 1px solid var(--portal-border);
    border-radius: 1rem;
    background: var(--portal-surface);
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.06);
}

.portal-dashboard-capsule-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.portal-dashboard-capsule-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.portal-overdue-task-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.portal-overdue-task {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.85rem 1rem 0.85rem 0.8rem;
    border: 1px solid #f1c7cc;
    border-left: 0.3rem solid #dc3545;
    border-radius: 0.85rem;
    background: #fff8f8;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.portal-overdue-task:hover,
.portal-overdue-task:focus-visible {
    border-color: #e8aeb5;
    border-left-color: #dc3545;
    box-shadow: 0 10px 22px rgba(16, 24, 40, 0.1);
    color: inherit;
    transform: translateY(-1px);
}

.portal-overdue-task-days {
    display: inline-flex;
    flex: 0 0 3.2rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 3.4rem;
    border-radius: 0.7rem;
    background: #f9d9dc;
    color: #a61e2b;
    line-height: 1;
}

.portal-overdue-task-days strong {
    font-size: 1.2rem;
}

.portal-overdue-task-days span {
    margin-top: 0.3rem;
    font-size: 0.68rem;
    font-weight: 700;
}

.portal-overdue-task-content {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    flex-direction: column;
    gap: 0.2rem;
}

.portal-overdue-task-title {
    overflow: hidden;
    color: var(--portal-ink);
    font-size: 0.95rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

a.portal-overdue-task-title:hover,
a.portal-overdue-task-title:focus-visible {
    color: #b42318;
}

.portal-overdue-task-meta,
.portal-overdue-task-description {
    overflow: hidden;
    color: var(--portal-muted);
    font-size: 0.78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-overdue-task .badge {
    flex: 0 0 auto;
    white-space: nowrap;
}

.portal-dashboard-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.portal-section-title {
    color: var(--portal-ink);
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    font-weight: 700;
    letter-spacing: -0.03em;
}

.portal-appointment-card {
    --appointment-accent: #98a2b3;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-height: 5.5rem;
    padding: 0.85rem 1rem 0.85rem 0.8rem;
    border: 1px solid var(--portal-border);
    border-left: 0.3rem solid var(--appointment-accent);
    border-radius: 0.85rem;
    background: var(--portal-surface);
    box-shadow: 0 6px 18px rgba(16, 24, 40, 0.05);
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.portal-appointment-card:hover,
.portal-appointment-card:focus-visible {
    border-color: #b8c2d1;
    border-left-color: var(--appointment-accent);
    box-shadow: 0 10px 22px rgba(16, 24, 40, 0.1);
    color: inherit;
    transform: translateY(-1px);
}

.portal-appointment-card.status-proposal { --appointment-accent: #607d8b; }
.portal-appointment-card.status-scheduled { --appointment-accent: #e0a800; }
.portal-appointment-card.status-confirmed { --appointment-accent: #1976d2; }
.portal-appointment-card.status-error { --appointment-accent: #dc3545; }
.portal-appointment-card.status-past { --appointment-accent: #98a2b3; }
.portal-appointment-card.status-import-pending {
    --appointment-accent: #e0a800;
    border-color: #f1dfaa;
    background: #fffaf0;
}
.portal-appointment-card.status-import-pending .portal-appointment-date {
    background: #fff1bf;
    color: #9a6700;
}
.portal-appointment-card.status-import-pending .portal-appointment-status {
    background: #fff0c2;
    color: #956b00;
}
.portal-appointment-card.status-import-pending .portal-appointment-arrow {
    color: #b77900;
}

.portal-appointment-card.crm-project-pending-card:hover {
    border-color: #b8c0cc;
}

.portal-appointment-card.crm-project-pending-card .portal-appointment-arrow {
    color: var(--portal-muted);
}

.portal-appointment-warning {
    margin-left: 0.2rem;
    color: #d97706;
    font-size: 0.9em;
    cursor: help;
}

.portal-appointment-date {
    display: inline-flex;
    flex: 0 0 3.2rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 3.4rem;
    border-radius: 0.7rem;
    background: color-mix(in srgb, var(--appointment-accent) 12%, #fff);
    color: var(--appointment-accent);
    line-height: 1;
}

.portal-appointment-day {
    font-size: 1.25rem;
    font-weight: 800;
}

.portal-appointment-month {
    margin-top: 0.3rem;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
}

.portal-appointment-content {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    flex-direction: column;
    gap: 0.25rem;
}

.portal-appointment-customer {
    overflow: hidden;
    font-size: 0.95rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-appointment-meta {
    color: var(--portal-muted);
    font-size: 0.78rem;
}

.portal-appointment-status {
    flex: 0 0 auto;
    padding: 0.35rem 0.55rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--appointment-accent) 12%, #fff);
    color: var(--appointment-accent);
    font-size: 0.7rem;
    font-weight: 800;
    white-space: nowrap;
}

.portal-appointment-arrow {
    flex: 0 0 auto;
    color: var(--portal-muted);
    font-size: 1.1rem;
}

.portal-appointments-state {
    padding: 1.25rem;
    border: 1px dashed var(--portal-border);
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.6);
    color: var(--portal-muted);
    text-align: center;
}

@media (max-width: 767.98px) {
    .portal-page-heading {
        display: block;
    }

    .portal-page-hint {
        margin-top: 0.35rem;
    }

    .portal-dashboard-brand {
        align-items: flex-start;
        margin-top: 0.75rem;
    }

    .portal-dashboard-brand-logo {
        width: min(9rem, 55vw);
    }

    .portal-dashboard-section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .portal-appointment-card {
        gap: 0.65rem;
        padding-right: 0.75rem;
    }

    .portal-appointment-status {
        display: none;
    }

    .portal-overdue-task .badge {
        display: none;
    }

    .fc .fc-header-toolbar .fc-toolbar-chunk {
        flex: 1 1 100%;
    }

    .fc .fc-header-toolbar .fc-toolbar-chunk:nth-child(2) {
        order: 3;
    }

    .fc .fc-header-toolbar .fc-toolbar-chunk:last-child {
        order: 2;
        justify-content: flex-start;
    }

    #customerSearchWrapper {
        width: 100%;
    }

    .fc .fc-daygrid-day-frame {
        min-height: 6rem;
    }

    .fc .fc-daygrid-event {
        font-size: 0.72rem;
        line-height: 1.2;
    }
}

.portal-leave-page-heading {
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.portal-leave-heading-note {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.35rem;
    padding: 0.65rem 0.85rem;
    border: 1px solid #dbe7ff;
    border-radius: 0.7rem;
    background: #f5f8ff;
    color: #315aa8;
    font-size: 0.78rem;
    font-weight: 600;
}

.portal-leave-card {
    border: 1px solid var(--portal-border);
    border-radius: 1rem;
    background: var(--portal-surface);
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.06);
}

.portal-leave-request-card,
.portal-leave-manager-card {
    overflow: hidden;
}

.portal-leave-card-header {
    padding: 1.25rem 1.35rem;
    border-bottom: 1px solid #eef1f5;
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
}

.portal-leave-card-heading {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.portal-leave-icon {
    display: inline-flex;
    flex: 0 0 2.7rem;
    align-items: center;
    justify-content: center;
    width: 2.7rem;
    height: 2.7rem;
    border-radius: 0.8rem;
    font-size: 1.15rem;
}

.portal-leave-icon-primary {
    background: #e8f0ff;
    color: #2563eb;
}

.portal-leave-icon-soft {
    background: #fff4d8;
    color: #b77900;
}

.portal-leave-icon-manager {
    background: #efe9ff;
    color: #6d42c1;
}

.portal-leave-card-title {
    margin: 0;
    color: var(--portal-ink);
    font-size: 1.05rem;
    font-weight: 750;
    letter-spacing: -0.02em;
}

.portal-leave-card-subtitle {
    margin: 0.2rem 0 0;
    color: var(--portal-muted);
    font-size: 0.82rem;
}

.portal-leave-form {
    padding: 1.35rem;
}

.portal-leave-form .form-label {
    margin-bottom: 0.45rem;
    color: #344054;
    font-size: 0.78rem;
    font-weight: 700;
}

.portal-leave-form .form-control,
.portal-leave-form .form-select {
    min-height: 2.7rem;
    border-color: #d0d5dd;
    border-radius: 0.65rem;
}

.portal-leave-form .form-control:focus,
.portal-leave-form .form-select:focus {
    border-color: #84aaf5;
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.12);
}

.portal-leave-optional {
    margin-left: 0.25rem;
    color: #98a2b3;
    font-size: 0.7rem;
    font-weight: 500;
}

.portal-leave-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.2rem;
    padding-top: 1rem;
    border-top: 1px solid #eef1f5;
}

.portal-leave-form-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--portal-muted);
    font-size: 0.75rem;
}

.portal-leave-submit {
    flex: 0 0 auto;
    border-radius: 0.65rem;
    padding-inline: 1rem;
    font-weight: 700;
}

.portal-leave-guide-card {
    padding: 1.35rem;
}

.portal-leave-guide-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin-top: 1.5rem;
}

.portal-leave-guide-item {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
}

.portal-leave-guide-item > span {
    display: inline-flex;
    flex: 0 0 1.55rem;
    align-items: center;
    justify-content: center;
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 50%;
    background: #eef4ff;
    color: #2563eb;
    font-size: 0.72rem;
    font-weight: 800;
}

.portal-leave-guide-item p {
    margin: 0.1rem 0 0;
    color: #475467;
    font-size: 0.82rem;
    line-height: 1.4;
}

.portal-leave-status-key {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eef1f5;
}

.portal-leave-status {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 800;
    white-space: nowrap;
}

.portal-leave-status.is-approved {
    background: #e6f6ee;
    color: #16734b;
}

.portal-leave-status.is-pending {
    background: #fff4d8;
    color: #9a6700;
}

.portal-leave-status.is-rejected {
    background: #fdebec;
    color: #b42318;
}

.portal-leave-section {
    padding: 0.1rem 0;
}

.portal-leave-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.portal-leave-count {
    display: inline-flex;
    align-items: center;
    min-height: 1.8rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: #eef2f6;
    color: #475467;
    font-size: 0.72rem;
    font-weight: 800;
    white-space: nowrap;
}

.portal-leave-count-warm {
    background: #fff4d8;
    color: #9a6700;
}

.portal-leave-usage-card {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    height: 100%;
    padding: 0.9rem;
    border: 1px solid var(--portal-border);
    border-radius: 0.8rem;
    background: var(--portal-surface);
}

.portal-leave-usage-avatar {
    display: inline-flex;
    flex: 0 0 2.2rem;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 0.65rem;
    background: #e8f0ff;
    color: #315aa8;
    font-weight: 800;
}

.portal-leave-usage-content {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    flex-direction: column;
    gap: 0.12rem;
}

.portal-leave-usage-content strong {
    overflow: hidden;
    color: var(--portal-ink);
    font-size: 0.82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-leave-usage-content span {
    color: var(--portal-muted);
    font-size: 0.7rem;
}

.portal-leave-usage-card > b {
    color: var(--portal-ink);
    font-size: 1.05rem;
    white-space: nowrap;
}

.portal-leave-usage-card > b small {
    color: var(--portal-muted);
    font-size: 0.68rem;
    font-weight: 600;
}

.portal-leave-table-card {
    overflow: hidden;
    padding: 1.25rem;
}

.portal-leave-my-requests-card {
    padding: 1.15rem;
}

.portal-leave-my-requests-card .portal-leave-section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.55rem;
    margin-bottom: 0.8rem;
}

.portal-leave-compact-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    font-size: 0.75rem;
}

.portal-leave-compact-table th:nth-child(1),
.portal-leave-compact-table td:nth-child(1) {
    width: 48%;
}

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

.portal-leave-compact-table th:nth-child(3),
.portal-leave-compact-table td:nth-child(3) {
    width: 27%;
}

.portal-leave-compact-table tbody td {
    overflow-wrap: anywhere;
    word-break: normal;
}

.portal-leave-compact-table tbody td:first-child strong {
    display: inline;
    white-space: nowrap;
}

.portal-leave-compact-table tbody td:first-child {
    white-space: nowrap;
    font-size: 0.7rem;
}

.portal-leave-compact-table thead th,
.portal-leave-compact-table tbody td {
    padding: 0.62rem 0.35rem;
}

.portal-leave-compact-table th:first-child,
.portal-leave-compact-table td:first-child {
    padding-left: 0;
}

.portal-leave-compact-table th:last-child,
.portal-leave-compact-table td:last-child {
    padding-right: 0;
}

.portal-leave-date-separator {
    display: inline-block;
    margin: 0 0.2rem;
    color: #98a2b3;
    line-height: inherit;
}

.portal-leave-guide-section {
    padding: 1.35rem;
}

.portal-leave-guide-compact {
    padding: 1rem 1.15rem;
}

.portal-leave-guide-compact .portal-leave-guide-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 0.85rem;
}

.portal-leave-guide-compact .portal-leave-guide-item {
    align-items: center;
    gap: 0.55rem;
    min-height: 3rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid #eef1f5;
    border-radius: 0.7rem;
    background: #fafbfc;
}

.portal-leave-guide-compact .portal-leave-guide-item p {
    margin: 0;
    font-size: 0.76rem;
    line-height: 1.35;
}

.portal-leave-guide-compact .portal-leave-status-key {
    justify-content: flex-end;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
}

.portal-leave-table-wrap {
    overflow-x: auto;
    margin-inline: -0.25rem;
}

.portal-leave-table {
    min-width: 42rem;
    color: #344054;
    font-size: 0.82rem;
}

.portal-leave-table thead th {
    padding: 0.75rem 0.75rem;
    border-bottom: 1px solid #dfe3e8;
    color: #667085;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.portal-leave-table tbody td {
    padding: 0.85rem 0.75rem;
    border-bottom-color: #eef1f5;
    vertical-align: middle;
}

.portal-leave-table tbody tr:last-child td {
    border-bottom: 0;
}

.portal-leave-table tbody tr:hover {
    background: #fafbfc;
}

.portal-leave-note-cell {
    max-width: 20rem;
    color: var(--portal-muted);
}

/* The compact request summary lives in a narrow side card, so it must not inherit
   the wide table minimum used by the full management tables. */
.portal-leave-table.portal-leave-compact-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}

.portal-leave-duration-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.45rem;
}

.portal-leave-duration-value {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: #eef4ff;
    color: #2563eb;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.portal-leave-range-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.8rem;
    background: #f8fafc;
}

.portal-leave-range-icon {
    color: #64748b;
    font-size: 1rem;
}

.portal-leave-range {
    flex: 1 1 auto;
    height: 5px;
    accent-color: #2563eb;
    cursor: pointer;
}

.portal-leave-range:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.portal-leave-range-limit {
    min-width: 42px;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: right;
}

.portal-leave-range-hint {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.45rem;
    color: #64748b;
    font-size: 0.75rem;
}

.portal-leave-duration-control.is-half-day .portal-leave-range {
    opacity: 0.45;
}

.portal-leave-empty {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 0.35rem;
    padding: 2.5rem 1rem;
    border: 1px dashed var(--portal-border);
    border-radius: 0.75rem;
    background: #fafbfc;
    color: var(--portal-muted);
    text-align: center;
}

.portal-leave-empty i {
    margin-bottom: 0.35rem;
    color: #98a2b3;
    font-size: 1.7rem;
}

.portal-leave-empty strong {
    color: #475467;
    font-size: 0.9rem;
}

.portal-leave-empty span {
    font-size: 0.78rem;
}

@media (max-width: 767.98px) {
    .portal-leave-page-heading {
        gap: 0.7rem;
    }

    .portal-leave-heading-note {
        margin-top: 0.15rem;
    }

    .portal-leave-form-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .portal-leave-submit {
        width: 100%;
    }

    .portal-leave-section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .portal-leave-table-card {
        padding: 1rem;
    }

    .portal-leave-duration-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.45rem;
    }

    .portal-leave-range-hint {
        align-items: flex-start;
    }

    .portal-leave-guide-compact .portal-leave-guide-list {
        grid-template-columns: 1fr;
    }

    .portal-leave-guide-compact .portal-leave-status-key {
        justify-content: flex-start;
    }
}
