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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    /* Disable text selection */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    /* Disable highlighting */
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.container.dashboard-mode {
    max-width: 1200px;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.header h3 {
    text-align: left;
}

/* Header and Logo Styles */
.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.title-section {
    flex: 1;
    min-width: 300px;
}

.title-section h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    text-align: left;
}

.title-section p {
    text-align: left;
    margin: 0;
}

.logo {
    max-width: 120px;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    background: rgba(255, 255, 255, 0.9);
    padding: 10px;
    border-radius: 12px;
    flex-shrink: 0;
}

/* Supervisor Warning Styles */
.supervisor-warning {
    display: flex;
    align-items: flex-start;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #ffc107;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.15);
}

.warning-icon {
    font-size: 1.5rem;
    margin-right: 15px;
    flex-shrink: 0;
    margin-top: 2px;
}

.warning-content {
    flex: 1;
}

.warning-content h4 {
    color: #856404;
    margin-bottom: 8px;
    font-size: 1.1rem;
    font-weight: 600;
}

.warning-content p {
    color: #664d03;
    line-height: 1.5;
    margin: 0;
    font-size: 0.95rem;
}

.content {
    padding: 40px;
}

/* Form Styles */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fafbfc;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Button Styles */
.btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 10px 0;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Message Styles */
.message {
    padding: 15px;
    border-radius: 12px;
    margin: 20px 0;
    font-weight: 500;
}

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

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

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

/* Utility Classes */
.hidden {
    display: none !important;
}

.form-toggle {
    text-align: center;
    margin-top: 20px;
}

.form-toggle button {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    text-decoration: underline;
    font-size: 1rem;
}

/* Dashboard Styles */
.dashboard {
    text-align: center;
    padding: 30px;
}

.dashboard h2 {
    color: #333;
    margin-bottom: 20px;
}

.student-info {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
}

.student-info p {
    margin: 10px 0;
    font-size: 1.1rem;
}

.welcome-message {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8ff 100%);
    border: 2px solid #c3e6cb;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.welcome-message h3 {
    color: #155724;
    margin-bottom: 10px;
}

.welcome-message p {
    color: #0c5460;
    margin: 5px 0;
}

/* Document Upload & Viewer Styles */
.document-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.document-section h3 {
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.upload-area {
    border: 3px dashed #dee2e6;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 20px;
}

.upload-area:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.upload-area.dragover {
    border-color: #667eea;
    background: #e8f0ff;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 3rem;
    color: #6c757d;
    margin-bottom: 15px;
}

.upload-icon:before {
    content: "📄";
}

.upload-area p {
    color: #6c757d;
    margin: 10px 0;
}

.upload-area .btn {
    width: auto;
    padding: 10px 20px;
    margin: 10px 0;
}

.file-input {
    display: none;
}

.uploaded-files {
    margin-top: 20px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
}

.file-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.file-icon {
    font-size: 1.5rem;
    color: #dc3545;
    margin-right: 10px;
}

.file-icon:before {
    content: "📄";
}

.file-details h4 {
    margin: 0;
    color: #333;
    font-size: 1rem;
}

.file-details p {
    margin: 5px 0 0 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.file-actions {
    display: flex;
    gap: 10px;
}

.file-actions .btn {
    width: auto;
    padding: 8px 16px;
    font-size: 0.9rem;
    margin: 0;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
}

.document-tabs {
    display: flex;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 5px;
    margin-bottom: 20px;
}

.document-tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.document-tab.active {
    background: white;
    color: #667eea;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Supervisor specific styles */
.supervisor-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    border-left: 4px solid #28a745;
}

.supervisor-section h3 {
    color: #28a745;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.role-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 10px 0;
}

.role-badge.student {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.role-badge.supervisor {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

/* New styles for separate supervisor sections */
.supervisor-upload-section {
    background: #e8f5e8;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    border-left: 4px solid #28a745;
}

.supervisor-upload-section h3 {
    color: #28a745;
    margin-bottom: 15px;
    text-align: center;
}

.student-files-section {
    background: #f0f8ff;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    border-left: 4px solid #667eea;
}

.student-files-section h3 {
    color: #667eea;
    margin-bottom: 15px;
    text-align: center;
}

.supervisor-upload-area {
    border: 3px dashed #28a745;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 20px;
}

.supervisor-upload-area:hover {
    border-color: #155724;
    background: #f8fff8;
}

.supervisor-upload-area.dragover {
    border-color: #155724;
    background: #e8f5e8;
    transform: scale(1.02);
}

.supervisor-file-item {
    border: 2px solid #c3e6cb;
    background: #f8fff8;
}

/* Submission status styles */
.submission-status {
    margin-top: 15px;
    padding: 15px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
    border: 2px solid #ffeaa7;
}

.status-accepted {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

.status-icon {
    font-size: 1.2rem;
    margin-right: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 15px;
    }
    
    .content {
        padding: 20px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .title-section h1 {
        font-size: 1.5rem;
        text-align: center;
    }
    
    .title-section p {
        text-align: center;
    }
    
    .logo {
        max-width: 100px;
        max-height: 60px;
    }
    
    .supervisor-warning {
        flex-direction: column;
        text-align: center;
    }
    
    .warning-icon {
        margin-right: 0;
        margin-bottom: 10px;
        font-size: 2rem;
    }
    
    .form-group input, .form-group select {
        padding: 12px;
    }
    
    .btn {
        padding: 12px;
        font-size: 0.9rem;
    }
    
    .upload-area {
        padding: 30px 15px;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .file-actions {
        width: 100%;
        justify-content: center;
    }
}