:root {
    --bg-primary: #f8fafc;
    --bg-surface: rgba(255, 255, 255, 0.95);
    --border-color: #e2e8f0;
    --text-main: #1f2937;
    --text-muted: #6b7280;

    /* Brand Colors - Deep Corporate Blue */
    --color-primary: #1e3a8a;
    --color-primary-hover: #1d4ed8;
    --color-secondary: #2563eb;
    --color-success: #16a34a;
    --color-danger: #dc2626;
    --color-warning: #ea580c;

    /* Feature Specific Hues (Consistent Blues/Grays for Corporate Look) */
    --hue-merge: #1e3a8a;
    --hue-split: #2563eb;
    --hue-organize: #3b82f6;
    --hue-compress: #0d6efd;
    --hue-convert: #0d9488;

    /* Gradients */
    --grad-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    --grad-card-hover: linear-gradient(135deg, rgba(37, 99, 235, 0.02) 0%, rgba(30, 58, 138, 0.02) 100%);
}

/* Global Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Navbar */
.navbar {
    background-color: var(--bg-surface);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-container {
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 1.5rem;
    cursor: pointer;
    user-select: none;
}

.logo-icon {
    font-size: 1.8rem;
}

.logo-highlight {
    color: var(--color-secondary);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-item {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-item:hover,
.nav-item.active {
    background: var(--color-primary);
    color: white;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 4rem 1rem 3rem 1rem;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-section p {
    font-size: 1.25rem;
    color: var(--text-muted);
    font-weight: 300;
    max-width: 700px;
    margin: 0 auto;
}

/* Main Content */
.main-content {
    flex: 1;
    padding-bottom: 4rem;
}

.view-section {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.view-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tools Grid Dashboard */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 1rem 0;
}

@media (max-width: 992px) {
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }
}

.tool-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease-in-out;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px -8px rgba(30, 58, 138, 0.08), 0 4px 6px -2px rgba(30, 58, 138, 0.04);
    border-color: var(--color-secondary);
}

.tool-card-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.color-merge {
    background-color: rgba(30, 58, 138, 0.05);
    color: #1e3a8a;
}

.color-split {
    background-color: rgba(37, 99, 235, 0.05);
    color: #2563eb;
}

.color-organize {
    background-color: rgba(59, 130, 246, 0.05);
    color: #3b82f6;
}

.color-compress {
    background-color: rgba(13, 110, 253, 0.05);
    color: #0d6efd;
}

.color-convert {
    background-color: rgba(13, 148, 136, 0.05);
    color: #0d9488;
}

.tool-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.tool-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 300;
}

/* Workspace Views */
.btn-back {
    background: none;
    border: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
}

.btn-back:hover {
    color: var(--color-primary);
}

.workspace-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.workspace-icon {
    font-size: 2.5rem;
}

.workspace-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
}

.workspace-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Upload Container */
.upload-container {
    background: var(--bg-surface);
    border: 2px dashed rgba(13, 110, 253, 0.5);
    border-radius: 20px;
    padding: 5rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.upload-container:hover,
.upload-container.dragover {
    border-color: var(--color-primary);
    background-color: rgba(13, 110, 253, 0.03);
    box-shadow: 0 8px 16px -1px rgba(13, 110, 253, 0.1);
}

.file-input-hidden {
    display: none;
}

.upload-illustration {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.upload-container h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.upload-container p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.upload-tip {
    font-size: 0.85rem;
    margin-top: 1rem;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-success,
.btn-action {
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    padding: 0.75rem 2.5rem;
    box-shadow: 0 2px 4px rgba(30, 58, 138, 0.15);
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(30, 58, 138, 0.25);
}

.btn-secondary {
    background-color: #e2e8f0;
    color: #4a5568;
    padding: 0.6rem 1.5rem;
}

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

.btn-small {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    border-radius: 6px;
}

.btn-success {
    background-color: var(--color-success);
    color: white;
    padding: 0.75rem 2.5rem;
    box-shadow: 0 4px 15px rgba(56, 161, 105, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 161, 105, 0.5);
}

.btn-action {
    background: var(--color-primary);
    color: white;
    padding: 0.85rem 3rem;
    font-size: 1.1rem;
    box-shadow: 0 2px 4px rgba(30, 58, 138, 0.15);
}

.btn-action:hover {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(30, 58, 138, 0.25);
}

.btn-large {
    width: 100%;
}

/* Editor Workspace Container */
.editor-container {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    backdrop-filter: blur(10px);
}

.tool-panel {
    margin-bottom: 2rem;
    animation: fadeIn 0.3s ease forwards;
}

.panel-tip {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Merge Files List */
.files-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.file-item {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.01);
    transition: all 0.2s ease;
    cursor: grab;
}

.file-item:active {
    cursor: grabbing;
}

.file-item-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.file-item-icon {
    font-size: 1.5rem;
}

.file-item-name {
    font-weight: 500;
    font-size: 0.95rem;
}

.file-item-size {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.file-item-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.btn-icon:hover {
    background-color: #f7fafc;
}

.btn-icon-delete:hover {
    background-color: rgba(229, 62, 62, 0.1);
    color: var(--color-danger);
}

/* File Preview Card */
.file-preview-card {
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Control Box */
.control-box {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.01);
}

.control-box h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Forms & Inputs */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
}

.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-weight: 500;
    font-size: 0.9rem;
}

.input-field {
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    font-family: inherit;
    width: 100%;
    outline: none;
    transition: border-color 0.2s ease;
}

.input-field:focus {
    border-color: var(--color-primary);
}

/* Alerts */
.alert-info,
.alert-success {
    border-radius: 8px;
    padding: 1rem;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.alert-info {
    background-color: rgba(66, 153, 225, 0.1);
    border-left: 4px solid #4299e1;
    color: #2b6cb0;
}

.alert-success {
    background-color: rgba(72, 187, 120, 0.1);
    border-left: 4px solid #48bb78;
    color: #276749;
}

/* Organize Pages Grid */
.panel-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.page-card {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03);
    position: relative;
    cursor: grab;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.page-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
}

.page-card-image-container {
    background-color: #f7fafc;
    border-radius: 8px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 0.5rem;
    border: 1px solid #edf2f7;
    position: relative;
}

.page-card-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.page-card-number {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Page Card Toolbar Actions on Hover */
.page-card-actions {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    gap: 2px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 6px;
    padding: 2px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.page-card:hover .page-card-actions {
    opacity: 1;
}

.btn-card-action {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    width: 26px;
    height: 26px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.btn-card-action:hover {
    background-color: #edf2f7;
}

.btn-card-action-delete:hover {
    color: var(--color-danger);
    background-color: rgba(229, 62, 62, 0.08);
}

/* Dragging visual cues */
.page-card.dragging {
    opacity: 0.4;
    cursor: grabbing;
}

/* Action Area */
.action-section {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Loading Spinner */
.process-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background-color: #f7fafc;
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 10px;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(13, 110, 253, 0.2);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

#process-loader-text {
    font-weight: 500;
    font-size: 0.95rem;
}

.download-box {
    text-align: center;
}

/* Footer */
.footer {
    background-color: white;
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Feature Specific: Compress Color Hues */
.color-compress {
    background-color: rgba(13, 110, 253, 0.05);
    color: #0d6efd;
}

/* Merge List Thumbnails */
.file-thumbnail-container {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f7fafc;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.file-item-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.file-thumbnail-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(13, 110, 253, 0.2);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Split Visual Selection Workspace Layout */
.split-workspace-layout {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 2rem;
    align-items: start;
    margin-bottom: 1.5rem;
}

@media (max-width: 900px) {
    .split-workspace-layout {
        grid-template-columns: 1fr;
    }
}

.split-grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.split-grid-actions {
    display: flex;
    gap: 0.5rem;
}

/* Selection Indicators in Split Grid */
.page-card.selected {
    border-color: var(--color-primary);
    background-color: rgba(13, 110, 253, 0.04);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
}

.page-card.selected::before {
    content: "✓";
    position: absolute;
    top: 6px;
    left: 6px;
    width: 20px;
    height: 20px;
    background-color: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Loaded PDFs section in Organize */
.loaded-pdfs-section {
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    animation: fadeIn 0.3s ease;
}

.loaded-pdfs-section h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.loaded-pdfs-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.loaded-pdf-tag {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.3rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.btn-delete-pdf-tag {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-danger);
    font-weight: bold;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-left: 0.25rem;
    transition: opacity 0.2s;
}

.btn-delete-pdf-tag:hover {
    opacity: 0.7;
}

.global-actions button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Tiered Conversion & RAG Chat Styles */
.convert-workspace-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.convert-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    gap: 1rem;
}

.convert-tab {
    background: none;
    border: none;
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-muted);
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    outline: none;
}

.convert-tab:hover {
    color: var(--color-primary);
}

.convert-tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.tier-option-card {
    transition: all 0.2s ease !important;
}

.tier-option-card:hover {
    border-color: var(--color-primary) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.tier-option-card.active {
    border-color: var(--color-primary) !important;
    background-color: rgba(37, 99, 235, 0.02) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
}

/* Chat Styles */
.chat-container {
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.chat-bubble.user {
    align-self: flex-end;
    background: var(--color-primary);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 12px 12px 0 12px;
    max-width: 80%;
    font-size: 0.95rem;
    line-height: 1.5;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.chat-bubble.assistant {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.chat-locked-overlay {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ==========================================
   NEW FEATURES STYLES (2026-07)
   ========================================== */

/* AI Chat Document - PRO Badge in Nav */
.nav-item-pro {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.badge-pro {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* PRO Card on Dashboard */
.tool-card-pro {
    position: relative;
    border: 1.5px solid rgba(245, 158, 11, 0.3) !important;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%) !important;
}

.tool-card-pro:hover {
    border-color: rgba(217, 119, 6, 0.5) !important;
    box-shadow: 0 8px 32px rgba(245, 158, 11, 0.15) !important;
}

.badge-pro-card {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Color for AI Chat Document */
.color-chatdoc {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(217, 119, 6, 0.08) 100%);
    color: #d97706;
}

/* Maintenance Page Styles */
.maintenance-container {}

.maintenance-icon {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.08));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: #d97706;
}

.badge-maintenance {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 1rem;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.08));
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    letter-spacing: 0.03em;
}

.maintenance-container h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-main, #1f2937);
    margin-bottom: 1rem;
}

.maintenance-description {
    color: var(--text-muted, #6b7280);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.maintenance-features {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    width: 100%;
    text-align: left;
}

.maintenance-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: var(--text-muted, #6b7280);
    font-size: 0.9rem;
}

.maintenance-feature-item+.maintenance-feature-item {
    border-top: 1px solid var(--border-color);
}

.feature-icon {
    color: #10b981;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.maintenance-note {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.85rem 1.1rem;
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 8px;
    font-size: 0.85rem;
    color: #92400e;
    line-height: 1.5;
    text-align: left;
    width: 100%;
}

/* Merge thumbnail */
.merge-thumb-wrap {
    width: 48px;
    height: 64px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    background: var(--bg-primary, #f8fafc);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
}

.merge-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.merge-thumbnail-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.spinner-small {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--color-primary, #1e3a8a);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

/* Split Page Grid Selection Styles */
.split-pages-section {
    margin-bottom: 1.5rem;
}

.split-pages-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.split-pages-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.split-selection-info {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

kbd {
    display: inline-block;
    padding: 0.1rem 0.35rem;
    font-size: 0.8rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: monospace;
}

/* Page card selected state */
.page-card.selected {
    border: 2px solid var(--color-primary, #1e3a8a) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

.page-card-check {
    display: none;
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--color-primary, #1e3a8a);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.page-card.selected .page-card-check {
    display: flex;
}

/* Organize: Loaded PDF Tags */
.loaded-pdf-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0.3rem 0.75rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0.25rem;
}

.btn-tag-delete {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1;
    padding: 0;
    transition: color 0.15s;
}

.btn-tag-delete:hover {
    color: #ef4444;
}

/* Selection controls in Organize */
.selection-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.selection-count {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-left: auto;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
}

/* Organize undo/redo disabled state */
button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Alert styles */
.alert-warning {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #92400e;
    padding: 0.9rem 1.1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.info-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.9rem 1.1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Color for compress */
.color-compress {
    background: linear-gradient(135deg, rgba(0, 119, 182, 0.12) 0%, rgba(13, 110, 253, 0.12) 100%);
    color: #0077b6;
}

/* ==========================================
   HAMBURGER MENU BUTTON
   ========================================== */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
    flex-direction: column;
    gap: 5px;
    z-index: 200;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--text-main);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hamburger animasi saat aktif (X) */
.hamburger-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ==========================================
   HAMBURGER BUTTON (Desktop: hidden)
   ========================================== */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
    flex-direction: column;
    gap: 5px;
    z-index: 110;
    transition: opacity 0.2s ease;
}

.hamburger-btn:hover {
    opacity: 0.7;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--text-main, #1f2937);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Animasi hamburger jadi X saat active */
.hamburger-btn.active .hamburger-line:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.hamburger-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger-btn.active .hamburger-line:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

==========================================*/ @media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    /* Navbar: hamburger menu */
    .navbar-container {
        height: auto;
        padding: 0.5rem 0;
        flex-wrap: wrap;
    }

    .hamburger-btn {
        display: flex;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 0.25rem;
        padding: 0.75rem 0 0.5rem 0;
        border-top: 1px solid var(--border-color);
        margin-top: 0.5rem;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-item {
        font-size: 0.9rem;
        padding: 0.6rem 0.8rem;
        white-space: nowrap;
        width: 100%;
    }

    /* Hero Section */
    .hero-section {
        padding: 2rem 0.5rem 1.5rem;
    }

    .hero-section h1 {
        font-size: 1.75rem;
    }

    .hero-section p {
        font-size: 0.95rem;
    }

    /* Tool Card Dashboard */
    .tool-card {
        padding: 1.25rem;
    }

    .tool-card-icon {
        width: 48px;
        height: 48px;
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    /* Workspace Header */
    .workspace-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 1rem;
    }

    .workspace-header h2 {
        font-size: 1.35rem;
    }

    .workspace-icon {
        font-size: 2rem;
    }

    /* Upload Area */
    .upload-container {
        padding: 2.5rem 1rem;
    }

    .upload-container h3 {
        font-size: 1.1rem;
    }

    /* Editor Container */
    .editor-container {
        padding: 1rem;
    }

    .control-box {
        padding: 1rem;
    }

    /* Panel Header & Global Actions */
    .panel-header-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .global-actions {
        flex-wrap: wrap;
        width: 100%;
    }

    .global-actions .btn-small {
        font-size: 0.78rem;
        padding: 0.35rem 0.7rem;
    }

    /* File item di merge */
    .file-item {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .file-item .file-item-info {
        min-width: 0;
        flex: 1;
    }

    .file-item .file-item-actions {
        flex-shrink: 0;
    }

    /* Pages Grid lebih padat untuk mobile */
    .pages-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 0.6rem;
        padding: 0.5rem 0;
    }

    .page-card-image-container {
        height: 110px;
    }

    .page-card {
        padding: 0.5rem;
    }

    .page-card-number {
        font-size: 0.7rem;
    }

    /* Split pages header */
    .split-pages-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }

    /* Selection controls */
    .selection-controls {
        gap: 0.3rem;
        padding: 0.5rem;
    }

    .selection-controls .btn-small {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }

    .selection-count {
        font-size: 0.75rem;
        width: 100%;
        margin-left: 0;
        margin-top: 0.25rem;
    }

    /* Radio label lebih kecil */
    .radio-label {
        font-size: 0.85rem;
    }

    /* Action Section */
    .action-section {
        padding-top: 1.5rem;
    }

    /* AI Chat Doc / Maintenance */
    .maintenance-container h2 {
        font-size: 1.4rem;
    }

    .maintenance-icon {
        width: 80px;
        height: 80px;
    }

    .maintenance-container {
        text-align: center;
    }

    /* Convert tabs scroll */
    .convert-tabs {
        overflow-x: auto;
        gap: 0.5rem;
    }

    .convert-tab {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
        white-space: nowrap;
    }
}

/* Extra small: ≤ 480px */
@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 1.4rem;
    }

    .nav-item {
        font-size: 0.72rem;
        padding: 0.3rem 0.5rem;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .logo-icon svg {
        width: 22px;
        height: 22px;
    }

    .pages-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .page-card-image-container {
        height: 100px;
    }

    .upload-illustration svg {
        width: 40px;
        height: 40px;
    }

    .btn-primary,
    .btn-action {
        padding: 0.6rem 1.2rem;
        font-size: 0.95rem;
    }

    .tool-card h3 {
        font-size: 1.1rem;
    }
}

/* Modal Feedback (Premium UI) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6); /* Slate-900 with transparency */
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-content {
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 90%;
    max-width: 480px;
    padding: 2rem;
    position: relative;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
}

.modal-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.btn-close-modal {
    background: none;
    border: none;
    font-size: 1.7rem;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 0;
    line-height: 1;
}

.btn-close-modal:hover {
    color: #475569;
}

.modal-body {
    margin-bottom: 1.5rem;
}

.modal-body p {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Star Rating styling */
.rating-stars {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.star-btn {
    font-size: 2.2rem;
    color: #cbd5e1;
    cursor: pointer;
    transition: transform 0.2s ease, color 0.2s ease;
    user-select: none;
}

.star-btn:hover {
    transform: scale(1.15);
}

.star-btn.hover,
.star-btn.active {
    color: #f59e0b; /* Golden star color */
}

/* Comment Area */
.comment-area {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.comment-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
}

.comment-textarea {
    width: 100%;
    height: 80px;
    padding: 0.75rem;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    font-family: inherit;
    font-size: 0.9rem;
    resize: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.comment-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Modal Footer buttons */
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.btn-cancel {
    background-color: #f1f5f9;
    color: #475569;
    border: none;
    padding: 0.65rem 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-cancel:hover {
    background-color: #e2e8f0;
}

.btn-submit {
    background-color: #3b82f6;
    color: #ffffff;
    border: none;
    padding: 0.65rem 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease;
}

.btn-submit:hover:not(:disabled) {
    background-color: #2563eb;
}

.btn-submit:disabled {
    background-color: #94a3b8;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Animations */
.animate-fade-in {
    animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}