/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #008fff;
    --primary-hover: #0066cc;
    --primary-light: #6cd4ff;
    --primary-gradient: linear-gradient(135deg, #008fff 0%, #6cd4ff 100%);
    --ai-gradient: linear-gradient(135deg, #008fff 0%, #0066ff 50%, #6cd4ff 100%);
    --sci-gold: #eaaa00;
    --sci-gold-light: #fbc531;
    --secondary-color: #64748b;
    --secondary-hover: #475569;
    --danger-color: #ef4444;
    --danger-hover: #dc2626;
    --success-color: #10b981;
    --success-light: #6ee7b7;
    --warning-color: #f59e0b;
    --background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --surface: rgba(255, 255, 255, 0.95);
    --surface-glass: rgba(255, 255, 255, 0.15);
    --chat-bubble-user: linear-gradient(135deg, #008fff 0%, #0066ff 100%);
    --chat-bubble-ai: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --border-color: rgba(226, 232, 240, 0.6);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glass: 0 8px 32px 0 rgba(0, 143, 255, 0.15);
    --shadow-ai: 0 10px 40px -5px rgba(0, 143, 255, 0.25);
    --blur: blur(8px);
    --border-radius: 20px;
    --border-radius-sm: 12px;
    --border-radius-chat: 24px;
}

body {
    font-family: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--background);
    min-height: 100vh;
    letter-spacing: -0.02em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 400;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: var(--surface);
    backdrop-filter: var(--blur);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-glass);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.company-logo {
    height: 48px;
    width: auto;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.company-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

header nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.user-info strong {
    color: var(--text-primary);
}

.role-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.role-user {
    background-color: #dbeafe;
    color: #1e40af;
}

.role-admin {
    background-color: #fef3c7;
    color: #92400e;
}

/* Main Content */
main {
    min-height: calc(100vh - 120px);
    padding: 2rem 0;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Features Grid */
.features {
    padding: 4rem 0;
}

.features h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: var(--surface);
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    text-align: center;
}

.feature-card h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-secondary);
}

/* Auth Container */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 2rem 0;
}

.auth-card {
    background: var(--surface);
    backdrop-filter: var(--blur);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-glass);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 450px;
    position: relative;
    overflow: hidden;
    animation: slideUpFade 0.8s ease-out;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.auth-card p {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.auth-footer {
    margin-top: 1.5rem;
    text-align: center;
}

.auth-footer p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* App Layout */
.app-container {
    display: flex;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.sidebar {
    width: 250px;
    background: var(--surface);
    backdrop-filter: var(--blur);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-glass);
    border: 1px solid var(--border-color);
    height: fit-content;
    position: sticky;
    top: 2rem;
    animation: slideInLeft 0.6s ease-out;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-link {
    display: block;
    padding: 1rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.nav-link:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    transform: translateX(4px);
}

.nav-link.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow);
}

.content {
    flex: 1;
    background: var(--surface);
    backdrop-filter: var(--blur);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-glass);
    border: 1px solid var(--border-color);
    animation: fadeIn 0.8s ease-out;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.6) 100%);
    backdrop-filter: var(--blur);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-card h3 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Actions */
.actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Test Results */
.test-results {
    margin-top: 2rem;
}

/* Test Setup Styles */
.test-setup {
    background: var(--background);
    padding: 0;
    border-radius: 8px;
    margin-top: 2rem;
}

.collapsible-header {
    width: 100%;
    background: none;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.collapsible-header:hover {
    background: var(--surface);
    border-color: var(--primary-color);
}

.collapsible-content {
    padding: 2rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-6px);
    }
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

.test-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.test-card {
    background: var(--surface);
    backdrop-filter: var(--blur);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.test-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.test-card h4 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.test-card p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.test-card button {
    margin-top: 0.5rem;
    width: 100%;
}

/* AI Chat Interface Styles */
.ai-chat-card {
    background: var(--surface);
    backdrop-filter: var(--blur);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-ai);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.ai-chat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--ai-gradient);
}

.ai-chat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--shadow-ai);
}

.ai-chat-header {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(0, 143, 255, 0.05) 0%, rgba(108, 212, 255, 0.02) 100%);
    border-bottom: 1px solid var(--border-color);
}

.ai-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--ai-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    box-shadow: var(--shadow);
    animation: pulse 3s ease-in-out infinite;
}

.ai-brain {
    font-size: 1.5rem;
    animation: float 3s ease-in-out infinite;
}

.ai-info {
    flex: 1;
}

.ai-info h4 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
}

.ai-info p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.ai-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--success-color);
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success-color);
    animation: pulse-dot 2s ease-in-out infinite;
}

.ai-chat-container {
    height: 400px;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.5) 0%, rgba(255, 255, 255, 0.8) 100%);
}

.ai-message, .user-message {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-message {
    flex-direction: row-reverse;
    align-self: flex-end;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.ai-message .message-avatar {
    background: var(--ai-gradient);
    color: white;
    box-shadow: var(--shadow);
}

.user-message .message-avatar {
    background: var(--chat-bubble-user);
    color: white;
    box-shadow: var(--shadow);
}

.message-content {
    max-width: 80%;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.user-message .message-content {
    align-items: flex-end;
}

.message-bubble {
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius-chat);
    font-size: 0.95rem;
    line-height: 1.5;
    word-wrap: break-word;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.ai-bubble {
    background: var(--chat-bubble-ai);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-bottom-left-radius: 8px;
}

.user-bubble {
    background: var(--chat-bubble-user);
    color: white;
    border-bottom-right-radius: 8px;
}

.message-time {
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 400;
    margin-top: 0.25rem;
}

.user-message .message-time {
    text-align: right;
}

.chat-input-container {
    padding: 1.5rem;
    background: var(--surface);
    border-top: 1px solid var(--border-color);
}

.chat-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-chat);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.chat-input-wrapper:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 143, 255, 0.1), var(--shadow);
}

.chat-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    font-family: inherit;
    background: transparent;
    color: var(--text-primary);
    font-weight: 400;
}

.chat-input::placeholder {
    color: var(--text-light);
}

.send-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--ai-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow);
}

.send-button:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.send-button:active {
    transform: scale(0.95);
}

.send-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.input-hint {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-light);
    text-align: center;
    font-weight: 400;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    background: var(--chat-bubble-ai);
    border-radius: var(--border-radius-chat);
    border-bottom-left-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.typing-dots {
    display: flex;
    gap: 0.25rem;
}

.typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-color);
    animation: typing 1.4s ease-in-out infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

.test-success {
    background: #10b981;
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
    text-align: center;
}

.test-success h4 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

/* Items */
.items-list {
    display: grid;
    gap: 1rem;
}

.item-card {
    background-color: var(--background);
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.item-card h4 {
    margin-bottom: 0.5rem;
}

.item-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.item-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.item-actions {
    display: flex;
    gap: 0.5rem;
}

.empty-state {
    text-align: center;
    color: var(--text-secondary);
    padding: 3rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: var(--blur);
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 143, 255, 0.15);
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 1);
}

/* Beautiful Custom Select Styling */
.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23008fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 1rem center;
    background-repeat: no-repeat;
    background-size: 1.25rem;
    padding-right: 3rem;
}

.form-group select:hover {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(0, 143, 255, 0.1);
}

.form-group select option {
    padding: 0.75rem;
    background: white;
    color: var(--text-primary);
    font-weight: 500;
}

.form-group select option:hover {
    background: var(--primary-light);
    color: white;
}

.form-group input:disabled {
    background-color: var(--background);
    cursor: not-allowed;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.025em;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--secondary-hover);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: var(--danger-hover);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--surface);
    border-radius: 0.5rem;
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 500px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal form {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #dcfce7;
    color: #14532d;
    border: 1px solid #86efac;
}

.alert-error {
    background-color: #fee2e2;
    color: #7f1d1d;
    border: 1px solid #fca5a5;
}

/* Footer */
footer {
    background-color: var(--surface);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    text-align: center;
}

footer p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Animations */
@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: static;
    }
    
    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
    }
    
    .feature-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
}

/* To-Do App Styles */
.todo-form {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: var(--surface);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.todo-form input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
}

.todo-form select {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    background-color: var(--surface);
}

.todo-form button {
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.todo-form button:hover {
    background-color: var(--primary-hover);
}

.todo-list {
    margin-bottom: 2rem;
}

.todo-list h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.todo-list ul {
    list-style: none;
    background-color: var(--surface);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 1rem;
}

.todo-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 1rem;
}

.todo-list li:last-child {
    border-bottom: none;
}

.complete-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.complete-btn:hover {
    background-color: var(--background);
}

.todo-list.completed {
    opacity: 0.7;
}

.todo-list.completed li {
    color: var(--text-secondary);
}

/* PDF Upload Styles */
.upload-container {
    max-width: 600px;
    margin: 0 auto;
}

.upload-form {
    background: var(--surface);
    backdrop-filter: var(--blur);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-glass);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.upload-form:hover {
    box-shadow: var(--shadow-lg);
}

.file-drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-drop-zone:hover,
.file-drop-zone.dragover {
    border-color: var(--primary-color);
    background-color: rgba(37, 99, 235, 0.05);
}

.file-drop-zone input[type="file"] {
    display: none;
}

.drop-zone-content p {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.drop-zone-content .file-info {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.file-selected {
    background-color: rgba(22, 163, 74, 0.1);
    border-color: var(--success-color);
}

.upload-status {
    background-color: var(--surface);
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.status-message {
    margin-bottom: 1rem;
    padding: 0.75rem;
    border-radius: 0.375rem;
    font-weight: 500;
}

.status-success {
    background-color: #dcfce7;
    color: #14532d;
    border: 1px solid #86efac;
}

.status-error {
    background-color: #fee2e2;
    color: #7f1d1d;
    border: 1px solid #fca5a5;
}

.status-processing {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background-color: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary-color);
    width: 0%;
    transition: width 0.3s ease;
    animation: progress-indeterminate 2s infinite;
}

@keyframes progress-indeterminate {
    0% { width: 0%; margin-left: 0%; }
    50% { width: 30%; margin-left: 70%; }
    100% { width: 0%; margin-left: 100%; }
}

/* Documents List Styles */
.documents-filter {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.documents-filter select {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    background-color: var(--surface);
    font-size: 1rem;
}

.documents-list {
    display: grid;
    gap: 1rem;
}

.document-card {
    background: var(--surface);
    backdrop-filter: var(--blur);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
}

.document-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.document-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.document-type {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
}

.document-type.scip {
    background-color: #dbeafe;
    color: #1e40af;
}

.document-type.land_survey {
    background-color: #dcfce7;
    color: #14532d;
}

.document-type.soil_report {
    background-color: #fef3c7;
    color: #92400e;
}

.document-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.document-status.pending {
    background-color: #f3f4f6;
    color: #6b7280;
}

.document-status.processing {
    background-color: #dbeafe;
    color: #1e40af;
}

.document-status.completed {
    background-color: #dcfce7;
    color: #14532d;
}

.document-status.failed {
    background-color: #fee2e2;
    color: #7f1d1d;
}

.document-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.document-actions {
    display: flex;
    gap: 0.5rem;
}

.modal-large {
    max-width: 900px;
}

.modal-body {
    padding: 1.5rem;
}

.analysis-section {
    margin-bottom: 2rem;
}

.analysis-section h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.125rem;
}

.analysis-data {
    background-color: var(--background);
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.analysis-data dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1rem;
}

.analysis-data dt {
    font-weight: 500;
    color: var(--text-secondary);
}

.analysis-data dd {
    color: var(--text-primary);
}

.raw-response {
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    padding: 1rem;
    font-family: monospace;
    font-size: 0.875rem;
    white-space: pre-wrap;
    max-height: 400px;
    overflow-y: auto;
}

/* Bulk Actions Styles */
.bulk-actions-container {
    margin: 1rem 0;
    padding: 1rem;
    background-color: var(--surface);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.selection-controls {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.bulk-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background-color: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: 0.375rem;
}

.selected-info {
    font-weight: 500;
    color: #0c4a6e;
}

/* Document Card Updates */
.document-card {
    position: relative;
}

/* Delete Button in Top Right Corner */
.delete-btn-corner {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    z-index: 10;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.delete-btn-corner:hover {
    background: #b91c1c;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.delete-btn-corner:active {
    transform: scale(0.95);
}

.document-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.document-select {
    flex-shrink: 0;
    padding-top: 0.25rem;
}

.document-select input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
}

.document-info {
    flex: 1;
}

.document-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.document-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.document-actions .btn {
    margin: 0;
}

/* Status indicators */
.document-status {
    flex-shrink: 0;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
}

.document-status.pending {
    background-color: #fef3c7;
    color: #92400e;
}

.document-status.processing {
    background-color: #dbeafe;
    color: #1e40af;
}

.document-status.completed {
    background-color: #dcfce7;
    color: #166534;
}

.document-status.failed {
    background-color: #fee2e2;
    color: #dc2626;
}

/* Document type badges */
.document-type {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    margin-top: 0.25rem;
}

.document-type.scip {
    background-color: #ede9fe;
    color: #7c3aed;
}

.document-type.land_survey {
    background-color: #ecfdf5;
    color: #059669;
}

.document-type.soil_report {
    background-color: #fef2f2;
    color: #dc2626;
}