body {
    font-family: Arial, sans-serif;
    background-color: #f4f7f9;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 50px;
    margin: 0;
}

.container {
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px;
}

h1, h2 {
    color: #007bff;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
    margin-top: 0;
}

/* --- Form Elements --- */
label {
    display: block;
    margin-top: 15px;
    margin-bottom: 5px;
    font-weight: bold;
}

input[type="text"], input[type="password"], #article-select, textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
    border: 1px solid #ced4da;
    box-sizing: border-box; 
}

button {
    padding: 10px 15px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #0056b3;
}

/* New style for the Logout button */
.logout-btn {
    float: right; 
    background-color: #6c757d; 
    margin-top: 5px; 
}

.logout-btn:hover {
    background-color: #5a6268;
}

/* --- Status Messages --- */
#result-container {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
    min-height: 50px;
}

#result-message {
    margin: 0;
    font-size: 1.1em;
    font-weight: bold;
}

.info, .error {
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
}

.info {
    background-color: #e9ecef;
    color: #6c757d;
}

.error {
    background-color: #f8d7da;
    color: #721c24;
}

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

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

/* --- Drafting/Review Styles --- */
#drafting-form {
    border: 1px dashed #ccc;
    padding: 15px;
    margin-top: 20px;
    border-radius: 4px;
}

.draft-item {
    padding: 10px;
    border: 1px solid #ddd;
    margin-bottom: 10px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff3cd; 
}

.draft-item button {
    margin: 0;
    background-color: #ffc107;
    color: #333;
}

.draft-item button:hover {
    background-color: #e0a800;
}

/* --- Modal for Review --- */
.modal {
    position: fixed; 
    z-index: 1; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.4); 
    padding-top: 60px;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto; 
    padding: 20px;
    border: 1px solid #888;
    width: 80%; 
    max-width: 800px;
    border-radius: 8px;
    position: relative;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.modal-content textarea {
    background-color: #f8f8f8;
    color: #333;
    font-family: monospace;
    font-size: 14px;
}

.approve {
    background-color: #28a745 !important;
}
.approve:hover {
    background-color: #1e7e34 !important;
}

.reject {
    background-color: #dc3545 !important;
}
.reject:hover {
    background-color: #bd2130 !important;
}

/* Horizontal Rule Styling */
hr {
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
    margin: 20px 0;
}

/* --- VWO Article Checker Styles --- */
.vwo-checker-section {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 2px solid #007bff;
}

.vwo-checker-section h3 {
    margin-top: 0;
    color: #007bff;
}

.url-input-container {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.url-input-container input {
    flex: 1;
    margin-bottom: 0;
}

.url-input-container button {
    margin-top: 0;
    white-space: nowrap;
}

.vwo-result {
    margin-top: 15px;
}

.vwo-result h4 {
    margin-top: 0;
    margin-bottom: 10px;
}

.vwo-result ul {
    margin: 10px 0;
    padding-left: 25px;
}

.vwo-result .current,
.vwo-result .outdated,
.vwo-result .error {
    padding: 15px;
    border-radius: 4px;
}

.vwo-result p {
    margin: 8px 0;
}
.vwo-result p {
    margin: 8px 0;
}

/* --- Export List Styles --- */
.export-list-section {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    border: 2px solid #28a745;
}

.export-list-section h3 {
    margin-top: 0;
    color: #28a745;
}

.export-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.export-actions button:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

#export-list-container {
    max-height: 400px;
    overflow-y: auto;
}

.export-item {
    background-color: white;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 4px;
    border-left: 4px solid #dc3545;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.export-item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 8px;
}

.export-item-title {
    font-weight: bold;
    color: #333;
    flex: 1;
}

.export-item-remove {
    background-color: #dc3545 !important;
    color: white;
    padding: 5px 10px;
    font-size: 12px;
    margin: 0;
}

.export-item-remove:hover {
    background-color: #c82333 !important;
}

.export-item-details {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.export-item-url {
    word-break: break-all;
    color: #007bff;
    text-decoration: none;
    font-size: 13px;
}

.export-item-url:hover {
    text-decoration: underline;
}

.export-summary {
    background-color: #e9ecef;
    padding: 10px;
    border-radius: 4px;
    margin-top: 15px;
    font-weight: bold;
}

/* --- Admin Tabs Styles --- */
.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.tab-btn {
    padding: 10px 20px;
    background-color: transparent;
    color: #6c757d;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 0;
}

.tab-btn:hover {
    color: #007bff;
    background-color: #f8f9fa;
}

.tab-btn.active {
    color: #007bff;
    border-bottom-color: #007bff;
    font-weight: bold;
}

.tab-content {
    padding: 20px 0;
}

/* --- PDF Upload Styles --- */
.pdf-upload-section {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 2px dashed #007bff;
}

#pdf-upload {
    margin-bottom: 10px;
}

#uploaded-pdfs-list {
    margin: 20px 0;
}

#uploaded-pdfs-list h4 {
    color: #495057;
}

#pdf-files-container {
    background-color: white;
    padding: 15px;
    border-radius: 4px;
    min-height: 50px;
}

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

.pdf-file-item button {
    padding: 5px 10px;
    font-size: 12px;
    margin: 0;
}

#consolidate-btn {
    margin: 20px 0;
    background-color: #28a745;
}

#consolidate-btn:hover {
    background-color: #218838;
}

#consolidate-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

#consolidation-result {
    margin-top: 20px;
}

.consolidated-item {
    background-color: white;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 4px;
    border-left: 4px solid #007bff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.consolidated-item.high-priority {
    border-left-color: #dc3545;
    background-color: #fff5f5;
}

.consolidated-item.medium-priority {
    border-left-color: #ffc107;
    background-color: #fffef5;
}

.priority-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 10px;
}

.priority-high {
    background-color: #dc3545;
    color: white;
}

.priority-medium {
    background-color: #ffc107;
    color: #333;
}

.priority-low {
    background-color: #6c757d;
    color: white;
}


/* --- Additional Export List Styles --- */
.export-items {
    max-height: 400px;
    overflow-y: auto;
}

.remove-btn {
    background-color: #dc3545 !important;
    color: white;
    padding: 5px 10px;
    font-size: 14px;
    margin: 0;
    border-radius: 4px;
}

.remove-btn:hover {
    background-color: #c82333 !important;
}

/* --- PDF Items Styles --- */
.pdf-items {
    max-height: 300px;
    overflow-y: auto;
}

.pdf-item {
    background-color: white;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.pdf-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.pdf-item-details {
    font-size: 13px;
    color: #6c757d;
}

/* --- VWO Article Submit Section --- */
#vwo-notes {
    width: 100%;
    margin: 10px 0;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    box-sizing: border-box;
}

/* --- Loading States --- */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        max-width: 100%;
    }
    
    .url-input-container {
        flex-direction: column;
    }
    
    .export-actions {
        flex-direction: column;
    }
    
    .admin-tabs {
        flex-direction: column;
    }
}

/* --- AI Draft Button Styling --- */
#vwo-ai-draft-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(102, 126, 234, 0.3);
    display: inline-block;
    margin-top: 0;
}

#vwo-ai-draft-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
}

#vwo-ai-draft-btn:disabled {
    background: #28a745;
    cursor: not-allowed;
    opacity: 1;
    transform: none;
}

#vwo-ai-draft-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(102, 126, 234, 0.3);
}
