/* SPSTN PDP — design system */

@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap");

:root {
    --spstn-navy: #1e2749;
    --spstn-navy-soft: #3c4568;
    --spstn-teal: #2ca39a;
    --spstn-teal-dark: #1f8a80;
    --spstn-teal-soft: #e3f5f3;
    --spstn-sky: #63c2d0;
    --spstn-pink: #ee85a8;
    --spstn-magenta: #e30572;
    --spstn-yellow: #ffcb1e;
    --spstn-coral: #e95d4f;
    --spstn-lime: #adc936;
    --spstn-bg: #f5f8f8;
    --spstn-white: #ffffff;
    --spstn-border: #e2e8ea;
    --spstn-text: #1e2749;
    --spstn-text-muted: #5b6472;
    --spstn-text-faint: #8b93a0;
    --spstn-text-sidebar: #d7dcec;
    --spstn-danger: #c0392b;
    --spstn-sidebar-width: 240px;
    --spstn-sidebar-collapsed-width: 72px;
    --spstn-radius: 10px;
    --spstn-shadow: 0 24px 60px -20px rgba(30, 39, 73, 0.18);
    --spstn-card-shadow: 0 20px 40px -16px rgba(30, 39, 73, 0.28);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family: "Montserrat", system-ui, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--spstn-text);
    background: var(--spstn-bg);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--spstn-teal-dark);
    text-decoration: none;
}

a:hover {
    color: #17685f;
}

input:focus,
select:focus,
textarea:focus,
button:focus {
    outline: 2px solid var(--spstn-sky);
    outline-offset: 1px;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-thumb {
    background: #d3dbdd;
    border-radius: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

/* Brand dots */
.brand-dots {
    display: flex;
    gap: 3px;
    flex-shrink: 0;
}

.brand-dots--lg .brand-dots__dot {
    width: 9px;
    height: 9px;
}

.brand-dots__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: block;
}

.brand-dots__dot--pink { background: var(--spstn-pink); }
.brand-dots__dot--yellow { background: var(--spstn-yellow); }
.brand-dots__dot--sky { background: var(--spstn-sky); }
.brand-dots__dot--magenta { background: var(--spstn-magenta); }
.brand-dots__dot--lime { background: var(--spstn-lime); }

/* Login */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 20% 15%, #e9f6f5 0%, #f5f8f8 45%, #f5f8f8 100%);
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: var(--spstn-white);
    border: 1px solid var(--spstn-border);
    border-radius: 20px;
    padding: 40px 36px;
    box-shadow: var(--spstn-shadow);
}

.login-card__brand {
    margin-bottom: 28px;
}

.login-card__logo {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--spstn-navy);
    margin: 6px 0 2px;
}

.login-card__subtitle {
    font-size: 13px;
    color: var(--spstn-text-muted);
    margin: 0;
    line-height: 1.5;
}

.login-form {
    display: flex;
    flex-direction: column;
}

.login-form__label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--spstn-navy-soft);
    margin-bottom: 6px;
}

.login-form .spstn-input {
    margin-bottom: 16px;
    padding: 11px 14px;
    border-radius: 10px;
    border-color: var(--spstn-border);
}

.login-form .spstn-input:last-of-type {
    margin-bottom: 22px;
}

.login-card__footer {
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid #eef1f2;
    font-size: 11.5px;
    color: var(--spstn-text-faint);
    text-align: center;
    line-height: 1.6;
}

.spstn-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--spstn-border);
    border-radius: var(--spstn-radius);
    font-family: inherit;
    font-size: 14px;
    color: var(--spstn-text);
    background: var(--spstn-white);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.spstn-input:focus {
    outline: none;
    border-color: var(--spstn-teal);
    box-shadow: 0 0 0 3px rgba(44, 163, 154, 0.15);
}

.spstn-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border: none;
    border-radius: var(--spstn-radius);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}

.spstn-btn:active {
    transform: scale(0.98);
}

.spstn-btn--primary {
    width: 100%;
    background: var(--spstn-teal);
    color: var(--spstn-white);
    font-weight: 700;
    border-radius: 10px;
    padding: 12px 14px;
}

.spstn-btn--primary:hover {
    background: var(--spstn-teal-dark);
}

.spstn-btn--secondary {
    background: var(--spstn-white);
    color: var(--spstn-navy);
    border: 1px solid var(--spstn-border);
}

.spstn-btn--secondary:hover {
    background: var(--spstn-bg);
}

.spstn-btn--danger {
    background: var(--spstn-danger);
    color: var(--spstn-white);
}

.spstn-btn--danger:hover {
    background: #c82333;
}

.spstn-btn--sm {
    padding: 8px 14px;
    font-size: 13px;
}

.spstn-btn--xs {
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
}

.spstn-btn--teal {
    background: var(--spstn-teal);
    color: var(--spstn-white);
    font-weight: 700;
}

.spstn-btn--teal:hover {
    background: var(--spstn-teal-dark);
}

.spstn-btn--navy {
    background: var(--spstn-navy);
    color: var(--spstn-white);
    font-weight: 700;
}

.spstn-btn--navy:hover {
    background: #141c36;
}

.spstn-btn--outline {
    background: var(--spstn-white);
    color: var(--spstn-teal-dark);
    border: 1px solid var(--spstn-teal);
    font-weight: 700;
}

.spstn-btn--outline:hover {
    background: #eaf6f5;
}

.inline-form {
    display: inline;
}

.spstn-input--sm {
    padding: 7px 10px;
    font-size: 13px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.spstn-btn--ghost {
    background: transparent;
    color: var(--spstn-text-muted);
    padding: 8px;
    font-weight: 500;
}

.spstn-btn--ghost:hover {
    color: var(--spstn-text);
}

.form-errors {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--spstn-radius);
    color: var(--spstn-danger);
    font-size: 13px;
    padding: 10px 14px;
    margin-bottom: 20px;
}

.field-error {
    color: var(--spstn-danger);
    font-size: 12px;
    margin-top: 4px;
}

/* App shell */
.app-shell {
    display: flex;
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
    background: var(--spstn-bg);
}

.app-sidebar {
    width: var(--spstn-sidebar-width);
    min-width: var(--spstn-sidebar-width);
    background: var(--spstn-navy);
    color: var(--spstn-white);
    display: flex;
    flex-direction: column;
    transition: width 0.18s ease, min-width 0.18s ease;
    overflow: hidden;
    flex-shrink: 0;
}

.app-sidebar__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 22px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    white-space: nowrap;
}

.app-sidebar__titles {
    min-width: 0;
}

.app-sidebar__logo {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #ffffff;
    margin: 0;
}

.app-sidebar__app-name {
    font-size: 10.5px;
    color: #9aa3c0;
    margin: -2px 0 0;
}

.app-sidebar__nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--spstn-text-sidebar);
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    overflow: hidden;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.nav-item--active {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-weight: 700;
}

.nav-item__icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-item__icon svg {
    width: 18px;
    height: 18px;
}

.nav-item__icon--sky { color: var(--spstn-sky); }
.nav-item__icon--coral { color: var(--spstn-coral); }
.nav-item__icon--lime { color: var(--spstn-lime); }
.nav-item__icon--muted { color: var(--spstn-text-faint); }
.nav-item__icon--yellow { color: var(--spstn-yellow); }

.app-sidebar__footer {
    padding: 14px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px 12px;
    text-decoration: none;
    border-radius: 10px;
    transition: background 0.15s;
}

.user-card:hover {
    background: rgba(255, 255, 255, 0.08);
}

.user-card--active {
    background: rgba(255, 255, 255, 0.12);
}

.user-card__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #35b3a9;
    flex-shrink: 0;
}

.user-card__avatar-badge {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.user-card__info {
    flex: 1;
    min-width: 0;
    line-height: 1.25;
}

.user-card__name {
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.user-card__role {
    font-size: 10.5px;
    font-weight: 600;
    color: #9aa3c0;
    margin: 0;
}

.sidebar-collapse-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 9px;
    border: none;
    background: transparent;
    color: #9aa3c0;
    font-family: inherit;
    font-size: 12.5px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.sidebar-collapse-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.sidebar-collapse-btn__icon {
    font-size: 15px;
    line-height: 1;
}

.app-shell--collapsed .app-sidebar {
    width: var(--spstn-sidebar-collapsed-width);
    min-width: var(--spstn-sidebar-collapsed-width);
}

.app-shell--collapsed .app-sidebar__titles,
.app-shell--collapsed .nav-item__label,
.app-shell--collapsed .user-card__info,
.app-shell--collapsed .sidebar-collapse-btn__label {
    display: none;
}

.app-shell--collapsed .app-sidebar__brand {
    justify-content: center;
    padding-inline: 12px;
}

.app-shell--collapsed .nav-item {
    justify-content: center;
    padding-inline: 10px;
}

.app-shell--collapsed .user-card {
    justify-content: center;
    padding-inline: 6px;
}

.app-shell--collapsed .sidebar-collapse-btn {
    justify-content: center;
}

/* Main content */
.app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.app-header-row {
    display: flex;
    flex-shrink: 0;
    align-items: stretch;
}

.app-header-separator {
    width: 6px;
    flex-shrink: 0;
}

.app-header-separator--sky { background: var(--spstn-sky); }
.app-header-separator--coral { background: var(--spstn-coral); }
.app-header-separator--lime { background: var(--spstn-lime); }
.app-header-separator--muted { background: var(--spstn-text-faint); }
.app-header-separator--yellow { background: var(--spstn-yellow); }

.app-header {
    background: var(--spstn-navy);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}

.app-header__title {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-header__icon {
    width: 22px;
    height: 22px;
}

.app-header__icon svg {
    width: 20px;
    height: 20px;
}

.app-header__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.app-content {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 28px 36px 48px;
}

/* ── Placeholder content ── */

.placeholder-panel {
    background: var(--spstn-white);
    border: 1px solid var(--spstn-border);
    border-radius: 12px;
    padding: 48px 32px;
    text-align: center;
    box-shadow: var(--spstn-shadow);
}

.placeholder-panel__title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--spstn-navy);
}

.placeholder-panel__text {
    font-size: 14px;
    color: var(--spstn-text-muted);
    margin: 0;
}

/* ── Global table ── */

.table-screen {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.saved-view-actions {
    display: inline-flex;
    align-items: center;
    gap: 0;
}

.saved-view-dropdown-wrap {
    position: relative;
}

.saved-view-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left: none;
    padding-left: 10px;
    padding-right: 12px;
    max-width: 260px;
}

.saved-view-dropdown-toggle__label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--spstn-navy-soft);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.saved-view-actions > #save-view-open {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.btn-icon--bookmark {
    color: var(--spstn-teal-dark);
}

.btn-icon--chevron {
    color: var(--spstn-text-faint);
}

.btn-icon--chevron svg {
    width: 13px;
    height: 13px;
    transition: transform 0.15s ease;
}

.saved-view-dropdown-toggle[aria-expanded="true"] .btn-icon--chevron svg {
    transform: rotate(180deg);
}

.saved-view-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 220px;
    max-width: 320px;
    background: var(--spstn-white);
    border: 1px solid var(--spstn-border);
    border-radius: 12px;
    box-shadow: var(--spstn-card-shadow);
    padding: 6px;
    z-index: 30;
}

.saved-view-dropdown__item {
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--spstn-navy-soft);
    text-decoration: none;
}

.saved-view-dropdown__item:hover {
    background: #f7fbfa;
    color: var(--spstn-teal-dark);
}

.saved-view-dropdown__item--active {
    background: #eaf6f5;
    color: var(--spstn-teal-dark);
}

.saved-view-dropdown__row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.saved-view-dropdown__row .saved-view-dropdown__item {
    flex: 1;
    min-width: 0;
}

.saved-view-dropdown__remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: none;
    border: none;
    color: #b3bac4;
    cursor: pointer;
    line-height: 1;
    padding: 6px 8px;
    border-radius: 6px;
}

.saved-view-dropdown__remove svg {
    width: 14px;
    height: 14px;
}

.saved-view-dropdown__remove:hover {
    color: var(--spstn-danger, #c0392b);
    background: #fef5f5;
}

.selection-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding: 10px 16px;
    background: #eaf6f5;
    border: 1px solid #bfe3df;
    border-radius: 11px;
}

.selection-bar[hidden] {
    display: none !important;
}

.selection-bar__label {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--spstn-teal-dark);
}

.table-controls {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.table-actions__left,
.table-actions__right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.table-actions__right {
    margin-left: auto;
}

.column-panel-wrap {
    position: relative;
}

.column-panel-toggle__icon {
    width: 9px;
    height: 9px;
    border-radius: 2px;
    border: 2px solid var(--spstn-teal);
    display: block;
}

.btn-icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-icon svg {
    width: 15px;
    height: 15px;
}

.btn-icon--filter {
    color: var(--spstn-teal-dark);
}

.btn-icon--save {
    color: var(--spstn-teal-dark);
}

.btn-icon--export {
    color: var(--spstn-lime);
}

.selection-bar__select-all-link {
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    color: var(--spstn-teal-dark);
    text-decoration: underline;
    cursor: pointer;
}

.selection-bar__select-all-link:hover {
    color: var(--spstn-teal);
}

.selection-bar__select-all-link[hidden] {
    display: none !important;
}

.columns-popup {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 290px;
    background: var(--spstn-white);
    border: 1px solid var(--spstn-border);
    border-radius: 12px;
    box-shadow: var(--spstn-card-shadow);
    padding: 14px;
    z-index: 30;
}

.columns-popup__actions {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.columns-popup__list {
    max-height: 280px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.column-toggle {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 6px 8px;
    border-radius: 7px;
    font-size: 12.5px;
    color: var(--spstn-navy-soft);
    cursor: pointer;
}

.column-toggle:hover {
    background: #f7fbfa;
}

.column-toggle input {
    accent-color: var(--spstn-teal);
    width: 14px;
    height: 14px;
}

.save-view-icon {
    display: none;
}

.export-icon {
    display: none;
}

.table-card {
    background: var(--spstn-white);
    border: 1px solid var(--spstn-border);
    border-radius: 16px;
    overflow: visible;
}

.table-card--sky {
    border-color: rgba(99, 194, 208, 0.32);
    box-shadow:
        0 10px 24px -14px rgba(99, 194, 208, 0.42),
        0 0 0 1px rgba(99, 194, 208, 0.12);
}

.table-card--muted {
    border-color: rgba(139, 147, 160, 0.32);
    box-shadow:
        0 10px 24px -14px rgba(139, 147, 160, 0.32),
        0 0 0 1px rgba(139, 147, 160, 0.12);
}

.table-card--magenta {
    border-color: rgba(227, 5, 114, 0.24);
    box-shadow:
        0 10px 24px -14px rgba(227, 5, 114, 0.32),
        0 0 0 1px rgba(227, 5, 114, 0.1);
}

.table-card__scroll {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
    min-width: 900px;
}

.data-table th,
.data-table td {
    padding: 13px 12px;
    border-bottom: 1px solid var(--spstn-border);
    text-align: left;
    vertical-align: middle;
}

.data-table th {
    background: #f8fafa;
    font-size: 11px;
    font-weight: 700;
    color: var(--spstn-text-faint);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    position: relative;
}

.th-dossier,
.col-dossier {
    padding-left: 16px;
    padding-right: 16px;
}

.col-header {
    white-space: nowrap;
}

.col-filter {
    position: relative;
    display: inline-flex;
}

.col-filter__trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    margin: -5px -9px;
    border: none;
    background: transparent;
    font: inherit;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    white-space: nowrap;
}

.col-filter__trigger:hover {
    background: rgba(44, 163, 154, 0.1);
    color: var(--spstn-navy);
}

.col-filter--active .col-filter__trigger {
    color: var(--spstn-teal-dark);
}

.col-filter--active .col-filter__trigger-text::after {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-left: 6px;
    background: var(--spstn-teal);
    border-radius: 50%;
    vertical-align: middle;
    box-shadow: 0 0 0 2px rgba(44, 163, 154, 0.18);
}

.col-filter--open .col-filter__trigger {
    background: var(--spstn-teal-soft);
    color: var(--spstn-teal-dark);
    box-shadow: inset 0 0 0 1px rgba(44, 163, 154, 0.22);
}

.col-filter__trigger-icon {
    width: 11px;
    height: 11px;
    opacity: 0.45;
    flex-shrink: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.col-filter--active .col-filter__trigger-icon,
.col-filter--open .col-filter__trigger-icon {
    opacity: 1;
    color: var(--spstn-teal);
}

.col-filter--open .col-filter__trigger-icon {
    transform: rotate(180deg);
}

.col-filter__panel {
    position: fixed;
    z-index: 300;
    min-width: 268px;
    max-width: 340px;
    background: var(--spstn-white);
    border: 1px solid rgba(30, 39, 73, 0.1);
    border-radius: 14px;
    box-shadow:
        0 24px 56px -18px rgba(30, 39, 73, 0.32),
        0 0 0 1px rgba(30, 39, 73, 0.04);
    overflow: hidden;
    animation: col-filter-in 0.16s ease-out;
}

@keyframes col-filter-in {
    from {
        opacity: 0;
        transform: translateY(-5px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.col-filter__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 14px;
    background: linear-gradient(180deg, #f9fbfb 0%, #f2f8f7 100%);
    border-bottom: 1px solid var(--spstn-border);
}

.col-filter__header-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--spstn-navy);
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.3;
}

.col-filter__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--spstn-text-faint);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.col-filter__close:hover {
    background: rgba(30, 39, 73, 0.06);
    color: var(--spstn-navy);
}

.col-filter__body {
    padding: 14px;
}

.col-filter__label {
    display: block;
    font-size: 10.5px;
    color: var(--spstn-text-faint);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.35px;
    margin-bottom: 7px;
}

.col-filter__body .spstn-input {
    width: 100%;
}

.col-filter__textarea {
    resize: vertical;
    min-height: 76px;
}

.col-filter__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 10px 14px 14px;
    border-top: 1px solid #edf1f2;
    background: #fafcfc;
}

.col-filter__clear {
    margin-right: auto;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--spstn-text-muted);
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.col-filter__clear:hover {
    color: var(--spstn-teal-dark);
}

.dossier-cell__title {
    font-weight: 700;
    color: var(--spstn-navy);
}

.dossier-cell__subtitle {
    font-size: 11px;
    color: var(--spstn-text-faint);
    margin-top: 2px;
}

.table-badge {
    padding: 4px 11px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
    display: inline-block;
}

.table-cell-text {
    white-space: nowrap;
}

.col-chevron {
    padding: 13px 16px;
    text-align: right;
    color: #c7ccd6;
    font-weight: 700;
    width: 32px;
}

.table-row-clickable {
    cursor: pointer;
}

.table-row-clickable:hover {
    background: #f7fbfa;
}

.table-row--archived {
    background: #f8f9fb;
}

.table-row--archived:hover {
    background: #f1f4f8;
}

.table-archived-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: #e8ecf3;
    color: #64748b;
    vertical-align: middle;
}

.col-checkbox {
    width: 20px;
    padding: 13px 8px 13px 16px;
    text-align: center;
}

.col-checkbox input {
    accent-color: var(--spstn-teal);
    width: 14px;
    height: 14px;
}

.table-empty {
    text-align: center;
    color: var(--spstn-text-muted);
    padding: 32px;
}

.table-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-top: 1px solid #eef1f2;
    gap: 12px;
    flex-wrap: wrap;
}

.table-card__count {
    font-size: 12px;
    color: var(--spstn-text-faint);
}

.table-pagination {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pagination-info {
    font-size: 12px;
    color: var(--spstn-text-muted);
}

.save-view-dialog {
    border: 1px solid var(--spstn-border);
    border-radius: 14px;
    padding: 24px;
    max-width: 400px;
    box-shadow: var(--spstn-card-shadow);
}

.save-view-dialog::backdrop {
    background: rgba(30, 39, 73, 0.25);
}

.save-view-dialog__title {
    margin: 0 0 16px;
    font-size: 16px;
    color: var(--spstn-navy);
}

.save-view-dialog__label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px;
}

.save-view-dialog__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.unsaved-changes-dialog {
    border: 1px solid var(--spstn-border);
    border-radius: 14px;
    padding: 24px;
    max-width: 440px;
    box-shadow: var(--spstn-card-shadow);
}

.unsaved-changes-dialog::backdrop {
    background: rgba(30, 39, 73, 0.25);
}

.unsaved-changes-dialog__title {
    margin: 0 0 10px;
    font-size: 16px;
    color: var(--spstn-navy);
}

.unsaved-changes-dialog__text {
    margin: 0 0 20px;
    font-size: 13px;
    color: var(--spstn-text-muted);
    line-height: 1.5;
}

.unsaved-changes-dialog__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.table-disclaimer {
    margin-top: 16px;
    font-size: 11.5px;
    color: #b3bac4;
    line-height: 1.6;
}

/* ── Record (fiche salarié) ── */

.record-screen {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 1040px;
}

.record-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--spstn-text-faint);
    font-family: inherit;
    font-weight: 600;
    font-size: 12.5px;
    margin-bottom: 16px;
    padding: 0;
    text-decoration: none;
}

.record-back-link:hover {
    color: var(--spstn-navy);
}

.record-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 22px;
    gap: 16px;
    flex-wrap: wrap;
}

.record-header__title {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 800;
    color: var(--spstn-navy);
}

.record-header__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 12.5px;
    color: var(--spstn-text-faint);
}

.record-header__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.floating-save-btn {
    position: fixed;
    right: 36px;
    bottom: 36px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: var(--spstn-teal);
    color: #fff;
    box-shadow: 0 8px 24px rgba(44, 163, 154, 0.45);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}

.floating-save-btn:hover {
    background: var(--spstn-teal-dark);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(44, 163, 154, 0.5);
}

.floating-save-btn svg {
    width: 24px;
    height: 24px;
}

.floating-save-btn[hidden] {
    display: none;
}

.record-badge--new {
    background: var(--spstn-teal-soft);
    color: var(--spstn-teal-dark);
}

.spstn-btn--archive {
    background: #fff8f7;
    color: var(--spstn-danger);
    border: 1px solid #f4c7c0;
    font-weight: 700;
}

.spstn-btn--archive:hover {
    background: #fceae7;
}

.readonly-banner {
    background: #fff6dc;
    border: 1px solid #f4e3a6;
    color: #8a6d00;
    padding: 12px 16px;
    border-radius: 11px;
    font-size: 12.5px;
    font-weight: 600;
    margin-bottom: 20px;
}

.readonly-banner--archived {
    background: #fff8e6;
    border-color: #fde68a;
    color: #92400e;
    font-weight: 500;
}

.record-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 900px) {
    .record-cards-grid {
        grid-template-columns: 1fr;
    }
}

.record-card {
    background: var(--spstn-white);
    border: 1px solid var(--spstn-border);
    border-radius: 16px;
    padding: 22px 24px;
}

.record-card--actors {
    margin-top: 20px;
}

.record-card__title {
    margin: 0 0 16px;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--spstn-navy);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.record-card__fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.actors-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 700px) {
    .actors-grid {
        grid-template-columns: 1fr;
    }
}

.record-field__label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--spstn-text-faint);
    margin-bottom: 4px;
}

.record-field .spstn-input,
.record-field select,
.record-field textarea {
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #dce4e5;
    font-size: 13px;
    font-weight: 600;
    color: var(--spstn-navy);
}

.record-field__value {
    margin: 0;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--spstn-navy);
}

.record-field--readonly .record-field__value {
    color: var(--spstn-navy);
}

.record-field--multi select {
    min-height: 140px;
}

.spstn-input--readonly,
.spstn-input:disabled {
    background: var(--spstn-bg);
    color: var(--spstn-text-muted);
    cursor: not-allowed;
}

.record-latest-audit {
    margin: 14px 0 0;
    font-size: 11px;
    color: var(--spstn-text-faint);
    display: flex;
    align-items: center;
    gap: 6px;
}

.record-latest-audit__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--spstn-lime);
    display: inline-block;
}

.record-journal {
    margin-top: 24px;
    background: var(--spstn-white);
    border: 1px solid var(--spstn-border);
    border-radius: 16px;
    padding: 22px 24px;
}

.record-journal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
}

.record-journal__title {
    margin: 0;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--spstn-navy);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.record-journal__toggle {
    background: none;
    border: none;
    color: var(--spstn-teal-dark);
    font-family: inherit;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
}

.record-journal__entries {
    display: flex;
    flex-direction: column;
}

.journal-entry {
    display: flex;
    gap: 14px;
    padding: 11px 0;
    border-bottom: 1px solid #f1f3f4;
}

.journal-entry--hidden {
    display: none;
}

.journal-entry__date {
    width: 82px;
    flex-shrink: 0;
    font-size: 11.5px;
    color: var(--spstn-text-faint);
    padding-top: 1px;
}

.journal-entry__summary {
    margin: 0;
    font-size: 13px;
    color: var(--spstn-navy);
}

.journal-entry__change {
    margin: 3px 0 0;
    font-size: 12px;
    color: var(--spstn-text-muted);
    font-style: italic;
}

.audit-empty {
    font-size: 13px;
    color: var(--spstn-text-muted);
    margin: 0;
}

.audit-item {
    display: grid;
    grid-template-columns: 130px 140px 160px 1fr;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--spstn-border);
    font-size: 12px;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(30, 39, 73, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 24px;
}

.modal-card {
    background: var(--spstn-white);
    border-radius: 12px;
    padding: 28px 32px;
    max-width: 460px;
    width: 100%;
    box-shadow: var(--spstn-shadow);
}

.modal-card__title {
    margin: 0 0 12px;
    font-size: 18px;
    color: var(--spstn-navy);
}

.modal-card__text {
    margin: 0 0 20px;
    font-size: 14px;
    color: var(--spstn-text);
}

.modal-card__actions {
    display: flex;
    gap: 10px;
}

/* ── Alerts ── */

.alerts-screen {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.alerts-intro,
.dashboard-intro {
    font-size: 13px;
    color: var(--spstn-text-muted);
    max-width: 760px;
    line-height: 1.6;
    margin: 0;
}

.alerts-filters {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alerts-filters__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: flex-start;
}

.alerts-filter__label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--spstn-text-faint);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.alerts-filter__options {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--spstn-white);
    border: 1px solid var(--spstn-border);
    border-radius: 10px;
    padding: 8px;
    min-width: 240px;
}

.multi-select-wrap {
    position: relative;
    min-width: 240px;
}

.multi-select-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    text-align: left;
    cursor: pointer;
    background: var(--spstn-white);
}

.multi-select-toggle__arrow {
    color: var(--spstn-text-faint);
    font-size: 11px;
}

.multi-select-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--spstn-white);
    border: 1px solid var(--spstn-border);
    border-radius: 10px;
    box-shadow: var(--spstn-card-shadow);
    padding: 8px;
    z-index: 30;
}

.multi-select-option {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 8px;
    border-radius: 7px;
    font-size: 12.5px;
    color: var(--spstn-navy-soft);
    cursor: pointer;
}

.multi-select-option:hover {
    background: #f7fbfa;
}

.multi-select-option input {
    accent-color: var(--spstn-teal);
    width: 14px;
    height: 14px;
}

.multi-select-panel__actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--spstn-border);
}

/* Searchable select (fiche dossier) */
.spstn-select-wrap {
    position: relative;
    width: 100%;
}

.spstn-select-native {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.spstn-select-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    text-align: left;
    cursor: pointer;
    background: var(--spstn-white);
}

.spstn-select-toggle__label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.spstn-select-toggle__arrow {
    color: var(--spstn-text-faint);
    font-size: 11px;
    flex-shrink: 0;
}

.spstn-select-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--spstn-white);
    border: 1px solid var(--spstn-border);
    border-radius: 10px;
    box-shadow: var(--spstn-card-shadow);
    padding: 8px;
    z-index: 30;
}

.spstn-select-search {
    width: 100%;
    padding: 8px 10px;
    margin-bottom: 6px;
    border: 1px solid var(--spstn-border);
    border-radius: 7px;
    font-family: inherit;
    font-size: 13px;
    color: var(--spstn-text);
    background: var(--spstn-white);
}

.spstn-select-search:focus {
    outline: none;
    border-color: var(--spstn-teal);
    box-shadow: 0 0 0 3px rgba(44, 163, 154, 0.15);
}

.spstn-select-list {
    max-height: 240px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.spstn-select-option {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 8px;
    border-radius: 7px;
    font-size: 12.5px;
    color: var(--spstn-navy-soft);
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.spstn-select-option:hover,
.spstn-select-option--active {
    background: #f7fbfa;
}

.spstn-select-option--selected {
    font-weight: 600;
    color: var(--spstn-navy);
}

.spstn-select-option input[type="checkbox"] {
    accent-color: var(--spstn-teal);
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.spstn-select-empty {
    padding: 8px;
    font-size: 12.5px;
    color: var(--spstn-text-faint);
    text-align: center;
}

.spstn-select-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.spstn-select-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 11px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    background: #e3f5f3;
    color: #1f8a80;
    line-height: 1.3;
}

.spstn-select-pill__label {
    white-space: normal;
}

.spstn-select-pill__remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #1f8a80;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}

.spstn-select-pill__remove:hover {
    background: rgba(31, 138, 128, 0.12);
}

.record-field--multi-pills select[multiple] {
    display: none;
}

.alerts-filter__option {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 8px;
    border-radius: 7px;
    font-size: 12.5px;
    color: var(--spstn-navy-soft);
    cursor: pointer;
}

.alerts-filter__option:hover {
    background: #f7fbfa;
}

.alerts-filter__option input {
    accent-color: var(--spstn-teal);
    width: 14px;
    height: 14px;
}

.filter-select {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
}

.alert-type-dot {
    width: 9px;
    height: 9px;
    border-radius: 3px;
    display: block;
    flex-shrink: 0;
}

.alert-type-dot--arret_contrat { background: var(--spstn-coral); }
.alert-type-dot--sortie_dispositif { background: var(--spstn-magenta); }
.alert-type-dot--suivi_6_mois { background: var(--spstn-sky); }
.alert-type-dot--suivi_1_an { background: var(--spstn-lime); }

.alert-type-cell {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.alert-type-label {
    font-weight: 600;
    color: var(--spstn-navy);
}

.alert-status-tag {
    font-size: 10px;
    font-weight: 700;
    color: #047857;
    background: #e3f5f3;
    padding: 2px 8px;
    border-radius: 999px;
}

.col-alert-type {
    padding-left: 18px !important;
}

.col-alert-id {
    font-weight: 700;
    color: var(--spstn-navy);
}

.alert-row-clickable {
    cursor: pointer;
}

.alert-row-clickable:hover {
    background: #f7fbfa;
}

.alert-row--acknowledged {
    opacity: 0.85;
}

.alert-ack-btn {
    font-size: 11px;
}

.alerts-table td:nth-child(1) {
    white-space: normal;
    min-width: 180px;
}

/* ── Dashboard ── */

.dashboard-screen {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.dashboard-period {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.dashboard-period__label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--spstn-text-faint);
    text-transform: uppercase;
}

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 900px) {
    .dashboard-kpi-grid {
        grid-template-columns: 1fr;
    }
}

.dashboard-kpi-card {
    background: var(--spstn-white);
    border: 1px solid var(--spstn-border);
    border-radius: 14px;
    padding: 20px 22px;
}

.dashboard-kpi-card__label {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 700;
    color: var(--spstn-text-faint);
    text-transform: uppercase;
}

.dashboard-kpi-card__value {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    color: var(--spstn-navy);
}

.dashboard-kpi-card__unit {
    font-size: 16px;
    font-weight: 700;
    margin-left: 4px;
}

.dashboard-kpi-card__detail {
    margin: 8px 0 0;
    font-size: 11.5px;
    color: var(--spstn-text-faint);
}

.dashboard-chart-card {
    background: var(--spstn-white);
    border: 1px solid var(--spstn-border);
    border-radius: 16px;
    padding: 22px 24px;
}

.dashboard-chart-card--wide {
    margin-top: 4px;
}

.dashboard-charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 900px) {
    .dashboard-charts-grid {
        grid-template-columns: 1fr;
    }
}

.dashboard-chart-card__title {
    margin: 0;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--spstn-navy);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.dashboard-chart-card__subtitle {
    margin: 0 0 14px;
    font-size: 11.5px;
    color: var(--spstn-text-faint);
}

.dashboard-chart-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
}

.dashboard-chart-labels span {
    flex: 1;
    text-align: center;
    font-size: 11px;
    color: var(--spstn-text-faint);
}

.dashboard-section {
    margin-bottom: 28px;
}

.dashboard-section--annual {
    margin-top: 8px;
}

.dashboard-section__title {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 800;
    color: var(--spstn-navy);
}

.dashboard-section__subtitle {
    margin: 0 0 16px;
    font-size: 12px;
    color: var(--spstn-text-faint);
}

.trend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

.trend-card {
    background: var(--spstn-white);
    border: 1px solid var(--spstn-border);
    border-radius: 12px;
    padding: 16px;
}

.trend-card__title {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--spstn-navy);
}

.annual-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.annual-card {
    background: var(--spstn-white);
    border: 1px solid var(--spstn-border);
    border-radius: 12px;
    padding: 16px;
}

.annual-card--wide {
    grid-column: span 2;
}

.annual-card__label {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--spstn-navy);
}

.annual-card__value {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--spstn-teal);
}

.annual-card__ratio {
    margin-left: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--spstn-text-muted);
}

.annual-card__na {
    font-size: 14px;
    font-weight: 500;
    color: var(--spstn-text-muted);
}

.annual-breakdown {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    border-top: 1px solid var(--spstn-border);
}

.annual-breakdown__row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    font-size: 13px;
    border-bottom: 1px solid var(--spstn-bg);
}

.annual-breakdown__empty {
    padding: 10px 0 0;
    font-size: 12px;
    color: var(--spstn-text-muted);
}

@media (max-width: 900px) {
    .annual-card--wide {
        grid-column: span 1;
    }
}

/* Administration */
.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.admin-tab {
    padding: 9px 16px;
    border-radius: 9px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--spstn-navy-soft);
    text-decoration: none;
    background: var(--spstn-white);
    border: 1px solid var(--spstn-border);
}

.admin-tab--active {
    background: var(--spstn-navy);
    color: var(--spstn-white);
    border-color: var(--spstn-navy);
}

.admin-tab:hover:not(.admin-tab--active) {
    background: #f7fbfa;
}

.admin-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 16px;
    padding: 16px;
    background: var(--spstn-white);
    border: 1px solid var(--spstn-border);
    border-radius: 12px;
}

.admin-search {
    min-width: 220px;
}

.admin-form {
    background: var(--spstn-white);
    border: 1px solid var(--spstn-border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
}

.form-field--checkbox {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-panel {
    background: var(--spstn-white);
    border: 1px solid var(--spstn-border);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 16px;
}

.admin-panel__title {
    margin: 0 0 12px;
    font-size: 15px;
    color: var(--spstn-navy);
}

.admin-inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.admin-note,
.admin-breadcrumb {
    font-size: 13px;
    color: var(--spstn-text-muted);
    margin: 0 0 16px;
}

.spstn-link {
    color: var(--spstn-teal);
    font-weight: 600;
    text-decoration: none;
}

.spstn-link:hover {
    text-decoration: underline;
}

.status-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: var(--spstn-bg);
    color: var(--spstn-navy);
}

.status-pill--active {
    background: #d1fae5;
    color: #047857;
}

.status-pill--inactive {
    background: #fee2e2;
    color: #b91c1c;
}

.status-pill--builtin {
    background: #e0e7ff;
    color: #3730a3;
}

.table-actions {
    white-space: nowrap;
}

.row--inactive {
    opacity: 0.7;
}

.audit-detail {
    max-width: 360px;
    word-break: break-word;
    font-size: 12px;
    color: var(--spstn-text-muted);
}

.field-error {
    color: #b91c1c;
    font-size: 12px;
}

.form-errors {
    color: #b91c1c;
    margin: 0;
    padding-left: 18px;
}

.spstn-input--mono {
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.pagination__info {
    font-size: 13px;
    color: var(--spstn-text-muted);
}

/* Profile page */
.profile-screen {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.profile-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--spstn-white);
    border: 1px solid var(--spstn-border);
    border-radius: 12px;
    padding: 20px 24px;
}

.profile-hero__identity {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.profile-hero__avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--spstn-teal);
    flex-shrink: 0;
}

.profile-hero__avatar-badge {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.profile-hero__name {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--spstn-navy);
}

.profile-hero__email,
.profile-hero__role {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--spstn-text-muted);
}

.profile-hero__role {
    font-weight: 600;
    color: var(--spstn-teal);
}

.profile-hero__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.profile-logout-form {
    margin: 0;
}

.profile-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--spstn-border);
    background: var(--spstn-white);
    color: var(--spstn-text-muted);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.profile-icon-btn svg {
    width: 20px;
    height: 20px;
}

.profile-edit-btn:hover {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: var(--spstn-teal);
}

.profile-logout-btn:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: var(--spstn-danger);
}

.profile-display-name-dialog {
    border: 1px solid var(--spstn-border);
    border-radius: 14px;
    padding: 24px;
    max-width: 400px;
    box-shadow: var(--spstn-card-shadow);
}

.profile-display-name-dialog::backdrop {
    background: rgba(30, 39, 73, 0.25);
}

.profile-display-name-dialog__title {
    margin: 0 0 16px;
    font-size: 16px;
    color: var(--spstn-navy);
}

.profile-display-name-dialog__label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px;
}

.profile-display-name-dialog__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.profile-panel {
    background: var(--spstn-white);
    border: 1px solid var(--spstn-border);
    border-radius: 12px;
    padding: 20px;
}

.profile-panel__title {
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 700;
    color: var(--spstn-navy);
}

.profile-info-list {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.profile-info-list__row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
}

.profile-info-list__row dt {
    color: var(--spstn-text-muted);
    font-weight: 500;
}

.profile-info-list__row dd {
    margin: 0;
    font-weight: 600;
    color: var(--spstn-navy);
    text-align: right;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
