:root {
    --primary: #c9a263; /* Elegant Gold */
    --primary-color: var(--primary);
    --primary-hover: #b08d55;
    --bg-dark: #121212;
    --surface-dark: #1e1e1e;
    --surface-border: #333;
    --text-main: #f5f5f5;
    --text-muted: #a0a0a0;
    --danger: #ff5252;
    --success: #4caf50;
    --border-radius: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans TC', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.fullscreen-center {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-dark);
    z-index: 9999;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--surface-border);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 16px;
    width: 100%;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding-top: 20px;
}

header h1 {
    font-size: 24px;
    color: var(--primary);
    margin-bottom: 5px;
}

header p {
    color: var(--text-muted);
    font-size: 14px;
}

.card {
    background-color: var(--surface-dark);
    border: 1px solid var(--surface-border);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card h2 {
    font-size: 18px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--surface-border);
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 15px;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

.flex-row {
    display: flex;
    align-items: center;
}

label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: var(--text-muted);
}

input, select, textarea {
    width: 100%;
    padding: 12px;
    background-color: #2a2a2a;
    border: 1px solid var(--surface-border);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(201, 162, 99, 0.2);
}

.btn {
    display: inline-block;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s, transform 0.1s;
}

.btn:active {
    transform: scale(0.98);
}

.primary-btn {
    background-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 10px rgba(201, 162, 99, 0.3);
}

.primary-btn:hover {
    background-color: var(--primary-hover);
}

.secondary-btn {
    background-color: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.secondary-btn:hover {
    background-color: rgba(201, 162, 99, 0.1);
}

.small-btn {
    width: auto;
    padding: 8px 16px;
    font-size: 14px;
}

.btn-success { background-color: var(--success); color: white; }
.btn-danger { background-color: var(--danger); color: white; }

.checkbox-group, .radio-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 5px;
}

.checkbox-group label, .radio-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 16px;
    color: var(--text-main);
    cursor: pointer;
}

.checkbox-group input, .radio-group input {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.time-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    margin-top: 5px;
}

.time-grid label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 5px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    color: var(--text-main);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.time-grid input[type="checkbox"] {
    display: none;
}

.time-grid input[type="checkbox"]:checked + span {
    color: #fff;
    font-weight: bold;
}

.time-grid label:has(input[type="checkbox"]:checked) {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.calendar-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid var(--surface-border);
    padding-bottom: 12px;
    margin-bottom: 14px;
}

.calendar-toolbar h2 {
    margin-bottom: 2px;
    border-bottom: none;
    padding-bottom: 0;
    text-align: center;
}

.calendar-subtitle {
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--surface-border);
    border-radius: 8px;
    background: #252525;
    color: var(--primary);
    font-size: 20px;
    cursor: pointer;
}

.calendar-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    grid-auto-rows: minmax(82px, auto);
    gap: 6px;
}

.calendar-weekday {
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
    padding: 4px 0;
}

.calendar-day {
    min-height: 82px;
    padding: 7px;
    background: #1b1b1b;
    border: 1px solid var(--surface-border);
    border-radius: 8px;
    overflow: hidden;
}

.calendar-day-empty {
    background: transparent;
    border-color: transparent;
}

.calendar-day-today {
    border-color: var(--primary);
}

.calendar-day-vacation {
    background: rgba(255, 82, 82, 0.08);
    border-color: rgba(255, 82, 82, 0.28);
}

.calendar-day-past {
    opacity: 0.55;
}

.day-number {
    color: var(--primary);
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 6px;
}

.day-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    word-break: keep-all;
    writing-mode: horizontal-tb;
}

.day-status.vacation {
    color: #fff;
    background: var(--danger);
}

.day-status.muted {
    color: var(--text-muted);
    background: #2a2a2a;
}

.day-slots {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.day-slots span,
.day-slots em {
    display: block;
    padding: 3px 4px;
    border-radius: 6px;
    background: rgba(201, 162, 99, 0.12);
    border: 1px solid rgba(201, 162, 99, 0.24);
    color: var(--text-main);
    font-size: 10px;
    font-style: normal;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.day-slots .is-full {
    background: #2a2a2a;
    border-color: #3a3a3a;
    color: var(--text-muted);
}

.date-vacation {
    position: relative;
}
.date-vacation::after {
    content: "休";
    position: absolute;
    bottom: 2px;
    right: 2px;
    font-size: 10px;
    color: #ff4d4f;
    font-weight: bold;
}

.hidden {
    display: none !important;
}

.mt-4 { margin-top: 20px; }
.mb-3 { margin-bottom: 15px; }
.ml-2 { margin-left: 10px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); font-size: 14px; }
.text-link { color: var(--primary); text-decoration: none; }
.text-link:hover { text-decoration: underline; }

.error-msg {
    color: var(--danger);
    font-size: 12px;
    margin-top: 5px;
}

.settings-note {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 14px;
}

/* Appointment List Items */
.appointment-item {
    background-color: #252525;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    border-left: 4px solid var(--text-muted);
}

.appointment-item.status-pending { border-left-color: #ff9800; }
.appointment-item.status-confirmed { border-left-color: var(--success); }
.appointment-item.status-rejected { border-left-color: var(--danger); }

.appointment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.appointment-date { font-weight: bold; font-size: 16px; }
.appointment-status { font-size: 12px; padding: 2px 8px; border-radius: 12px; background: #333; }
.status-badge-pending { color: #ff9800; }
.status-badge-confirmed { color: var(--success); }
.status-badge-rejected { color: var(--danger); }

.appointment-detail { font-size: 14px; color: var(--text-muted); margin-bottom: 5px; }
.appointment-actions { display: flex; gap: 10px; margin-top: 10px; }

/* Tabs */
.tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--surface-border);
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 12px;
    font-size: 16px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

/* Tags (Vacations) */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background-color: #333;
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tag-remove {
    cursor: pointer;
    color: var(--danger);
    font-weight: bold;
}

.vacation-list {
    display: grid;
    gap: 10px;
}

.vacation-item {
    padding: 12px;
    background: #252525;
    border: 1px solid var(--surface-border);
    border-radius: 8px;
    color: var(--text-main);
    font-weight: 500;
}

.unavailable-list {
    display: grid;
    gap: 12px;
}

.admin-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

.admin-calendar-day {
    min-height: 62px;
    padding: 7px 4px;
    background: #1b1b1b;
    border: 1px solid var(--surface-border);
    border-radius: 8px;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    overflow: hidden;
}

.admin-calendar-day:hover:not(:disabled) {
    border-color: var(--primary);
    background: #242424;
}

.admin-calendar-day.is-selected {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.admin-calendar-day.is-unavailable .day-number {
    color: #fff;
}

.admin-calendar-day.is-past {
    cursor: not-allowed;
    opacity: 0.45;
}

.admin-calendar-day:disabled {
    color: var(--text-muted);
}

.admin-calendar-day .day-status {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.unavailable-editor {
    display: grid;
    gap: 12px;
    margin-top: 14px;
    padding: 12px;
    background: #252525;
    border: 1px solid var(--surface-border);
    border-radius: 8px;
}

.unavailable-item {
    display: grid;
    gap: 10px;
    padding: 12px;
    background: #252525;
    border: 1px solid var(--surface-border);
    border-radius: 8px;
}

.unavailable-date {
    color: var(--primary);
    font-weight: 700;
    font-size: 14px;
}

.unavailable-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48px;
    gap: 8px;
    align-items: center;
}

.unavailable-controls input[type="color"] {
    height: 46px;
    padding: 4px;
    cursor: pointer;
}

.color-swatches {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.color-swatch {
    width: 28px;
    height: 28px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    cursor: pointer;
}

.unavailable-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Test calendar sticker editor */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.compact-header {
    margin-bottom: 16px;
    padding-top: 8px;
}

.sticker-editor-card {
    padding-bottom: 14px;
}

.sticker-calendar-shell {
    overflow: hidden;
    border-radius: 10px;
    background: #171717;
    border: 1px solid var(--surface-border);
}

.sticker-calendar-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 1px;
    background: var(--surface-border);
    user-select: none;
    -webkit-user-select: none;
}

.sticker-calendar-grid .calendar-weekday {
    min-width: 0;
    padding: 6px 0;
    background: #202020;
}

.sticker-editor-day {
    position: relative;
    min-width: 0;
    min-height: 76px;
    padding: 5px;
    background: #1b1b1b;
    border: 0;
    color: var(--text-main);
    text-align: left;
    overflow: visible;
    touch-action: manipulation;
}

.sticker-editor-day.is-outside {
    background: #151515;
    pointer-events: none;
}

.sticker-editor-day.is-selected-day {
    box-shadow: inset 0 0 0 2px var(--primary);
    background: rgba(201, 162, 99, 0.12);
}

.sticker-editor-day-number {
    position: relative;
    z-index: 2;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    pointer-events: none;
}

.calendar-sticker {
    position: absolute;
    left: calc(var(--sticker-x) * 100%);
    top: calc(var(--sticker-y) * 100%);
    width: calc(var(--sticker-size) * 1%);
    max-width: none;
    transform: translate(-50%, -50%) rotate(calc(var(--sticker-rotation) * 1deg));
    transform-origin: center;
    z-index: var(--sticker-z);
    cursor: grab;
    touch-action: none;
    -webkit-user-drag: none;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.45));
}

.calendar-sticker:active {
    cursor: grabbing;
}

.calendar-sticker.is-selected {
    outline: 2px solid #fff;
    outline-offset: 3px;
    border-radius: 4px;
}

.calendar-sticker.is-locked {
    cursor: pointer;
}

.calendar-sticker.is-locked.is-selected::after {
    content: "🔒";
    position: absolute;
    right: -14px;
    top: -18px;
    font-size: 13px;
}

.calendar-day.has-calendar-stickers {
    position: relative;
    overflow: visible;
}

.test-calendar-sticker {
    pointer-events: none;
}

.sticker-status {
    min-height: 22px;
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
}

.sticker-controls {
    position: sticky;
    bottom: 8px;
    z-index: 2000;
    margin-top: 12px;
    padding: 14px;
    border: 1px solid #454545;
    border-radius: 14px;
    background: rgba(30, 30, 30, 0.97);
    box-shadow: 0 -5px 24px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(10px);
}

.sticker-primary-actions {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 10px;
}

.sticker-upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sticker-transform-controls {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    align-items: center;
    gap: 8px 10px;
    margin-top: 12px;
}

.sticker-transform-controls.is-disabled {
    opacity: 0.48;
}

.sticker-transform-controls label {
    margin: 0;
    color: var(--text-main);
    font-size: 13px;
}

.sticker-transform-controls output {
    display: block;
    color: var(--primary);
    font-size: 12px;
}

.sticker-transform-controls input[type="range"] {
    height: 44px;
    padding: 0;
    touch-action: pan-x;
}

.sticker-tool-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.sticker-tool-btn {
    min-height: 46px;
    padding: 8px 5px;
    border: 1px solid #505050;
    border-radius: 9px;
    background: #292929;
    color: var(--text-main);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
}

.sticker-tool-btn.danger {
    border-color: rgba(255, 82, 82, 0.5);
    color: #ff8a8a;
}

.sticker-gesture-hint {
    margin-top: 9px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.45;
}

.sticker-page-links {
    display: grid;
    gap: 14px;
    margin-top: 18px;
    text-align: center;
}

/* Test-page calendar advertisements */
.test-ad-section {
    margin-bottom: 14px;
}

.test-ad-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 7;
    overflow: hidden;
    border: 1px solid var(--surface-border);
    border-radius: 14px;
    background: var(--surface-dark);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    touch-action: pan-y;
}

.test-ad-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 420ms ease;
    will-change: transform;
}

.test-ad-slide,
.test-ad-placeholder {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
}

.test-ad-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-user-drag: none;
    user-select: none;
}

.test-ad-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: var(--text-muted);
    background:
        linear-gradient(135deg, rgba(201, 162, 99, 0.12), transparent 52%),
        #1e1e1e;
}

.test-ad-placeholder strong {
    color: var(--primary);
    font-size: 18px;
}

.test-ad-placeholder span {
    font-size: 12px;
}

.test-ad-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 40px;
    height: 48px;
    transform: translateY(-50%);
    border: 0;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 22px;
}

.test-ad-prev { left: 0; border-radius: 0 10px 10px 0; }
.test-ad-next { right: 0; border-radius: 10px 0 0 10px; }

.test-ad-dots {
    display: flex;
    justify-content: center;
    gap: 7px;
    min-height: 18px;
    padding-top: 8px;
}

.test-ad-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #555;
}

.test-ad-dot.is-active {
    width: 22px;
    background: var(--primary);
}

/* The test calendar uses one compact availability badge per day so the entire
   booking calendar occupies roughly half of the original vertical space. */
.test-calendar-page .calendar-grid {
    grid-auto-rows: minmax(52px, 60px);
}

.test-calendar-page .calendar-day {
    min-height: 52px;
    padding: 4px;
}

.test-calendar-page .day-number {
    margin-bottom: 2px;
    font-size: 11px;
    line-height: 1.1;
}

.test-calendar-page .day-status {
    max-width: 100%;
    padding: 3px 4px;
    overflow: hidden;
    font-size: 9px;
    text-overflow: ellipsis;
}

.test-day-open {
    display: flex;
    flex-direction: column;
    gap: 1px;
    color: #b8f7c0;
    background: rgba(76, 175, 80, 0.2);
    line-height: 1.05;
    white-space: normal;
}

.test-day-open span,
.test-day-open strong {
    display: block;
    font-size: 8px;
    white-space: nowrap;
}

.test-day-full {
    color: var(--text-muted);
    background: #2a2a2a;
}

.test-calendar-day-interactive {
    cursor: pointer;
    touch-action: manipulation;
}

.test-calendar-day-interactive:active {
    transform: scale(0.96);
}

body.modal-open {
    overflow: hidden;
}

.time-slots-modal {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.time-slots-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(3px);
}

.time-slots-dialog {
    position: relative;
    width: min(100%, 440px);
    max-height: min(78vh, 620px);
    overflow-y: auto;
    padding: 18px;
    border: 1px solid #4a4a4a;
    border-radius: 18px;
    background: var(--surface-dark);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
}

.time-slots-handle {
    display: none;
    width: 42px;
    height: 4px;
    margin: 0 auto 12px;
    border-radius: 999px;
    background: #666;
}

.time-slots-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--surface-border);
}

.time-slots-header h2 {
    font-size: 19px;
}

.time-slots-close {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border: 1px solid var(--surface-border);
    border-radius: 999px;
    background: #292929;
    color: var(--text-main);
    font-size: 26px;
    line-height: 1;
}

.time-slots-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding-top: 16px;
}

.time-slot-chip {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(201, 162, 99, 0.5);
    border-radius: 10px;
    background: rgba(201, 162, 99, 0.14);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

.time-slots-empty {
    grid-column: 1 / -1;
    padding: 24px 10px;
    color: var(--text-muted);
    text-align: center;
}

/* Advertisement management */
.calendar-ad-admin-card {
    margin-bottom: 14px;
}

.calendar-ad-admin-list {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.calendar-ad-admin-item {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 9px;
    border: 1px solid var(--surface-border);
    border-radius: 10px;
    background: #252525;
}

.calendar-ad-admin-item > img {
    width: 112px;
    aspect-ratio: 16 / 7;
    object-fit: cover;
    border-radius: 7px;
}

.calendar-ad-admin-meta {
    min-width: 0;
}

.calendar-ad-admin-meta strong {
    display: block;
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-ad-admin-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    margin-top: 7px;
}

.calendar-ad-admin-actions .sticker-tool-btn {
    min-height: 40px;
    font-size: 12px;
}

@media (max-width: 520px) {
    .tabs .tab-btn {
        padding: 10px 4px;
        font-size: 13px;
    }

    .sticker-editor-day {
        min-height: 58px;
        padding: 3px;
    }

    .sticker-controls {
        bottom: 4px;
        padding: 11px;
    }

    .test-ad-viewport {
        border-radius: 10px;
    }

    .test-calendar-page .card {
        padding: 11px;
    }

    .test-calendar-page .calendar-toolbar {
        margin-bottom: 8px;
        padding-bottom: 8px;
    }

    .calendar-ad-admin-item {
        grid-template-columns: 88px minmax(0, 1fr);
    }

    .calendar-ad-admin-item > img {
        width: 88px;
    }

    .time-slots-modal {
        align-items: flex-end;
        padding: 0;
    }

    .time-slots-dialog {
        width: 100%;
        max-height: 76vh;
        padding: 14px 14px calc(18px + env(safe-area-inset-bottom));
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 20px 20px 0 0;
    }

    .time-slots-handle {
        display: block;
    }

    .time-slots-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }
}

@media (max-width: 520px) {
    .container {
        padding: 14px;
    }

    .card {
        padding: 14px;
    }

    .calendar-grid {
        gap: 4px;
    }

    .calendar-day {
        min-height: 74px;
        padding: 5px;
        border-radius: 6px;
    }

    .day-number {
        font-size: 12px;
        margin-bottom: 4px;
    }

    .day-slots {
        gap: 3px;
    }

    .day-slots span,
    .day-slots em {
        padding: 2px;
        font-size: 9px;
    }

    .admin-calendar-grid {
        gap: 4px;
    }

    .admin-calendar-day {
        min-height: 56px;
        padding: 5px 2px;
        border-radius: 6px;
    }

    .admin-calendar-day .day-status {
        padding: 3px 5px;
        font-size: 10px;
    }

    .unavailable-actions {
        justify-content: stretch;
    }

    .unavailable-actions .btn {
        flex: 1;
    }
}
