* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #8B0000 0%, #DC143C 100%);
    min-height: 100vh;
    padding-bottom: 40px;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #8B0000 0%, #B22222 100%);
    color: white;
    padding: 20px 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.flag-icon {
    width: 60px;
    height: auto;
    border: 2px solid #FFD700;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.header-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
    position: relative;
}

.header-subtitle {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    opacity: 0.95;
}

.header-title-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #FFD700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin: 0;
}

.edit-title-btn {
    background: transparent;
    border: none;
    color: #FFD700;
    font-size: 20px;
    cursor: pointer;
    padding: 5px 8px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.edit-title-btn:hover {
    transform: scale(1.2);
    color: #FFF;
}

.header-department {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.9;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-count {
    background: #FFD700;
    color: #8B0000;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 18px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Search Bar */
.search-container {
    max-width: 100%;
    padding: 20px 30px;
}

.search-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    border: none;
    border-radius: 25px;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    outline: none;
    transition: all 0.3s ease;
}

.search-input:focus {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

/* Table Container */
.table-container {
    margin: 0 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    overflow-x: auto;
    overflow-y: auto;
    max-height: calc(100vh - 280px);
}

/* Table Styles */
.progress-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.progress-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.progress-table th {
    background: linear-gradient(135deg, #8B0000 0%, #B22222 100%);
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.progress-table th:last-child {
    border-right: none;
}

.stt-column {
    text-align: center !important;
    min-width: 60px;
    width: 60px;
    position: sticky;
    left: 0;
    z-index: 12;
    background: linear-gradient(135deg, #8B0000 0%, #B22222 100%);
}

.name-column {
    text-align: left !important;
    min-width: 180px;
    position: sticky;
    left: 60px;
    z-index: 11;
    background: linear-gradient(135deg, #8B0000 0%, #B22222 100%);
}

.round-header {
    min-width: 80px;
}

.round-title {
    font-weight: 700;
    font-size: 15px;
}

.round-date {
    font-size: 11px;
    opacity: 0.8;
    margin-top: 3px;
}

.add-column {
    min-width: 60px;
    background: linear-gradient(135deg, #8B0000 0%, #B22222 100%);
    position: sticky;
    right: 0;
    z-index: 11;
}

.add-round-btn {
    background: #FFD700;
    color: #8B0000;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.add-round-btn:hover {
    background: #FFF;
    transform: scale(1.1);
}

.progress-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: all 0.2s ease;
}

.progress-table tbody tr:hover {
    background: #FFF9E6;
}

.progress-table td {
    padding: 15px;
    text-align: center;
    border-right: 1px solid #f0f0f0;
}

.progress-table td:last-child {
    border-right: none;
}

.stt-cell {
    text-align: center !important;
    position: sticky;
    left: 0;
    background: white;
    z-index: 6;
    font-weight: 600;
    color: #8B0000;
}

.name-cell {
    text-align: left !important;
    position: sticky;
    left: 60px;
    background: white;
    z-index: 5;
}

.progress-table tbody tr:hover .stt-cell,
.progress-table tbody tr:hover .name-cell {
    background: #FFF9E6;
}

.member-name {
    font-weight: 600;
    font-size: 15px;
    color: #2c3e50;
    margin-bottom: 3px;
}

.member-position {
    font-size: 12px;
    color: #7f8c8d;
}

.checkbox-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.progress-checkbox {
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: #8B0000;
    transition: all 0.2s ease;
}

.progress-checkbox:hover {
    transform: scale(1.2);
}

/* Loading Indicator */
.loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: none;
}

.loading.active {
    display: block;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #8B0000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 200;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.modal-content h3 {
    color: #8B0000;
    margin-bottom: 20px;
    font-size: 20px;
}

.modal-input {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
    outline: none;
    transition: all 0.3s ease;
}

.modal-input:focus {
    border-color: #8B0000;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn {
    padding: 10px 25px;
    font-size: 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-cancel {
    background: #95a5a6;
    color: white;
}

.btn-cancel:hover {
    background: #7f8c8d;
}

.btn-save {
    background: #8B0000;
    color: white;
}

.btn-save:hover {
    background: #B22222;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .header {
        padding: 15px 20px;
    }
    
    .table-container {
        margin: 0 20px;
        max-height: calc(100vh - 260px);
    }
}

@media (max-width: 768px) {
    body {
        padding-bottom: 20px;
    }
    
    .header {
        padding: 12px 15px;
    }
    
    .header-left {
        gap: 12px;
    }
    
    .flag-icon {
        width: 45px;
        border-radius: 6px;
    }
    
    .header-subtitle {
        font-size: 11px;
    }
    
    .header-title-wrapper {
        gap: 8px;
    }
    
    .header-title {
        font-size: 18px;
        letter-spacing: 1px;
    }
    
    .header-department {
        font-size: 10px;
    }
    
    .edit-title-btn {
        font-size: 18px;
        padding: 4px 8px;
        margin-left: 8px;
    }
    
    .user-count {
        padding: 6px 16px;
        font-size: 16px;
        border-radius: 18px;
    }
    
    .search-container {
        padding: 12px 15px;
    }
    
    .search-input {
        padding: 12px 18px;
        font-size: 15px;
        border-radius: 20px;
    }
    
    .table-container {
        margin: 0 15px;
        max-height: calc(100vh - 240px);
        border-radius: 12px;
    }
    
    .progress-table th,
    .progress-table td {
        padding: 10px 8px;
        font-size: 13px;
    }
    
    .stt-column {
        min-width: 50px;
        width: 50px;
    }
    
    .name-column {
        min-width: 160px;
        left: 50px;
    }
    
    .stt-cell {
        font-size: 14px;
    }
    
    .name-cell {
        left: 50px;
    }
    
    .member-name {
        font-size: 14px;
    }
    
    .member-position {
        font-size: 11px;
    }
    
    .round-header {
        min-width: 70px;
    }
    
    .round-title {
        font-size: 13px;
    }
    
    .round-date {
        font-size: 10px;
    }
    
    .add-round-btn {
        width: 36px;
        height: 36px;
        font-size: 22px;
    }
    
    .progress-checkbox {
        width: 20px;
        height: 20px;
    }
    
    .modal-content {
        padding: 25px;
        border-radius: 12px;
    }
    
    .modal-content h3 {
        font-size: 18px;
    }
    
    .modal-input {
        padding: 10px;
        font-size: 15px;
    }
    
    .btn {
        padding: 9px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 10px 12px;
    }
    
    .header-left {
        gap: 10px;
    }
    
    .flag-icon {
        width: 38px;
        border-radius: 5px;
    }
    
    .header-subtitle {
        font-size: 10px;
        letter-spacing: 0.5px;
    }
    
    .header-title-wrapper {
        gap: 6px;
    }
    
    .header-title {
        font-size: 15px;
        letter-spacing: 0.8px;
    }
    
    .header-department {
        font-size: 9px;
    }
    
    .edit-title-btn {
        font-size: 16px;
        padding: 3px 6px;
        margin-left: 5px;
    }
    
    .user-count {
        padding: 5px 12px;
        font-size: 14px;
        border-radius: 15px;
    }
    
    .search-container {
        padding: 10px 12px;
    }
    
    .search-input {
        padding: 10px 15px;
        font-size: 14px;
        border-radius: 18px;
    }
    
    .table-container {
        margin: 0 12px;
        max-height: calc(100vh - 220px);
        border-radius: 10px;
    }
    
    .progress-table th,
    .progress-table td {
        padding: 8px 6px;
        font-size: 12px;
    }
    
    .stt-column {
        min-width: 45px;
        width: 45px;
    }
    
    .name-column {
        min-width: 140px;
        left: 45px;
    }
    
    .stt-cell {
        font-size: 13px;
        left: 0;
    }
    
    .name-cell {
        left: 45px;
    }
    
    .member-name {
        font-size: 13px;
    }
    
    .member-position {
        font-size: 10px;
    }
    
    .round-header {
        min-width: 65px;
    }
    
    .round-title {
        font-size: 12px;
    }
    
    .round-date {
        font-size: 9px;
    }
    
    .add-column {
        min-width: 50px;
    }
    
    .add-round-btn {
        width: 32px;
        height: 32px;
        font-size: 20px;
    }
    
    .progress-checkbox {
        width: 18px;
        height: 18px;
    }
    
    .loading {
        padding: 30px;
        border-radius: 12px;
    }
    
    .spinner {
        width: 40px;
        height: 40px;
        border: 4px solid #f3f3f3;
        border-top: 4px solid #8B0000;
    }
    
    .modal-content {
        padding: 20px;
        border-radius: 10px;
        width: 95%;
    }
    
    .modal-content h3 {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .modal-input {
        padding: 10px;
        font-size: 14px;
        border-radius: 6px;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
        width: 100%;
        border-radius: 6px;
    }
}

@media (max-width: 360px) {
    .header-title-wrapper {
        gap: 5px;
    }
    
    .header-title {
        font-size: 13px;
    }
    
    .stt-column {
        min-width: 40px;
        width: 40px;
    }
    
    .name-column {
        min-width: 130px;
        left: 40px;
    }
    
    .stt-cell {
        left: 0;
    }
    
    .name-cell {
        left: 40px;
    }
    
    .round-header {
        min-width: 60px;
    }
}
