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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background-color: #ffffff;
    font-size: 15px;
}

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

/* Corner Logo */
.corner-logo {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.logo-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: opacity 0.2s;
}

.logo-link:hover {
    opacity: 0.8;
}

.logo-img {
    height: 24px;
    width: auto;
    display: block;
}

.logo-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: #000000;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background-color: #7093FF;
    color: white;
}

.btn-primary:hover {
    background-color: #5A7AE8;
}

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

.btn-success:hover {
    background-color: #047857;
}

.btn-danger {
    background-color: #dc2626;
    color: white;
}

.btn-danger:hover {
    background-color: #b91c1c;
}

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

.btn-secondary:hover {
    background-color: #4b5563;
}

/* Cards */
.card {
    background: white;
    border-radius: 10px;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.card-header {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e5e7eb;
    color: #000000;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1.5px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background-color: #fff;
}

.form-control:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.375rem;
    color: #6b7280;
    font-size: 0.875rem;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    margin: 1rem 0;
    border-radius: 8px;
    overflow: hidden;
}

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

.table th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #000000;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: background-color 0.15s ease;
}

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

.table tbody tr:last-child td {
    border-bottom: none;
}

.table a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.table a:hover {
    text-decoration: underline;
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid;
    font-size: 0.95rem;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border-left-color: #059669;
    border: 1px solid #a7f3d0;
}

.alert-error,
.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
    border-left-color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border-left-color: #2563eb;
    border: 1px solid #bfdbfe;
}

/* Status badges */
.badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-draft {
    background-color: #6b7280;
    color: white;
}

.badge-searching {
    background-color: #2563eb;
    color: white;
}

.badge-screening {
    background-color: #f59e0b;
    color: white;
}

.badge-extracting {
    background-color: #8b5cf6;
    color: white;
}

.badge-synthesizing {
    background-color: #059669;
    color: white;
}

.badge-complete {
    background-color: #059669;
    color: white;
}

.badge-error {
    background-color: #dc2626;
    color: white;
}

/* Footer - compact so it doesn’t add large empty space at bottom */
.footer {
    background: #ffffff;
    color: #6b7280;
    padding: 0.25rem 0;
    margin-top: 0.5rem;
    text-align: center;
    border-top: 1px solid #e5e7eb;
}

.footer p {
    font-size: 0.8125rem;
    margin: 0;
    color: #6b7280;
}

/* Workbench layouts */
.workbench {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

.workbench-sidebar {
    background: white;
    padding: 1.25rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.workbench-main {
    background: white;
    padding: 1.75rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.workbench-panel {
    background: white;
    padding: 1.25rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Loading spinner */
.spinner {
    border: 3px solid #e5e7eb;
    border-top: 3px solid #2563eb;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Headings */
h1 {
    color: #000000;
    font-weight: 600;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    letter-spacing: -0.5px;
}

h2 {
    color: #000000;
    font-weight: 600;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    letter-spacing: -0.25px;
}

h3 {
    color: #374151;
    font-weight: 600;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

/* Responsive */
@media (max-width: 768px) {
    .workbench {
        grid-template-columns: 1fr;
    }
    
    .navbar-container {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 15px;
    }
    
    .navbar-brand {
        grid-column: 1;
        justify-self: center;
    }
    
    .navbar-brand-text {
        font-size: 0.875rem;
    }
    
    .navbar-logo {
        height: 20px;
    }
    
    .navbar-nav {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
        grid-column: 1;
        justify-self: center;
    }
    
    .navbar-nav a {
        padding: 0.5rem 0;
        width: 100%;
        text-align: center;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    .container {
        padding: 15px;
    }
}
