:root {
    color-scheme: light;
    --ink: #17211f;
    --muted: #62716c;
    --line: #d8ded9;
    --paper: #f5f8ff;
    --panel: #ffffff;
    --blue: #2450a4;
    --blue-2: #3f78d8;
    --blue-soft: #eaf2ff;
    --blue-wash: #f6f9ff;
    --line-blue: #d3e1f8;
    --gold: #c69a3a;
    --red: #b42318;
    --red-soft: #fff1ee;
    --shadow: 0 18px 55px rgba(20, 50, 110, 0.16);
    --shadow-tight: 0 12px 32px rgba(20, 50, 110, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-width: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 18% -8%, rgba(63, 120, 216, 0.2) 0, rgba(63, 120, 216, 0) 34%),
        linear-gradient(180deg, #edf4ff 0%, #f7faff 48%, #ffffff 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button,
input,
select {
    font: inherit;
}

.shell {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 32px;
}

.hero {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #dbe4df;
    box-shadow: var(--shadow);
}

.hero--compact {
    min-height: clamp(270px, 38vh, 420px);
}

.hero__media {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(12, 35, 84, 0.92) 0%, rgba(27, 77, 153, 0.7) 48%, rgba(18, 58, 126, 0.16) 100%),
        url("/assets/img/hero-calendar-dubrava.png") center / cover;
}

.hero__content {
    position: relative;
    z-index: 1;
    display: grid;
    align-content: center;
    gap: 14px;
    width: min(680px, 100%);
    min-height: inherit;
    padding: clamp(26px, 6vw, 64px);
    color: #fffdf8;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    min-height: 58px;
    padding: 6px 8px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.16);
}

.brand-mark img {
    display: block;
    width: clamp(210px, 30vw, 340px);
    max-height: 74px;
    object-fit: contain;
}

.brand-mark span {
    color: var(--blue);
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
    white-space: nowrap;
}

.eyebrow,
.kicker {
    margin: 0;
    color: inherit;
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0;
    font-size: clamp(2rem, 4.7vw, 4.25rem);
    line-height: 1;
    letter-spacing: 0;
}

.hero p {
    margin: 0;
    max-width: 560px;
    color: rgba(255, 253, 248, 0.88);
    font-size: clamp(1rem, 2vw, 1.18rem);
    line-height: 1.55;
}

.workspace {
    position: relative;
    z-index: 2;
    margin-top: -38px;
}

.toolbar,
.calendar-card,
.request-panel,
.list-card {
    border: 1px solid rgba(36, 80, 164, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: var(--shadow-tight);
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.99) 0%, rgba(234, 242, 255, 0.96) 100%);
}

.toolbar h2,
.section-head h2,
.request-panel h2 {
    margin: 3px 0 0;
    font-size: clamp(1.28rem, 2.4vw, 2rem);
    letter-spacing: 0;
}

.kicker {
    color: var(--blue);
}

.toolbar__controls {
    display: flex;
    gap: 8px;
}

.icon-button {
    width: 46px;
    height: 46px;
    border: 1px solid #c7d8f5;
    border-radius: 8px;
    background: #fff;
    color: var(--blue);
    cursor: pointer;
    font-size: 1.8rem;
    line-height: 1;
}

.space-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 4px 0 2px;
}

.space-tab {
    min-height: 70px;
    display: grid;
    gap: 5px;
    align-content: center;
    border: 1px solid #c7d8f5;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    font-weight: 850;
    box-shadow: 0 6px 16px rgba(36, 80, 164, 0.05);
}

.space-tab strong,
.space-tab span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.space-tab span {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 900;
}

.space-tab.is-day-free span {
    color: #188052;
}

.space-tab.has-day-events span {
    color: #b42318;
}

.space-tab.is-selected {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent), #ffffff 91%);
    box-shadow: inset 0 -4px 0 var(--accent), 0 12px 24px rgba(36, 80, 164, 0.13);
}

.month-insights {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.insight-card {
    min-height: 104px;
    display: grid;
    align-content: space-between;
    gap: 12px;
    border: 1px solid rgba(36, 80, 164, 0.13);
    border-radius: 8px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 249, 255, 0.98) 100%);
    padding: 15px;
    box-shadow: 0 12px 30px rgba(20, 50, 110, 0.1);
}

.insight-card span {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.insight-card strong {
    overflow: hidden;
    color: var(--blue);
    font-size: clamp(1.55rem, 3.4vw, 2.55rem);
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.insight-card.is-primary {
    background:
        linear-gradient(135deg, var(--blue) 0%, var(--blue-2) 100%);
    color: #fff;
}

.insight-card.is-primary span,
.insight-card.is-primary strong {
    color: #fff;
}

.insight-card.is-space strong {
    font-size: clamp(1.05rem, 2vw, 1.45rem);
}

.workspace__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    width: 100%;
}

.workspace__grid > *,
.calendar-card,
.list-card,
.request-panel {
    min-width: 0;
}

.calendar-card,
.list-card,
.request-panel {
    padding: clamp(16px, 2.7vw, 24px);
}

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

.count-pill {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--blue);
    font-weight: 850;
    white-space: nowrap;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
    max-width: 100%;
    min-width: 0;
    width: 100%;
}

.calendar-weekday {
    min-height: 32px;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
}

.calendar-day {
    position: relative;
    overflow: hidden;
    min-height: 112px;
    display: grid;
    align-content: start;
    gap: 5px;
    padding: 9px;
    border: 1px solid #d3e1f8;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    text-align: left;
    box-shadow: 0 4px 12px rgba(36, 80, 164, 0.04);
}

.day-progress {
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    background: linear-gradient(90deg, var(--blue) var(--fill), rgba(211, 225, 248, 0.72) var(--fill));
}

.calendar-day span {
    font-weight: 900;
}

.calendar-day > strong {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    border-radius: 999px;
    padding: 3px 7px;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 0.7rem;
    line-height: 1.2;
}

.calendar-day small,
.calendar-day em {
    overflow: hidden;
    border-radius: 6px;
    padding: 4px 6px;
    background: #eef5ff;
    color: var(--blue);
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 800;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-day em {
    width: fit-content;
    min-width: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    background: #fff;
    border: 1px solid currentColor;
    font-size: 0.9rem;
}

.calendar-day.has-events {
    border-color: rgba(36, 80, 164, 0.4);
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.calendar-day.is-free-day {
    border-color: #9ed7b2;
    background: linear-gradient(180deg, #ffffff 0%, #f2fbf5 100%);
}

.calendar-day.is-free-day > strong {
    background: #e8f8ee;
    color: #14753a;
}

.calendar-day.is-warn-day {
    border-color: #efd070;
    background: linear-gradient(180deg, #ffffff 0%, #fff9e8 100%);
}

.calendar-day.is-warn-day > strong {
    background: #fff2bf;
    color: #8a5c00;
}

.calendar-day.is-busy-day {
    border-color: #efaaa3;
    background: linear-gradient(180deg, #ffffff 0%, #fff3f1 100%);
}

.calendar-day.is-busy-day > strong {
    background: #ffe0dc;
    color: var(--red);
}

.calendar-day.is-selected {
    border-color: var(--blue);
    box-shadow: inset 0 0 0 2px rgba(36, 80, 164, 0.26), 0 12px 26px rgba(36, 80, 164, 0.16);
}

.calendar-day.has-conflict {
    border-color: #df8a81;
    background: #fff7f5;
    box-shadow: inset 0 0 0 2px rgba(180, 35, 24, 0.14), 0 12px 24px rgba(180, 35, 24, 0.08);
}

.calendar-day.is-empty {
    min-height: 112px;
    border-style: dashed;
    background: rgba(255, 255, 255, 0.42);
}

.request-panel {
    position: sticky;
    top: 16px;
    background:
        linear-gradient(180deg, rgba(246, 249, 255, 0.98) 0%, rgba(255, 255, 255, 0.99) 38%),
        #fff;
    border-color: rgba(36, 80, 164, 0.18);
    box-shadow: 0 20px 55px rgba(20, 50, 110, 0.18);
}

.panel-title {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
}

.panel-title h2 {
    margin-bottom: 0;
}

.status-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    border-radius: 999px;
    padding: 7px 11px;
    background: #f3f6fb;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
    white-space: nowrap;
}

.status-dot.is-free {
    background: #eaf2ff;
    color: var(--blue);
}

.status-dot.is-busy {
    background: var(--red-soft);
    color: var(--red);
}

.status-dot.is-warning {
    background: #fff7df;
    color: #8a5c00;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.request-panel label,
.search-field {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 850;
}

.request-panel select,
.request-panel input,
.search-field input {
    width: 100%;
    min-height: 52px;
    border: 1px solid var(--line-blue);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    padding: 11px 13px;
    box-shadow: 0 1px 0 rgba(36, 80, 164, 0.04);
}

.request-panel {
    display: grid;
    gap: 14px;
}

.booking-fields {
    display: grid;
    gap: 14px;
    animation: revealFields 180ms ease-out;
}

.booking-fields.is-locked > :not(.selected-day-banner) {
    display: none;
}

.selected-day-banner {
    min-height: 54px;
    display: flex;
    align-items: center;
    border: 1px solid var(--line-blue);
    border-radius: 8px;
    background:
        linear-gradient(135deg, #f7fbff 0%, #ffffff 100%);
    color: var(--blue);
    padding: 13px 14px;
    font-weight: 900;
}

@keyframes revealFields {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.time-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.quick-slots {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.mini-calendar-block,
.free-slots-block {
    display: grid;
    gap: 10px;
    width: 100%;
    border: 1px solid var(--line-blue);
    border-radius: 8px;
    background: #fff;
    padding: 12px;
}

.mini-calendar-block {
    background:
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.smart-suggestions {
    display: grid;
    gap: 10px;
    border: 1px solid rgba(36, 80, 164, 0.13);
    border-radius: 8px;
    background:
        linear-gradient(145deg, #ffffff 0%, #f3f8ff 100%);
    padding: 12px;
}

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

.suggestions-head span {
    overflow: hidden;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.suggestion-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.suggestion-list button {
    min-height: 64px;
    display: grid;
    gap: 4px;
    align-content: center;
    border: 1px solid #c7d8f5;
    border-radius: 8px;
    background: #fff;
    color: var(--blue);
    cursor: pointer;
    font-weight: 900;
    box-shadow: 0 7px 18px rgba(36, 80, 164, 0.07);
}

.suggestion-list button span {
    color: var(--muted);
    font-size: 0.76rem;
}

.mini-calendar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.mini-calendar-head > span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 850;
}

.calendar-legend {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.calendar-legend b {
    width: 10px;
    height: 10px;
    display: inline-block;
    border-radius: 999px;
}

.calendar-legend b.is-free {
    background: #2ca861;
}

.calendar-legend b.is-warn {
    background: #d8a400;
}

.calendar-legend b.is-busy {
    background: var(--red);
}

.compact-calendar {
    gap: clamp(5px, 0.8vw, 9px);
}

.compact-calendar .calendar-weekday {
    min-height: 24px;
    font-size: 0.68rem;
}

.compact-calendar .calendar-day,
.compact-calendar .calendar-day.is-empty {
    min-height: clamp(76px, 8.5vw, 112px);
    padding: clamp(7px, 1vw, 11px);
}

.compact-calendar .calendar-day small {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    padding: 3px 6px;
    font-size: 0.62rem;
}

.compact-calendar .calendar-day em {
    display: inline-flex;
    min-width: 26px;
    min-height: 24px;
    padding: 2px 5px;
    font-size: 0.82rem;
}

.quick-slots button {
    min-height: 54px;
    display: grid;
    gap: 4px;
    align-content: center;
    border: 1px solid #c7d8f5;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 850;
    box-shadow: 0 6px 16px rgba(36, 80, 164, 0.05);
}

.quick-slots button b,
.quick-slots button span {
    display: block;
}

.quick-slots button span {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 900;
}

.quick-slots button.is-selected {
    border-color: var(--blue);
    background: linear-gradient(180deg, #f7fbff 0%, #eaf2ff 100%);
    color: var(--blue);
    box-shadow: inset 0 0 0 1px rgba(36, 80, 164, 0.22), 0 8px 18px rgba(36, 80, 164, 0.1);
}

.quick-slots button.is-busy {
    border-color: #f0c8c3;
    background: var(--red-soft);
    color: var(--red);
}

.quick-slots button.is-busy span {
    color: var(--red);
}

.day-detail {
    margin-top: 14px;
    border: 1px solid var(--line-blue);
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
    padding: 14px;
}

.day-detail__head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.day-detail__head h3 {
    margin: 3px 0 0;
    font-size: 1.22rem;
}

.day-detail__head span {
    color: var(--muted);
    font-weight: 850;
}

.day-events {
    display: grid;
    gap: 8px;
}

.day-timeline {
    display: grid;
    grid-template-columns: repeat(16, minmax(0, 1fr));
    gap: 5px;
    margin-top: 12px;
}

.day-timeline i {
    height: 9px;
    border-radius: 999px;
    background: #dce9ff;
}

.day-timeline i.is-free {
    background: #bce6c9;
}

.day-timeline i.is-busy {
    background: #efaaa3;
}

.selection-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    border-radius: 8px;
    padding: 12px;
    border: 1px solid transparent;
}

.selection-chip b {
    white-space: nowrap;
}

.selection-chip span {
    font-size: 0.9rem;
    font-weight: 850;
    text-align: right;
}

.selection-chip.is-free {
    background: #eaf2ff;
    border-color: #cfe0fb;
    color: var(--blue);
}

.selection-chip.is-busy {
    background: var(--red-soft);
    border-color: #f0c8c3;
    color: var(--red);
}

.selection-summary {
    display: block;
}

.summary-ticket {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 12px;
    border: 1px solid var(--line-blue);
    border-radius: 8px;
    padding: 16px;
    background:
        linear-gradient(135deg, #ffffff 0%, #eef5ff 100%);
    box-shadow: 0 14px 34px rgba(36, 80, 164, 0.14);
}

.summary-ticket::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: var(--blue);
}

.summary-ticket.is-busy {
    border-color: #f0c8c3;
    background:
        linear-gradient(135deg, #ffffff 0%, #fff1ee 100%);
}

.summary-ticket.is-busy::before {
    background: var(--red);
}

.summary-ticket__status {
    width: fit-content;
    border-radius: 999px;
    padding: 7px 11px;
    background: var(--blue);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 950;
    text-transform: uppercase;
}

.summary-ticket.is-busy .summary-ticket__status {
    background: var(--red);
}

.summary-ticket__main {
    display: grid;
    gap: 2px;
}

.summary-ticket__main span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 900;
    text-transform: uppercase;
}

.summary-ticket__main b {
    color: var(--ink);
    font-size: clamp(1.8rem, 7vw, 2.7rem);
    line-height: 1;
}

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

.summary-ticket__meta span {
    overflow: hidden;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
    padding: 10px;
    color: var(--blue);
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.summary-ticket__agreement {
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--red);
    font-size: 0.86rem;
    font-weight: 900;
    padding: 10px;
}

.agreement-check {
    display: none;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 10px;
    border: 1px solid #f0c8c3;
    border-radius: 8px;
    background: var(--red-soft);
    color: var(--red);
    padding: 12px;
}

.availability[hidden],
.agreement-check[hidden] {
    display: none !important;
}

.agreement-check.is-visible {
    display: grid;
}

.agreement-check input {
    width: 20px;
    height: 20px;
    margin: 1px 0 0;
    accent-color: var(--red);
}

.agreement-check span {
    font-weight: 900;
    line-height: 1.35;
}

.team-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.team-stat {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    border: 1px solid var(--line-blue);
    border-radius: 8px;
    background:
        linear-gradient(145deg, #ffffff 0%, #f7fbff 100%);
    padding: 12px;
    box-shadow: 0 9px 24px rgba(36, 80, 164, 0.08);
}

.team-stat__rank {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--blue), var(--blue-2));
    color: #fff;
    font-weight: 950;
}

.team-stat__body {
    display: grid;
    gap: 9px;
    min-width: 0;
}

.team-stat__body div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.team-stat__body strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.team-stat__body span {
    color: var(--blue);
    font-weight: 900;
    white-space: nowrap;
}

.team-stat__history {
    display: block;
    border-top: 1px solid rgba(36, 80, 164, 0.14);
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0;
    margin-top: 2px;
    padding-top: 8px;
}

.team-stat__body i {
    display: block;
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--blue-soft);
}

.team-stat__body i::before {
    content: "";
    display: block;
    width: var(--w);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--blue), var(--blue-2));
}

.team-stat.is-complete {
    border-color: rgba(44, 168, 97, 0.34);
    background:
        linear-gradient(145deg, #ffffff 0%, #f0fbf5 100%);
}

.team-stat.is-complete .team-stat__rank,
.team-stat.is-complete .team-stat__body i::before {
    background: linear-gradient(135deg, #2ca861, #61c987);
}

.team-stat.is-complete .team-stat__body span {
    background: #e8f8ee;
    color: #14753a;
}

.day-event {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 46px;
    border-radius: 8px;
    border: 1px solid #e4ecfa;
    background: #fff;
    padding: 10px 12px;
    box-shadow: inset 4px 0 0 var(--blue);
}

.day-event.is-conflict {
    border-color: #f0c8c3;
    background: var(--red-soft);
    color: var(--red);
    box-shadow: inset 4px 0 0 var(--red);
}

.day-event.is-conflict span {
    color: var(--red);
}

.day-event b {
    white-space: nowrap;
}

.day-event span {
    min-width: 0;
    overflow: hidden;
    color: var(--muted);
    font-weight: 800;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.day-event__info {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.day-event-delete {
    flex: 0 0 auto;
    min-height: 36px;
    border: 1px solid #f0c8c3;
    border-radius: 999px;
    background: #fff;
    color: var(--red);
    cursor: pointer;
    padding: 7px 11px;
    font-size: 0.78rem;
    font-weight: 950;
    box-shadow: 0 8px 18px rgba(180, 35, 24, 0.08);
}

.day-event-delete:hover {
    background: var(--red-soft);
}

.public-delete-panel[hidden] {
    display: none !important;
}

.public-delete-card {
    display: grid;
    gap: 12px;
    border: 1px solid #f0c8c3;
    border-radius: 14px;
    background:
        linear-gradient(180deg, #fff8f6 0%, #ffffff 52%, #fff1ee 100%);
    padding: 14px;
    box-shadow:
        inset 5px 0 0 var(--red),
        0 16px 34px rgba(180, 35, 24, 0.12);
}

.public-delete-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.public-delete-card__head h3 {
    margin: 3px 0 0;
    color: var(--red);
    font-size: clamp(1.08rem, 2vw, 1.35rem);
}

.public-delete-close {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border: 1px solid #f0c8c3;
    border-radius: 999px;
    background: #fff;
    color: var(--red);
    cursor: pointer;
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1;
}

.public-delete-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.public-delete-summary b,
.public-delete-summary span {
    overflow: hidden;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.84);
    padding: 10px;
    color: var(--red);
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.public-delete-warning {
    border: 1px solid #f0c8c3;
    border-radius: 8px;
    background: var(--red-soft);
    color: var(--red);
    padding: 12px;
    font-weight: 900;
    line-height: 1.35;
}

.public-delete-check {
    display: grid !important;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 10px;
    border: 1px solid #f0c8c3;
    border-radius: 8px;
    background: #fff;
    color: var(--red);
    padding: 12px;
}

.public-delete-check input {
    width: 20px;
    height: 20px;
    margin-top: 2px;
}

.danger-action {
    width: 100%;
    min-height: 54px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--red) 0%, #df6a5f 100%);
    color: #fff;
    cursor: pointer;
    font-weight: 950;
    box-shadow: 0 14px 28px rgba(180, 35, 24, 0.22);
}

.danger-action:disabled {
    cursor: wait;
    opacity: 0.68;
}

.availability {
    min-height: 54px;
    display: flex;
    align-items: center;
    border-radius: 8px;
    padding: 12px;
    border: 1px solid transparent;
    background: #f4f6fb;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.35;
}

.availability.is-free {
    background: #eaf2ff;
    border-color: #cfe0fb;
    color: var(--blue);
}

.availability.is-busy {
    background: var(--red-soft);
    border-color: #f0c8c3;
    color: var(--red);
}

.availability.is-warning {
    background: #fff7df;
    color: #8a5c00;
}

.primary-action {
    min-height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 18px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-2) 100%);
    color: #fff;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 14px 28px rgba(36, 80, 164, 0.24);
    border: 0;
    cursor: pointer;
    font: inherit;
    position: sticky;
    bottom: 10px;
    z-index: 2;
}

.primary-action:disabled {
    cursor: not-allowed;
    opacity: 0.58;
    transform: none;
}

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

.secondary-action {
    min-height: 48px;
    border: 1px solid #c7d8f5;
    border-radius: 8px;
    background: #fff;
    color: var(--blue);
    cursor: pointer;
    font-weight: 900;
}

.action-message {
    min-height: 0;
    display: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 0.9rem;
    font-weight: 900;
    line-height: 1.35;
}

.action-message.is-success,
.action-message.is-error {
    display: block;
}

.action-message.is-success {
    border: 1px solid #cfe0fb;
    background: #eaf2ff;
    color: var(--blue);
}

.action-message.is-error {
    border: 1px solid #f0c8c3;
    background: var(--red-soft);
    color: var(--red);
}

.list-card {
    margin-top: 16px;
}

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

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

.reservation-day {
    border: 1px solid var(--line-blue);
    border-radius: 8px;
    overflow: hidden;
    background: #f7fbff;
}

.reservation-day__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 14px;
    background: linear-gradient(135deg, #eef5ff 0%, #ffffff 100%);
    border-bottom: 1px solid #d3e1f8;
}

.reservation-day__head h3 {
    margin: 0;
    color: var(--blue);
    font-size: 1rem;
}

.reservation-day__head span {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 850;
    white-space: nowrap;
}

.reservation-day__items {
    display: grid;
    gap: 8px;
    padding: 10px;
}

.reservation-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: inset 4px 0 0 var(--accent);
}

.reservation-item div {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.reservation-item strong,
.reservation-item b {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reservation-item span {
    color: var(--muted);
    font-size: 0.88rem;
}

.empty-state {
    margin: 0;
    padding: 18px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    color: var(--muted);
}

button:hover,
.primary-action:hover,
.secondary-action:hover {
    transform: translateY(-1px);
}

button,
.primary-action,
.secondary-action {
    transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
.primary-action:focus-visible,
.secondary-action:focus-visible {
    outline: 3px solid rgba(36, 80, 164, 0.32);
    outline-offset: 3px;
}

@media (max-width: 900px) {
    .shell {
        width: 100%;
        padding: 0 0 18px;
    }

    .hero {
        border-radius: 0;
    }

    .hero--compact {
        min-height: 292px;
    }

    .hero__media {
        background:
            linear-gradient(180deg, rgba(18, 58, 126, 0.55) 0%, rgba(12, 35, 84, 0.94) 100%),
            url("/assets/img/hero-calendar-dubrava.png") center / cover;
    }

    .hero__content {
        align-content: end;
        padding: 18px 14px 68px;
    }

    .brand-mark {
        align-items: center;
        flex-direction: row;
    }

    .workspace {
        margin: -48px 10px 0;
    }

    .toolbar {
        align-items: start;
        padding: 14px;
    }

    .space-tabs {
        grid-template-columns: 1fr;
    }

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

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

    .request-panel {
        position: static;
        order: 1;
        padding: 16px;
    }

    .calendar-card {
        order: 2;
    }

    .list-card {
        order: 3;
    }

    .calendar-grid {
        grid-template-columns: repeat(7, minmax(42px, 1fr));
        gap: 4px;
    }

    .compact-calendar {
        grid-template-columns: repeat(7, minmax(0, 1fr));
    }

    .calendar-weekday {
        font-size: 0.68rem;
    }

    .calendar-day,
    .calendar-day.is-empty {
        min-height: 74px;
        padding: 7px;
    }

    .compact-calendar .calendar-day,
    .compact-calendar .calendar-day.is-empty {
        min-height: clamp(66px, 11vw, 92px);
        padding: 6px;
    }

    .calendar-day small {
        max-width: 100%;
        padding: 3px 4px;
        font-size: 0.64rem;
    }

    .day-detail__head,
    .day-event,
    .selection-chip {
        align-items: start;
        flex-direction: column;
    }

    .day-event span,
    .selection-chip span {
        text-align: left;
    }

    .day-event-delete {
        width: 100%;
    }

    .public-delete-summary {
        grid-template-columns: 1fr;
    }

    .section-head {
        align-items: start;
        flex-direction: column;
    }

    .reservation-item {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.86rem;
    }

    .hero p {
        font-size: 0.96rem;
    }

    .brand-mark {
        min-height: 52px;
        padding: 6px 7px;
    }

    .brand-mark img {
        width: 210px;
        max-height: 62px;
    }

    .toolbar {
        flex-direction: column;
    }

    .toolbar__controls,
    .icon-button {
        width: 100%;
    }

    .month-insights {
        display: flex;
        overflow-x: auto;
        padding-bottom: 6px;
        scroll-snap-type: x proximity;
    }

    .insight-card {
        flex: 0 0 72%;
        min-height: 96px;
        scroll-snap-align: start;
    }

    .calendar-grid {
        display: flex;
        overflow-x: auto;
        padding-bottom: 6px;
        scroll-snap-type: x mandatory;
        overscroll-behavior-inline: contain;
    }

    .mini-calendar-block {
        margin-inline: -6px;
        padding: 10px 8px 12px;
    }

    .compact-calendar {
        display: grid;
        grid-template-columns: repeat(7, minmax(62px, 72px));
        justify-content: start;
        overflow-x: auto;
        overflow-y: hidden;
        width: 100%;
        padding: 0 2px 8px;
        scroll-snap-type: x proximity;
        overscroll-behavior-inline: contain;
        -webkit-overflow-scrolling: touch;
    }

    .calendar-weekday,
    .calendar-day {
        flex: 0 0 88px;
        scroll-snap-align: start;
    }

    .compact-calendar .calendar-day {
        min-width: 62px;
        flex: initial;
        min-height: 84px;
        padding: 8px 7px;
        scroll-snap-align: start;
    }

    .compact-calendar .calendar-weekday {
        min-width: 62px;
        flex: initial;
        font-size: 0.68rem;
    }

    .compact-calendar .calendar-day > strong {
        padding: 3px 6px;
        font-size: 0.68rem;
    }

    .compact-calendar .calendar-day small {
        display: none;
    }

    .compact-calendar .calendar-day em {
        min-width: 34px;
        min-height: 30px;
        padding: 3px 7px;
        font-size: 0.88rem;
    }

    .compact-calendar .calendar-day span {
        font-size: 1.05rem;
        line-height: 1;
    }

    .calendar-day.is-empty {
        display: none;
    }

    .compact-calendar .calendar-day.is-empty {
        display: block;
        visibility: hidden;
    }

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

    .quick-slots {
        grid-template-columns: 1fr 1fr;
    }

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

    .space-tabs {
        grid-template-columns: 1fr;
    }

    .mini-calendar-head {
        align-items: flex-start;
        flex-direction: column;
    }

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

/* Premium section reset for clearer booking flow */
.request-panel {
    gap: 18px;
    border-color: rgba(36, 80, 164, 0.22);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(244, 248, 255, 0.98) 100%);
}

.panel-title {
    position: relative;
    overflow: hidden;
    margin: calc(clamp(16px, 2.7vw, 24px) * -1) calc(clamp(16px, 2.7vw, 24px) * -1) 0;
    padding: clamp(18px, 3vw, 28px);
    border-radius: 8px 8px 0 0;
    background:
        linear-gradient(135deg, rgba(36, 80, 164, 0.98) 0%, rgba(63, 120, 216, 0.92) 100%);
    color: #fff;
}

.panel-title::after {
    content: "";
    position: absolute;
    inset: auto 22px 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.36);
}

.panel-title .kicker,
.panel-title h2 {
    color: #fff;
}

.panel-title .status-dot {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.26);
}

.mini-calendar-block,
.booking-fields > .selected-day-banner,
.booking-fields > .space-tabs,
.booking-fields > label,
.free-slots-block,
.smart-suggestions,
.availability,
.agreement-check,
.selection-summary,
.summary-actions,
.day-detail {
    position: relative;
    margin-top: 2px;
}

.mini-calendar-block,
.free-slots-block,
.smart-suggestions,
.day-detail,
.selection-summary {
    border-color: rgba(36, 80, 164, 0.18);
    background:
        linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
    box-shadow: 0 14px 34px rgba(20, 50, 110, 0.08);
}

.mini-calendar-block {
    padding: clamp(14px, 2.4vw, 22px);
    background:
        linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
}

.mini-calendar-block::before,
.free-slots-block::before,
.smart-suggestions::before,
.day-detail::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    border-radius: 8px 8px 0 0;
    background: linear-gradient(90deg, var(--blue), var(--blue-2));
}

.mini-calendar-head {
    padding-top: 4px;
}

.compact-calendar {
    gap: clamp(8px, 1vw, 12px);
}

.compact-calendar .calendar-weekday {
    min-height: 34px;
    border-radius: 8px;
    background: rgba(234, 242, 255, 0.72);
    color: var(--blue);
    font-size: 0.72rem;
}

.compact-calendar .calendar-day,
.compact-calendar .calendar-day.is-empty {
    min-height: clamp(96px, 9.2vw, 126px);
}

.calendar-day {
    isolation: isolate;
    border: 1px solid rgba(36, 80, 164, 0.14);
    background:
        linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
    box-shadow:
        0 10px 24px rgba(20, 50, 110, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.calendar-day::after {
    content: "";
    position: absolute;
    inset: auto 8px 8px;
    height: 26px;
    z-index: -1;
    border-radius: 999px;
    background: rgba(36, 80, 164, 0.06);
}

.day-progress {
    height: 7px;
    background:
        linear-gradient(90deg, var(--blue) var(--fill), rgba(213, 226, 248, 0.95) var(--fill));
}

.calendar-day span {
    font-size: clamp(1.05rem, 1.6vw, 1.45rem);
    color: #0d1b2f;
}

.calendar-day > strong {
    padding: 4px 8px;
    background: #eff6ff;
    color: var(--blue);
    font-size: 0.74rem;
}

.calendar-day em {
    min-width: 34px;
    border: 0;
    background: rgba(255, 255, 255, 0.92);
    color: var(--blue);
    box-shadow: 0 4px 12px rgba(36, 80, 164, 0.08);
}

.calendar-day small {
    max-width: 100%;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
}

.calendar-day.is-free-day {
    border-color: rgba(44, 168, 97, 0.34);
    background: linear-gradient(180deg, #ffffff 0%, #f0fbf5 100%);
}

.calendar-day.is-warn-day {
    border-color: rgba(216, 164, 0, 0.42);
    background: linear-gradient(180deg, #ffffff 0%, #fff8df 100%);
}

.calendar-day.is-busy-day {
    border-color: rgba(180, 35, 24, 0.35);
    background: linear-gradient(180deg, #ffffff 0%, #fff0ee 100%);
}

.calendar-day.is-selected {
    border-color: var(--blue);
    background:
        linear-gradient(180deg, #ffffff 0%, #edf5ff 100%);
    box-shadow:
        inset 0 0 0 3px rgba(36, 80, 164, 0.22),
        0 18px 38px rgba(36, 80, 164, 0.22);
    transform: translateY(-1px);
}

.calendar-day.is-today::before {
    content: "Danas";
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    border-radius: 999px;
    background: var(--blue);
    color: #fff;
    padding: 4px 7px;
    font-size: 0.62rem;
    font-weight: 950;
    line-height: 1;
    box-shadow: 0 8px 16px rgba(36, 80, 164, 0.22);
}

.calendar-day.has-conflict {
    border-color: rgba(180, 35, 24, 0.6);
    background: linear-gradient(180deg, #ffffff 0%, #fff0ee 100%);
    box-shadow:
        inset 0 0 0 3px rgba(180, 35, 24, 0.16),
        0 18px 38px rgba(180, 35, 24, 0.13);
}

.booking-fields {
    gap: 18px;
}

.selected-day-banner {
    min-height: 64px;
    background:
        linear-gradient(135deg, #ffffff 0%, #eef5ff 100%);
    box-shadow: inset 5px 0 0 var(--blue), 0 10px 24px rgba(20, 50, 110, 0.08);
}

.booking-fields > label {
    border: 1px solid rgba(36, 80, 164, 0.14);
    border-radius: 8px;
    background: #fff;
    padding: 12px;
    box-shadow: 0 10px 24px rgba(20, 50, 110, 0.06);
}

.request-panel select,
.request-panel input,
.search-field input {
    background: #f9fbff;
}

.space-tabs {
    border: 1px solid rgba(36, 80, 164, 0.14);
    border-radius: 8px;
    background: #fff;
    padding: 10px;
    box-shadow: 0 10px 24px rgba(20, 50, 110, 0.06);
}

.space-tab {
    background:
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.space-tab.is-selected {
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--accent), #ffffff 88%) 0%, #ffffff 100%);
}

.quick-slots button,
.suggestion-list button,
.secondary-action {
    background:
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.quick-slots button.is-selected,
.suggestion-list button:hover,
.secondary-action:hover {
    box-shadow:
        inset 0 0 0 1px rgba(36, 80, 164, 0.18),
        0 12px 24px rgba(36, 80, 164, 0.14);
}

.summary-ticket {
    border-color: rgba(36, 80, 164, 0.18);
    background:
        linear-gradient(135deg, #ffffff 0%, #edf5ff 100%);
    box-shadow: 0 18px 42px rgba(36, 80, 164, 0.16);
}

.day-detail {
    padding: 18px;
}

@media (max-width: 900px) {
    .panel-title {
        margin: -16px -16px 0;
        padding: 18px 16px;
    }

    .compact-calendar .calendar-day,
    .compact-calendar .calendar-day.is-empty {
        min-height: 92px;
    }
}

@media (max-width: 480px) {
    .mini-calendar-block {
        margin-inline: 0;
        padding: 12px;
    }

    .compact-calendar {
        grid-template-columns: repeat(7, minmax(74px, 86px));
        gap: 8px;
    }

    .compact-calendar .calendar-day {
        min-width: 74px;
        min-height: 98px;
        padding: 9px 8px;
    }

    .compact-calendar .calendar-weekday {
        min-width: 74px;
        background: rgba(234, 242, 255, 0.9);
    }

    .compact-calendar .calendar-day span {
        font-size: 1.18rem;
    }

    .calendar-day em {
        min-height: 28px;
    }
}

/* Modern calendar cards */
.compact-calendar {
    align-items: stretch;
}

.calendar-day {
    grid-template-rows: auto auto auto auto;
    align-content: stretch;
    gap: 8px;
}

.calendar-day__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.calendar-day .day-number {
    color: #0d1b2f;
    font-size: clamp(1.35rem, 2.2vw, 2rem);
    font-weight: 950;
    line-height: 1;
}

.calendar-day .day-count {
    min-width: 34px;
    min-height: 30px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--blue);
    font-size: 0.82rem;
    font-weight: 950;
    box-shadow: 0 6px 16px rgba(36, 80, 164, 0.1);
}

.day-load {
    display: block;
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(211, 225, 248, 0.9);
}

.day-load i {
    display: block;
    width: var(--fill);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--blue), var(--blue-2));
}

.day-percent {
    width: fit-content;
    max-width: 100%;
    border-radius: 999px;
    padding: 4px 8px;
    background: #eff6ff;
    color: var(--blue);
    font-size: 0.74rem;
    font-weight: 950;
    line-height: 1.1;
}

.day-status {
    overflow: hidden;
    max-width: 100%;
    border-radius: 999px;
    padding: 5px 8px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-day.is-free-day .day-count,
.calendar-day.is-free-day .day-percent {
    color: #14753a;
}

.calendar-day.is-warn-day .day-count,
.calendar-day.is-warn-day .day-percent {
    color: #8a5c00;
}

.calendar-day.is-busy-day .day-count,
.calendar-day.is-busy-day .day-percent {
    color: var(--red);
}

.calendar-day.is-free-day .day-load i {
    background: linear-gradient(90deg, #2ca861, #58c783);
}

.calendar-day.is-warn-day .day-load i {
    background: linear-gradient(90deg, #d8a400, #f0c75a);
}

.calendar-day.is-busy-day .day-load i {
    background: linear-gradient(90deg, var(--red), #df6a5f);
}

@media (max-width: 640px) {
    .compact-calendar {
        grid-template-columns: repeat(7, minmax(82px, 96px));
        gap: 9px;
    }

    .compact-calendar .calendar-day {
        min-width: 82px;
        min-height: 116px;
        padding: 10px 9px;
    }

    .compact-calendar .calendar-weekday {
        min-width: 82px;
    }

    .calendar-day .day-number {
        font-size: 1.45rem;
    }

    .day-status {
        display: none;
    }
}

/* Mobile fit calendar redesign */
.mini-calendar-block {
    overflow: hidden;
}

.compact-calendar .calendar-day {
    border-radius: 14px;
}

.calendar-day .day-count {
    letter-spacing: 0;
}

@media (max-width: 640px) {
    .mini-calendar-block {
        padding: 12px 10px;
    }

    .calendar-grid,
    .compact-calendar {
        display: grid !important;
        grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
        gap: clamp(4px, 1.35vw, 7px) !important;
        overflow: visible !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .calendar-weekday,
    .compact-calendar .calendar-weekday {
        min-width: 0 !important;
        min-height: 22px;
        display: grid;
        place-items: center;
        border-radius: 7px;
        background: transparent;
        color: #42607f;
        font-size: clamp(0.52rem, 2.2vw, 0.68rem);
        font-weight: 950;
    }

    .calendar-day,
    .compact-calendar .calendar-day {
        min-width: 0 !important;
        min-height: clamp(62px, 17vw, 78px) !important;
        padding: clamp(5px, 1.6vw, 7px) !important;
        gap: 4px;
        border-radius: 12px;
        box-shadow: 0 6px 16px rgba(20, 50, 110, 0.08);
        scroll-snap-align: unset;
    }

    .calendar-day.is-empty,
    .compact-calendar .calendar-day.is-empty {
        display: block !important;
        min-width: 0 !important;
        min-height: clamp(62px, 17vw, 78px) !important;
        padding: 0 !important;
        visibility: hidden;
    }

    .calendar-day::after {
        display: none;
    }

    .calendar-day.is-today::before {
        content: "";
        top: 5px;
        right: 5px;
        width: 7px;
        height: 7px;
        padding: 0;
        background: var(--blue);
        box-shadow: 0 0 0 3px rgba(36, 80, 164, 0.14);
    }

    .calendar-day__top {
        align-items: center;
        gap: 3px;
    }

    .calendar-day .day-number {
        font-size: clamp(0.98rem, 4.7vw, 1.35rem) !important;
    }

    .calendar-day .day-count {
        min-width: clamp(18px, 5vw, 24px);
        min-height: clamp(18px, 5vw, 24px);
        font-size: clamp(0.54rem, 2.25vw, 0.7rem);
        box-shadow: none;
    }

    .day-load {
        height: 5px;
    }

    .day-percent {
        padding: 2px 4px;
        font-size: clamp(0.5rem, 2vw, 0.62rem);
    }

    .day-status {
        display: none !important;
    }

    .calendar-day.is-selected {
        transform: none;
        box-shadow:
            inset 0 0 0 2px rgba(36, 80, 164, 0.3),
            0 10px 22px rgba(36, 80, 164, 0.18);
    }
}

@media (max-width: 380px) {
    .mini-calendar-block {
        padding-inline: 8px;
    }

    .calendar-grid,
    .compact-calendar {
        gap: 4px !important;
    }

    .calendar-day,
    .compact-calendar .calendar-day,
    .calendar-day.is-empty,
    .compact-calendar .calendar-day.is-empty {
        min-height: 60px !important;
        border-radius: 10px;
    }
}

/* Clear section separation */
.team-stats-card {
    margin-bottom: clamp(22px, 4vw, 40px);
}

.workspace__grid {
    margin-top: clamp(14px, 2.5vw, 24px);
}

.request-panel {
    gap: clamp(18px, 2.8vw, 28px);
}

.booking-section {
    position: relative;
    display: grid;
    gap: clamp(14px, 2.2vw, 20px);
    width: 100%;
    border: 1px solid rgba(36, 80, 164, 0.18);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 251, 255, 0.98) 100%);
    padding: clamp(14px, 2.4vw, 22px);
    box-shadow:
        0 16px 36px rgba(20, 50, 110, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.booking-section + .booking-section {
    margin-top: clamp(8px, 1.7vw, 16px);
}

.booking-section::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    border-radius: 16px 16px 0 0;
    background: linear-gradient(90deg, var(--blue), var(--blue-2));
}

.booking-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
}

.booking-section-head h3 {
    margin: 3px 0 0;
    color: #0d1b2f;
    font-size: clamp(1.08rem, 2.1vw, 1.48rem);
    letter-spacing: 0;
}

.booking-section-head .kicker {
    margin: 0;
}

.booking-section .mini-calendar-block {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.booking-section .mini-calendar-block::before {
    display: none;
}

.booking-section--details {
    background:
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.booking-section--space {
    border-color: rgba(43, 184, 168, 0.28);
    background:
        linear-gradient(180deg, #f4fffd 0%, #ffffff 52%, #f7fbff 100%);
}

.booking-section--space::before {
    background: linear-gradient(90deg, #2450a4, #2bb8a8);
}

.booking-section--space .booking-section-head h3 {
    color: var(--blue);
}

.booking-section--space .space-tabs {
    margin: 0;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
}

.booking-section--details::before {
    background: linear-gradient(90deg, #173f88, #5f8fe8);
}

.booking-fields.is-locked > :not(.selected-day-banner):not(.booking-section-head) {
    display: none;
}

.booking-fields.is-locked > .booking-section-head {
    display: flex;
}

@media (max-width: 640px) {
    .team-stats-card {
        margin-bottom: 22px;
    }

    .request-panel {
        gap: 18px;
    }

    .booking-section {
        border-radius: 14px;
        padding: 14px 10px 16px;
    }

    .booking-section::before {
        border-radius: 14px 14px 0 0;
    }

    .booking-section-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }
}

/* Readable stats and clearer booking steps */
.team-stats {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: clamp(12px, 1.5vw, 18px);
}

.team-stat {
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: start;
    min-width: 0;
    padding: clamp(12px, 1.8vw, 18px);
}

.team-stat__rank {
    width: 48px;
    height: 48px;
}

.team-stat__body div {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px 12px;
}

.team-stat__body strong {
    min-width: min(100%, 170px);
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    line-height: 1.22;
}

.team-stat__body span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    background: #eef5ff;
    padding: 5px 9px;
    white-space: nowrap;
}

.booking-section--calendar {
    border-color: rgba(36, 80, 164, 0.3);
    background:
        linear-gradient(180deg, #f7fbff 0%, #ffffff 42%, #f4f8ff 100%);
}

.booking-section--calendar::before {
    height: 7px;
    background: linear-gradient(90deg, #2450a4, #3f78d8, #72a3ff);
}

.booking-section--calendar .booking-section-head {
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(36, 80, 164, 0.12);
}

.booking-section--calendar .booking-section-head h3 {
    color: var(--blue);
}

.booking-section--details {
    border-color: rgba(23, 63, 136, 0.26);
}

.selected-day-banner {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    min-height: auto;
    border: 1px solid rgba(36, 80, 164, 0.24);
    border-radius: 14px;
    background:
        linear-gradient(135deg, #eaf2ff 0%, #ffffff 58%, #edf7ff 100%);
    color: #0d1b2f;
    padding: 14px 16px 14px 18px;
    box-shadow:
        inset 6px 0 0 var(--blue),
        0 14px 28px rgba(36, 80, 164, 0.12);
}

.selected-day-banner span {
    color: var(--blue);
    font-size: 0.72rem;
    font-weight: 950;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.selected-day-banner strong {
    color: #0d1b2f;
    font-size: clamp(1.05rem, 2.4vw, 1.42rem);
    line-height: 1.15;
}

.selected-day-banner small {
    color: #42607f;
    font-size: 0.86rem;
    font-weight: 800;
    line-height: 1.35;
}

.booking-fields.is-locked .selected-day-banner {
    background:
        linear-gradient(135deg, #fff8e0 0%, #ffffff 100%);
    border-color: rgba(216, 164, 0, 0.3);
    box-shadow:
        inset 6px 0 0 #d8a400,
        0 12px 24px rgba(138, 92, 0, 0.1);
}

.booking-fields.is-locked .selected-day-banner span,
.booking-fields.is-locked .selected-day-banner strong {
    color: #8a5c00;
}

.booking-fields .smart-suggestions:empty {
    display: none;
}

@media (min-width: 1100px) {
    .team-stats {
        grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    }

    .team-stat__body strong {
        min-width: 210px;
    }
}

@media (max-width: 640px) {
    .team-stat {
        grid-template-columns: 40px minmax(0, 1fr);
        padding: 12px;
    }

    .team-stat__rank {
        width: 40px;
        height: 40px;
    }

    .team-stat__body strong {
        min-width: 100%;
    }

    .selected-day-banner {
        padding: 13px 13px 13px 15px;
    }
}

/* Three-day occupancy pager */
.list-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.day-window-nav {
    min-height: 48px;
    display: inline-grid;
    grid-template-columns: 44px minmax(112px, auto) 44px;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(36, 80, 164, 0.16);
    border-radius: 999px;
    background: linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
    padding: 4px;
    box-shadow: 0 10px 24px rgba(20, 50, 110, 0.08);
}

.day-window-nav .icon-button {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    font-size: 1.55rem;
    line-height: 1;
}

.day-window-nav .icon-button:disabled {
    cursor: not-allowed;
    opacity: 0.38;
    box-shadow: none;
}

.day-window-nav span {
    color: var(--blue);
    font-size: 0.85rem;
    font-weight: 950;
    text-align: center;
    white-space: nowrap;
}

.reservation-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
}

.reservation-day {
    min-height: 100%;
    box-shadow: 0 12px 30px rgba(20, 50, 110, 0.08);
}

.reservation-day__head {
    min-height: 64px;
}

@media (max-width: 900px) {
    .list-tools {
        width: 100%;
        justify-content: space-between;
    }

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

@media (max-width: 520px) {
    .list-tools {
        display: grid;
        grid-template-columns: 1fr;
    }

    .day-window-nav {
        width: 100%;
        grid-template-columns: 44px minmax(0, 1fr) 44px;
    }

    .search-field {
        width: 100%;
    }
}

/* Single, cleaner occupancy bar inside calendar days */
.calendar-day .day-progress {
    display: none;
}

.calendar-day {
    gap: 9px;
}

.day-load {
    position: relative;
    height: 11px;
    border: 1px solid rgba(36, 80, 164, 0.08);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(230, 239, 252, 0.95));
    box-shadow:
        inset 0 1px 2px rgba(20, 50, 110, 0.08),
        0 6px 14px rgba(20, 50, 110, 0.06);
}

.day-load i {
    min-width: 6px;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0)),
        linear-gradient(90deg, var(--blue), var(--blue-2));
    box-shadow: 0 4px 10px rgba(36, 80, 164, 0.18);
}

.calendar-day.is-free-day .day-load i {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0)),
        linear-gradient(90deg, #2ca861, #61c987);
    box-shadow: 0 4px 10px rgba(44, 168, 97, 0.16);
}

.calendar-day.is-warn-day .day-load i {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0)),
        linear-gradient(90deg, #d8a400, #f4cf65);
    box-shadow: 0 4px 10px rgba(216, 164, 0, 0.16);
}

.calendar-day.is-busy-day .day-load i {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0)),
        linear-gradient(90deg, var(--red), #e07368);
    box-shadow: 0 4px 10px rgba(180, 35, 24, 0.16);
}

@media (max-width: 640px) {
    .calendar-day {
        gap: 5px;
    }

    .day-load {
        height: 7px;
        box-shadow: inset 0 1px 2px rgba(20, 50, 110, 0.08);
    }
}

/* Multi-slot selection */
.quick-slots button.is-selected {
    position: relative;
    border-width: 2px;
    background:
        linear-gradient(180deg, #ffffff 0%, #e7f0ff 100%);
    color: var(--blue);
    transform: translateY(-1px);
}

.quick-slots button.is-selected::before {
    content: "";
    position: absolute;
    inset: 10px auto 10px 8px;
    width: 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--blue), var(--blue-2));
}

.quick-slots button.is-selected span {
    color: var(--blue);
}

.quick-slots button.is-selected.is-busy {
    border-color: #efaaa3;
    background:
        linear-gradient(180deg, #fffafa 0%, #fff1ee 100%);
    color: var(--red);
}

.quick-slots button.is-selected.is-busy::before {
    background: linear-gradient(180deg, var(--red), #df6a5f);
}

.quick-slots button.is-selected.is-busy span {
    color: var(--red);
}

.quick-slots button.is-blocked,
.quick-slots button.is-blocked:disabled {
    cursor: not-allowed;
    opacity: 0.78;
    border-color: #f0c8c3;
    background: var(--red-soft);
    color: var(--red);
}

.quick-slots button.is-blocked span {
    white-space: normal;
    line-height: 1.25;
}
