:root {
    --canvas: #f3f6f6;
    --canvas-deep: #e5ecee;
    --surface: #ffffff;
    --surface-soft: #f8fbfb;
    --ink: #211d1e;
    --ink-soft: #4b4547;
    --muted: #777174;
    --line: #dbe3e4;
    --line-strong: #c5d0d2;
    --brand: #0093a7;
    --brand-bright: #00a9be;
    --brand-dark: #006b7a;
    --brand-deep: #003d46;
    --sun: #00afc1;
    --danger: #b74f38;
    --danger-soft: #fff0eb;
    --success-soft: #e5f5f7;
    --sidebar-width: 272px;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 8px 24px rgba(30, 49, 52, 0.06);
    --shadow-md: 0 18px 50px rgba(28, 43, 46, 0.1);
    --shadow-brand: 0 12px 28px rgba(0, 147, 167, 0.24);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 88% 4%, rgba(0, 147, 167, 0.12), transparent 25rem),
        linear-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.14) 1px, transparent 1px),
        var(--canvas);
    background-size: auto, 28px 28px, 28px 28px, auto;
    color: var(--ink);
    font-family: "Avenir Next", Avenir, "Century Gothic", sans-serif;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

body.nav-open {
    overflow: hidden;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
    text-decoration: none;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 100;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--surface);
    color: var(--brand-dark);
    font-weight: 700;
    transform: translateY(-150%);
    transition: transform 160ms ease;
}

.skip-link:focus {
    transform: translateY(0);
}

.app-frame {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 24px 18px 20px;
    overflow-y: auto;
    color: rgba(255, 255, 255, 0.76);
    background:
        radial-gradient(circle at 12% 4%, rgba(0, 167, 187, 0.2), transparent 17rem),
        linear-gradient(155deg, var(--brand-dark), var(--brand-deep) 72%);
    box-shadow: 10px 0 40px rgba(0, 61, 70, 0.12);
}

.sidebar::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 72px;
    width: 5px;
    height: 96px;
    border-radius: 4px 0 0 4px;
    background: linear-gradient(var(--sun), rgba(0, 147, 167, 0));
    opacity: 0.7;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 4px 34px;
    color: #ffffff;
}

.brand-mark {
    display: grid;
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    place-items: center;
    overflow: hidden;
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 17px 17px 7px 17px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 26px rgba(0, 47, 54, 0.24), inset 0 0 0 1px rgba(0, 107, 122, 0.05);
}

.brand-mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-copy {
    display: grid;
    line-height: 1.2;
}

.brand-copy strong {
    font-size: 14px;
    letter-spacing: -0.01em;
}

.brand-copy small {
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.52);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.nav {
    display: grid;
    gap: 5px;
}

.nav-label {
    margin: 22px 12px 7px;
    color: rgba(255, 255, 255, 0.34);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.nav-label:first-child {
    margin-top: 0;
}

.nav a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 650;
    transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.nav a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.07);
    transform: translateX(2px);
}

.nav a.active {
    color: #ffffff;
    background: linear-gradient(100deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.07));
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: inset 3px 0 0 var(--sun);
}

.nav-index {
    display: grid;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    place-items: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.55);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.nav a.active .nav-index {
    background: var(--sun);
    color: var(--brand-deep);
}

.sidebar-footer {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-top: auto;
    padding: 16px 12px 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.logout-form {
    margin-left: auto;
}

.logout-form button {
    min-height: 29px;
    padding: 0 8px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.68);
    font-size: 8px;
    font-weight: 750;
    cursor: pointer;
}

.logout-form button:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.sidebar-footer strong,
.sidebar-footer small {
    display: block;
}

.sidebar-footer strong {
    color: #ffffff;
    font-size: 11px;
}

.sidebar-footer small {
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.42);
    font-size: 9px;
}

.sidebar-pulse {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    place-items: center;
    border-radius: 50%;
    background: rgba(0, 174, 192, 0.12);
}

.sidebar-pulse span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #32c2d1;
    box-shadow: 0 0 0 5px rgba(50, 194, 209, 0.12);
}

.workspace {
    min-width: 0;
}

.workspace-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    min-height: 78px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px clamp(22px, 3vw, 46px);
    border-bottom: 1px solid rgba(199, 203, 194, 0.75);
    background: rgba(247, 246, 241, 0.86);
    backdrop-filter: blur(18px);
}

.workspace-heading,
.workspace-meta,
.admin-chip {
    display: flex;
    align-items: center;
}

.workspace-heading {
    gap: 14px;
}

.workspace-heading p {
    margin: 0 0 2px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.workspace-heading h2 {
    font-size: 16px;
    letter-spacing: -0.02em;
}

.workspace-meta {
    gap: 18px;
}

.system-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 700;
}

.system-status i {
    width: 8px;
    height: 8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: #38b98b;
    box-shadow: 0 0 0 3px rgba(56, 185, 139, 0.14);
}

.admin-chip {
    gap: 9px;
    padding-left: 18px;
    border-left: 1px solid var(--line-strong);
}

.admin-chip > span {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 12px;
    background: var(--brand-dark);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(0, 107, 122, 0.2);
}

.admin-chip strong,
.admin-chip small {
    display: block;
}

.admin-chip strong {
    font-size: 11px;
}

.admin-chip small {
    color: var(--muted);
    font-size: 9px;
}

.menu-toggle,
.nav-backdrop {
    display: none;
}

.shell {
    width: min(1460px, calc(100% - clamp(36px, 6vw, 92px)));
    margin: 34px auto 72px;
}

.shell > * {
    animation: rise-in 420ms both;
}

.shell > *:nth-child(2) {
    animation-delay: 50ms;
}

.shell > *:nth-child(3) {
    animation-delay: 90ms;
}

.shell > *:nth-child(4) {
    animation-delay: 130ms;
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

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

h1,
h2,
h3 {
    margin: 0;
    line-height: 1.15;
}

h1 {
    font-size: clamp(28px, 3vw, 42px);
    font-weight: 720;
    letter-spacing: -0.045em;
}

h2 {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--brand);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.page-description {
    max-width: 680px;
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.actions,
.form-actions,
.print-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    flex-wrap: wrap;
}

.button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    border: 1px solid var(--line-strong);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--ink);
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
    box-shadow: 0 2px 0 rgba(29, 49, 44, 0.02);
    transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.button:hover {
    border-color: var(--brand-bright);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.button:active {
    transform: translateY(0);
}

.button.primary {
    border-color: var(--brand);
    background: linear-gradient(135deg, var(--brand-dark), var(--brand-deep));
    color: #ffffff;
    box-shadow: var(--shadow-brand);
}

.button.primary:hover {
    border-color: var(--brand-bright);
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
}

.button.small {
    min-height: 32px;
    padding: 0 11px;
    border-radius: 9px;
    font-size: 10px;
}

.button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.nav a:focus-visible,
.facility-row:focus-visible {
    outline: 3px solid rgba(0, 147, 167, 0.25);
    outline-offset: 2px;
}

.notice {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
    padding: 13px 15px;
    border: 1px solid #b9ddcf;
    border-radius: 13px;
    background: var(--success-soft);
    color: var(--brand-dark);
    font-size: 13px;
    font-weight: 650;
    box-shadow: var(--shadow-sm);
}

.notice-icon {
    display: grid;
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    place-items: center;
    border-radius: 8px;
    background: var(--brand);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.notice-error {
    border-color: #e8c0b5;
    background: var(--danger-soft);
    color: #843522;
}

.notice-error .notice-icon {
    background: var(--danger);
}

.dashboard-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(240px, 0.45fr);
    min-height: 280px;
    margin-bottom: 18px;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 78% 8%, rgba(0, 173, 190, 0.22), transparent 19rem),
        linear-gradient(145deg, #006b7a, var(--brand-deep) 74%);
    color: #ffffff;
    box-shadow: var(--shadow-md);
}

.dashboard-hero::before {
    content: "";
    position: absolute;
    top: -85px;
    right: 17%;
    width: 250px;
    height: 250px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    box-shadow: 0 0 0 40px rgba(255, 255, 255, 0.025), 0 0 0 86px rgba(255, 255, 255, 0.02);
}

.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(30px, 5vw, 58px);
}

.hero-content .eyebrow {
    color: #7ad4de;
}

.hero-content h1 {
    max-width: 760px;
    color: #ffffff;
    font-size: clamp(31px, 4vw, 52px);
}

.hero-content .page-description {
    color: rgba(255, 255, 255, 0.62);
}

.hero-content .actions {
    justify-content: flex-start;
    margin-top: 25px;
}

.hero-content .button {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.09);
    color: #ffffff;
    box-shadow: none;
}

.hero-content .button:hover {
    background: rgba(255, 255, 255, 0.15);
}

.hero-content .button.primary {
    border-color: #4ec8d4;
    background: var(--sun);
    color: var(--brand-deep);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
}

.hero-summary {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin: 20px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
}

.hero-summary > span {
    align-self: flex-start;
    padding: 6px 9px;
    border-radius: 99px;
    background: rgba(50, 194, 209, 0.14);
    color: #8bdde5;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.hero-summary strong {
    display: block;
    font-size: clamp(32px, 4vw, 48px);
    letter-spacing: -0.05em;
}

.hero-summary small,
.hero-summary p {
    color: rgba(255, 255, 255, 0.55);
}

.hero-summary p {
    margin: 3px 0 0;
    font-size: 11px;
}

.hero-summary small {
    font-size: 10px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.metric,
.panel,
.filters,
.table-wrap {
    border: 1px solid rgba(207, 210, 202, 0.9);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-sm);
}

.metric {
    position: relative;
    min-height: 136px;
    overflow: hidden;
    padding: 20px;
    border-radius: var(--radius-md);
}

.metric::after {
    content: attr(data-index);
    position: absolute;
    right: 16px;
    bottom: -10px;
    color: rgba(20, 107, 91, 0.055);
    font-size: 62px;
    font-weight: 800;
    letter-spacing: -0.09em;
}

.metric-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.metric-label span,
.metric > span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.metric-label i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--brand-bright);
    box-shadow: 0 0 0 5px rgba(0, 147, 167, 0.1);
}

.metric:nth-child(2) .metric-label i {
    background: var(--sun);
    box-shadow: 0 0 0 5px rgba(0, 147, 167, 0.12);
}

.metric:nth-child(3) .metric-label i {
    background: #d17c59;
    box-shadow: 0 0 0 5px rgba(209, 124, 89, 0.11);
}

.metric strong {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: 12px;
    font-size: 38px;
    line-height: 1;
    letter-spacing: -0.06em;
}

.metric small {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 9px;
}

.panel {
    padding: 22px;
    border-radius: var(--radius-md);
}

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

.section-title span,
.section-title small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
}

.record-count {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    padding: 0 9px;
    border-radius: 99px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
}

.facility-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.facility-row {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 68px;
    padding: 10px 14px 10px 10px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--surface-soft);
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.facility-row::before {
    content: attr(data-index);
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 11px;
    background: #e8f3f4;
    color: var(--brand-dark);
    font-size: 10px;
    font-weight: 800;
}

.facility-row::after {
    content: "→";
    color: var(--brand);
    font-size: 18px;
}

.facility-row:hover {
    border-color: rgba(0, 147, 167, 0.5);
    background: #ffffff;
    transform: translateY(-2px);
}

.facility-row strong,
.facility-row small {
    display: block;
}

.facility-row strong {
    font-size: 12px;
}

.facility-row small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
}

.filters {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 18px;
    padding: 14px;
    border-radius: var(--radius-md);
}

.export-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: -4px 0 22px;
    padding: 13px 15px;
    border: 1px solid #d3ddd8;
    border-radius: 14px;
    background: linear-gradient(105deg, #edf7f8, #ffffff 65%);
}

.export-strip > div:first-child {
    display: flex;
    align-items: center;
    gap: 12px;
}

.export-strip p,
.export-strip p small {
    display: block;
    margin: 0;
}

.export-strip p strong {
    color: var(--ink);
    font-size: 10px;
}

.export-strip p small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 8px;
}

.export-icon {
    display: inline-grid;
    min-width: 62px;
    min-height: 34px;
    place-items: center;
    border-radius: 9px;
    background: var(--brand-dark);
    color: #ffffff;
    font-size: 7px;
    font-weight: 850;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.filters::before {
    content: "Filtre";
    align-self: center;
    padding: 0 5px;
    color: var(--brand);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.filters label {
    min-width: min(230px, 100%);
}

label {
    display: grid;
    gap: 7px;
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 750;
}

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.label-row small {
    color: var(--muted);
    font-size: 8px;
    font-weight: 650;
}

input,
select,
textarea {
    width: 100%;
    min-height: 43px;
    padding: 9px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 11px;
    background: #ffffff;
    color: var(--ink);
    box-shadow: inset 0 1px 2px rgba(31, 47, 43, 0.025);
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

input:hover,
select:hover,
textarea:hover {
    border-color: #aeb7b1;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--brand-bright);
    box-shadow: 0 0 0 4px rgba(0, 147, 167, 0.1);
    outline: none;
}

textarea {
    resize: vertical;
}

::placeholder {
    color: #a5ada9;
}

.table-wrap {
    overflow: auto;
    border-radius: var(--radius-md);
}

.table-scroll {
    margin: 0 -22px -22px;
    overflow-x: auto;
    border-top: 1px solid var(--line);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.table-scroll th:first-child,
.table-scroll td:first-child {
    padding-left: 22px;
}

.table-scroll th:last-child,
.table-scroll td:last-child {
    padding-right: 22px;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th,
td {
    padding: 13px 15px;
    border-bottom: 1px solid #e8e9e4;
    text-align: left;
    vertical-align: middle;
}

th {
    background: #f1f3ee;
    color: var(--ink-soft);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

thead th {
    position: sticky;
    top: 0;
    z-index: 3;
}

tbody tr {
    transition: background 140ms ease;
}

tbody tr:hover {
    background: #fbfcf9;
}

tbody tr:last-child td {
    border-bottom: 0;
}

td {
    color: var(--ink-soft);
    font-size: 12px;
}

td:first-child {
    color: var(--ink);
    font-weight: 650;
}

th small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 8px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

.status-badge {
    display: inline-flex;
    min-height: 25px;
    align-items: center;
    gap: 6px;
    padding: 0 9px;
    border-radius: 99px;
    background: var(--success-soft);
    color: var(--brand-dark);
    font-size: 9px;
    font-weight: 800;
}

.status-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brand-bright);
}

.status-badge.inactive {
    background: #f0f0ed;
    color: var(--muted);
}

.status-badge.inactive::before {
    background: #a4aaa7;
}

.schedule-table {
    min-width: 840px;
}

.schedule-table th,
.schedule-table td {
    text-align: center;
}

.schedule-table th:nth-child(2),
.schedule-table td:nth-child(2) {
    position: sticky;
    left: 58px;
    z-index: 2;
    min-width: 260px;
    text-align: left;
    background: #ffffff;
    box-shadow: 8px 0 16px rgba(24, 45, 39, 0.035);
}

.schedule-table th:nth-child(2) {
    z-index: 5;
    background: #f1f3ee;
}

.schedule-table th:first-child,
.schedule-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 3;
    width: 58px;
    min-width: 58px;
    text-align: center;
    background: #ffffff;
}

.schedule-table th:first-child {
    z-index: 6;
    background: #f1f3ee;
}

.schedule-table tbody tr:nth-child(7n) td {
    border-bottom-color: #cfd5ce;
}

.schedule-table .narrow {
    width: 58px;
}

.code-cell {
    width: 96px;
    text-align: center;
    font-weight: 800;
}

.duty-code {
    display: inline-grid;
    min-width: 31px;
    min-height: 29px;
    place-items: center;
    padding: 3px 8px;
    border: 1px solid #b9dce0;
    border-radius: 9px;
    background: #eaf7f8;
    color: var(--brand-dark);
    font-size: 11px;
    font-weight: 850;
}

.cell-empty {
    color: #c0c5c1;
    font-weight: 500;
}

.compact-table th:first-child,
.compact-table td:first-child {
    min-width: 150px;
}

.split {
    display: grid;
    grid-template-columns: minmax(280px, 370px) minmax(0, 1fr);
    align-items: start;
    gap: 18px;
}

.split > .form-panel {
    position: sticky;
    top: 102px;
}

.form-panel {
    display: grid;
    gap: 15px;
}

.form-panel h2 {
    padding-bottom: 13px;
    border-bottom: 1px solid var(--line);
}

.form-heading small {
    display: block;
    margin-top: 9px;
    color: var(--muted);
    font-size: 10px;
}

.form-panel .button.primary {
    width: 100%;
    margin-top: 3px;
}

.form-button-row {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 3px;
}

.form-button-row .button.primary {
    flex: 1 1 auto;
    margin-top: 0;
}

.employee-layout {
    grid-template-columns: minmax(330px, 430px) minmax(0, 1fr);
}

.facility-workspace {
    display: grid;
    grid-template-columns: minmax(330px, 420px) minmax(0, 1fr);
    grid-template-areas: "form list";
    align-items: start;
    gap: 18px;
}

.facility-workspace.is-editing {
    grid-template-areas:
        "form shifts"
        "list list";
}

.facility-workspace.is-editing .facility-form {
    position: static;
}

.facility-workspace .facility-form {
    position: sticky;
    top: 102px;
    grid-area: form;
}

.facility-list-panel {
    grid-area: list;
    min-width: 0;
}

.facility-map-wrap {
    display: grid;
    gap: 6px;
}

.facility-map-wrap > small {
    color: var(--muted);
    font-size: 8px;
}

.facility-map {
    position: relative;
    z-index: 1;
    min-height: 255px;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    background: #e8eee9;
}

.facility-map .leaflet-control-attribution {
    font-size: 8px;
}

.facility-shifts-panel {
    grid-area: shifts;
    min-width: 0;
}

.facility-workspace.is-editing .shift-manager-grid {
    grid-template-columns: repeat(2, minmax(245px, 1fr));
}

.shift-manager-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(260px, 1fr));
    gap: 12px;
}

.shift-editor {
    display: grid;
    align-content: start;
    gap: 11px;
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
}

.shift-editor-new {
    border-style: dashed;
    border-color: #a8c9bd;
    background: linear-gradient(145deg, #eaf7f8, #ffffff);
}

.shift-card-heading {
    display: flex;
    align-items: center;
    gap: 9px;
}

.shift-card-heading small {
    margin-left: auto;
    color: var(--muted);
    font-size: 7px;
}

.shift-number {
    display: inline-grid;
    min-width: 33px;
    min-height: 27px;
    place-items: center;
    border-radius: 8px;
    background: var(--brand-dark);
    color: #ffffff;
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.shift-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.leave-layout {
    grid-template-columns: minmax(360px, 450px) minmax(0, 1fr);
}

.report-layout {
    grid-template-columns: minmax(360px, 430px) minmax(0, 1fr);
}

.leave-right-column {
    display: grid;
    min-width: 0;
    gap: 18px;
}

.leave-form {
    max-height: calc(100vh - 104px);
    overflow-y: auto;
}

.report-form {
    position: sticky;
    top: 98px;
    max-height: calc(100vh - 104px);
    overflow-y: auto;
}

.report-table {
    min-width: 920px;
}

.report-table td small,
.document-link,
.muted-text {
    display: block;
}

.document-link {
    color: var(--brand);
    font-weight: 800;
    text-decoration: none;
}

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

.muted-text {
    color: var(--muted);
    font-size: 9px;
}

.file-field input[type="file"] {
    padding: 9px;
    background: var(--surface-soft);
}

.file-field input[type="file"]::file-selector-button {
    margin-right: 10px;
    padding: 8px 11px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.holiday-management-panel {
    margin-top: 20px;
}

.holiday-management-grid {
    display: grid;
    grid-template-columns: minmax(300px, 0.7fr) minmax(0, 1.3fr);
    gap: 22px;
}

.holiday-form {
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-soft);
}

.holiday-form > small {
    color: var(--muted);
    font-size: 8px;
    line-height: 1.5;
}

.holiday-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 8px;
}

.holiday-item {
    display: flex;
    min-height: 75px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
}

.holiday-item strong,
.holiday-item span,
.holiday-item small {
    display: block;
}

.holiday-item strong {
    color: var(--brand-dark);
    font-size: 10px;
}

.holiday-item span {
    margin-top: 3px;
    color: var(--ink);
    font-size: 9px;
    font-weight: 700;
}

.holiday-item small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 7px;
}

.icon-button {
    min-height: 30px;
    padding: 0 9px;
    border: 1px solid #ebc8bf;
    border-radius: 8px;
    background: #fff7f4;
    color: var(--danger);
    font-size: 8px;
    font-weight: 800;
    cursor: pointer;
}

.optional-label {
    color: var(--brand);
    font-size: 8px;
    font-weight: 750;
}

.field-help {
    color: var(--muted);
    font-size: 8px;
    font-weight: 600;
    line-height: 1.45;
}

.leave-calculation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px;
    border: 1px solid #b9dce0;
    border-radius: 13px;
    background: linear-gradient(145deg, #eaf7f8, #f7fbfc);
}

.leave-calculation > div {
    padding: 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.78);
}

.leave-calculation span,
.leave-calculation strong {
    display: block;
}

.leave-calculation span {
    color: var(--muted);
    font-size: 8px;
    font-weight: 750;
}

.leave-calculation strong {
    margin-top: 5px;
    color: var(--brand-dark);
    font-size: 14px;
}

.leave-calculation > small {
    grid-column: 1 / -1;
    padding: 2px 4px 0;
    color: var(--muted);
    font-size: 8px;
    line-height: 1.45;
}

.leave-rules-panel {
    background:
        radial-gradient(circle at 94% 0, rgba(0, 147, 167, 0.14), transparent 16rem),
        rgba(255, 255, 255, 0.9);
}

.leave-rule-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}

.leave-rule-grid > div {
    min-height: 76px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-soft);
}

.leave-rule-grid strong,
.leave-rule-grid span {
    display: block;
}

.leave-rule-grid strong {
    color: var(--ink);
    font-size: 10px;
}

.leave-rule-grid span {
    margin-top: 5px;
    color: var(--muted);
    font-size: 8px;
    line-height: 1.45;
}

.leave-table {
    min-width: 1040px;
}

.leave-table th:first-child,
.leave-table td:first-child {
    min-width: 200px;
}

.leave-type-label,
.date-range,
.leave-table td small {
    display: block;
}

.leave-type-label {
    margin-top: 4px;
    color: var(--muted);
    font-size: 8px;
    font-weight: 650;
}

.date-range {
    color: var(--ink);
    font-weight: 750;
}

.leave-table td small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 8px;
}

.leave-status {
    display: inline-flex;
    min-height: 22px;
    align-items: center;
    margin-top: 7px;
    padding: 0 7px;
    border-radius: 99px;
    background: #efefeb;
    color: var(--muted);
    font-size: 7px;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.leave-status.active {
    background: #e4f6f8;
    color: var(--brand-dark);
}

.leave-status.upcoming {
    background: #fff4dc;
    color: #8a641d;
}

.resume-date {
    color: var(--brand-dark);
    font-size: 11px;
    white-space: nowrap;
}

.danger-button {
    border-color: #ebc8bf;
    color: var(--danger);
}

.danger-button:hover {
    border-color: var(--danger);
    background: var(--danger-soft);
}

.employee-form {
    max-height: calc(100vh - 124px);
    overflow-y: auto;
}

.employee-right-column {
    display: grid;
    min-width: 0;
    gap: 18px;
}

.employee-history-panel {
    overflow: hidden;
}

.history-auto-badge {
    display: inline-flex;
    min-height: 27px;
    align-items: center;
    gap: 7px;
    padding: 0 10px;
    border: 1px solid #b9dce0;
    border-radius: 99px;
    background: #eaf7f8;
    color: var(--brand-dark);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.history-auto-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brand-bright);
    box-shadow: 0 0 0 4px rgba(0, 147, 167, 0.1);
}

.history-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    margin-bottom: 22px;
}

.history-summary-card {
    min-height: 92px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-soft);
}

.history-summary-card span,
.history-summary-card strong {
    display: block;
}

.history-summary-card span {
    color: var(--muted);
    font-size: 9px;
    font-weight: 750;
}

.history-summary-card strong {
    margin-top: 9px;
    color: var(--ink);
    font-size: 25px;
    line-height: 1;
    letter-spacing: -0.04em;
}

.history-summary-wide {
    grid-column: 1 / -1;
    min-height: 68px;
}

.history-summary-wide strong {
    font-size: 15px;
    letter-spacing: -0.02em;
}

.history-table {
    min-width: 680px;
}

.history-table th:first-child,
.history-table td:first-child {
    min-width: 220px;
}

.duration-badge {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: 0 9px;
    border-radius: 9px;
    background: #fff5df;
    color: #8a641d;
    font-size: 9px;
    font-weight: 850;
}

.employee-table {
    min-width: 760px;
}

.facility-table {
    min-width: 830px;
}

.employee-table th:first-child,
.employee-table td:first-child {
    min-width: 220px;
}

.employee-name,
.employee-address,
.employee-hire-date,
.facility-name,
.facility-notes,
.facility-address {
    display: block;
}

.employee-name,
.facility-name {
    color: var(--ink);
    font-weight: 750;
}

.employee-address,
.facility-notes,
.facility-address {
    max-width: 280px;
    margin-top: 4px;
    overflow: hidden;
    color: var(--muted);
    font-size: 9px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.facility-address {
    color: var(--brand);
}

.employee-hire-date {
    margin-top: 5px;
    color: var(--brand);
    font-size: 9px;
    font-weight: 750;
}

.blood-badge {
    display: inline-grid;
    min-width: 34px;
    min-height: 29px;
    place-items: center;
    padding: 0 8px;
    border: 1px solid #efc9bf;
    border-radius: 9px;
    background: #fff2ee;
    color: #9a3f2b;
    font-size: 10px;
    font-weight: 850;
}

.staff-count {
    display: inline-flex;
    min-height: 29px;
    align-items: baseline;
    gap: 5px;
    padding: 0 9px;
    border: 1px solid #d8d9d1;
    border-radius: 9px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 8px;
    font-weight: 750;
}

.staff-count strong {
    color: var(--brand-dark);
    font-size: 13px;
}

.row-actions {
    width: 150px;
    text-align: right;
    white-space: nowrap;
}

.row-actions form {
    display: inline-block;
    margin-left: 5px;
}

.selected-row {
    background: #eaf7f8;
    box-shadow: inset 3px 0 0 var(--brand);
}

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

.two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.choice-group {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-soft);
}

.choice-group legend {
    padding: 0 7px;
    color: var(--ink-soft);
    font-size: 10px;
    font-weight: 800;
}

.choice {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: start;
    gap: 9px;
    padding: 9px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: var(--ink-soft);
    font-size: 10px;
    font-weight: 550;
    cursor: pointer;
}

.choice:hover {
    border-color: var(--line);
    background: #ffffff;
}

.choice input {
    width: auto;
    min-height: auto;
    margin: 2px 0 0;
    accent-color: var(--brand);
}

.code-input {
    width: 76px;
    min-width: 76px;
    min-height: 36px;
    margin: auto;
    padding: 4px 8px;
    text-align: center;
    text-transform: uppercase;
    font-weight: 850;
}

.has-absence {
    background: #fffaf1 !important;
}

.absence-badge {
    display: block;
    width: max-content;
    max-width: 82px;
    margin: 5px auto 0;
    padding: 3px 6px;
    overflow: hidden;
    border-radius: 6px;
    background: #fff0d3;
    color: #805a15;
    font-size: 7px;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.absence-badge.info {
    background: #e4f6f8;
    color: var(--brand-dark);
}

.absence-badge.critical {
    background: #ffebe6;
    color: #a33d28;
}

.assignment-warning {
    display: block;
    max-width: 150px;
    margin: 5px auto 0;
    color: #805a15;
    font-size: 7px;
    line-height: 1.3;
}

.assignment-warning.info {
    color: var(--brand-dark);
}

.assignment-warning.critical {
    color: #a33d28;
}

.edit-form {
    padding-bottom: 0;
}

.edit-form .form-actions {
    position: sticky;
    left: 0;
    bottom: 0;
    z-index: 8;
    padding: 14px;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
}

.empty-state {
    padding: 42px 18px;
    color: var(--muted);
    text-align: center;
}

.empty-state strong {
    display: block;
    margin-bottom: 4px;
    color: var(--ink);
}

.error-box {
    overflow-x: auto;
    padding: 14px;
    border-radius: 11px;
    background: var(--danger-soft);
    color: #8c3925;
}

.error-state {
    max-width: 760px;
    margin: 8vh auto 0;
    padding: clamp(24px, 5vw, 48px);
}

.error-state p:not(.eyebrow) {
    color: var(--muted);
}

.auth-body {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 28px;
    background:
        radial-gradient(circle at 12% 10%, rgba(0, 147, 167, 0.16), transparent 30rem),
        radial-gradient(circle at 88% 88%, rgba(0, 147, 167, 0.17), transparent 28rem),
        var(--canvas);
}

.auth-shell {
    width: min(1040px, 100%);
}

.login-card {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    min-height: 620px;
    overflow: hidden;
    border: 1px solid rgba(207, 210, 202, 0.9);
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 30px 80px rgba(24, 43, 38, 0.16);
}

.login-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: clamp(34px, 6vw, 68px);
    background:
        radial-gradient(circle at 78% 12%, rgba(20, 181, 198, 0.23), transparent 18rem),
        linear-gradient(145deg, var(--brand-dark), var(--brand-deep));
    color: #ffffff;
}

.login-visual::after {
    content: "";
    position: absolute;
    right: -80px;
    bottom: -80px;
    width: 300px;
    height: 300px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    box-shadow: 0 0 0 50px rgba(255, 255, 255, 0.025), 0 0 0 110px rgba(255, 255, 255, 0.018);
}

.login-brand-lockup {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 18px;
}

.login-logo-panel {
    display: grid;
    width: 112px;
    height: 114px;
    flex: 0 0 112px;
    place-items: center;
    padding: 9px;
    border: 1px solid rgba(255, 255, 255, 0.54);
    border-radius: 24px 24px 9px 24px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 38px rgba(2, 22, 19, 0.26), inset 0 0 0 1px rgba(0, 107, 122, 0.05);
}

.login-logo-panel img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.login-brand-copy {
    display: grid;
    gap: 7px;
}

.login-brand-copy strong {
    color: #ffffff;
    font-size: 14px;
    font-weight: 850;
    letter-spacing: 0.03em;
}

.login-brand-copy small {
    color: #8bdde5;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.login-visual .eyebrow {
    color: #8bdde5;
}

.login-visual h1 {
    max-width: 520px;
    color: #ffffff;
    font-size: clamp(38px, 5vw, 60px);
}

.login-visual p:not(.eyebrow) {
    max-width: 470px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
}

.login-visual > small {
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, 0.42);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    padding: clamp(34px, 5vw, 60px);
}

.login-form h2 {
    font-size: 28px;
}

.login-form > div > p:not(.eyebrow) {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.login-form .button {
    width: 100%;
}

.login-security-note {
    color: var(--muted);
    font-size: 8px;
    text-align: center;
}

.account-layout {
    grid-template-columns: minmax(320px, 400px) minmax(0, 1fr);
    min-width: 0;
}

.account-layout > * {
    min-width: 0;
}

.integration-settings-panel {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
    scroll-margin-top: 92px;
    background:
        radial-gradient(circle at 92% 8%, rgba(0, 147, 167, 0.1), transparent 28%),
        var(--panel);
}

.integration-settings-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.integration-settings-header h2 {
    margin: 3px 0 6px;
}

.integration-settings-header p:not(.eyebrow) {
    margin: 0;
    color: var(--muted);
    font-size: 10px;
}

.integration-status {
    display: flex;
    min-width: 235px;
    align-items: center;
    gap: 11px;
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.82);
}

.integration-status > i {
    width: 10px;
    height: 10px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--muted);
    box-shadow: 0 0 0 6px rgba(104, 119, 115, 0.1);
}

.integration-status strong,
.integration-status small {
    display: block;
}

.integration-status strong {
    color: var(--ink);
    font-size: 10px;
}

.integration-status small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 8px;
}

.integration-status.state-success > i {
    background: var(--success);
    box-shadow: 0 0 0 6px rgba(23, 149, 127, 0.12);
}

.integration-status.state-failed > i {
    background: var(--danger);
    box-shadow: 0 0 0 6px rgba(183, 79, 56, 0.12);
}

.integration-status.state-pending > i,
.integration-status.state-not_tested > i {
    background: var(--warning);
    box-shadow: 0 0 0 6px rgba(218, 165, 56, 0.12);
}

.integration-test-message {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 9px;
}

.integration-test-message.state-success {
    border-color: #b8ddd5;
    background: #eff9f6;
    color: #0d6b5c;
}

.integration-test-message.state-failed {
    border-color: #edc7bb;
    background: #fff6f2;
    color: #9f432f;
}

.integration-settings-form {
    display: grid;
    gap: 18px;
}

.integration-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.integration-fields .wide-field {
    grid-column: 1 / -1;
}

.integration-fields label {
    align-content: start;
}

.integration-fields label small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 8px;
    font-weight: 500;
}

.password-reveal {
    justify-self: start;
    min-height: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--brand-dark);
    font-size: 9px;
    font-weight: 750;
    cursor: pointer;
}

.password-reveal:hover {
    text-decoration: underline;
}

.password-reveal:focus-visible {
    border-radius: 4px;
    outline: 2px solid var(--brand-bright);
    outline-offset: 2px;
}

.integration-form-note {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    padding: 13px 15px;
    border-left: 3px solid var(--brand-bright);
    border-radius: 0 12px 12px 0;
    background: #edf8fa;
    color: var(--muted);
    font-size: 9px;
}

.integration-form-note strong {
    color: var(--brand-dark);
}

.integration-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.activity-table {
    min-width: 660px;
}

.security-warning {
    padding: 12px;
    border: 1px solid #e9c98c;
    border-radius: 11px;
    background: #fff5df;
    color: #7f5b17;
    font-size: 10px;
    font-weight: 700;
}

.print-toolbar {
    margin-bottom: 16px;
}

.print-sheet {
    max-width: 1050px;
    margin: 0 auto;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #ffffff;
    box-shadow: var(--shadow-md);
}

.print-header {
    text-align: center;
}

.print-header h1 {
    font-size: 19px;
}

.print-header h2 {
    margin-top: 4px;
    font-size: 15px;
}

.print-meta,
.print-footer,
.print-revision {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 16px;
}

.print-table,
.print-codes {
    margin-top: 16px;
    font-size: 11px;
}

.print-table th,
.print-table td,
.print-codes th,
.print-codes td {
    padding: 4px 6px;
}

.print-note {
    margin-top: 16px;
    font-size: 11px;
}

.print-footer div {
    min-width: 180px;
    text-align: center;
}

.print-footer span,
.print-footer small {
    display: block;
    margin-top: 8px;
}

.print-revision {
    color: var(--muted);
    font-size: 10px;
}

.live-duty-page {
    display: grid;
    gap: 18px;
}

.live-duty-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(250px, 0.5fr);
    min-height: 310px;
    overflow: hidden;
    border-radius: 27px;
    color: #ffffff;
    background:
        radial-gradient(circle at 74% 12%, rgba(0, 173, 190, 0.2), transparent 20rem),
        linear-gradient(130deg, #003d46 0%, #005866 56%, #004a55 100%);
    box-shadow: 0 24px 65px rgba(8, 45, 40, 0.2);
}

.live-duty-hero::before,
.live-duty-hero::after {
    position: absolute;
    content: "";
    pointer-events: none;
}

.live-duty-hero::before {
    top: -54px;
    right: 19%;
    width: 170px;
    height: 170px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 50%;
    box-shadow: 0 0 0 42px rgba(255, 255, 255, 0.025), 0 0 0 84px rgba(255, 255, 255, 0.018);
}

.live-duty-hero::after {
    right: 31%;
    bottom: 28px;
    width: 76px;
    height: 8px;
    border-radius: 99px;
    background: var(--sun);
    transform: rotate(-38deg);
    opacity: 0.8;
}

.live-duty-copy {
    position: relative;
    z-index: 1;
    display: flex;
    max-width: 760px;
    flex-direction: column;
    justify-content: center;
    padding: 44px 46px;
}

.live-kicker {
    display: inline-flex;
    width: max-content;
    align-items: center;
    gap: 8px;
    margin-bottom: 26px;
    padding: 7px 11px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.82);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
}

.live-kicker i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #31c0cf;
    box-shadow: 0 0 0 5px rgba(49, 192, 207, 0.14);
    animation: live-pulse 1.8s ease-out infinite;
}

@keyframes live-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(49, 192, 207, 0.13); }
    50% { box-shadow: 0 0 0 9px rgba(49, 192, 207, 0.03); }
}

.live-duty-copy .eyebrow {
    color: #84d4dd;
}

.live-duty-copy h1 {
    max-width: 680px;
    margin-top: 7px;
    color: #ffffff;
    font-size: clamp(36px, 4.2vw, 62px);
    line-height: 0.98;
    letter-spacing: -0.065em;
}

.live-duty-copy > p:not(.eyebrow) {
    max-width: 670px;
    margin: 20px 0 0;
    color: rgba(255, 255, 255, 0.64);
    font-size: 13px;
}

.live-duty-meta {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 24px;
}

.live-duty-meta span,
.live-duty-meta strong {
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 8px;
    letter-spacing: 0.03em;
}

.live-duty-meta span {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.66);
}

.live-duty-meta strong {
    background: rgba(0, 147, 167, 0.18);
    color: #f3d9a8;
}

.live-clock-card {
    position: relative;
    z-index: 1;
    display: flex;
    min-width: 250px;
    flex-direction: column;
    justify-content: flex-end;
    margin: 18px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.055)),
        rgba(4, 29, 26, 0.34);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
}

.live-clock-card > span {
    color: #84d4dd;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.live-clock-card > strong {
    display: flex;
    align-items: baseline;
    margin-top: 10px;
    color: #ffffff;
    font-size: clamp(48px, 5vw, 72px);
    line-height: 0.9;
    letter-spacing: -0.08em;
}

.live-clock-card > strong small {
    color: var(--sun);
    font-size: 20px;
    letter-spacing: -0.02em;
}

.live-clock-card p {
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 12px;
    font-weight: 750;
}

.live-clock-card > small {
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.48);
    font-size: 8px;
}

.live-duty-stats {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-bottom: 0;
}

.live-duty-stats .metric > strong small {
    display: inline;
    margin: 0 0 0 5px;
    color: #aeb6b2;
    font-size: 18px;
    font-weight: 650;
    letter-spacing: -0.04em;
}

.live-duty-stats .metric-alert {
    border-color: rgba(183, 79, 56, 0.28);
    background: linear-gradient(145deg, #fff7f3, #ffffff 70%);
}

.live-duty-stats .metric-alert .metric-label i {
    background: var(--danger);
    box-shadow: 0 0 0 5px rgba(183, 79, 56, 0.1);
}

.live-duty-controls {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 18px;
}

.live-time-form,
.live-list-tools {
    display: flex;
    align-items: end;
    gap: 9px;
}

.live-time-form label {
    min-width: 146px;
}

.live-time-form input,
.live-list-tools input,
.live-list-tools select,
.live-time-form .button {
    min-height: 40px;
}

.live-list-tools {
    flex: 1 1 auto;
    justify-content: flex-end;
}

.live-search-field {
    width: min(270px, 100%);
}

.live-list-tools select {
    min-width: 176px;
}

.live-result-count {
    display: inline-flex;
    min-width: 72px;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 9px;
    font-weight: 750;
}

.live-period-notice {
    margin: 0;
}

.puantaj-connection,
.map-puantaj-status {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 13px;
    padding: 15px 18px;
    border: 1px solid #bddde1;
    border-radius: 15px;
    background: linear-gradient(135deg, #edf9fa, #ffffff 72%);
    box-shadow: var(--shadow-sm);
}

.puantaj-connection-icon,
.map-puantaj-status > i {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 11px;
    background: #dff3f5;
}

.puantaj-connection-icon i,
.map-puantaj-status > i::before {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-bright);
    box-shadow: 0 0 0 6px rgba(0, 147, 167, 0.1);
    content: "";
}

.puantaj-connection strong,
.map-puantaj-status strong {
    display: block;
    color: var(--brand-dark);
    font-size: 10px;
}

.puantaj-connection p,
.map-puantaj-status span {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 8px;
}

.puantaj-connection small,
.map-puantaj-status small {
    display: block;
    margin-top: 3px;
    color: #687773;
    font-size: 7px;
}

.puantaj-connection code {
    color: var(--brand-dark);
    font-size: inherit;
}

.puantaj-connection.state-error,
.map-puantaj-status.state-error {
    border-color: #ecc9bd;
    background: #fff7f3;
}

.puantaj-connection.state-error .puantaj-connection-icon i,
.map-puantaj-status.state-error > i::before {
    background: var(--danger);
    box-shadow: 0 0 0 6px rgba(183, 79, 56, 0.1);
}

.puantaj-connection.state-not_configured,
.map-puantaj-status.state-not_configured {
    border-color: #ead9b3;
    background: #fffaf0;
}

.live-duty-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 14px;
}

.live-facility-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-sm);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.live-facility-card:hover {
    border-color: #bfc8c1;
    box-shadow: 0 16px 42px rgba(27, 43, 39, 0.09);
    transform: translateY(-2px);
}

.live-facility-card.status-uncovered,
.live-facility-card.status-partial {
    border-color: rgba(183, 79, 56, 0.22);
}

.live-facility-header {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
    padding: 20px 20px 17px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(145deg, rgba(247, 249, 245, 0.9), rgba(255, 255, 255, 0.9));
}

.facility-sequence {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 12px;
    background: var(--brand-dark);
    color: #ffffff;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.05em;
}

.live-facility-header p {
    margin: 0 0 3px;
    color: var(--brand);
    font-size: 7px;
    font-weight: 850;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.live-facility-header h2 {
    font-size: 14px;
    line-height: 1.25;
}

.live-facility-header small {
    display: block;
    max-width: 480px;
    margin-top: 5px;
    overflow: hidden;
    color: var(--muted);
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.coverage-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 27px;
    padding: 0 9px;
    border-radius: 99px;
    background: var(--success-soft);
    color: var(--brand-dark);
    font-size: 8px;
    font-weight: 800;
    white-space: nowrap;
}

.coverage-status i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brand-bright);
}

.coverage-status.partial,
.coverage-status.uncovered {
    background: var(--danger-soft);
    color: #8e3e2d;
}

.coverage-status.partial i,
.coverage-status.uncovered i {
    background: var(--danger);
}

.live-shift-list {
    display: grid;
    gap: 10px;
    padding: 12px;
}

.live-shift {
    overflow: hidden;
    border: 1px solid #e3e5df;
    border-radius: 14px;
    background: #ffffff;
}

.live-shift.status-partial,
.live-shift.status-uncovered {
    border-color: #ecd3ca;
}

.live-shift-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 10px 12px;
    background: #fafaf7;
}

.shift-time-block {
    display: grid;
    min-width: 64px;
    grid-template-columns: 1fr;
    justify-items: center;
    color: var(--brand-dark);
    font-size: 9px;
    font-weight: 850;
    line-height: 1;
}

.shift-time-block i {
    width: 1px;
    height: 7px;
    margin: 2px 0;
    background: #b8c8c2;
}

.live-shift-header strong {
    display: block;
    font-size: 10px;
}

.live-shift-header small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 8px;
}

.live-code {
    display: grid;
    min-width: 34px;
    height: 34px;
    place-items: center;
    padding: 0 8px;
    border: 1px solid #b9dce0;
    border-radius: 10px;
    background: #eaf7f8;
    color: var(--brand-dark);
    font-size: 11px;
    font-weight: 900;
}

.live-person-list {
    display: grid;
    gap: 1px;
    border-top: 1px solid #eceee8;
    background: #eceee8;
}

.live-person {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 9px 12px;
    background: #ffffff;
}

.live-person.attendance-exited,
.live-person.attendance-no_movement,
.live-person.attendance-unknown {
    box-shadow: inset 3px 0 0 #d58a67;
}

.person-duty-actions {
    display: flex;
    max-width: 180px;
    align-items: flex-end;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
}

.person-duty-actions > small {
    margin: 0;
    color: var(--muted);
    font-size: 6px;
    text-align: right;
}

.attendance-badge,
.integration-badge {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: 99px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 7px;
    font-weight: 850;
    white-space: nowrap;
}

.attendance-badge.status-present,
.integration-badge.connected {
    border-color: #b7dcdf;
    background: var(--success-soft);
    color: var(--brand-dark);
}

.attendance-badge.status-exited,
.attendance-badge.status-no_movement,
.attendance-badge.status-unknown {
    border-color: #edcabc;
    background: var(--danger-soft);
    color: #94432f;
}

.attendance-badge.status-unmapped,
.attendance-badge.status-unavailable,
.attendance-badge.status-not_checked {
    border-color: #e7d7b4;
    background: #fff8e9;
    color: #805d1b;
}

.attendance-badge.status-not_expected {
    opacity: 0.62;
}

.person-avatar {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 11px;
    background: #e6f2f3;
    color: var(--brand-dark);
    font-size: 9px;
    font-weight: 900;
}

.live-person strong {
    display: block;
    font-size: 10px;
}

.live-person small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 7px;
}

.live-person small b {
    color: var(--brand);
}

.live-person.status-substitute {
    background: linear-gradient(90deg, #f0fafb, #ffffff 46%);
}

.live-person.status-substitute .person-avatar {
    background: var(--brand);
    color: #ffffff;
}

.live-person.status-absent {
    background: #fff9f6;
}

.live-person.status-absent .person-avatar {
    background: #f7dfd7;
    color: #983f2b;
}

.live-person.status-absent small b {
    color: var(--danger);
}

.person-phone {
    display: inline-flex;
    min-width: 38px;
    min-height: 30px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--brand);
    font-size: 8px;
    font-weight: 850;
}

.person-phone:hover {
    border-color: var(--brand-bright);
    background: var(--success-soft);
}

.coverage-alert {
    display: flex;
    min-height: 58px;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-top: 1px solid #ecd3ca;
    background: #fff8f5;
}

.coverage-alert strong {
    color: var(--danger);
    font-size: 9px;
    white-space: nowrap;
}

.coverage-alert span {
    color: #806c65;
    font-size: 8px;
}

.live-facility-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 20px 15px;
    border-top: 1px solid var(--line);
}

.live-facility-footer a {
    color: var(--muted);
    font-size: 8px;
    font-weight: 750;
}

.live-facility-footer a:first-child {
    color: var(--brand);
}

.live-facility-footer a:hover {
    color: var(--brand-dark);
}

.live-facility-footer a span {
    margin-left: 3px;
    font-size: 12px;
}

.live-duty-empty {
    min-height: 180px;
}

.live-duty-empty.is-hidden,
.live-facility-card.is-filtered {
    display: none;
}

.duty-map-page {
    display: grid;
    gap: 18px;
}

.duty-map-hero {
    position: relative;
    display: grid;
    min-height: 250px;
    overflow: hidden;
    grid-template-columns: minmax(0, 1.4fr) minmax(420px, 0.8fr);
    align-items: end;
    gap: 28px;
    padding: 38px 42px;
    border-radius: 24px;
    background:
        radial-gradient(circle at 82% 18%, rgba(209, 164, 73, 0.3), transparent 28%),
        linear-gradient(130deg, #005866 0%, #006f7e 52%, #003d46 100%);
    box-shadow: 0 20px 46px rgba(0, 75, 86, 0.18);
    color: #ffffff;
}

.duty-map-hero::before {
    position: absolute;
    top: -120px;
    right: -80px;
    width: 390px;
    height: 390px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    box-shadow: 0 0 0 58px rgba(255, 255, 255, 0.035), 0 0 0 116px rgba(255, 255, 255, 0.02);
    content: "";
}

.duty-map-intro,
.duty-map-summary {
    position: relative;
    z-index: 1;
}

.duty-map-intro .eyebrow {
    margin-top: 22px;
    color: #a8d8ca;
}

.duty-map-intro h1 {
    max-width: 700px;
    margin-top: 7px;
    color: #ffffff;
    font-size: clamp(36px, 4vw, 61px);
    letter-spacing: -0.045em;
    line-height: 0.98;
}

.duty-map-intro > p:last-child {
    max-width: 690px;
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    line-height: 1.65;
}

.duty-map-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
}

.map-puantaj-status {
    margin-top: 14px;
}

.duty-map-summary > div {
    min-height: 116px;
    padding: 20px;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.duty-map-summary > div:last-child {
    border-right: 0;
}

.duty-map-summary span {
    display: block;
    color: rgba(255, 255, 255, 0.64);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.duty-map-summary strong {
    display: block;
    margin-top: 13px;
    color: #ffffff;
    font-size: 35px;
    line-height: 1;
}

.duty-map-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 16px 20px;
}

.map-time-form {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.map-time-form label {
    display: grid;
    min-width: 155px;
    gap: 6px;
}

.map-time-form input {
    min-height: 44px;
    padding: 9px 12px;
}

.map-reference-time {
    display: grid;
    grid-template-columns: auto auto;
    align-items: center;
    gap: 2px 12px;
    padding-left: 20px;
    border-left: 1px solid var(--line);
    text-align: right;
}

.map-reference-time > span {
    align-self: end;
    color: var(--brand);
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.map-reference-time strong {
    grid-row: 1 / span 2;
    grid-column: 2;
    color: var(--ink);
    font-size: 31px;
    letter-spacing: -0.04em;
}

.map-reference-time small {
    color: var(--muted);
    font-size: 8px;
}

.duty-map-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 370px);
    align-items: stretch;
    gap: 18px;
}

.duty-map-panel {
    min-width: 0;
    overflow: hidden;
    padding: 0;
}

.map-panel-heading {
    min-height: 92px;
    margin: 0;
    padding: 22px 24px;
}

.duty-map-canvas {
    position: relative;
    z-index: 1;
    min-height: 660px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: #e8eee9;
}

.map-loading {
    position: absolute;
    inset: 0;
    z-index: 450;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #e7eee9, #f7f7f2);
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
}

.duty-map-canvas .leaflet-control-attribution {
    font-size: 8px;
}

.duty-map-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 20px;
    min-height: 56px;
    padding: 14px 24px;
    color: var(--muted);
    font-size: 8px;
    font-weight: 750;
}

.duty-map-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.duty-map-legend i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #87928d;
    box-shadow: 0 0 0 4px rgba(135, 146, 141, 0.12);
}

.duty-map-legend i.covered {
    background: #0093a7;
    box-shadow: 0 0 0 4px rgba(0, 147, 167, 0.14);
}

.duty-map-legend i.partial {
    background: #d7a23f;
    box-shadow: 0 0 0 4px rgba(215, 162, 63, 0.14);
}

.duty-map-legend i.uncovered {
    background: #d05d4d;
    box-shadow: 0 0 0 4px rgba(208, 93, 77, 0.13);
}

.map-directory-panel {
    display: flex;
    min-width: 0;
    max-height: 810px;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.map-directory-panel > .section-title {
    flex: 0 0 auto;
    margin: 0;
    padding: 22px;
    border-bottom: 1px solid var(--line);
}

.map-location-list {
    overflow-y: auto;
    overscroll-behavior: contain;
}

.map-location-item {
    display: grid;
    width: 100%;
    grid-template-columns: 35px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    padding: 16px 18px;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: #ffffff;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
    transition: background 160ms ease, box-shadow 160ms ease;
}

.map-location-item:hover,
.map-location-item.is-active {
    background: #eef7f8;
    box-shadow: inset 4px 0 0 var(--brand-bright);
}

.map-location-index {
    display: grid;
    width: 35px;
    height: 35px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--muted);
    font-size: 8px;
    font-weight: 850;
}

.map-location-copy {
    min-width: 0;
}

.map-location-copy strong,
.map-location-copy small,
.map-location-copy em {
    display: block;
}

.map-location-copy strong {
    font-size: 10px;
    line-height: 1.35;
}

.map-location-copy small {
    margin-top: 5px;
    color: var(--brand);
    font-size: 8px;
    font-weight: 750;
}

.map-location-copy em {
    overflow: hidden;
    margin-top: 5px;
    color: var(--muted);
    font-size: 8px;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.map-location-arrow {
    color: #a6afaa;
    font-size: 17px;
}

.map-location-item.status-uncovered .map-location-index {
    border-color: #edc6be;
    background: #fff5f2;
    color: var(--danger);
}

.map-location-item.status-partial .map-location-index {
    border-color: #ead5a6;
    background: #fff9eb;
    color: #9b6d18;
}

.duty-map-marker {
    border: 0;
    background: transparent;
}

.duty-map-marker > span {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    transform: rotate(-45deg);
    border: 3px solid #ffffff;
    border-radius: 50% 50% 50% 7px;
    background: #7f8c87;
    box-shadow: 0 8px 18px rgba(0, 61, 70, 0.24);
}

.duty-map-marker b {
    transform: rotate(45deg);
    color: #ffffff;
    font-size: 11px;
    line-height: 1;
}

.duty-map-marker.marker-covered > span {
    background: #00899c;
}

.duty-map-marker.marker-partial > span {
    background: #d19a32;
}

.duty-map-marker.marker-uncovered > span {
    background: #cb594a;
}

.duty-map-tooltip,
.duty-map-popup .leaflet-popup-content-wrapper {
    border: 0;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 15px 38px rgba(0, 61, 70, 0.2);
}

.duty-map-tooltip {
    padding: 0;
}

.duty-map-tooltip::before {
    border-top-color: #ffffff;
}

.duty-map-popup .leaflet-popup-content {
    margin: 0;
}

.map-tooltip-card {
    display: grid;
    min-width: 250px;
    max-width: 330px;
    gap: 9px;
    padding: 15px;
    color: var(--ink);
    white-space: normal;
}

.map-tooltip-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.map-tooltip-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--brand);
    font-size: 7px;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.map-tooltip-meta span::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #0093a7;
    content: "";
}

.map-tooltip-meta span.status-partial::before {
    background: #d7a23f;
}

.map-tooltip-meta span.status-uncovered::before {
    background: #d05d4d;
}

.map-tooltip-meta span.status-idle::before,
.map-tooltip-meta span.status-inactive::before {
    background: #87928d;
}

.map-tooltip-meta small {
    color: var(--muted);
    font-size: 7px;
}

.map-tooltip-card > strong {
    font-size: 13px;
    line-height: 1.3;
}

.map-tooltip-card > p {
    color: var(--muted);
    font-size: 8px;
    line-height: 1.45;
}

.map-tooltip-card > b {
    padding-top: 8px;
    border-top: 1px solid var(--line);
    color: var(--brand-dark);
    font-size: 9px;
}

.map-tooltip-card ul {
    display: grid;
    gap: 5px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.map-tooltip-card li {
    display: grid;
    gap: 1px;
    padding-left: 12px;
    position: relative;
    font-size: 9px;
    font-weight: 750;
}

.map-tooltip-card li::before {
    position: absolute;
    top: 5px;
    left: 1px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--brand-bright);
    content: "";
}

.map-tooltip-card li small {
    color: #9a6c19;
    font-size: 7px;
}

.map-tooltip-card li .map-attendance {
    color: var(--muted);
}

.map-tooltip-card li .map-attendance.status-present {
    color: var(--brand-dark);
}

.map-tooltip-card li .map-attendance.status-exited,
.map-tooltip-card li .map-attendance.status-no_movement,
.map-tooltip-card li .map-attendance.status-unknown {
    color: var(--danger);
}

.integration-fieldset {
    margin: 0;
    padding: 16px;
    border: 1px solid #c9dfe1;
    border-radius: 14px;
    background: linear-gradient(145deg, #f3fafb, #ffffff);
}

.integration-fieldset legend {
    padding: 0 7px;
    color: var(--brand-dark);
    font-size: 10px;
    font-weight: 850;
}

.integration-fieldset > p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 8px;
}

.map-tooltip-shifts {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.map-tooltip-shifts span {
    padding: 5px 7px;
    border-radius: 7px;
    background: #ebf4f5;
    color: var(--muted);
    font-size: 7px;
    font-weight: 750;
}

@media (max-width: 1080px) {
    :root {
        --sidebar-width: 238px;
    }

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

    .dashboard-hero {
        grid-template-columns: minmax(0, 1.2fr) minmax(210px, 0.5fr);
    }

    .facility-list {
        grid-template-columns: 1fr;
    }

    .facility-workspace.is-editing {
        grid-template-columns: 1fr;
        grid-template-areas:
            "form"
            "shifts"
            "list";
    }

    .facility-workspace.is-editing .facility-form {
        position: static;
    }

    .shift-manager-grid {
        grid-template-columns: repeat(2, minmax(250px, 1fr));
    }

    .export-strip {
        align-items: flex-start;
        flex-direction: column;
    }

    .live-duty-hero {
        grid-template-columns: minmax(0, 1.2fr) minmax(230px, 0.5fr);
    }

    .live-duty-copy {
        padding: 36px;
    }

    .live-duty-controls {
        align-items: stretch;
        flex-direction: column;
    }

    .live-list-tools {
        justify-content: flex-start;
    }

    .duty-map-hero {
        grid-template-columns: 1fr;
    }

    .duty-map-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .map-reference-time {
        padding-top: 14px;
        padding-left: 0;
        border-top: 1px solid var(--line);
        border-left: 0;
        text-align: left;
    }

    .duty-map-layout {
        grid-template-columns: 1fr;
    }

    .map-directory-panel {
        max-height: none;
    }

    .map-location-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .app-frame {
        display: block;
    }

    .sidebar {
        position: fixed;
        left: 0;
        width: min(290px, calc(100vw - 44px));
        transform: translateX(-105%);
        transition: transform 230ms cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    .nav-open .sidebar {
        transform: translateX(0);
    }

    .nav-backdrop {
        position: fixed;
        inset: 0;
        z-index: 40;
        border: 0;
        background: rgba(6, 26, 23, 0.48);
        backdrop-filter: blur(3px);
    }

    .nav-open .nav-backdrop {
        display: block;
    }

    .menu-toggle {
        display: grid;
        width: 40px;
        height: 40px;
        flex: 0 0 40px;
        place-content: center;
        gap: 4px;
        border: 1px solid var(--line);
        border-radius: 11px;
        background: #ffffff;
        cursor: pointer;
    }

    .menu-toggle span {
        width: 17px;
        height: 2px;
        border-radius: 2px;
        background: var(--brand-dark);
    }

    .shell {
        width: min(100% - 32px, 1460px);
        margin-top: 26px;
    }

    .split {
        grid-template-columns: 1fr;
    }

    .split > .form-panel {
        position: static;
    }

    .facility-workspace {
        grid-template-columns: 1fr;
        grid-template-areas:
            "form"
            "list";
    }

    .facility-workspace.is-editing {
        grid-template-areas:
            "form"
            "shifts"
            "list";
    }

    .facility-workspace .facility-form {
        position: static;
    }

    .employee-form {
        max-height: none;
        overflow: visible;
    }

    .leave-form {
        max-height: none;
        overflow: visible;
    }

    .report-form {
        position: static;
        max-height: none;
        overflow: visible;
    }

    .holiday-management-grid {
        grid-template-columns: 1fr;
    }

    .live-duty-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .integration-settings-header,
    .integration-test-message,
    .integration-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .integration-status {
        width: 100%;
        min-width: 0;
    }

    .integration-fields {
        grid-template-columns: 1fr;
    }

    .integration-fields .wide-field {
        grid-column: auto;
    }

    .integration-form-note {
        grid-template-columns: 1fr;
    }

    .integration-actions .button {
        width: 100%;
    }

    .workspace-header {
        min-height: 68px;
        padding: 10px 16px;
    }

    .workspace-heading p,
    .system-status,
    .admin-chip div {
        display: none;
    }

    .admin-chip {
        padding-left: 0;
        border-left: 0;
    }

    .admin-chip > span {
        width: 34px;
        height: 34px;
    }

    .shell {
        width: min(100% - 22px, 1460px);
        margin-top: 19px;
        margin-bottom: 42px;
    }

    .page-heading,
    .filters,
    .export-strip .actions {
        align-items: stretch;
        flex-direction: column;
    }

    .page-heading {
        margin-bottom: 18px;
    }

    h1 {
        font-size: 30px;
    }

    .actions,
    .page-heading > .button {
        width: 100%;
    }

    .actions .button,
    .page-heading > .button,
    .export-strip .button {
        flex: 1 1 auto;
    }

    .filters::before {
        align-self: flex-start;
    }

    .filters label {
        min-width: 0;
    }

    .dashboard-hero {
        display: block;
        min-height: 0;
    }

    .live-duty-hero {
        display: block;
        min-height: 0;
    }

    .live-duty-copy {
        padding: 28px 24px 22px;
    }

    .live-duty-copy h1 {
        font-size: 39px;
    }

    .live-duty-meta,
    .live-time-form,
    .live-list-tools {
        align-items: stretch;
        flex-direction: column;
    }

    .live-clock-card {
        min-height: 184px;
        margin: 0 12px 12px;
        padding: 22px;
    }

    .live-clock-card > strong {
        font-size: 54px;
    }

    .live-time-form label,
    .live-search-field,
    .live-list-tools select {
        width: 100%;
        min-width: 0;
    }

    .live-result-count {
        width: 100%;
    }

    .puantaj-connection,
    .map-puantaj-status {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .puantaj-connection form,
    .map-puantaj-status > small {
        grid-column: 2;
    }

    .live-facility-header {
        grid-template-columns: 36px minmax(0, 1fr);
        padding: 16px;
    }

    .facility-sequence {
        width: 36px;
        height: 36px;
    }

    .coverage-status {
        grid-column: 2;
        width: max-content;
    }

    .live-shift-list {
        padding: 8px;
    }

    .live-shift-header {
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 8px;
        padding: 9px;
    }

    .shift-time-block {
        min-width: 52px;
    }

    .live-facility-footer {
        align-items: flex-start;
        flex-direction: column;
        padding: 12px 16px;
    }

    .live-person {
        grid-template-columns: 36px minmax(0, 1fr);
    }

    .person-duty-actions {
        grid-column: 2;
        max-width: none;
        align-items: flex-start;
    }

    .person-duty-actions > small {
        text-align: left;
    }

    .duty-map-hero {
        min-height: 0;
        padding: 28px 22px;
    }

    .duty-map-intro h1 {
        font-size: 39px;
    }

    .duty-map-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: 22px;
    }

    .duty-map-summary > div {
        min-height: 96px;
        padding: 14px 11px;
    }

    .duty-map-summary span {
        font-size: 7px;
    }

    .duty-map-summary strong {
        font-size: 29px;
    }

    .map-time-form {
        align-items: stretch;
        flex-direction: column;
    }

    .map-time-form label {
        width: 100%;
        min-width: 0;
    }

    .map-reference-time {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .map-panel-heading {
        align-items: flex-start;
        flex-direction: column;
        padding: 18px;
    }

    .duty-map-canvas {
        min-height: 500px;
    }

    .duty-map-legend {
        align-items: flex-start;
        flex-direction: column;
        padding: 14px 18px;
    }

    .map-location-list {
        grid-template-columns: 1fr;
    }

    .hero-content {
        padding: 28px 24px;
    }

    .hero-content .actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .hero-summary {
        margin: 0 14px 14px;
        min-height: 150px;
    }

    .stats-grid,
    .two-cols {
        grid-template-columns: 1fr;
    }

    .history-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .history-summary-wide {
        grid-column: 1 / -1;
    }

    .leave-rule-grid {
        grid-template-columns: 1fr;
    }

    .leave-calculation {
        grid-template-columns: 1fr;
    }

    .leave-calculation > small {
        grid-column: auto;
    }

    .holiday-list {
        grid-template-columns: 1fr;
    }

    .shift-manager-grid,
    .facility-workspace.is-editing .shift-manager-grid {
        grid-template-columns: 1fr;
    }

    .metric {
        min-height: 116px;
    }

    .panel {
        padding: 17px;
    }

    .table-scroll {
        margin: 0 -17px -17px;
    }

    .table-scroll th:first-child,
    .table-scroll td:first-child {
        padding-left: 17px;
    }

    .table-scroll th:last-child,
    .table-scroll td:last-child {
        padding-right: 17px;
    }

    .section-title {
        align-items: flex-start;
    }

    .facility-row {
        grid-template-columns: 38px minmax(0, 1fr);
    }

    .facility-row::after {
        display: none;
    }

    .table-wrap {
        margin-right: -11px;
        margin-left: -11px;
        border-right: 0;
        border-left: 0;
        border-radius: 0;
    }

    th,
    td {
        padding: 11px 12px;
    }

    .compact-table {
        min-width: 620px;
    }

    .schedule-table th:nth-child(2),
    .schedule-table td:nth-child(2) {
        min-width: 205px;
    }

    .print-sheet {
        padding: 18px;
        border-radius: 0;
    }

    .auth-body {
        padding: 12px;
    }

    .login-card {
        display: block;
        min-height: 0;
        border-radius: 20px;
    }

    .login-visual {
        min-height: 300px;
        padding: 28px;
    }

    .login-visual h1 {
        font-size: 32px;
    }

    .login-visual > small {
        display: none;
    }

    .login-brand-lockup {
        gap: 12px;
    }

    .login-logo-panel {
        width: 76px;
        height: 77px;
        flex-basis: 76px;
        padding: 6px;
        border-radius: 18px 18px 7px 18px;
    }

    .login-brand-copy strong {
        font-size: 12px;
    }

    .login-brand-copy small {
        font-size: 7px;
    }

    .login-form {
        padding: 28px;
    }
}

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

@media print {
    body {
        background: #ffffff;
        font-family: Arial, Helvetica, sans-serif;
    }

    .sidebar,
    .workspace-header,
    .nav-backdrop,
    .print-toolbar,
    .notice {
        display: none !important;
    }

    .app-frame {
        display: block;
    }

    .shell {
        width: auto;
        margin: 0;
    }

    .print-sheet {
        max-width: none;
        border: 0;
        border-radius: 0;
        padding: 0;
        box-shadow: none;
    }

    .print-table th,
    .print-table td,
    .print-codes th,
    .print-codes td {
        border: 1px solid #111111;
        background: #ffffff;
        color: #000000;
    }

    @page {
        size: A4 landscape;
        margin: 8mm;
    }
}
