/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafb;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, #162450 0%, #1e2a5a 100%);
    color: white;
    padding: 1.5rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    justify-content: space-between;
}

.user-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    font-size: 0.9rem;
    opacity: 0.9;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.header-logo {
    width: 160px;
    height: 80px;
    object-fit: contain;
}

.header-text {
    flex: 1;
}

.logo {
    font-family: 'Clash Display', 'Arial Black', 'Helvetica Neue', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', Arial, sans-serif;
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    color: white;
}

.tagline {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Navigation */
.main-nav {
    margin-top: 1rem;
}

.nav-link {
    color: #79bb2a;
    font-weight: 600;
    text-decoration: none;
    margin-right: 1rem;
}

.nav-link:hover {
    color: #6AA622;
}

.nav-link:last-child {
    margin-right: 0;
}

/* Main content */
.main {
    padding: 3rem 0;
}

.upload-section,
.projects-section {
    background: white;
    margin-bottom: 2rem;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e1e8e6;
}

.upload-section h2,
.projects-section h2 {
    color: #162450;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    border-bottom: 3px solid #162450;
    padding-bottom: 0.5rem;
}

/* Search functionality */
.search-container {
    margin-bottom: 1.5rem;
}

.search-input {
    width: 100%;
    max-width: 400px;
    padding: 0.75rem;
    border: 2px solid #e1e8e6;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', inherit;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #162450;
    box-shadow: 0 0 0 3px rgba(22, 36, 80, 0.1);
}

.search-input::placeholder {
    color: #999;
}

/* Form styles */
.upload-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #162450;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 0.75rem;
    border: 2px solid #e1e8e6;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: 'Inter', inherit;
    background-color: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #162450;
    box-shadow: 0 0 0 3px rgba(22, 36, 80, 0.1);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23162450' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

/* Project input row */
.project-input-row {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

/* Project search autocomplete */
.project-search-container {
    position: relative;
    flex: 1;
}

.project-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e1e8e6;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.project-dropdown.show {
    display: block;
}

.project-option {
    padding: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: background-color 0.2s ease;
}

.project-option:hover,
.project-option.highlighted {
    background-color: #f0f2ff;
}

.project-option:last-child {
    border-bottom: none;
}

.project-option-number {
    background: #162450;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    min-width: 60px;
    text-align: center;
}

.project-option-address {
    color: #162450;
    font-weight: 500;
}

.project-option-docs {
    margin-left: auto;
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.project-option-doc {
    background: #e8efff;
    color: #162450;
    padding: 0.125rem 0.375rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
}

.no-results {
    padding: 1rem;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Documents sections */
.documents-section {
    margin-bottom: 2.5rem;
}

.section-title {
    color: #162450;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-subtitle {
    font-size: 0.9rem;
    font-weight: 400;
    color: #666;
    font-style: italic;
}


/* Documents grid */
.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* Ensure 4 items fit on wider screens */
@media (min-width: 1200px) {
    .documents-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.document-upload {
    background: #f8fafb;
    border: 2px dashed #e1e8e6;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.document-upload:hover {
    border-color: #162450;
    background: #f0f2ff;
}

.document-upload h4 {
    color: #162450;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    text-align: center;
}

/* Upload area */
.upload-area {
    position: relative;
}

.file-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: white;
    border: 2px dashed #bdd1c5;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 120px;
}

.file-label:hover {
    border-color: #162450;
    background: #f8fdf9;
}

.upload-icon {
    width: 32px;
    height: 32px;
    fill: #162450;
    margin-bottom: 0.5rem;
}

.file-label span {
    color: #162450;
    font-weight: 500;
    text-align: center;
}

.file-info {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #666;
    text-align: center;
}

.file-info.has-file {
    color: #162450;
    font-weight: 500;
}

/* Not exist checkbox styles */
.not-exist-checkbox {
    margin-top: 0.75rem;
    text-align: center;
}

.not-exist-checkbox label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #666;
    cursor: pointer;
    user-select: none;
}

.not-exist-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #79BB2A;
    cursor: pointer;
}

.not-exist-checkbox input[type="checkbox"]:checked {
    accent-color: #79BB2A;
}

.not-exist-checkbox label:has(input[type="checkbox"]:checked) {
    color: #79BB2A;
    font-weight: 500;
}

.not-exist-checkbox label:hover {
    color: #79BB2A;
}

/* Submit button */
.submit-btn {
    background: #79BB2A;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Inter', inherit;
}

.submit-btn:hover:not(:disabled) {
    background: #6AA622;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(121, 187, 42, 0.4);
}

.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* SharePoint section */
.sharepoint-section {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    flex-shrink: 0;
}

.sharepoint-btn {
    background: #79BB2A;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    height: 50px;
}

.sharepoint-btn:hover:not(:disabled) {
    background: #6AA622;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(121, 187, 42, 0.3);
}

.sharepoint-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.sharepoint-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Projects list */
.projects-list {
    display: grid;
    gap: 1rem;
}

.project-card {
    background: white;
    border: 1px solid #e1e8e6;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.project-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.project-number {
    background: #162450;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1.1rem;
    min-width: 80px;
    text-align: center;
}

.project-address {
    color: #162450;
    font-weight: 600;
    font-size: 1.1rem;
}

.project-documents {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.document-tag {
    background: #e8efff;
    color: #162450;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Footer */
.footer {
    background: #162450;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1000;
    max-width: 300px;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: #4caf50;
}

.notification.error {
    background: #f44336;
    color: white !important;
}

.notification.info {
    background: #2196f3;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .header-logo {
        width: 100px;
        height: 60px;
    }
    
    .logo {
        font-size: 2rem;
    }
    
    .documents-grid {
        grid-template-columns: 1fr;
    }
    
    .upload-section,
    .projects-section {
        padding: 1.5rem;
    }
    
    .project-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .project-info {
        width: 100%;
        justify-content: space-between;
    }
    
    .project-option {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .project-option-docs {
        margin-left: 0;
    }
    
    .project-input-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .sharepoint-btn {
        height: auto;
        padding: 0.75rem 1rem;
        justify-content: center;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #162450;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Upload progress */
.upload-progress {
    margin-top: 0.5rem;
    background: #e1e8e6;
    border-radius: 4px;
    overflow: hidden;
    height: 4px;
}

.upload-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #162450, #1e2a5a);
    transition: width 0.3s ease;
    width: 0%;
}

/* Upload Progress Display - Compact */
.upload-progress-compact {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #f8fafb;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.progress-file-info {
    display: flex;
    align-items: center;
    flex: 1;
    overflow: hidden;
    margin-right: 1rem;
}

.progress-info #currentFile {
    font-weight: 500;
    color: #374151;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-left: 0.5rem;
}

.spinner {
    width: 14px;
    height: 14px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #79bb2a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    flex-shrink: 0;
}

.spinner.complete {
    border: 2px solid #10b981;
    animation: none;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #10b981;
}

.spinner.complete::before {
    content: '✓';
    color: white;
    font-size: 8px;
    font-weight: bold;
    line-height: 1;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.progress-info #progressText {
    font-weight: 600;
    color: #79bb2a;
    font-size: 0.9rem;
}

.progress-bar-container {
    width: 100%;
    height: 4px;
    background-color: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #79bb2a 0%, #90cc3e 100%);
    transition: width 0.3s ease;
    width: 0%;
}

.progress-stats {
    text-align: center;
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Upload Results Display */
.upload-results {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #162450;
}

.upload-results h3 {
    margin: 0 0 1rem 0;
    color: #162450;
    font-size: 1.2rem;
}

.upload-results-list {
    margin-bottom: 1rem;
}

.upload-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

.upload-result-success {
    background-color: #d4edda;
    border-left: 4px solid #28a745;
    color: #155724;
}

.upload-result-error {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.upload-result-filename {
    font-weight: 600;
    margin-right: 1rem;
}

.upload-result-details {
    flex: 1;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.upload-result-status {
    font-weight: 500;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-secondary:hover {
    background: #545b62;
}

/* Login page styles */
.login-body {
    background: linear-gradient(135deg, #162450 0%, #1e2a5a 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-container {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    position: relative;
    overflow: hidden;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header img {
    width: 80px;
    height: auto;
    margin-bottom: 1rem;
}

.login-header h2 {
    color: #333;
    font-weight: 600;
    font-size: 1.5rem;
}

.subtitle {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    line-height: 1.4;
}

.message-container {
    margin-bottom: 1rem;
    min-height: 20px;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid #c3e6cb;
    font-size: 0.9rem;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
    font-size: 0.9rem;
}

.login-btn {
    width: 100%;
    padding: 0.75rem;
    background: #79bb2a;
    color: black;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(121, 187, 42, 0.3);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.info-box {
    margin-top: 2rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.info-box h4 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.info-box p {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0;
}

.domain-info {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #e9f7ff;
    border-radius: 8px;
    border: 1px solid #b8e6ff;
    text-align: center;
}

.domain-info .icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.domain-info p {
    color: #0056b3;
    font-size: 0.9rem;
    margin: 0;
}

/* Admin users page styles */
.hidden { 
    display: none; 
}

.error { 
    color: red; 
    margin: 2rem; 
    text-align: center; 
}

.loading { 
    text-align: center; 
    margin: 2rem; 
    color: #162450; 
}

.users-table { 
    width: 100%; 
    border-collapse: collapse; 
    margin: 2rem auto; 
    max-width: 1200px; 
    background: #fff; 
    border-radius: 8px; 
    box-shadow: 0 2px 8px #0001; 
}

.users-table th, .users-table td { 
    padding: 0.75rem; 
    border-bottom: 1px solid #eee; 
    text-align: left; 
}

.users-table th { 
    background: #f8f8f8; 
    font-weight: 600; 
}

.users-table tr:hover { 
    background: #f9f9f9; 
}

.btn { 
    background: #79bb2a; 
    color: #222; 
    border: none; 
    border-radius: 4px; 
    padding: 0.5rem 1rem; 
    cursor: pointer; 
    font-weight: 500; 
    margin: 0.25rem; 
}

.btn:hover { 
    background: #6aa622; 
}

.btn-danger { 
    background: #dc3545; 
    color: white; 
}

.btn-danger:hover { 
    background: #c82333; 
}

.admin-badge { 
    background: #17a2b8; 
    color: white; 
    padding: 0.2rem 0.5rem; 
    border-radius: 12px; 
    font-size: 0.8rem; 
    font-weight: 500; 
}

.inactive-badge { 
    background: #dc3545; 
    color: white; 
    padding: 0.2rem 0.5rem; 
    border-radius: 12px; 
    font-size: 0.8rem; 
    font-weight: 500; 
}

.active-badge { 
    background: #28a745; 
    color: white; 
    padding: 0.2rem 0.5rem; 
    border-radius: 12px; 
    font-size: 0.8rem; 
    font-weight: 500; 
}

/* Modal styles */
.modal { 
    position: fixed; 
    z-index: 1000; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.5); 
}

.modal-content { 
    background: white; 
    margin: 10% auto; 
    padding: 2rem; 
    width: 90%; 
    max-width: 500px; 
    border-radius: 8px; 
}

.close { 
    color: #aaa; 
    float: right; 
    font-size: 28px; 
    font-weight: bold; 
    cursor: pointer; 
}

.close:hover { 
    color: #000; 
}

.checkbox-group { 
    display: flex; 
    align-items: center; 
}

.checkbox-group label { 
    margin: 0; 
    font-weight: normal; 
}

.form-group input[type="checkbox"] { 
    width: auto; 
    margin-right: 0.5rem; 
}

/* Project list page styles */
.search-bar { 
    margin: 2rem auto; 
    max-width: 400px; 
    display: flex; 
}

.search-bar input { 
    flex: 1; 
    padding: 0.5rem; 
    border-radius: 4px 0 0 4px; 
    border: 1px solid #ccc; 
}

.search-bar button { 
    padding: 0.5rem 1rem; 
    border-radius: 0 4px 4px 0; 
    border: 1px solid #79bb2a; 
    background: #79bb2a; 
    color: #222; 
    font-weight: 600; 
    cursor: pointer; 
}

.project-table { 
    width: 100%; 
    border-collapse: collapse; 
    margin: 2rem auto; 
    max-width: 1200px; 
    background: #fff; 
    border-radius: 8px; 
    box-shadow: 0 2px 8px #0001; 
}

.project-table th, .project-table td { 
    padding: 0.75rem; 
    border-bottom: 1px solid #eee; 
    text-align: left; 
}

.project-table th { 
    background: #f8f8f8; 
    font-weight: 600; 
}

.project-table tr:hover { 
    background: #f9f9f9; 
}

.download-btn { 
    background: #79bb2a; 
    color: #222; 
    border: none; 
    border-radius: 4px; 
    padding: 0.3rem 0.8rem; 
    cursor: pointer; 
    font-weight: 500; 
}

.no-files { 
    color: #aaa; 
    font-style: italic; 
}

.pagination { 
    margin: 2rem auto; 
    text-align: center; 
}

.pagination button { 
    margin: 0 0.5rem; 
    padding: 0.5rem 1rem; 
    border: 1px solid #ccc; 
    background: #fff; 
    cursor: pointer; 
    border-radius: 4px; 
}

.pagination button:disabled { 
    opacity: 0.5; 
    cursor: not-allowed; 
}

.pagination button.active { 
    background: #79bb2a; 
    color: #222; 
    border-color: #79bb2a; 
}

.pagination-info { 
    margin: 1rem 0; 
    color: #666; 
}

.project-table tr.has-files {
    background-color: #e8f5e8 !important;
    border-left: 4px solid #79bb2a;
}

.project-table tr.has-files:hover {
    background-color: #d4edda !important;
}

.file-status-indicator {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    margin-right: 8px;
    position: relative;
    vertical-align: middle;
}

.file-status-indicator.has-file {
    background-color: #79bb2a;
    border: 2px solid #79bb2a;
}

.file-status-indicator.has-file::after {
    content: '✓';
    color: white;
    font-weight: bold;
    font-size: 16px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.file-status-indicator.no-file {
    background-color: #f8f9fa;
    border: 2px solid #dee2e6;
}

.download-btn {
    background: #79bb2a;
    color: #222;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.download-btn:hover {
    background: #6aa622;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(121, 187, 42, 0.3);
}

.no-files {
    color: #6c757d;
    font-style: italic;
    font-size: 0.85rem;
}

.file-cell-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.download-btn-icon {
    background: #79bb2a;
    color: white;
    border: none;
    border-radius: 4px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.2s ease;
}

.download-btn-icon:hover {
    background: #6aa622;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(121, 187, 42, 0.3);
}

/* Upload documents page styles */
.document-upload.has-existing-file {
    background-color: #e8f5e8 !important;
    border: 3px solid #79bb2a !important;
    box-shadow: 0 4px 12px rgba(121, 187, 42, 0.2);
    transform: scale(1.02);
    position: relative;
}

.document-upload.has-existing-file::before {
    content: '✓ FILE UPLOADED';
    position: absolute;
    top: -8px;
    left: 12px;
    background: #79bb2a;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    z-index: 10;
}

.document-upload.has-existing-file:hover {
    background-color: #d4edda !important;
    border-color: #6aa622 !important;
    box-shadow: 0 6px 16px rgba(121, 187, 42, 0.3);
}

.upload-file-status-indicator {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    z-index: 5;
    transition: all 0.3s ease;
}

.upload-file-status-indicator.has-file {
    background-color: #79bb2a;
    border: 3px solid #79bb2a;
    color: white;
    box-shadow: 0 3px 8px rgba(121, 187, 42, 0.4);
}

.upload-file-status-indicator.has-file::after {
    content: '✓';
}

.upload-file-status-indicator.no-file {
    background-color: #f8f9fa;
    border: 2px solid #dee2e6;
    color: #6c757d;
    opacity: 0.7;
}

.upload-file-status-indicator.no-file::after {
    content: '◯';
}

.document-upload.has-existing-file .existing-file {
    background: #d4edda !important;
    border: 2px solid #79bb2a !important;
    border-radius: 8px !important;
    padding: 12px !important;
    margin-bottom: 15px !important;
}

.document-upload.has-existing-file .file-uploaded {
    color: #2d5a2d !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
}

.document-upload.has-existing-file .file-upload-details {
    color: #2d5a2d !important;
    font-weight: 500 !important;
}

.document-upload.has-existing-file h4 {
    color: #2d5a2d !important;
    font-weight: 700 !important;
    font-size: 1.2rem !important;
}

.document-upload {
    transition: all 0.3s ease;
}

.document-upload.has-existing-file {
    animation: highlightUpload 0.5s ease-out;
}

@keyframes highlightUpload {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1.02); }
}

/* Drag and drop styles */
.upload-area.drag-over {
    border-color: #162450 !important;
    background: linear-gradient(135deg, #f0f2ff 0%, #e8f1ff 100%) !important;
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(22, 36, 80, 0.15) !important;
    transition: all 0.2s ease;
}

.upload-area.drag-active {
    border-color: #79bb2a !important;
    background: linear-gradient(135deg, #f0ffed 0%, #e8f7e0 100%) !important;
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(121, 187, 42, 0.25) !important;
}

.upload-area.drag-active::before {
    content: 'Drop here';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    font-weight: 600;
    color: #79bb2a;
    background: rgba(255, 255, 255, 0.9);
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 10;
    pointer-events: none;
    text-align: center;
}

.existing-file {
    margin-bottom: 10px;
    padding: 8px;
    background: #e8f5e8;
    border: 1px solid #4caf50;
    border-radius: 4px;
    font-size: 0.9em;
}

.existing-file-info {
    display: block;
}

.file-uploaded {
    font-weight: bold;
    color: #4caf50;
    margin-bottom: 4px;
}

.file-upload-details {
    font-size: 0.85em;
    color: #666;
    line-height: 1.3;
}

.delete-file-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    margin-left: 10px;
    flex-shrink: 0;
}

.delete-file-btn:hover {
    background: #c82333;
}

.project-option-doc-count {
    background: #007bff;
    color: white;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
}

.phase-validation-error {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-left: 4px solid #f39c12;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.1);
    animation: slideIn 0.3s ease-out;
}

.phase-validation-header {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #856404;
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.error-icon {
    margin-right: 8px;
    font-size: 1.2rem;
}

.phase-error-content {
    color: #856404;
    font-size: 0.95rem;
    line-height: 1.4;
}

.phase-error {
    margin: 8px 0;
    padding: 8px 12px;
    background: rgba(243, 156, 18, 0.1);
    border-radius: 4px;
    border-left: 3px solid #f39c12;
}

.phase-progress {
    font-size: 0.85rem;
    color: #6c7b7f;
    margin-top: 4px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Project Phases Section Styles */
.project-phases-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    animation: slideIn 0.3s ease-out;
}

.project-phases-section h3 {
    color: #162450;
    margin-bottom: 16px;
    font-size: 1.2rem;
    font-weight: 600;
    border-bottom: 2px solid #79bb2a;
    padding-bottom: 8px;
    display: inline-block;
}

.project-phases-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.project-phase-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.project-phase-item:hover {
    background: #e9ecef;
    border-color: #79bb2a;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(121, 187, 42, 0.15);
}

.phase-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.phase-name {
    font-weight: 600;
    color: #162450;
    font-size: 1rem;
    min-width: 120px;
}

.phase-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.phase-status.status-complete {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.phase-status.status-incomplete {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.phase-status.status-updated {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.phase-status.status-unknown {
    background: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
}

.phase-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-selector {
    padding: 6px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.9rem;
    background: white;
    color: #495057;
    transition: all 0.2s ease;
    cursor: pointer;
}

.status-selector:hover {
    border-color: #79bb2a;
    outline: none;
}

.status-selector:focus {
    border-color: #79bb2a;
    box-shadow: 0 0 0 2px rgba(121, 187, 42, 0.25);
    outline: none;
}

.status-locked {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #28a745;
    font-weight: 600;
    font-size: 0.9rem;
}

.no-phases {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 20px;
    background: #f8f9fa;
    border: 1px dashed #dee2e6;
    border-radius: 6px;
}

/* Section header with integrated phase status */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
}

.section-title {
    margin: 0;
    color: #162450;
    font-size: 1.3rem;
    font-weight: 600;
}

.phase-status-label {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.phase-status-label.status-complete {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.phase-status-label.status-incomplete {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.phase-status-label.status-updated {
    background: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

.phase-status-label.status-unknown {
    background: #e2e3e5;
    color: #383d41;
    border-color: #d6d8db;
}

/* Collapsible phase sections for hidden phase types */
.collapsible-header {
    cursor: pointer;
    transition: background-color 0.2s ease;
    user-select: none;
}

.collapsible-header:hover {
    background-color: rgba(22, 36, 80, 0.05);
}

.toggle-icon {
    margin-left: 12px;
    font-size: 1rem;
    color: #162450;
    transition: transform 0.3s ease;
    display: inline-block;
    font-weight: bold;
}

.hidden-phase-content {
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 1;
}

.hidden-phase-content.collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    margin-bottom: 0;
}

/* Add subtle styling to indicate hidden phases */
.documents-section:has(.collapsible-header) {
    background-color: rgba(22, 36, 80, 0.02);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 2rem;
    border: 1px solid rgba(22, 36, 80, 0.08);
}

/* Responsive design for phases */
@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .phase-status-label {
        align-self: flex-start;
    }
} 