/* Doxvox - Custom Styles */

:root {
    --sidebar-width: 260px;
    --sidebar-bg: #1a1d23;
    --main-bg: #0d1117;
    --card-bg: #161b22;
    --border-color: #30363d;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --accent: #58a6ff;
    --accent-green: #3fb950;
    --accent-orange: #d29922;
    --accent-red: #f85149;
}

body {
    background-color: var(--main-bg);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Login Page */
.logo-icon {
    font-size: 3.5rem;
    color: var(--accent);
}

/* App Layout */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.sidebar-brand {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-brand i {
    font-size: 1.5rem;
    color: var(--accent);
}

.sidebar-brand h5 {
    margin: 0;
    color: var(--text-primary);
    font-weight: 700;
}

.sidebar-nav {
    flex: 1;
    padding: 0.75rem 0;
    overflow-y: auto;
}

.nav-item {
    padding: 0 0.75rem;
    margin-bottom: 2px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
}

.nav-link:hover {
    background: rgba(255,255,255,0.06);
    color: var(--text-primary);
}

.nav-link.active {
    background: rgba(88, 166, 255, 0.12);
    color: var(--accent);
}

.nav-link i {
    font-size: 1.1rem;
    width: 1.25rem;
    text-align: center;
}

.nav-badge {
    margin-left: auto;
    background: var(--accent-orange);
    color: #000;
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-weight: 600;
}

.sidebar-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border-color);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.sidebar-user .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 0.8rem;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 1.5rem 2rem;
    min-height: 100vh;
}

.page-header {
    margin-bottom: 1.5rem;
}

.page-header h2 {
    font-weight: 700;
    margin: 0;
}

/* Cards */
.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
}

.stat-card .stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-card .stat-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Document Cards */
.doc-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    transition: all 0.15s ease;
    cursor: pointer;
}

.doc-card:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.doc-card .doc-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.doc-card .doc-title {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doc-card .doc-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Category Dropdown */
.category-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    min-width: 200px;
    max-height: 300px;
    overflow-y: auto;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.25rem;
    margin-top: 0.25rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.category-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.category-dropdown-item:hover { background: rgba(255,255,255,0.05); color: #fff; }
.category-dropdown-item.active { background: rgba(88,166,255,0.15); color: var(--accent); }

/* Category Badge */
.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Upload Zone */
.upload-zone {
    background: var(--card-bg);
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: var(--accent);
    background: rgba(88, 166, 255, 0.05);
}

.upload-zone .upload-icon {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.upload-zone .upload-text {
    color: var(--text-secondary);
}

/* Search */
.search-input {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 10px;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
}

.search-input:focus {
    background: var(--card-bg);
    border-color: var(--accent);
    color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15);
}

.search-wrapper {
    position: relative;
}

.search-wrapper i {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

/* Reminder */
.reminder-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.reminder-item.overdue {
    border-left: 3px solid var(--accent-red);
}

.reminder-item.upcoming {
    border-left: 3px solid var(--accent-orange);
}

.reminder-item.future {
    border-left: 3px solid var(--accent-green);
}

/* Document Detail */
.detail-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.detail-card .detail-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.detail-card .detail-body {
    padding: 1.25rem;
}

.detail-field {
    margin-bottom: 0.75rem;
}

.detail-field .field-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-field .field-value {
    font-size: 0.95rem;
}

/* Processing Status */
.status-pending { color: var(--text-secondary); }
.status-processing { color: var(--accent-orange); }
.status-done { color: var(--accent-green); }
.status-error { color: var(--accent-red); }

/* Mobile */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1100;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 0.5rem 0.65rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: block;
    }

    .main-content {
        margin-left: 0;
        padding: 0.75rem;
        padding-top: 3.5rem;
    }

    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
        display: none;
    }

    .sidebar-overlay.show {
        display: block;
    }

    /* Page Headers: Stack vertically on mobile */
    .page-header.d-flex {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.5rem;
    }

    .page-header h2 {
        font-size: 1.35rem;
    }

    /* Stat cards: smaller values on mobile */
    .stat-card .stat-value {
        font-size: 1.25rem;
    }

    .stat-card .stat-label {
        font-size: 0.75rem;
    }

    .stat-card .stat-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    /* Upload Zone: less padding on mobile */
    .upload-zone {
        padding: 2rem 1rem;
    }

    .upload-zone .upload-icon {
        font-size: 2.25rem;
    }

    /* Document cards: tighter on mobile */
    .doc-card {
        padding: 0.75rem;
    }

    .doc-card .doc-title {
        font-size: 0.85rem;
    }

    /* Document preview: shorter on mobile */
    .doc-preview-frame {
        height: 350px;
    }

    .doc-preview-image {
        max-height: 400px;
    }

    /* Detail card: tighter padding */
    .detail-card .detail-header {
        padding: 0.75rem;
    }

    .detail-card .detail-body {
        padding: 0.75rem;
    }

    /* Camera FAB: slightly lower on mobile to avoid thumb zone */
    .camera-fab {
        bottom: 1.25rem;
        right: 1.25rem;
    }

    /* Filter bar: smaller buttons on mobile */
    .filter-btn {
        font-size: 0.75rem;
        padding: 0.35rem 0.6rem;
    }

    .filter-bar-secondary {
        gap: 0.35rem;
    }

    .filter-select {
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
        max-width: 130px;
        flex: 1;
    }

    .doc-table-row td {
        padding: 0.5rem 0.6rem;
        font-size: 0.8rem;
    }

    .doc-table-filename {
        max-width: 180px;
    }

    /* Reminder items: allow wrapping */
    .reminder-item {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    /* Toast: full width on mobile */
    .toast-container {
        left: 1rem;
        right: 1rem;
    }

    .toast-container .toast {
        width: 100%;
    }

    /* Modal adjustments */
    .modal-dialog {
        margin: 0.5rem;
    }

    /* Category dropdown: full width on mobile */
    .category-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        max-height: 50vh;
        border-radius: 16px 16px 0 0;
        z-index: 1050;
        padding: 0.5rem;
    }

    /* Share card action buttons */
    .share-card-actions {
        flex-wrap: wrap;
    }

    /* Bulk action bar: stack on mobile */
    .bulk-action-bar .d-flex {
        gap: 0.5rem;
    }

    .bulk-action-bar .vr {
        display: none;
    }

    /* PDF toolbar: wrap on mobile */
    .pdf-toolbar {
        flex-wrap: wrap;
    }

    .pdf-canvas-wrap {
        max-height: 400px;
    }
}

/* Small phones (< 400px) */
@media (max-width: 400px) {
    .main-content {
        padding: 0.5rem;
        padding-top: 3.5rem;
    }

    .stat-card .stat-value {
        font-size: 1.1rem;
    }

    .page-header h2 {
        font-size: 1.2rem;
    }

    .doc-card .doc-title {
        font-size: 0.8rem;
    }

    .doc-card .doc-meta {
        font-size: 0.7rem;
    }

    .category-badge {
        font-size: 0.65rem;
        padding: 0.15rem 0.4rem;
    }
}

/* Touch-friendly: ensure interactive elements are at least 44px */
@media (pointer: coarse) {
    .nav-link {
        padding: 0.75rem;
        min-height: 44px;
    }

    .filter-btn {
        min-height: 36px;
    }

    .btn-sm {
        min-height: 36px;
        min-width: 36px;
    }
}

/* Mobile-specific utility classes */
.mobile-stack {
    display: flex;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .mobile-stack {
        flex-direction: column;
    }

    .mobile-wrap {
        flex-wrap: wrap !important;
    }

    .mobile-full {
        width: 100% !important;
    }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* Toast */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
}

/* Modal Dark */
.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.modal-header {
    border-bottom-color: var(--border-color);
}

.modal-footer {
    border-top-color: var(--border-color);
}

/* Camera Button */
.camera-fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(88, 166, 255, 0.3);
    cursor: pointer;
    transition: transform 0.15s ease;
    z-index: 900;
}

.camera-fab:hover {
    transform: scale(1.1);
}

/* Explanation Box */
.explanation-box {
    background: rgba(88, 166, 255, 0.08);
    border: 1px solid rgba(88, 166, 255, 0.2);
    border-radius: 10px;
    padding: 1rem 1.25rem;
}

.explanation-box h6 {
    color: var(--accent);
    margin-bottom: 0.5rem;
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    justify-content: center;
    padding: 3rem;
}

/* Tax Badge */
.tax-badge {
    background: rgba(63, 185, 80, 0.15);
    color: var(--accent-green);
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.filter-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 8px;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.filter-btn:hover,
.filter-btn.active {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(88, 166, 255, 0.08);
}

/* Admin Model Picker */
.model-item:hover {
    background: rgba(88, 166, 255, 0.1);
}

/* Document Thumbnails */
.doc-thumbnail {
    width: 56px;
    height: 72px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--border-color);
    border: 1px solid var(--border-color);
}

.doc-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Inline Document Preview */
.doc-preview-frame {
    width: 100%;
    height: 600px;
    border: none;
    border-radius: 0 0 12px 12px;
    background: #fff;
}

.doc-preview-image {
    text-align: center;
    padding: 0.5rem;
    max-height: 600px;
    overflow-y: auto;
}

.doc-preview-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* OCR Text Expand */
pre.ocr-expanded {
    max-height: none !important;
}

/* Tag Chips */
.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.tag-chip-sm {
    display: inline-flex;
    align-items: center;
    padding: 0.05rem 0.35rem;
    border-radius: 3px;
    font-size: 0.6rem;
    font-weight: 500;
    white-space: nowrap;
    margin-left: 0.15rem;
}

/* Tag Card */
.tag-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: border-color 0.15s ease;
}

.tag-card:hover {
    border-color: var(--accent);
}

/* ================================
   Advanced Filter Bar
   ================================ */
.filter-bar-secondary {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.filter-select {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 8px;
    padding: 0.35rem 0.6rem;
    font-size: 0.8rem;
    cursor: pointer;
    min-width: 0;
    max-width: 160px;
    appearance: auto;
}

.filter-select:focus {
    border-color: var(--accent);
    color: var(--text-primary);
    box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.15);
    outline: none;
}

.filter-select option {
    background: var(--card-bg);
    color: var(--text-primary);
}

/* ================================
   View Toggle
   ================================ */
.view-toggle {
    display: flex;
    gap: 0;
    margin-left: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.view-toggle-btn {
    background: var(--card-bg);
    border: none;
    color: var(--text-secondary);
    padding: 0.35rem 0.55rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.view-toggle-btn:not(:last-child) {
    border-right: 1px solid var(--border-color);
}

.view-toggle-btn:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.04);
}

.view-toggle-btn.active {
    color: var(--accent);
    background: rgba(88, 166, 255, 0.1);
}

/* ================================
   Document Table View
   ================================ */
.doc-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.doc-table thead th {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.6rem 0.75rem;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}

.doc-table thead th.sortable {
    cursor: pointer;
    user-select: none;
}

.doc-table thead th.sortable:hover {
    color: var(--accent);
}

.doc-table-row {
    cursor: pointer;
    transition: background 0.1s ease;
}

.doc-table-row:hover {
    background: rgba(88, 166, 255, 0.04);
}

.doc-table-row td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
    vertical-align: middle;
    white-space: nowrap;
}

.doc-table-filename {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
    color: var(--text-primary);
}

/* ================================
   Landing Page
   ================================ */

/* Header */
.landing-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    background: rgba(13, 17, 23, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.landing-header.scrolled {
    background: rgba(13, 17, 23, 0.95);
    border-bottom-color: var(--border-color);
}

.landing-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.landing-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.landing-logo i {
    color: var(--accent);
    font-size: 1.4rem;
}

.landing-nav {
    display: flex;
    gap: 1.5rem;
    flex: 1;
}

.landing-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.15s ease;
}

.landing-nav a:hover {
    color: var(--text-primary);
}

.landing-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.landing-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    margin-left: auto;
}

/* Mobile Nav */
.landing-mobile-nav {
    display: none;
    padding: 0.75rem 1.5rem 1rem;
    border-top: 1px solid var(--border-color);
}

.landing-mobile-nav.show {
    display: block;
}

.landing-mobile-nav a {
    display: block;
    padding: 0.5rem 0;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
}

.landing-mobile-nav a:hover {
    color: var(--text-primary);
}

.landing-mobile-nav hr {
    border-color: var(--border-color);
    margin: 0.5rem 0;
}

/* Hero Section */
.landing-hero {
    position: relative;
    padding: 10rem 1.5rem 6rem;
    overflow: hidden;
    background: var(--main-bg);
}

.hero-bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    pointer-events: none;
}

.hero-blob-1 {
    width: 600px;
    height: 600px;
    background: var(--accent);
    top: -200px;
    right: -100px;
}

.hero-blob-2 {
    width: 400px;
    height: 400px;
    background: #a855f7;
    bottom: -100px;
    left: -50px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(88, 166, 255, 0.1);
    border: 1px solid rgba(88, 166, 255, 0.25);
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-ctas {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.hero-subtext {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0;
}

/* Sections */
.landing-section {
    padding: 5rem 1.5rem;
}

.landing-section-alt {
    background: var(--card-bg);
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 0;
}

/* Steps Grid */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.step-card {
    text-align: center;
    padding: 2rem 1.5rem;
    position: relative;
}

.step-number {
    position: absolute;
    top: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 4rem;
    font-weight: 800;
    color: rgba(88, 166, 255, 0.08);
    line-height: 1;
    pointer-events: none;
}

.step-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(88, 166, 255, 0.1);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1.25rem;
}

.step-card h4 {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.step-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.feature-card {
    background: var(--main-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.feature-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.feature-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.feature-card h5 {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0;
}

/* Pricing Grid */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
    align-items: start;
}

.pricing-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    position: relative;
    transition: all 0.2s ease;
}

.pricing-card:hover {
    transform: translateY(-2px);
}

.pricing-card.highlighted {
    border-color: var(--accent);
    box-shadow: 0 0 30px rgba(88, 166, 255, 0.1);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 1rem;
    border-radius: 50px;
    white-space: nowrap;
}

.pricing-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.pricing-header h4 {
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.pricing-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.price-amount {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.price-period {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.pricing-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.pricing-features li i {
    color: var(--accent-green);
    flex-shrink: 0;
}

/* Footer */
.landing-footer {
    background: var(--sidebar-bg);
    border-top: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
}

.landing-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.landing-footer-brand {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.landing-footer-brand i {
    color: var(--accent);
}

.landing-footer-links {
    display: flex;
    gap: 1.5rem;
}

.landing-footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.15s ease;
}

.landing-footer-links a:hover {
    color: var(--text-primary);
}

.landing-footer-copy {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Trust Badges (Datenschutz-Sektion) */
.trust-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem 2.5rem;
    margin-bottom: 1rem;
}

.trust-badge-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    padding: 0.6rem 1.2rem;
}

.trust-badge-item i {
    color: var(--accent-green);
    font-size: 1.1rem;
}

.trust-summary {
    margin-top: 2.5rem;
    text-align: center;
}

.trust-summary p {
    display: inline-block;
    max-width: 780px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.trust-summary a {
    color: var(--accent);
    text-decoration: none;
}

.trust-summary a:hover {
    text-decoration: underline;
}

/* FAQ Accordion */
.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.faq-item:hover {
    border-color: rgba(88, 166, 255, 0.3);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    gap: 1rem;
}

.faq-question i {
    transition: transform 0.3s ease;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
    color: var(--accent);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 300px;
}

.faq-answer p {
    padding: 0 1.5rem 1.25rem;
    color: var(--text-secondary);
    font-size: 0.925rem;
    line-height: 1.7;
    margin: 0;
}

/* Blog */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.blog-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.blog-card-icon {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: linear-gradient(135deg, rgba(88,166,255,0.08), rgba(88,166,255,0.02));
    border-bottom: 1px solid var(--border-color);
}

.blog-card-body {
    padding: 1.25rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-body h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.blog-card-body p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

.blog-card-meta {
    padding: 0.75rem 1.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.blog-breadcrumb {
    font-size: 0.85rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

.blog-breadcrumb a {
    color: var(--accent);
    text-decoration: none;
}

.blog-breadcrumb a:hover {
    text-decoration: underline;
}

.blog-breadcrumb span {
    margin: 0 0.4rem;
}

/* ================================
   Bulk Action Bar
   ================================ */
.bulk-action-bar {
    background: var(--card-bg);
    border: 1px solid var(--accent);
    border-radius: 10px;
    padding: 0.6rem 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(88, 166, 255, 0.15);
}

.bulk-selected {
    border-color: var(--accent) !important;
    background: rgba(88, 166, 255, 0.06) !important;
}

.bulk-checkbox {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* ================================
   PDF.js Viewer
   ================================ */
.pdf-viewer {
    background: #2d2d2d;
    border-radius: 0 0 12px 12px;
}

.pdf-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--card-bg);
}

.pdf-canvas-wrap {
    overflow: auto;
    max-height: 80vh;
    text-align: center;
    padding: 0.5rem;
}

.pdf-canvas-wrap canvas {
    display: block;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* ================================
   AutoRules Cards
   ================================ */
.rule-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: border-color 0.15s ease;
}

.rule-card:hover {
    border-color: var(--accent);
}

.rule-card.inactive {
    opacity: 0.5;
}

/* ================================
   Audit Log
   ================================ */
.audit-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
}

.audit-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
}

/* Landing Page Responsive */
@media (max-width: 1024px) {
    .steps-grid,
    .features-grid,
    .pricing-grid,
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-title {
        font-size: 2.25rem;
    }
}

@media (max-width: 768px) {
    .landing-nav,
    .landing-actions {
        display: none;
    }

    .landing-menu-toggle {
        display: block;
    }

    .landing-hero {
        padding: 8rem 1rem 4rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-ctas .btn {
        width: 100%;
    }

    .steps-grid,
    .features-grid,
    .pricing-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .landing-section {
        padding: 3rem 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .landing-footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .landing-footer-links {
        justify-content: center;
    }

    .trust-badges {
        display: grid;
        grid-template-columns: repeat(2, auto);
        justify-content: center;
        gap: 0.75rem;
    }

    .trust-badge-item {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }
}

/* ===== Papierkorb (Trash) ===== */

.trash-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

.trash-deleted-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.bulk-bar {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(56, 139, 253, 0.1);
    border: 1px solid rgba(56, 139, 253, 0.3);
    border-radius: 0.5rem;
}

/* ===== Notizen (Notes) ===== */

.note-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.note-item:last-child {
    border-bottom: none;
}

.note-content {
    color: var(--text-primary);
    font-size: 0.85rem;
    line-height: 1.5;
}

/* ===== Reminder Form (Document Detail) ===== */
.reminder-form input[type="date"] {
    color-scheme: dark;
}

.reminder-item-detail:last-child {
    margin-bottom: 0 !important;
}

/* ===== Open Beta Banner ===== */
.beta-banner {
    background: linear-gradient(135deg, rgba(88,166,255,0.15) 0%, rgba(163,113,247,0.15) 100%);
    border-bottom: 1px solid rgba(88,166,255,0.25);
    padding: 0.6rem 1rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    position: relative;
    z-index: 1000;
}

.beta-banner strong {
    color: var(--accent);
}

.beta-banner a {
    color: var(--accent);
    text-decoration: underline;
}

.beta-banner-app {
    background: linear-gradient(135deg, rgba(88,166,255,0.1) 0%, rgba(163,113,247,0.1) 100%);
    border: 1px solid rgba(88,166,255,0.2);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.beta-banner-app strong {
    color: var(--accent);
}

/* Pricing: Beta Overlay */
.pricing-card.beta-disabled {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.pricing-beta-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-8deg);
    background: rgba(63,185,80,0.9);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    white-space: nowrap;
    z-index: 2;
    pointer-events: auto;
    box-shadow: 0 4px 20px rgba(63,185,80,0.3);
}

.pricing-beta-info {
    text-align: center;
    margin-top: 2rem;
    padding: 1.25rem 1.5rem;
    background: rgba(63,185,80,0.08);
    border: 1px solid rgba(63,185,80,0.25);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.pricing-beta-info strong {
    color: var(--accent-green);
}

