:root {
    --bg: #f2f4f8;
    --surface: #ffffff;
    --surface-soft: #f7f9fc;
    --line: #d6dde8;
    --line-soft: #e7ecf3;
    --text: #1f2a3d;
    --muted: #6f7e97;
    --accent: #18b394;
    --font-sans: "Manrope", "Segoe UI", sans-serif;
    --time-col-width: 68px;
    --resource-col-width: 280px;
    --resource-count: 1;
}

* { box-sizing: border-box; }
html, body {
    margin: 0;
    height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
}
body { overflow: hidden; }

.layout {
    height: 100vh;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr) 340px;
}

.sidebar {
    background: #f7f9fc;
    border-right: 1px solid var(--line);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
}
.sidebar-brand__logo {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: #121a26;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}
.sidebar-brand__title { font-size: 13px; font-weight: 700; }
.sidebar-brand__subtitle { font-size: 11px; color: var(--muted); }

.sidebar-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px;
}
.sidebar-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    text-transform: capitalize;
    font-size: 13px;
    font-weight: 600;
}
.sidebar-card__title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 10px;
}

.icon-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    color: #314154;
}

.mini-calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
}
.mini-calendar__weekday {
    text-align: center;
    font-size: 10px;
    text-transform: uppercase;
    color: var(--muted);
    padding-bottom: 4px;
}
.mini-calendar__day {
    position: relative;
    border: 0;
    background: transparent;
    border-radius: 8px;
    height: 28px;
    font-size: 12px;
    color: var(--text);
    cursor: pointer;
}
.mini-calendar__day:hover { background: #eef3fb; }
.mini-calendar__day--active {
    background: #1f2a3d;
    color: #fff;
}
.mini-calendar__day--muted { pointer-events: none; }
.mini-calendar__day--has-data::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: var(--accent);
}
.mini-calendar__day--active.mini-calendar__day--has-data::after { background: #fff; }

.staff-list,
.legend-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.staff-row,
.legend-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.staff-row__avatar {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid transparent;
}
.staff-row__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.staff-row__name {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.staff-row__role { font-size: 11px; color: var(--muted); }
.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    flex: 0 0 auto;
}
.legend-dot--confirmed { background: #18b394; }
.legend-dot--pending { background: #f59e0b; }
.legend-dot--cancelled { background: #ef476f; }
.legend-dot--off { background: #d7dee9; }

.content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.toolbar {
    height: 56px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    gap: 10px;
}
.toolbar__left,
.toolbar__right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.toolbar-btn {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 10px;
    height: 34px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
}
.toolbar-btn--ghost { background: #f8fafd; }
.toolbar-date {
    margin-left: 8px;
    font-size: 18px;
    letter-spacing: -0.01em;
    font-weight: 700;
    color: #1a2438;
    text-transform: capitalize;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 34vw;
}
.toolbar-badge {
    border: 1px solid #d9e3f1;
    background: #f8fbff;
    color: #54708f;
    border-radius: 999px;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 700;
}
.segmented-control {
    display: inline-flex;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    background: #f7f9fc;
}
.segmented-control__item {
    border: 0;
    height: 34px;
    min-width: 74px;
    background: transparent;
    color: var(--muted);
    font-weight: 700;
}
.segmented-control__item--active {
    background: #fff;
    color: var(--text);
}

.calendar-wrap {
    height: calc(100vh - 56px);
    background: var(--surface);
    overflow: hidden;
}
.calendar-scroll {
    width: 100%;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}
#calendar {
    width: max-content;
    height: 100%;
    min-width: calc(var(--time-col-width) + var(--resource-col-width) * var(--resource-count));
}

.drawer {
    background: #fbfcfe;
    border-left: 1px solid var(--line);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
}
.drawer__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}
.drawer__eyebrow {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin-bottom: 6px;
}
.drawer__title {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.15;
}
.drawer__section {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px;
    background: var(--surface);
}
.drawer__section--highlight {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}
.drawer__time {
    font-size: 13px;
    font-weight: 800;
    color: #54708f;
    margin-bottom: 6px;
}
.drawer__service {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.25;
}
.drawer__meta-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 12px;
    font-size: 14px;
    font-weight: 700;
}
.drawer__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.status-pill,
.event-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 5px 8px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}
.status-pill {
    background: color-mix(in srgb, var(--status-color, #94a3b8) 16%, white);
    color: var(--status-color, #94a3b8);
}
.info-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px;
    background: var(--surface);
    min-width: 0;
}
.info-card--full { width: 100%; }
.info-card__label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin-bottom: 6px;
    font-weight: 700;
}
.info-card__value {
    font-size: 14px;
    font-weight: 700;
    color: #223248;
    min-width: 0;
    word-break: break-word;
}
.info-card__value--multiline {
    font-weight: 600;
    line-height: 1.45;
}

.resource-head {
    height: 70px;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 3px;
    width: 100%;
    overflow: hidden;
}
.resource-head__avatar {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid transparent;
}
.resource-head__name {
    font-size: 13px;
    font-weight: 700;
    max-width: 92%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.resource-head__role {
    font-size: 12px;
    color: var(--muted);
    max-width: 92%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-card {
    display: flex;
    align-items: stretch;
    width: 100%;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
    border-radius: 10px;
    background: #fff;
}
.event-card__bar {
    width: 4px;
    flex: 0 0 auto;
}
.event-card__body {
    flex: 1 1 auto;
    min-width: 0;
    padding: 6px 8px 6px 9px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.event-card__time {
    font-size: 11px;
    font-weight: 800;
    color: #4f6583;
}
.event-card__line {
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.event-card__line--muted {
    color: #5f728f;
    font-weight: 600;
}
.event-card__footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.event-card__price {
    font-size: 11px;
    font-weight: 800;
    color: #33435b;
    white-space: nowrap;
}

.dp-off-hours {
    background: repeating-linear-gradient(
        -45deg,
        rgba(240, 244, 249, 0.85),
        rgba(240, 244, 249, 0.85) 6px,
        rgba(250, 252, 255, 1) 6px,
        rgba(250, 252, 255, 1) 12px
    ) !important;
}

.calendar_default_main {
    border: 0 !important;
    font-family: var(--font-sans) !important;
}
.calendar_default_corner,
.calendar_default_cornerright,
.calendar_default_colheader,
.calendar_default_colheader_inner,
.calendar_default_rowheader,
.calendar_default_rowheader_inner,
.calendar_default_alldayheader_inner,
.calendar_default_alldaytable,
.calendar_default_alldayevent {
    background: #f6f8fc !important;
    color: #1f2a3d !important;
    border-color: var(--line) !important;
}
.calendar_default_rowheader,
.calendar_default_rowheader_inner {
    font-weight: 700 !important;
    color: #33435b !important;
    min-width: var(--time-col-width) !important;
    width: var(--time-col-width) !important;
    max-width: var(--time-col-width) !important;
    font-size: 13px !important;
    white-space: nowrap !important;
    text-align: right !important;
    padding-right: 8px !important;
}
.dp-time-hour .calendar_default_rowheader_inner > div {
    display: inline-flex;
    align-items: baseline;
    gap: 1px;
    font-size: 21px;
    font-weight: 700;
    line-height: 1;
}
.dp-time-hour .calendar_default_rowheader_minutes {
    font-size: 11px !important;
    font-weight: 700;
    color: #5b6d86;
}
.dp-time-half .calendar_default_rowheader_inner > div {
    display: flex;
    justify-content: flex-end;
}
.dp-time-half-label {
    font-size: 12px;
    font-weight: 600;
    color: #6f7e97;
    line-height: 1;
}
.dp-hour-line { border-top-color: #c9d3e2 !important; }
.dp-hour-line .calendar_default_cell_inner { border-top-color: #c9d3e2 !important; }
.dp-half-line { border-top-color: #e4eaf3 !important; }
.dp-half-line .calendar_default_cell_inner { border-top-color: #e4eaf3 !important; }
.calendar_default_cell,
.calendar_default_cell_inner {
    border-left-color: var(--line-soft) !important;
    border-right-color: var(--line-soft) !important;
    border-bottom-color: var(--line-soft) !important;
    background: #fff !important;
}
.calendar_default_event,
.calendar_default_event_inner {
    border-radius: 10px !important;
}

@media (max-width: 1360px) {
    .layout { grid-template-columns: 240px minmax(0, 1fr) 320px; }
    .toolbar-date { max-width: 28vw; }
}
@media (max-width: 1100px) {
    body { overflow: auto; }
    .layout {
        grid-template-columns: 220px minmax(0, 1fr);
        grid-template-areas: 'sidebar content' 'drawer content';
        height: auto;
        min-height: 100vh;
    }
    .sidebar { grid-area: sidebar; }
    .content { grid-area: content; min-height: 100vh; }
    .drawer {
        grid-area: drawer;
        border-left: 0;
        border-top: 1px solid var(--line);
        max-height: 420px;
    }
}
@media (max-width: 900px) {
    .layout {
        grid-template-columns: 1fr;
        grid-template-areas: 'sidebar' 'content' 'drawer';
    }
    .sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
    .toolbar {
        height: auto;
        min-height: 56px;
        flex-direction: column;
        align-items: flex-start;
        padding: 8px 10px;
    }
    .toolbar__left,
    .toolbar__right {
        width: 100%;
        flex-wrap: wrap;
    }
    .toolbar-date {
        font-size: 20px;
        max-width: 100%;
    }
    .calendar-wrap { height: 72vh; }
    .drawer__grid { grid-template-columns: 1fr; }
}
