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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo h2 {
    color: #6c5ce7;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #6c5ce7;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 120px 0 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: #6c5ce7;
    color: white;
}

.btn-primary:hover {
    background: #5a4fcf;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

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

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-card {
    background: white;
    color: #6c5ce7;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    animation: float 3s ease-in-out infinite;
}

.floating-card i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Sections */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: #333;
}

.documents-section, .upload-section, .results-section {
    padding: 80px 0;
}

.documents-section {
    background: #f8f9fa;
}

/* Documents Grid */
.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* Pagination Styles */
.pagination-container {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.pagination-info {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
}

.pagination-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-btn {
    min-width: 40px;
    height: 40px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

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

/* Enhanced Search Styles */
.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 45px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.search-box input:focus {
    outline: none;
    border-color: #6c5ce7;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 1rem;
}

.search-box input:focus + i {
    color: #6c5ce7;
}

/* Loading state for search */
.search-box.searching input {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%236c5ce7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12a9 9 0 11-6.219-8.56"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 45px;
}

/* Search Results Indicator */
.search-results-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #e8f4fd;
    border: 1px solid #b3d9ff;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #0066cc;
}

.search-results-indicator i {
    color: #6c5ce7;
}

.search-results-indicator.no-results-found {
    background: #fff5f5;
    border-color: #fed7d7;
    color: #c53030;
}

.search-results-indicator.no-results-found i {
    color: #e53e3e;
}

.search-results-indicator .btn-sm {
    padding: 4px 8px;
    font-size: 0.8rem;
    margin-left: auto;
}

/* Small button variant */
.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
}

/* Search highlighting */
mark {
    background-color: #fff3cd;
    color: #856404;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

.document-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.document-card:hover {
    transform: translateY(-5px);
}

.document-card h3 {
    color: #6c5ce7;
    margin-bottom: 1rem;
}

.document-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.loading-spinner {
    text-align: center;
    grid-column: 1 / -1;
    padding: 3rem;
}

.loading-spinner i {
    font-size: 2rem;
    color: #6c5ce7;
    margin-bottom: 1rem;
}

/* Upload Section */
.upload-container {
    max-width: 600px;
    margin: 0 auto;
}

.upload-area {
    border: 2px dashed #6c5ce7;
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

.upload-area:hover {
    border-color: #5a4fcf;
    background: #f8f9ff;
}

.upload-area.dragover {
    border-color: #5a4fcf;
    background: #f0f0ff;
}

.upload-content i {
    font-size: 3rem;
    color: #6c5ce7;
    margin-bottom: 1rem;
}

.upload-content h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.upload-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.upload-controls input {
    flex: 1;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.upload-controls input:focus {
    outline: none;
    border-color: #6c5ce7;
}

.upload-progress {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6c5ce7, #764ba2);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
    animation: progress-animation 2s ease-in-out infinite;
}

@keyframes progress-animation {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.progress-text {
    text-align: center;
    color: #666;
    font-weight: 500;
}

/* Results Section */
.results-section {
    background: #f8f9fa;
}

.results-container {
    max-width: 800px;
    margin: 0 auto;
}

.result-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.result-header i {
    font-size: 1.5rem;
    color: #6c5ce7;
}

.result-content {
    line-height: 1.8;
    color: #555;
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ccc;
}

.no-results-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    padding: 3rem 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3, .footer-section h4 {
    margin-bottom: 1rem;
    color: #6c5ce7;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #6c5ce7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .upload-controls {
        flex-direction: column;
    }

    .documents-grid {
        grid-template-columns: 1fr;
    }

    .pagination-controls {
        gap: 0.25rem;
    }

    .pagination-btn {
        min-width: 35px;
        height: 35px;
        font-size: 0.8rem;
        padding: 6px 8px;
    }

    .pagination-info {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}






/* Documents Table Styles */
.documents-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.controls-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.items-per-page {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.items-per-page label {
    font-weight: 500;
}

.items-per-page select {
    padding: 6px 8px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.items-per-page select:focus {
    outline: none;
    border-color: #6c5ce7;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.search-box input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.search-box input:focus {
    outline: none;
    border-color: #6c5ce7;
}

.documents-table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

.documents-table {
    width: 100%;
    border-collapse: collapse;
}

.documents-table th,
.documents-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.documents-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.documents-table tbody tr {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.documents-table tbody tr:hover {
    background-color: #f8f9ff;
}

.documents-table tbody tr.selected {
    background-color: #e8f4fd;
    border-left: 4px solid #6c5ce7;
}

.document-code {
    font-weight: 600;
    color: #6c5ce7;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.document-objective {
    font-size: 0.85rem;
    color: #333;
    line-height: 1.4;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.document-description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

.document-criteria-preview {
    font-size: 0.85rem;
    color: #6c5ce7;
    font-style: italic;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-meta {
    font-size: 0.85rem;
    color: #666;
}

/* Selected Document Info */
.selected-document-info {
    margin-top: 2rem;
}

.selected-card {
    background: linear-gradient(135deg, #6c5ce7 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
}

.selected-card h3 {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.selected-card h3 i {
    color: #4CAF50;
}

.document-header h4 {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.document-header h4 i {
    color: #6c5ce7;
    font-size: 0.9rem;
}

.document-header p {
    margin-bottom: 1rem;
    line-height: 1.5;
    color: #666;
}

/* Process Status */
.process-status {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.status-item i {
    font-size: 1.2rem;
}

.status-item i.status-pending {
    color: #ffc107;
}

.status-item i.status-complete {
    color: #28a745;
}

.status-item i.status-error {
    color: #dc3545;
}

/* Criteria Section */
.criteria-section {
    background: #f8f9ff;
    border: 2px solid #6c5ce7;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.criteria-section h3 {
    color: #6c5ce7;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.criteria-content {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #6c5ce7;
    line-height: 1.6;
    font-style: italic;
}

/* Process Controls */
.process-controls {
    margin-top: 2rem;
}

.control-group {
    margin-bottom: 1.5rem;
}

.control-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.control-group textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    resize: vertical;
}

.control-group textarea:focus {
    outline: none;
    border-color: #6c5ce7;
}

.process-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.file-requirements {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.5rem;
}

/* Progress Steps */
.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    position: relative;
}

.step i {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ddd;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.step.active i {
    background: #6c5ce7;
    animation: pulse 1s infinite;
}

.step.completed i {
    background: #28a745;
}

.step span {
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 60%;
    width: 40%;
    height: 2px;
    background: #ddd;
    z-index: -1;
}

.step.completed:not(:last-child)::after {
    background: #28a745;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Responsive Design Updates */
@media (max-width: 768px) {
    .documents-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .controls-right {
        justify-content: space-between;
    }

    .search-box {
        max-width: none;
    }
    
    .documents-table {
        font-size: 0.9rem;
    }
    
    .documents-table th,
    .documents-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .process-status {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .progress-steps {
        flex-direction: column;
        gap: 1rem;
    }
    
    .step:not(:last-child)::after {
        display: none;
    }
    
    .process-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .documents-table th:nth-child(3),
    .documents-table td:nth-child(3),
    .documents-table th:nth-child(4),
    .documents-table td:nth-child(4) {
        display: none;
    }
}

/* Table Responsive Wrapper */
.table-responsive {
    overflow-x: auto;
}

/* Error and Success States */
.error-message {
    text-align: center;
    padding: 2rem;
    color: #dc3545;
}

.error-message i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.success-message {
    text-align: center;
    padding: 2rem;
    color: #28a745;
}

.success-message i {
    font-size: 2rem;
    margin-bottom: 1rem;
}


.login-container {
    max-width: 400px;
    margin: 120px auto 0 auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    padding: 2.5rem 2rem 2rem 2rem;
}
.login-header {
    text-align: center;
    margin-bottom: 2rem;
}
.login-header h2 {
    color: #6c5ce7;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.login-form label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
}
.login-form input[type="email"],
.login-form input[type="password"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 1.25rem;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
}
.login-form input[type="email"]:focus,
.login-form input[type="password"]:focus {
    border-color: #6c5ce7;
    outline: none;
}
.login-form .btn {
    width: 100%;
    font-size: 1.1rem;
}
.login-error {
    color: #dc3545;
    background: #f8d7da;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    display: none;
    text-align: center;
}