/* Weekly MIS Page Styles */

.mis-section {
    min-height: 100vh;
    padding: 120px 0 4rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #dee2e6 100%);
    position: relative;
    overflow: hidden;
}

/* MIS Header */
.mis-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: var(--bg-white);
    border-radius: 20px;
    border: 2px solid var(--primary-color);
    box-shadow: var(--shadow-xl), var(--shadow-primary);
}

.mis-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 800;
}

.mis-header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* MIS Statistics */
.mis-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-medium);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-primary);
    border-color: var(--primary-color);
}

.stat-card i {
    font-size: 2rem;
    color: var(--primary-color);
    background: rgba(124, 58, 237, 0.1);
    padding: 1rem;
    border-radius: 12px;
}

.stat-content {
    flex: 1;
}

.stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 600;
}

/* MIS Actions */
.mis-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

/* MIS Table Container */
.mis-table-container {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    border: 2px solid var(--border-color);
}

.mis-table-container h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.table-responsive {
    overflow-x: auto;
}

.mis-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
}

.mis-table thead {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.mis-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
}

.mis-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.mis-table tbody tr:hover {
    background: var(--bg-light);
}

.mis-table tbody tr:last-child td {
    border-bottom: none;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #FFFFFF;
    border-radius: 20px;
    border: 2px solid var(--primary-color);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--bg-light), var(--bg-medium));
    border-radius: 20px 20px 0 0;
}

.modal-header h2 {
    color: var(--primary-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 50%;
}

.close-btn:hover {
    color: var(--danger-color);
    background: rgba(220, 53, 69, 0.1);
    transform: rotate(90deg);
}

/* Form Styles */
#misForm {
    padding: 2rem;
}

.form-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.form-section h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    color: #0B1A2A;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group label i {
    color: var(--primary-color);
    width: 20px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--bg-white);
    color: #0B1A2A;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
    outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #666666;
    opacity: 1;
    font-weight: 600;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border-color);
}

.modal-actions button {
    flex: 1;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.3);
}

.btn-secondary {
    background: var(--bg-medium);
    color: var(--text-dark);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(23, 162, 184, 0.4);
}

/* Action Buttons */
.btn-mis-action {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    margin: 0 0.25rem;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-edit {
    background: var(--info-color);
    color: white;
}

.btn-edit:hover {
    background: #138496;
    transform: translateY(-2px);
}

.btn-delete {
    background: var(--danger-color);
    color: white;
}

.btn-delete:hover {
    background: #c82333;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .mis-header h1 {
        font-size: 2rem;
    }
    
    .mis-stats {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .mis-actions {
        flex-direction: column;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .mis-table {
        font-size: 0.8rem;
    }
    
    .mis-table th,
    .mis-table td {
        padding: 0.5rem;
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    color: var(--primary-color);
}

.empty-state h3 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--primary-color);
}

.loading i {
    font-size: 2rem;
    animation: spin 1s linear infinite;
}

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

/* Success/Error Messages */
.mis-message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mis-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.mis-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.mis-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}
