/* schedule.css - Estilos para el modulo Schedule (Breezeway Clone) */
:root {
    --bz-teal: #10b981;
    --bz-blue: #3b82f6;
    --bz-blue-light: #eff6ff;
    --bz-orange: #f59e0b;
    --bz-light-gray: #f9fafb;
    --bz-border: #e5e7eb;
    --bz-text-main: #1f2937;
    --bz-text-muted: #6b7280;
    --bz-grid-border: #e5e7eb;
    --bz-today-bg: #f0f7ff;

    --header-height: 65px;
    --row-min-height: 120px;
    --sidebar-width: 320px;
}

/* Contenedor Principal */
.schedule-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 120px);
    background-color: #fff;
    font-family: 'Inter', sans-serif;
    border: 1px solid var(--bz-border);
    border-radius: 8px;
    overflow: hidden;
}

/* Toolbar Superior */
.schedule-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background-color: #fff;
    border-bottom: 1px solid var(--bz-border);
    height: var(--header-height);
}

.toolbar-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.view-selector select {
    border: 1px solid var(--bz-border);
    padding: 5px 10px;
    border-radius: 4px;
    background: var(--bz-light-gray);
    color: var(--bz-text-main);
    font-size: 0.9rem;
}

.date-navigator {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.date-navigator button {
    background: none;
    border: none;
    color: var(--bz-text-muted);
    cursor: pointer;
    padding: 5px;
}

.date-navigator button:hover {
    color: var(--bz-text-main);
}

/* Grid General (Week / Day views) */
.schedule-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    position: relative;
}

.schedule-header-row {
    display: flex;
    background-color: #fff;
    border-bottom: 1px solid var(--bz-grid-border);
    z-index: 20;
    position: sticky;
    top: 0;
    box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.05);
}

.schedule-scrollable-body {
    flex: 1;
    overflow-y: auto;
    background-color: #fafafa;
}

.schedule-unit-row {
    display: flex;
    border-bottom: 1px solid var(--bz-grid-border);
    transition: background-color 0.25s ease;
}

.schedule-unit-row:hover {
    background-color: #f8fafc;
}

/* Barra Lateral de Unidades */
.sidebar-header-cell {
    width: 320px !important;
    min-width: 320px !important;
    max-width: 320px !important;
    flex-shrink: 0 !important;
    border-right: 1px solid var(--bz-grid-border);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 20px;
    font-weight: 700;
    color: #334155;
    font-size: 0.95rem;
    height: var(--header-height);
    background-color: #f8fafc;
    position: sticky;
    left: 0;
    z-index: 30;
    box-shadow: 4px 0 15px -5px rgba(0,0,0,0.03);
}

.premium-sidebar-cell {
    width: 320px !important;
    min-width: 320px !important;
    max-width: 320px !important;
    flex-shrink: 0 !important;
    min-height: var(--row-min-height);
    border-right: 1px solid var(--bz-grid-border);
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: #fff;
    position: sticky;
    left: 0;
    z-index: 10;
    box-shadow: 4px 0 15px -5px rgba(0,0,0,0.03);
    transition: background-color 0.25s ease;
}

.unit-info-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.unit-icon-box {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.5), 0 2px 5px rgba(59, 130, 246, 0.1);
}

.unit-details {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.unit-name {
    font-weight: 700;
    color: #1e293b;
    font-size: 1.05rem;
    line-height: 1.2;
    margin-bottom: 4px;
    white-space: normal;
}

.unit-address {
    font-size: 0.8rem;
    color: #64748b;
    white-space: normal;
}

.premium-status {
    font-size: 0.75rem;
    font-weight: 700;
    color: #065f46;
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 4px 10px;
    border-radius: 20px;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 48px; /* Align with text */
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

/* Lienzo de Tiempo (Time Canvas) */
.canvas-header-col {
    flex: 1;
    min-width: 160px;
    border-right: 1px solid var(--bz-grid-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 10px 0;
    height: var(--header-height);
}

.canvas-header-col.is-today {
    background-color: var(--bz-today-bg);
    color: var(--bz-blue);
}

.canvas-header-col.is-today span:first-child {
    color: var(--bz-blue);
}

.canvas-header-col span:first-child {
    font-size: 0.8rem;
    color: var(--bz-text-main);
    margin-bottom: 4px;
}

.canvas-header-col span:last-child {
    color: var(--bz-blue);
}

/* Filas del Grid */
.grid-cell {
    flex: 1;
    min-width: 160px;
    border-right: 1px solid var(--bz-grid-border);
    position: relative;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    transition: background-color 0.2s;
    height: var(--row-min-height);
}

.grid-cell.is-today {
    background-color: var(--bz-today-bg);
}

.grid-cell.drag-over {
    background-color: rgba(32, 201, 151, 0.1);
}

/* Tarjetas (Events) */
.task-card {
    background-color: #fff;
    border: 1px solid var(--bz-border);
    border-radius: 4px;
    border-left: 4px solid var(--bz-teal);
    padding: 8px 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    cursor: grab;
    z-index: 5;
    display: flex;
    flex-direction: column;
    transition: transform 0.1s, box-shadow 0.1s;
    margin-bottom: 5px;
}

.task-card:active {
    cursor: grabbing;
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.task-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--bz-text-main);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.task-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: 1px solid currentColor;
    background-color: transparent;
}

.task-subtitle {
    font-size: 0.8rem;
    color: var(--bz-text-main);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 12px;
}

.task-subtitle i {
    color: var(--bz-blue);
}

/* Colores Dinámicos */
.card-teal {
    border-left-color: var(--bz-teal);
}

.card-blue {
    border-left-color: var(--bz-blue);
}

.card-orange {
    border-left-color: var(--bz-orange);
}

/* Vistas de Mes */
.month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: auto repeat(5, 1fr);
    height: 100%;
}

.month-header-cell {
    text-align: center;
    padding: 10px;
    font-weight: 600;
    border-bottom: 1px solid var(--bz-grid-border);
    border-right: 1px solid var(--bz-grid-border);
    background-color: var(--bz-light-gray);
}

.month-cell {
    border-right: 1px solid var(--bz-grid-border);
    border-bottom: 1px solid var(--bz-grid-border);
    padding: 5px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
}

.month-date-number {
    font-weight: 600;
    color: var(--bz-text-muted);
    align-self: flex-start;
    margin-bottom: 5px;
}

.month-summary-item {
    font-size: 0.75rem;
    padding: 2px 4px;
    margin-bottom: 2px;
    border-radius: 4px;
    background-color: var(--bz-light-gray);
    display: flex;
    justify-content: space-between;
}

/* Offcanvas Customizations */
.task-offcanvas {
    width: 400px !important;
    border-left: 1px solid var(--bz-border);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.05);
}

.task-offcanvas-header {
    background-color: var(--bz-light-gray);
    border-bottom: 1px solid var(--bz-border);
}