@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Fraunces:opsz,wght@9..144,600;9..144,700&display=swap');

:root {
    --sf-navy: #20316f;
    --sf-navy-deep: #172559;
    --sf-green: #159a52;
    --sf-green-dark: #107542;
    --sf-ink: #1b2923;
    --sf-muted: #687971;
    --sf-line: #dce8e1;
    --sf-canvas: #f5f8f6;
    --sf-surface: #ffffff;
    --sf-soft-green: #eaf8ef;
    --sf-soft-blue: #ebf1ff;
    --sf-warning: #9b6107;
    --sf-danger: #b63e3e;
    --sf-radius: 1rem;
    --sf-shadow: 0 10px 28px rgba(29, 55, 43, .07);
    --sf-shadow-hover: 0 15px 34px rgba(29, 55, 43, .11);
}

* { box-sizing: border-box; }
html { background: var(--sf-canvas); scrollbar-color: #86a99a #edf3ef; scrollbar-width: thin; }
body, .fi-body { font-family: 'DM Sans', sans-serif; color: var(--sf-ink); background: var(--sf-canvas); }

/* Filament chrome: visual only, with no layout overrides. */
.fi-main { background: radial-gradient(circle at 96% 0%, rgba(209, 242, 220, .62), transparent 27rem), var(--sf-canvas); }
.fi-sidebar { background: linear-gradient(180deg, var(--sf-navy-deep), #33478e 62%, #197252 120%); border-inline-end: 0; }
.fi-sidebar-header { min-height: 6rem; border-bottom: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.05); }
.fi-sidebar-header .fi-logo, .fi-sidebar-header img.fi-logo { overflow: hidden; border: 2px solid rgba(255,255,255,.82); border-radius: .9rem; background: #fff; box-shadow: 0 10px 22px rgba(8,15,48,.25); }
.fi-sidebar-group-label { color: rgba(255,255,255,.6) !important; font-size: .7rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.fi-sidebar-item-button { min-height: 2.85rem; border-radius: .78rem !important; color: rgba(255,255,255,.94) !important; font-weight: 600; transition: background .18s ease, transform .18s ease; }
.fi-sidebar-item-button:hover { background: rgba(255,255,255,.1) !important; color: #fff !important; transform: translateX(2px); }
.fi-sidebar-item.fi-active .fi-sidebar-item-button { background: linear-gradient(90deg, #1d9a59, #566bc7) !important; color: #fff !important; box-shadow: inset 3px 0 #a5efbd; }
.fi-sidebar-item-icon { color: inherit !important; }

.fi-topbar { min-height: 4.7rem; border-bottom: 1px solid var(--sf-line); background: rgba(255,255,255,.92); backdrop-filter: blur(14px); }
.fi-topbar nav > div[x-persist^="topbar.end"], .fi-topbar .fi-user-menu { display: none !important; }
.sf-account-control { display: inline-flex; align-items: center; gap: .7rem; margin-left: auto; padding: .42rem .65rem .42rem .85rem; border: 1px solid var(--sf-line); border-radius: .9rem; background: #fff; box-shadow: 0 6px 18px rgba(30,54,45,.08); }
.sf-account-control__identity { display: grid; min-width: 9.5rem; text-align: right; line-height: 1.2; }
.sf-account-control__status { color: var(--sf-muted); font-size: .64rem; font-weight: 800; letter-spacing: .075em; text-transform: uppercase; }
.sf-account-control__identity strong { color: var(--sf-ink); font-size: .86rem; white-space: nowrap; }
.sf-account-control__divider { width: 1px; height: 2rem; background: var(--sf-line); }
.sf-account-control__logout { border: 0; border-radius: .65rem; padding: .55rem .7rem; background: transparent; color: var(--sf-danger); font-size: .8rem; font-weight: 700; cursor: pointer; }
.sf-account-control__logout:hover { background: #fff1f1; }

.fi-header-heading, .fi-section-header-heading, .fi-fo-section-header-heading { font-family: 'Fraunces', serif; color: var(--sf-ink); letter-spacing: -.03em; }
.fi-header-heading { font-size: clamp(1.65rem, 2.2vw, 2.3rem); }
.fi-header-subheading { color: var(--sf-muted); }
.fi-section, .fi-fo-section, .fi-ta-ctn, .fi-modal-window { border: 1px solid var(--sf-line); border-radius: var(--sf-radius) !important; background: var(--sf-surface); box-shadow: var(--sf-shadow); }
.fi-section-header, .fi-fo-section-header { border-bottom-color: #edf2ef; }
.fi-btn { min-height: 2.6rem; border-radius: .72rem; font-weight: 700; transition: transform .16s ease, box-shadow .16s ease; }
.fi-btn:hover { transform: translateY(-1px); }
.fi-btn-primary { background: linear-gradient(135deg, var(--sf-green), var(--sf-green-dark)); box-shadow: 0 8px 16px rgba(21,154,82,.2); }
.fi-input, .fi-select-input, .fi-textarea, .choices__inner { min-height: 2.7rem; border-color: #d5e2db; border-radius: .72rem; background: #fcfefd; box-shadow: inset 0 1px 0 rgba(255,255,255,.9); }
.fi-input:focus, .fi-select-input:focus, .fi-textarea:focus, .choices.is-focused .choices__inner { border-color: var(--sf-green); box-shadow: 0 0 0 3px rgba(21,154,82,.13); }
.fi-fo-field-wrp-label label { color: #31443a; font-size: .84rem; font-weight: 700; }
.fi-badge { border-radius: 999px; font-weight: 700; }
.fi-ta-ctn { overflow-x: auto; overscroll-behavior-inline: contain; }
.fi-ta-header { min-height: 4.25rem; background: linear-gradient(90deg,#fff,#f8fcfa); }
.fi-ta-header-cell { color: var(--sf-navy); font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.fi-ta-row:hover { background: #f7fbf8; }

/* Shared administrative and employee portal surfaces. */
.sf-admin, .hr-home, .sf-approvals, .sf-request-layout, .sf-loans, .sf-payroll, .sf-notifications { display: grid; gap: 1.25rem; width: 100%; max-width: 1280px; }
.sf-admin-hero, .hr-welcome, .sf-payroll-hero { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.5rem; border-radius: 1.2rem; background: linear-gradient(120deg, var(--sf-navy), #42559e 62%, #168054); color: #fff; box-shadow: 0 16px 34px rgba(31,45,104,.17); }
.sf-admin-hero h2, .hr-welcome h2, .sf-payroll-hero h2 { margin: 0; font-size: clamp(1.35rem, 2vw, 1.75rem); }
.sf-admin-hero p, .hr-welcome p, .sf-payroll-hero p { color: rgba(255,255,255,.8); }
.sf-admin-actions, .hr-actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.sf-admin-actions a, .hr-actions a, .sf-readall, .sf-submit { display: inline-flex; align-items: center; justify-content: center; min-height: 2.55rem; padding: .6rem .9rem; border: 0; border-radius: .7rem; background: #fff; color: var(--sf-navy); text-decoration: none; font-size: .86rem; font-weight: 800; cursor: pointer; }

.sf-admin-kpis, .sf-admin-grid, .hr-dashboard, .hr-content, .hr-metrics, .hr-quick, .sf-approvals__summary, .sf-loan-summary, .sf-payroll-totals, .sf-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.sf-admin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sf-admin-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sf-admin-kpi, .sf-admin-card, .hr-card, .sf-request-card, .sf-loan-card, .sf-loan-metric, .sf-payroll-card, .sf-payroll-total, .sf-notif-item, .sf-approval-stat, .sf-approval-filter-card, .sf-approval-section { min-width: 0; border: 1px solid var(--sf-line); border-radius: var(--sf-radius); background: #fff; box-shadow: var(--sf-shadow); }
.sf-admin-kpi, .sf-loan-metric, .sf-payroll-total { padding: 1.15rem; }
.sf-admin-kpi span, .sf-loan-metric span, .sf-payroll-total span, .sf-notif-meta, .sf-approval-stat__copy span, .sf-approval-stat__copy small { color: var(--sf-muted); font-size: .82rem; font-weight: 600; }
.sf-admin-kpi strong, .sf-loan-metric strong, .sf-payroll-total strong, .sf-approval-stat__copy strong { display: block; margin-top: .32rem; color: var(--sf-navy); font-size: 1.6rem; line-height: 1.1; }
.sf-admin-card, .hr-card, .sf-request-card, .sf-loan-card, .sf-payroll-card { padding: 1.2rem; }

.sf-admin-queue { padding: 0; overflow: hidden; }
.sf-admin-queue__header, .sf-approval-section__head, .sf-payroll-head, .hr-card-head, .sf-notifications-head { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: 1rem 1.15rem; }
.sf-admin-queue__header h3, .sf-payroll-head h2, .hr-card h2, .sf-request-card h2, .sf-loan-card h2 { margin: 0; color: var(--sf-ink); font-size: 1.05rem; }
.sf-admin-queue__header span { color: var(--sf-muted); font-size: .78rem; }
.sf-admin-queue__items { display: grid; gap: .7rem; padding: 0 1.15rem 1.15rem; }
.sf-admin-queue__item { display: grid; grid-template-columns: 2.4rem minmax(0,1fr) auto; align-items: center; gap: .75rem; padding: .85rem; border: 1px solid #e1ece6; border-radius: .85rem; color: inherit; text-decoration: none; }
.sf-admin-queue__icon, .sf-approval-stat__icon { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: .7rem; background: #dff6e7; color: var(--sf-green-dark); }
.sf-admin-queue__icon--medical, .sf-approval-stat--medical .sf-approval-stat__icon { background: var(--sf-soft-blue); color: #315394; }
.sf-admin-queue__icon--permission, .sf-approval-stat--permission .sf-approval-stat__icon, .sf-approval-section__title--permission > span { background: #f3e9ff; color: #7643b7; }
.sf-approval-avatar--permission { background: #f3e9ff; color: #7643b7; }
.sf-admin-queue__icon svg, .sf-approval-stat__icon svg { width: 1.2rem; height: 1.2rem; }
.sf-admin-queue__copy { min-width: 0; display: grid; gap: .12rem; }
.sf-admin-queue__copy strong { font-size: .92rem; }
.sf-admin-queue__copy small { color: var(--sf-muted); font-size: .78rem; }
.sf-admin-queue__count, .sf-approval-status, .sf-approval-section__count, .sf-loan-badge, .sf-badge, .sf-payroll-badge, .hr-pill, .sf-notif-pill { display: inline-flex; align-items: center; width: fit-content; padding: .28rem .58rem; border-radius: 999px; background: #fff3d9; color: var(--sf-warning); font-size: .74rem; font-weight: 800; }
.sf-admin-row { display: flex; justify-content: space-between; gap: .75rem; padding: .75rem 0; border-bottom: 1px solid #edf2ef; }
.sf-admin-row:last-child { border-bottom: 0; }
.sf-admin-row small, .sf-admin-empty, .hr-empty { color: var(--sf-muted); }

/* Approval workflow. */
.sf-approval-stat { display: flex; align-items: center; gap: .9rem; min-height: 7rem; padding: 1.1rem; }
.sf-approval-stat__copy { display: grid; gap: .16rem; }
.sf-approval-filter-card { padding: 1rem 1.15rem; }
.sf-approval-filter-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.sf-approval-toolbar { display: grid; grid-template-columns: 1.3fr 1fr repeat(2, minmax(0,.8fr)) minmax(9rem,.7fr); gap: .7rem; }
.sf-approval-filter { width: 100%; min-height: 2.65rem; padding: .5rem .7rem; border: 1px solid #d5e2db; border-radius: .7rem; background: #fff; color: var(--sf-ink); }
.sf-approval-section { overflow: hidden; }
.sf-approval-section__head { border-bottom: 1px solid #edf2ef; background: #fbfdfc; }
.sf-approval-section__title { display: flex; align-items: center; gap: .55rem; font-weight: 800; }
.sf-approval-section__title > span { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: .6rem; background: var(--sf-soft-green); color: var(--sf-green-dark); }
.sf-approval-list { display: grid; }
.sf-approval-item { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 1rem; padding: 1rem 1.15rem; border-bottom: 1px solid #edf2ef; }
.sf-approval-item:last-child { border-bottom: 0; }
.sf-approval-person { display: flex; align-items: flex-start; gap: .75rem; min-width: 0; }
.sf-approval-avatar { display: grid; place-items: center; flex: none; width: 2.4rem; height: 2.4rem; border-radius: .72rem; background: #eef5f1; color: var(--sf-green-dark); font-size: .8rem; font-weight: 800; }
.sf-approval-details { min-width: 0; }
.sf-approval-details strong { display: block; }
.sf-approval-details p { margin: .2rem 0 0; color: var(--sf-muted); font-size: .82rem; line-height: 1.45; overflow-wrap: anywhere; }
.sf-approval-side { display: flex; flex-direction: column; align-items: flex-end; gap: .55rem; min-width: 8rem; }
.sf-approval-status { background: #fff3d9; color: var(--sf-warning); }
.sf-approval-btn { min-height: 2.2rem; padding: .45rem .7rem; border: 1px solid #d7e8dc; border-radius: .65rem; background: #fff; color: var(--sf-ink); font-size: .78rem; font-weight: 800; cursor: pointer; }
.sf-approval-btn--detail { background: var(--sf-soft-green); color: var(--sf-green-dark); }
.sf-approval-actions { display: flex; gap: .4rem; padding: .25rem; border: 1px solid var(--sf-line); border-radius: .75rem; background: #f7faf8; }
.sf-approval-btn--approve { border-color: var(--sf-green); background: var(--sf-green); color: #fff; }
.sf-approval-btn--reject { color: var(--sf-danger); }

/* Employee pages, request pages, payroll and notifications. */
.hr-card, .sf-request-card, .sf-loan-card, .sf-payroll-card { min-width: 0; }
.hr-card-head, .sf-payroll-head { padding: 0 0 .9rem; }
.hr-time { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; }
.hr-time-box { padding: .9rem; border-radius: .8rem; background: #f5f9f7; }
.hr-time-box strong { display: block; color: var(--sf-navy); font-size: 1.35rem; }
.hr-quick a { display: block; padding: 1rem; border: 1px solid var(--sf-line); border-radius: .9rem; background: #fff; color: var(--sf-navy); font-weight: 800; text-decoration: none; }
.sf-field { display: grid; gap: .38rem; margin-bottom: .9rem; }
.sf-field label { font-size: .84rem; font-weight: 700; }
.sf-field input, .sf-field select, .sf-field textarea, .sf-notif-filter { width: 100%; min-height: 2.65rem; padding: .55rem .7rem; border: 1px solid #d5e2db; border-radius: .7rem; background: #fff; }
.sf-field textarea { min-height: 6rem; }
.sf-table, .sf-loan-table { width: 100%; border-collapse: collapse; }
.sf-table th, .sf-table td, .sf-loan-table th, .sf-loan-table td { padding: .72rem .45rem; border-bottom: 1px solid #edf2ef; text-align: left; }
.sf-table th, .sf-loan-table th { color: var(--sf-muted); font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; }
.sf-notif-toolbar { display: flex; flex-wrap: wrap; gap: .65rem; }
.sf-notif-list { display: grid; gap: .7rem; }
.sf-notif-item { padding: 1rem; }
.sf-unread { border-left: 3px solid var(--sf-green); background: linear-gradient(90deg,var(--sf-soft-green),#fff 30%); }
.sf-open { color: var(--sf-green-dark); font-weight: 800; text-decoration: none; }

/* Responsive system. */
@media (max-width: 1023px) {
    .sf-admin-kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .sf-approval-toolbar { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 767px) {
    .fi-main-ctn { min-width: 0; }
    .fi-topbar { min-height: 4.25rem; }
    .sf-account-control { gap: .35rem; padding: .35rem .45rem; }
    .sf-account-control__identity, .sf-account-control__divider { display: none; }
    .sf-admin-hero, .hr-welcome, .sf-payroll-hero { align-items: flex-start; flex-direction: column; padding: 1.15rem; }
    .sf-admin-grid, .sf-admin-kpis, .hr-dashboard, .hr-content, .hr-metrics, .hr-quick, .sf-approvals__summary, .sf-loan-summary, .sf-payroll-totals, .sf-metrics, .sf-approval-toolbar { grid-template-columns: minmax(0,1fr); }
    .sf-admin-card, .hr-card, .sf-request-card, .sf-loan-card, .sf-payroll-card { padding: 1rem; }
    .sf-admin-queue__header, .sf-approval-filter-head, .sf-approval-section__head, .sf-notifications-head { align-items: flex-start; flex-direction: column; }
    .sf-approval-section__head .sf-approval-filter { width: 100% !important; min-width: 0 !important; }
    .sf-approval-item { grid-template-columns: minmax(0,1fr); }
    .sf-approval-side { width: 100%; min-width: 0; align-items: stretch; }
    .sf-approval-btn--detail, .sf-approval-status { align-self: flex-start; }
    .sf-approval-actions { width: 100%; }
    .sf-approval-actions .sf-approval-btn { flex: 1; }
    .sf-table, .sf-loan-table { display: block; overflow-x: auto; white-space: nowrap; }
}
@media (max-width: 420px) {
    .fi-main { padding-inline: .75rem; }
    .fi-header-actions, .fi-header-actions .fi-btn, .sf-admin-actions, .sf-admin-actions a, .hr-actions, .hr-actions a { width: 100%; }
    .sf-admin-queue__item { grid-template-columns: 2.4rem minmax(0,1fr); }
    .sf-admin-queue__count { grid-column: 2; justify-self: start; }
    .hr-time { grid-template-columns: minmax(0,1fr); }
    .fi-section, .fi-fo-section, .fi-ta-ctn, .sf-admin-card, .hr-card, .sf-request-card, .sf-loan-card, .sf-payroll-card, .sf-approval-stat, .sf-approval-filter-card, .sf-approval-section { border-radius: .85rem !important; }
}

/* Navigation contrast: every sidebar label must remain legible over SkinFarma blue. */
.fi-sidebar .fi-sidebar-group-label,
.fi-sidebar .fi-sidebar-item-label,
.fi-sidebar .fi-sidebar-item-button,
.fi-sidebar .fi-sidebar-item-button span,
.fi-sidebar .fi-sidebar-item-button svg,
.fi-sidebar .fi-sidebar-item a,
.fi-sidebar .fi-sidebar-item a span,
.fi-sidebar .fi-sidebar-item a svg {
    color: #ffffff !important;
    opacity: 1 !important;
}

.fi-sidebar .fi-sidebar-group-label { color: rgba(255,255,255,.72) !important; }
.fi-sidebar .fi-sidebar-item.fi-active .fi-sidebar-item-button,
.fi-sidebar .fi-sidebar-item.fi-active .fi-sidebar-item-label { color: #ffffff !important; }


/* Approval page variants kept here so the Blade view has no presentation rules. */
.sf-approval-avatar--medical,
.sf-approval-stat--medical .sf-approval-stat__icon,
.sf-approval-section__title--medical > span {
    background: var(--sf-soft-blue);
    color: #315394;
}

.sf-approval-filter--compact { width: auto; min-width: 11.875rem; }
.sf-approval-status--modal { margin-top: .45rem; }
.sf-approval-proof svg { width: 1rem; height: 1rem; }

/* Decision hierarchy remains consistent across desktop and mobile. */
.sf-approval-side .sf-approval-status { order: 1; }
.sf-approval-side .sf-approval-btn--detail { order: 2; }
.sf-approval-side .sf-approval-actions { order: 3; }

@media (max-width: 767px) {
    .sf-approval-filter--compact { width: 100%; min-width: 0; }
}

/* Resources use the navigation as context; keep content headers action-only. */
.fi-main .fi-breadcrumbs,
.fi-main .fi-header-heading,
.fi-main .fi-header-subheading {
    display: none !important;
}

.fi-main .fi-header {
    min-height: 0;
    justify-content: flex-end;
}

.fi-main .fi-header:not(:has(.fi-header-actions)) {
    display: none;
}


/* Keep the brand area above the desktop top bar instead of letting it be covered. */
@media (min-width: 1024px) {
    .fi-sidebar,
    .fi-main-sidebar,
    .fi-sidebar-header {
        z-index: 60 !important;
    }

    .fi-topbar {
        z-index: 30 !important;
    }
}

/* Approval detail is a focused dialog, never inline page content. */
.sf-approval-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(17, 30, 25, .52);
    backdrop-filter: blur(4px);
}

.sf-approval-modal__card {
    width: min(40rem, 100%);
    max-height: calc(100dvh - 2rem);
    overflow: auto;
    border: 1px solid var(--sf-line);
    border-radius: 1.1rem;
    background: #fff;
    box-shadow: 0 24px 64px rgba(13, 31, 21, .28);
}

.sf-approval-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.25rem;
    border-bottom: 1px solid #e7efea;
}

.sf-approval-modal__head h3 { margin: 0; color: var(--sf-ink); font-size: 1.15rem; }
.sf-approval-modal__close {
    flex: none;
    min-height: 2.3rem;
    border: 1px solid var(--sf-line);
    border-radius: .65rem;
    padding: .45rem .7rem;
    background: #f7faf8;
    color: var(--sf-ink);
    font-weight: 800;
    cursor: pointer;
}

.sf-approval-modal__body { display: grid; gap: 1rem; padding: 1.2rem 1.25rem 1.35rem; }
.sf-approval-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .7rem; }
.sf-approval-detail-grid > div { min-width: 0; padding: .8rem; border-radius: .75rem; background: #f5f9f7; }
.sf-approval-detail-grid small { display: block; color: var(--sf-muted); font-size: .75rem; }
.sf-approval-detail-grid strong { display: block; margin-top: .2rem; overflow-wrap: anywhere; }
.sf-approval-detail-note { padding: .85rem; border-left: 3px solid var(--sf-green); border-radius: .2rem .7rem .7rem .2rem; background: var(--sf-soft-green); color: #385147; line-height: 1.5; }
.sf-approval-proof { display: inline-flex; align-items: center; gap: .4rem; width: fit-content; padding: .6rem .75rem; border-radius: .65rem; background: var(--sf-soft-green); color: var(--sf-green-dark); font-size: .84rem; font-weight: 800; text-decoration: none; }

@media (max-width: 480px) {
    .sf-approval-modal { padding: .75rem; }
    .sf-approval-modal__head, .sf-approval-modal__body { padding-inline: 1rem; }
    .sf-approval-detail-grid { grid-template-columns: minmax(0,1fr); }
}

.sf-approval-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: .55rem;
    padding: 0 1.25rem 1.25rem;
}

.sf-approval-modal__actions .sf-approval-btn { min-width: 6.5rem; }

@media (max-width: 480px) {
    .sf-approval-modal__actions { padding-inline: 1rem; }
    .sf-approval-modal__actions .sf-approval-btn { flex: 1; }
}

/* Empty approval states keep their icon and message contained. */
.sf-approval-empty {
    display: grid;
    place-items: center;
    gap: .55rem;
    min-height: 9rem;
    padding: 1.5rem;
    color: var(--sf-muted);
    text-align: center;
}

.sf-approval-empty svg {
    width: 2rem;
    height: 2rem;
    color: #9aaea3;
}

.sf-approval-empty p { margin: 0; }

/* Employee portal: shared visual language for daily self-service. */
.hr-home { max-width: 1180px; }
.hr-welcome { position: relative; align-items: stretch; overflow: hidden; isolation: isolate; padding: 1.7rem; }
.hr-welcome::before, .hr-welcome::after { position: absolute; z-index: -1; border-radius: 999px; content: ''; pointer-events: none; }
.hr-welcome::before { top: -6rem; right: 18rem; width: 15rem; height: 15rem; background: rgba(255,255,255,.065); }
.hr-welcome::after { right: -5rem; bottom: -6rem; width: 17rem; height: 17rem; border: 1px solid rgba(255,255,255,.16); }
.hr-welcome__intro { min-width: 0; max-width: 42rem; }
.hr-eyebrow { margin: 0 0 .35rem; color: rgba(255,255,255,.73) !important; font-size: .74rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.hr-date { display: block; margin-top: .55rem; color: rgba(255,255,255,.7); font-size: .88rem; }
.hr-week-card { display: inline-grid; margin-top: 1rem; padding: .7rem .85rem; border: 1px solid rgba(216,248,236,.26); border-radius: .9rem; background: rgba(7,31,68,.20); box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
.hr-week-card__label { color: #bfe6db; font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.hr-week-card__content { display: flex; align-items: center; gap: .65rem; margin-top: .38rem; }
.hr-week-card__icon { display: grid; place-items: center; flex: 0 0 auto; width: 2rem; height: 2rem; border-radius: .62rem; background: linear-gradient(135deg, #c7f9dd, #8de5bc); color: #126c49; font-size: .66rem; font-weight: 900; letter-spacing: -.05em; }
.hr-week-card__content div { display: grid; gap: .08rem; min-width: 0; }
.hr-week-card__content strong { color: #fff; font-size: 1rem; line-height: 1.1; }
.hr-week-card__content small { overflow: hidden; max-width: 21rem; color: rgba(255,255,255,.72); font-size: .73rem; text-overflow: ellipsis; white-space: nowrap; }
.hr-week-card__content em { margin-left: .3rem; padding: .22rem .45rem; border-radius: 999px; background: rgba(255,236,188,.18); color: #ffe2a1; font-size: .68rem; font-style: normal; font-weight: 800; white-space: nowrap; }
.hr-status { display: grid; align-content: center; min-width: 18rem; padding: 1.15rem 1.2rem; border: 1px solid rgba(255,255,255,.25); border-radius: 1.15rem; background: linear-gradient(145deg, rgba(255,255,255,.17), rgba(255,255,255,.09)); box-shadow: inset 0 1px 0 rgba(255,255,255,.13), 0 .8rem 1.8rem rgba(7,22,63,.12); backdrop-filter: blur(7px); }
.hr-status small { color: rgba(255,255,255,.72); }
.hr-status strong { margin-top: .18rem; color: #fff; font-size: 1.12rem; }
.hr-actions--attendance { margin-top: .8rem; }
.hr-action { flex: 1; min-height: 2.5rem; border: 0; border-radius: .7rem; padding: .55rem .8rem; font-weight: 800; cursor: pointer; }
.hr-entry { background: #dff6e7; color: #126c3c; }
.hr-exit { background: #fff; color: #a43b3b; }
.hr-action:disabled { cursor: not-allowed; opacity: .52; }
.hr-card-head h3 { margin: 0; color: var(--sf-ink); font-size: 1.05rem; }
.hr-card-head > span { color: var(--sf-muted); font-size: .82rem; }
.hr-time-box span { color: var(--sf-muted); font-size: .82rem; }
.hr-time-box em { display: block; margin-top: .38rem; color: var(--sf-green-dark); font-size: .78rem; font-style: normal; font-weight: 700; }
.hr-contract-title { display: block; color: var(--sf-navy); font-size: 1.15rem; line-height: 1.35; }
.hr-contract-link { margin-top: .75rem; color: #19714a; text-decoration: none; }
.hr-quick a { display: grid; gap: .4rem; transition: transform .16s ease, box-shadow .16s ease; }
.hr-quick a:hover { transform: translateY(-2px); box-shadow: var(--sf-shadow-hover); }
.hr-quick b { color: var(--sf-navy); }
.hr-quick small { color: var(--sf-muted); line-height: 1.4; }
.hr-icon { display: grid; place-items: center; width: 2.3rem; height: 2.3rem; border-radius: .7rem; background: var(--sf-soft-green); color: var(--sf-green-dark); font-size: .9rem; font-weight: 900; }
.hr-metric { min-width: 0; padding: 1rem; border: 1px solid var(--sf-line); border-radius: .9rem; background: #fff; box-shadow: var(--sf-shadow); }
.hr-metric span { color: var(--sf-muted); font-size: .82rem; }
.hr-metric strong { display: block; margin-top: .4rem; color: var(--sf-navy); font-size: 1.45rem; overflow-wrap: anywhere; }
.hr-list { display: grid; }
.hr-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .85rem 0; border-bottom: 1px solid #edf2ef; }
.hr-row:last-child { border-bottom: 0; }
.hr-row > div { min-width: 0; }
.hr-row strong, .hr-row small { display: block; }
.hr-row small { margin-top: .18rem; color: var(--sf-muted); font-size: .8rem; line-height: 1.4; }
.hr-pill.done { background: #e4f7e9; color: #20733f; }
.hr-pill.open { background: #e8f5fb; color: #1d718b; }

@media (max-width: 767px) {
    .hr-status { min-width: 0; width: 100%; }
    .hr-welcome { padding: 1.2rem; }
    .hr-week-card { display: grid; width: 100%; box-sizing: border-box; }
    .hr-week-card__content small { max-width: 13rem; }
    .hr-actions--attendance { width: 100%; }
}
@media (max-width: 420px) {
    .hr-row { align-items: flex-start; flex-direction: column; }
}

/* Vacation and medical-leave self-service share one request workspace. */
.sf-request-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}

.sf-request-layout > .sf-metrics { grid-column: 1 / -1; }
.sf-request-card h2 { margin-bottom: .4rem; color: var(--sf-navy); }
.sf-request-card > p { margin: 0 0 1.15rem; color: var(--sf-muted); line-height: 1.5; }
.sf-request-card .sf-submit { margin-top: .25rem; background: linear-gradient(135deg, var(--sf-green), var(--sf-green-dark)); color: #fff; box-shadow: 0 8px 16px rgba(21,154,82,.18); }
.sf-request-card input[type='file'] { padding: .5rem; background: #f8fbf9; }
.sf-request-card input[type='file']::file-selector-button { margin-right: .7rem; border: 0; border-radius: .5rem; padding: .45rem .65rem; background: var(--sf-soft-green); color: var(--sf-green-dark); font-weight: 700; cursor: pointer; }
.sf-metric { min-width: 0; padding: 1.1rem; border: 1px solid var(--sf-line); border-radius: .9rem; background: linear-gradient(145deg,#fff,#f7fbf8); box-shadow: var(--sf-shadow); }
.sf-metric span { color: var(--sf-muted); font-size: .82rem; }
.sf-metric strong { display: block; margin-top: .35rem; color: var(--sf-navy); font-size: 1.55rem; }
.sf-badge { display: inline-flex; padding: .27rem .55rem; border-radius: 999px; background: #fff3d9; color: var(--sf-warning); font-size: .74rem; font-weight: 800; }

@media (max-width: 767px) {
    .sf-request-layout { grid-template-columns: minmax(0, 1fr); }
    .sf-request-layout > .sf-metrics { grid-column: auto; }
    .sf-request-card .sf-submit { width: 100%; }
}

/* Authentication: a focused, responsive SkinFarma entry experience. */
.fi-simple-layout {
    position: relative;
    isolation: isolate;
    min-height: 100dvh;
    overflow: hidden;
    background:
        radial-gradient(circle at 8% 13%, rgba(72, 117, 219, .36), transparent 20rem),
        radial-gradient(circle at 90% 88%, rgba(41, 196, 119, .18), transparent 26rem),
        linear-gradient(135deg, #142250 0%, #223775 47%, #186c56 100%);
}

.fi-simple-layout::before {
    position: absolute;
    inset: 0 auto 0 0;
    z-index: -1;
    width: min(46%, 43rem);
    content: '';
    background:
        linear-gradient(145deg, rgba(255,255,255,.09), transparent 55%),
        linear-gradient(90deg, rgba(6, 15, 45, .26), transparent);
    clip-path: polygon(0 0, 94% 0, 100% 100%, 0 100%);
}

.fi-simple-layout::after {
    position: absolute;
    right: -8rem;
    bottom: -10rem;
    z-index: -1;
    width: 30rem;
    height: 30rem;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 50%;
    content: '';
    box-shadow: 0 0 0 3.25rem rgba(255,255,255,.035), 0 0 0 6.5rem rgba(255,255,255,.025);
}

.fi-simple-main-ctn {
    position: relative;
    z-index: 1;
    padding: clamp(1.25rem, 4vw, 4.5rem);
}

.fi-simple-main {
    width: min(100%, 31rem) !important;
    margin: 0 0 0 auto !important;
    border: 1px solid rgba(255,255,255,.62) !important;
    border-radius: 1.5rem !important;
    padding: clamp(1.7rem, 4vw, 3rem) !important;
    background: rgba(255,255,255,.96) !important;
    box-shadow: 0 2rem 5rem rgba(5, 18, 46, .3) !important;
}

.fi-simple-header { margin-bottom: 1.7rem; }

.fi-simple-header .fi-logo,
.fi-simple-header img.fi-logo {
    box-sizing: content-box;
    width: min(12.5rem, 62vw) !important;
    height: auto !important;
    margin-bottom: 1.45rem !important;
    padding: .65rem .85rem;
    border: 1px solid #dce9e2;
    border-radius: 1.15rem;
    background: #fff;
    box-shadow: 0 .8rem 1.8rem rgba(25, 55, 43, .11);
}

.fi-simple-header-heading {
    color: var(--sf-navy) !important;
    font-family: 'Fraunces', serif !important;
    font-size: clamp(1.8rem, 4vw, 2.35rem) !important;
    font-weight: 700 !important;
    letter-spacing: -.045em !important;
    line-height: 1.05 !important;
}

.fi-simple-header-subheading {
    max-width: 22rem;
    margin-top: .75rem !important;
    color: #62746b !important;
    font-size: .95rem !important;
    line-height: 1.5 !important;
}

.fi-simple-main .fi-fo-field-wrp-label label { font-size: .86rem; }
.fi-simple-main .fi-input-wrp { border-radius: .82rem; }
.fi-simple-main .fi-input,
.fi-simple-main .fi-input-wrp-input { min-height: 3.15rem; }
.fi-simple-main .fi-btn { min-height: 3.15rem; border-radius: .82rem; font-size: .95rem; }
.fi-simple-main .fi-btn-primary { box-shadow: 0 .75rem 1.35rem rgba(17, 125, 66, .22); }
.fi-simple-main .fi-checkbox-input { border-radius: .35rem; }

@media (min-width: 1000px) {
    .fi-simple-main-ctn::before {
        position: absolute;
        left: clamp(2.75rem, 8vw, 9rem);
        top: 50%;
        width: min(31rem, 38vw);
        content: 'Gestión humana que acompaña cada jornada.';
        transform: translateY(-50%);
        color: rgba(255,255,255,.96);
        font-family: 'Fraunces', serif;
        font-size: clamp(2.5rem, 4.4vw, 4.8rem);
        font-weight: 700;
        letter-spacing: -.055em;
        line-height: .98;
        text-wrap: balance;
    }

    .fi-simple-main-ctn::after {
        position: absolute;
        left: clamp(2.75rem, 8vw, 9rem);
        top: calc(50% + 8.7rem);
        width: min(24rem, 32vw);
        content: 'SkinFarma reúne asistencia, solicitudes y documentación en un solo lugar.';
        color: rgba(234, 243, 239, .78);
        font-size: 1rem;
        line-height: 1.65;
    }
}

@media (max-width: 999px) {
    .fi-simple-layout::before { width: 100%; clip-path: none; opacity: .5; }
    .fi-simple-main-ctn { align-items: center; padding: clamp(1rem, 5vw, 2.5rem); }
    .fi-simple-main { margin: auto !important; }
}

@media (max-width: 520px) {
    .fi-simple-layout { background: linear-gradient(155deg, #17285d 0%, #284386 46%, #177457 100%); }
    .fi-simple-main-ctn { align-items: flex-start; padding: .9rem; }
    .fi-simple-main { margin: 1.1rem auto !important; border-radius: 1.2rem !important; padding: 1.5rem 1.2rem !important; }
    .fi-simple-header { margin-bottom: 1.35rem; }
    .fi-simple-header .fi-logo, .fi-simple-header img.fi-logo { width: min(11.25rem, 64vw) !important; margin-bottom: 1.15rem !important; padding: .5rem .65rem; border-radius: 1rem; }
    .fi-simple-header-subheading { font-size: .88rem !important; }
}

/* Login refinement: focused access without promotional copy. */
.fi-simple-main { margin: auto !important; }

@media (min-width: 1000px) {
    .fi-simple-main-ctn::before,
    .fi-simple-main-ctn::after {
        content: none;
    }
}

/* Refined approvals inbox: readable request cards and deliberate actions. */
.sf-approvals--refined { gap: 1.45rem; }
.sf-approvals--refined .sf-approvals__summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sf-approvals--refined .sf-approval-stat { min-height: 6.6rem; border: 0; border-radius: 1.1rem; box-shadow: 0 14px 28px rgba(27, 63, 43, .07); }
.sf-approvals--refined .sf-approval-filter-card { padding: 1.1rem 1.25rem 1.2rem; border-radius: 1.1rem; }
.sf-approval-filter-head > div { display: grid; gap: .2rem; }
.sf-approval-filter-head small, .sf-approval-filter-hint { color: var(--sf-muted); font-size: .78rem; }
.sf-approval-filter-hint { padding: .32rem .58rem; border-radius: 999px; background: #f3f8f5; font-weight: 700; }
.sf-approvals--refined .sf-approval-toolbar { grid-template-columns: 1.45fr 1.1fr repeat(2, minmax(8.25rem, .9fr)) minmax(10.8rem, 1fr); }
.sf-approvals--refined .sf-approval-section { overflow: visible; border: 0; border-radius: 1.15rem; background: transparent; box-shadow: none; }
.sf-approvals--refined .sf-approval-section__head { padding: 0 .2rem .7rem; border: 0; background: transparent; }
.sf-approval-section__title > div { display: grid; gap: .08rem; }
.sf-approval-section__title small { color: var(--sf-muted); font-size: .74rem; font-weight: 500; }
.sf-approvals--refined .sf-approval-list { gap: .75rem; }
.sf-approvals--refined .sf-approval-item { grid-template-columns: minmax(0, 1fr) minmax(11.6rem, 13.5rem); min-height: 0; padding: 0; overflow: hidden; border: 1px solid var(--sf-line); border-radius: 1rem; background: #fff; box-shadow: 0 9px 22px rgba(25, 54, 42, .055); transition: transform .18s ease, box-shadow .18s ease; }
.sf-approvals--refined .sf-approval-item:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(25, 54, 42, .1); }
.sf-approvals--refined .sf-approval-person { align-items: center; padding: 1.1rem 1.2rem; }
.sf-approvals--refined .sf-approval-avatar { width: 2.7rem; height: 2.7rem; border-radius: .85rem; }
.sf-approvals--refined .sf-approval-details { display: grid; gap: .38rem; }
.sf-approvals--refined .sf-approval-details strong { color: var(--sf-ink); font-size: .98rem; }
.sf-approval-meta { display: flex; flex-wrap: wrap; gap: .35rem; }
.sf-approval-meta span { padding: .22rem .48rem; border-radius: .45rem; background: #f3f7f5; color: #60736a; font-size: .74rem; line-height: 1.35; }
.sf-approval-meta span:last-child { background: #e8f6ec; color: #176e41; font-weight: 800; }
.sf-approvals--refined .sf-approval-note { margin: 0; color: #53665c; }
.sf-approvals--refined .sf-approval-side { align-items: stretch; justify-content: center; gap: .48rem; min-width: 0; padding: .9rem; border-left: 1px solid #e8f0eb; background: linear-gradient(180deg, #fbfdfc, #f4f9f6); }
.sf-approvals--refined .sf-approval-side .sf-approval-status { align-self: flex-start; margin: 0; }
.sf-approvals--refined .sf-approval-btn--detail { width: 100%; background: #fff; }
.sf-approvals--refined .sf-approval-actions { width: 100%; padding: .2rem; border-radius: .7rem; }
.sf-approvals--refined .sf-approval-actions .sf-approval-btn { flex: 1; }

@media (max-width: 900px) {
    .sf-approvals--refined .sf-approval-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .sf-approvals--refined .sf-approvals__summary, .sf-approvals--refined .sf-approval-toolbar { grid-template-columns: minmax(0, 1fr); }
    .sf-approvals--refined .sf-approval-filter-head { align-items: flex-start; flex-direction: column; }
    .sf-approvals--refined .sf-approval-item { grid-template-columns: minmax(0, 1fr); }
    .sf-approvals--refined .sf-approval-person { align-items: flex-start; padding: 1rem; }
    .sf-approvals--refined .sf-approval-side { padding: .85rem 1rem 1rem; border-top: 1px solid #e8f0eb; border-left: 0; }
}

/* Empty approval states retain the same finished card treatment as active requests. */
.sf-approvals--refined .sf-approval-empty {
    display: grid;
    justify-items: center;
    align-content: center;
    min-height: 11.5rem;
    padding: 2rem 1.25rem;
    border: 1px solid var(--sf-line);
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 9px 22px rgba(25, 54, 42, .055);
    color: var(--sf-muted);
    text-align: center;
}

.sf-approvals--refined .sf-approval-empty svg {
    width: 2.75rem;
    height: 2.75rem;
    margin-bottom: .75rem;
    padding: .62rem;
    border-radius: .85rem;
    background: #e8f7ed;
    color: #15964f;
    box-sizing: content-box;
}

.sf-approvals--refined .sf-approval-empty strong {
    color: var(--sf-ink);
    font-size: .98rem;
}

.sf-approvals--refined .sf-approval-empty span {
    max-width: 27rem;
    margin-top: .25rem;
    font-size: .84rem;
    line-height: 1.5;
}

@media (max-width: 640px) {
    .sf-approvals--refined .sf-approval-empty { min-height: 9.5rem; padding: 1.5rem 1rem; }
}

/* Keep the primary employee action visible in Filament resource listings. */
.fi-page:has(.fi-ta) .fi-header-actions {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.fi-page:has(.fi-ta) .fi-header-actions .fi-btn {
    white-space: nowrap;
}

@media (max-width: 640px) {
    .fi-page:has(.fi-ta) .fi-header-actions { width: 100%; }
    .fi-page:has(.fi-ta) .fi-header-actions .fi-btn { width: 100%; justify-content: center; }
}

/* Resource actions remain available while headings stay visually suppressed. */
.fi-main .fi-header {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
}

.fi-main .fi-header-actions {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Shared contextual navigation for record forms and detail views. */
.sf-page-back {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 0 0 1rem;
}

.sf-page-back__button {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    min-height: 2.45rem;
    padding: .55rem .85rem;
    border: 1px solid #dce8e1;
    border-radius: .72rem;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 5px 14px rgba(20, 54, 39, .06);
    color: var(--sf-navy);
    cursor: pointer;
    font: inherit;
    font-size: .84rem;
    font-weight: 800;
    line-height: 1;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.sf-page-back__button:hover {
    transform: translateX(-2px);
    border-color: #9cd6af;
    background: #f2fbf5;
    box-shadow: 0 8px 18px rgba(20, 110, 65, .1);
}

.sf-page-back__button:focus-visible {
    outline: 3px solid rgba(21, 154, 82, .25);
    outline-offset: 2px;
}

.sf-page-back__icon { width: 1rem; height: 1rem; }

@media (max-width: 640px) {
    .sf-page-back { margin-bottom: .75rem; }
    .sf-page-back__button { min-height: 2.35rem; padding: .5rem .72rem; }
}

/* Filament owns select affordances: reset inherited decorations to one native indicator. */
.fi-main select:not([multiple]),
.fi-modal select:not([multiple]) {
    appearance: auto !important;
    -webkit-appearance: auto !important;
    background-image: none !important;
    padding-right: .75rem !important;
}

.fi-main select[multiple],
.fi-modal select[multiple] {
    background-image: none !important;
}

/* Reports and control: operational summary with export-ready data. */
.sf-reports { display: grid; gap: 1.15rem; max-width: 90rem; }
.sf-report-filter-card, .sf-report-panel { border: 1px solid var(--sf-line); border-radius: 1.1rem; background: #fff; box-shadow: 0 10px 24px rgba(24, 61, 42, .055); }
.sf-report-filter-card { display: grid; grid-template-columns: minmax(12rem, 1fr) minmax(20rem, 1.5fr) auto; gap: 1rem; align-items: end; padding: 1.15rem 1.25rem; }
.sf-report-filter-card strong, .sf-report-panel header strong { display: block; color: var(--sf-ink); font-size: 1rem; }
.sf-report-filter-card span, .sf-report-panel header span { display: block; margin-top: .22rem; color: var(--sf-muted); font-size: .8rem; }
.sf-report-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.sf-report-filters input, .sf-report-filters select { min-width: 0; min-height: 2.65rem; padding: .55rem .7rem; border: 1px solid #d9e5de; border-radius: .7rem; background: #fcfefd; color: var(--sf-ink); font: inherit; }
.sf-report-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.sf-report-action { display: inline-flex; align-items: center; justify-content: center; min-height: 2.65rem; padding: .55rem .8rem; border: 1px solid #14944e; border-radius: .7rem; background: #14944e; color: #fff; font: inherit; font-size: .8rem; font-weight: 800; text-decoration: none; cursor: pointer; }
.sf-report-action--secondary { border-color: #d4e8dc; background: #f2fbf5; color: #177042; }
.sf-report-action--print { border-color: #d9e3dd; background: #fff; color: var(--sf-navy); }
.sf-report-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .8rem; }
.sf-report-metrics article { min-width: 0; padding: 1rem; border: 1px solid var(--sf-line); border-radius: 1rem; background: #fff; box-shadow: 0 8px 20px rgba(24, 61, 42, .045); }
.sf-report-metrics span { display: block; color: var(--sf-muted); font-size: .75rem; line-height: 1.35; }
.sf-report-metrics strong { display: block; margin-top: .4rem; color: var(--sf-navy); font-size: 1.3rem; overflow-wrap: anywhere; }
.sf-report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.sf-report-panel header { padding: 1rem 1.15rem; border-bottom: 1px solid #edf2ef; }
.sf-report-alerts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; padding: .9rem 1.15rem 1.15rem; }
.sf-report-alerts a { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .75rem; border: 1px solid #e4eee8; border-radius: .75rem; color: var(--sf-ink); text-decoration: none; }
.sf-report-alerts a:hover { border-color: #9ed6b0; background: #f5fcf7; }
.sf-report-alerts span { font-size: .82rem; } .sf-report-alerts strong { color: #177042; }
.sf-report-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 1.15rem; }
.sf-report-split > div + div { border-left: 1px solid #e7efea; padding-left: 1.15rem; }
.sf-report-split span { display: block; color: var(--sf-muted); font-size: .8rem; } .sf-report-split strong { display: block; margin-top: .35rem; color: var(--sf-navy); font-size: 1.55rem; }
.sf-report-table-wrap { overflow-x: auto; } .sf-report-table { width: 100%; min-width: 42rem; border-collapse: collapse; }
.sf-report-table th, .sf-report-table td { padding: .85rem 1.1rem; border-bottom: 1px solid #edf2ef; text-align: left; white-space: nowrap; }
.sf-report-table th { color: var(--sf-muted); font-size: .7rem; letter-spacing: .05em; text-transform: uppercase; } .sf-report-table td { color: #35483d; font-size: .84rem; }
.sf-report-status { display: inline-flex; padding: .25rem .48rem; border-radius: 999px; background: #e4f6e9; color: #187144; font-size: .72rem; font-weight: 800; } .sf-report-status.is-open { background: #fff0d6; color: #9a650c; }
.sf-report-empty { padding: 2rem !important; color: var(--sf-muted); text-align: center !important; }
@media (max-width: 1024px) { .sf-report-filter-card { grid-template-columns: 1fr; } .sf-report-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .sf-reports { gap: .85rem; } .sf-report-filter-card, .sf-report-panel { border-radius: .9rem; } .sf-report-filters, .sf-report-metrics, .sf-report-grid, .sf-report-alerts, .sf-report-split { grid-template-columns: 1fr; } .sf-report-split > div + div { margin-top: .9rem; padding: .9rem 0 0; border-top: 1px solid #e7efea; border-left: 0; } .sf-report-actions > * { width: 100%; } }
@media print { .fi-sidebar, .fi-topbar, .sf-report-filter-card, .sf-page-back { display: none !important; } .fi-main, .sf-reports { padding: 0 !important; } .sf-report-panel, .sf-report-metrics article { box-shadow: none !important; } }
/* Reportes: un mismo patrón de exportación para Excel y PDF. */
.sf-report-export-actions{display:flex!important;flex-wrap:wrap;gap:.5rem;margin-top:.8rem}.sf-report-export-actions a{border-radius:.65rem;padding:.62rem .8rem;text-align:center;color:#fff!important;background:#159b53;font-size:.78rem;font-weight:800;text-decoration:none}.sf-report-export-actions .is-pdf{color:#9f3c3c!important;background:#fff;border:1px solid #f0cbcb}@media(max-width:700px){.sf-report-export-actions{display:grid!important;grid-template-columns:1fr 1fr}.sf-report-export-actions a{padding:.65rem .45rem;font-size:.74rem}}
.sf-report-geofence{display:inline-flex;max-width:13rem;border-radius:999px;padding:.28rem .55rem;font-size:.74rem;font-weight:750;line-height:1.2;background:#fff2d8;color:#9a6100}.sf-report-geofence.is-inside{background:#e6f7ed;color:#087443}.sf-report-geofence.is-outside{background:#fff0ef;color:#b13a36}
/* Centro de reportes premium: bloques claros, exportaciones y trazabilidad. */
.sf-reports--premium{gap:1.35rem}.sf-report-filter-card--premium{grid-template-columns:minmax(15rem,.85fr) minmax(28rem,1.6fr);align-items:end;padding:1.35rem 1.45rem;background:linear-gradient(120deg,#fff 0%,#f8fcf9 62%,#e8f7ee 100%)}.sf-report-eyebrow{display:block;color:#5e8270!important;font-size:.68rem!important;font-weight:800;letter-spacing:.1em;text-transform:uppercase}.sf-report-filter-intro strong{margin:.2rem 0!important;font-size:1.18rem!important}.sf-report-filters label{display:grid;gap:.35rem;min-width:0}.sf-report-filters label>span{color:#5b7164;font-size:.72rem;font-weight:800}.sf-report-filters input,.sf-report-filters select{width:100%;box-sizing:border-box}.sf-report-metrics--premium{grid-template-columns:repeat(5,minmax(0,1fr));gap:.85rem}.sf-report-metrics--premium article{display:flex;align-items:center;gap:.75rem;padding:1rem 1.05rem}.sf-report-metric-icon{display:grid;place-items:center;flex:0 0 2.35rem;height:2.35rem;border-radius:.75rem;font-size:.78rem;font-weight:900}.sf-report-metric-icon.is-green{background:#def8e8;color:#078147}.sf-report-metric-icon.is-blue{background:#e5edff;color:#315fbd}.sf-report-metric-icon.is-amber{background:#fff1d7;color:#a26300}.sf-report-metric-icon.is-purple{background:#f0e8ff;color:#7553b8}.sf-report-metric-icon.is-rose{background:#ffe9ee;color:#b44d68}.sf-report-metrics--premium strong{font-size:1.12rem}.sf-report-export-section{padding:1.2rem 1.25rem;border:1px solid var(--sf-line);border-radius:1.1rem;background:#fff;box-shadow:0 10px 24px rgba(24,61,42,.045)}.sf-report-section-heading{display:flex;align-items:end;justify-content:space-between;gap:1rem;margin-bottom:1rem}.sf-report-section-heading strong{display:block;margin-top:.18rem;color:var(--sf-ink);font-size:1.02rem}.sf-report-section-heading>span{color:var(--sf-muted);font-size:.78rem}.sf-report-export-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.85rem}.sf-report-export-card{display:grid;grid-template-columns:auto 1fr;gap:.75rem;padding:1rem;border:1px solid #dfeae4;border-radius:.9rem;background:linear-gradient(145deg,#fff,#f8fcfa);transition:transform .2s ease,box-shadow .2s ease}.sf-report-export-card:hover{transform:translateY(-2px);box-shadow:0 12px 22px rgba(22,76,47,.09)}.sf-report-export-icon{display:grid;place-items:center;width:2.55rem;height:2.55rem;border-radius:.78rem;background:linear-gradient(135deg,#243877,#1b9f59);color:#fff;font-size:.84rem;font-weight:900}.sf-report-export-copy p{margin:.25rem 0 0;color:var(--sf-muted);font-size:.78rem;line-height:1.45}.sf-report-export-actions{grid-column:1/-1;display:grid!important;grid-template-columns:1fr 1fr;gap:.5rem;margin:0!important}.sf-report-export-actions a{padding:.6rem .5rem;border-radius:.62rem;background:#159b53;color:#fff!important;font-size:.78rem;font-weight:800;text-align:center;text-decoration:none}.sf-report-export-actions .is-pdf{border:1px solid #efcfd0;background:#fff;color:#af3e43!important}.sf-report-grid--premium{gap:1.1rem}.sf-report-panel--attendance header{display:flex;align-items:center;justify-content:space-between;gap:1rem}.sf-report-table-count{padding:.3rem .6rem;border-radius:999px;background:#edf7f0;color:#357453;font-size:.73rem;font-weight:800;white-space:nowrap}.sf-report-table td strong{color:#1f3528}.sf-report-table tbody tr{transition:background .2s ease}.sf-report-table tbody tr:hover{background:#f7fbf8}.sf-report-geofence{white-space:normal!important}
@media(max-width:1100px){.sf-report-filter-card--premium{grid-template-columns:1fr}.sf-report-metrics--premium{grid-template-columns:repeat(3,minmax(0,1fr))}.sf-report-export-grid{grid-template-columns:1fr}}
@media(max-width:640px){.sf-report-filter-card--premium,.sf-report-export-section{padding:1rem}.sf-report-section-heading,.sf-report-panel--attendance header{align-items:flex-start;flex-direction:column}.sf-report-metrics--premium{grid-template-columns:1fr 1fr}.sf-report-metrics--premium article{padding:.85rem}.sf-report-table{min-width:0}.sf-report-table thead{display:none}.sf-report-table,.sf-report-table tbody,.sf-report-table tr,.sf-report-table td{display:block;width:100%;box-sizing:border-box}.sf-report-table tbody{display:grid;gap:.75rem;padding:.75rem}.sf-report-table tr{padding:.85rem;border:1px solid #e0ebe5;border-radius:.85rem;background:#fff;box-shadow:0 7px 16px rgba(24,61,42,.04)}.sf-report-table td{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.35rem 0!important;border:0!important;text-align:right;white-space:normal!important}.sf-report-table td::before{content:attr(data-label);color:#788b81;font-size:.7rem;font-weight:800;text-align:left}.sf-report-table td:first-child{padding-bottom:.65rem!important;margin-bottom:.3rem;border-bottom:1px solid #edf2ef!important}.sf-report-table td:first-child::before{display:none}.sf-report-table-count{align-self:flex-start}}
/* Indicadores: bloque centrado y contenido alineado. */
.sf-report-metrics--premium{width:min(100%,82rem);margin-inline:auto;justify-content:center}.sf-report-metrics--premium article{justify-content:center;min-height:5.8rem}.sf-report-metrics--premium article>div{min-width:0;text-align:left}.sf-report-metrics--premium article>div span,.sf-report-metrics--premium article>div strong{margin-left:0;margin-right:0}
@media(max-width:1100px){.sf-report-metrics--premium{width:100%}.sf-report-metrics--premium article{justify-content:flex-start}}
/* Centrado visual de cada indicador del centro de reportes. */
.sf-reports--premium .sf-report-metrics--premium article{display:flex!important;justify-content:center!important;align-items:center!important;text-align:center!important}.sf-reports--premium .sf-report-metrics--premium article>div{display:flex!important;flex-direction:column!important;align-items:center!important;text-align:center!important}.sf-reports--premium .sf-report-metrics--premium article>div span,.sf-reports--premium .sf-report-metrics--premium article>div strong{text-align:center!important}.sf-reports--premium .sf-report-metrics--premium article .sf-report-metric-icon{margin:0!important}
@media(max-width:1100px){.sf-reports--premium .sf-report-metrics--premium article{justify-content:center!important}}
/* Evita que las reglas globales de texto alteren las iniciales de indicadores. */
.sf-reports--premium .sf-report-metrics--premium .sf-report-metric-icon{display:flex!important;align-items:center!important;justify-content:center!important;box-sizing:border-box!important;padding:0!important;margin:0!important;line-height:1!important;text-align:center!important;text-indent:0!important;letter-spacing:0!important}.sf-reports--premium .sf-report-metrics--premium .sf-report-metric-icon::before,.sf-reports--premium .sf-report-metrics--premium .sf-report-metric-icon::after{display:none!important;content:none!important}

/* Sedes y geocercas: selector de ubicación y radio de marcación. */
.sf-location-map {
    box-sizing: border-box;
    width: 100%;
    margin-top: .25rem;
    overflow: hidden;
    border: 1px solid #d7e7de;
    border-radius: 1.25rem;
    background: #fff;
    box-shadow: 0 14px 32px rgba(27, 69, 49, .08);
}

.sf-location-map__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.35rem;
    border-bottom: 1px solid #e3eee8;
    background: linear-gradient(115deg, #f8fcf9 0%, #effaf3 100%);
}

.sf-location-map__eyebrow {
    margin: 0 0 .25rem;
    color: #168b50;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.sf-location-map__header h3 {
    margin: 0;
    color: #162d54;
    font-size: 1.05rem;
    font-weight: 750;
}

.sf-location-map__header p:not(.sf-location-map__eyebrow) {
    max-width: 42rem;
    margin: .35rem 0 0;
    color: #65776c;
    font-size: .875rem;
    line-height: 1.45;
}

.sf-location-map__location-button {
    flex: 0 0 auto;
    min-height: 2.65rem;
    padding: 0 .95rem;
    border: 1px solid #b8dfc6;
    border-radius: .75rem;
    background: #fff;
    color: #137a45;
    font-weight: 700;
    font-size: .825rem;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.sf-location-map__location-button:hover {
    border-color: #159957;
    background: #ecfaf1;
    transform: translateY(-1px);
}

.sf-location-map__canvas {
    width: 100%;
    min-height: 25rem;
    background: #e6eee9;
}

.sf-location-map .leaflet-container {
    z-index: 1;
    font-family: inherit;
}

.sf-location-map__footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .85rem 1.35rem;
    color: #607167;
    font-size: .8rem;
    line-height: 1.4;
    background: #fbfdfc;
}

.sf-location-map__status { min-width: 0; }
.sf-location-map__radius { flex: 0 0 auto; color: #177544; font-weight: 750; }

@media (max-width: 640px) {
    .sf-location-map { border-radius: 1rem; }
    .sf-location-map__header { flex-direction: column; padding: 1rem; }
    .sf-location-map__location-button { width: 100%; }
    .sf-location-map__canvas { min-height: 19rem; }
    .sf-location-map__footer { flex-direction: column; gap: .3rem; padding: .75rem 1rem; }
}

/* Modal de plantillas: siempre por encima del menú y dentro del viewport. */
#headlessui-portal-root,
.fi-modal {
    position: relative;
    z-index: 1000 !important;
}

.fi-modal-window {
    width: min(80rem, calc(100vw - 2rem)) !important;
    max-width: calc(100vw - 2rem) !important;
    max-height: calc(100dvh - 2rem) !important;
    overflow: hidden !important;
}

.fi-modal-content,
.fi-modal-window > * {
    max-height: calc(100dvh - 2rem);
}

.fi-modal-content {
    overflow-y: auto !important;
    overscroll-behavior: contain;
}

.fi-modal .fi-fo-section,
.fi-modal .fi-section {
    min-width: 0;
}

.fi-modal .fi-fo-rich-editor,
.fi-modal .tiptap,
.fi-modal [contenteditable='true'] {
    min-width: 0;
    max-width: 100%;
}

@media (max-width: 640px) {
    .fi-modal-window {
        width: calc(100vw - 1rem) !important;
        max-width: calc(100vw - 1rem) !important;
        max-height: calc(100dvh - 1rem) !important;
        border-radius: 1rem !important;
    }

    .fi-modal-content,
    .fi-modal-window > * {
        max-height: calc(100dvh - 1rem);
    }

    .fi-modal .fi-modal-header,
    .fi-modal .fi-modal-footer {
        padding-inline: 1rem !important;
    }

    .fi-modal .fi-fo-section-content,
    .fi-modal .fi-section-content {
        padding: .9rem !important;
    }
}

.hr-attendance-feedback {
    margin: 0.9rem 0 0;
    padding: 0.75rem 0.9rem;
    border: 1px solid rgba(255, 226, 139, 0.52);
    border-radius: 0.75rem;
    background: rgba(28, 35, 84, 0.3);
    color: #fff4c7;
    font-size: 0.875rem;
    line-height: 1.4;
}

/* Estado de marcacion: nunca dejar al usuario sin contexto. */
.hr-attendance-hint {
    margin: .75rem 0 0;
    color: rgba(255, 255, 255, .78);
    font-size: .78rem;
    line-height: 1.45;
    max-width: 28rem;
}

.hr-attendance-feedback {
    min-height: 0;
}

.hr-action:disabled {
    cursor: not-allowed;
    opacity: .58;
}

/* Mapa de sedes: viewport finito y consistente en todas las pantallas. */
.sf-location-map__canvas {
    height: clamp(18rem, 44vh, 32rem);
    min-height: 0;
    max-height: 32rem;
    overflow: hidden;
    contain: layout paint;
}

.sf-location-map .leaflet-container {
    width: 100%;
    height: 100% !important;
    min-height: 0;
}

@media (max-width: 640px) {
    .sf-location-map__canvas {
        height: min(22rem, 58vh);
        max-height: 22rem;
    }
}

/* Leaflet base rules: keep map tiles positioned when the vendor stylesheet is delayed. */
.sf-location-map .leaflet-container {
    position: relative;
    overflow: hidden;
    background: #dfeae4;
}
.sf-location-map .leaflet-pane,
.sf-location-map .leaflet-tile,
.sf-location-map .leaflet-marker-icon,
.sf-location-map .leaflet-marker-shadow,
.sf-location-map .leaflet-overlay-pane svg,
.sf-location-map .leaflet-overlay-pane canvas {
    position: absolute;
    left: 0;
    top: 0;
}
.sf-location-map .leaflet-tile-pane { z-index: 2; }
.sf-location-map .leaflet-overlay-pane { z-index: 4; }
.sf-location-map .leaflet-shadow-pane { z-index: 5; }
.sf-location-map .leaflet-marker-pane { z-index: 6; }
.sf-location-map .leaflet-tooltip-pane { z-index: 7; }
.sf-location-map .leaflet-popup-pane { z-index: 8; }
.sf-location-map .leaflet-tile-container {
    position: absolute;
    left: 0;
    top: 0;
}
.sf-location-map .leaflet-tile-container img,
.sf-location-map img.leaflet-tile {
    width: 256px !important;
    height: 256px !important;
    max-width: none !important;
    border: 0 !important;
}
.sf-location-map .leaflet-control {
    position: relative;
    z-index: 800;
    float: left;
}
.sf-location-map .leaflet-top,
.sf-location-map .leaflet-bottom {
    position: absolute;
    z-index: 1000;
    pointer-events: none;
}
.sf-location-map .leaflet-top { top: 0; }
.sf-location-map .leaflet-bottom { bottom: 0; }
.sf-location-map .leaflet-left { left: 0; }
.sf-location-map .leaflet-right { right: 0; }
.sf-location-map .leaflet-top .leaflet-control,
.sf-location-map .leaflet-bottom .leaflet-control {
    pointer-events: auto;
}

/* Layout Filament: el contenido nunca invade el ancho reservado del menu. */
@media (min-width: 1024px) {
    .fi-layout {
        width: 100%;
        max-width: 100vw;
        overflow-x: clip;
    }

    .fi-main-ctn {
        width: calc(100vw - var(--sidebar-width)) !important;
        min-width: 0 !important;
        max-width: calc(100vw - var(--sidebar-width)) !important;
        flex: 0 0 calc(100vw - var(--sidebar-width)) !important;
    }

    .fi-main-sidebar,
    .fi-sidebar {
        width: var(--sidebar-width) !important;
        min-width: var(--sidebar-width) !important;
        max-width: var(--sidebar-width) !important;
        flex: 0 0 var(--sidebar-width) !important;
    }

    .fi-main {
        width: 100%;
        max-width: none !important;
        min-width: 0;
    }
}

@media (max-width: 1023px) {
    .fi-main-ctn {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }
}

/* Selects globales: misma experiencia visual en Admin, RRHH y portal empleado. */
:root {
    --sf-select-height: 2.7rem;
    --sf-select-border: #d5e2db;
    --sf-select-background: #fcfefd;
    --sf-select-arrow: #587067;
}

.fi-main select:not([multiple]),
.fi-modal select:not([multiple]),
.sf-field select,
.sf-approval-filter,
.sf-notif-filter,
.sf-report-filters select {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 100%;
    min-width: 0;
    min-height: var(--sf-select-height);
    padding: .55rem 2.55rem .55rem .8rem !important;
    border: 1px solid var(--sf-select-border) !important;
    border-radius: .72rem !important;
    background-color: var(--sf-select-background) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns=http://www.w3.org/2000/svg width=18 height=18 viewBox=0 0 24 24 fill=none stroke=%23587067 stroke-width=2 stroke-linecap=round stroke-linejoin=round%3E%3Cpath d=m6 9 6 6 6-6/%3E%3C/svg%3E") !important;
    background-position: right .72rem center !important;
    background-repeat: no-repeat !important;
    background-size: 1.05rem 1.05rem !important;
    color: var(--sf-ink) !important;
    font: inherit;
    line-height: 1.35;
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.fi-main select:not([multiple]):hover,
.fi-modal select:not([multiple]):hover,
.sf-field select:hover,
.sf-approval-filter:hover,
.sf-notif-filter:hover,
.sf-report-filters select:hover {
    border-color: #a7c9b4 !important;
    background-color: #ffffff !important;
}

.fi-main select:not([multiple]):focus,
.fi-modal select:not([multiple]):focus,
.sf-field select:focus,
.sf-approval-filter:focus,
.sf-notif-filter:focus,
.sf-report-filters select:focus {
    outline: none !important;
    border-color: var(--sf-green) !important;
    box-shadow: 0 0 0 3px rgba(21, 154, 82, .13) !important;
}

.fi-main select[multiple],
.fi-modal select[multiple] {
    appearance: auto;
    -webkit-appearance: auto;
    background-image: none !important;
    padding-right: .75rem !important;
}

/* Selects enriquecidos de Filament/Choices: conservan la misma caja y una sola flecha. */
.fi-main .choices,
.fi-modal .choices {
    width: 100%;
    min-width: 0;
}

.fi-main .choices__inner,
.fi-modal .choices__inner {
    min-height: var(--sf-select-height) !important;
    padding: .34rem 2.55rem .34rem .8rem !important;
    border: 1px solid var(--sf-select-border) !important;
    border-radius: .72rem !important;
    background-color: var(--sf-select-background) !important;
    background-image: none !important;
    color: var(--sf-ink) !important;
    font: inherit;
}

.fi-main .choices[data-type*="select-one"]::after,
.fi-modal .choices[data-type*="select-one"]::after {
    width: .58rem;
    height: .58rem;
    margin: 0;
    border: 0 !important;
    border-right: 2px solid var(--sf-select-arrow) !important;
    border-bottom: 2px solid var(--sf-select-arrow) !important;
    transform: rotate(45deg) translateY(-35%);
    right: .95rem;
    top: 50%;
}

.fi-main .choices.is-focused .choices__inner,
.fi-modal .choices.is-focused .choices__inner,
.fi-main .choices.is-open .choices__inner,
.fi-modal .choices.is-open .choices__inner {
    border-color: var(--sf-green) !important;
    box-shadow: 0 0 0 3px rgba(21, 154, 82, .13) !important;
}

.fi-main .choices.is-open[data-type*="select-one"]::after,
.fi-modal .choices.is-open[data-type*="select-one"]::after {
    margin-top: .25rem;
    transform: rotate(225deg) translateY(-35%);
}

.fi-main .choices__list--dropdown,
.fi-modal .choices__list--dropdown {
    z-index: 90;
    border: 1px solid var(--sf-select-border) !important;
    border-radius: .72rem !important;
    background: #fff !important;
    box-shadow: 0 14px 28px rgba(25, 54, 42, .12) !important;
}

@media (max-width: 640px) {
    .fi-main select:not([multiple]),
    .fi-modal select:not([multiple]),
    .sf-field select,
    .sf-approval-filter,
    .sf-notif-filter,
    .sf-report-filters select,
    .fi-main .choices__inner,
    .fi-modal .choices__inner {
        min-height: 3rem;
        font-size: .95rem;
    }
}

/* El canvas del mapa debe conservar espacio aunque Leaflet tarde en inicializar. */
.sf-location-map > .sf-location-map__canvas,
.sf-location-map__canvas {
    display: block !important;
    width: 100% !important;
    height: clamp(18rem, 44vh, 32rem) !important;
    min-height: 18rem !important;
    max-height: 32rem !important;
    overflow: hidden !important;
    background: #e6eee9 !important;
}

@media (max-width: 640px) {
    .sf-location-map > .sf-location-map__canvas,
    .sf-location-map__canvas {
        height: min(22rem, 58vh) !important;
        min-height: 18rem !important;
        max-height: 22rem !important;
    }
}

/* Aprobaciones: encabezados de vacaciones e incapacidades con la misma jerarquia visual. */
.sf-approvals--refined .sf-approval-section__head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 1rem !important;
    flex-direction: row !important;
}

.sf-approvals--refined .sf-approval-section__head .sf-approval-filter--compact {
    width: min(100%, 15rem) !important;
    min-width: 11.875rem !important;
    flex: 0 0 auto !important;
}

@media (max-width: 767px) {
    .sf-approvals--refined .sf-approval-section__head {
        align-items: flex-start !important;
        flex-direction: column !important;
        gap: .7rem !important;
    }

    .sf-approvals--refined .sf-approval-section__head .sf-approval-filter--compact {
        width: min(100%, 15rem) !important;
        min-width: 0 !important;
    }
}

/* Acabado premium para la tendencia de cumplimiento. */
.hr-home .sf-performance { position:relative; overflow:hidden; border-color:#dcebe2; background:linear-gradient(135deg,#fff 0%,#fbfefc 64%,#effaf3 100%); box-shadow:0 18px 40px rgba(27,62,45,.09); }
.hr-home .sf-performance::before { content:''; position:absolute; width:11rem; height:11rem; top:-7rem; right:-4rem; border-radius:50%; background:radial-gradient(circle,rgba(21,154,82,.14),rgba(21,154,82,0) 68%); pointer-events:none; }
.sf-performance__head { position:relative; padding-bottom:.85rem; border-bottom:1px solid rgba(220,232,225,.8); }.sf-performance__head h3 { font-family:'Fraunces',serif; font-size:1.25rem; letter-spacing:-.02em; }.sf-performance__head h3::before { content:'ASISTENCIA'; display:block; margin-bottom:.3rem; color:var(--sf-green); font-family:'DM Sans',sans-serif; font-size:.64rem; font-weight:800; letter-spacing:.12em; }
.sf-performance__totals span { min-width:9.5rem; justify-content:space-between; border:1px solid #e3eee7; background:rgba(255,255,255,.8); box-shadow:0 6px 14px rgba(30,68,47,.04); }.sf-performance__totals span:nth-child(1) b{color:#b47712}.sf-performance__totals span:nth-child(2) b{color:#c35454}.sf-performance__totals span:nth-child(3) b{color:var(--sf-green-dark)}
.sf-performance__chart { gap:.9rem; padding-top:1rem; border-top:0; }.sf-performance__week { min-height:4.8rem; border:1px solid #e5f0e9; background:linear-gradient(180deg,#f7fcf8,#eef8f1); transition:transform .18s ease,box-shadow .18s ease; }.sf-performance__week:hover{transform:translateY(-3px);box-shadow:0 9px 18px rgba(27,92,53,.1)}.sf-performance__week b{display:grid;place-items:center;width:2rem;height:2rem;border-radius:.65rem;background:#fff;box-shadow:0 4px 10px rgba(33,77,52,.08)}

/* Gráfica circular de cumplimiento. */
.sf-performance-donut-layout{display:grid;grid-template-columns:10.5rem minmax(0,1fr);align-items:center;gap:1.4rem;margin-top:1.15rem}.sf-performance-donut{display:grid;place-items:center;width:10.5rem;height:10.5rem;border-radius:50%;background:conic-gradient(#e3a32f 0 var(--late-end),#d96565 var(--late-end) var(--early-end),#159a52 var(--early-end) 100%);box-shadow:0 13px 26px rgba(27,74,49,.14)}.sf-performance-donut>div{display:grid;place-items:center;width:7.6rem;height:7.6rem;border-radius:50%;background:#fff;box-shadow:inset 0 0 0 1px #edf2ef}.sf-performance-donut strong{color:var(--sf-navy);font-size:2rem;line-height:1}.sf-performance-donut span{margin-top:.25rem;color:var(--sf-muted);font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.07em}.sf-performance-donut-layout .sf-performance__totals{margin:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}@media(max-width:640px){.sf-performance-donut-layout{grid-template-columns:1fr;justify-items:center}.sf-performance-donut-layout .sf-performance__totals{width:100%;grid-template-columns:1fr}.sf-performance-donut{width:9.5rem;height:9.5rem}.sf-performance-donut>div{width:6.8rem;height:6.8rem}}

/* Corrección visual definitiva: tarjeta circular de desempeño. */
.hr-home .sf-performance, .sf-admin .sf-performance { padding:1.45rem !important; border:1px solid #d9e8de !important; border-radius:1.2rem !important; background:linear-gradient(135deg,#fff 0%,#fbfefd 64%,#edf9f1 100%) !important; box-shadow:0 14px 32px rgba(31,69,48,.08) !important; }
.sf-performance .sf-performance__head { display:flex !important; align-items:center !important; justify-content:space-between !important; padding:0 0 1rem !important; border-bottom:1px solid #e7f0ea !important; }.sf-performance .sf-performance__head h3{margin:0 !important;font-family:'DM Sans',sans-serif !important;font-size:1.08rem !important;font-weight:800 !important;color:#1b2923 !important}.sf-performance .sf-performance__head h3::before{content:none!important}.sf-performance .sf-performance__head p{margin:.22rem 0 0!important;font-size:.8rem!important;color:#687971!important}.sf-performance .sf-performance__head input{width:auto!important;min-width:8rem!important;border:1px solid #cfe1d5!important;border-radius:.7rem!important;background:#fff!important;padding:.55rem .7rem!important;color:#20316f!important;font:600 .85rem 'DM Sans',sans-serif!important}
.sf-performance .sf-performance-donut-layout{display:grid!important;grid-template-columns:9rem minmax(0,1fr)!important;align-items:center!important;gap:1.45rem!important;margin:1.2rem 0 0!important}.sf-performance .sf-performance-donut{width:9rem!important;height:9rem!important;box-shadow:0 12px 24px rgba(31,73,49,.14)!important}.sf-performance .sf-performance-donut>div{width:6.5rem!important;height:6.5rem!important;background:#fff!important}.sf-performance .sf-performance-donut strong{font-family:'DM Sans',sans-serif!important;color:#20316f!important;font-size:1.9rem!important}.sf-performance .sf-performance-donut span{font-size:.62rem!important;color:#687971!important}
.sf-performance .sf-performance__totals{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:.65rem!important;margin:0!important}.sf-performance .sf-performance__totals span{display:grid!important;gap:.25rem!important;min-width:0!important;padding:.75rem!important;border:1px solid #e0ece4!important;border-radius:.8rem!important;background:#fff!important;box-shadow:0 4px 10px rgba(34,75,51,.04)!important;color:#60746a!important;font-size:.74rem!important;line-height:1.25!important}.sf-performance .sf-performance__totals b{font:800 1.3rem 'DM Sans',sans-serif!important}.sf-performance .sf-performance__totals span:nth-child(1){border-top:3px solid #e8a625!important}.sf-performance .sf-performance__totals span:nth-child(2){border-top:3px solid #d96565!important}.sf-performance .sf-performance__totals span:nth-child(3){border-top:3px solid #159a52!important}
@media(max-width:640px){.hr-home .sf-performance,.sf-admin .sf-performance{padding:1rem!important}.sf-performance .sf-performance__head{align-items:flex-start!important;flex-direction:column!important}.sf-performance .sf-performance__head input{width:100%!important}.sf-performance .sf-performance-donut-layout{grid-template-columns:1fr!important;justify-items:center!important}.sf-performance .sf-performance__totals{width:100%!important;grid-template-columns:1fr!important}}

/* Botones de detalle del cumplimiento mensual */
.sf-performance .sf-performance__totals button{display:flex!important;flex-direction:column!important;align-items:flex-start!important;justify-content:center!important;gap:5px!important;min-width:0!important;width:100%!important;box-sizing:border-box!important}
.sf-performance .sf-performance__totals button b{display:block!important;margin:0!important;line-height:1!important}
.sf-performance .sf-performance__totals button span{display:block!important;min-width:0!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;color:#60746a!important;font-size:.9rem!important;font-weight:700!important;line-height:1.2!important}
.sf-performance .sf-performance__totals button small{display:block!important;margin:0!important;line-height:1.1!important}
.sf-performance .sf-performance__totals button:nth-child(1){border-top:3px solid #e8a625!important}.sf-performance .sf-performance__totals button:nth-child(2){border-top:3px solid #d96565!important}.sf-performance .sf-performance__totals>span:nth-child(3){border-top:3px solid #159a52!important}
.sf-calendar{display:block!important;margin:24px 0!important;background:#fff!important;border:1px solid #dce9e3!important;border-radius:22px!important;overflow:hidden!important;box-shadow:0 16px 34px rgba(32,70,51,.08)!important}.sf-calendar__head{display:flex!important;align-items:center!important;justify-content:space-between!important;padding:22px 26px!important;border-bottom:1px solid #e5efe8!important}.sf-calendar__head p{margin:0 0 4px!important;color:#159a52!important;font-size:.72rem!important;font-weight:800!important;text-transform:uppercase!important}.sf-calendar__head h3{margin:0!important;color:#1d3567!important;font-size:1.3rem!important}.sf-calendar__head>span{padding:8px 12px!important;border-radius:999px!important;background:#f0f8f3!important;color:#557468!important;font-size:.78rem!important;font-weight:700!important}.sf-calendar__weekdays,.sf-calendar__grid{display:grid!important;grid-template-columns:repeat(7,minmax(0,1fr))!important}.sf-calendar__weekdays{padding:14px 18px 8px!important;color:#789087!important;font-size:.72rem!important;font-weight:800!important;text-align:center!important}.sf-calendar__grid{padding:0 18px 18px!important}.sf-calendar__day{display:flex!important;flex-direction:column!important;gap:5px!important;min-height:96px!important;padding:10px!important;border:1px solid #edf2ee!important;background:#fff!important}.sf-calendar__day.is-muted{background:#fafcfb!important}.sf-calendar__date{display:grid!important;place-items:center!important;width:26px!important;height:26px!important;border-radius:50%!important;color:#365048!important;font-size:.8rem!important;font-weight:800!important}.sf-calendar__day.is-today .sf-calendar__date{background:#159a52!important;color:#fff!important}.sf-calendar__event{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;padding:4px 6px!important;border-radius:6px!important;background:#e8f7ee!important;color:#147644!important;font-size:.66rem!important;font-weight:700!important}.sf-calendar__event--birthday{background:#fff0d6!important;color:#a66109!important}@media(max-width:700px){.sf-calendar__head{align-items:flex-start!important;gap:10px!important;flex-direction:column!important;padding:18px!important}.sf-calendar__weekdays{padding:10px 7px!important;font-size:.6rem!important}.sf-calendar__grid{padding:0 7px 7px!important}.sf-calendar__day{min-height:66px!important;padding:5px!important}.sf-calendar__event{font-size:.55rem!important;padding:3px!important}}.sf-performance .sf-performance__totals{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:16px!important;align-items:stretch!important}.sf-performance .sf-performance__totals button,.sf-performance .sf-performance__totals>span{display:flex!important;flex-direction:column!important;align-items:flex-start!important;justify-content:center!important;gap:6px!important;min-height:132px!important;padding:20px!important;border:1px solid #dce9e3!important;border-top-width:4px!important;border-radius:18px!important;background:#fff!important;box-shadow:0 10px 24px rgba(31,72,50,.08)!important;box-sizing:border-box!important;text-align:left!important}.sf-performance .sf-performance__totals button{cursor:pointer!important;transition:transform .18s ease,box-shadow .18s ease!important}.sf-performance .sf-performance__totals button:hover{transform:translateY(-3px)!important;box-shadow:0 16px 30px rgba(31,72,50,.14)!important}.sf-performance .sf-performance__totals button b,.sf-performance .sf-performance__totals>span b{display:block!important;margin:0!important;color:#1f2d28!important;font-size:2rem!important;line-height:1!important}.sf-performance .sf-performance__totals button span,.sf-performance .sf-performance__totals>span{color:#597066!important;font-size:1rem!important;font-weight:800!important}.sf-performance .sf-performance__totals button small{color:#16834d!important;font-size:.8rem!important;font-weight:800!important}.sf-performance .sf-performance__totals button:nth-child(1){border-top-color:#e9a92c!important}.sf-performance .sf-performance__totals button:nth-child(2){border-top-color:#dd6868!important}.sf-performance .sf-performance__totals button:nth-child(3),.sf-performance .sf-performance__totals>span:nth-child(3){border-top-color:#159a52!important}.sf-performance .sf-performance__totals .sf-performance__permission{border-top-color:#8054b5!important;background:linear-gradient(145deg,#fff,#fbf7ff)!important;color:#633a90!important}@media(max-width:760px){.sf-performance .sf-performance__totals{grid-template-columns:1fr!important}.sf-performance .sf-performance__totals button,.sf-performance .sf-performance__totals>span{min-height:104px!important}}
/* Agenda mensual: una etiqueta de ciclo por semana y eventos operativos. */
.sf-calendar{display:block!important;margin:24px 0!important;background:#fff!important;border:1px solid #dce9e3!important;border-radius:22px!important;overflow:hidden!important;box-shadow:0 16px 34px rgba(32,70,51,.08)!important}
.sf-calendar__head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:18px!important;padding:22px 26px!important;border-bottom:1px solid #e5efe8!important}
.sf-calendar__head p{margin:0 0 4px!important;color:#159a52!important;font-size:.72rem!important;font-weight:800!important;text-transform:uppercase!important;letter-spacing:.08em!important}
.sf-calendar__head h3{margin:0!important;color:#1d3567!important;font-size:1.3rem!important}
.sf-calendar__actions{display:flex!important;align-items:center!important;gap:10px!important}
.sf-calendar__actions input{width:auto!important;min-height:42px!important;padding:8px 12px!important;border:1px solid #cfe1d7!important;border-radius:12px!important;background:#fff!important;color:#1d3567!important;font-weight:700!important}
.sf-calendar__actions button,.sf-calendar-form button{border:0!important;border-radius:12px!important;background:#159a52!important;color:#fff!important;font-weight:800!important;padding:11px 16px!important;cursor:pointer!important;box-shadow:0 8px 16px rgba(21,154,82,.2)!important}
.sf-calendar__weekdays{display:grid!important;grid-template-columns:6.5rem minmax(0,1fr)!important;padding:14px 18px 8px!important;color:#789087!important;font-size:.72rem!important;font-weight:800!important;text-align:center!important}
.sf-calendar__weekdays-cycle{display:grid!important;place-items:center!important;text-transform:uppercase!important;letter-spacing:.07em!important}
.sf-calendar__weekdays-days,.sf-calendar__week-days{display:grid!important;grid-template-columns:repeat(7,minmax(0,1fr))!important}
.sf-calendar__weekdays-days span{display:grid!important;place-items:center!important}
.sf-calendar__rows{padding:0 18px 18px!important}
.sf-calendar__week{display:grid!important;grid-template-columns:6.5rem minmax(0,1fr)!important;border:1px solid #edf2ee!important;border-bottom:0!important;overflow:hidden!important}
.sf-calendar__week:first-child{border-radius:14px 14px 0 0!important}
.sf-calendar__week:last-child{border-bottom:1px solid #edf2ee!important;border-radius:0 0 14px 14px!important}
.sf-calendar__week-cycle{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:4px!important;padding:8px!important;background:linear-gradient(180deg,#effaf3,#e3f4ec)!important;border-right:1px solid #dbece2!important;color:#187344!important;text-align:center!important}
.sf-calendar__week-cycle strong{font-size:.78rem!important;line-height:1.1!important}
.sf-calendar__week-cycle span{font-size:.65rem!important;color:#71877c!important}
.sf-calendar__day{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:5px!important;min-width:0!important;min-height:102px!important;padding:10px!important;border:0!important;border-right:1px solid #edf2ee!important;border-radius:0!important;background:#fff!important;color:#1f2d28!important;text-align:left!important;cursor:pointer!important;transition:background .16s ease!important}
.sf-calendar__day:last-child{border-right:0!important}
.sf-calendar__day:hover{background:#f4fbf7!important}
.sf-calendar__day.is-muted{background:#fafcfb!important;color:#9aacA1!important}
.sf-calendar__day-top{display:flex!important;justify-content:flex-end!important}
.sf-calendar__date{display:grid!important;place-items:center!important;width:27px!important;height:27px!important;border-radius:50%!important;color:#365048!important;font-size:.8rem!important;font-weight:800!important}
.sf-calendar__day.is-today .sf-calendar__date{background:#159a52!important;color:#fff!important}
.sf-calendar__event{display:block!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;padding:4px 6px!important;border-radius:6px!important;background:#e8f7ee!important;color:#147644!important;font-size:.66rem!important;font-weight:700!important}
.sf-calendar__event--birthday{background:#fff0d6!important;color:#a66109!important}
.sf-calendar__event--activity{background:#e9efff!important;color:#315ba4!important}
.sf-calendar__event--vacation{background:#e4f6eb!important;color:#127442!important}
.sf-calendar-form{display:grid!important;gap:14px!important}
.sf-calendar-form label{display:grid!important;gap:7px!important;color:#253d34!important;font-weight:750!important}
.sf-calendar-form input,.sf-calendar-form textarea{width:100%!important;border:1px solid #d8e5de!important;border-radius:12px!important;padding:11px 12px!important;background:#fff!important;color:#1f2d28!important;box-sizing:border-box!important}
.sf-calendar-form button{justify-self:start!important}
@media(max-width:760px){
  .sf-calendar{border-radius:18px!important}
  .sf-calendar__head{align-items:stretch!important;flex-direction:column!important;padding:18px!important}
  .sf-calendar__actions{width:100%!important}
  .sf-calendar__actions input,.sf-calendar__actions button{flex:1 1 0!important;min-width:0!important;font-size:.72rem!important;padding:10px 8px!important}
  .sf-calendar__weekdays{grid-template-columns:3.2rem minmax(0,1fr)!important;padding:10px 7px 7px!important;font-size:.56rem!important}
  .sf-calendar__rows{padding:0 7px 7px!important}
  .sf-calendar__week{grid-template-columns:3.2rem minmax(0,1fr)!important}
  .sf-calendar__week-cycle{padding:4px!important}
  .sf-calendar__week-cycle strong{font-size:.58rem!important}
  .sf-calendar__week-cycle span{display:none!important}
  .sf-calendar__day{min-height:82px!important;padding:4px!important;gap:3px!important}
  .sf-calendar__date{width:23px!important;height:23px!important;font-size:.67rem!important}
  .sf-calendar__event{padding:3px!important;font-size:.52rem!important}
}

/* Acceso rápido a notificaciones en el encabezado. */
.sf-account-control__notifications{position:relative!important;display:grid!important;place-items:center!important;width:2.35rem!important;height:2.35rem!important;border:1px solid #dbe9e1!important;border-radius:.72rem!important;background:#f7fbf8!important;color:#1f8f4d!important;transition:transform .16s ease,background .16s ease,box-shadow .16s ease!important}
.sf-account-control__notifications:hover{transform:translateY(-1px)!important;background:#eaf8ef!important;box-shadow:0 8px 16px rgba(21,154,82,.16)!important}
.sf-account-control__notification-count{position:absolute!important;top:-.32rem!important;right:-.38rem!important;display:grid!important;place-items:center!important;min-width:1.18rem!important;height:1.18rem!important;padding:0 .2rem!important;border:2px solid #fff!important;border-radius:999px!important;background:#d64c4c!important;color:#fff!important;font-size:.59rem!important;font-weight:850!important;line-height:1!important;box-shadow:0 3px 8px rgba(150,40,40,.25)!important}
@media(max-width:760px){.sf-account-control__notifications{width:2.15rem!important;height:2.15rem!important}.sf-account-control__logout span{display:none!important}}

/* Indicador circular de cumplimiento: porcentaje legible y anillo semántico. */
.sf-performance .sf-performance-donut{position:relative!important;display:grid!important;place-items:center!important;width:10.25rem!important;height:10.25rem!important;border-radius:50%!important;background:conic-gradient(#159a52 0 calc(var(--compliance) * 1%),#efb02a calc(var(--compliance) * 1%) 100%)!important;box-shadow:0 14px 30px rgba(31,73,49,.14)!important}
.sf-performance .sf-performance-donut::before{content:''!important;position:absolute!important;inset:.78rem!important;border-radius:50%!important;background:#fff!important;box-shadow:inset 0 0 0 1px #e0ebe4!important}
.sf-performance .sf-performance-donut>div{position:relative!important;z-index:1!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;width:100%!important;height:100%!important;background:transparent!important;box-shadow:none!important;text-align:center!important}
.sf-performance .sf-performance-donut strong{display:block!important;margin:0!important;color:#20316f!important;font-family:'DM Sans',sans-serif!important;font-size:2.45rem!important;font-weight:850!important;letter-spacing:-.06em!important;line-height:1!important}
.sf-performance .sf-performance-donut span{display:block!important;margin:.48rem 0 0!important;color:#61776c!important;font-family:'DM Sans',sans-serif!important;font-size:.66rem!important;font-weight:850!important;letter-spacing:.1em!important;line-height:1!important;text-transform:uppercase!important}
@media(max-width:640px){.sf-performance .sf-performance-donut{width:9.25rem!important;height:9.25rem!important}.sf-performance .sf-performance-donut strong{font-size:2.2rem!important}}

/* Manual calendar events can be removed without exposing system-generated events. */
.sf-calendar__date-button{display:flex!important;justify-content:flex-end!important;border:0!important;background:transparent!important;padding:0!important;cursor:pointer!important}.sf-calendar__event{display:flex!important;align-items:center!important;gap:4px!important}.sf-calendar__event>span{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}.sf-calendar__event-delete{margin-left:auto!important;border:0!important;background:transparent!important;color:inherit!important;font-size:1rem!important;font-weight:800!important;line-height:1!important;cursor:pointer!important;padding:0 0 0 3px!important}.sf-calendar__event-delete:hover{opacity:.65!important}

/* Validation feedback for employee request forms. */
.sf-field-error { display: block; margin-top: .38rem; color: #b42318; font-size: .78rem; font-weight: 700; }

/* Approved special permissions are visible in the team calendar. */
.sf-calendar__event--permission { background: #f3e9ff !important; color: #7541ad !important; }

@media (max-width: 1100px) and (min-width: 761px) { .sf-performance .sf-performance__totals { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }

/* Monthly compliance: direct card selectors prevent nested labels from inheriting status borders. */
.sf-performance .sf-performance__totals > button,
.sf-performance .sf-performance__totals > span {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    gap: .42rem !important;
    min-height: 8.25rem !important;
    margin: 0 !important;
    padding: 1.15rem !important;
    border: 1px solid #dce9e3 !important;
    border-top: 4px solid #dce9e3 !important;
    border-radius: 1rem !important;
    background: #fff !important;
    color: #597066 !important;
    box-shadow: 0 10px 24px rgba(31,72,50,.08) !important;
    box-sizing: border-box !important;
    text-align: left !important;
}
.sf-performance .sf-performance__totals > button > b,
.sf-performance .sf-performance__totals > span > b {
    display: block !important;
    margin: 0 !important;
    border: 0 !important;
    color: #1f2d28 !important;
    font: 800 2rem/1 'DM Sans', sans-serif !important;
}
.sf-performance .sf-performance__totals > button > span,
.sf-performance .sf-performance__totals > span > i {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #597066 !important;
    font: 800 1rem/1.2 'DM Sans', sans-serif !important;
    font-style: normal !important;
}
.sf-performance .sf-performance__totals > button > small,
.sf-performance .sf-performance__totals > span > small {
    display: block !important;
    margin: 0 !important;
    color: #16834d !important;
    font: 800 .78rem/1.2 'DM Sans', sans-serif !important;
}
.sf-performance .sf-performance__totals > button:nth-child(1) { border-top-color: #e9a92c !important; }
.sf-performance .sf-performance__totals > button:nth-child(2) { border-top-color: #dd6868 !important; }
.sf-performance .sf-performance__totals > button:nth-child(3) { border-top-color: #159a52 !important; }
.sf-performance .sf-performance__totals > .sf-performance__permission {
    border-top-color: #8054b5 !important;
    background: linear-gradient(145deg, #fff, #fbf8ff) !important;
}
.sf-performance .sf-performance__totals > .sf-performance__permission > b,
.sf-performance .sf-performance__totals > .sf-performance__permission > i { color: #633a90 !important; }
.sf-performance .sf-performance__totals > .sf-performance__permission > small { color: #8054b5 !important; }
@media (max-width: 760px) {
    .sf-performance .sf-performance__totals > button,
    .sf-performance .sf-performance__totals > span { min-height: 6.5rem !important; }
}

/* Current A/B cycle: concise employee-visible shift detail. */
.hr-week-card__hours{display:block!important;max-width:34rem!important;margin-top:.35rem!important;color:#d6f8e5!important;font-size:.72rem!important;font-weight:700!important;line-height:1.45!important}
@media(max-width:700px){.hr-week-card__hours{font-size:.68rem!important;line-height:1.4!important}}

/* Employee documents, certificates and payroll downloads. */
.sf-documents{display:grid;gap:1.25rem;width:100%;max-width:1280px}.sf-documents-hero{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1.5rem;border-radius:1.2rem;background:linear-gradient(120deg,var(--sf-navy),#42559e 62%,#168054);box-shadow:0 16px 34px rgba(31,45,104,.17);color:#fff}.sf-documents-hero h2{margin:.15rem 0 .45rem;color:#fff;font-size:clamp(1.35rem,2vw,1.75rem)}.sf-documents-hero p{margin:0;color:rgba(255,255,255,.83)}.sf-documents-eyebrow{color:#a7f3d0!important;font-size:.74rem;font-weight:800;letter-spacing:.12em;text-transform:uppercase}.sf-document-section{border:1px solid var(--sf-line);border-radius:var(--sf-radius);background:#fff;box-shadow:var(--sf-shadow);overflow:hidden}.sf-document-section__head{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1.2rem 1.25rem;border-bottom:1px solid var(--sf-line)}.sf-document-section__head h3{margin:0;color:var(--sf-ink);font-size:1.05rem}.sf-document-section__head p{margin:.28rem 0 0;color:var(--sf-muted);font-size:.88rem}.sf-document-grid{display:grid;gap:.75rem;padding:1rem}.sf-document-card{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.85rem;min-width:0;padding:1rem;border:1px solid #e2ece7;border-radius:.9rem;background:linear-gradient(115deg,#fff,#f7fbf9)}.sf-document-card__icon{display:grid;width:2.5rem;height:2.5rem;place-items:center;border-radius:.75rem;color:#19714a;background:#def7e8}.sf-document-card__icon svg{width:1.25rem;height:1.25rem}.sf-document-card h4{margin:0;color:var(--sf-ink);font-size:.95rem}.sf-document-card p,.sf-payroll-note{margin:.22rem 0 0;color:var(--sf-muted);font-size:.82rem}.sf-document-empty{padding:1.15rem;border:1px dashed #cbdcd4;border-radius:.85rem;color:var(--sf-muted);text-align:center}.sf-file-action{display:inline-flex;align-items:center;justify-content:center;gap:.45rem;width:fit-content;padding:.6rem .85rem;border:1px solid #bde7cc;border-radius:.7rem;background:#effbf3;color:#14733f!important;font-size:.81rem;font-weight:800;text-decoration:none!important;white-space:nowrap;transition:transform .18s ease,background .18s ease}.sf-file-action:hover{background:#dff6e8;transform:translateY(-1px)}.sf-file-action svg{width:1rem;height:1rem}.sf-file-action--light{border-color:rgba(255,255,255,.48);background:rgba(255,255,255,.96);color:#14733f!important}.sf-payroll-actions{display:flex;justify-content:flex-end;margin-top:1rem}
@media(max-width:700px){.sf-documents-hero,.sf-document-section__head{align-items:flex-start;flex-direction:column;padding:1rem}.sf-document-card{grid-template-columns:auto minmax(0,1fr)}.sf-document-card .sf-file-action{grid-column:1 / -1;width:100%}.sf-file-action{white-space:normal;text-align:center}}

/* Certificate variants share the global document action system. */
.sf-certificate-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:.55rem}.sf-file-action--primary{border-color:#14733f;background:#14733f;color:#fff!important;box-shadow:0 8px 16px rgba(20,115,63,.2)}.sf-file-action--primary:hover{background:#0e6135}

/* Public certificate validation uses the same SkinFarma visual language. */
.sf-verification-page{display:grid;min-height:100vh;place-items:center;margin:0;padding:1.5rem;background:radial-gradient(circle at top right,#dff8ea 0,transparent 38%),linear-gradient(145deg,#f6fbf8,#edf4f0);font-family:var(--sf-font,system-ui,sans-serif)}.sf-verification-card{width:min(100%,42rem);padding:clamp(1.6rem,5vw,3rem);border:1px solid #d8e8df;border-radius:1.5rem;background:#fff;box-shadow:0 24px 60px rgba(23,59,45,.14);color:#20312b}.sf-verification-logo{display:block;width:12rem;max-height:4rem;object-fit:contain;object-position:left center;margin-bottom:1.8rem;border-radius:.7rem}.sf-verification-status{display:inline-flex;padding:.42rem .75rem;border-radius:999px;background:#def7e8;color:#14733f;font-size:.78rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase}.sf-verification-status--invalid{background:#fee8e8;color:#b42318}.sf-verification-card h1{margin:1rem 0 .6rem;color:#203675;font-size:clamp(1.5rem,4vw,2rem)}.sf-verification-card>p{color:#63746d;line-height:1.65}.sf-verification-details{display:grid;gap:.75rem;margin:1.8rem 0;padding:1rem 0;border-block:1px solid #e4eee8}.sf-verification-details div{display:grid;gap:.18rem}.sf-verification-details dt{color:#71827a;font-size:.75rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase}.sf-verification-details dd{margin:0;color:#1d3028;font-weight:700}.sf-verification-code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.78rem;overflow-wrap:anywhere}.sf-verification-note{padding:.85rem 1rem;border-radius:.8rem;background:#f3f8f5;font-size:.87rem}

/* Operational summary: scoped to the reports card. */
.sf-report-panel--smart {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border-color: #d4e5da;
    background: linear-gradient(115deg, #ffffff 40%, #f3faf6 100%);
    box-shadow: 0 10px 24px rgba(24, 61, 42, .055);
}

.sf-report-panel--smart::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, var(--sf-green), var(--sf-navy));
}

.sf-report-panel--smart > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.45rem 1rem;
    border-bottom: 1px solid #e4eee8;
}

.sf-report-panel--smart > header > div {
    min-width: 0;
}

.sf-report-panel--smart > header .sf-report-eyebrow {
    margin: 0 0 .35rem;
    line-height: 1.4;
}

.sf-report-panel--smart > header strong {
    margin: 0;
    color: var(--sf-navy);
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.45;
    letter-spacing: -.015em;
}

.sf-report-panel--smart > header > div > span:last-child {
    margin-top: .3rem;
    color: var(--sf-muted);
    font-size: .8rem;
    line-height: 1.6;
}

.sf-report-panel--smart > header > .sf-report-table-count {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: .4rem;
    margin: 0;
    padding: .4rem .7rem;
    border: 1px solid #d7e6dc;
    background: #edf7f0;
    color: #357453;
    font-size: .7rem;
    font-weight: 700;
    line-height: 1.4;
}

.sf-report-panel--smart > p {
    margin: 0;
    padding: 1.1rem 1.45rem 1.25rem;
    color: #35483d;
    font-size: .9rem;
    line-height: 1.8;
    overflow-wrap: anywhere;
    text-wrap: pretty;
}

@media (max-width: 640px) {
    .sf-report-panel--smart > header {
        flex-wrap: wrap;
        align-items: flex-start;
        gap: .75rem;
        padding: 1rem 1.05rem .9rem;
    }

    .sf-report-panel--smart > header > div {
        flex: 1 1 15rem;
    }

    .sf-report-panel--smart > header > .sf-report-table-count {
        align-self: flex-start;
    }

    .sf-report-panel--smart > p {
        padding: .95rem 1.05rem 1.1rem;
        font-size: .85rem;
        line-height: 1.75;
    }
}


/* Summary content and truthful AI status. */
.sf-report-panel--smart .sf-report-summary-text {
    margin: 0;
    padding: 1.1rem 1.45rem 1.25rem;
    color: #35483d;
    font-size: .9rem;
    line-height: 1.8;
    overflow-wrap: anywhere;
    white-space: pre-line;
    text-wrap: pretty;
}
.sf-report-panel--smart .sf-report-summary-note {
    padding: 0 1.45rem 1rem;
    color: var(--sf-muted);
    font-size: .72rem;
    line-height: 1.6;
}
@media (max-width: 640px) {
    .sf-report-panel--smart .sf-report-summary-text {
        padding: .95rem 1.05rem 1.1rem;
        font-size: .85rem;
        line-height: 1.75;
    }
    .sf-report-panel--smart .sf-report-summary-note {
        padding: 0 1.05rem 1rem;
    }
}

/* Asistente RH: composición con componentes y variables compartidos de la página. */
.sf-assistant { gap: 1.1rem; }
.sf-ai-tabs { display:flex; gap:6px; padding:6px; background:var(--sf-canvas); border-radius:14px; overflow-x:auto; }
.sf-ai-tabs button { white-space:nowrap; padding:12px 16px; border-radius:10px; color:var(--sf-muted); font-weight:650; font-size:13px; }
.sf-ai-tabs button.is-active { color:var(--sf-green-dark); background:var(--sf-surface); box-shadow:0 2px 6px #12324512; }
.sf-ai-card { margin-bottom: 1.1rem; }
.sf-ai-card h2 { color:var(--sf-ink); font-size:1.02rem; font-weight:700; margin:5px 0 10px; }
.sf-ai-card p { color:var(--sf-muted); font-size:14px; line-height:1.65; margin:10px 0; }
.sf-ai-form { display:grid; gap:16px; margin-top:20px; }
.sf-ai-form label { display:grid; gap:7px; color:var(--sf-ink); font-size:13px; font-weight:650; }
.sf-ai-form input:not([type=checkbox]), .sf-ai-form textarea, .sf-ai-form select { width:100%; border:1px solid var(--sf-line); border-radius:.72rem; padding:.65rem .8rem; color:var(--sf-ink); background:var(--sf-surface); font-size:14px; font-weight:400; }
.sf-ai-form textarea { resize:vertical; }
.sf-assistant :is(button,a,input,textarea,select,summary):focus-visible { outline:3px solid var(--sf-green); outline-offset:3px; }
.sf-ai-button { display:inline-flex; align-items:center; justify-content:center; justify-self:start; padding:12px 19px; border-radius:10px; background:linear-gradient(135deg,var(--sf-green),var(--sf-green-dark)); color:white; font-size:13px; font-weight:700; cursor:pointer; }
.sf-ai-button:hover { background:var(--sf-green-dark); }
.sf-ai-button:disabled { opacity:.5; cursor:wait; }
.sf-ai-button--light { background:var(--sf-surface); color:var(--sf-green-dark); white-space:nowrap; }
.sf-ai-button--light:hover { background:var(--sf-soft-green); }
.sf-ai-examples { display:flex; flex-wrap:wrap; gap:8px; margin-top:20px; }
.sf-ai-examples button { border:1px solid var(--sf-line); background:var(--sf-soft-green); border-radius:20px; padding:9px 13px; color:var(--sf-green-dark); text-align:left; font-size:12px; }
.sf-ai-metrics { display:grid; grid-template-columns:repeat(auto-fit,minmax(155px,1fr)); gap:12px; margin:20px 0; }
.sf-ai-metrics > :is(div,a) { display:flex; flex-direction:column; gap:8px; padding:20px; border-radius:var(--sf-radius); background:var(--sf-canvas); border:1px solid var(--sf-line); }
.sf-ai-metrics strong { color:var(--sf-green-dark); font-size:30px; line-height:1.1; font-variant-numeric:tabular-nums; }
.sf-ai-metrics span { color:var(--sf-muted); font-size:12px; line-height:1.5; }
.sf-ai-notice { padding:13px 17px; background:var(--sf-soft-green); color:var(--sf-green-dark); border-radius:10px; font-size:13px; line-height:1.6; }
.sf-ai-notice.is-error { background:var(--sf-surface); color:var(--sf-danger); }
.sf-ai-meta { font-size:12px!important; color:var(--sf-muted)!important; }
.sf-ai-link { color:var(--sf-green-dark); font-size:13px; font-weight:650; text-decoration:underline; text-underline-offset:3px; }
.sf-ai-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.sf-ai-quote { border-left:3px solid var(--sf-green); padding:10px 18px; background:var(--sf-canvas); margin:16px 0; white-space:pre-wrap; }
.sf-ai-policy { padding:16px 0; border-bottom:1px solid var(--sf-line); }
.sf-ai-policy summary { cursor:pointer; color:var(--sf-ink); font-size:14px; font-weight:650; }
.sf-ai-preserve { white-space:pre-wrap; overflow-wrap:anywhere; }
.sf-ai-form .sf-ai-check { display:flex; align-items:start; gap:10px; line-height:1.6; }
.sf-ai-check input { margin-top:4px; }
@media(max-width:700px) { .sf-ai-card { margin-bottom: 1.1rem; } .sf-ai-heading { flex-direction:column; align-items:start; } .sf-ai-tabs button { padding:11px; } .sf-ai-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } }

/* Responsive UX foundation: phones, Android tablets and iPad. */
html {
    min-width: 20rem;
    overflow-x: hidden;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

body,
.fi-body {
    min-width: 20rem;
    overflow-wrap: anywhere;
    -webkit-tap-highlight-color: transparent;
}

:where(button, a, input, select, textarea, summary, [role='button']):focus-visible {
    outline: 3px solid rgba(21, 154, 82, .42);
    outline-offset: 2px;
}

:where(.fi-main, .fi-modal, .fi-topbar) :where(button, [role='button'], a.fi-btn) {
    touch-action: manipulation;
}

.fi-main,
.fi-main-ctn,
.fi-page,
.fi-page > *,
.fi-section,
.fi-fo-section,
.fi-section-content,
.fi-fo-section-content,
.fi-fo-component-ctn,
.fi-fo-field-wrp,
.fi-input-wrp,
.fi-ta-ctn,
.fi-ta-content,
.fi-ta-table,
.fi-tabs,
.fi-modal-window,
.fi-modal-content {
    min-width: 0;
}

.fi-main img,
.fi-main video,
.fi-main canvas,
.fi-main iframe {
    max-width: 100%;
}

.fi-input-wrp,
.fi-fo-field-wrp,
.fi-fo-field-wrp > div,
.fi-fo-file-upload,
.fi-fo-rich-editor,
.fi-fo-markdown-editor {
    width: 100%;
    max-width: 100%;
}

.fi-input,
.fi-select-input,
.fi-textarea,
.fi-main input,
.fi-main textarea,
.fi-main select,
.fi-modal input,
.fi-modal textarea,
.fi-modal select {
    max-width: 100%;
}

.fi-textarea,
.fi-main textarea,
.fi-modal textarea {
    resize: vertical;
}

.fi-tabs {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.fi-tabs-item {
    flex: 0 0 auto;
    white-space: nowrap;
}

.fi-ta-ctn,
.sf-table,
.sf-loan-table,
.sf-report-table-wrap {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.fi-dropdown-panel {
    max-width: min(22rem, calc(100vw - 1rem));
}

/* iPad and Android tablets: preserve useful two-column layouts without crowding. */
@media (min-width: 768px) and (max-width: 1180px) {
    .fi-main {
        padding-inline: clamp(1rem, 2.4vw, 1.75rem) !important;
    }

    .sf-admin-kpis,
    .sf-admin-grid,
    .hr-dashboard,
    .hr-content,
    .hr-metrics,
    .hr-quick,
    .sf-approvals__summary,
    .sf-loan-summary,
    .sf-payroll-totals,
    .sf-metrics,
    .sf-report-metrics--premium {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .sf-request-layout {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sf-approval-toolbar,
    .sf-report-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .sf-admin-hero,
    .hr-welcome,
    .sf-payroll-hero,
    .sf-documents-hero {
        padding: 1.35rem;
    }
}

/* Phones: consistent spacing, readable fields and 44px touch targets. */
@media (max-width: 767px) {
    :root {
        --sf-mobile-gutter: clamp(.75rem, 3.6vw, 1rem);
    }

    body,
    .fi-body {
        overflow-x: clip;
    }

    .fi-main {
        width: 100%;
        padding: 1rem var(--sf-mobile-gutter) calc(1.25rem + env(safe-area-inset-bottom)) !important;
    }

    .fi-page {
        width: 100%;
        max-width: 100%;
        gap: 1rem !important;
    }

    .fi-topbar {
        min-height: calc(4rem + env(safe-area-inset-top));
        padding-top: env(safe-area-inset-top);
    }

    .fi-topbar nav {
        min-width: 0;
        padding-inline: .65rem !important;
    }

    .fi-topbar .fi-icon-btn,
    .fi-sidebar-close-overlay,
    .fi-sidebar-close-btn {
        min-width: 2.75rem;
        min-height: 2.75rem;
    }

    .fi-sidebar {
        width: min(21rem, calc(100vw - 2rem)) !important;
        max-width: calc(100vw - 2rem) !important;
        padding-bottom: env(safe-area-inset-bottom);
    }

    .fi-sidebar-item-button {
        min-height: 3rem;
    }

    .sf-account-control {
        max-width: calc(100vw - 7rem);
        margin-left: auto;
    }

    .sf-account-control__logout,
    .sf-account-control__notifications {
        min-width: 2.75rem !important;
        min-height: 2.75rem !important;
    }

    .fi-header,
    .fi-header-actions,
    .fi-ac,
    .fi-ta-header-toolbar,
    .fi-ta-header-toolbar > div,
    .fi-ta-filters-above-content-ctn {
        width: 100%;
        min-width: 0;
    }

    .fi-header-actions,
    .fi-ac,
    .fi-modal-footer-actions {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        gap: .65rem !important;
    }

    .fi-header-actions > *,
    .fi-ac > *,
    .fi-modal-footer-actions > *,
    .fi-header-actions .fi-btn,
    .fi-ac .fi-btn,
    .fi-modal-footer-actions .fi-btn {
        width: 100%;
        min-width: 0;
    }

    .fi-btn,
    .sf-submit,
    .sf-approval-btn,
    .hr-action,
    .sf-file-action,
    .sf-ai-button,
    .sf-report-export-actions a {
        min-height: 2.75rem;
    }

    .fi-input,
    .fi-select-input,
    .fi-textarea,
    .fi-main input:not([type='checkbox']):not([type='radio']),
    .fi-main textarea,
    .fi-main select,
    .fi-modal input:not([type='checkbox']):not([type='radio']),
    .fi-modal textarea,
    .fi-modal select,
    .sf-field input,
    .sf-field textarea,
    .sf-field select {
        min-height: 3rem;
        font-size: 1rem !important;
    }

    .fi-main input[type='checkbox'],
    .fi-main input[type='radio'],
    .fi-modal input[type='checkbox'],
    .fi-modal input[type='radio'] {
        width: 1.25rem;
        height: 1.25rem;
        flex: 0 0 auto;
    }

    .fi-section,
    .fi-fo-section,
    .fi-ta-ctn,
    .fi-modal-window,
    .sf-admin-card,
    .hr-card,
    .sf-request-card,
    .sf-loan-card,
    .sf-payroll-card,
    .sf-approval-stat,
    .sf-approval-filter-card,
    .sf-approval-section,
    .sf-report-panel,
    .sf-report-export-section,
    .sf-document-section {
        border-radius: .95rem !important;
    }

    .fi-section-header,
    .fi-fo-section-header,
    .fi-section-content,
    .fi-fo-section-content {
        padding-inline: 1rem !important;
    }

    .fi-section-content,
    .fi-fo-section-content {
        padding-block: 1rem !important;
    }

    .fi-fo-component-ctn,
    .fi-fo-section-content-ctn {
        column-gap: .85rem !important;
        row-gap: 1rem !important;
    }

    .fi-ta-header,
    .fi-ta-header-toolbar {
        align-items: stretch !important;
        flex-direction: column !important;
        gap: .75rem !important;
        padding: .85rem !important;
    }

    .fi-ta-search-field,
    .fi-ta-search-field .fi-input-wrp {
        width: 100% !important;
        max-width: none !important;
    }

    .fi-ta-content {
        overflow-x: auto;
        overscroll-behavior-inline: contain;
    }

    .fi-ta-table {
        min-width: 44rem;
    }

    .fi-ta-cell,
    .fi-ta-header-cell {
        white-space: normal;
    }

    .fi-pagination {
        gap: .45rem;
        padding: .8rem !important;
    }

    .fi-pagination > div {
        max-width: 100%;
        overflow-x: auto;
    }

    .fi-modal {
        align-items: flex-end !important;
        padding: 0 !important;
    }

    .fi-modal-window {
        width: 100vw !important;
        max-width: 100vw !important;
        max-height: calc(100dvh - env(safe-area-inset-top)) !important;
        margin: 0 !important;
        border-radius: 1.2rem 1.2rem 0 0 !important;
    }

    .fi-modal-content {
        max-height: calc(100dvh - 8.5rem - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
        padding-bottom: .5rem;
    }

    .fi-modal-header {
        position: sticky;
        z-index: 2;
        top: 0;
        background: #fff;
    }

    .fi-modal-footer {
        position: sticky;
        z-index: 2;
        bottom: 0;
        padding-bottom: calc(1rem + env(safe-area-inset-bottom)) !important;
        background: #fff;
    }

    .sf-approval-modal {
        align-items: end;
        padding: 0;
    }

    .sf-approval-modal__card {
        width: 100%;
        max-height: calc(100dvh - env(safe-area-inset-top));
        border-radius: 1.2rem 1.2rem 0 0;
        padding-bottom: env(safe-area-inset-bottom);
    }

    .sf-admin,
    .hr-home,
    .sf-approvals,
    .sf-request-layout,
    .sf-loans,
    .sf-payroll,
    .sf-notifications,
    .sf-documents,
    .sf-reports {
        gap: 1rem;
        max-width: 100%;
    }

    .sf-admin-hero,
    .hr-welcome,
    .sf-payroll-hero,
    .sf-documents-hero {
        border-radius: 1rem;
        padding: 1.1rem;
    }

    .sf-admin-actions,
    .hr-actions,
    .sf-certificate-actions,
    .sf-payroll-actions,
    .sf-notif-toolbar,
    .sf-report-actions {
        width: 100%;
    }

    .sf-admin-actions > *,
    .hr-actions > *,
    .sf-certificate-actions > *,
    .sf-payroll-actions > *,
    .sf-notif-toolbar > *,
    .sf-report-actions > * {
        flex: 1 1 100%;
        width: 100%;
    }

    .sf-approval-item,
    .sf-document-card,
    .sf-admin-queue__item,
    .hr-row,
    .sf-payroll-head,
    .sf-notifications-head {
        min-width: 0;
    }

    .sf-approval-person,
    .sf-approval-details,
    .sf-report-export-copy,
    .sf-document-card > div,
    .sf-payroll-head > div {
        min-width: 0;
    }

    .sf-approval-meta,
    .sf-document-card p,
    .sf-payroll-note,
    .hr-row small,
    .sf-notif-item,
    .sf-ai-preserve {
        overflow-wrap: anywhere;
    }

    .sf-table,
    .sf-loan-table {
        max-width: 100%;
        overflow-x: auto;
        border-radius: .75rem;
        background: linear-gradient(90deg, #fff 0, #fff calc(100% - 1.4rem), #eef5f1 100%);
    }

    .sf-table th,
    .sf-table td,
    .sf-loan-table th,
    .sf-loan-table td {
        min-width: 7.5rem;
    }

    .sf-ai-tabs {
        margin-inline: -.25rem;
        padding: .35rem;
        scroll-snap-type: x proximity;
    }

    .sf-ai-tabs button {
        min-height: 2.75rem;
        scroll-snap-align: start;
    }

    .sf-ai-metrics {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

/* Small iPhones and compact Android screens. */
@media (max-width: 390px) {
    .fi-main {
        padding-inline: .7rem !important;
    }

    .sf-admin-hero,
    .hr-welcome,
    .sf-payroll-hero,
    .sf-documents-hero,
    .sf-admin-card,
    .hr-card,
    .sf-request-card,
    .sf-loan-card,
    .sf-payroll-card,
    .sf-report-panel,
    .sf-report-export-section {
        padding-inline: .9rem;
    }

    .sf-approval-person {
        grid-template-columns: 2.25rem minmax(0, 1fr);
        gap: .65rem;
    }

    .sf-approval-avatar,
    .sf-approval-stat__icon,
    .sf-report-metric-icon {
        width: 2.25rem;
        height: 2.25rem;
    }

    .sf-calendar__weekdays {
        font-size: .52rem !important;
    }
}

/* Landscape phones need vertical efficiency while keeping controls reachable. */
@media (max-height: 520px) and (orientation: landscape) {
    .fi-topbar {
        min-height: 3.5rem;
    }

    .fi-modal-window,
    .sf-approval-modal__card {
        max-height: 100dvh !important;
    }

    .fi-modal-content {
        max-height: calc(100dvh - 7rem) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* Reportes en iPad: las columnas responden al espacio real junto al menú lateral. */
.sf-reports--premium {
    container-name: sf-reports;
    container-type: inline-size;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: clip;
}

.sf-reports--premium > *,
.sf-report-filter-card--premium,
.sf-report-filters,
.sf-report-metrics--premium,
.sf-report-export-section,
.sf-report-export-grid,
.sf-report-export-card,
.sf-report-panel,
.sf-report-grid--premium {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.sf-report-filter-intro,
.sf-report-filters label,
.sf-report-export-copy,
.sf-report-panel > header > div {
    min-width: 0;
}

.sf-report-filter-intro :is(strong, span),
.sf-report-export-copy :is(strong, p),
.sf-report-panel--smart :is(strong, span, p),
.sf-report-section-heading :is(strong, span) {
    overflow-wrap: anywhere;
}

/* Fallback for Safari versions that calculate only viewport media queries. */
@media (min-width: 1024px) and (max-width: 1400px) {
    .sf-report-filter-card--premium {
        grid-template-columns: minmax(0, 1fr) !important;
        align-items: stretch;
    }

    .sf-report-filters {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .sf-report-metrics--premium {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .sf-report-export-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .sf-report-filter-card--premium {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .sf-report-filters,
    .sf-report-metrics--premium {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .sf-report-export-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

@container sf-reports (max-width: 1050px) {
    .sf-report-filter-card--premium {
        grid-template-columns: minmax(0, 1fr) !important;
        align-items: stretch;
    }

    .sf-report-filters {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .sf-report-metrics--premium {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .sf-report-export-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@container sf-reports (max-width: 780px) {
    .sf-report-filters,
    .sf-report-metrics--premium {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .sf-report-export-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

@container sf-reports (max-width: 520px) {
    .sf-report-filters,
    .sf-report-metrics--premium {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .sf-report-section-heading,
    .sf-report-panel--attendance > header,
    .sf-report-panel--smart > header {
        align-items: flex-start;
        flex-direction: column;
    }
}
