/* Design System Variables */
:root {
    --bg-light: #f4f6fa;
    --panel-bg: rgba(255, 255, 255, 0.7);
    --panel-border: rgba(99, 102, 241, 0.08);
    
    --primary: #4f46e5; /* Indigo */
    --primary-glow: rgba(79, 70, 229, 0.15);
    --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --primary-glow-gradient: linear-gradient(135deg, rgba(79, 70, 229, 0.15) 0%, rgba(124, 58, 237, 0.15) 100%);
    
    --success: #059669; /* Emerald */
    --success-glow: rgba(5, 150, 105, 0.15);
    --success-gradient: linear-gradient(135deg, #0d9488 0%, #059669 100%);
    
    --warning: #d97706; /* Amber */
    --danger: #dc2626; /* Rose */
    --danger-gradient: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
    
    --text-main: #1e293b; /* Slate 800 */
    --text-muted: #475569; /* Slate 600 */
    --text-dark: #64748b; /* Slate 500 */
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    -webkit-text-size-adjust: 100%;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    position: relative;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Ambient Glowing Backgrounds (Contained strictly to viewport width) */
.background-glow {
    position: fixed;
    width: min(500px, 80vw);
    height: min(500px, 80vw);
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    opacity: 0.22;
    pointer-events: none;
    max-width: 100vw;
    overflow: hidden;
}

.bg-glow-1 {
    background: radial-gradient(circle, #818cf8 0%, #6366f1 100%);
    top: -80px;
    left: -80px;
    animation: pulseGlow 15s infinite alternate ease-in-out;
}

.bg-glow-2 {
    background: radial-gradient(circle, #c084fc 0%, #a855f7 100%);
    bottom: -80px;
    right: -80px;
    animation: pulseGlow 12s infinite alternate-reverse ease-in-out;
}

@keyframes pulseGlow {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.1) translate(30px, 20px); }
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.12);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

/* App Container Layout */
.app-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.75rem 1.25rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Header Styling */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    flex-wrap: wrap;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.logo-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 12px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px var(--primary-glow);
}

.logo-icon i {
    width: 22px;
    height: 22px;
    color: white;
}

.logo-area h1 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.15;
}

.accent-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-top: 2px;
    line-height: 1.3;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.6);
    padding: 6px 14px;
    border-radius: 30px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.online {
    background-color: var(--success);
    box-shadow: 0 0 10px var(--success-glow);
}

.status-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Trust & Feature Badges Banner (Replacing old Ad banner) */
.hero-feature-pill {
    margin: 0.25rem 0 1.5rem 0;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(99, 102, 241, 0.12);
    border-radius: 12px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    flex-wrap: wrap;
}

.pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary);
    background: rgba(79, 70, 229, 0.08);
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pill-badge i {
    width: 14px;
    height: 14px;
}

.pill-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    text-align: center;
}

/* Workspace Layout Grid */
.workspace {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
    flex: 1;
}

/* Base Panel */
.panel {
    background-color: var(--panel-bg);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    padding: 1.75rem;
    box-shadow: 0 20px 50px -12px rgba(99, 102, 241, 0.08);
    width: 100%;
    box-sizing: border-box;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.panel-header i {
    color: var(--primary);
}

.panel-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
}

/* Upload Ingestion Styling */
.upload-panel {
    width: 100%;
    min-height: 0;
}

.drop-zone {
    border: 2px dashed rgba(99, 102, 241, 0.2);
    border-radius: 16px;
    padding: 2.25rem 1.25rem;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: var(--transition-smooth);
    background: rgba(255, 255, 255, 0.3);
    width: 100%;
}

.drop-zone:hover, .drop-zone.drag-over {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.04);
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.06) inset;
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-icon-pulse {
    width: 60px;
    height: 60px;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    border: 1px solid rgba(99, 102, 241, 0.1);
    transition: var(--transition-smooth);
}

.drop-zone:hover .upload-icon-pulse, .drop-zone.drag-over .upload-icon-pulse {
    transform: scale(1.1);
    background: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
}

.drop-zone:hover .upload-icon-pulse i, .drop-zone.drag-over .upload-icon-pulse i {
    color: white;
}

.upload-icon-pulse i {
    color: var(--text-muted);
    width: 24px;
    height: 24px;
}

.drop-zone h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.file-types-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Buttons */
.btn-primary {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
    transition: var(--transition-smooth);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.03);
    color: var(--text-main);
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
}

.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.12);
}

/* Queue Panel list */
.queue-section {
    margin-top: 1.5rem;
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
}

.queue-section h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-weight: 600;
}

.active-queue {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.queue-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.queue-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.queue-filename {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

.queue-percent {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
}

.queue-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.queue-progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    width: 0%;
    transition: width 0.2s ease;
}

/* History logs Dashboard */
.history-panel {
    min-height: 0;
    height: 100%;
}

.panel-header-search {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1.5rem;
}

.panel-header-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.panel-header-title i {
    color: var(--primary);
}

.panel-header-title h2 {
    font-size: 1.15rem;
    font-weight: 600;
}

.search-box {
    position: relative;
    width: 300px;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 8px 12px 8px 36px;
    color: white;
    font-family: inherit;
    font-size: 0.85rem;
    transition: var(--transition-smooth);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.1);
}

.table-container {
    flex: 1;
    overflow-y: auto;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.logs-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.85rem;
}

.logs-table th {
    background: rgba(255, 255, 255, 0.02);
    padding: 14px 16px;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 5;
}

.logs-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    vertical-align: middle;
}

.logs-table tbody tr {
    transition: var(--transition-smooth);
}

.logs-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
}

.format-badge {
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
}

.format-badge.pdf { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.format-badge.docx { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.format-badge.image { background: rgba(168, 85, 247, 0.1); color: #a855f7; }
.format-badge.html { background: rgba(249, 115, 22, 0.1); color: #f97116; }
.format-badge.csv { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.format-badge.json { background: rgba(236, 72, 153, 0.1); color: #ec4899; }
.format-badge.txt { background: rgba(100, 116, 139, 0.1); color: #94a3b8; }

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.status-badge.processing {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.status-badge.processing i {
    animation: spinner 1s infinite linear;
}

.status-badge.completed {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.status-badge.failed {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

@keyframes spinner {
    to { transform: rotate(360deg); }
}

.actions-col {
    text-align: right;
}

.action-btn-group {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
}

.btn-icon.download:hover {
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
}

.btn-icon.delete:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
}

/* Empty State Styling */
.empty-state {
    background: transparent !important;
}

.empty-content {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-dark);
}

.empty-content i {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    stroke-width: 1.5;
}

.empty-content p {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.empty-content span {
    font-size: 0.8rem;
}

/* Modal Drawer Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(3, 7, 18, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 24px;
    width: 100%;
    max-width: 800px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    color: var(--text-main);
    animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.modal-title-area {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.modal-title-icon {
    color: var(--primary);
    width: 32px;
    height: 32px;
}

.modal-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    word-break: break-all;
    max-width: 600px;
    color: var(--text-main);
}

#modal-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.close-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.close-btn:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-main);
}

.modal-body {
    padding: 1.5rem;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.preview-tabs {
    display: flex;
    gap: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 6px 12px;
    cursor: pointer;
    position: relative;
    transition: var(--transition-smooth);
}

.tab-btn.active {
    color: var(--primary);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
}

.code-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    line-height: 1.5;
    overflow: auto;
    max-height: 400px;
}

.code-container pre {
    white-space: pre-wrap;
    word-break: break-all;
    color: #334155;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: rgba(0, 0, 0, 0.01);
    gap: 1rem;
    flex-wrap: wrap;
}

/* Custom form-input styling */
.form-input {
    width: 100%;
    min-height: 42px;
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--text-main) !important;
    font-family: inherit;
    font-size: 0.85rem;
    outline: none;
    transition: var(--transition-smooth);
    box-sizing: border-box;
}

.form-input:focus {
    border-color: var(--primary) !important;
    background: #ffffff !important;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.15) !important;
}

/* Features Showcase Grid Hub */
.features-showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    width: 100%;
    margin-bottom: 1.25rem;
}

.feature-hub-card {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 18px;
    padding: 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-main);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.feature-hub-card:hover {
    transform: translateY(-4px);
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.1);
    border-color: rgba(79, 70, 229, 0.25);
}

.feature-hub-card.active {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.12);
}

.hub-icon-wrapper {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.85rem;
    transition: var(--transition-smooth);
}

.hub-icon-wrapper i {
    width: 22px;
    height: 22px;
}

.parser-glow {
    background: rgba(79, 70, 229, 0.08);
    color: var(--primary);
}
.feature-hub-card.active .parser-glow, .feature-hub-card:hover .parser-glow {
    background: var(--primary-gradient);
    color: #ffffff;
}

.unlocker-glow {
    background: rgba(5, 150, 105, 0.08);
    color: var(--success);
}
.feature-hub-card.active .unlocker-glow, .feature-hub-card:hover .unlocker-glow {
    background: var(--success-gradient);
    color: #ffffff;
}

.editor-glow {
    background: rgba(217, 119, 6, 0.08);
    color: var(--warning);
}
.feature-hub-card:hover .editor-glow {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
}

.feature-hub-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: var(--text-main);
}

.feature-hub-card p {
    font-size: 0.76rem;
    color: var(--text-muted);
    line-height: 1.4;
    flex: 1;
    margin-bottom: 0.85rem;
}

.hub-card-action {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition-smooth);
}

.feature-hub-card.active .hub-card-action {
    color: var(--primary);
    text-decoration: underline;
}

/* Horizontal Tools Navigation Bar */
.tools-nav {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.5rem 0.25rem;
    margin-bottom: 1.5rem;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
}

.tools-nav::-webkit-scrollbar {
    height: 4px;
}
.tools-nav::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.tools-nav-item {
    scroll-snap-align: start;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    padding: 8px 14px;
    border-radius: 30px;
    color: var(--text-muted) !important;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: var(--transition-smooth);
    min-height: 38px;
}

.tools-nav-item:hover {
    background: #ffffff;
    color: var(--primary) !important;
    border-color: rgba(79, 70, 229, 0.2);
}

.tools-nav-item.active {
    background: var(--primary-gradient);
    color: #ffffff !important;
    border-color: transparent;
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* Responsive Media Queries */

/* Tablet (max-width: 900px) */
@media (max-width: 900px) {
    .features-showcase-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }
    
    .workspace {
        max-width: 100%;
    }
}

/* Mobile Devices (max-width: 640px) */
@media (max-width: 640px) {
    html, body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }

    .app-container {
        padding: 0.85rem 0.75rem;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
    }

    .app-header {
        margin-bottom: 1rem;
        padding-bottom: 0.85rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        width: 100%;
    }

    .logo-area {
        width: 100%;
    }

    .logo-area h1 {
        font-size: 1.25rem;
    }

    .subtitle {
        font-size: 0.75rem;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
        gap: 8px;
    }

    .header-actions .btn-secondary {
        flex: 1;
        justify-content: center;
        padding: 7px 12px;
        font-size: 0.78rem;
    }

    .status-indicator {
        padding: 5px 10px;
        font-size: 0.72rem;
    }

    .hero-feature-pill {
        flex-direction: column;
        text-align: center;
        padding: 8px 12px;
        gap: 6px;
        margin-bottom: 1rem;
        width: 100%;
    }

    .pill-badge {
        font-size: 0.68rem;
    }

    .pill-text {
        font-size: 0.74rem;
        line-height: 1.35;
    }

    .features-showcase-grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
        width: 100%;
    }

    .feature-hub-card {
        padding: 1.1rem 0.9rem;
    }

    .feature-hub-card h3 {
        font-size: 0.88rem;
    }

    .tools-nav {
        margin-bottom: 1.15rem;
        padding: 0.35rem 0.15rem;
        gap: 0.35rem;
    }

    .tools-nav-item {
        padding: 6px 11px;
        font-size: 0.74rem;
        min-height: 34px;
    }

    .workspace {
        width: 100%;
        max-width: 100%;
        gap: 1.15rem;
    }

    .panel {
        padding: 1.15rem 0.85rem;
        border-radius: 16px;
        width: 100%;
    }

    .drop-zone {
        padding: 1.5rem 0.75rem;
    }

    .upload-icon-pulse {
        width: 50px;
        height: 50px;
        margin-bottom: 0.85rem;
    }

    .upload-icon-pulse i {
        width: 24px;
        height: 24px;
    }

    .drop-zone h3 {
        font-size: 0.88rem;
    }

    .drop-zone p {
        font-size: 0.75rem;
    }

    .panel-header-search {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .search-box {
        max-width: 100%;
        width: 100%;
    }

    .doc-table-container {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .doc-table {
        min-width: 480px;
    }

    .modal-overlay {
        padding: 0.5rem;
        align-items: flex-end;
    }

    .modal-card {
        max-height: 90vh;
        border-radius: 20px 20px 0 0;
        width: 100%;
    }

    .modal-header {
        padding: 1rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-footer {
        padding: 1rem;
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 0.75rem;
    }

    .modal-footer > div {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .modal-footer .btn-primary,
    .modal-footer .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* Extra small mobile (max-width: 380px) */
@media (max-width: 380px) {
    .app-container {
        padding: 0.65rem 0.5rem;
    }

    .logo-area h1 {
        font-size: 1.1rem;
    }

    .tools-nav-item {
        padding: 5px 9px;
        font-size: 0.7rem;
    }
}
