:root {
    --color-primary: #1976d2;
    --color-primary-dark: #1565c0;
    --color-secondary: #27ae60;
    --color-secondary-dark: #219a52;
    --color-success: #27ae60;
    --color-warning: #e67e22;
    --color-danger: #e74c3c;
    --color-info: #3498db;
    --color-gray: #7f8c8d;
    --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.12);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.18);
    --font-base: 13px;
}

.isw-calendar-wrapper {
    display: block;
    min-height: calc(100vh - 180px);
    background: #f5f7fa;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    margin: 0;
    font-size: var(--font-base);
}

.isw-calendar-header {
    background: var(--color-primary);
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.isw-calendar-header h1 {
    color: white;
    margin: 0;
    font-size: 1.6em;
    font-weight: 700;
}

.isw-calendar-header h1 i {
    margin-right: 10px;
}

.isw-calendar-filters {
    display: flex;
    gap: 12px;
    align-items: center;
}

.isw-calendar-filters select {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 14px;
    color: var(--color-primary-dark);
    font-weight: 600;
    font-size: var(--font-base);
    min-width: 160px;
    transition: all 0.2s ease;
}

.isw-calendar-filters select:focus {
    outline: none;
    border-color: #fff;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.3);
}

.isw-calendar-filters button {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    padding: 10px 18px;
    font-weight: 700;
    font-size: var(--font-base);
    cursor: pointer;
    transition: all 0.2s ease;
}

.isw-calendar-filters button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
}

.isw-calendar-main {
    padding: 16px;
    background: #fff;
}

#isw_calendar,
#isw-setup-fullcalendar {
    min-height: 580px;
    background: white;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    font-size: var(--font-base);
}

.fc {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: var(--font-base);
}

.fc .fc-toolbar {
    padding: 16px 20px;
    background: #e8eef4;
    margin-bottom: 0;
}

.fc .fc-toolbar-title {
    color: var(--color-primary-dark);
    font-weight: 700;
    font-size: 1.4em;
}

.fc .fc-button-primary {
    background: var(--color-primary);
    border: none;
    padding: 8px 14px;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 4px rgba(25, 118, 210, 0.25);
}

.fc .fc-button-primary:hover {
    background: var(--color-primary-dark);
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.35);
}

.fc .fc-button-primary:not(:disabled).fc-button-active {
    background: var(--color-secondary);
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.35);
}

.fc .fc-today-button {
    background: var(--color-secondary);
    border: none;
    box-shadow: 0 1px 4px rgba(39, 174, 96, 0.25);
}

.fc .fc-today-button:hover {
    background: var(--color-secondary-dark);
}

.fc-theme-standard td, 
.fc-theme-standard th {
    border-color: #d0d7de;
}

.fc .fc-col-header-cell {
    background: #e8eef4;
    padding: 12px 8px;
    font-weight: 700;
    font-size: 12px;
    color: var(--color-primary-dark);
    text-transform: uppercase;
    border-bottom: 2px solid var(--color-primary);
}

.fc .fc-daygrid-day-number {
    font-size: 13px;
    font-weight: 600;
    padding: 6px 8px;
    color: #333;
}

.fc .fc-daygrid-day.fc-day-today {
    background: rgba(39, 174, 96, 0.08);
}

.fc .fc-daygrid-day.fc-day-today .fc-daygrid-day-number {
    background: var(--color-secondary);
    color: #fff;
    padding: 4px 8px;
}

.fc .fc-daygrid-day:hover {
    background: rgba(25, 118, 210, 0.04);
}

.fc .fc-timegrid-slot {
    font-size: 11px;
}

.fc .fc-timegrid-slot-label-cushion {
    font-size: 11px;
    font-weight: 600;
}

.fc .fc-list-event {
    font-size: 13px;
}

.fc .fc-list-day-cushion {
    font-size: 13px;
    font-weight: 700;
    background: #e8eef4;
}

.fc-event {
    border: none !important;
    padding: 3px 6px !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) !important;
}

.fc-event:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2) !important;
}

.fc-event[data-status="0"] {
    background: var(--color-info) !important;
    color: white !important;
}

.fc-event[data-status="1"] {
    background: var(--color-success) !important;
    color: white !important;
}

.fc-event[data-status="2"] {
    background: var(--color-warning) !important;
    color: white !important;
}

.fc-event[data-status="3"] {
    background: var(--color-gray) !important;
    color: white !important;
}

.fc-event[data-status="4"],
.fc-event[data-status="5"] {
    background: var(--color-danger) !important;
    color: white !important;
}

.fc .fc-timegrid-now-indicator-line {
    border-color: var(--color-danger);
    border-width: 2px;
}

.fc .fc-daygrid-event-dot {
    border-color: currentColor;
}

.fc .fc-popover {
    box-shadow: var(--shadow-hover);
}

.fc .fc-popover-header {
    background: var(--color-primary);
    color: #fff;
    font-weight: 700;
    padding: 8px 12px;
}

@media (max-width: 768px) {
    .isw-calendar-wrapper {
        margin: 0;
    }
    
    .isw-calendar-header {
        padding: 16px;
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .isw-calendar-header h1 {
        font-size: 1.3em;
    }
    
    .isw-calendar-filters {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }
    
    .isw-calendar-filters select,
    .isw-calendar-filters button {
        width: 100%;
        min-width: auto;
    }
    
    .isw-calendar-main {
        padding: 10px;
    }
    
    #isw_calendar,
    #isw-setup-fullcalendar {
        min-height: 450px;
    }
    
    .fc .fc-toolbar {
        padding: 12px;
        flex-direction: column;
        gap: 12px;
    }
    
    .fc .fc-toolbar-title {
        font-size: 1.2em;
        order: -1;
    }
    
    .fc .fc-button-group {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        justify-content: center;
    }
    
    .fc .fc-button {
        padding: 6px 10px;
        font-size: 12px;
    }
}

.iswcp-overlay {
    background: rgba(0, 0, 0, 0.5);
}

.iswcp-panel {
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.2);
    font-size: var(--font-base);
}

.button-cancel {
    background: var(--color-gray) !important;
    border: none !important;
    color: white !important;
    transition: all 0.2s ease !important;
}

.button-cancel:hover {
    background: #6c7a7d !important;
}

.btn-new-cita {
    background: var(--color-secondary);
    border: none;
    color: white;
    padding: 10px 20px;
    font-weight: 700;
    font-size: var(--font-base);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.25);
}

.btn-new-cita:hover {
    background: var(--color-secondary-dark);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.35);
}

.btn-new-cita i {
    margin-right: 6px;
}

.fc-day-today .fc-daygrid-day-frame {
    background: rgba(39, 174, 96, 0.06);
}

.fc .fc-daygrid-day.fc-day-other {
    background: #fafbfc;
}

.fc .fc-daygrid-day.fc-day-other .fc-daygrid-day-number {
    color: #aaa;
}

.fc .fc-scrollgrid {
    border: 1px solid #d0d7de;
}

.fc .fc-scrollgrid-section > td {
    border: none;
}

.fc-h-event .fc-event-main {
    padding: 1px 4px;
}

.fc-daygrid-event {
    margin: 1px 2px;
}

.fc .fc-button-group > .fc-button {
    margin-left: -1px;
}

.fc .fc-button-group > .fc-button:first-child {
    margin-left: 0;
}
