﻿/* TABS */
.oda-tabs {
    background: var(--secondary-color-dark);
    display: flex;
    padding: 0 22px;
    margin: 0;
}

.oda-tab-btn {
    padding: 10px 18px;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,0.55);
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s, border-color 0.2s;
    text-transform: uppercase;
}

    .oda-tab-btn:hover {
        color: rgba(255,255,255,0.9);
    }

    .oda-tab-btn.active {
        color: var(--primary-color-light);
        border-bottom-color: var(--primary-color);
    }

/* BODY */
.oda-body {
    background: #f3f5f8;
    border: 1px solid #d0d7e3;
    border-top: none;
    border-radius: 0 0 6px 6px;
    padding: 18px;
}

.oda-view {
    display: none;
}

    .oda-view.active {
        display: block;
    }

/* DATATABLE overrides */
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 0;
}

    .dataTables_wrapper .dataTables_filter input {
        border: 1px solid #d0d7e3;
        border-radius: 3px;
        padding: 5px 10px;
        font-size: 12px;
    }

.dataTables_wrapper .dataTables_length select {
    border: 1px solid #d0d7e3;
    border-radius: 3px;
    padding: 4px 8px;
    font-size: 12px;
    background: white;
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    font-size: 12px;
}

#tblOrdenDia thead tr {
    background: var(--secondary-color) !important;
}

#tblOrdenDia thead th {
    color: white !important;
    text-align: center !important;
    font-size: 11px;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 9px 12px;
}

#tblOrdenDia tbody tr {
    border-bottom: 1px solid #e4e9f0;
}

    #tblOrdenDia tbody tr:hover {
        background: #eef3fb !important;
    }

#tblOrdenDia tbody td {
    padding: 8px 12px;
    font-size: 12px;
    vertical-align: middle;
}

.fecha-chip {
    background: #e4ecf7;
    color: var(--secondary-color);
    font-size: 10px;
    padding: 3px 7px;
    border-radius: 3px;
    font-weight: 700;
    white-space: nowrap;
    display: inline-block;
}

.paginate_button.current,
.paginate_button.current:hover {
    background: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
    color: white !important;
}

.paginate_button:hover {
    background: #eef3fb !important;
    border-color: #d0d7e3 !important;
    color: var(--secondary-color) !important;
}

/* ESTADÍSTICAS */
.cal-stats {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 10px;
    margin-bottom: 14px;
}

.cal-stat-card {
    background: white;
    border: 1px solid #d0d7e3;
    border-radius: 5px;
    padding: 10px;
    text-align: center;
    border-top: 3px solid var(--primary-color);
}

.cal-stat-num {
    font-size: 22px;
    font-weight: 700;
    color: var(--secondary-color);
}

.cal-stat-label {
    font-size: 10px;
    color: #7a8a9e;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 2px;
}

/* LEYENDA */
.cal-legend {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
    font-size: 11px;
    color: #7a8a9e;
    flex-wrap: wrap;
}

.cal-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.cal-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* CALENDARIO */
.cal-wrap {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.cal-panel {
    background: white;
    border: 1px solid #d0d7e3;
    border-radius: 6px;
    flex: 1;
    min-width: 270px;
    overflow: hidden;
}

.cal-panel-header {
    background: var(--secondary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
}

    .cal-panel-header h3 {
        font-size: 13px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.07em;
        margin: 0;
    }

.cal-nav-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    border-radius: 3px;
    width: 26px;
    height: 26px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

    .cal-nav-btn:hover {
        background: rgba(255,255,255,0.15);
    }

.cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7,1fr);
    background: var(--secondary-color-dark);
}

.cal-weekday {
    text-align: center;
    color: var(--primary-color-light);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 5px 2px;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7,1fr);
    padding: 6px;
    gap: 2px;
}

.cal-cell {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    cursor: default;
    font-size: 11px;
    color: #1a2233;
    position: relative;
    transition: all 0.15s;
    user-select: none;
}

    .cal-cell.empty {
        pointer-events: none;
    }

    .cal-cell.other-month {
        color: #c0c8d6;
    }

    .cal-cell.today {
        background: #e4ecf7;
        color: var(--secondary-color);
        font-weight: 700;
    }

    .cal-cell.has-docs {
        font-weight: 700;
        color: var(--secondary-color);
        cursor: pointer;
    }

        .cal-cell.has-docs:hover {
            background: #eef3fb;
        }

        .cal-cell.has-docs::after {
            content: '';
            width: 5px;
            height: 5px;
            border-radius: 50%;
            background: var(--primary-color);
            position: absolute;
            bottom: 2px;
        }

    .cal-cell.selected {
        background: var(--secondary-color) !important;
        color: white !important;
    }

        .cal-cell.selected::after {
            background: var(--primary-color-light);
        }

/* PANEL DETALLE */
.cal-detail {
    background: white;
    border: 1px solid #d0d7e3;
    border-radius: 6px;
    flex: 1;
    min-width: 240px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cal-detail-header {
    background: var(--primary-color);
    padding: 11px 14px;
}

    .cal-detail-header h4 {
        font-size: 12px;
        font-weight: 700;
        color: white;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        margin: 0;
    }

    .cal-detail-header p {
        font-size: 10px;
        color: white;
        margin: 2px 0 0 0;
    }

.cal-detail-body {
    padding: 10px;
    flex: 1;
    max-height: 320px;
    overflow-y: auto;
}

.cal-empty-msg {
    text-align: center;
    padding: 24px 12px;
    color: #7a8a9e;
    font-size: 12px;
}

.cal-empty-icon {
    font-size: 28px;
    margin-bottom: 8px;
    opacity: 0.35;
}

.cal-doc-item {
    border: 1px solid #d0d7e3;
    border-radius: 4px;
    padding: 9px 10px;
    margin-bottom: 7px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f3f5f8;
    transition: border-color 0.15s, background 0.15s;
}

    .cal-doc-item:hover {
        border-color: var(--secondary-color);
        background: #eef3fb;
    }

.cal-doc-num {
    background: var(--secondary-color);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 2px;
    flex-shrink: 0;
}

.cal-doc-info {
    flex: 1;
    min-width: 0;
}

.cal-doc-name {
    font-size: 11px;
    color: #1a2233;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cal-doc-time {
    font-size: 10px;
    color: #7a8a9e;
    margin-top: 1px;
}

.cal-doc-dl {
    background: #1a6b3a;
    color: white;
    border: none;
    padding: 5px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
    flex-shrink: 0;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transition: background 0.2s;
}

    .cal-doc-dl:hover {
        background: #145530;
        color: white;
        text-decoration: none;
    }

.cal-loading {
    text-align: center;
    padding: 20px;
    color: #7a8a9e;
    font-size: 12px;
}

.cal-loading-detail {
    text-align: center;
    padding: 30px 12px;
    color: #7a8a9e;
    font-size: 12px;
}
