.ctp-calendar {
    --ctp-primary: #1f6feb;
    --ctp-booked: #f97316;
    --ctp-blocked: #ef4444;
    border: 1px solid #e2e8f0;
    padding: 16px;
    border-radius: 12px;
    font-family: Arial, sans-serif;
}

.ctp-calendar__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.ctp-calendar__nav button {
    background: var(--ctp-primary);
    color: #fff;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
}

.ctp-calendar__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.ctp-calendar__day {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px;
    background: #fff;
}

.ctp-calendar__day-header {
    font-weight: bold;
    margin-bottom: 8px;
}

.ctp-calendar__slots {
    display: grid;
    gap: 6px;
}

.ctp-calendar__slot {
    width: 100%;
    border-radius: 6px;
    border: 1px solid transparent;
    padding: 6px 8px;
    font-size: 13px;
    text-align: left;
}

.ctp-calendar__slot--available {
    background: rgba(31, 111, 235, 0.12);
    border-color: var(--ctp-primary);
    color: #0f172a;
    cursor: pointer;
}

.ctp-calendar__slot--booked {
    background: rgba(249, 115, 22, 0.15);
    border-color: var(--ctp-booked);
    color: #7c2d12;
}

.ctp-calendar__slot--blocked {
    background: rgba(239, 68, 68, 0.15);
    border-color: var(--ctp-blocked);
    color: #7f1d1d;
}

.ctp-calendar__legend {
    margin-top: 16px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 13px;
}

.ctp-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
}

.ctp-dot--available {
    background: var(--ctp-primary);
}

.ctp-dot--booked {
    background: var(--ctp-booked);
}

.ctp-dot--blocked {
    background: var(--ctp-blocked);
}

.ctp-calendar__modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.ctp-calendar__modal[aria-hidden="false"] {
    opacity: 1;
    pointer-events: auto;
}

.ctp-calendar__modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    width: min(400px, 90vw);
    position: relative;
}

.ctp-calendar__close {
    position: absolute;
    top: 10px;
    right: 10px;
    border: none;
    background: transparent;
    font-size: 22px;
    cursor: pointer;
}

.ctp-booking-form {
    display: grid;
    gap: 10px;
}

.ctp-form {
    display: grid;
    gap: 10px;
    max-width: 520px;
}

.ctp-form label {
    display: grid;
    gap: 6px;
    font-size: 14px;
}

.ctp-form input,
.ctp-form textarea,
.ctp-form select {
    border: 1px solid #cbd5f5;
    border-radius: 6px;
    padding: 6px 8px;
}

.ctp-booking-form label {
    display: grid;
    gap: 6px;
    font-size: 14px;
}

.ctp-booking-form input,
.ctp-booking-form textarea {
    border: 1px solid #cbd5f5;
    border-radius: 6px;
    padding: 6px 8px;
}

.ctp-booking-form button {
    background: var(--ctp-primary);
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
}

.ctp-booking-form__message {
    font-size: 13px;
    color: #0f172a;
}

.ctp-frontend-dashboard {
    border: 1px solid #e2e8f0;
    padding: 16px;
    border-radius: 12px;
}

.ctp-dashboard-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 16px;
}

.ctp-dashboard-nav {
    display: grid;
    gap: 8px;
    border: 1px solid #e2e8f0;
    padding: 12px;
    border-radius: 12px;
    background: #fff;
    align-content: start;
}

.ctp-dashboard-tab {
    background: transparent;
    border: 1px solid #cbd5f5;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
}

.ctp-dashboard-tab.is-active {
    background: var(--ctp-primary);
    color: #fff;
    border-color: var(--ctp-primary);
}

.ctp-dashboard-content {
    display: grid;
    gap: 16px;
}

.ctp-dashboard-panel {
    display: none;
}

.ctp-dashboard-panel.is-active {
    display: block;
}

.ctp-custom-fields {
    display: grid;
    gap: 8px;
}

.ctp-custom-field-row {
    display: grid;
    grid-template-columns: minmax(160px, 2fr) minmax(140px, 1fr) minmax(180px, 2fr) auto auto;
    gap: 8px;
    align-items: center;
}

.ctp-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.ctp-custom-field-row input,
.ctp-custom-field-row select {
    width: 100%;
}

.ctp-settings-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 8px;
    margin-bottom: 0;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 8px;
}

.ctp-settings-tab {
    border: 1px solid #cbd5f5;
    background: #f8fafc;
    padding: 10px 12px;
    border-radius: 10px 10px 0 0;
    cursor: pointer;
    font-weight: 600;
    text-align: center;
    transition: all 0.15s ease;
}

.ctp-settings-tab.is-active {
    background: #fff;
    color: var(--ctp-primary);
    border-color: var(--ctp-primary);
    border-bottom-color: #fff;
    box-shadow: 0 -2px 6px rgba(15, 23, 42, 0.08);
}

.ctp-settings-panel {
    display: none;
}

.ctp-settings-panel.is-active {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 12px 12px 12px;
    background: #fff;
}

@media (max-width: 900px) {
    .ctp-custom-field-row {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .ctp-settings-tabs {
        flex-direction: column;
    }
}

.ctp-subsection {
    margin-top: 16px;
}

@media (max-width: 900px) {
    .ctp-dashboard-layout {
        grid-template-columns: 1fr;
    }
    .ctp-dashboard-nav {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
}

.ctp-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.ctp-table th,
.ctp-table td {
    border: 1px solid #e2e8f0;
    padding: 8px;
    text-align: left;
}

.ctp-section {
    margin-bottom: 24px;
}
