.xcm-admin * {
    box-sizing: border-box;
}

.xcm-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 24px 0;
    flex-wrap: wrap;
}

.xcm-toolbar strong {
    font-size: 1.05rem;
}

.xcm-settings-box {
    margin: 0 0 24px;
    padding: 24px;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.xcm-settings-box-compact {
    padding: 18px 20px;
}

.xcm-box-header {
    margin-bottom: 18px;
}

.xcm-box-header h2 {
    margin: 0 0 6px;
    font-size: 1.15rem;
}

.xcm-box-header .description {
    margin: 0;
}

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

.xcm-settings-box select {
    min-width: 220px;
    width: 100%;
    max-width: 320px;
    margin-top: 8px;
}

.xcm-context-switcher {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin: 0;
}

.xcm-label-grid input[type="text"] {
    width: 100%;
    margin-top: 0;
}

.xcm-setting-item {
    padding: 16px;
    background: #fcfcfd;
    border: 1px solid #eaecf0;
    border-radius: 10px;
}

.xcm-field-head .description,
.xcm-setting-item .description,
.xcm-label-item .description {
    margin: 6px 0 0;
}

.xcm-label-item {
    display: grid;
    grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    padding: 16px;
    background: #fcfcfd;
    border: 1px solid #eaecf0;
    border-radius: 10px;
}

.xcm-label-meta {
    display: grid;
    gap: 6px;
}

.xcm-key-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: #f2f4f7;
    color: #475467;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.xcm-weekday-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.xcm-weekday {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 10px;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 999px;
}

.xcm-legend {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0 0 24px;
}

.xcm-status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.85rem;
    line-height: 1.4;
}

.xcm-status-chip.is-available,
.xcm-day.is-available {
    background: rgba(219, 178, 120, 0.12);
    border-color: rgba(219, 178, 120, 0.35);
}

.xcm-status-chip.is-unavailable,
.xcm-day.is-unavailable {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.xcm-legend .xcm-status-chip.is-closed,
.xcm-legend .xcm-status-chip.is-booked,
.xcm-table td.xcm-day.is-closed,
.xcm-table td.xcm-day.is-booked,
.xcm-front-table td.xcm-day.is-closed,
.xcm-front-table td.xcm-day.is-booked {
    background: rgba(185, 58, 58, 0.14);
    border-color: rgba(185, 58, 58, 0.36);
}

.xcm-status-chip.is-partial_am,
.xcm-day.is-partial_am,
.xcm-status-chip.is-partial_pm,
.xcm-day.is-partial_pm {
    background: rgba(86, 121, 194, 0.16);
    border-color: rgba(86, 121, 194, 0.34);
}

.xcm-table {
    table-layout: fixed;
    width: 100%;
    border-collapse: collapse;
}

.xcm-table th,
.xcm-table td {
    vertical-align: top;
    overflow: hidden;
}

.xcm-day {
    min-height: 190px;
    padding: 10px;
    position: relative;
    border-top: 3px solid transparent;
    box-shadow: inset 0 0 0 1px transparent;
}

.xcm-empty {
    background: rgba(255, 255, 255, 0.02);
}

.xcm-date {
    font-weight: 700;
    margin-bottom: 8px;
}

.xcm-date-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.xcm-default-badge {
    display: inline-block;
    margin-bottom: 8px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.06);
    font-size: 11px;
    line-height: 1.2;
}

.xcm-day select,
.xcm-day textarea {
    width: 100%;
    max-width: 100%;
    margin-top: 8px;
    background: rgba(255, 255, 255, 0.94);
}

.xcm-day textarea {
    min-height: 88px;
    resize: vertical;
}

.xcm-table td.xcm-day.is-available,
.xcm-front-table td.xcm-day.is-available {
    border-top-color: rgba(219, 178, 120, 0.85);
    box-shadow: inset 0 0 0 1px rgba(219, 178, 120, 0.14);
}

.xcm-table td.xcm-day.is-closed,
.xcm-table td.xcm-day.is-booked,
.xcm-front-table td.xcm-day.is-closed,
.xcm-front-table td.xcm-day.is-booked {
    border-top-color: rgba(185, 58, 58, 0.92);
    box-shadow: inset 0 0 0 1px rgba(185, 58, 58, 0.16);
}

.xcm-table td.xcm-day.is-unavailable,
.xcm-front-table td.xcm-day.is-unavailable {
    border-top-color: rgba(102, 102, 102, 0.72);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.xcm-table td.xcm-day.is-partial_am,
.xcm-table td.xcm-day.is-partial_pm,
.xcm-front-table td.xcm-day.is-partial_am,
.xcm-front-table td.xcm-day.is-partial_pm {
    border-top-color: rgba(86, 121, 194, 0.9);
    box-shadow: inset 0 0 0 1px rgba(86, 121, 194, 0.14);
}

.xcm-day.is-closed select,
.xcm-day.is-closed textarea,
.xcm-day.is-booked select,
.xcm-day.is-booked textarea {
    border-color: rgba(185, 58, 58, 0.34);
}

.xcm-day.is-partial_am select,
.xcm-day.is-partial_am textarea,
.xcm-day.is-partial_pm select,
.xcm-day.is-partial_pm textarea {
    border-color: rgba(86, 121, 194, 0.34);
}

.xcm-day.is-available select,
.xcm-day.is-available textarea {
    border-color: rgba(219, 178, 120, 0.32);
}

.xcm-day.is-today {
    position: relative;
}

.xcm-table td.xcm-day.is-today,
.xcm-front-table td.xcm-day.is-today {
    box-shadow:
        inset 0 0 0 1px rgba(219, 178, 120, 0.48),
        inset 0 0 0 999px rgba(219, 178, 120, 0.1);
}

.xcm-table td.xcm-day.is-today::after,
.xcm-front-table td.xcm-day.is-today::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(219, 178, 120, 0.18), rgba(219, 178, 120, 0.04) 46%, rgba(219, 178, 120, 0)),
        radial-gradient(circle at top left, rgba(219, 178, 120, 0.22), transparent 52%);
    pointer-events: none;
}

.xcm-table td.xcm-day.is-today .xcm-date,
.xcm-front-table td.xcm-day.is-today .xcm-date {
    color: #dbb278;
    text-shadow: 0 0 16px rgba(219, 178, 120, 0.18);
}

.xcm-front {
    margin: 40px 0;
}

.xcm-toolbar-front {
    margin-top: 0;
}

.xcm-past-mask {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    font-size: 28px;
    line-height: 1;
    color: rgba(0, 0, 0, 0.26);
}

.xcm-front .xcm-past-mask {
    min-height: 92px;
}

.xcm-debug-box {
    margin-top: 24px;
    padding: 20px;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
}

.xcm-debug-box pre {
    overflow: auto;
    padding: 16px;
    background: #f6f7f7;
    border-radius: 6px;
}

.xcm-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    text-decoration: none;
}

.xcm-front-table-wrap {
    overflow-x: auto;
}

.xcm-front-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.xcm-front-table th,
.xcm-front-table td {
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px;
    vertical-align: top;
    width: 14.2857%;
    overflow: hidden;
}

.xcm-front-table tbody td {
    height: 190px;
}

.xcm-front-table tbody tr {
    height: 190px;
}

.xcm-front-table td.xcm-empty {
    height: 190px;
}

.xcm-status {
    font-size: 0.85rem;
    color: #dbb278;
    margin-bottom: 8px;
    min-height: 1.4em;
}

.xcm-note {
    font-size: 0.8rem;
    line-height: 1.7;
    color: #8d8d95;
}

.xcm-front-table td.xcm-day.is-past-hidden {
    background: rgba(255, 255, 255, 0.025);
    border-top-color: rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.xcm-front-table td.xcm-day.is-past-hidden .xcm-date {
    color: rgba(255, 255, 255, 0.64);
}

.xcm-front-table td.xcm-day.is-past-hidden .xcm-past-mask {
    color: rgba(255, 255, 255, 0.28);
}

@media (max-width: 768px) {
    .xcm-toolbar strong {
        font-size: 0.95rem;
        text-align: center;
    }

    .xcm-day {
        min-height: 0;
        padding: 8px;
    }

    .xcm-toolbar {
        flex-direction: column;
        gap: 8px;
    }

    .xcm-settings-grid {
        grid-template-columns: 1fr;
    }

    .xcm-context-switcher {
        flex-direction: column;
        align-items: flex-start;
    }

    .xcm-settings-box select {
        max-width: 100%;
    }

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

    .xcm-front-table-wrap {
        overflow-x: visible;
    }

    .xcm-front-table {
        min-width: 0;
        width: 100%;
        table-layout: fixed;
    }

    .xcm-front-table th,
    .xcm-front-table td {
        width: 14.2857%;
        min-width: 0;
        padding: 8px 6px;
    }

    .xcm-front-table tbody td {
        height: 112px;
    }

    .xcm-front-table tbody tr {
        height: 112px;
    }

    .xcm-front-table td.xcm-empty {
        height: 112px;
    }

    .xcm-front-table th {
        font-size: 12px;
        letter-spacing: 0.02em;
    }

    .xcm-front-table .xcm-date {
        font-size: 14px;
        margin-bottom: 6px;
    }

    .xcm-front-table .xcm-status {
        font-size: 12px;
        line-height: 1.45;
        word-break: keep-all;
        overflow-wrap: anywhere;
    }

    .xcm-front-table .xcm-note {
        font-size: 11px;
        line-height: 1.45;
        overflow-wrap: anywhere;
    }

    .xcm-front-table .xcm-past-mask {
        min-height: 44px;
        font-size: 20px;
    }

    .xcm-day select,
    .xcm-day textarea {
        font-size: 16px;
    }

    .xcm-front {
        overflow-x: hidden;
    }

    .xcm-table td.xcm-day.is-today,
    .xcm-front-table td.xcm-day.is-today {
        box-shadow:
            inset 0 0 0 1px rgba(219, 178, 120, 0.56),
            inset 0 0 0 999px rgba(219, 178, 120, 0.16);
    }

    .xcm-table td.xcm-day.is-today::after,
    .xcm-front-table td.xcm-day.is-today::after {
        background:
            linear-gradient(180deg, rgba(219, 178, 120, 0.24), rgba(219, 178, 120, 0.06) 50%, rgba(219, 178, 120, 0)),
            radial-gradient(circle at top left, rgba(219, 178, 120, 0.26), transparent 56%);
    }
}
