:root {
    color-scheme: light;
    --gtue-red: #DA1F3D;
    --gtue-red-dark: #A5182C;
    --gtue-grey: #C2C4C6;
    --gtue-text: #555555;
    --gtue-grey-60: #888888;
    --gtue-grey-20: #DADBDD;
    --gtue-grey-10: #F2F2F2;
    --gtue-white: #FFFFFF;
    --gtue-blue: #037DB2;
    --gtue-green: #8BB270;
    --gtue-orange: #F4B865;
    --gtue-pink: #EC8F9E;
    --gtue-light-blue: #65AFCF;

    --color-brand: var(--gtue-red);
    --color-brand-strong: var(--gtue-red-dark);
    --color-text: #374151;
    --color-text-muted: #7B8190;
    --color-surface: var(--gtue-white);
    --color-page-bg: #F6F7F9;
    --color-border: #E5E7EB;
    --color-info: #0EA5E9;
    --color-success: #16A34A;
    --color-warning: #F59E0B;
    --color-danger: #DC2626;
    --color-danger-strong: #991B1B;
    --color-neutral: #6B7280;
    --color-focus: rgba(218, 31, 61, 0.25);

    --color-background: var(--color-page-bg);
    --color-surface-soft: var(--color-page-bg);
    --color-surface-muted: #EEF0F3;
    --color-border-soft: var(--color-border);
    --color-muted: var(--color-text-muted);
    --color-muted-soft: var(--color-neutral);
    --color-primary: var(--color-brand);
    --color-primary-strong: var(--color-brand-strong);
    --color-primary-soft: rgba(218, 31, 61, 0.08);
    --color-primary-tint: rgba(218, 31, 61, 0.05);
    --color-info-soft: rgba(14, 165, 233, 0.11);
    --color-success-soft: rgba(22, 163, 74, 0.12);
    --color-warning-soft: rgba(245, 158, 11, 0.15);
    --color-danger-soft: rgba(220, 38, 38, 0.11);
    --color-error: var(--color-danger-strong);
    --color-error-soft: var(--color-danger-soft);
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 40px;
    --space-8: 48px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 18px;
    --shadow-card: 0 18px 42px rgba(17, 24, 39, 0.075);
    --shadow-soft: 0 6px 18px rgba(17, 24, 39, 0.055);
    --shadow-subtle: 0 1px 2px rgba(17, 24, 39, 0.06);
    --shadow-elevated: 0 24px 60px rgba(17, 24, 39, 0.10);
    --sidebar-width: 304px;
    --header-height: 76px;
    --container-max: 1320px;
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-right: env(safe-area-inset-right, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --safe-area-left: env(safe-area-inset-left, 0px);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    background: var(--color-background);
    color: var(--color-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img,
svg,
canvas,
video {
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: var(--space-2);
    font-size: clamp(28px, 3vw, 38px);
    line-height: 1.14;
    letter-spacing: 0;
    color: var(--color-text);
}

h2 {
    margin-bottom: 0;
    font-size: 22px;
    line-height: 1.25;
    letter-spacing: 0;
    color: var(--color-text);
}

h3 {
    margin-bottom: var(--space-1);
    font-size: 16px;
    line-height: 1.35;
    color: var(--color-text);
}

.app-shell,
.main-area,
.content-shell,
.top-header,
.page-heading,
.card,
.card-header,
.org-hero,
.ops-hero,
.dashboard-hero,
.settings-panel,
.audit-log-card,
.account-password-layout,
.stat-card,
.detail-grid,
.detail-list,
.feature-row,
.warning-row,
.calendar-item,
.weekly-day {
    min-width: 0;
}

.top-title,
.page-heading,
.card h2,
.card h3,
.stat-card,
.stat-note,
.calendar-item,
.weekly-day {
    overflow-wrap: break-word;
    word-break: normal;
}

.card-header > *,
.org-hero > *,
.ops-hero > *,
.dashboard-hero > *,
.audit-log-head > *,
.settings-check-row > *,
.admin-person-line > *,
.account-password-layout > * {
    min-width: 0;
}

.app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    min-height: 100vh;
    min-height: 100dvh;
    background:
        radial-gradient(circle at top right, rgba(218, 31, 61, 0.05), transparent 32vw),
        linear-gradient(180deg, #ffffff 0%, var(--color-background) 360px);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.mobile-app-bar,
.sidebar-backdrop,
.sidebar-close {
    display: none;
}

.mobile-menu-button,
.sidebar-close {
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: var(--color-surface);
    color: var(--color-brand);
    box-shadow: var(--shadow-subtle);
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.mobile-menu-button {
    display: inline-flex;
    flex: 0 0 auto;
}

.mobile-menu-button:hover,
.sidebar-close:hover {
    border-color: rgba(218, 31, 61, 0.22);
    background: var(--color-primary-tint);
    color: var(--color-brand-strong);
}

.mobile-menu-button span[aria-hidden="true"] {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
}

.mobile-app-title {
    display: grid;
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.2;
}

.mobile-app-title strong {
    overflow: hidden;
    color: var(--color-brand-strong);
    font-size: 15px;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-app-title span {
    overflow: hidden;
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    max-height: 100vh;
    max-height: 100dvh;
    overflow: hidden;
    padding: 20px var(--space-4);
    border-right: 1px solid var(--color-border-soft);
    background: linear-gradient(180deg, #ffffff 0%, #FBFCFD 100%);
    box-shadow: 10px 0 34px rgba(17, 24, 39, 0.045);
    overscroll-behavior: contain;
}

.sidebar-brand,
.auth-brand,
.sidebar-user {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.sidebar-brand {
    align-items: flex-start;
    flex: 0 0 auto;
    padding: var(--space-3);
    border: 1px solid rgba(229, 231, 235, 0.92);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #FBFCFD 100%);
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.055);
}

.brand-mark,
.user-avatar,
.gtue-logo-mark {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-lg);
    background: var(--color-primary);
    color: var(--color-surface);
    font-weight: 800;
}

.gtue-logo-mark {
    position: relative;
    width: 58px;
    height: 44px;
    overflow: hidden;
    border-radius: var(--radius-md);
    box-shadow: inset 0 -3px 0 rgba(255, 255, 255, 0.24);
}

.gtue-logo-mark::after {
    position: absolute;
    right: -8px;
    bottom: 6px;
    width: 34px;
    height: 4px;
    background: var(--color-surface);
    content: "";
    opacity: 0.72;
    transform: rotate(-32deg);
}

.gtue-logo-mark span {
    position: relative;
    z-index: 1;
    font-size: 17px;
    font-weight: 900;
    letter-spacing: 0;
}

.gtue-logo-mark-lg {
    width: 64px;
    height: 50px;
}

.brand-copy {
    min-width: 0;
}

.brand-name,
.user-name {
    font-weight: 800;
    line-height: 1.2;
}

.brand-operator {
    font-size: 15px;
    font-weight: 850;
    line-height: 1.2;
}

.brand-product {
    margin-top: 2px;
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
}

.brand-license {
    margin-top: var(--space-1);
    color: var(--color-muted);
    font-size: 12px;
    line-height: 1.3;
}

.brand-subtitle,
.user-meta,
.stat-note,
.page-lead,
.auth-copy {
    color: var(--color-muted);
}

.brand-subtitle,
.user-meta {
    font-size: 13px;
}

.sidebar-nav {
    display: grid;
    flex: 1 1 auto;
    gap: var(--space-4);
    min-height: 0;
    margin-top: var(--space-5);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 6px;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: rgba(123, 129, 144, 0.32) transparent;
}

.sidebar-nav::-webkit-scrollbar {
    width: 8px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: rgba(123, 129, 144, 0.26);
    background-clip: padding-box;
}

.nav-section {
    display: grid;
    gap: 6px;
}

.nav-section + .nav-section {
    padding-top: var(--space-5);
    border-top: 1px solid var(--color-border-soft);
}

.nav-section-title {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 0 var(--space-3);
    color: var(--color-muted-soft);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nav-section-title::after {
    flex: 1 1 auto;
    height: 1px;
    background: linear-gradient(90deg, rgba(229, 231, 235, 0.9), rgba(229, 231, 235, 0));
    content: "";
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-height: 46px;
    padding: 10px var(--space-3);
    border-radius: 14px;
    color: var(--color-muted);
    font-weight: 760;
    border: 1px solid transparent;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.nav-label {
    min-width: 0;
    flex: 1 1 auto;
}

.nav-item:hover {
    background: #ffffff;
    border-color: var(--color-border-soft);
    color: var(--color-text);
    box-shadow: var(--shadow-subtle);
    transform: translateX(1px);
}

.nav-item.is-active {
    background: linear-gradient(90deg, rgba(218, 31, 61, 0.09) 0%, #ffffff 78%);
    border-color: rgba(218, 31, 61, 0.20);
    color: var(--color-brand-strong);
    box-shadow: 0 10px 22px rgba(17, 24, 39, 0.055);
}

.nav-item.is-active::before {
    position: absolute;
    inset: 10px auto 10px -9px;
    width: 4px;
    border-radius: 999px;
    background: var(--color-brand);
    content: "";
}

.nav-item.is-disabled {
    color: var(--color-muted-soft);
    cursor: default;
    opacity: 0.72;
    pointer-events: none;
    user-select: none;
}

.nav-item.is-disabled:hover {
    background: transparent;
    border-color: transparent;
    color: var(--color-muted-soft);
}

.nav-icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 28px;
    border-radius: 10px;
    background: #F3F4F6;
    color: var(--color-muted);
    font-size: 11px;
    font-weight: 900;
    transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.nav-item:hover .nav-icon {
    background: #E9ECF1;
    color: var(--color-text);
}

.nav-item.is-active .nav-icon {
    background: var(--color-brand);
    color: var(--color-surface);
    box-shadow: 0 8px 16px rgba(218, 31, 61, 0.18);
}

.nav-item.is-disabled .nav-icon {
    background: var(--color-surface-muted);
    color: var(--color-muted-soft);
}

.nav-status {
    margin-left: auto;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    background: var(--color-surface-muted);
    color: var(--color-muted-soft);
    font-size: 10px;
    font-weight: 800;
}

.sidebar-footer {
    display: grid;
    gap: var(--space-3);
    flex: 0 0 auto;
    margin-top: var(--space-4);
    padding: var(--space-3);
    border: 1px solid rgba(229, 231, 235, 0.92);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #FBFCFD 100%);
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.052);
}

.sidebar-user-copy {
    min-width: 0;
}

.sidebar-role-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 7px;
}

.sidebar-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid var(--color-border-soft);
    border-radius: 999px;
    background: #ffffff;
    color: var(--color-muted);
    font-size: 11px;
    font-weight: 850;
    line-height: 1;
}

.sidebar-role-badge::before {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--color-brand);
    content: "";
}

.user-name,
.user-meta {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-2);
}

.sidebar-logout-form {
    margin: 0;
}

.sidebar-user-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 38px;
    padding: 0 var(--space-2);
    border: 1px solid var(--color-border-soft);
    border-radius: 12px;
    background: #ffffff;
    color: var(--color-text);
    font: inherit;
    font-size: 12px;
    font-weight: 850;
    line-height: 1;
    text-align: center;
    box-shadow: var(--shadow-subtle);
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.sidebar-user-action:hover {
    border-color: rgba(218, 31, 61, 0.20);
    background: var(--color-primary-tint);
    color: var(--color-brand-strong);
}

.sidebar-vendor {
    margin-top: 0;
}

.app-main {
    min-width: 0;
}

.top-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    min-height: var(--header-height);
    padding: 0 var(--space-7);
    border-bottom: 1px solid var(--color-border-soft);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(229, 231, 235, 0.72);
}

.top-header-main {
    min-width: 0;
}

.top-eyebrow,
.section-kicker,
.stat-label {
    margin-bottom: var(--space-1);
    color: var(--color-primary);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.top-title {
    font-size: 21px;
    font-weight: 900;
}

.top-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.top-actions form {
    margin: 0;
}

.top-context {
    display: grid;
    gap: 1px;
    min-width: 180px;
    padding: 8px 12px;
    border: 1px solid var(--color-border-soft);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: var(--shadow-subtle);
}

.top-context span {
    color: var(--color-muted-soft);
    font-size: 12px;
    font-weight: 700;
}

.top-context strong {
    color: var(--color-text);
    font-size: 13px;
    font-weight: 800;
}

.content-shell {
    width: min(var(--container-max), calc(100% - 56px));
    margin: 0 auto;
    padding: 44px 0 calc(var(--space-8) + var(--safe-area-bottom));
}

.content-shell:has(.team-calendar-page) {
    width: calc(100% - 56px);
    max-width: none;
}

.layout-footer {
    margin-top: var(--space-8);
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-border-soft);
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 700;
}

.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-5);
    margin-bottom: var(--space-7);
    padding-bottom: var(--space-5);
    border-bottom: 1px solid var(--color-border-soft);
}

.page-heading h1 {
    margin-bottom: var(--space-2);
    font-size: clamp(32px, 3.2vw, 44px);
    letter-spacing: -0.01em;
}

.page-actions,
.table-actions,
.form-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.table-actions {
    flex-wrap: wrap;
}

.table-actions form {
    margin: 0;
}

.page-lead,
.auth-copy {
    max-width: 720px;
    margin-bottom: 0;
    font-size: 18px;
    line-height: 1.55;
}

.stats-grid,
.content-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--space-5);
}

.stats-grid > *,
.content-grid > * {
    min-width: 0;
}

.stats-grid {
    margin-bottom: var(--space-5);
}

.stat-card,
.card,
.auth-card {
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-xl);
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.stat-card {
    position: relative;
    grid-column: span 4;
    overflow: hidden;
    min-height: 156px;
    padding: var(--space-5);
}

.stat-card::before {
    position: absolute;
    top: 0;
    left: var(--space-5);
    width: 52px;
    height: 3px;
    border-radius: 0 0 999px 999px;
    background: rgba(218, 31, 61, 0.72);
    content: "";
}

.ops-metric-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.ops-metric-value {
    margin: var(--space-2) 0 var(--space-4);
    font-size: 38px;
    line-height: 1;
    font-weight: 900;
    color: var(--color-text);
}

.ops-metric-footer {
    display: grid;
    gap: var(--space-2);
}

.ops-metric-footer .stat-note {
    display: block;
    font-size: 13px;
}

.stat-card-accent {
    background: linear-gradient(135deg, var(--color-surface) 0%, #FAFAFB 100%);
    border-color: var(--color-border);
}

.stat-value {
    margin-bottom: var(--space-2);
    font-size: 34px;
    line-height: 1.1;
    font-weight: 850;
}

.stat-value-sm {
    overflow-wrap: anywhere;
    font-size: 22px;
}

.card {
    padding: var(--space-5);
}

.card-span-8 {
    grid-column: span 8;
}

.card-span-4 {
    grid-column: span 4;
}

.card-span-6 {
    grid-column: span 6;
}

.card-span-12 {
    grid-column: span 12;
}

.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--color-border-soft);
}

.feature-list {
    display: grid;
}

.feature-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-4) 0;
    border-top: 1px solid var(--color-border-soft);
}

.feature-row p {
    margin-bottom: 0;
    color: var(--color-muted);
}

.feature-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.ops-planning-card {
    margin-bottom: var(--space-5);
}

.warning-card {
    border-color: rgba(245, 158, 11, 0.30);
    background: linear-gradient(180deg, #ffffff 0%, rgba(245, 158, 11, 0.05) 100%);
}

.warning-list {
    display: grid;
    gap: var(--space-3);
}

.warning-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-4);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-md);
    background: var(--color-surface-soft);
}

.warning-row p {
    margin-bottom: 0;
    color: var(--color-muted);
}

.summary-grid,
.calculation-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-3);
}

.summary-grid div,
.calculation-panel div {
    display: grid;
    gap: var(--space-1);
    padding: var(--space-4);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-md);
    background: var(--color-surface-soft);
}

.summary-grid span,
.calculation-panel span {
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 750;
}

.summary-grid strong,
.calculation-panel strong {
    color: var(--color-info);
    font-size: 22px;
}

.holiday-range-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    min-height: 28px;
}

.ops-readiness-list .feature-row:first-child,
.feature-list .feature-row:first-child {
    border-top: 0;
    padding-top: 0;
}

.roadmap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: var(--space-3);
}

.roadmap-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-height: 52px;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-md);
    background: var(--color-surface-soft);
    color: var(--color-text);
    font-weight: 750;
}

.roadmap-dot {
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--color-primary-strong);
    box-shadow: 0 0 0 4px rgba(218, 31, 61, 0.12);
}

.detail-list {
    display: grid;
    gap: var(--space-4);
    margin: 0;
}

.detail-list div {
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--color-border-soft);
}

.detail-list div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.detail-list dt {
    color: var(--color-muted-soft);
    font-size: 13px;
    font-weight: 700;
}

.detail-list dd {
    margin: var(--space-1) 0 0;
    font-weight: 750;
}

.note-text {
    margin-bottom: 0;
    color: var(--color-muted);
    white-space: pre-wrap;
}

.vendor-mark {
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 0 var(--space-4);
    border: 1px solid transparent;
    border-radius: 12px;
    font-weight: 800;
    line-height: 1;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.btn:hover {
    box-shadow: 0 4px 14px rgba(17, 24, 39, 0.10);
}

.btn:focus-visible,
.nav-item:focus-visible,
.mobile-menu-button:focus-visible,
.sidebar-close:focus-visible,
.sidebar-backdrop:focus-visible,
.sidebar-user-action:focus-visible {
    outline: 3px solid var(--color-focus);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--color-brand);
    color: var(--color-surface);
    box-shadow: 0 10px 20px rgba(218, 31, 61, 0.16);
}

.btn-primary:hover {
    background: var(--color-brand-strong);
}

.btn-secondary {
    border-color: var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
    box-shadow: var(--shadow-subtle);
}

.btn-secondary:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    min-height: 34px;
    padding: 0 var(--space-3);
    font-size: 14px;
}

.btn-danger {
    border-color: rgba(218, 31, 61, 0.28);
    background: var(--color-error-soft);
    color: var(--color-error);
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.badge {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-width: 0;
    min-height: 28px;
    padding: 0 var(--space-3);
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.badge-brand,
.badge-primary {
    border-color: rgba(218, 31, 61, 0.20);
    background: var(--color-primary-soft);
    color: var(--color-primary);
}

.badge-info {
    border-color: rgba(14, 165, 233, 0.22);
    background: var(--color-info-soft);
    color: var(--color-info);
}

.badge-success {
    border-color: rgba(22, 163, 74, 0.22);
    background: var(--color-success-soft);
    color: var(--color-success);
}

.badge-warning {
    border-color: rgba(245, 158, 11, 0.26);
    background: var(--color-warning-soft);
    color: var(--color-text);
}

.badge-danger {
    border-color: rgba(220, 38, 38, 0.22);
    background: var(--color-danger-soft);
    color: var(--color-danger-strong);
}

.badge-neutral,
.badge-muted {
    border-color: rgba(123, 129, 144, 0.22);
    background: var(--color-surface-muted);
    color: var(--color-neutral);
}

.badge-role-superadmin,
.role-badge-super {
    background: var(--color-primary-soft);
    color: var(--color-brand-strong);
}

.badge-role-admin,
.role-badge-admin {
    background: var(--color-info-soft);
    color: var(--color-info);
}

.badge-role-user,
.role-badge-employee {
    background: var(--color-surface-muted);
    color: var(--color-neutral);
}

.auth-body {
    display: grid;
    place-items: center;
    padding:
        calc(var(--space-5) + var(--safe-area-top))
        calc(var(--space-5) + var(--safe-area-right))
        calc(var(--space-5) + var(--safe-area-bottom))
        calc(var(--space-5) + var(--safe-area-left));
    background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-page-bg) 100%);
}

.auth-shell {
    width: min(440px, 100%);
}

.auth-card {
    padding: var(--space-6);
    border-top: 4px solid var(--color-primary-strong);
}

.auth-brand {
    margin-bottom: var(--space-5);
}

.auth-card h1 {
    margin-bottom: 0;
    font-size: 34px;
}

.login-vendor {
    margin-top: var(--space-4);
    text-align: center;
    color: var(--color-muted-soft);
}

.form-stack {
    display: grid;
    gap: var(--space-4);
    margin-top: var(--space-5);
}

.form-field {
    display: grid;
    gap: var(--space-2);
}

.form-field small,
.field-hint,
.form-note {
    color: var(--color-muted);
    font-size: 13px;
}

.field-hint {
    margin-bottom: 0;
}

.form-field label {
    font-size: 14px;
    font-weight: 750;
}

input,
select,
textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    color: var(--color-text);
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--color-primary-strong);
    box-shadow: 0 0 0 3px var(--color-focus);
}

textarea {
    resize: vertical;
}

.alert {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    font-weight: 650;
}

.alert-error {
    border: 1px solid rgba(218, 31, 61, 0.28);
    background: var(--color-error-soft);
    color: var(--color-error);
}

.alert-success {
    border: 1px solid rgba(22, 163, 74, 0.24);
    background: var(--color-success-soft);
    color: var(--color-success);
}

.alert-warning {
    border: 1px solid rgba(245, 158, 11, 0.34);
    background: var(--color-warning-soft);
    color: var(--color-text);
}

.error-list {
    margin: var(--space-2) 0 0;
    padding-left: var(--space-5);
}

.form-card {
    display: grid;
    gap: var(--space-6);
}

.form-section {
    display: grid;
    gap: var(--space-4);
    padding-bottom: var(--space-5);
    border-bottom: 1px solid var(--color-border-soft);
}

.form-section:last-of-type {
    padding-bottom: 0;
    border-bottom: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4);
}

.field-span-full {
    grid-column: 1 / -1;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-3);
}

.checkbox-card {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-lg);
    background: var(--color-surface-soft);
}

.checkbox-card input {
    width: auto;
    min-height: auto;
    margin-top: 3px;
}

.checkbox-card span {
    display: grid;
}

.checkbox-card small {
    color: var(--color-muted);
}

.form-actions {
    justify-content: flex-end;
}

.filter-card {
    margin-bottom: var(--space-5);
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, #ffffff 0%, #FAFAFB 100%);
}

.filter-form {
    display: grid;
    gap: var(--space-5);
}

.quick-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.table-wrap {
    overflow-x: auto;
    max-width: 100%;
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-xl);
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
    overscroll-behavior-x: contain;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--color-border-soft);
    text-align: left;
}

th {
    background: #F8FAFC;
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

tbody tr {
    transition: background-color 140ms ease;
}

tbody tr:hover {
    background: #FAFBFC;
}

tr:last-child td {
    border-bottom: 0;
}

.table-person {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.table-meta {
    color: var(--color-muted);
    font-size: 13px;
}

.user-avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    font-size: 14px;
}

.empty-state {
    display: grid;
    justify-items: start;
    gap: var(--space-3);
    padding: var(--space-6);
    border: 1px dashed #CBD5E1;
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, #ffffff 0%, #FAFAFB 100%);
    box-shadow: var(--shadow-subtle);
}

.empty-state p {
    margin-bottom: 0;
    color: var(--color-muted);
}

.leave-hero,
.leave-detail-hero,
.leave-toolbar-card,
.leave-list-card,
.leave-balance-card,
.leave-detail-card {
    border: 1px solid var(--color-border-soft);
    border-radius: 22px;
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.leave-hero,
.leave-detail-hero {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-5);
    overflow: hidden;
    margin-bottom: var(--space-5);
    padding: var(--space-6);
    background:
        linear-gradient(135deg, rgba(218, 31, 61, 0.08) 0%, rgba(255, 255, 255, 0) 42%),
        linear-gradient(180deg, #ffffff 0%, #FAFBFC 100%);
}

.leave-hero::before,
.leave-detail-hero::before {
    position: absolute;
    top: 0;
    left: var(--space-6);
    width: 72px;
    height: 4px;
    border-radius: 0 0 999px 999px;
    background: var(--color-brand);
    content: "";
}

.leave-hero-content,
.leave-detail-hero > div:first-child {
    min-width: 0;
}

.leave-hero h1,
.leave-detail-hero h1 {
    margin-bottom: var(--space-2);
    font-size: clamp(34px, 3.4vw, 48px);
    letter-spacing: -0.01em;
}

.leave-hero p,
.leave-detail-hero p,
.leave-balance-card p {
    max-width: 760px;
    margin-bottom: 0;
    color: var(--color-muted);
    font-size: 17px;
    font-weight: 650;
}

.leave-hero-chips,
.leave-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.leave-hero-chips {
    margin-top: var(--space-4);
}

.leave-hero-actions {
    flex: 0 0 auto;
    justify-content: flex-end;
}

.leave-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-5);
}

.leave-kpi-card {
    position: relative;
    overflow: hidden;
    padding: var(--space-5);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-xl);
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.leave-kpi-card::before {
    position: absolute;
    top: 0;
    left: var(--space-5);
    width: 44px;
    height: 3px;
    border-radius: 0 0 999px 999px;
    background: var(--color-brand);
    content: "";
}

.leave-kpi-card.is-warning::before {
    background: var(--color-warning);
}

.leave-kpi-card.is-success::before {
    background: var(--color-success);
}

.leave-kpi-card.is-neutral::before {
    background: var(--color-neutral);
}

.leave-kpi-card span,
.leave-balance-metrics span,
.leave-request-meta-grid span,
.leave-filter-form label > span {
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.leave-kpi-card strong {
    display: block;
    margin-top: var(--space-2);
    color: var(--color-text);
    font-size: 32px;
    line-height: 1;
    font-weight: 950;
}

.leave-balance-card {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: var(--space-5);
    align-items: center;
    margin-bottom: var(--space-5);
    padding: var(--space-5);
}

.leave-balance-card h2 {
    margin-bottom: var(--space-2);
}

.leave-balance-metrics {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: var(--space-3);
}

.leave-balance-metrics div {
    padding: var(--space-3);
    border: 1px solid var(--color-border-soft);
    border-radius: 14px;
    background: #FAFBFC;
}

.leave-balance-metrics strong {
    display: block;
    margin-top: 4px;
    color: var(--color-text);
    font-size: 20px;
    font-weight: 900;
}

.leave-toolbar-card {
    display: grid;
    grid-template-columns: minmax(220px, 0.38fr) minmax(0, 1fr);
    gap: var(--space-5);
    align-items: end;
    margin-bottom: var(--space-5);
    padding: var(--space-5);
}

.leave-toolbar-card h2 {
    margin-bottom: 0;
}

.leave-filter-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr)) auto;
    gap: var(--space-3);
    align-items: end;
}

.leave-filter-form label {
    display: grid;
    gap: 6px;
}

.leave-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.leave-list-card,
.leave-detail-card {
    padding: var(--space-5);
}

.leave-request-list {
    display: grid;
    gap: var(--space-3);
}

.leave-request-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-4);
    overflow: hidden;
    padding: var(--space-4);
    border: 1px solid var(--color-border-soft);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #FAFBFC 100%);
    box-shadow: var(--shadow-subtle);
}

.leave-request-card::before,
.leave-detail-hero::after {
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--color-neutral);
    content: "";
}

.leave-request-card.is-pending::before,
.leave-detail-hero.is-pending::after {
    background: var(--color-warning);
}

.leave-request-card.is-approved::before,
.leave-detail-hero.is-approved::after {
    background: var(--color-success);
}

.leave-request-card.is-rejected::before,
.leave-detail-hero.is-rejected::after {
    background: var(--color-danger);
}

.leave-request-card.is-cancelled::before,
.leave-detail-hero.is-cancelled::after {
    background: var(--color-neutral);
}

.leave-request-main {
    display: grid;
    gap: var(--space-3);
    min-width: 0;
}

.leave-request-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
}

.leave-request-head h3 {
    margin-bottom: 2px;
    font-size: 18px;
    font-weight: 900;
}

.leave-request-head p {
    margin-bottom: 0;
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 700;
}

.leave-request-eyebrow {
    display: inline-flex;
    margin-bottom: 4px;
    color: var(--color-brand-strong);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.leave-date-band {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    width: fit-content;
    max-width: 100%;
    padding: 8px var(--space-3);
    border: 1px solid var(--color-border-soft);
    border-radius: 999px;
    background: var(--color-surface);
}

.leave-date-band strong,
.leave-date-band span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.leave-date-band strong {
    color: var(--color-text);
    font-size: 14px;
}

.leave-date-band span {
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 800;
}

.leave-request-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
}

.leave-request-meta-grid > div {
    display: grid;
    gap: 5px;
    padding: var(--space-3);
    border: 1px solid var(--color-border-soft);
    border-radius: 14px;
    background: #ffffff;
}

.leave-request-meta-grid strong:not(.badge) {
    color: var(--color-text);
    font-weight: 900;
}

.leave-request-meta-grid small {
    color: var(--color-muted);
    font-weight: 750;
}

.leave-request-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    align-content: start;
    justify-content: flex-end;
    gap: var(--space-2);
}

.leave-request-actions form {
    margin: 0;
}

.leave-detail-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--space-5);
}

.leave-detail-primary {
    grid-column: span 8;
}

.leave-detail-grid > aside {
    grid-column: span 4;
}

.leave-decision-card {
    grid-column: 1 / -1;
}

.leave-detail-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
}

.leave-detail-list > div,
.leave-note-list > div {
    padding: var(--space-3);
    border: 1px solid var(--color-border-soft);
    border-radius: 14px;
    background: #FAFBFC;
}

.leave-detail-list dt,
.leave-note-list dt {
    margin-bottom: 5px;
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.leave-detail-list dd,
.leave-note-list dd {
    color: var(--color-text);
    font-weight: 800;
}

.leave-note-list {
    display: grid;
    gap: var(--space-3);
}

.leave-empty-state {
    border: 1px dashed var(--color-border);
    border-radius: 18px;
    background: #FAFBFC;
}

.ops-hero,
.ops-toolbar-card,
.ops-list-card,
.ops-request-card,
.ops-absence-card {
    border: 1px solid var(--color-border-soft);
    border-radius: 22px;
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.ops-hero {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-5);
    overflow: hidden;
    margin-bottom: var(--space-5);
    padding: var(--space-6);
    background:
        linear-gradient(135deg, rgba(218, 31, 61, 0.07) 0%, rgba(255, 255, 255, 0) 46%),
        linear-gradient(180deg, #ffffff 0%, #FAFBFC 100%);
}

.ops-hero::before {
    position: absolute;
    top: 0;
    left: var(--space-6);
    width: 72px;
    height: 4px;
    border-radius: 0 0 999px 999px;
    background: var(--color-brand);
    content: "";
}

.ops-hero > div:first-child {
    min-width: 0;
}

.ops-hero h1 {
    margin-bottom: var(--space-2);
    font-size: clamp(34px, 3.4vw, 48px);
    letter-spacing: -0.01em;
}

.ops-hero p {
    max-width: 760px;
    margin-bottom: 0;
    color: var(--color-muted);
    font-size: 17px;
    font-weight: 650;
}

.ops-hero-chips,
.ops-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.ops-hero-chips {
    margin-top: var(--space-4);
}

.ops-hero-actions {
    flex: 0 0 auto;
    justify-content: flex-end;
}

.ops-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-5);
}

.ops-kpi-card {
    position: relative;
    overflow: hidden;
    padding: var(--space-5);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-xl);
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.ops-kpi-card::before {
    position: absolute;
    top: 0;
    left: var(--space-5);
    width: 44px;
    height: 3px;
    border-radius: 0 0 999px 999px;
    background: var(--color-brand);
    content: "";
}

.ops-kpi-card.is-warning::before {
    background: var(--color-warning);
}

.ops-kpi-card.is-success::before {
    background: var(--color-success);
}

.ops-kpi-card.is-danger::before {
    background: var(--color-danger);
}

.ops-kpi-card.is-info::before {
    background: var(--color-info);
}

.ops-kpi-card span,
.ops-meta-grid span,
.ops-filter-form label {
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.ops-kpi-card strong {
    display: block;
    margin-top: var(--space-2);
    color: var(--color-text);
    font-size: 32px;
    line-height: 1;
    font-weight: 950;
}

.ops-toolbar-card,
.ops-list-card {
    margin-bottom: var(--space-5);
    padding: var(--space-5);
}

.ops-toolbar-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
}

.ops-toolbar-head h2 {
    margin-bottom: 0;
}

.ops-filter-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-3);
    align-items: end;
}

.ops-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.ops-list,
.ops-absence-list {
    display: grid;
    gap: var(--space-4);
}

.ops-request-card,
.ops-absence-card {
    position: relative;
    overflow: hidden;
    padding: var(--space-5);
}

.ops-request-card {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(340px, 0.78fr);
    gap: var(--space-5);
}

.ops-absence-card {
    display: block;
}

.ops-request-card::before,
.ops-absence-card::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--color-info);
    content: "";
}

.ops-request-card.has-warning::before {
    background: var(--color-warning);
}

.ops-absence-card::before {
    background: var(--color-success);
}

.ops-request-summary,
.ops-absence-main,
.ops-decision-panel {
    display: grid;
    gap: var(--space-3);
    min-width: 0;
}

.ops-request-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
}

.ops-request-head h2,
.ops-request-head h3 {
    margin-bottom: 2px;
    font-weight: 900;
}

.ops-request-head h2 {
    font-size: 22px;
}

.ops-request-head h3 {
    font-size: 18px;
}

.ops-request-head p {
    margin-bottom: 0;
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.ops-eyebrow {
    display: inline-flex;
    margin-bottom: 4px;
    color: var(--color-brand-strong);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.ops-date-band {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    width: fit-content;
    max-width: 100%;
    padding: 8px var(--space-3);
    border: 1px solid var(--color-border-soft);
    border-radius: 999px;
    background: var(--color-surface);
}

.ops-date-band strong,
.ops-date-band span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.ops-date-band strong {
    color: var(--color-text);
    font-size: 14px;
}

.ops-date-band span {
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 800;
}

.ops-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
}

.ops-absence-card .ops-meta-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.ops-meta-grid > div {
    display: grid;
    gap: 5px;
    padding: var(--space-3);
    border: 1px solid var(--color-border-soft);
    border-radius: 14px;
    background: #FAFBFC;
}

.ops-meta-grid strong:not(.badge) {
    color: var(--color-text);
    font-weight: 900;
    overflow-wrap: anywhere;
}

.ops-decision-panel {
    padding: var(--space-4);
    border: 1px solid var(--color-border-soft);
    border-radius: 18px;
    background: #FAFBFC;
}

.ops-decision-grid {
    gap: var(--space-3);
}

.ops-empty-state {
    margin-bottom: var(--space-5);
}

.org-hero,
.org-list-card,
.org-entity-card,
.org-form-card {
    border: 1px solid var(--color-border-soft);
    border-radius: 22px;
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.org-hero {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-5);
    overflow: hidden;
    margin-bottom: var(--space-5);
    padding: var(--space-6);
    background:
        linear-gradient(135deg, rgba(218, 31, 61, 0.07) 0%, rgba(255, 255, 255, 0) 46%),
        linear-gradient(180deg, #ffffff 0%, #FAFBFC 100%);
}

.org-hero::before {
    position: absolute;
    top: 0;
    left: var(--space-6);
    width: 72px;
    height: 4px;
    border-radius: 0 0 999px 999px;
    background: var(--color-brand);
    content: "";
}

.org-hero > div:first-child {
    min-width: 0;
}

.org-hero h1 {
    margin-bottom: var(--space-2);
    font-size: clamp(34px, 3.4vw, 48px);
    letter-spacing: -0.01em;
}

.org-hero p {
    max-width: 760px;
    margin-bottom: 0;
    color: var(--color-muted);
    font-size: 17px;
    font-weight: 650;
}

.org-form-hero {
    margin-bottom: var(--space-5);
}

.org-hero-chips,
.org-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.org-hero-chips {
    margin-top: var(--space-4);
}

.org-hero-actions {
    flex: 0 0 auto;
    justify-content: flex-end;
}

.org-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-5);
}

.org-kpi-card {
    position: relative;
    overflow: hidden;
    padding: var(--space-5);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-xl);
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.org-kpi-card::before {
    position: absolute;
    top: 0;
    left: var(--space-5);
    width: 44px;
    height: 3px;
    border-radius: 0 0 999px 999px;
    background: var(--color-brand);
    content: "";
}

.org-kpi-card.is-success::before {
    background: var(--color-success);
}

.org-kpi-card.is-info::before {
    background: var(--color-info);
}

.org-kpi-card.is-warning::before {
    background: var(--color-warning);
}

.org-kpi-card.is-neutral::before {
    background: var(--color-neutral);
}

.org-kpi-card span,
.org-meta-grid span {
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.org-kpi-card strong {
    display: block;
    margin-top: var(--space-2);
    color: var(--color-text);
    font-size: 32px;
    line-height: 1;
    font-weight: 950;
}

.org-list-card {
    padding: var(--space-5);
}

.org-card-list {
    display: grid;
    gap: var(--space-4);
}

.org-entity-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-4);
    overflow: hidden;
    padding: var(--space-5);
    background: linear-gradient(180deg, #ffffff 0%, #FAFBFC 100%);
}

.org-entity-card::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--color-success);
    content: "";
}

.org-entity-card.is-inactive::before {
    background: var(--color-neutral);
}

.org-entity-main {
    display: grid;
    gap: var(--space-3);
    min-width: 0;
}

.org-entity-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
}

.org-entity-head h3 {
    margin-bottom: 2px;
    font-size: 20px;
    font-weight: 900;
}

.org-entity-head p {
    margin-bottom: 0;
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.org-eyebrow {
    display: inline-flex;
    margin-bottom: 4px;
    color: var(--color-brand-strong);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.org-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-3);
}

.org-meta-grid > div {
    display: grid;
    gap: 5px;
    padding: var(--space-3);
    border: 1px solid var(--color-border-soft);
    border-radius: 14px;
    background: #ffffff;
}

.org-meta-grid strong:not(.badge) {
    color: var(--color-text);
    font-weight: 900;
    overflow-wrap: anywhere;
}

.org-meta-grid small {
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 750;
    overflow-wrap: anywhere;
}

.org-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.org-entity-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    align-content: start;
    justify-content: flex-end;
    gap: var(--space-2);
}

.org-entity-actions form {
    margin: 0;
}

.org-empty-state {
    border: 1px dashed var(--color-border);
    border-radius: 18px;
    background: #FAFBFC;
}

.org-form-card {
    padding: var(--space-6);
    background: linear-gradient(180deg, #ffffff 0%, #FAFBFC 100%);
}

.org-form-card .form-section {
    padding: var(--space-5);
    border: 1px solid var(--color-border-soft);
    border-radius: 18px;
    background: var(--color-surface);
    box-shadow: var(--shadow-subtle);
}

.org-form-card .form-section + .form-section {
    margin-top: 0;
}

.org-form-card .form-section:last-of-type {
    border-bottom: 1px solid var(--color-border-soft);
}

.org-form-card .form-section > div:first-child {
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--color-border-soft);
}

.org-form-card .form-section h2 {
    margin-bottom: 0;
}

.org-form-card .form-actions {
    padding-top: var(--space-2);
}

.dashboard-premium {
    display: grid;
    gap: var(--space-6);
}

.dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-5);
    align-items: end;
    padding: var(--space-7);
    border: 1px solid var(--color-border-soft);
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(218, 31, 61, 0.08), rgba(218, 31, 61, 0) 38%),
        linear-gradient(180deg, #ffffff 0%, #FAFAFB 100%);
    box-shadow: var(--shadow-elevated);
}

.dashboard-hero-main {
    display: grid;
    gap: var(--space-3);
    min-width: 0;
}

.dashboard-hero h1 {
    max-width: 780px;
    margin-bottom: 0;
    font-size: clamp(34px, 4vw, 52px);
    line-height: 1.05;
}

.dashboard-hero p {
    max-width: 740px;
    margin-bottom: 0;
    color: var(--color-muted);
    font-size: 18px;
    font-weight: 650;
}

.dashboard-hero-meta {
    display: grid;
    justify-items: end;
    gap: 2px;
    min-width: 170px;
    padding: var(--space-4);
    border: 1px solid var(--color-border-soft);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: var(--shadow-soft);
}

.dashboard-hero-meta span,
.dashboard-hero-meta small {
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.dashboard-hero-meta strong {
    color: var(--color-text);
    font-size: 24px;
    line-height: 1;
}

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: var(--space-3);
}

.dashboard-kpi-card {
    display: grid;
    align-content: space-between;
    gap: var(--space-3);
    min-width: 0;
    min-height: 150px;
    padding: var(--space-4);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-xl);
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.dashboard-kpi-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
}

.dashboard-kpi-top span:first-child {
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.dashboard-kpi-card strong {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--color-text);
    font-size: clamp(28px, 3vw, 42px);
    font-weight: 950;
    line-height: 1;
}

.dashboard-kpi-card p {
    margin-bottom: 0;
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 700;
}

.dashboard-kpi-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--color-neutral);
}

.dashboard-kpi-dot.is-success {
    background: var(--color-success);
}

.dashboard-kpi-dot.is-warning {
    background: var(--color-warning);
}

.dashboard-kpi-dot.is-info {
    background: var(--color-info);
}

.dashboard-kpi-dot.is-danger {
    background: var(--color-danger);
}

.dashboard-summary-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-3);
}

.dashboard-summary-item {
    position: relative;
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: var(--space-4);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, #ffffff 0%, #FAFBFC 100%);
    box-shadow: var(--shadow-soft);
}

.dashboard-summary-item::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    border-radius: var(--radius-xl) 0 0 var(--radius-xl);
    background: var(--color-neutral);
    content: "";
}

.dashboard-summary-item.is-success::before {
    background: var(--color-success);
}

.dashboard-summary-item.is-warning::before {
    background: var(--color-warning);
}

.dashboard-summary-item.is-info::before {
    background: var(--color-info);
}

.dashboard-summary-item.is-danger::before {
    background: var(--color-danger);
}

.dashboard-summary-item span,
.dashboard-summary-item small {
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 850;
}

.dashboard-summary-item span {
    text-transform: uppercase;
}

.dashboard-summary-item strong {
    color: var(--color-text);
    font-size: clamp(24px, 2.4vw, 34px);
    line-height: 1;
    font-weight: 950;
}

.dashboard-intelligence-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
    gap: var(--space-4);
    align-items: start;
}

.dashboard-section,
.dashboard-risk-panel,
.dashboard-session-card,
.dashboard-timeline-panel,
.dashboard-action-panel {
    min-width: 0;
}

.dashboard-section {
    display: grid;
    gap: var(--space-4);
}

.dashboard-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-4);
}

.dashboard-operations-grid,
.dashboard-focus-grid,
.dashboard-admin-grid {
    display: grid;
    gap: var(--space-4);
}

.dashboard-operations-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-operation-card,
.dashboard-focus-card,
.dashboard-admin-card,
.dashboard-risk-panel,
.dashboard-session-card,
.dashboard-timeline-panel,
.dashboard-action-panel,
.dashboard-station-card {
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-xl);
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.dashboard-timeline-panel,
.dashboard-action-panel,
.dashboard-session-card {
    padding: var(--space-5);
}

.dashboard-timeline-list,
.dashboard-action-list {
    display: grid;
    gap: var(--space-3);
}

.dashboard-timeline-entry,
.dashboard-action-item {
    min-width: 0;
    border: 1px solid var(--color-border-soft);
    border-radius: 16px;
    background: #FAFBFC;
    color: var(--color-text);
}

.dashboard-timeline-entry {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--space-3);
    align-items: start;
    padding: var(--space-4);
}

.dashboard-timeline-marker {
    width: 10px;
    height: 10px;
    margin-top: 6px;
    border-radius: 999px;
    background: var(--color-neutral);
    box-shadow: 0 0 0 4px rgba(107, 114, 128, 0.12);
}

.dashboard-timeline-entry.is-brand .dashboard-timeline-marker {
    background: var(--color-brand);
    box-shadow: 0 0 0 4px var(--color-primary-soft);
}

.dashboard-timeline-entry.is-success .dashboard-timeline-marker {
    background: var(--color-success);
    box-shadow: 0 0 0 4px var(--color-success-soft);
}

.dashboard-timeline-entry.is-warning .dashboard-timeline-marker {
    background: var(--color-warning);
    box-shadow: 0 0 0 4px var(--color-warning-soft);
}

.dashboard-timeline-entry.is-info .dashboard-timeline-marker {
    background: var(--color-info);
    box-shadow: 0 0 0 4px var(--color-info-soft);
}

.dashboard-timeline-entry.is-danger .dashboard-timeline-marker {
    background: var(--color-danger);
    box-shadow: 0 0 0 4px var(--color-danger-soft);
}

.dashboard-timeline-entry small,
.dashboard-timeline-entry p,
.dashboard-action-item p {
    color: var(--color-muted);
}

.dashboard-timeline-entry small {
    display: block;
    margin-bottom: 2px;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.dashboard-timeline-entry strong,
.dashboard-action-item strong {
    display: block;
    color: var(--color-text);
}

.dashboard-timeline-entry p,
.dashboard-action-item p {
    margin-bottom: 0;
    font-size: 14px;
    font-weight: 700;
}

.dashboard-action-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-3);
    align-items: center;
    padding: var(--space-4);
}

.dashboard-action-item > span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 var(--space-3);
    border-radius: 999px;
    background: var(--color-surface);
    color: var(--color-brand-strong);
    font-size: 12px;
    font-weight: 900;
}

.dashboard-action-item.is-warning {
    border-color: rgba(245, 158, 11, 0.28);
    background: var(--color-warning-soft);
}

.dashboard-action-item.is-danger {
    border-color: rgba(220, 38, 38, 0.22);
    background: var(--color-danger-soft);
}

.dashboard-action-item.is-info {
    border-color: rgba(14, 165, 233, 0.22);
    background: var(--color-info-soft);
}

.dashboard-empty-compact {
    padding: var(--space-4);
}

.dashboard-station-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-4);
}

.dashboard-station-card {
    display: grid;
    gap: var(--space-3);
    min-width: 0;
    padding: var(--space-4);
}

.dashboard-station-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-3);
}

.dashboard-station-card-head div {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.dashboard-station-card-head strong {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--color-text);
}

.dashboard-station-card-head span:not(.badge) {
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 750;
}

.dashboard-capacity-bar {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--color-surface-muted);
}

.dashboard-capacity-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--color-success), var(--color-info));
}

.dashboard-station-card.is-warning .dashboard-capacity-bar span {
    background: linear-gradient(90deg, var(--color-warning), var(--color-danger));
}

.dashboard-station-card p {
    margin-bottom: 0;
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 750;
}

.dashboard-operation-card {
    display: grid;
    align-content: space-between;
    gap: var(--space-4);
    min-height: 248px;
    padding: var(--space-5);
}

.dashboard-operation-card span {
    color: var(--color-brand-strong);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.dashboard-operation-card h3,
.dashboard-focus-card h3,
.dashboard-admin-card h3 {
    margin-bottom: var(--space-2);
}

.dashboard-operation-card p,
.dashboard-focus-card p,
.dashboard-admin-card p {
    margin-bottom: 0;
    color: var(--color-muted);
    font-weight: 650;
}

.dashboard-operation-icon {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--color-primary-soft);
    color: var(--color-brand-strong);
    font-size: 13px;
    font-weight: 950;
}

.dashboard-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: var(--space-4);
    align-items: start;
}

.dashboard-risk-panel,
.dashboard-session-card {
    padding: var(--space-5);
}

.dashboard-risk-list {
    display: grid;
    gap: var(--space-3);
}

.dashboard-risk-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-3);
    align-items: center;
    padding: var(--space-4);
    border: 1px solid var(--color-border-soft);
    border-radius: 14px;
    background: #FAFAFB;
}

.dashboard-risk-row strong {
    display: block;
    color: var(--color-text);
}

.dashboard-risk-row p {
    margin-bottom: 0;
    color: var(--color-muted);
    font-size: 14px;
}

.dashboard-focus-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-focus-card,
.dashboard-admin-card {
    padding: var(--space-5);
}

.dashboard-admin-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-admin-card {
    display: grid;
    gap: var(--space-4);
}

.page-toolbar,
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-4);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-xl);
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.kpi-card {
    display: grid;
    gap: var(--space-2);
    min-width: 0;
    padding: var(--space-4);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-xl);
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.kpi-card span,
.status-chip span {
    color: var(--color-muted);
}

.status-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    min-height: 30px;
    padding: 0 var(--space-3);
    border: 1px solid var(--color-border-soft);
    border-radius: 999px;
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 13px;
    font-weight: 850;
}

.status-chip::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--color-neutral);
}

.status-chip.is-success::before {
    background: var(--color-success);
}

.status-chip.is-warning::before {
    background: var(--color-warning);
}

.status-chip.is-info::before {
    background: var(--color-info);
}

.status-chip.is-danger::before {
    background: var(--color-danger);
}

.grid-container,
.data-grid-container,
.board-container {
    overflow: hidden;
    border: 1px solid var(--color-border-soft);
    border-radius: 16px;
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.mobile-agenda-card {
    border: 1px solid var(--color-border-soft);
    border-radius: 14px;
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.calendar-results-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
}

.calendar-results-heading p:last-child {
    margin-bottom: 0;
    color: var(--color-muted);
    font-weight: 700;
}

.calendar-groups {
    display: grid;
    gap: var(--space-5);
}

.calendar-group {
    display: grid;
    gap: var(--space-4);
}

.calendar-group-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
}

.calendar-list {
    display: grid;
    gap: var(--space-3);
}

.calendar-item {
    display: grid;
    grid-template-columns: minmax(140px, 0.7fr) minmax(220px, 1.5fr) minmax(180px, auto);
    gap: var(--space-4);
    align-items: center;
    padding: var(--space-4);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-md);
    background: var(--color-surface-soft);
}

.calendar-item.is-absence {
    border-left: 4px solid var(--color-warning);
    background: var(--color-warning-soft);
}

.calendar-date-range,
.calendar-main {
    display: grid;
    gap: 2px;
}

.calendar-date-range {
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 750;
}

.calendar-date-range strong {
    color: var(--color-info);
    font-size: 12px;
    text-transform: uppercase;
}

.calendar-main span {
    color: var(--color-muted);
    font-size: 14px;
}

.calendar-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: var(--space-2);
}

.calendar-month-nav,
.planning-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
}

.calendar-month-nav {
    justify-content: space-between;
    padding: var(--space-3) 0 var(--space-5);
    color: var(--color-muted);
}

.calendar-month-nav strong {
    color: var(--color-text);
    font-size: 15px;
}

.planning-legend {
    padding: var(--space-4);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.planning-legend-item {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 800;
}

.planning-legend-swatch {
    width: 14px;
    height: 14px;
    border: 1px solid currentColor;
    border-radius: 999px;
}

.planning-calendar-card {
    padding: 0;
    overflow: hidden;
}

.planning-calendar-wrap {
    overflow-x: auto;
    overscroll-behavior-x: contain;
}

.planning-calendar-table {
    min-width: 1120px;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
}

.planning-calendar-table th,
.planning-calendar-table td {
    width: 36px;
    min-width: 36px;
    padding: 6px 4px;
    border-right: 1px solid var(--color-border-soft);
    border-bottom: 1px solid var(--color-border-soft);
    vertical-align: top;
}

.planning-calendar-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--color-surface);
    color: var(--color-muted);
    font-size: 12px;
    text-align: center;
}

.planning-calendar-table thead th span,
.planning-calendar-table thead th small {
    display: block;
}

.planning-calendar-table thead th span {
    color: var(--color-text);
    font-weight: 900;
}

.planning-calendar-table thead th small {
    font-size: 11px;
    font-weight: 800;
}

.planning-employee-heading,
.planning-employee-cell {
    position: sticky;
    left: 0;
    z-index: 3;
    width: 190px !important;
    min-width: 190px !important;
    max-width: 190px;
    background: var(--color-surface);
    box-shadow: 8px 0 12px rgba(17, 24, 39, 0.06);
    text-align: left;
}

.planning-employee-cell strong {
    display: block;
    overflow-wrap: anywhere;
    color: var(--color-text);
    font-size: 14px;
    line-height: 1.25;
}

.planning-day-cell {
    min-height: 58px;
    background: var(--color-surface);
}

.planning-calendar-table .is-weekend {
    background: var(--color-surface-soft);
}

.planning-badge {
    display: grid;
    gap: 1px;
    width: 100%;
    min-height: 30px;
    margin-bottom: 4px;
    padding: 4px 5px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 900;
    line-height: 1.1;
    text-align: left;
    box-shadow: var(--shadow-soft);
}

.planning-badge span,
.planning-badge small {
    overflow: hidden;
    text-overflow: ellipsis;
}

.planning-badge small {
    color: inherit;
    font-size: 10px;
    font-weight: 800;
    opacity: 0.82;
}

a.planning-badge:hover,
a.planning-badge:focus-visible {
    transform: translateY(-1px);
}

.planning-badge-absence-genehmigter-urlaub,
.planning-badge-absence-erholungsurlaub {
    border-color: rgba(22, 163, 74, 0.24);
    background: var(--color-success-soft);
    color: #166534;
}

.planning-badge-absence-krank {
    border-color: rgba(218, 31, 61, 0.32);
    background: var(--color-danger-soft);
    color: var(--color-danger-strong);
}

.planning-badge-absence-lehrgang {
    border-color: rgba(14, 165, 233, 0.24);
    background: var(--color-info-soft);
    color: var(--color-info);
}

.planning-badge-absence-sonderurlaub {
    border-color: rgba(236, 143, 158, 0.42);
    background: rgba(236, 143, 158, 0.20);
    color: #914052;
}

.planning-badge-assignment-regular {
    border-color: rgba(14, 165, 233, 0.24);
    background: var(--color-info-soft);
    color: var(--color-info);
}

.planning-badge-assignment-springer {
    border-color: rgba(218, 31, 61, 0.34);
    background: var(--color-primary-soft);
    color: var(--color-brand-strong);
}

.planning-badge-assignment-temporary {
    border-color: rgba(245, 158, 11, 0.34);
    background: var(--color-warning-soft);
    color: var(--color-text);
}

.planning-badge-assignment-replacement {
    border-color: rgba(107, 114, 128, 0.24);
    background: var(--color-surface-muted);
    color: var(--color-neutral);
}

.calendar-toolbar-card {
    display: grid;
    gap: var(--space-5);
    padding: var(--space-6);
    border: 1px solid var(--color-border-soft);
    border-radius: 22px;
    background: linear-gradient(135deg, var(--color-surface) 0%, #FAFAFB 100%);
    box-shadow: var(--shadow-card);
}

.calendar-toolbar-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-5);
}

.calendar-toolbar-title {
    min-width: 0;
}

.calendar-toolbar-eyebrow {
    display: inline-flex;
    margin-bottom: var(--space-2);
    color: var(--color-brand-strong);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.calendar-toolbar-title h2 {
    margin-bottom: var(--space-1);
    font-size: clamp(25px, 2.2vw, 34px);
}

.calendar-toolbar-title p {
    margin-bottom: 0;
    color: var(--color-muted);
    font-weight: 750;
}

.calendar-toolbar-actions {
    display: grid;
    justify-items: end;
    gap: var(--space-3);
}

.calendar-perspective-control {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-2);
}

.calendar-perspective-control > span {
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.calendar-view-switch,
.calendar-nav-buttons,
.calendar-filter-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
}

.calendar-view-switch {
    padding: 4px;
    border: 1px solid var(--color-border-soft);
    border-radius: 999px;
    background: #F3F4F6;
    box-shadow: inset 0 1px 2px rgba(17, 24, 39, 0.04);
}

.calendar-view-switch a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 var(--space-4);
    border-radius: 999px;
    color: var(--color-muted);
    font-size: 14px;
    font-weight: 850;
}

.calendar-view-switch a.is-active {
    background: var(--color-brand);
    color: var(--color-surface);
    box-shadow: 0 8px 18px rgba(218, 31, 61, 0.20);
}

.calendar-filter-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: var(--space-3);
    align-items: end;
    padding-top: var(--space-5);
    border-top: 1px solid var(--color-border-soft);
}

.calendar-modern-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-xl);
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.calendar-legend-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    min-height: 34px;
    padding: 0 var(--space-3);
    border: 1px solid var(--color-border-soft);
    border-radius: 999px;
    background: #FAFAFB;
    color: var(--color-text);
    font-size: 13px;
    font-weight: 800;
}

.calendar-legend-dot {
    width: 11px;
    height: 11px;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.calendar-board-card {
    overflow: hidden;
    border: 1px solid var(--color-border-soft);
    border-radius: 22px;
    background: var(--color-surface);
    box-shadow: var(--shadow-card);
}

.calendar-scroll {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
}

.calendar-board {
    width: 100%;
    min-width: var(--calendar-min-width);
    --calendar-employee-width: 252px;
    --calendar-day-min: 46px;
}

.calendar-board-header,
.calendar-board-row {
    display: grid;
    grid-template-columns: var(--calendar-employee-width) minmax(calc(var(--calendar-min-width) - var(--calendar-employee-width)), 1fr);
}

.calendar-board-header {
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border-soft);
}

.calendar-employee-heading,
.calendar-employee-cell {
    position: sticky;
    left: 0;
    z-index: 6;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 12px 0 22px rgba(17, 24, 39, 0.08);
}

.calendar-employee-heading {
    display: flex;
    align-items: center;
    min-height: 76px;
    padding: 0 var(--space-5);
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.calendar-day-header-grid,
.calendar-day-background {
    display: grid;
    grid-template-columns: repeat(var(--calendar-days), minmax(var(--calendar-day-min), 1fr));
}

.calendar-day-heading {
    display: grid;
    place-items: center;
    min-height: 76px;
    padding: var(--space-3) 4px;
    border-left: 1px solid rgba(218, 219, 221, 0.58);
    color: var(--color-muted);
}

.calendar-day-heading strong {
    color: var(--color-text);
    font-size: 18px;
    font-weight: 950;
    line-height: 1;
}

.calendar-day-heading span {
    font-size: 11px;
    font-weight: 850;
}

.calendar-day-heading.is-weekend,
.calendar-day-background span.is-weekend {
    background: #F3F4F6;
}

.calendar-day-heading.is-today,
.calendar-day-background span.is-today {
    background: rgba(218, 31, 61, 0.08);
}

.calendar-board-row {
    border-bottom: 1px solid rgba(218, 219, 221, 0.58);
}

.calendar-board-row:hover .calendar-day-background span {
    background: rgba(246, 247, 249, 0.76);
}

.calendar-board-row:hover .calendar-day-background span.is-weekend {
    background: #EEF0F3;
}

.calendar-board-row:hover .calendar-day-background span.is-today {
    background: rgba(218, 31, 61, 0.12);
}

.calendar-board-row:last-child {
    border-bottom: 0;
}

.calendar-employee-cell {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-height: 88px;
    padding: var(--space-4) var(--space-5);
}

.calendar-avatar {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: var(--color-primary-soft);
    color: var(--color-brand-strong);
    font-size: 13px;
    font-weight: 950;
}

.calendar-employee-cell strong {
    overflow-wrap: anywhere;
    color: var(--color-text);
    font-size: 14px;
    line-height: 1.25;
}

.calendar-timeline {
    position: relative;
    min-height: 88px;
}

.calendar-day-background {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.calendar-day-background span {
    border-left: 1px solid rgba(218, 219, 221, 0.46);
    background: rgba(255, 255, 255, 0.82);
}

.calendar-bar-layer {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.timeline-bar {
    position: absolute;
    top: 50%;
    left: calc(var(--bar-left) + 8px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: max(40px, calc(var(--bar-width) - 16px));
    min-width: 0;
    height: 36px;
    padding: 0 var(--space-4);
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--color-surface);
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    pointer-events: auto;
    white-space: nowrap;
    transform: translateY(-50%);
    box-shadow: 0 12px 24px rgba(17, 24, 39, 0.14);
}

.timeline-bar span,
.timeline-bar small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.timeline-bar small {
    margin-left: 6px;
    opacity: 0.86;
}

a.timeline-bar:hover,
a.timeline-bar:focus-visible {
    filter: brightness(0.96);
    transform: translateY(calc(-50% - 1px));
}

.timeline-bar-absence-genehmigter-urlaub {
    background: linear-gradient(135deg, var(--color-brand), var(--color-brand-strong));
}

.timeline-bar-absence-krank {
    background: linear-gradient(135deg, #f97316, var(--color-danger-strong));
}

.timeline-bar-absence-lehrgang {
    background: linear-gradient(135deg, #475569, var(--color-info));
}

.timeline-bar-absence-sonderurlaub {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
}

.timeline-bar-absence-erholungsurlaub {
    background: linear-gradient(135deg, #0f766e, var(--color-success));
}

.timeline-bar-assignment-regular {
    background: linear-gradient(135deg, var(--color-info), #4f46e5);
}

.timeline-bar-assignment-springer {
    background: linear-gradient(135deg, var(--color-brand), #4f46e5);
}

.timeline-bar-assignment-temporary {
    background: linear-gradient(135deg, var(--color-warning), #d97706);
    color: var(--color-text);
}

.timeline-bar-assignment-replacement {
    background: linear-gradient(135deg, #64748b, #334155);
}

.calendar-mobile-agenda {
    display: none;
}

.calendar-mobile-context {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-5);
    border: 1px solid var(--color-border-soft);
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(218, 31, 61, 0.07), rgba(218, 31, 61, 0) 42%),
        linear-gradient(180deg, #ffffff 0%, #FAFBFC 100%);
    box-shadow: var(--shadow-soft);
}

.calendar-mobile-context > div:first-child {
    min-width: 0;
}

.calendar-mobile-context span,
.calendar-mobile-context p {
    color: var(--color-muted);
}

.calendar-mobile-context > div:first-child > span {
    display: inline-flex;
    margin-bottom: var(--space-1);
    color: var(--color-brand-strong);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.calendar-mobile-context h2 {
    margin-bottom: 2px;
    font-size: 28px;
}

.calendar-mobile-context p {
    margin-bottom: 0;
    font-weight: 750;
}

.calendar-mobile-context-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: var(--space-2);
}

.calendar-mobile-context-chips span {
    min-height: 30px;
    padding: 6px var(--space-3);
    border: 1px solid var(--color-border-soft);
    border-radius: 999px;
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.calendar-mobile-summary,
.calendar-mobile-days,
.calendar-mobile-entry-list {
    display: grid;
    gap: var(--space-3);
}

.calendar-mobile-summary {
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}

.calendar-mobile-summary-card,
.calendar-mobile-day,
.calendar-mobile-entry {
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-xl);
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.calendar-mobile-summary-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    min-height: 48px;
    padding: var(--space-3) var(--space-4);
}

.calendar-mobile-summary-card span {
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 850;
}

.calendar-mobile-summary-card strong {
    color: var(--color-text);
    font-size: 22px;
    line-height: 1.1;
    font-weight: 900;
}

.calendar-mobile-day {
    overflow: hidden;
}

.calendar-mobile-day.is-today {
    border-color: rgba(218, 31, 61, 0.28);
    box-shadow: 0 10px 26px rgba(218, 31, 61, 0.08);
}

.calendar-mobile-day header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-4);
    border-bottom: 1px solid var(--color-border-soft);
    background: linear-gradient(180deg, #ffffff 0%, #FAFBFC 100%);
}

.calendar-mobile-day header > div:last-child {
    display: grid;
    justify-items: end;
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 800;
}

.calendar-mobile-day header > div:last-child strong {
    color: var(--color-brand-strong);
}

.calendar-mobile-date {
    display: flex;
    align-items: baseline;
    gap: var(--space-2);
}

.calendar-mobile-date strong {
    color: var(--color-text);
    font-size: 26px;
    line-height: 1;
}

.calendar-mobile-date span {
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 900;
}

.calendar-mobile-empty {
    margin: 0;
    padding: var(--space-4);
    color: var(--color-muted);
    font-weight: 750;
}

.calendar-mobile-entry-list {
    padding: var(--space-3);
    background: #FAFBFC;
}

.calendar-mobile-entry {
    position: relative;
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: center;
    gap: var(--space-3);
    min-width: 0;
    padding: var(--space-4);
}

.calendar-mobile-entry-mark {
    width: 5px;
    align-self: stretch;
    border-radius: 999px;
}

.calendar-mobile-avatar {
    width: 34px;
    height: 34px;
    font-size: 12px;
}

.calendar-mobile-entry-main {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.calendar-mobile-entry-main strong,
.calendar-mobile-entry-main span,
.calendar-mobile-entry-main small {
    min-width: 0;
    overflow-wrap: anywhere;
}

.calendar-mobile-entry-main strong {
    color: var(--color-text);
    font-size: 14px;
}

.calendar-mobile-entry-main span {
    color: var(--color-text);
    font-size: 13px;
    font-weight: 750;
}

.calendar-mobile-entry-main small {
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 750;
}

.weekly-plan-page {
    display: grid;
    gap: var(--space-6);
}

.print-only {
    display: none;
}

.weekly-page-actions,
.weekly-nav-buttons,
.weekly-action-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-2);
}

.weekly-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: var(--space-3);
}

.weekly-summary-card {
    position: relative;
    display: grid;
    gap: 2px;
    min-width: 0;
    overflow: hidden;
    padding: var(--space-4);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-xl);
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.weekly-summary-card::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--color-neutral);
    content: "";
}

.weekly-summary-card.is-success::before {
    background: var(--color-success);
}

.weekly-summary-card.is-warning::before {
    background: var(--color-warning);
}

.weekly-summary-card.is-info::before {
    background: var(--color-info);
}

.weekly-summary-card span {
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.weekly-summary-card strong {
    color: var(--color-text);
    font-size: 28px;
    line-height: 1.1;
    font-weight: 900;
}

.weekly-print-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-5);
    border: 1px solid var(--color-border-soft);
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff 0%, #FAFBFC 100%);
    box-shadow: var(--shadow-soft);
}

.weekly-print-header p {
    margin-bottom: 0;
    color: var(--color-muted);
    font-weight: 700;
}

.weekly-board-card {
    overflow: hidden;
    border: 1px solid var(--color-border-soft);
    border-radius: 22px;
    background: var(--color-surface);
    box-shadow: var(--shadow-card);
}

.weekly-board-scroll {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
}

.weekly-board {
    min-width: 1240px;
    width: 100%;
    --weekly-station-width: 245px;
}

.weekly-board-header,
.weekly-board-row {
    display: grid;
    grid-template-columns: var(--weekly-station-width) repeat(7, minmax(128px, 1fr));
}

.weekly-board-header {
    position: sticky;
    top: 0;
    z-index: 5;
    border-bottom: 1px solid var(--color-border-soft);
    background: var(--color-surface);
}

.weekly-station-heading,
.weekly-station-cell {
    position: sticky;
    left: 0;
    z-index: 6;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 12px 0 22px rgba(17, 24, 39, 0.08);
}

.weekly-station-heading {
    display: flex;
    align-items: center;
    min-height: 78px;
    padding: 0 var(--space-5);
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.weekly-day-heading {
    display: grid;
    align-content: center;
    justify-items: center;
    min-height: 78px;
    padding: var(--space-3);
    border-left: 1px solid rgba(218, 219, 221, 0.58);
    color: var(--color-muted);
}

.weekly-day-heading strong {
    color: var(--color-text);
    font-size: 16px;
    font-weight: 950;
}

.weekly-day-heading span {
    font-size: 12px;
    font-weight: 850;
}

.weekly-day-heading.is-weekend,
.weekly-board-cell.is-weekend {
    background: #F3F4F6;
}

.weekly-day-heading.is-today,
.weekly-board-cell.is-today {
    background: rgba(218, 31, 61, 0.08);
}

.weekly-board-row {
    border-bottom: 1px solid rgba(218, 219, 221, 0.58);
}

.weekly-board-row:hover .weekly-board-cell {
    background: #FAFBFC;
}

.weekly-board-row:hover .weekly-board-cell.is-weekend {
    background: #EEF0F3;
}

.weekly-board-row:hover .weekly-board-cell.is-today {
    background: rgba(218, 31, 61, 0.12);
}

.weekly-board-row:last-child {
    border-bottom: 0;
}

.weekly-station-cell {
    display: grid;
    align-content: center;
    min-height: 124px;
    padding: var(--space-4) var(--space-5);
}

.weekly-station-cell strong {
    overflow-wrap: anywhere;
    color: var(--color-text);
    font-size: 15px;
}

.weekly-station-cell span {
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 800;
}

.weekly-board-cell {
    display: grid;
    align-content: start;
    gap: var(--space-2);
    min-height: 124px;
    padding: var(--space-4);
    border-left: 1px solid rgba(218, 219, 221, 0.46);
    background: rgba(255, 255, 255, 0.86);
}

.weekly-empty {
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 750;
    opacity: 0.56;
}

.weekly-entry,
.weekly-warning-chip,
.weekly-mobile-warning,
.weekly-today-pill {
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.weekly-entry {
    display: grid;
    gap: 1px;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
}

.weekly-entry strong,
.weekly-entry span,
.weekly-entry small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.weekly-entry span,
.weekly-entry small {
    font-size: 11px;
}

.weekly-entry small {
    color: inherit;
    opacity: 0.78;
}

.weekly-entry-regular {
    border-color: rgba(14, 165, 233, 0.30);
    background: var(--color-info-soft);
    color: var(--color-info);
}

.weekly-entry-springer {
    border-color: rgba(218, 31, 61, 0.34);
    background: var(--color-primary-soft);
    color: var(--color-brand-strong);
}

.weekly-entry-temporary {
    border-color: rgba(245, 158, 11, 0.42);
    background: var(--color-warning-soft);
    color: var(--color-text);
}

.weekly-entry-replacement {
    border-color: rgba(107, 114, 128, 0.26);
    background: var(--color-surface-muted);
    color: var(--color-neutral);
}

.weekly-warning-chip {
    display: grid;
    gap: 1px;
    padding: 8px 10px;
    border: 1px solid rgba(245, 158, 11, 0.42);
    border-radius: 12px;
    background: var(--color-warning-soft);
    color: var(--color-danger-strong);
}

.weekly-warning-chip span {
    font-size: 11px;
    opacity: 0.84;
}

.weekly-mobile-agenda {
    display: none;
}

.weekly-mobile-context {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-5);
    border: 1px solid var(--color-border-soft);
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff 0%, #FAFBFC 100%);
    box-shadow: var(--shadow-soft);
}

.weekly-mobile-context > div {
    min-width: 0;
}

.weekly-mobile-context span,
.weekly-mobile-context p {
    color: var(--color-muted);
}

.weekly-mobile-context > div > span {
    display: inline-flex;
    margin-bottom: var(--space-1);
    color: var(--color-brand-strong);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.weekly-mobile-context h2 {
    margin-bottom: 2px;
    font-size: 24px;
}

.weekly-mobile-context p {
    margin-bottom: 0;
    font-weight: 750;
}

.weekly-mobile-context-chip {
    flex: 0 0 auto;
    padding: 6px var(--space-3);
    border: 1px solid var(--color-border-soft);
    border-radius: 999px;
    background: var(--color-surface);
    color: var(--color-text) !important;
    font-size: 12px;
    font-weight: 900;
}

.weekly-mobile-day,
.weekly-mobile-station,
.weekly-mobile-absences {
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-xl);
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.weekly-mobile-day {
    overflow: hidden;
}

.weekly-mobile-day.is-today {
    border-color: rgba(218, 31, 61, 0.28);
    box-shadow: 0 10px 26px rgba(218, 31, 61, 0.08);
}

.weekly-mobile-day header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-4);
    border-bottom: 1px solid var(--color-border-soft);
    background: linear-gradient(180deg, #ffffff 0%, #FAFBFC 100%);
}

.weekly-mobile-day header div {
    display: grid;
}

.weekly-mobile-day header strong {
    color: var(--color-text);
    font-size: 18px;
}

.weekly-mobile-day header span {
    color: var(--color-muted);
    font-weight: 800;
}

.weekly-today-pill {
    padding: 6px 10px;
    background: var(--color-primary-soft);
    color: var(--color-brand-strong);
}

.weekly-mobile-station,
.weekly-mobile-absences,
.weekly-mobile-empty {
    margin: var(--space-3);
}

.weekly-mobile-station,
.weekly-mobile-absences {
    display: grid;
    gap: var(--space-2);
    padding: var(--space-4);
    background: #FAFBFC;
}

.weekly-mobile-station span,
.weekly-mobile-absences span {
    color: var(--color-text);
    font-size: 13px;
    font-weight: 750;
}

.weekly-mobile-entry-line {
    padding: 8px 10px;
    border: 1px solid var(--color-border-soft);
    border-radius: 12px;
    background: var(--color-surface);
}

.weekly-mobile-warning {
    display: inline-flex;
    width: fit-content;
    padding: 6px 10px;
    background: var(--color-warning-soft);
    color: var(--color-danger-strong);
}

.weekly-mobile-empty {
    color: var(--color-muted);
    font-weight: 750;
}

.tourenplan-page {
    display: grid;
    gap: var(--space-6);
}

.tourenplan-page-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: var(--space-2);
}

.tourenplan-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    padding: var(--space-2);
    border: 1px solid var(--color-border-soft);
    border-radius: 20px;
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.tourenplan-subnav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 var(--space-4);
    border: 1px solid transparent;
    border-radius: 14px;
    color: var(--color-muted);
    font-size: 14px;
    font-weight: 850;
    text-decoration: none;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.tourenplan-subnav-link:hover,
.tourenplan-subnav-link:focus-visible {
    border-color: rgba(218, 31, 61, 0.22);
    background: rgba(218, 31, 61, 0.06);
    color: var(--color-brand);
}

.tourenplan-subnav-link.is-active {
    border-color: rgba(218, 31, 61, 0.24);
    background: rgba(218, 31, 61, 0.1);
    color: var(--color-brand);
    box-shadow: inset 0 0 0 1px rgba(218, 31, 61, 0.06);
}

.tourenplan-viewbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-4);
    border: 1px solid var(--color-border-soft);
    border-radius: 20px;
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.tourenplan-viewbar p {
    margin-bottom: 2px;
}

.tourenplan-viewbar strong {
    color: var(--color-text);
    font-size: 17px;
    font-weight: 950;
}

.tourenplan-view-switch {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 5px;
    border: 1px solid var(--color-border-soft);
    border-radius: 16px;
    background: var(--color-surface-muted);
}

.tourenplan-view-switch a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 var(--space-4);
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--color-muted);
    font-size: 14px;
    font-weight: 900;
    text-decoration: none;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.tourenplan-view-switch a:hover,
.tourenplan-view-switch a:focus-visible {
    border-color: rgba(218, 31, 61, 0.22);
    background: rgba(218, 31, 61, 0.06);
    color: var(--color-brand);
}

.tourenplan-view-switch a.is-active {
    border-color: rgba(218, 31, 61, 0.24);
    background: var(--color-surface);
    color: var(--color-brand);
    box-shadow: var(--shadow-soft);
}

.tourenplan-context-card,
.tourenplan-empty-state {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-5);
    border: 1px solid var(--color-border-soft);
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff 0%, #FAFBFC 100%);
    box-shadow: var(--shadow-soft);
}

.tourenplan-empty-state {
    display: grid;
    justify-content: stretch;
    max-width: 760px;
}

.tourenplan-empty-state p:last-child,
.tourenplan-context-card p {
    margin-bottom: 0;
    color: var(--color-muted);
    font-weight: 750;
}

.tourenplan-context-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-2);
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 800;
}

.tourenplan-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-3);
}

.tourenplan-summary-card {
    position: relative;
    display: grid;
    gap: 2px;
    overflow: hidden;
    padding: var(--space-4);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-xl);
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.tourenplan-summary-card::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--color-brand);
    content: "";
}

.tourenplan-summary-card span {
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.tourenplan-summary-card strong {
    color: var(--color-text);
    font-size: 28px;
    line-height: 1.1;
    font-weight: 900;
}

.tourenplan-admin-panel {
    display: grid;
    gap: var(--space-4);
    padding: var(--space-5);
    border: 1px solid var(--color-border-soft);
    border-radius: 22px;
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.tourenplan-admin-panel .card-header p {
    margin-bottom: 0;
    color: var(--color-muted);
    font-weight: 750;
}

.tourenplan-slot-form {
    display: grid;
    gap: var(--space-4);
}

.tourenplan-slot-form select[multiple] {
    min-height: 142px;
}

.tourenplan-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4);
}

.tourenplan-action-card {
    display: grid;
    gap: var(--space-2);
    padding: var(--space-5);
    border: 1px solid var(--color-border-soft);
    border-radius: 22px;
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
    color: var(--color-text);
    text-decoration: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.tourenplan-action-card:hover,
.tourenplan-action-card:focus-visible {
    border-color: rgba(218, 31, 61, 0.34);
    box-shadow: var(--shadow-medium);
    transform: translateY(-1px);
}

.tourenplan-action-card span {
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tourenplan-action-card strong {
    font-size: 18px;
    font-weight: 900;
}

.tourenplan-action-card p {
    margin: 0;
    color: var(--color-muted);
    font-weight: 750;
    line-height: 1.55;
}

.tourenplan-station-board {
    overflow-x: auto;
    padding: var(--space-3);
    border: 1px solid var(--color-border-soft);
    border-radius: 24px;
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
    -webkit-overflow-scrolling: touch;
}

.tourenplan-station-board-inner {
    display: grid;
    min-width: 1180px;
    gap: var(--space-2);
}

.tourenplan-station-board-header,
.tourenplan-station-row {
    display: grid;
    grid-template-columns: minmax(220px, 250px) repeat(7, minmax(128px, 1fr));
    gap: var(--space-2);
    align-items: stretch;
}

.tourenplan-station-board-header > div,
.tourenplan-station-name,
.tourenplan-station-cell {
    border: 1px solid var(--color-border-soft);
    border-radius: 16px;
}

.tourenplan-station-board-header > div {
    display: grid;
    gap: 2px;
    min-height: 58px;
    padding: var(--space-3);
    background: var(--color-surface-muted);
}

.tourenplan-station-board-header > div:first-child,
.tourenplan-station-name {
    position: sticky;
    left: 0;
    z-index: 2;
}

.tourenplan-station-board-header span,
.tourenplan-station-name span,
.tourenplan-station-cell-date span {
    color: var(--color-muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.tourenplan-station-board-header strong,
.tourenplan-station-name strong,
.tourenplan-station-cell-date strong {
    color: var(--color-text);
    font-size: 14px;
    font-weight: 950;
}

.tourenplan-station-board-header .is-weekend,
.tourenplan-station-cell.is-weekend {
    background: #F8F9FB;
}

.tourenplan-station-board-header .is-today,
.tourenplan-station-cell.is-today {
    border-color: rgba(218, 31, 61, 0.28);
    box-shadow: inset 0 0 0 1px rgba(218, 31, 61, 0.06);
}

.tourenplan-station-name {
    display: grid;
    align-content: center;
    gap: 3px;
    min-height: 118px;
    padding: var(--space-4);
    background: linear-gradient(180deg, #ffffff 0%, #FAFBFC 100%);
    box-shadow: 10px 0 18px rgba(31, 41, 55, 0.05);
}

.tourenplan-station-cell {
    display: grid;
    align-content: start;
    gap: var(--space-2);
    min-height: 118px;
    padding: var(--space-2);
    background: var(--color-surface);
}

.tourenplan-station-cell-date {
    display: none;
}

.tourenplan-station-cell-date em {
    display: inline-flex;
    width: fit-content;
    margin-top: 4px;
    padding: 3px 7px;
    border-radius: 999px;
    background: var(--color-primary-soft);
    color: var(--color-brand-strong);
    font-size: 11px;
    font-style: normal;
    font-weight: 900;
}

.tourenplan-station-slot-card {
    display: grid;
    gap: var(--space-2);
    min-width: 0;
    padding: var(--space-3);
    border: 1px solid rgba(14, 165, 233, 0.22);
    border-radius: 14px;
    background: var(--color-info-soft);
}

.tourenplan-station-slot-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-2);
}

.tourenplan-station-slot-head strong {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--color-text);
    font-size: 13px;
    font-weight: 950;
}

.tourenplan-station-slot-head span {
    flex: 0 0 auto;
    color: var(--color-info);
    font-size: 12px;
    font-weight: 900;
}

.tourenplan-station-empty {
    align-self: start;
    width: fit-content;
    padding: 6px 8px;
    border-radius: 999px;
    background: var(--color-surface-muted);
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 800;
}

.tourenplan-tour-create-form,
.tourenplan-tour-management-list {
    display: grid;
    gap: var(--space-3);
}

.tourenplan-tour-form-grid {
    align-items: end;
}

.tourenplan-tour-submit {
    justify-content: end;
}

.tourenplan-tour-management-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-3);
    align-items: end;
    padding: var(--space-3);
    border: 1px solid var(--color-border-soft);
    border-radius: 18px;
    background: var(--color-surface-muted);
}

.tourenplan-tour-management-item.is-inactive {
    opacity: 0.72;
}

.tourenplan-tour-inline-form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(120px, 160px) auto;
    gap: var(--space-3);
    align-items: end;
}

.tourenplan-tour-inline-actions,
.tourenplan-tour-deactivate-form {
    display: flex;
    gap: var(--space-2);
    align-items: center;
    justify-content: flex-end;
}

.tourenplan-week-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: var(--space-3);
}

.tourenplan-day-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--color-border-soft);
    border-radius: 20px;
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.tourenplan-day-card.is-weekend {
    background: #F8F9FB;
}

.tourenplan-day-card.is-today {
    border-color: rgba(218, 31, 61, 0.28);
    box-shadow: 0 10px 26px rgba(218, 31, 61, 0.08);
}

.tourenplan-day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    padding: var(--space-4);
    border-bottom: 1px solid var(--color-border-soft);
    background: linear-gradient(180deg, #ffffff 0%, #FAFBFC 100%);
}

.tourenplan-day-header div {
    display: grid;
    min-width: 0;
}

.tourenplan-day-header span {
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.tourenplan-day-header strong {
    color: var(--color-text);
    font-size: 15px;
    font-weight: 950;
}

.tourenplan-today-pill {
    flex: 0 0 auto;
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--color-primary-soft);
    color: var(--color-brand-strong);
    font-size: 11px;
    font-weight: 900;
}

.tourenplan-tour-list {
    display: grid;
    gap: var(--space-3);
    padding: var(--space-3);
}

.tourenplan-tour-block {
    display: grid;
    gap: var(--space-2);
    min-width: 0;
}

.tourenplan-tour-title {
    color: var(--color-brand-strong);
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
}

.tourenplan-slot-card {
    display: grid;
    gap: var(--space-2);
    min-width: 0;
    padding: var(--space-3);
    border: 1px solid rgba(14, 165, 233, 0.22);
    border-radius: 14px;
    background: var(--color-info-soft);
}

.tourenplan-slot-topline {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.tourenplan-slot-topline span {
    color: var(--color-info);
    font-size: 12px;
    font-weight: 900;
}

.tourenplan-slot-topline strong {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--color-text);
    font-size: 14px;
    font-weight: 950;
}

.tourenplan-engineer-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tourenplan-engineer-list span {
    padding: 5px 8px;
    border: 1px solid var(--color-border-soft);
    border-radius: 999px;
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 12px;
    font-weight: 850;
}

.tourenplan-note,
.tourenplan-slot-empty {
    margin-bottom: 0;
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 750;
}

.tourenplan-note {
    padding-top: var(--space-2);
    border-top: 1px solid rgba(14, 165, 233, 0.20);
}

.approval-list {
    display: grid;
    gap: var(--space-5);
}

.approval-card {
    display: grid;
    gap: var(--space-4);
}

.decision-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4);
}

.role-choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-3);
}

.role-choice {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    min-width: 0;
    padding: var(--space-4);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-md);
    background: var(--color-surface-soft);
}

.role-choice input {
    margin-top: 4px;
}

.role-choice small {
    display: block;
    color: var(--color-muted);
    font-weight: 600;
}

.role-choice span {
    min-width: 0;
}

.role-choice strong,
.role-choice small {
    overflow-wrap: anywhere;
}

.role-edit-card {
    max-width: 960px;
}

.account-password-card,
.password-reset-card {
    margin-top: var(--space-5);
}

.role-table {
    min-width: 760px;
}

.role-table td {
    vertical-align: middle;
}

.role-badge-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    min-width: 0;
}

.role-badge {
    min-height: 24px;
    padding: 0 var(--space-2);
    white-space: nowrap;
}

.role-badge-super {
    background: var(--color-primary-soft);
    color: var(--color-brand-strong);
}

.role-badge-admin {
    background: var(--color-info-soft);
    color: var(--color-info);
}

.role-badge-employee {
    background: var(--color-surface-muted);
    color: var(--color-neutral);
}

.badge-role-default,
.role-badge-default {
    background: var(--color-info-soft);
    color: var(--color-info);
}

.log-details {
    display: block;
    max-width: 360px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-control-grid {
    display: grid;
    grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.35fr);
    gap: var(--space-5);
}

.admin-role-panel,
.admin-user-panel,
.admin-user-list-card,
.audit-filter-card,
.audit-log-panel {
    background: linear-gradient(180deg, #ffffff 0%, #FAFBFC 100%);
}

.admin-role-grid,
.audit-log-list {
    display: grid;
    gap: var(--space-3);
}

.admin-role-card {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: var(--space-3);
    align-items: start;
    overflow: hidden;
    padding: var(--space-4);
    border: 1px solid var(--color-border-soft);
    border-radius: 18px;
    background: var(--color-surface);
    box-shadow: var(--shadow-subtle);
}

.admin-role-card::before,
.audit-log-card::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--color-info);
    content: "";
}

.admin-role-card.is-danger::before,
.audit-log-card.is-critical::before {
    background: var(--color-brand);
}

.admin-role-card.is-neutral::before {
    background: var(--color-neutral);
}

.admin-role-card h3 {
    margin-bottom: 4px;
    font-size: 18px;
}

.admin-role-card p {
    margin-bottom: 0;
    color: var(--color-muted);
    font-size: 14px;
    font-weight: 650;
}

.admin-role-icon {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(218, 31, 61, 0.16);
    border-radius: 14px;
    background: var(--color-primary-soft);
    color: var(--color-brand-strong);
    font-size: 12px;
    font-weight: 950;
}

.admin-person-line {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-width: 0;
}

.admin-person-line-large {
    align-items: center;
    padding: var(--space-4);
    border: 1px solid var(--color-border-soft);
    border-radius: 18px;
    background: #FAFBFC;
}

.admin-person-line-large strong,
.admin-person-line-large span {
    display: block;
    overflow-wrap: anywhere;
}

.admin-person-line-large strong {
    color: var(--color-text);
    font-weight: 900;
}

.admin-person-line-large span {
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 750;
}

.admin-meta-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-meta-grid .role-badge-list {
    margin-top: 0;
}

.admin-edit-shell {
    max-width: 1040px;
}

.admin-account-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.75fr);
    align-items: center;
    gap: var(--space-4);
}

.admin-role-choice {
    background: linear-gradient(180deg, #ffffff 0%, #FAFBFC 100%);
}

.audit-filter-form .form-grid {
    grid-template-columns: minmax(180px, 1.2fr) minmax(220px, 1.2fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr);
}

.audit-log-card {
    position: relative;
    display: grid;
    grid-template-columns: 148px minmax(0, 1fr);
    gap: var(--space-4);
    overflow: hidden;
    padding: var(--space-4) var(--space-5);
    border: 1px solid var(--color-border-soft);
    border-radius: 18px;
    background: var(--color-surface);
    box-shadow: var(--shadow-subtle);
}

.audit-log-time {
    display: grid;
    align-content: start;
    gap: 2px;
    padding-left: var(--space-2);
}

.audit-log-time strong {
    color: var(--color-text);
    font-size: 15px;
    font-weight: 950;
}

.audit-log-time span {
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 850;
}

.audit-log-body {
    display: grid;
    gap: var(--space-3);
    min-width: 0;
}

.audit-log-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
}

.audit-log-head h3 {
    margin-bottom: 2px;
    font-size: 18px;
    font-weight: 900;
}

.audit-log-head p {
    margin-bottom: 0;
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.audit-log-meta-grid {
    display: grid;
    grid-template-columns: minmax(140px, 0.65fr) minmax(120px, 0.5fr) minmax(220px, 1.3fr);
    gap: var(--space-3);
}

.audit-log-meta-grid > div {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: var(--space-3);
    border: 1px solid var(--color-border-soft);
    border-radius: 14px;
    background: #FAFBFC;
}

.audit-log-meta-grid span {
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.audit-log-meta-grid strong {
    min-width: 0;
    color: var(--color-text);
    font-weight: 900;
    overflow-wrap: anywhere;
}

.audit-log-meta-grid small {
    color: var(--color-muted);
    font-weight: 800;
}

.audit-log-details-cell {
    min-width: 0;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-5);
}

.settings-panel,
.account-security-note-card {
    background: linear-gradient(180deg, #ffffff 0%, #FAFBFC 100%);
}

.settings-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
    margin: 0;
}

.settings-detail-grid div {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: var(--space-3);
    border: 1px solid var(--color-border-soft);
    border-radius: 14px;
    background: var(--color-surface);
}

.settings-detail-grid dt {
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.settings-detail-grid dd {
    margin: 0;
    color: var(--color-text);
    font-weight: 900;
    overflow-wrap: anywhere;
}

.settings-check-panel {
    grid-row: span 2;
}

.settings-check-list {
    display: grid;
    gap: var(--space-3);
}

.settings-check-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-4);
    border: 1px solid var(--color-border-soft);
    border-radius: 16px;
    background: var(--color-surface);
    box-shadow: var(--shadow-subtle);
}

.settings-check-row h3 {
    margin-bottom: 4px;
    font-size: 16px;
}

.settings-check-row p {
    margin-bottom: 0;
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 700;
}

.settings-security-note {
    margin-top: var(--space-4);
    padding: var(--space-4);
    border: 1px solid rgba(14, 165, 233, 0.18);
    border-radius: 16px;
    background: var(--color-info-soft);
}

.settings-security-note strong {
    display: block;
    margin-bottom: 4px;
    color: var(--color-text);
    font-weight: 900;
}

.settings-security-note p {
    margin-bottom: 0;
    color: var(--color-muted);
    font-size: 14px;
    font-weight: 700;
}

.account-password-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: var(--space-5);
    align-items: start;
}

.account-password-layout .account-password-card {
    margin-top: 0;
}

.account-password-grid {
    grid-template-columns: 1fr;
}

.account-security-note-card {
    position: sticky;
    top: var(--space-5);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4);
    margin: 0;
}

.detail-grid div {
    padding: var(--space-4);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-lg);
    background: var(--color-surface-soft);
}

.detail-grid dt {
    color: var(--color-muted-soft);
    font-size: 13px;
    font-weight: 700;
}

.detail-grid dd {
    margin: var(--space-1) 0 0;
    font-weight: 750;
}

@media (max-width: 980px) {
    body.is-nav-open {
        overflow: hidden;
    }

    .app-shell {
        display: block;
        min-height: 100vh;
    }

    .mobile-app-bar {
        position: sticky;
        top: 0;
        z-index: 50;
        display: flex;
        align-items: center;
        gap: var(--space-3);
        min-height: 64px;
        padding:
            calc(10px + var(--safe-area-top))
            max(var(--space-4), var(--safe-area-right))
            10px
            max(var(--space-4), var(--safe-area-left));
        border-bottom: 1px solid var(--color-border-soft);
        background: rgba(255, 255, 255, 0.96);
        box-shadow: var(--shadow-soft);
        backdrop-filter: blur(12px);
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 70;
        width: min(352px, calc(100vw - 28px));
        min-height: 100dvh;
        max-height: 100dvh;
        padding:
            calc(var(--space-4) + var(--safe-area-top))
            var(--space-4)
            calc(var(--space-4) + var(--safe-area-bottom))
            max(var(--space-4), var(--safe-area-left));
        border-right: 1px solid var(--color-border);
        border-bottom: 0;
        box-shadow: 0 24px 50px rgba(85, 85, 85, 0.22);
        transform: translateX(-105%);
        transition: transform 180ms ease;
        will-change: transform;
    }

    body.is-nav-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 60;
        display: block;
        border: 0;
        background: rgba(85, 85, 85, 0.38);
        opacity: 0;
        pointer-events: none;
        visibility: hidden;
        transition: opacity 180ms ease;
    }

    body.is-nav-open .sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
        visibility: visible;
    }

    .sidebar-close {
        display: inline-flex;
        flex: 0 0 auto;
        margin-left: auto;
        font-size: 28px;
        line-height: 1;
    }

    .sidebar-nav {
        margin-top: var(--space-4);
    }

    .nav-item {
        min-height: 48px;
    }

    .sidebar-footer {
        display: grid;
        gap: var(--space-3);
        padding: var(--space-3);
    }

    .top-header {
        position: static;
        align-items: flex-start;
        min-height: 0;
        padding: var(--space-4);
        background: var(--color-surface);
    }

    .top-actions {
        justify-content: flex-start;
    }

    .content-shell {
        width: min(calc(100% - 24px), var(--container-max));
        padding: var(--space-6) 0 calc(var(--space-6) + var(--safe-area-bottom));
    }

    .content-shell:has(.team-calendar-page) {
        width: min(calc(100% - 24px), var(--container-max));
    }

    .stat-card,
    .card-span-8,
    .card-span-4,
    .card-span-6,
    .card-span-12 {
        grid-column: span 12;
    }

    .dashboard-hero,
    .dashboard-main-grid,
    .dashboard-intelligence-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-hero-meta {
        justify-items: start;
        width: 100%;
    }

    .dashboard-summary-strip,
    .dashboard-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-operations-grid,
    .dashboard-focus-grid,
    .dashboard-admin-grid,
    .dashboard-station-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .leave-hero,
    .leave-detail-hero {
        flex-direction: column;
        align-items: stretch;
        padding: var(--space-5);
    }

    .leave-hero-actions {
        justify-content: flex-start;
    }

    .leave-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .leave-balance-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .leave-balance-card,
    .leave-toolbar-card,
    .leave-request-card,
    .leave-detail-grid {
        grid-template-columns: 1fr;
    }

    .leave-filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .leave-filter-actions {
        grid-column: 1 / -1;
    }

    .leave-detail-primary,
    .leave-detail-grid > aside,
    .leave-decision-card {
        grid-column: 1 / -1;
    }

    .ops-hero,
    .ops-request-card {
        grid-template-columns: 1fr;
    }

    .ops-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .ops-hero-actions {
        justify-content: flex-start;
    }

    .ops-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .org-hero,
    .org-entity-card {
        grid-template-columns: 1fr;
    }

    .org-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .org-hero-actions {
        justify-content: flex-start;
    }

    .org-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .org-meta-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-control-grid,
    .admin-account-summary,
    .audit-log-card,
    .settings-grid,
    .account-password-layout {
        grid-template-columns: 1fr;
    }

    .audit-filter-form .form-grid,
    .audit-log-meta-grid,
    .settings-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .settings-check-panel {
        grid-row: auto;
    }

    .account-security-note-card {
        position: static;
    }

    .form-grid,
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .js-enabled .table-wrap {
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .js-enabled .table-wrap table,
    .js-enabled .table-wrap thead,
    .js-enabled .table-wrap tbody,
    .js-enabled .table-wrap tr,
    .js-enabled .table-wrap th,
    .js-enabled .table-wrap td {
        display: block;
    }

    .js-enabled .table-wrap thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

    .js-enabled .table-wrap tbody {
        display: grid;
        gap: var(--space-3);
    }

    .js-enabled .table-wrap tr {
        padding: var(--space-4);
        border: 1px solid var(--color-border);
        border-radius: var(--radius-lg);
        background: var(--color-surface);
        box-shadow: var(--shadow-soft);
    }

    .js-enabled .table-wrap td {
        display: grid;
        grid-template-columns: minmax(96px, 0.42fr) minmax(0, 1fr);
        gap: var(--space-3);
        align-items: start;
        padding: var(--space-3) 0;
        border-bottom: 1px solid var(--color-border-soft);
        overflow-wrap: break-word;
        word-break: normal;
    }

    .js-enabled .table-wrap td:last-child {
        border-bottom: 0;
        padding-bottom: 0;
    }

    .js-enabled .table-wrap td::before {
        color: var(--color-muted);
        content: attr(data-label);
        font-size: 12px;
        font-weight: 850;
        letter-spacing: 0.03em;
        text-transform: uppercase;
    }

    .js-enabled .table-wrap td[data-label="Aktionen"] {
        grid-template-columns: 1fr;
    }

    .js-enabled .table-wrap td[data-label="Aktionen"]::before {
        margin-bottom: var(--space-1);
    }

    .js-enabled .table-wrap .table-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .js-enabled .table-wrap .table-actions,
    .js-enabled .table-wrap .table-actions form,
    .js-enabled .table-wrap .table-actions .btn,
    .js-enabled .table-wrap .table-actions button {
        width: 100%;
    }

    .js-enabled .table-person {
        align-items: flex-start;
    }

    .role-table {
        min-width: 0;
    }

    .log-details {
        max-width: none;
        white-space: pre-wrap;
    }

    .weekly-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tourenplan-week-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .calendar-mobile-agenda {
        display: grid;
        gap: var(--space-4);
    }

    .team-calendar-page .calendar-modern-legend {
        display: none;
    }

    .team-calendar-page .calendar-board-card {
        display: none;
    }

    .weekly-board-card {
        display: none;
    }

    .weekly-mobile-agenda {
        display: grid;
        gap: var(--space-4);
    }
}

@media (max-width: 640px) {
    h1 {
        font-size: 27px;
    }

    h2 {
        font-size: 20px;
    }

    .page-lead,
    .auth-copy {
        font-size: 16px;
    }

    .top-header,
    .page-heading,
    .card-header,
    .dashboard-section-heading,
    .calendar-group-header,
    .calendar-results-heading,
    .page-actions,
    .form-actions,
    .feature-row,
    .warning-row {
        align-items: stretch;
        flex-direction: column;
    }

    .calendar-item {
        grid-template-columns: 1fr;
    }

    .dashboard-hero {
        padding: var(--space-5);
        border-radius: 18px;
    }

    .dashboard-hero h1 {
        font-size: 33px;
    }

    .dashboard-summary-strip,
    .dashboard-kpi-grid,
    .dashboard-operations-grid,
    .dashboard-focus-grid,
    .dashboard-admin-grid,
    .dashboard-station-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-kpi-card,
    .dashboard-operation-card {
        min-height: 0;
    }

    .dashboard-risk-row,
    .dashboard-action-item {
        grid-template-columns: 1fr;
    }

    .dashboard-summary-item,
    .dashboard-timeline-panel,
    .dashboard-action-panel,
    .dashboard-session-card {
        padding: var(--space-4);
    }

    .leave-hero,
    .leave-detail-hero,
    .leave-toolbar-card,
    .leave-list-card,
    .leave-balance-card,
    .leave-detail-card {
        border-radius: 18px;
    }

    .leave-hero,
    .leave-detail-hero,
    .leave-toolbar-card,
    .leave-list-card,
    .leave-balance-card,
    .leave-detail-card,
    .leave-request-card {
        padding: var(--space-4);
    }

    .leave-hero h1,
    .leave-detail-hero h1 {
        font-size: 32px;
    }

    .leave-kpi-grid,
    .leave-balance-metrics,
    .leave-filter-form,
    .leave-request-meta-grid,
    .leave-detail-list,
    .tourenplan-action-grid,
    .tourenplan-summary-grid,
    .tourenplan-week-grid {
        grid-template-columns: 1fr;
    }

    .tourenplan-context-card {
        flex-direction: column;
        align-items: stretch;
    }

    .tourenplan-page-actions,
    .tourenplan-page-actions .btn {
        width: 100%;
    }

    .tourenplan-subnav {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tourenplan-subnav-link {
        flex: 0 0 auto;
    }

    .tourenplan-viewbar {
        align-items: stretch;
        flex-direction: column;
    }

    .tourenplan-view-switch {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tourenplan-view-switch a {
        flex: 0 0 auto;
    }

    .tourenplan-station-board {
        overflow-x: visible;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .tourenplan-station-board-inner {
        min-width: 0;
        gap: var(--space-4);
    }

    .tourenplan-station-board-header {
        display: none;
    }

    .tourenplan-station-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: var(--space-3);
        padding: var(--space-3);
        border: 1px solid var(--color-border-soft);
        border-radius: 20px;
        background: var(--color-surface);
        box-shadow: var(--shadow-soft);
    }

    .tourenplan-station-name {
        position: static;
        min-height: 0;
        padding: 0 0 var(--space-2);
        border: 0;
        border-bottom: 1px solid var(--color-border-soft);
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .tourenplan-station-cell {
        min-height: 0;
        padding: var(--space-3);
    }

    .tourenplan-station-cell-date {
        display: grid;
        gap: 2px;
        padding-bottom: var(--space-2);
        border-bottom: 1px solid var(--color-border-soft);
    }

    .tourenplan-station-slot-head {
        flex-direction: column;
        gap: 2px;
    }

    .tourenplan-tour-management-item,
    .tourenplan-tour-inline-form,
    .tourenplan-tour-form-grid {
        grid-template-columns: 1fr;
    }

    .tourenplan-tour-inline-actions,
    .tourenplan-tour-deactivate-form,
    .tourenplan-tour-inline-actions .btn,
    .tourenplan-tour-deactivate-form .btn {
        width: 100%;
    }

    .tourenplan-tour-inline-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .leave-filter-actions,
    .leave-request-actions,
    .leave-request-actions form,
    .leave-request-actions .btn,
    .leave-request-actions button,
    .leave-hero-actions .btn {
        width: 100%;
    }

    .leave-request-head {
        flex-direction: column;
        align-items: stretch;
    }

    .leave-date-band {
        width: 100%;
        border-radius: 14px;
    }

    .ops-hero,
    .ops-toolbar-card,
    .ops-list-card,
    .ops-request-card,
    .ops-absence-card {
        padding: var(--space-4);
        border-radius: 18px;
    }

    .ops-hero h1 {
        font-size: 32px;
    }

    .ops-kpi-grid,
    .ops-meta-grid,
    .ops-absence-card .ops-meta-grid {
        grid-template-columns: 1fr;
    }

    .ops-toolbar-head,
    .ops-request-head {
        flex-direction: column;
        align-items: stretch;
    }

    .ops-date-band {
        width: 100%;
        border-radius: 14px;
    }

    .ops-filter-actions,
    .ops-filter-actions .btn,
    .ops-filter-actions button,
    .ops-hero-actions .btn {
        width: 100%;
    }

    .org-hero,
    .org-list-card,
    .org-entity-card,
    .org-form-card,
    .org-form-card .form-section {
        padding: var(--space-4);
        border-radius: 18px;
    }

    .org-hero h1 {
        font-size: 32px;
    }

    .org-kpi-grid,
    .org-meta-grid {
        grid-template-columns: 1fr;
    }

    .org-entity-head {
        flex-direction: column;
        align-items: stretch;
    }

    .org-entity-actions,
    .org-entity-actions form,
    .org-entity-actions .btn,
    .org-entity-actions button,
    .org-hero-actions .btn {
        width: 100%;
    }

    .admin-kpi-grid,
    .admin-meta-grid,
    .audit-filter-form .form-grid,
    .audit-log-meta-grid,
    .settings-detail-grid {
        grid-template-columns: 1fr;
    }

    .admin-role-card {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .audit-log-head,
    .settings-check-row {
        align-items: stretch;
        flex-direction: column;
    }

    .audit-log-card,
    .settings-panel,
    .account-security-note-card {
        padding: var(--space-4);
    }

    .calendar-month-nav {
        align-items: stretch;
        justify-content: flex-start;
    }

    .planning-legend {
        padding: var(--space-3);
    }

    .planning-calendar-table {
        min-width: 980px;
    }

    .planning-employee-heading,
    .planning-employee-cell {
        width: 160px !important;
        min-width: 160px !important;
        max-width: 160px;
    }

    .planning-badge {
        min-height: 34px;
    }

    .calendar-toolbar-card {
        padding: var(--space-4);
        border-radius: var(--radius-lg);
    }

    .calendar-mobile-context {
        flex-direction: column;
        padding: var(--space-4);
    }

    .calendar-mobile-context-chips {
        justify-content: flex-start;
    }

    .calendar-toolbar-main,
    .calendar-toolbar-actions {
        align-items: stretch;
        width: 100%;
    }

    .calendar-toolbar-main {
        flex-direction: column;
    }

    .calendar-toolbar-actions {
        justify-items: stretch;
    }

    .calendar-perspective-control,
    .calendar-view-switch,
    .calendar-nav-buttons,
    .calendar-filter-actions {
        justify-content: stretch;
        align-items: stretch;
    }

    .calendar-view-switch a,
    .calendar-nav-buttons .btn,
    .calendar-filter-actions .btn,
    .calendar-filter-actions button {
        justify-content: center;
        flex: 1 1 auto;
    }

    .calendar-view-switch a {
        min-height: 42px;
        text-align: center;
        white-space: normal;
        line-height: 1.15;
    }

    .calendar-filter-strip {
        grid-template-columns: 1fr;
    }

    .weekly-page-actions,
    .weekly-nav-buttons,
    .weekly-action-buttons {
        align-items: stretch;
        justify-content: stretch;
        width: 100%;
    }

    .weekly-mobile-context {
        flex-direction: column;
        padding: var(--space-4);
    }

    .weekly-nav-buttons .btn,
    .weekly-action-buttons .btn,
    .weekly-action-buttons button {
        justify-content: center;
        flex: 1 1 auto;
    }

    .weekly-summary-grid {
        grid-template-columns: 1fr;
    }

    .calendar-modern-legend {
        padding: var(--space-3);
    }

    .calendar-board-header,
    .calendar-board-row {
        grid-template-columns: var(--calendar-employee-width) minmax(calc(var(--calendar-min-width) - var(--calendar-employee-width)), 1fr);
    }

    .calendar-day-header-grid,
    .calendar-day-background {
        grid-template-columns: repeat(var(--calendar-days), minmax(var(--calendar-day-min), 1fr));
    }

    .calendar-employee-heading,
    .calendar-employee-cell {
        padding-right: var(--space-3);
        padding-left: var(--space-3);
    }

    .calendar-avatar {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .timeline-bar {
        padding: 0 var(--space-2);
        font-size: 11px;
    }

    .decision-grid {
        grid-template-columns: 1fr;
    }

    .calendar-badges {
        justify-content: flex-start;
    }

    .feature-row-actions {
        justify-content: flex-start;
    }

    .top-context {
        display: none;
    }

    .top-header {
        padding: var(--space-4);
    }

    .stats-grid,
    .content-grid {
        gap: var(--space-4);
    }

    .auth-card,
    .card,
    .stat-card {
        padding: var(--space-4);
    }

    .auth-body {
        align-items: start;
        padding:
            calc(var(--space-4) + var(--safe-area-top))
            calc(var(--space-4) + var(--safe-area-right))
            calc(var(--space-4) + var(--safe-area-bottom))
            calc(var(--space-4) + var(--safe-area-left));
    }

    .auth-shell {
        width: 100%;
    }

    .auth-card h1 {
        font-size: 28px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stat-card {
        grid-column: span 2;
        min-height: 0;
    }

    .ops-metric-value {
        font-size: clamp(24px, 8vw, 31px);
        line-height: 1.08;
        overflow-wrap: normal;
        word-break: normal;
    }

    .content-shell {
        width: min(calc(100% - 20px), var(--container-max));
        padding: var(--space-5) 0 calc(var(--space-5) + var(--safe-area-bottom));
    }

    .content-shell:has(.team-calendar-page) {
        width: min(calc(100% - 20px), var(--container-max));
    }

    .btn,
    input,
    select,
    textarea {
        min-height: 46px;
    }

    .page-actions,
    .form-actions,
    .top-actions,
    .table-actions,
    .table-actions form,
    .table-actions .btn,
    .table-actions button,
    .form-actions .btn,
    .page-actions .btn,
    .top-actions .btn,
    .top-actions form,
    .top-actions button {
        width: 100%;
    }

    .form-actions {
        justify-content: stretch;
    }

    .top-actions {
        display: grid;
        align-items: stretch;
        grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
        gap: var(--space-2);
    }

    .top-actions .btn,
    .top-actions button {
        min-height: 42px;
        padding-inline: var(--space-2);
        font-size: 14px;
        white-space: normal;
    }

    .badge-row,
    .calendar-badges,
    .quick-filter-row {
        gap: var(--space-2);
    }

    .badge {
        min-height: 30px;
        white-space: normal;
    }
}

@media (max-width: 420px) {
    .mobile-app-title strong {
        font-size: 14px;
    }

    .mobile-app-title span {
        font-size: 11px;
    }

    .content-shell {
        width: min(calc(100% - 16px), var(--container-max));
    }

    .content-shell:has(.team-calendar-page) {
        width: min(calc(100% - 16px), var(--container-max));
    }

    .js-enabled .table-wrap tr {
        padding: var(--space-3);
    }

    .js-enabled .table-wrap td {
        grid-template-columns: 1fr;
        gap: var(--space-1);
    }

    .js-enabled .table-wrap td::before {
        margin-bottom: 2px;
    }
}

@media print {
    @page {
        size: A4 landscape;
        margin: 10mm;
    }

    body {
        background: #ffffff;
        color: #000000;
        font-size: 11px;
    }

    .sidebar,
    .top-header,
    .layout-footer,
    .no-print {
        display: none !important;
    }

    .print-only {
        display: grid !important;
    }

    .app-shell,
    .app-main,
    .content-shell {
        display: block;
        width: auto;
        max-width: none;
        min-height: 0;
        padding: 0;
    }

    .card,
    .weekly-board-card,
    .weekly-summary-card {
        box-shadow: none;
        break-inside: avoid;
    }

    .weekly-print-header h1 {
        font-size: 24px;
    }

    .weekly-print-header {
        padding: 0 0 6mm;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: #ffffff;
        break-inside: avoid;
    }

    .weekly-print-header .badge {
        border: 1px solid #cccccc;
        background: #ffffff;
        color: #000000;
    }

    .weekly-print-summary {
        grid-template-columns: repeat(5, 1fr);
        gap: 3mm;
        margin-bottom: 5mm;
        break-inside: avoid;
    }

    .weekly-print-summary div {
        padding: 2mm;
        border: 1px solid #dddddd;
    }

    .weekly-print-summary span {
        display: block;
        color: #555555;
        font-size: 8px;
        font-weight: 700;
        text-transform: uppercase;
    }

    .weekly-print-summary strong {
        display: block;
        font-size: 16px;
        line-height: 1.1;
    }

    .weekly-mobile-agenda {
        display: none !important;
    }

    .weekly-board-card {
        display: block !important;
        border: 1px solid #dddddd;
        border-radius: 0;
        box-shadow: none;
    }

    .weekly-board-scroll {
        overflow: visible;
    }

    .weekly-board {
        min-width: 0;
        --weekly-station-width: 145px;
    }

    .weekly-board-header,
    .weekly-board-row {
        grid-template-columns: var(--weekly-station-width) repeat(7, minmax(0, 1fr));
    }

    .weekly-station-heading,
    .weekly-station-cell {
        position: static;
        box-shadow: none;
    }

    .weekly-station-heading,
    .weekly-day-heading {
        min-height: 44px;
        padding: 5px;
    }

    .weekly-station-cell,
    .weekly-board-cell {
        min-height: 76px;
        padding: 5px;
    }

    .weekly-empty {
        display: none;
    }

    .weekly-entry,
    .weekly-warning-chip {
        padding: 4px 5px;
        border-radius: 6px;
        font-size: 9px;
        box-shadow: none;
    }

    .weekly-entry span,
    .weekly-entry small,
    .weekly-warning-chip span {
        font-size: 8px;
    }

    .btn,
    .badge {
        box-shadow: none;
    }
}
