/* CALENDAR.CSS - Calendario Corporativo */
/* Mobile-first: estilos base = celular, min-width = tablet/desktop */

/* ==================== CONTAINER ==================== */
.cal-page {
    padding: 12px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ==================== HERO HEADER ==================== */
.cal-hero {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--color-primary, #6D00FF) 0%, #8B5CF6 50%, #A855F7 100%);
    border-radius: 14px;
    color: white;
    position: relative;
    overflow: hidden;
}

.cal-hero::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -10%;
    width: 280px;
    height: 280px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    pointer-events: none;
}

.cal-hero::after {
    content: "";
    position: absolute;
    bottom: -60%;
    left: -10%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    pointer-events: none;
}

.cal-hero-content {
    position: relative;
    z-index: 1;
}

.cal-hero-content h1 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 4px;
    color: white;
}

.cal-hero-content p {
    font-size: 0.85rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.92);
}

.cal-hero-action {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: white;
    color: var(--color-primary, #6D00FF);
    border: none;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    align-self: flex-start;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cal-hero-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* ==================== TABS ==================== */
.cal-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--color-border, #f0f0f0);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.cal-tabs::-webkit-scrollbar { display: none; }

.cal-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    color: var(--color-text-light, #666);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    white-space: nowrap;
    min-height: 44px;
}

.cal-tab:hover {
    color: var(--color-primary);
    background: rgba(var(--color-primary-rgb, 109, 0, 255), 0.05);
}

.cal-tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* ==================== ROOMS TAB ==================== */
.cal-rooms-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.cal-room-card {
    background: var(--color-bg-card, #fff);
    border: 1px solid var(--color-border, #e0e0e0);
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.cal-room-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.cal-room-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-bottom: 1px solid var(--color-border, #f0f0f0);
}

.cal-room-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(46, 125, 50, 0.12);
    border-radius: 10px;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.cal-room-info {
    flex: 1;
    min-width: 0;
}

.cal-room-info h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 2px;
}

.cal-room-info p {
    font-size: 0.75rem;
    color: var(--color-text-light);
    margin: 0;
    line-height: 1.4;
}

.cal-room-book-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: var(--color-primary, #6D00FF);
    color: white;
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    flex-shrink: 0;
    line-height: 1;
}

.cal-room-book-btn:hover {
    transform: rotate(90deg);
    box-shadow: 0 4px 12px rgba(var(--color-primary-rgb, 109, 0, 255), 0.4);
}

.cal-room-today {
    padding: 12px 14px;
    background: var(--color-surface, #f8f8fc);
    border-bottom: 1px solid var(--color-border, #f0f0f0);
}

.cal-room-today-label {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 6px;
}

.cal-room-today-status.free {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #2E7D32;
}

.cal-room-today-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cal-room-today-item {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 0.78rem;
}

.cal-room-today-time {
    font-weight: 600;
    color: var(--color-primary);
    min-width: 90px;
}

.cal-room-today-user {
    color: var(--color-text-light);
}

.cal-room-mini {
    padding: 12px 14px;
}

.cal-room-mini-month {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-light);
    text-align: center;
    margin-bottom: 8px;
    text-transform: capitalize;
}

.cal-room-mini-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 4px;
}

.cal-room-mini-weekdays span {
    text-align: center;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--color-text-light);
    opacity: 0.6;
}

.cal-room-mini-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.cal-room-mini-day {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    border-radius: 6px;
    background: transparent;
    color: var(--color-text);
    font-weight: 500;
    transition: all 0.15s ease;
}

.cal-room-mini-day.other-month {
    opacity: 0.25;
}

.cal-room-mini-day.today {
    background: var(--color-primary);
    color: white;
    font-weight: 700;
}

.cal-room-mini-day.has-reservation {
    background: rgba(var(--color-primary-rgb, 109, 0, 255), 0.18);
    color: var(--color-primary);
    font-weight: 600;
    box-shadow: 0 0 0 1.5px rgba(var(--color-primary-rgb, 109, 0, 255), 0.3) inset;
}

.cal-room-mini-day.has-reservation.today {
    background: var(--color-primary);
    color: white;
    box-shadow: none;
}

/* ==================== HEADER ==================== */
.cal-header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 16px;
    gap: 12px;
}

.cal-header-content h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text, #1a1a2e);
    margin: 0 0 2px 0;
}

.cal-header-content p {
    color: var(--color-text-light, #666);
    font-size: 0.8rem;
    margin: 0;
}

.cal-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ==================== VIEW TOGGLE ==================== */
.cal-view-toggle {
    display: flex;
    background: var(--color-surface, #f5f5f5);
    border-radius: var(--radius-md, 10px);
    padding: 3px;
    gap: 2px;
}

.cal-view-btn {
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius-sm, 8px);
    background: transparent;
    color: var(--color-text-light, #666);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.cal-view-btn.active {
    background: var(--color-bg-card, #fff);
    color: var(--color-primary, #6D00FF);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

.cal-view-btn:hover:not(.active) {
    color: var(--color-text, #333);
}

/* ==================== FILTERS ==================== */
.cal-filters {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
}

.cal-filters::-webkit-scrollbar {
    display: none;
}

.cal-filter-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--color-border, #e0e0e0);
    border-radius: 20px;
    background: var(--color-bg-card, #fff);
    color: var(--color-text-light, #666);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    white-space: nowrap;
}

.cal-filter-btn.active {
    border-color: var(--filter-color);
    color: var(--filter-color);
    background: color-mix(in srgb, var(--filter-color) 8%, transparent);
}

.cal-filter-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--filter-color);
    flex-shrink: 0;
}

.cal-filter-btn:not(.active) .cal-filter-dot {
    opacity: 0.3;
}

/* ==================== NAVIGATION ==================== */
.cal-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.cal-nav-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border, #e0e0e0);
    border-radius: var(--radius-sm, 8px);
    background: var(--color-bg-card, #fff);
    color: var(--color-text, #333);
    cursor: pointer;
    transition: all 0.2s ease;
}

.cal-nav-btn:hover {
    background: var(--color-surface, #f5f5f5);
    color: var(--color-primary, #6D00FF);
}

.cal-nav-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text, #1a1a2e);
    min-width: 160px;
    text-align: center;
}

.cal-nav-today {
    padding: 6px 14px;
    border: 1px solid var(--color-border, #e0e0e0);
    border-radius: var(--radius-sm, 8px);
    background: var(--color-bg-card, #fff);
    color: var(--color-text, #333);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    margin-left: auto;
}

.cal-nav-today:hover {
    background: var(--color-primary, #6D00FF);
    color: white;
    border-color: var(--color-primary, #6D00FF);
}

/* ==================== MONTH GRID ==================== */
.cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 2px;
}

.cal-weekday {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-text-light, #999);
    padding: 8px 0;
    text-transform: uppercase;
}

.cal-month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.cal-day {
    min-height: 70px;
    padding: 6px;
    background: var(--color-bg-card, #fff);
    border: 1px solid var(--color-border, #eee);
    border-radius: var(--radius-sm, 6px);
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    overflow: hidden;
}

.cal-day:hover {
    border-color: var(--color-primary, #6D00FF);
    box-shadow: 0 2px 8px rgba(var(--color-primary-rgb, 109, 0, 255), 0.1);
}

.cal-day.other-month {
    opacity: 0.35;
}

.cal-day.today {
    border-color: var(--color-primary, #6D00FF);
    background: rgba(var(--color-primary-rgb, 109, 0, 255), 0.04);
}

.cal-day.has-mine {
    background: rgba(var(--color-primary-rgb, 109, 0, 255), 0.06);
}

.cal-day.has-mine::after {
    content: "";
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-primary, #6D00FF);
    box-shadow: 0 0 0 2px var(--color-bg-card, #fff), 0 0 8px rgba(var(--color-primary-rgb, 109, 0, 255), 0.6);
}

.cal-day.has-mine.today {
    background: rgba(var(--color-primary-rgb, 109, 0, 255), 0.1);
    box-shadow: 0 0 0 2px var(--color-primary, #6D00FF) inset;
}

.cal-day.selected {
    border-color: var(--color-primary, #6D00FF);
    box-shadow: 0 0 0 2px rgba(var(--color-primary-rgb, 109, 0, 255), 0.2);
}

.cal-day-number {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--color-text, #333);
    margin-bottom: 4px;
}

.cal-day.today .cal-day-number {
    background: var(--color-primary, #6D00FF);
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
}

.cal-day-events {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cal-event-bar {
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 0.6rem;
    font-weight: 500;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.cal-event-bar.mine {
    font-weight: 700;
    padding: 2px 6px;
    box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.5) inset, 0 1px 4px rgba(0, 0, 0, 0.15);
    position: relative;
    transform: scale(1.02);
    transform-origin: left center;
    letter-spacing: 0.2px;
}

.cal-event-bar.mine::before {
    content: "★ ";
    font-size: 0.65rem;
    margin-right: 1px;
}

.cal-event-bar.not-mine {
    opacity: 0.35;
    background-color: transparent !important;
    color: var(--color-text-light, #888);
    border: 1px dashed currentColor;
    font-size: 0.55rem;
    padding: 0px 4px;
}

.cal-event-dots {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.cal-event-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.cal-day-more {
    font-size: 0.6rem;
    color: var(--color-text-light, #999);
    margin-top: 2px;
}

/* ==================== WEEK VIEW ==================== */
.cal-week-header {
    display: grid;
    grid-template-columns: 50px repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 2px;
}

.cal-week-header-day {
    text-align: center;
    padding: 8px 4px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-text-light, #999);
}

.cal-week-header-day .cal-week-date {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text, #333);
    margin-top: 2px;
}

.cal-week-header-day.today .cal-week-date {
    background: var(--color-primary, #6D00FF);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cal-week-allday {
    display: grid;
    grid-template-columns: 50px repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 4px;
    min-height: 24px;
}

.cal-week-allday-label {
    font-size: 0.65rem;
    color: var(--color-text-light, #999);
    padding: 4px;
    display: flex;
    align-items: center;
}

.cal-week-allday-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 2px;
}

.cal-week-grid {
    display: grid;
    grid-template-columns: 50px repeat(7, 1fr);
    gap: 0;
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid var(--color-border, #eee);
    border-radius: var(--radius-sm, 6px);
}

.cal-week-time {
    font-size: 0.65rem;
    color: var(--color-text-light, #999);
    padding: 4px;
    text-align: right;
    border-bottom: 1px solid var(--color-border, #f0f0f0);
    min-height: 40px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}

.cal-week-cell {
    border-bottom: 1px solid var(--color-border, #f0f0f0);
    border-left: 1px solid var(--color-border, #f0f0f0);
    min-height: 40px;
    position: relative;
    padding: 1px;
}

.cal-week-cell:hover {
    background: rgba(var(--color-primary-rgb, 109, 0, 255), 0.02);
}

.cal-week-event {
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 0.6rem;
    font-weight: 500;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 1px;
}

.cal-week-event.mine {
    font-weight: 700;
    box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.4) inset;
}

.cal-week-event.not-mine {
    opacity: 0.55;
    background-color: transparent !important;
    color: var(--color-text-light, #888);
    border: 1px dashed currentColor;
}

/* ==================== DAY DETAIL PANEL ==================== */
.cal-day-detail {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg-card, #fff);
    z-index: 500;
    flex-direction: column;
    animation: calSlideIn 0.25s ease;
}

.cal-day-detail.active {
    display: flex;
}

@keyframes calSlideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.cal-day-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--color-border, #e0e0e0);
    flex-shrink: 0;
}

.cal-day-detail-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text, #1a1a2e);
    margin: 0;
}

.cal-day-detail-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--color-surface, #f5f5f5);
    border-radius: var(--radius-sm, 8px);
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--color-text-light, #666);
    transition: all 0.2s ease;
}

.cal-day-detail-close:hover {
    background: var(--color-border, #e0e0e0);
}

.cal-day-detail-events {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ==================== EVENT CARD ==================== */
.cal-event-card {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--color-bg-card, #fff);
    border: 1px solid var(--color-border, #e0e0e0);
    border-left: 4px solid var(--event-color);
    border-radius: var(--radius-sm, 8px);
    transition: box-shadow 0.2s ease;
}

.cal-event-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.cal-event-card-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--event-color) 10%, transparent);
    border-radius: var(--radius-sm, 8px);
}

.cal-event-card-info {
    flex: 1;
    min-width: 0;
}

.cal-event-card-info h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text, #1a1a2e);
    margin: 0 0 2px 0;
}

.cal-event-card-info p {
    font-size: 0.75rem;
    color: var(--color-text-light, #666);
    margin: 0 0 2px 0;
}

.cal-event-type-badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--event-color);
    background: color-mix(in srgb, var(--event-color) 10%, transparent);
}

.cal-event-badges-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.cal-event-mine-badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 600;
    color: white;
    background: var(--event-color);
}

.cal-event-count {
    font-size: 0.65rem;
    color: var(--color-text-light);
    font-weight: 500;
}

.cal-event-confirm-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.cal-event-confirm,
.cal-event-decline {
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.cal-event-confirm {
    background: rgba(46, 125, 50, 0.15);
    color: #2E7D32;
}

.cal-event-confirm:hover:not(:disabled) {
    background: #2E7D32;
    color: white;
}

.cal-event-decline {
    background: rgba(198, 40, 40, 0.12);
    color: #C62828;
}

.cal-event-decline:hover:not(:disabled) {
    background: #C62828;
    color: white;
}

.cal-event-confirm:disabled,
.cal-event-decline:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cal-event-status {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
}

.cal-event-status.accepted {
    background: rgba(46, 125, 50, 0.15);
    color: #2E7D32;
}

.cal-event-status.declined {
    background: rgba(198, 40, 40, 0.12);
    color: #C62828;
}

.cal-event-card.not-mine {
    opacity: 0.65;
}

.cal-event-card.not-mine .cal-event-card-icon {
    opacity: 0.7;
}

.cal-event-card-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.cal-gcal-link {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border, #e0e0e0);
    border-radius: var(--radius-sm, 6px);
    background: var(--color-bg-card, #fff);
    color: var(--color-text-light, #666);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-size: 0.85rem;
}

.cal-gcal-link:hover {
    background: var(--color-surface, #f5f5f5);
    color: #4285F4;
    border-color: #4285F4;
}

/* ==================== EMPTY STATE ==================== */
.cal-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 32px 20px;
}

.cal-empty .empty-icon {
    font-size: 36px;
    opacity: 0.5;
    margin-bottom: 8px;
}

.cal-empty p {
    font-size: 0.85rem;
    color: var(--color-text-light, #888);
    margin: 0;
}

/* ==================== LEGEND ==================== */
.cal-legend {
    display: flex;
    gap: 16px;
    justify-content: center;
    padding: 12px 0;
    margin-top: 8px;
    flex-wrap: wrap;
}

.cal-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: var(--color-text-light, #666);
}

.cal-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ==================== LOADING ==================== */
.cal-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--color-text-light, #999);
    font-size: 0.85rem;
}

/* ==================== RESPONSIVE ==================== */
@media (min-width: 769px) {
    .cal-page {
        padding: 20px;
    }

    .cal-hero {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 24px 28px;
    }

    .cal-hero-content h1 {
        font-size: 1.75rem;
    }

    .cal-hero-content p {
        font-size: 0.95rem;
    }

    .cal-rooms-grid {
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
        gap: 18px;
    }


    .cal-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 24px;
    }

    .cal-header-content h1 {
        font-size: 1.5rem;
    }

    .cal-header-content p {
        font-size: 0.9rem;
    }

    .cal-day {
        min-height: 90px;
        padding: 8px;
    }

    .cal-day-number {
        font-size: 0.85rem;
    }

    .cal-day-detail {
        width: 380px;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
        border-left: 1px solid var(--color-border, #e0e0e0);
    }

    .cal-nav-title {
        font-size: 1.1rem;
    }
}

/* ==================== DARK MODE ==================== */
[data-theme="dark"] .cal-header-content h1 {
    color: #e0e0e0;
}

[data-theme="dark"] .cal-header-content p {
    color: #a0a0a0;
}

[data-theme="dark"] .cal-view-toggle {
    background: #252545;
}

[data-theme="dark"] .cal-view-btn.active {
    background: #1e1e3a;
    color: #a855f7;
}

[data-theme="dark"] .cal-filter-btn {
    background: #1e1e3a;
    border-color: #3a3a5c;
    color: #a0a0a0;
}

[data-theme="dark"] .cal-filter-btn.active {
    background: color-mix(in srgb, var(--filter-color) 12%, #1e1e3a);
}

[data-theme="dark"] .cal-nav-btn,
[data-theme="dark"] .cal-nav-today {
    background: #1e1e3a;
    border-color: #3a3a5c;
    color: #e0e0e0;
}

[data-theme="dark"] .cal-nav-title {
    color: #e0e0e0;
}

[data-theme="dark"] .cal-weekday {
    color: #666;
}

[data-theme="dark"] .cal-day {
    background: #1e1e3a;
    border-color: #2a2a4a;
}

[data-theme="dark"] .cal-day.today {
    background: rgba(168, 85, 247, 0.08);
    border-color: #a855f7;
}

[data-theme="dark"] .cal-day.has-mine {
    background: rgba(168, 85, 247, 0.1);
}

[data-theme="dark"] .cal-day.has-mine::after {
    background: #a855f7;
    box-shadow: 0 0 0 2px #1e1e3a, 0 0 8px rgba(168, 85, 247, 0.7);
}

[data-theme="dark"] .cal-day.has-mine.today {
    background: rgba(168, 85, 247, 0.15);
    box-shadow: 0 0 0 2px #a855f7 inset;
}

[data-theme="dark"] .cal-day-number {
    color: #e0e0e0;
}

[data-theme="dark"] .cal-day-detail {
    background: #1a1a2e;
    border-color: #3a3a5c;
}

[data-theme="dark"] .cal-day-detail-header {
    border-color: #3a3a5c;
}

[data-theme="dark"] .cal-day-detail-header h3 {
    color: #e0e0e0;
}

[data-theme="dark"] .cal-day-detail-close {
    background: #252545;
    color: #a0a0a0;
}

[data-theme="dark"] .cal-event-card {
    background: #252545;
    border-color: #3a3a5c;
}

[data-theme="dark"] .cal-event-card-info h4 {
    color: #e0e0e0;
}

[data-theme="dark"] .cal-gcal-link {
    background: #1e1e3a;
    border-color: #3a3a5c;
    color: #a0a0a0;
}

[data-theme="dark"] .cal-week-grid {
    border-color: #2a2a4a;
}

[data-theme="dark"] .cal-week-time {
    color: #666;
    border-color: #2a2a4a;
}

[data-theme="dark"] .cal-week-cell {
    border-color: #2a2a4a;
}

[data-theme="dark"] .cal-tabs {
    border-bottom-color: #3a3a5c;
}

[data-theme="dark"] .cal-tab {
    color: #a0a0a0;
}

[data-theme="dark"] .cal-tab.active {
    color: #a855f7;
    border-bottom-color: #a855f7;
}

[data-theme="dark"] .cal-room-card {
    background: #1e1e3a;
    border-color: #3a3a5c;
}

[data-theme="dark"] .cal-room-info h3 {
    color: #e0e0e0;
}

[data-theme="dark"] .cal-room-today {
    background: #16162a;
    border-color: #2a2a4a;
}

[data-theme="dark"] .cal-room-mini-day {
    color: #d0d0d0;
}

[data-theme="dark"] .cal-room-mini-day.has-reservation {
    background: rgba(168, 85, 247, 0.25);
    color: #c4b5fd;
}
