
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #f0f2f5;
    min-height: 100vh;
}

.header {
    background-color: #2c3e50;
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

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

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    width: 180px;
    height: auto;
    margin-right: 20px;
}

.nav-menu {
    display: flex;
    gap: 15px;
}

.nav-btn {
    background-color: transparent;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    text-decoration: none;
    display: inline-block;
}

.nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-btn.active {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Dropdown styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #2c3e50;
    min-width: 180px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1000;
    border-radius: 4px;
    margin-top: 2px;
}

.dropdown-content a {
    color: white;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    transition: background-color 0.3s;
}

.dropdown-content a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown .nav-btn:after {
    content: ' ▼';
    font-size: 10px;
    vertical-align: middle;
}

.logout-option {
    background-color: #e53e3e;
    color: white;
    border-radius: 0 0 4px 4px;
}

.logout-option:hover {
    background-color: #c53030 !important;
}

/* Main content */
.main-content {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.page-title {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 30px;
    text-align: center;
}

.page-title h1 {
    color: #2563eb;
    font-size: 28px;
    margin-bottom: 10px;
}

.page-title p {
    color: #6b7280;
    font-size: 16px;
}

/* OneDrive Status */
.onedrive-status {
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    text-align: center;
    font-weight: bold;
}

.onedrive-connected {
    background: #dcfce7;
    color: #166534;
}

.onedrive-disconnected {
    background: #fef3c7;
    color: #92400e;
}

/* Controls */
.controls {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-weight: bold;
    color: #374151;
}

.filter-select, .search-input {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background-color: white;
}

.search-input {
    min-width: 250px;
}

.reset-btn {
    background-color: #ef4444;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.reset-btn:hover {
    background-color: #dc2626;
}

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

.stat-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #2563eb;
    margin-bottom: 5px;
}

.stat-label {
    color: #6b7280;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Document sections */
.document-section {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    overflow: hidden;
}

.section-header {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
    padding: 20px;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-icon {
    font-size: 24px;
}

.document-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    padding: 20px;
}

.document-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s;
    cursor: pointer;
}

.document-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.document-number {
    font-size: 18px;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 8px;
}

.document-name {
    color: #4b5563;
    margin-bottom: 12px;
    font-size: 14px;
}

.document-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 12px;
}

.document-revision {
    background: #f3f4f6;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
}

/* PDF Status Indicators */
.pdf-status {
    font-size: 12px;
    margin: 8px 0;
    padding: 4px 8px;
    border-radius: 4px;
    text-align: center;
}

.pdf-onedrive {
    background-color: #dbeafe;
    color: #1e40af;
}

.pdf-local {
    background-color: #dcfce7;
    color: #166534;
}

.pdf-expired {
    background-color: #fef3c7;
    color: #92400e;
}

/* Document Actions */
.document-actions {
    display: flex;
    gap: 6px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.btn-small {
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    flex: 1;
    min-width: 60px;
}

.btn-view-doc {
    background-color: #3b82f6;
    color: white;
}

.btn-view-doc:hover {
    background-color: #2563eb;
}

.btn-view-label {
    background-color: #8b5cf6;
    color: white;
}

.btn-view-label:hover {
    background-color: #7c3aed;
}

.btn-download-doc {
    background-color: #10b981;
    color: white;
}

.btn-download-doc:hover {
    background-color: #059669;
}

.btn-download-label {
    background-color: #f59e0b;
    color: white;
}

.btn-download-label:hover {
    background-color: #d97706;
}

.btn-delete {
    background-color: #ef4444;
    color: white;
}

.btn-delete:hover {
    background-color: #dc2626;
}

.btn-disabled {
    background-color: #9ca3af;
    color: white;
    cursor: not-allowed;
}

.btn-disabled:hover {
    background-color: #9ca3af;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    margin-bottom: 8px;
    color: #374151;
}

/* Footer */
.footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

/* PDF Viewer Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 0;
    border-radius: 10px;
    width: 95%;
    max-width: 1000px;
    height: 90vh;
    overflow: hidden;
}

.modal-header {
    background: #2563eb;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    opacity: 0.7;
}

.modal-body {
    height: calc(90vh - 70px);
    padding: 0;
}

.pdf-viewer {
    width: 100%;
    height: 100%;
    border: none;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .dropdown-content {
        position: static;
        width: 100%;
        margin-top: 0;
        box-shadow: none;
    }

    .controls {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        justify-content: space-between;
    }

    .search-input {
        min-width: auto;
        width: 100%;
    }

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

    .modal-content {
        width: 98%;
        height: 95vh;
        margin: 1% auto;
    }

    .document-actions {
        gap: 4px;
    }

    .btn-small {
        font-size: 10px;
        padding: 5px 8px;
        min-width: 50px;
    }
}