/* SF_READABLE_FONT_SIZES_V1 */
:root {
    /* SF_HEADER_DATE_V1 */
    --sf-header-height: 88px;
    /* SF_FIXED_SYSTEM_FOOTER_V1 */
    --sf-footer-height: 52px;
    /* SF_GILROY_SHARED_TYPOGRAPHY */
    --font-family: "SF Gilroy", system-ui, sans-serif;
    --font-sans: "SF Gilroy", system-ui, sans-serif;
    --sf-v2-bg: #f5f7fb;
    --sf-v2-surface: #ffffff;
    --sf-v2-line: #e2e8f1;
    --sf-v2-text: #182338;
    --sf-v2-muted: #718096;
    --sf-v2-primary: #3478f6;
}

html.dark {
    --sf-v2-bg: #0b1220;
    --sf-v2-surface: #131d2e;
    --sf-v2-line: #29364a;
    --sf-v2-text: #edf2fa;
    --sf-v2-muted: #a4b1c6;
}

@media screen {
    body.fi-body {
        font-family: var(--font-sans);
        font-synthesis: none;
        background: var(--sf-v2-bg);
        color: var(--sf-v2-text);
    }

    .fi-sidebar,
    .fi-topbar nav {
        background: var(--sf-v2-surface);
        border-color: var(--sf-v2-line);
        box-shadow: none;
    }

    .fi-main {
        padding-block: 28px;
    }

    .fi-sidebar-nav {
        padding: 16px 12px;
    }

    .fi-sidebar-item-btn {
        border-radius: 8px;
        padding: 10px 12px;
    }

    .fi-sidebar-item-label {
        font-size: 15px;
        font-weight: 500;
    }

    .fi-sidebar-group-label {
        font-size: 13px;
        font-weight: 600;
        color: var(--sf-v2-muted);
    }

    .fi-sidebar-item.fi-active > .fi-sidebar-item-btn {
        background: var(--sf-v2-primary);
    }

    /* SF_SUBNAV_DIRECT_ACTIVE */
    .fi-sidebar-item.fi-active > .fi-sidebar-item-btn > .fi-sidebar-item-label,
    .fi-sidebar-item.fi-active > .fi-sidebar-item-btn > .fi-sidebar-item-icon,
    .fi-sidebar-item.fi-active > .fi-sidebar-item-btn > .fi-icon {
        color: #ffffff;
    }

    .fi-section,
    .fi-ta {
        border-radius: 12px;
        box-shadow: 0 2px 8px #14253d05;
    }
}

.sf-v2-dashboard {
    display: grid;
    gap: 24px;
}

.sf-v2-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-block: 4px 8px;
}

.sf-v2-eyebrow {
    font-size: 12px;
    letter-spacing: .1em;
    color: var(--sf-v2-primary);
    font-weight: 600;
    margin-bottom: 8px;
}

.sf-v2-heading h1 {
    font-size: clamp(24px, 2.4vw, 32px);
    font-weight: 700;
    color: var(--sf-v2-text);
    letter-spacing: -.025em;
    line-height: 1.3;
}

.sf-v2-heading p {
    margin-top: 7px;
    font-size: 15px;
    color: var(--sf-v2-muted);
}

.sf-v2-date {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--sf-v2-line);
    background: var(--sf-v2-surface);
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--sf-v2-muted);
}

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

.sf-v2-metric {
    --sf-v2-tone: #3478f6;
    background: var(--sf-v2-surface);
    border: 1px solid var(--sf-v2-line);
    border-radius: 12px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    box-shadow: 0 2px 8px #14253d05;
}

.sf-v2-metric-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}

.sf-v2-metric-link:hover {
    border-color: var(--sf-v2-tone);
    background: color-mix(
        in srgb,
        var(--sf-v2-tone) 4%,
        var(--sf-v2-surface)
    );
}

.sf-v2-metric-link:focus-visible {
    outline: 2px solid var(--sf-v2-tone);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .sf-v2-metric-link {
        transition: none;
    }
}

.sf-v2-tone-cyan {
    --sf-v2-tone: #0891b2;
}

.sf-v2-tone-teal {
    --sf-v2-tone: #0d9488;
}

.sf-v2-tone-amber {
    --sf-v2-tone: #d97706;
}

.sf-v2-tone-violet {
    --sf-v2-tone: #7c3aed;
}

.sf-v2-tone-green {
    --sf-v2-tone: #16a34a;
}

.sf-v2-tone-indigo {
    --sf-v2-tone: #6366f1;
}

.sf-v2-tone-orange {
    --sf-v2-tone: #ea580c;
}

.sf-v2-metric-top {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sf-v2-metric-label {
    color: var(--sf-v2-text);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
}

.sf-v2-icon-box {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 9px;
    color: var(--sf-v2-tone);
    background: color-mix(
        in srgb,
        var(--sf-v2-tone) 10%,
        var(--sf-v2-surface)
    );
}

.sf-v2-small-icon {
    width: 19px;
    height: 19px;
}

.sf-v2-number {
    font-size: 32px;
    line-height: 1.2;
    font-weight: 700;
    color: var(--sf-v2-text);
    margin-top: 16px;
}

.sf-v2-caption {
    font-size: 13px;
    color: var(--sf-v2-muted);
    line-height: 1.6;
    margin-block: 8px 14px;
}

.sf-v2-open {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: auto;
    color: var(--sf-v2-tone);
    font-size: 13px;
    font-weight: 600;
}

.sf-v2-arrow {
    width: 14px;
    height: 14px;
}

.sf-v2-footer {
    padding: 18px;
    text-align: center;
    font-size: 13px;
    color: var(--sf-v2-muted);
}

@media (max-width: 1100px) {
    .sf-v2-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .sf-v2-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .sf-v2-summary {
        grid-template-columns: 1fr;
    }
}

@media print {
    .sf-v2-footer {
        display: none;
    }
}


/* SF_INTERFACE_DETAILS_V2 */

/* Calendar */
.sf-md3-calendar { margin-top: 8px; }
.sf-md3-calendar-shell {
    padding: 22px;
    border-radius: 12px;
    background: var(--sf-v2-surface);
    border: 1px solid var(--sf-v2-line);
}
.sf-md3-calendar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}
.sf-md3-kicker {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    color: var(--sf-v2-primary);
    text-transform: uppercase;
    margin-bottom: 7px;
}
.sf-md3-title {
    font-size: 23px;
    line-height: 1.3;
    font-weight: 650;
    color: var(--sf-v2-text);
    letter-spacing: -.02em;
    margin: 0;
}
.sf-md3-subtitle {
    margin-top: 7px;
    font-size: 14px;
    font-weight: 400;
    color: var(--sf-v2-muted);
    line-height: 1.6;
}
.sf-md3-today {
    background: var(--sf-v2-primary);
    color: white;
    border: 0;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}
.sf-md3-today:focus-visible,
.sf-md3-modal-close:focus-visible {
    outline: 2px solid var(--sf-v2-primary);
    outline-offset: 3px;
}
.sf-md3-calendar-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px;
}
.sf-md3-calendar-main { min-width: 0; }
.sf-md3-calendar-side {
    border-inline-start: 1px solid var(--sf-v2-line);
    padding-inline-start: 20px;
    min-width: 0;
}
.sf-md3-scroll-events {
    overflow-y: auto;
    max-height: 620px;
    display: grid;
    gap: 12px;
    align-content: start;
}
.sf-md3-event-date {
    color: var(--sf-v2-muted);
    font-size: 13px;
    font-weight: 600;
    margin-block: 12px 8px;
}
.sf-md3-event-card {
    display: flex;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--sf-v2-line);
    border-radius: 9px;
    background: var(--sf-v2-surface);
}
.sf-md3-event-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 5px;
    background: var(--event-color, #3478f6);
}
.sf-md3-event-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--sf-v2-text);
    line-height: 1.5;
}
.sf-md3-event-meta {
    margin-top: 5px;
    font-size: 14px;
    font-weight: 400;
    color: var(--sf-v2-muted);
    line-height: 1.5;
}
.sf-md3-empty {
    padding: 20px;
    border: 1px dashed var(--sf-v2-line);
    border-radius: 9px;
    background: var(--sf-v2-bg);
    color: var(--sf-v2-muted);
    font-size: 14px;
    line-height: 1.6;
}
.sf-md3-calendar .fc {
    --fc-border-color: var(--sf-v2-line);
    --fc-page-bg-color: var(--sf-v2-surface);
    --fc-neutral-bg-color: var(--sf-v2-bg);
    --fc-today-bg-color: #3478f610;
    color: var(--sf-v2-text);
    font-size: 14px;
}
.sf-md3-calendar .fc .fc-toolbar {
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.sf-md3-calendar .fc .fc-toolbar-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--sf-v2-text);
}
.sf-md3-calendar .fc .fc-button {
    background: var(--sf-v2-surface);
    color: var(--sf-v2-text);
    border: 1px solid var(--sf-v2-line);
    border-radius: 7px;
    box-shadow: none;
    font-size: 14px;
    text-transform: capitalize;
}
.sf-md3-calendar .fc .fc-button:hover {
    background: var(--sf-v2-bg);
    color: var(--sf-v2-primary);
}
.sf-md3-calendar .fc-event {
    border-radius: 5px;
    font-size: 12px;
    padding: 2px 4px;
    font-weight: 500;
}

/* Today / selected-day popup */
.sf-md3-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    padding: 20px;
    background: #101a2c66;
    backdrop-filter: blur(3px);
    overflow-y: auto;
}
.sf-md3-modal {
    width: min(640px, 100%);
    max-height: 85dvh;
    display: flex;
    flex-direction: column;
    border-radius: 14px;
    background: var(--sf-v2-surface);
    border: 1px solid var(--sf-v2-line);
    box-shadow: 0 24px 80px #101a2c33;
    overflow: hidden;
}
.sf-md3-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--sf-v2-line);
}
.sf-md3-modal-title {
    color: var(--sf-v2-text);
    font-size: 20px;
    font-weight: 600;
}
.sf-md3-modal-close {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--sf-v2-line);
    color: var(--sf-v2-muted);
    background: var(--sf-v2-bg);
    cursor: pointer;
    font-size: 22px;
}
.sf-md3-modal-body {
    padding: 24px;
    overflow-y: auto;
    display: grid;
    gap: 12px;
}

/* Native notification and action dialogs */
.fi-modal-window {
    border-radius: 14px;
    background: var(--sf-v2-surface);
}
.fi-modal-heading {
    font-size: 18px;
    font-weight: 600;
}
.fi-no-database .fi-no-notification {
    border-radius: 9px;
    margin-block: 8px;
}
.fi-no-database .fi-no-notification-title {
    font-size: 15px;
    font-weight: 600;
}
.fi-no-database .fi-no-notification-body {
    font-size: 14px;
    line-height: 1.7;
}
.fi-topbar .fi-icon-btn {
    border-radius: 8px;
}
.fi-topbar .fi-global-search { font-size: 16px; }
/* SF_HEADER_ALIGN_V2 */
.fi-topbar .fi-global-search .fi-input-wrp { min-height: 64px; align-items: center; }
.fi-topbar .fi-global-search .fi-input { height: 62px; padding-block: 0; line-height: normal; }
.fi-topbar { min-height: var(--sf-header-height); }

/* Footer */
.sf-v2-footer-bar {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 20;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    height: calc(var(--sf-footer-height) + env(safe-area-inset-bottom, 0px));
    gap: 14px;
    padding: 10px 20px calc(10px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--sf-v2-line);
    background: var(--sf-v2-surface);
    box-shadow: 0 -2px 12px #14253d06;
    text-align: start;
}

body:has(.sf-v2-footer-bar) {
    padding-block-end: calc(var(--sf-footer-height) + env(safe-area-inset-bottom, 0px));
}

.fi-sidebar-nav {
    padding-block-end: calc(16px + var(--sf-footer-height) + env(safe-area-inset-bottom, 0px));
}
.sf-v2-studio {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--sf-v2-muted);
    font-size: 13px;
    text-decoration: none;
}
.sf-v2-studio img {
    width: 90px;
    height: 32px;
    object-fit: contain;
}
.dark .sf-v2-studio img {
    background: white;
    border-radius: 6px;
    padding: 4px;
}
.sf-v2-studio strong { font-weight: 600; }
.sf-v2-studio:hover { color: var(--sf-v2-primary); }
.sf-v2-version {
    padding: 6px 10px;
    border: 1px solid var(--sf-v2-line);
    background: var(--sf-v2-bg);
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
}
@media (max-width: 1100px) {
    .sf-md3-calendar-grid { grid-template-columns: 1fr; }
    .sf-md3-calendar-side {
        border-inline-start: 0;
        border-top: 1px solid var(--sf-v2-line);
        padding-inline-start: 0;
        padding-top: 18px;
    }
    .sf-md3-scroll-events { max-height: 350px; }
}
@media (max-width: 640px) {
    .sf-md3-calendar-head {
        flex-direction: column;
        align-items: flex-start;
    }
    .sf-md3-calendar-shell { padding: 16px; }
    
    .sf-md3-modal-head,
    .sf-md3-modal-body { padding: 18px; }
}
@media print {
    .sf-v2-footer-bar { display: none; }
}


/* SF_RESPONSIVE_FIX_START */

/* Calendar controls: one centered row on desktop and mobile. */
.sf-md3-calendar .fc .fc-header-toolbar {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    width: 100%;
}

.sf-md3-calendar .fc .fc-header-toolbar > .fc-toolbar-chunk:empty {
    display: none !important;
}

.sf-md3-calendar .fc .fc-header-toolbar > .fc-toolbar-chunk {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
}

.sf-md3-calendar .fc .fc-toolbar-chunk > div {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.sf-md3-calendar .fc .fc-toolbar-title {
    margin: 0 !important;
    white-space: nowrap !important;
    font-size: 18px !important;
    line-height: 1.4 !important;
}

.sf-md3-calendar .fc .fc-toolbar-chunk > * {
    margin-inline: 0 !important;
}

.sf-md3-calendar .fc .fc-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 34px;
    padding: 6px 10px !important;
}

/* Compact footer, with the studio link preserved. */


.sf-v2-studio {
    flex-shrink: 0;
    gap: 8px;
}

.sf-v2-studio img {
    width: 70px;
    height: 25px;
}

.sf-v2-copyright {
    font-size: 12px;
    text-align: center;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sf-v2-version {
    flex-shrink: 0;
    font-size: 12px;
}

@media (max-width: 640px) {
    .sf-md3-calendar .fc .fc-header-toolbar > .fc-toolbar-chunk,
    .sf-md3-calendar .fc .fc-toolbar-chunk > div {
        gap: 6px !important;
    }

    .sf-md3-calendar .fc .fc-toolbar-title {
        font-size: 17px !important;
    }

    .sf-md3-calendar .fc .fc-button {
        min-height: 32px;
        padding: 5px 7px !important;
        font-size: 13px !important;
    }

    .sf-v2-footer-bar {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 6px;
        padding: 10px 8px calc(10px + env(safe-area-inset-bottom, 0px));
    }

    .sf-v2-studio {
        gap: 0;
    }

    .sf-v2-studio img {
        width: 44px;
        height: 18px;
    }

    .sf-v2-studio > span {
        display: none;
    }

    .dark .sf-v2-studio img {
        padding: 2px;
        border-radius: 3px;
    }

    .sf-v2-copyright {
        font-size: 8px;
        line-height: 1.4;
        white-space: nowrap;
    }

    .sf-v2-version {
        font-size: 8px;
        padding: 4px 5px;
        border-radius: 4px;
        white-space: nowrap;
    }
}

@media (max-width: 350px) {
    .sf-v2-copyright {
        font-size: 7px;
    }

    .sf-v2-studio img {
        width: 38px;
    }
}

/* SF_RESPONSIVE_FIX_END */


/* SF_SIDEBAR_ACCOUNT_V2 */
.sf-account-panel {
    margin: 0 0 18px;
    padding: 12px 8px 18px;
    border-bottom: 1px solid var(--sf-v2-line);
}

.sf-account-person {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.sf-account-person .fi-avatar {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.sf-account-person-text {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.sf-account-person-text strong {
    color: var(--sf-v2-text);
    font-size: 15px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.sf-account-person-text > span {
    color: var(--sf-v2-muted);
    font-size: 12px;
}

.sf-account-link {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 9px 8px;
    border-radius: 7px;
    color: var(--sf-v2-text);
    background: transparent;
    border: 0;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    text-align: start;
}

.sf-account-link:hover {
    background: var(--sf-v2-bg);
    color: var(--sf-v2-primary);
}

.sf-account-icon {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
}

.sf-account-setting {
    display: grid;
    gap: 8px;
    padding: 9px 8px;
}

.sf-account-setting label {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--sf-v2-muted);
    font-size: 13px;
}

.sf-account-setting select {
    width: 100%;
    padding: 7px 9px;
    border: 1px solid var(--sf-v2-line);
    border-radius: 7px;
    background-color: var(--sf-v2-surface);
    color: var(--sf-v2-text);
    font-size: 14px;
}

.sf-account-setting select:disabled {
    opacity: .6;
}

.sf-account-appearance {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 8px;
    color: var(--sf-v2-muted);
    font-size: 13px;
}

.sf-account-appearance .fi-theme-switcher {
    flex: 1;
    max-width: 128px;
}

.sf-account-logout {
    color: #dc2626;
    margin-top: 5px;
}

.sf-account-link:focus-visible,
.sf-account-setting select:focus-visible {
    outline: 2px solid var(--sf-v2-primary);
    outline-offset: 2px;
}


/* SF_ACCOUNT_NOTIFICATIONS_V3 */
.sf-account-heading-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.sf-account-heading-row .sf-account-person {
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 7px 4px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    text-align: start;
}
.sf-account-heading-row .sf-account-person:hover {
    background: var(--sf-v2-bg);
}
.sf-account-heading-row .sf-account-person:focus-visible {
    outline: 2px solid var(--sf-v2-primary);
    outline-offset: 2px;
}
.sf-account-heading-row .sf-account-person-text {
    flex: 1;
}
.sf-sidebar-notifications-button {
    border-radius: 8px;
}
.sf-notification-menu {
    width: min(360px, calc(100vw - 32px));
    background: var(--sf-v2-surface);
    color: var(--sf-v2-text);
    border-radius: 12px;
    overflow: hidden;
}
.sf-notifications-dropdown .fi-dropdown-panel {
    max-width: calc(100vw - 32px);
    padding: 0;
    border: 1px solid var(--sf-v2-line);
    border-radius: 12px;
    box-shadow: 0 16px 45px #101a2c22;
}
.sf-notification-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--sf-v2-line);
}
.sf-notification-menu-header strong {
    font-size: 15px;
    font-weight: 600;
}
.sf-notification-menu-header .fi-ac {
    font-size: 12px;
}
.sf-notification-menu-list {
    max-height: min(460px, 60dvh);
    overflow-y: auto;
}
.sf-notification-item {
    padding: 5px;
    border-bottom: 1px solid var(--sf-v2-line);
    background: var(--sf-v2-surface);
}
.sf-notification-unread {
    border-inline-start: 3px solid var(--sf-v2-primary);
}
.sf-notification-item .fi-no {
    box-shadow: none;
    border-radius: 8px;
    font-size: 14px;
}
.sf-notification-item .fi-no-notification-title {
    font-size: 14px;
    font-weight: 600;
}
.sf-notification-item .fi-no-notification-body {
    font-size: 13px;
    line-height: 1.6;
}
.sf-notification-view-all {
    display: block;
    padding: 12px;
    text-align: center;
    color: var(--sf-v2-primary);
    font-size: 14px;
    border-top: 1px solid var(--sf-v2-line);
    text-decoration: none;
}
.sf-notification-view-all:hover {
    background: var(--sf-v2-bg);
}
.sf-notification-empty {
    display: grid;
    justify-items: center;
    gap: 12px;
    padding: 36px 20px;
    color: var(--sf-v2-muted);
    font-size: 14px;
}
.sf-notification-empty-icon {
    width: 28px;
    height: 28px;
}
.sf-all-notifications {
    background: var(--sf-v2-surface);
    border: 1px solid var(--sf-v2-line);
    border-radius: 12px;
    overflow: hidden;
}
.sf-all-notifications-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    padding: 18px;
    border-bottom: 1px solid var(--sf-v2-line);
    color: var(--sf-v2-muted);
    font-size: 14px;
}
.sf-all-notifications-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}
.sf-notifications-pagination {
    padding: 18px;
}


/* SF_BELL_POSITION_START */
.sf-account-heading-row {
    gap: 12px;
    padding-inline: 2px;
}

.sf-account-heading-row > .sf-account-person {
    order: 1;
    flex: 1;
    min-width: 0;
}

.sf-account-heading-row > .sf-notifications-preview {
    order: 2;
    flex: 0 0 34px;
    margin-inline-start: auto;
}

.sf-account-heading-row .sf-sidebar-notifications-button {
    width: 34px;
    height: 34px;
    border: 1px solid var(--sf-v2-line);
    border-radius: 9px;
    background: var(--sf-v2-surface);
}

.sf-account-heading-row .sf-sidebar-notifications-button:hover {
    background: var(--sf-v2-bg);
}

.sf-account-person-text strong {
    font-size: 14px;
    line-height: 1.5;
}
/* SF_BELL_POSITION_END */


/* SF_BRAND_LOGO_START */

/* Larger logo, kept inside the header. */
.fi-sidebar-header .fi-logo,
.fi-topbar .fi-logo {
    height: 64px !important;
    width: auto !important;
    max-width: 200px !important;
    object-fit: contain !important;
}

/*
 * Dark-mode display treatment:
 * white background becomes black;
 * screen blending makes that black merge into the header.
 * The original PNG is not modified.
 */
html.dark .fi-sidebar-header img.fi-logo,
html.dark .fi-topbar img.fi-logo {
    filter: grayscale(1) invert(1) brightness(2);
    mix-blend-mode: screen;
}

/* Keep the header tall enough; no cropping. */
.fi-sidebar-header { min-height: var(--sf-header-height); }

@media (max-width: 640px) {
    .fi-sidebar-header .fi-logo,
    .fi-topbar .fi-logo {
        height: 52px !important;
        max-width: 160px !important;
    }
}

/* SF_BRAND_LOGO_END */

/* Preserved avatar crop geometry */
.sf-avatar-crop-modal {
        position: fixed;
        inset: 0;
        z-index: 999999;
        display: none;
        align-items: center;
        justify-content: center;
        padding: 24px;
        background: rgba(15,23,42,.62);
        backdrop-filter: blur(14px);
    }

    .sf-avatar-crop-modal.is-open {
        display: flex;
    }

    .sf-avatar-crop-card {
        width: min(620px, 96vw);
        border-radius: 34px;
        background: rgba(255,255,255,.96);
        border: 1px solid rgba(148,163,184,.24);
        box-shadow: 0 30px 90px rgba(15,23,42,.28);
        overflow: hidden;
    }

    .sf-avatar-crop-head {
        padding: 22px 24px;
        border-bottom: 1px solid rgba(148,163,184,.18);
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
    }

    .sf-avatar-crop-title {
        color: #0f172a;
        font-size: 22px;
        font-weight: 950;
        letter-spacing: -.04em;
        margin: 0;
    }

    .sf-avatar-crop-sub {
        color: #64748b;
        font-size: 15px;
        font-weight: 750;
        margin-top: 5px;
    }

    .sf-avatar-crop-close {
        width: 42px;
        height: 42px;
        border-radius: 999px;
        border: 1px solid rgba(148,163,184,.22);
        background: #f8fafc;
        color: #0f172a;
        font-size: 22px;
        font-weight: 950;
        cursor: pointer;
    }

    .sf-avatar-crop-body {
        padding: 24px;
        display: grid;
        gap: 20px;
    }

    .sf-avatar-crop-stage-wrap {
        display: flex;
        justify-content: center;
    }

    .sf-avatar-crop-stage {
        width: 320px;
        height: 320px;
        border-radius: 999px;
        overflow: hidden;
        background: #020617;
        border: 5px solid #2563eb;
        box-shadow: 0 18px 42px rgba(37,99,235,.20);
        position: relative;
        cursor: grab;
        touch-action: none;
        user-select: none;
    }

    .sf-avatar-crop-stage:active {
        cursor: grabbing;
    }

    .sf-avatar-crop-stage img {
        position: absolute;
        left: 50%;
        top: 50%;
        max-width: none;
        max-height: none;
        transform-origin: center;
        user-select: none;
        pointer-events: none;
        will-change: transform;
    }

    .sf-avatar-crop-stage::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: inherit;
        box-shadow: inset 0 0 0 999px rgba(255,255,255,.00), inset 0 0 0 1px rgba(255,255,255,.35);
        pointer-events: none;
    }

    .sf-avatar-crop-controls {
        display: grid;
        gap: 14px;
    }

    .sf-avatar-crop-control label {
        display: flex;
        justify-content: space-between;
        color: #334155;
        font-size: 14px;
        font-weight: 950;
        letter-spacing: .08em;
        text-transform: uppercase;
        margin-bottom: 8px;
    }

    .sf-avatar-crop-control input[type="range"] {
        width: 100%;
        accent-color: #2563eb;
    }

    .sf-avatar-crop-actions {
        padding: 18px 24px 24px;
        display: flex;
        justify-content: flex-end;
        gap: 12px;
        flex-wrap: wrap;
    }

    .sf-avatar-crop-btn {
        min-height: 46px;
        border-radius: 999px;
        border: 0;
        padding: 0 20px;
        font-size: 16px;
        font-weight: 950;
        cursor: pointer;
    }

    .sf-avatar-crop-btn-soft {
        background: #f8fafc;
        color: #0f172a;
        border: 1px solid rgba(148,163,184,.24);
    }

    .sf-avatar-crop-btn-primary {
        background: #2563eb;
        color: #fff;
        box-shadow: 0 14px 30px rgba(37,99,235,.20);
    }

    .sf-avatar-upload-card {
        border-style: solid !important;
        border-radius: 28px !important;
    }

    .sf-avatar-upload-button {
        background: #dff4ff !important;
        color: #075985 !important;
    }

    .dark .sf-avatar-crop-card {
        background: rgba(15,23,42,.96);
        border-color: rgba(148,163,184,.18);
    }

    .dark .sf-avatar-crop-title {
        color: #f8fafc;
    }

    .dark .sf-avatar-crop-sub,
    .dark .sf-avatar-crop-control label {
        color: #94a3b8;
    }

    .dark .sf-avatar-crop-close,
    .dark .sf-avatar-crop-btn-soft {
        background: rgba(15,23,42,.82);
        color: #f8fafc;
        border-color: rgba(148,163,184,.18);
    }


/* SF_PROFILE_V2 */
.sf-profile-v2 {
    color: var(--sf-v2-text);
}
.sf-profile-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}
.sf-profile-summary,
.sf-profile-form-card {
    border: 1px solid var(--sf-v2-line);
    border-radius: 12px;
    background: var(--sf-v2-surface);
    padding: 24px;
}
.sf-profile-summary {
    text-align: center;
}
.sf-profile-avatar {
    width: 90px;
    height: 90px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--sf-v2-bg);
    border: 1px solid var(--sf-v2-line);
    overflow: hidden;
    display: grid;
    place-items: center;
    font-size: 26px;
    font-weight: 600;
}
.sf-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.sf-profile-summary h2 {
    font-size: 16px;
    font-weight: 600;
    overflow-wrap: anywhere;
}
.sf-profile-email {
    margin-top: 6px;
    color: var(--sf-v2-muted);
    font-size: 14px;
    overflow-wrap: anywhere;
}
.sf-profile-tags {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-block: 16px;
}
.sf-profile-tags span {
    padding: 5px 8px;
    border-radius: 6px;
    background: var(--sf-v2-bg);
    border: 1px solid var(--sf-v2-line);
    font-size: 12px;
}
.sf-profile-help {
    font-size: 13px;
    line-height: 1.7;
    color: var(--sf-v2-muted);
    text-align: start;
    border-top: 1px solid var(--sf-v2-line);
    padding-top: 16px;
}
.sf-profile-v2 .sf-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.sf-profile-v2 .sf-section-title {
    color: var(--sf-v2-text);
    font-size: 17px;
    font-weight: 600;
}
.sf-profile-v2 .sf-section-sub {
    margin-top: 5px;
    color: var(--sf-v2-muted);
    font-size: 14px;
    line-height: 1.6;
}
.sf-profile-v2 .sf-section-icon {
    color: var(--sf-v2-primary);
}
.sf-profile-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
.sf-profile-v2 .sf-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.sf-profile-v2 .sf-field {
    min-width: 0;
}
.sf-profile-v2 .sf-field.full {
    grid-column: 1 / -1;
}
.sf-profile-v2 .sf-field > label {
    display: block;
    margin-bottom: 7px;
    color: var(--sf-v2-muted);
    font-size: 14px;
    font-weight: 500;
}
.sf-profile-v2 .sf-input {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--sf-v2-line);
    border-radius: 8px;
    padding: 10px 12px;
    background: var(--sf-v2-surface);
    color: var(--sf-v2-text);
    font-size: 15px;
}
.sf-profile-v2 .sf-input:disabled {
    background: var(--sf-v2-bg);
    color: var(--sf-v2-muted);
}
.sf-profile-v2 .sf-input:focus {
    outline: 2px solid var(--sf-v2-primary);
    outline-offset: 1px;
}
.sf-profile-v2 .sf-divider {
    height: 1px;
    background: var(--sf-v2-line);
    margin-block: 26px;
}
.sf-profile-v2 .sf-upload-zone {
    border: 1px dashed var(--sf-v2-line);
    border-radius: 10px;
    padding: 18px;
    background: var(--sf-v2-bg);
}
.sf-profile-v2 .sf-avatar-upload-card {
    display: grid;
    gap: 14px;
    padding: 0;
    margin: 0;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent;
}
.sf-profile-v2 .sf-avatar-preview-row {
    display: flex;
    align-items: center;
    gap: 14px;
}
.sf-profile-v2 .sf-avatar-live-preview {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    background: var(--sf-v2-surface);
    border: 2px solid var(--sf-v2-primary);
    display: grid;
    place-items: center;
    font-size: 20px;
}
.sf-profile-v2 .sf-avatar-live-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.sf-profile-v2 .sf-avatar-upload-title {
    color: var(--sf-v2-text);
    font-size: 15px;
    font-weight: 600;
}
.sf-profile-v2 .sf-avatar-upload-sub {
    color: var(--sf-v2-muted);
    font-size: 13px;
    line-height: 1.6;
    margin-top: 4px;
}
.sf-profile-v2 .sf-avatar-upload-button {
    display: inline-flex;
    width: fit-content;
    padding: 9px 12px;
    border: 1px solid var(--sf-v2-line);
    border-radius: 7px;
    background: var(--sf-v2-surface) !important;
    color: var(--sf-v2-primary) !important;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}
.sf-profile-v2 .sf-avatar-upload-button input {
    display: none;
}
.sf-profile-v2 .sf-upload-icon,
.sf-profile-v2 .sf-upload-title,
.sf-profile-v2 .sf-upload-sub {
    display: none;
}
.sf-profile-v2 .sf-upload-file {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 12px;
    color: var(--sf-v2-muted);
    font-size: 13px;
    overflow-wrap: anywhere;
}
.sf-profile-v2 .sf-upload-progress {
    display: none;
}
.sf-profile-v2 .sf-upload-progress.is-active {
    display: block;
    height: 4px;
    border-radius: 4px;
    background: var(--sf-v2-primary);
    opacity: .6;
}
.sf-profile-v2 .sf-btn-row {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}
.sf-profile-v2 .sf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--sf-v2-primary);
    border-radius: 8px;
    padding: 10px 14px;
    background: var(--sf-v2-primary);
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
}
.sf-profile-v2 .sf-btn-soft {
    background: var(--sf-v2-surface);
    color: var(--sf-v2-text);
    border-color: var(--sf-v2-line);
}
.sf-profile-message {
    margin-bottom: 18px;
    padding: 14px;
    border: 1px solid #16a34a55;
    border-radius: 9px;
    color: #15803d;
    background: #16a34a10;
    font-size: 14px;
}
.sf-profile-error {
    color: #dc2626;
    border-color: #dc262655;
    background: #dc262610;
}
.sf-avatar-crop-card {
    max-height: 90dvh;
    overflow-y: auto;
    border-radius: 14px;
    background: var(--sf-v2-surface);
}
.sf-avatar-crop-title {
    font-size: 19px;
    font-weight: 600;
    letter-spacing: normal;
}
.sf-avatar-crop-btn,
.sf-avatar-crop-close {
    border-radius: 8px;
    font-weight: 500;
}
@media (max-width: 900px) {
    .sf-profile-layout {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 640px) {
    .sf-profile-v2 .sf-form-grid {
        grid-template-columns: 1fr;
    }
    .sf-profile-form-card,
    .sf-profile-summary {
        padding: 18px;
    }
    .sf-avatar-crop-stage {
        width: 260px;
        height: 260px;
    }
}


/* SF_ARCHIVE_OVERVIEW_V2 */
.sf-sidebar-saved-avatar {
    display: block;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    border: 1px solid var(--sf-v2-line);
}
.sf-archive-v2 {
    display: grid;
    gap: 22px;
}
.sf-archive-intro {
    font-size: 15px;
    color: var(--sf-v2-muted);
    line-height: 1.6;
}
.sf-archive-statistics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.sf-archive-stat {
    display: grid;
    gap: 12px;
    padding: 18px;
    background: var(--sf-v2-surface);
    border: 1px solid var(--sf-v2-line);
    border-radius: 10px;
}
.sf-archive-stat > span {
    color: var(--sf-v2-muted);
    font-size: 14px;
}
.sf-archive-stat > strong {
    color: var(--sf-v2-text);
    font-size: 27px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
}
.sf-archive-areas {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.sf-archive-area {
    --sf-archive-tone: #3478f6;
    display: flex;
    flex-direction: column;
    padding: 24px;
    border: 1px solid var(--sf-v2-line);
    border-radius: 12px;
    background: var(--sf-v2-surface);
    text-decoration: none;
    transition: border-color .15s ease;
}
.sf-archive-tone-1 { --sf-archive-tone: #0d9488; }
.sf-archive-tone-2 { --sf-archive-tone: #7c3aed; }
.sf-archive-tone-3 { --sf-archive-tone: #d97706; }
.sf-archive-area:hover {
    border-color: var(--sf-archive-tone);
}
.sf-archive-area:focus-visible {
    outline: 2px solid var(--sf-archive-tone);
    outline-offset: 3px;
}
.sf-archive-area-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}
.sf-archive-area-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    color: var(--sf-archive-tone);
    background: color-mix(
        in srgb,
        var(--sf-archive-tone) 10%,
        var(--sf-v2-surface)
    );
}
.sf-archive-icon {
    width: 21px;
    height: 21px;
    flex-shrink: 0;
}
.sf-archive-area-count {
    font-size: 29px;
    font-weight: 650;
    color: var(--sf-v2-text);
    font-variant-numeric: tabular-nums;
}
.sf-archive-area h2 {
    color: var(--sf-v2-text);
    font-size: 16px;
    font-weight: 600;
}
.sf-archive-area p {
    margin-top: 8px;
    color: var(--sf-v2-muted);
    font-size: 14px;
    line-height: 1.7;
}
.sf-archive-area-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 20px;
    margin-top: auto;
    color: var(--sf-archive-tone);
    font-size: 14px;
    font-weight: 500;
}
.sf-archive-arrow {
    width: 15px;
    height: 15px;
}
.sf-archive-note {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid var(--sf-v2-line);
    border-radius: 9px;
    color: var(--sf-v2-muted);
    font-size: 14px;
    background: var(--sf-v2-surface);
}
@media (max-width: 900px) {
    .sf-archive-statistics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 640px) {
    .sf-archive-areas {
        grid-template-columns: 1fr;
    }
    .sf-archive-area {
        padding: 20px;
    }
}


/* SF_ARCHIVE_SIMPLIFIED_V3 */
.sf-archive-statistics {
    grid-template-columns: 1fr;
}
.sf-archive-total {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border: 1px solid var(--sf-v2-line);
    border-radius: 12px;
    background: var(--sf-v2-surface);
}
.sf-archive-total-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 11px;
    color: var(--sf-v2-primary);
    background: color-mix(
        in srgb,
        var(--sf-v2-primary) 12%,
        var(--sf-v2-surface)
    );
}
.sf-archive-total-text {
    flex: 1;
    min-width: 0;
}
.sf-archive-total-text > span {
    color: var(--sf-v2-text);
    font-size: 16px;
    font-weight: 600;
}
.sf-archive-total-text > p {
    margin-top: 5px;
    color: var(--sf-v2-muted);
    font-size: 13px;
    line-height: 1.6;
}
.sf-archive-total > strong {
    margin-inline-start: auto;
    color: var(--sf-v2-text);
    font-size: 30px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
}
.sf-archive-area-icon {
    background: color-mix(
        in srgb,
        var(--sf-archive-tone) 14%,
        var(--sf-v2-surface)
    );
}
@media (max-width: 900px) {
    .sf-archive-statistics {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 640px) {
    .sf-archive-total {
        padding: 16px;
        gap: 12px;
    }
    .sf-archive-total-icon {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }
    .sf-archive-total-text > span {
        font-size: 14px;
    }
    .sf-archive-total > strong {
        font-size: 25px;
    }
}


/* SF_SHARED_FILE_CARD — reusable whole-card file link */
.sf-file-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--sf-v2-line);
    border-radius: 10px;
    background: var(--sf-v2-surface);
    color: var(--sf-v2-text);
    text-decoration: none;
    transition: background-color .18s ease, border-color .18s ease;
}

a.sf-file-card {
    cursor: pointer;
}

a.sf-file-card:hover {
    border-color: var(--sf-v2-primary);
    background: color-mix(
        in srgb,
        var(--sf-v2-primary) 7%,
        var(--sf-v2-surface)
    );
}

a.sf-file-card:focus-visible {
    outline: 2px solid var(--sf-v2-primary);
    outline-offset: 3px;
}

.sf-file-card-category {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--sf-v2-muted);
    font-size: 13px;
    font-weight: 400;
}

.sf-file-card-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    color: var(--sf-v2-primary);
}

.sf-file-card-title {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.sf-file-card-source {
    font-size: 14px;
    color: var(--sf-v2-muted);
    overflow-wrap: anywhere;
}

.sf-file-card-open {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: auto;
    padding-top: 10px;
    color: var(--sf-v2-primary);
    font-size: 14px;
    font-weight: 500;
}

.sf-file-card-arrow {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
}

.sf-file-card-unavailable .sf-file-card-open {
    color: var(--sf-v2-muted);
}
@media (max-width: 640px) {
    :root { --sf-footer-height: 46px; }
}

@media print {
    body:has(.sf-v2-footer-bar) { padding-block-end: 0; }
}
/* Date/time presentation moved out of the old inline clock styles. */
.sf-local-clock { display: inline-flex; align-items: center; flex-shrink: 0; gap: 10px; margin-inline-start: 12px; padding: 8px 12px; min-height: 64px; border: 1px solid var(--sf-v2-line); border-radius: 9px; background: var(--sf-v2-surface); color: var(--sf-v2-text); font-family: inherit; }
.sf-local-clock-icon { width: 23px; height: 23px; color: var(--sf-v2-primary); }
.sf-local-clock-content { display: grid; gap: 2px; }
.sf-local-clock-label { font-size: 11px; line-height: 1.2; color: var(--sf-v2-muted); }
.sf-local-clock [data-sf-clock-time] { white-space: nowrap; font-size: 18px; font-weight: 700; line-height: 1.25; font-variant-numeric: tabular-nums; }
.sf-local-clock [data-sf-clock-date] { white-space: nowrap; font-size: 14px; font-weight: 700; line-height: 1.3; color: var(--sf-v2-text); }
.sf-standalone-clock-bar { display: flex; align-items: center; justify-content: flex-end; padding: 10px 20px; background: var(--sf-v2-surface); border-bottom: 1px solid var(--sf-v2-line); }
@media(min-width: 1024px) { .fi-body-has-topbar .fi-sidebar { top: var(--sf-header-height); height: calc(100dvh - var(--sf-header-height)); } }
@media(max-width: 640px) {
    :root { --sf-header-height: 76px; }
    .sf-local-clock { min-height: 56px; margin-inline-start: 6px; padding: 7px 8px; gap: 6px; }
    .sf-local-clock-icon { width: 18px; height: 18px; }
    .sf-local-clock-label { display: none; }
    .sf-local-clock [data-sf-clock-time] { font-size: 16px; }
    .sf-local-clock [data-sf-clock-date] { font-size: 12px; }
    .fi-topbar .fi-global-search .fi-input-wrp { min-height: 56px; }
    .fi-topbar .fi-global-search .fi-input { height: 54px; }
}
@media print { .sf-local-clock, .sf-standalone-clock-bar { display: none; } }