﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Times New Roman', serif;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    line-height: 1.6;
    overflow-x: hidden;
}

/* HEADER */
.main-header {
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 50%, #8b0000 100%);
    color: white;
    padding: 10px 0;
    box-shadow: 0 2px 8px rgba(211, 47, 47, 0.3);
    position: relative;
    z-index: 100;
    flex-shrink: 0;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: bold;
    color: #d32f2f;
    box-shadow: 0 3px 8px rgba(255, 215, 0, 0.4);
    animation: logoPulse 2s ease-in-out infinite;
}

.header-title {
    font-size: 1.1rem;
    font-weight: bold;
    line-height: 1.1;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

.header-subtitle {
    font-size: 0.8rem;
    opacity: 0.9;
    margin-top: 1px;
    font-style: italic;
}

.header-info {
    text-align: right;
    font-size: 0.8rem;
}

.current-date {
    font-weight: bold;
    margin-bottom: 2px;
    color: #ffd700;
}

@keyframes logoPulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* MAIN CONTENT */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: calc(87vh - 120px);
    padding: 0;
}

/* FOOTER */
.main-footer {
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 50%, #8b0000 100%);
    color: white;
    padding: 15px 0;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 -2px 8px rgba(211, 47, 47, 0.3);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 15px;
    align-items: start;
}

.footer-widget {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    height: 200px;
}

    .footer-widget::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
        transition: left 0.5s ease;
    }

    .footer-widget:hover::before {
        left: 100%;
    }

    .footer-widget:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(211, 47, 47, 0.4);
        border-color: rgba(255, 215, 0, 0.3);
        background: rgba(255, 255, 255, 0.15);
    }

.widget-title {
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 8px;
    color: #ffd700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
}

    .widget-title::after {
        content: '';
        position: absolute;
        bottom: -3px;
        left: 50%;
        transform: translateX(-50%);
        width: 25px;
        height: 2px;
        background: linear-gradient(90deg, #ffd700, #ffed4e);
        border-radius: 1px;
    }

.weather-icon {
    font-size: 1.8rem;
    margin-bottom: 5px;
    display: block;
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.5));
}

.weather-temp {
    font-size: 1.5rem;
    font-weight: bold;
    color: #4fc3f7;
    margin: 5px 0;
    text-shadow: 0 0 8px rgba(79, 195, 247, 0.5);
}

.weather-desc {
    color: #ffe0b2;
    font-size: 0.75rem;
    margin-bottom: 5px;
    font-weight: 500;
}

.weather-details {
    font-size: 0.7rem;
    color: #ffccbc;
    line-height: 1.3;
}

    .weather-details div {
        margin: 2px 0;
        padding: 1px 0;
    }

.clock-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: #ffd700;
    animation: clockTick 2s ease-in-out infinite;
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.5));
}

@keyframes clockTick {
    0%, 100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(90deg);
    }

    50% {
        transform: rotate(180deg);
    }

    75% {
        transform: rotate(270deg);
    }
}

.current-time {
    font-size: 1.8rem;
    font-weight: bold;
    color: #fff;
    margin: 8px 0;
    font-family: 'Courier New', monospace;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    letter-spacing: 1px;
    background: linear-gradient(135deg, #ffd700, #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.date-display {
    font-size: 0.8rem;
    color: #ffe0b2;
    margin-top: 2px;
    font-style: italic;
    font-weight: 500;
}

.footer-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,215,0,0.3), transparent);
    margin: 15px 0;
}

.footer-bottom {
    text-align: center;
    padding-top: 10px;
    border-top: 1px solid rgba(255,215,0,0.2);
    color: #ffccbc;
    font-size: 0.7rem;
}

    .footer-bottom p {
        margin: 2px 0;
    }

/* FORM NHẬP LIỆU */
.form-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: #FFFBEB;
    border: 2px solid #DC2626;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

    .form-container h2 {
        color: #DC2626;
        font-size: 1.3rem;
        font-weight: bold;
        margin-bottom: 15px;
        text-align: center;
    }

    .form-container label {
        display: block;
        color: #DC2626;
        font-weight: bold;
        margin-bottom: 5px;
        font-size: 0.9rem;
    }

    .form-container input,
    .form-container select,
    .form-container textarea {
        width: 100%;
        padding: 8px;
        margin-bottom: 10px;
        border: 1px solid #DC2626;
        border-radius: 4px;
        font-size: 0.9rem;
        font-family: 'Times New Roman', serif;
    }

    .form-container textarea {
        resize: vertical;
    }

    .form-container button {
        background: #DC2626;
        color: white;
        padding: 10px 20px;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-weight: bold;
        font-size: 0.9rem;
        transition: background 0.3s ease;
    }

        .form-container button:hover {
            background: #b71c1c;
        }

/* TABLE */
.table-container {
    background: white;
    border-radius: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 50vh;
}

.table-title {
    background: linear-gradient(135deg, #d32f2f, #b71c1c);
    color: white;
    padding: 15px 20px;
    text-align: center;
    font-size: 1.3rem;
    font-weight: bold;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.scroll-table-container {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    position: relative;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.scroll-table-wrapper {
    position: absolute;
    width: 100%;
    top: 0;
    will-change: transform; /* Tối ưu hiệu suất */
    display: flex;
    flex-direction: column;
}

/*.scroll-table-wrapper.paused {
    animation-play-state: paused;*/ /* Tạm dừng khi hover */
/*}*/
/*@keyframes scrollUp {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-80%);*/ /* Cuộn đến nửa chiều cao wrapper (content1 + content2) */
    /*}
}*/
.fixed-header {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #fff;
    box-shadow: 0 1px 5px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    background: #fff;
    flex: 1;
    table-layout: fixed;
}

.fixed-header thead th {
    background: #f8f9fa;
    color: #333;
    font-weight: bold;
    padding: 8px 6px;
    text-align: left;
    border-bottom: 2px solid #d32f2f;
    position: sticky;
    top: 0;
    z-index: 6;
    font-size: 0.8rem;
    white-space: nowrap;
}

.fixed-header th.time-col {
    background: linear-gradient(135deg, #d32f2f, #c62828);
    color: white;
    position: relative;
    padding: 8px 4px;
    width: 10%;
    max-width: 120px;
    min-width: 80px;
}

.fixed-header th.session-col,
.fixed-header th.time-detail-col {
    background: linear-gradient(135deg, #d32f2f, #c62828);
    color: white;
    padding: 8px 2px;
    text-align: center;
    font-weight: bold;
    border-right: 1px solid rgba(255,255,255,0.2);
    font-size: 0.75rem;
}

.fixed-header th.session-col {
    width: 5%;
    max-width: 40px;
    min-width: 30px;
}

.fixed-header th.time-detail-col {
    border-right: none;
    width: 5%;
    max-width: 80px;
    min-width: 50px;
}

.fixed-header th.content-col {
    border-left: 1px solid #e0e0e0;
    padding: 8px 6px;
    width: 30%;
}

.fixed-header th.attend-col {
    border-left: 1px solid #e0e0e0;
    padding: 8px 6px;
    width: 20%;
}

.fixed-header th.member-col {
    border-left: 1px solid #e0e0e0;
    padding: 8px 6px;
    width: 25%;
}

.fixed-header th.location-col {
    border-left: 1px solid #e0e0e0;
    padding: 8px 6px;
    width: 20%;
}

.week-row-fixed {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    border-bottom: 2px solid #ff9800;
    position: sticky;
    top: 40px;
    z-index: 4;
    flex-shrink: 0;
}

    .week-row-fixed td {
        padding: 6px 8px;
        text-align: center;
        font-weight: bold;
        color: #e65100;
        font-size: 0.85rem;
        border-right: 1px solid #ff9800;
        background: rgba(255, 152, 0, 0.1);
        white-space: nowrap;
    }

        .week-row-fixed td:last-child {
            border-right: none;
        }

tbody {
    flex: 1;
    overflow: auto;
}

    tbody td {
        padding: 6px 6px;
        border-bottom: 1px solid #e0e0e0;
        vertical-align: top;
        background: #fff;
        transition: background 0.2s ease;
        font-size: 0.8rem;
        line-height: 1.3;
    }

    tbody tr {
        min-height: 60px;
    }

        tbody tr:hover {
            background: #e3f2fd !important;
            transform: scale(1.005);
            box-shadow: 0 1px 4px rgba(0,0,0,0.1);
        }

td.time-main {
    background: #fff3e0;
    position: relative;
    border-right: 1px solid #ff9800;
    width: 10%;
    max-width: 120px;
    min-width: 80px;
}

td.session, td.time-detail {
    background: #fff3e0;
    text-align: center;
    padding: 4px 2px;
    font-weight: 600;
    color: #e65100;
    border-right: 1px solid #ff9800;
    font-size: 0.8rem;
}

td.session {
    width: 5%;
    max-width: 40px;
    min-width: 30px;
}

td.time-detail {
    border-right: none;
    width: 5%;
    max-width: 80px;
    min-width: 50px;
}

.content-text {
    color: #333;
    line-height: 1.3;
    width: 30%;
    max-width: 300px;
    padding-left: 8px;
}

.attend-list {
    list-style: none;
    padding: 0;
    margin: 0;
    padding-left: 4px;
}

    .attend-list li {
        padding: 1px 0;
        color: #555;
        font-size: 0.8rem;
        line-height: 1.2;
    }

        .attend-list li strong {
            color: #d32f2f;
            font-size: 0.85rem;
        }

.member-list {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.2;
    padding-left: 4px;
}

    .member-list li {
        margin: 0;
        padding: 1px 0;
    }

.location-info {
    font-style: italic;
    color: #1976d2;
    font-size: 0.8rem;
    width: 20%;
    max-width: 150px;
    line-height: 1.2;
    padding-left: 4px;
}

    .location-info strong {
        color: #d32f2f;
        display: block;
        margin-bottom: 1px;
        font-size: 0.85rem;
    }

.session-morning, .session-afternoon, .session-evening {
    background: #4caf50;
    color: white;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: bold;
    display: inline-block;
    line-height: 1;
    white-space: nowrap;
}

.session-afternoon {
    background: #ff9800;
}

.session-evening {
    background: #9c27b0;
}

.today-row {
    background: linear-gradient(135deg, #e8f5e8, #c8e6c9) !important;
    border-left: 3px solid #4caf50;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
    }

    50% {
        box-shadow: 0 0 20px rgba(76, 175, 80, 0.5);
    }

    100% {
        box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
    }
}

.scroll-controls {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 10px 15px;
    text-align: center;
    border-top: 1px solid #dee2e6;
    flex-shrink: 0;
}

.control-btn {
    background: #d32f2f;
    color: white;
    border: none;
    padding: 6px 12px;
    margin: 0 3px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

    .control-btn:hover {
        background: #b71c1c;
        transform: translateY(-1px);
    }

.scroll-info {
    color: #666;
    font-size: 0.75rem;
    margin-top: 5px;
    white-space: nowrap;
}

@keyframes scrollTable {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-100%);
    }
}
.ck-editor__editable {
    min-height: 200px;
    border: 1px solid #DC2626;
    border-radius: 4px;
    font-family: 'Times New Roman', serif;
    font-size: 0.9rem;
    color: inherit !important; /* Đảm bảo màu chữ không bị ghi đè */
}

.ck-content {
    color: inherit !important; /* Ngăn CSS ngoài ghi đè màu của CKEditor */
}
