:root {
    --leaf: #95ab63;
    --leaf-dark: #495139;
    --forest: #10222b;
    --soft: #f6ffe0;
    --mint: #e2f0d6;
    --sage: #bdd684;
    --text: #263025;
    --muted: #66715a;
    --line: rgba(73, 81, 57, 0.18);
    --panel: rgba(255, 255, 255, 0.94);
    --surface: #ffffff;
    --surface-soft: rgba(255, 255, 255, 0.72);
    --focus: rgba(149, 171, 99, 0.36);
    --shadow: 0 18px 44px rgba(16, 34, 43, 0.1);
    --danger: #9c3d32;
    --warning: #9a6a1f;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at 12% 0, rgba(149, 171, 99, 0.24), transparent 28rem),
        linear-gradient(180deg, #f9fff0 0, #eef7df 34rem, #f7faef 100%);
}

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

a {
    color: inherit;
}

.app-shell {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 48px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
    padding: 18px 20px;
    border: 1px solid rgba(73, 81, 57, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 10px 30px rgba(16, 34, 43, 0.06);
    backdrop-filter: blur(14px);
}

.topbar h1,
.login-copy h2,
.panel h2 {
    margin: 0;
    color: var(--forest);
    letter-spacing: 0;
}

.topbar h1 {
    font-size: clamp(1.9rem, 3vw, 2.8rem);
    line-height: 1;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--leaf-dark);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
}

.logout-form {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--leaf-dark);
}

.user-pill {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 0 13px;
    border: 1px solid rgba(73, 81, 57, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--forest);
    font-weight: 800;
}

.notice {
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid rgba(149, 171, 99, 0.42);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(246, 255, 224, 0.88));
    color: var(--leaf-dark);
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(16, 34, 43, 0.06);
}

.login-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 420px);
    gap: 28px;
    align-items: stretch;
}

.login-copy {
    min-height: 540px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    padding: 42px;
    border-radius: 8px;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(16, 34, 43, 0.08), rgba(16, 34, 43, 0.86)),
        url("gallery/laden/laden-panorama-header.jpg") center / cover;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.login-copy h2 {
    max-width: 680px;
    color: #fff;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.02;
}

.login-copy p {
    max-width: 620px;
    font-size: 1.05rem;
    line-height: 1.6;
}

.facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 22px 0 0;
}

.facts div {
    padding: 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
}

.facts dt {
    font-weight: 700;
}

.facts dd {
    margin: 4px 0 0;
}

.panel,
.metric,
.person,
.shift-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.panel {
    padding: clamp(18px, 2.5vw, 26px);
}

.login-panel {
    align-self: start;
}

.login-panel h2,
.panel > h2 {
    margin-bottom: 16px;
}

.stack,
.form-grid {
    display: grid;
    gap: 14px;
}

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

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

label {
    display: grid;
    gap: 6px;
    color: var(--leaf-dark);
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid rgba(73, 81, 57, 0.24);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

input:hover,
select:hover,
textarea:hover {
    border-color: rgba(73, 81, 57, 0.38);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--leaf);
    box-shadow: 0 0 0 4px var(--focus);
}

textarea {
    resize: vertical;
}

.button,
.icon-button {
    min-height: 40px;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.button:hover,
.icon-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(16, 34, 43, 0.12);
}

.button:focus-visible,
.icon-button:focus-visible,
.admin-nav a:focus-visible,
.view-switch a:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.button-primary {
    padding: 0 18px;
    background: var(--forest);
    color: #fff;
}

.button-primary:hover {
    background: #183440;
}

.button-ghost {
    padding: 0 16px;
    border: 1px solid rgba(73, 81, 57, 0.28);
    background: rgba(255, 255, 255, 0.76);
    color: var(--forest);
}

.button-danger {
    padding: 0 14px;
    background: rgba(156, 61, 50, 0.12);
    color: var(--danger);
}

.icon-button {
    width: 40px;
    background: var(--leaf);
    color: var(--forest);
}

.table-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.action-form {
    margin: 0;
}

.action-icon {
    position: relative;
    flex: 0 0 40px;
    font-size: 1rem;
}

.action-delete {
    background: rgba(156, 61, 50, 0.12);
    color: var(--danger);
}

.action-icon::after {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    z-index: 30;
    width: max-content;
    max-width: 180px;
    padding: 7px 9px;
    border-radius: 7px;
    background: var(--forest);
    color: #fff;
    content: attr(data-tooltip);
    font-size: 0.78rem;
    line-height: 1.2;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.action-icon:hover::after,
.action-icon:focus-visible::after {
    opacity: 1;
    transform: translate(-50%, 0);
}

.hint,
.empty {
    color: var(--muted);
}

.dashboard {
    display: grid;
    gap: 18px;
}

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    position: sticky;
    top: 10px;
    z-index: 10;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 12px 28px rgba(16, 34, 43, 0.08);
    backdrop-filter: blur(14px);
}

.admin-nav a {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    border-radius: 8px;
    color: var(--forest);
    font-weight: 800;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.admin-nav a:hover {
    background: rgba(149, 171, 99, 0.16);
    transform: translateY(-1px);
}

.admin-nav a.active {
    background: var(--forest);
    color: #fff;
}

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

.metric {
    position: relative;
    overflow: hidden;
    padding: 18px;
    background: linear-gradient(180deg, #fff, rgba(246, 255, 224, 0.58));
}

.metric-action {
    display: grid;
    align-content: start;
    gap: 8px;
}

.metric-action .button {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 38px;
    padding: 0 12px;
    font-size: 0.9rem;
}

.metric::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: var(--leaf);
}

.metric span {
    color: var(--forest);
    font-size: clamp(2rem, 3vw, 2.6rem);
    font-weight: 800;
    line-height: 1;
}

.metric p {
    margin: 4px 0 0;
    color: var(--muted);
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.section-head p {
    margin: 6px 0 0;
    color: var(--muted);
}

.week-nav,
.button-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.calendar-tools {
    display: grid;
    gap: 10px;
    justify-items: end;
}

.view-switch {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

.view-switch a {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border-radius: 7px;
    color: var(--forest);
    font-weight: 800;
    text-decoration: none;
}

.view-switch a.active {
    background: var(--forest);
    color: #fff;
}

.view-switch a:not(.active):hover {
    background: rgba(149, 171, 99, 0.18);
    color: var(--forest);
}

.calendar-board {
    display: grid;
    grid-template-columns: repeat(7, minmax(128px, 1fr));
    gap: 10px;
    margin: 18px 0 22px;
}

.calendar-day-view {
    grid-template-columns: minmax(0, 1fr);
}

.calendar-day {
    min-height: 190px;
    display: grid;
    grid-template-rows: auto 1fr;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.82);
    overflow: visible;
    box-shadow: 0 10px 22px rgba(16, 34, 43, 0.05);
}

.calendar-today {
    border-color: rgba(76, 99, 19, 0.48);
    box-shadow: inset 0 0 0 2px rgba(149, 171, 99, 0.3), 0 12px 26px rgba(16, 34, 43, 0.08);
}

.calendar-day-view .calendar-day {
    min-height: 320px;
}

.calendar-month-view .calendar-day {
    min-height: 148px;
}

.calendar-muted-day {
    opacity: 0.58;
    background: rgba(255, 255, 255, 0.52);
}

.calendar-day header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 11px 12px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(246, 255, 224, 0.82), rgba(255, 255, 255, 0.72));
    color: var(--leaf-dark);
    font-weight: 800;
}

.calendar-day header strong {
    color: var(--forest);
}

.calendar-shifts {
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 11px;
}

.calendar-chip.status,
.calendar-chip.absence {
    position: relative;
    display: grid;
    gap: 2px;
    width: 100%;
    min-height: 72px;
    padding: 10px;
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.56);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.calendar-chip.status {
    cursor: pointer;
}

.calendar-chip.absence {
    cursor: help;
}

.calendar-chip.status:hover,
.calendar-chip.status:focus,
.calendar-chip.absence:hover,
.calendar-chip.absence:focus {
    transform: translateY(-1px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72), 0 10px 20px rgba(16, 34, 43, 0.12);
}

.calendar-chip strong,
.calendar-chip span,
.calendar-chip em {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-chip em {
    color: var(--muted);
    font-style: normal;
    font-weight: 700;
}

.calendar-empty {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.shift-editor {
    margin-top: 18px;
}

.editor-delete-form {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
}

.tooltip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    z-index: 20;
    width: max-content;
    max-width: 260px;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--forest);
    color: #fff;
    box-shadow: 0 14px 30px rgba(16, 34, 43, 0.24);
    line-height: 1.45;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.calendar-chip:hover .tooltip,
.calendar-chip:focus .tooltip {
    opacity: 1;
    transform: translate(-50%, 0);
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 980px;
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

th {
    color: var(--leaf-dark);
    font-size: 0.82rem;
    text-transform: uppercase;
    background: rgba(246, 255, 224, 0.72);
    white-space: nowrap;
}

tbody tr {
    transition: background 0.15s ease;
}

tbody tr:hover {
    background: rgba(246, 255, 224, 0.46);
}

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

.inline-form {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) 40px;
    gap: 8px;
    align-items: center;
}

.status {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
    white-space: nowrap;
}

.status-open {
    background: rgba(154, 106, 31, 0.13);
    color: var(--warning);
}

.status-planned {
    background: rgba(149, 171, 99, 0.24);
    color: var(--leaf-dark);
}

.status-confirmed {
    background: rgba(76, 99, 19, 0.16);
    color: #4c6313;
}

.status-declined {
    background: rgba(156, 61, 50, 0.14);
    color: var(--danger);
}

.status-role {
    background: rgba(16, 34, 43, 0.1);
    color: var(--forest);
}

.absence-vacation {
    border: 1px solid rgba(42, 104, 133, 0.2);
    background: rgba(42, 104, 133, 0.12);
    color: #23536a;
}

.absence-free {
    border: 1px solid rgba(126, 87, 38, 0.2);
    background: rgba(126, 87, 38, 0.12);
    color: #6d4a21;
}

.absence-sick,
.absence-childsick {
    border: 1px solid rgba(156, 61, 50, 0.22);
    background: rgba(156, 61, 50, 0.13);
    color: var(--danger);
}

.absence-appointment {
    border: 1px solid rgba(75, 94, 140, 0.22);
    background: rgba(75, 94, 140, 0.12);
    color: #34456d;
}

.absence-training {
    border: 1px solid rgba(77, 124, 102, 0.22);
    background: rgba(77, 124, 102, 0.14);
    color: #315b49;
}

.absence-specialleave,
.absence-parentalleave,
.absence-maternityleave {
    border: 1px solid rgba(112, 85, 151, 0.22);
    background: rgba(112, 85, 151, 0.12);
    color: #564078;
}

.absence-publicholiday,
.absence-unpaid,
.absence-other {
    border: 1px solid rgba(73, 81, 57, 0.22);
    background: rgba(73, 81, 57, 0.1);
    color: var(--leaf-dark);
}

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

.admin-form-grid {
    grid-template-columns: minmax(0, 720px);
}

.absence-layout {
    align-items: start;
}

.weekday-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 12px;
    border: 1px solid rgba(73, 81, 57, 0.24);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.56);
}

.weekday-picker legend {
    padding: 0 6px;
    color: var(--leaf-dark);
    font-weight: 800;
}

.weekday-picker label {
    min-height: 34px;
    display: inline-flex;
    grid-template-columns: none;
    align-items: center;
    gap: 7px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
}

.weekday-picker input {
    width: auto;
    min-height: auto;
}

.people-list,
.absence-list,
.shift-cards {
    display: grid;
    gap: 12px;
}

.person-card {
    display: grid;
    gap: 12px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.person,
.absence-item {
    display: grid;
    gap: 14px;
    align-items: center;
    padding: 15px;
}

.person {
    grid-template-columns: minmax(0, 1fr) minmax(110px, auto) minmax(96px, auto) auto;
}

.person-edit {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.person-delete {
    display: flex;
    justify-content: flex-end;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.person-delete-hint {
    margin: 0;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.time-tracking-setting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.time-tracking-setting .check-label {
    margin-top: 0;
}

.time-tracking-state {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
}

.time-tracking-state.enabled {
    color: #276237;
    background: #e3f3e6;
}

.time-tracking-state.disabled {
    color: #6b7280;
    background: #edf0f3;
}

.admin-own-clock {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: linear-gradient(135deg, #fff, rgba(246, 255, 224, 0.88));
}

.admin-own-clock .live-clock {
    font-size: clamp(2.4rem, 6vw, 4.5rem);
    font-weight: 300;
    font-variant-numeric: tabular-nums;
}

.admin-own-clock p:last-child {
    margin-bottom: 0;
}

.admin-clock-form {
    display: grid;
    min-width: min(100%, 320px);
    gap: 10px;
}

.admin-clock-disabled p {
    margin: 0;
}

.admin-clock-disabled a {
    color: var(--leaf-dark);
    font-weight: 800;
}

.check-label {
    min-height: 42px;
    display: inline-flex;
    grid-template-columns: none;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
}

.check-label input {
    width: auto;
    min-height: auto;
}

.absence-item {
    grid-template-columns: minmax(0, 1fr) auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.74);
}

.absence-edit-item {
    grid-template-columns: minmax(0, 1fr);
}

.absence-edit-form {
    width: 100%;
}

.absence-delete-form {
    display: flex;
    justify-content: flex-end;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.weekly-action-layout {
    align-items: start;
}

.weekly-action-preview img,
.weekly-action-summary img {
    display: block;
    width: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.weekly-action-preview img {
    aspect-ratio: 4 / 3;
    margin-bottom: 16px;
}

.weekly-action-preview h3,
.weekly-action-item h3 {
    margin: 0;
    color: var(--forest);
    font-size: clamp(1.35rem, 2vw, 1.9rem);
    line-height: 1.1;
}

.weekly-action-preview strong,
.weekly-action-item strong {
    display: block;
    margin-top: 8px;
    color: var(--leaf-dark);
}

.weekly-action-preview p:not(.eyebrow) {
    color: var(--muted);
}

.weekly-action-list {
    display: grid;
    gap: 14px;
}

.weekly-action-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
}

.weekly-action-summary {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    margin-bottom: 14px;
}

.weekly-action-summary img {
    aspect-ratio: 4 / 3;
}

.weekly-action-item label {
    margin-top: 12px;
}

.weekly-action-item textarea[readonly] {
    min-height: 120px;
    background: rgba(246, 255, 224, 0.4);
    font-family: Arial, Helvetica, sans-serif;
}

.person strong,
.person span,
.absence-item strong,
.absence-item span {
    display: block;
}

.person div span,
.absence-item div span {
    margin-top: 4px;
    color: var(--muted);
}

.employee-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(246, 255, 224, 0.9)),
        linear-gradient(90deg, var(--sage), transparent);
}

.employee-hero p {
    margin-bottom: 0;
}

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

.done-table {
    min-width: 720px;
}

.shift-cards {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.shift-cards.compact {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.shift-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(180deg, #fff, rgba(246, 255, 224, 0.48));
}

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

.shift-card div span,
.shift-card > span:not(.status) {
    margin-top: 4px;
    color: var(--muted);
}

.shift-card p {
    margin: 0;
    color: var(--leaf-dark);
}

.time-clock-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
    align-items: center;
    gap: 28px;
    background:
        radial-gradient(circle at 12% 20%, rgba(163, 198, 57, 0.2), transparent 34%),
        linear-gradient(135deg, #fff, rgba(246, 255, 224, 0.88));
}

.time-clock-copy h2 {
    margin: 4px 0 0;
    color: var(--forest);
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.05em;
}

.time-clock-copy p:last-child {
    margin-bottom: 0;
    color: var(--muted);
}

.time-clock-action {
    display: grid;
    justify-items: start;
    gap: 14px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.82);
}

.elapsed-time {
    color: var(--forest);
    font-size: 2rem;
    font-variant-numeric: tabular-nums;
}

.clock-out-form {
    display: grid;
    width: 100%;
    gap: 10px;
}

.clock-button {
    min-width: 180px;
    min-height: 48px;
    font-size: 1rem;
}

.time-metrics .metric span {
    font-size: clamp(1.25rem, 2vw, 1.75rem);
}

.metric-positive {
    border-color: rgba(78, 130, 42, 0.35);
}

.metric-positive > span {
    color: var(--leaf-dark);
}

.metric-negative {
    border-color: rgba(170, 67, 52, 0.3);
}

.metric-negative > span {
    color: #9b3f31;
}

.employee-time-grid,
.time-admin-layout {
    align-items: start;
}

.week-bars,
.today-time-list,
.time-status-list {
    display: grid;
    gap: 12px;
}

.week-bar-row {
    display: grid;
    grid-template-columns: 28px minmax(80px, 1fr) 78px;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.week-bar-row strong {
    text-align: right;
    font-size: 0.82rem;
}

.week-bar-track {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(29, 70, 32, 0.1);
}

.week-bar-track i {
    display: block;
    height: 100%;
    min-width: 2px;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--leaf), var(--lime));
}

.today-time-list > div,
.time-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.today-time-list > div:last-child,
.time-status-row:last-child {
    border-bottom: 0;
}

.time-status-row div span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.85rem;
}

.time-filter,
.month-filter {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 12px;
}

.time-filter {
    margin-top: 18px;
}

.time-filter label {
    min-width: 200px;
}

.month-filter input {
    min-width: 155px;
}

.button-small {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 0.78rem;
}

@media (max-width: 880px) {
    .login-layout,
    .grid-two,
    .metric-grid,
    .calendar-board {
        grid-template-columns: 1fr;
    }

    .time-clock-panel {
        grid-template-columns: 1fr;
    }

    .login-copy {
        min-height: 420px;
        padding: 28px;
    }

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

    .topbar,
    .section-head,
    .employee-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .calendar-tools {
        justify-items: stretch;
    }

    .view-switch,
    .view-switch a {
        width: 100%;
    }

    .download-actions {
        justify-content: flex-start;
    }

    .time-filter,
    .month-filter {
        align-items: stretch;
        flex-direction: column;
    }

    .time-filter label,
    .time-filter .button,
    .month-filter input,
    .month-filter .button {
        width: 100%;
    }
}

@media (max-width: 620px) {
    .app-shell {
        width: min(100% - 20px, 1180px);
        padding-top: 12px;
    }

    .panel {
        padding: 16px;
    }

    .form-grid,
    .person,
    .person-edit,
    .absence-item,
    .absence-edit-form,
    .weekly-action-item,
    .weekly-action-summary {
        grid-template-columns: 1fr;
    }

    .check-label {
        margin-top: 0;
    }

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

    .admin-own-clock {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-clock-form {
        min-width: 0;
    }
}

/* Mitarbeiter-Zeiterfassung: kompakte App-Ansicht */
.employee-view {
    background: #f5f7f8;
}

.employee-view .dashboard {
    width: min(100%, 1080px);
    margin: 0 auto;
    gap: 22px;
}

.employee-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 8px 2px 4px;
    background: transparent;
}

.employee-mobile-header h2 {
    margin: 0;
    color: #111827;
    font-size: clamp(1.55rem, 4vw, 2.15rem);
}

.employee-mobile-header p {
    margin: 5px 0 0;
    color: #64748b;
}

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

.employee-stat-card {
    min-height: 142px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    padding: 18px;
    border: 1px solid #dce2e8;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.08);
}

.stat-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 1.15rem;
}

.stat-icon-blue { color: #2563eb; background: #eaf0ff; }
.stat-icon-green { color: #0f9f7a; background: #e5f8f3; }
.stat-icon-purple { color: #7c3aed; background: #f1eafe; }
.stat-icon-yellow { color: #d89a16; background: #fff8e7; }

.employee-stat-card strong {
    margin-top: 14px;
    color: #050b18;
    font-size: 1.65rem;
    line-height: 1;
}

.employee-stat-card strong small {
    color: #526077;
    font-size: 0.78rem;
    font-weight: 400;
}

.employee-stat-card p {
    margin: 5px 0 0;
    color: #596579;
    font-size: 0.88rem;
}

.employee-view .time-clock-panel {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 34px 22px;
    border-color: #dce2e8;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.08);
    text-align: center;
}

.clock-date-label {
    margin: 0 0 12px;
    color: #526077;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.employee-view .time-clock-copy h2 {
    margin: 0;
    color: #050b18;
    font-size: clamp(3.5rem, 10vw, 5.8rem);
    font-weight: 300;
    letter-spacing: -0.065em;
}

.employee-view .time-clock-action {
    width: min(100%, 420px);
    justify-items: center;
    padding: 0;
    border: 0;
    background: transparent;
}

.employee-view .clock-button {
    min-width: 230px;
    min-height: 52px;
    padding: 0 28px;
    border-radius: 999px;
    box-shadow: 0 8px 18px rgba(16, 34, 43, 0.2);
}

.employee-time-stack {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.employee-time-stack .panel {
    min-width: 0;
    border-color: #dce2e8;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.08);
}

.employee-today-card {
    grid-column: 1 / -1;
}

.employee-card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 24px;
}

.employee-card-heading h2 {
    font-size: 1rem;
}

.employee-card-heading > strong {
    color: var(--leaf-dark);
    font-size: 0.95rem;
}

.mobile-week-chart {
    height: 230px;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
    padding: 12px 8px 0;
    background: repeating-linear-gradient(to bottom, transparent 0, transparent 49px, #e7ebef 50px);
}

.mobile-week-column {
    min-width: 0;
    display: grid;
    grid-template-rows: 1fr 24px;
    gap: 8px;
    text-align: center;
}

.mobile-week-bar {
    display: flex;
    align-items: end;
    justify-content: center;
}

.mobile-week-bar i {
    width: min(24px, 70%);
    min-height: 2px;
    border-radius: 7px 7px 2px 2px;
    background: linear-gradient(180deg, var(--leaf), var(--forest));
}

.mobile-week-column span {
    color: #64748b;
    font-size: 0.78rem;
}

.target-comparison {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    align-items: center;
    gap: 24px;
}

.target-ring {
    width: 118px;
    height: 118px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(var(--leaf) var(--target-progress), #edf0f3 0);
}

.target-ring::before {
    content: "";
    width: 82px;
    height: 82px;
    grid-area: 1 / 1;
    border-radius: 50%;
    background: #fff;
}

.target-ring strong {
    z-index: 1;
    grid-area: 1 / 1;
    color: #050b18;
    font-size: 1.25rem;
}

.target-details {
    display: grid;
    gap: 12px;
}

.target-details p {
    margin: 0;
    color: #64748b;
    font-size: 0.82rem;
}

.target-details p strong {
    display: block;
    margin-top: 2px;
    color: #0f172a;
    font-size: 1.25rem;
}

.target-details p strong small {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 400;
}

.target-difference {
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.9rem;
    line-height: 1.45;
}

.target-difference.negative { color: #dc2626; background: #feecec; }
.target-difference.positive { color: #28713a; background: #e9f7eb; }
.target-details > small { color: #64748b; line-height: 1.45; }

.employee-today-card .today-time-list {
    min-height: 90px;
    justify-content: center;
}

@media (max-width: 700px) {
    .employee-view .app-shell {
        width: 100%;
        padding: 0 14px 34px;
    }

    .employee-view .topbar {
        min-height: 54px;
        margin: 0 -14px 10px;
        padding: 8px 14px;
        border-width: 0 0 1px;
        border-radius: 0;
        box-shadow: none;
    }

    .employee-view .topbar > div {
        display: none;
    }

    .employee-view .logout-form {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
    }

    .employee-view .user-pill {
        min-height: 34px;
        padding: 0;
        border: 0;
        background: transparent;
        font-size: 0.83rem;
    }

    .employee-view .logout-form .button {
        min-height: 34px;
        padding: 0 10px;
        font-size: 0.82rem;
    }

    .employee-view .dashboard {
        gap: 16px;
    }

    .employee-mobile-header {
        display: block;
        padding: 2px 0 8px;
    }

    .employee-mobile-header .download-actions {
        display: none;
    }

    .employee-mobile-header .download-actions .button {
        min-height: 32px;
        padding: 0 9px;
        font-size: 0.74rem;
    }

    .employee-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .employee-stat-card {
        min-height: 128px;
        padding: 15px;
    }

    .employee-stat-card strong {
        font-size: 1.45rem;
    }

    .employee-view .time-clock-panel {
        min-height: 295px;
        padding: 30px 16px;
    }

    .employee-view .time-clock-copy h2 {
        font-size: clamp(3rem, 16vw, 4.4rem);
    }

    .employee-time-stack {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .employee-today-card {
        grid-column: auto;
    }

    .employee-time-stack .panel {
        padding: 24px;
    }

    .target-comparison {
        grid-template-columns: 106px minmax(0, 1fr);
        gap: 18px;
    }

    .target-ring {
        width: 96px;
        height: 96px;
    }

    .target-ring::before {
        width: 68px;
        height: 68px;
    }

    .mobile-week-chart {
        height: 220px;
        gap: 5px;
        padding-inline: 0;
    }
}
