:root {
    --fv-indigo: #4f46e5;
    --fv-indigo-dark: #3730a3;
    --fv-sky: #0ea5e9;
    --fv-bg: #fafafa;
    --fv-ink: #1d1d1f;
    --fv-muted: #6e6e73;
    --fv-border: #e8e8ed;
    --fv-card-bg: #ffffff;
    --fv-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
    --fv-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    --fv-shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.10), 0 2px 8px rgba(0, 0, 0, 0.04);
    --fv-radius: 16px;
    --fv-radius-sm: 10px;
}

* {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', 'Segoe UI', sans-serif;
}

body {
    background: var(--fv-bg);
    color: var(--fv-ink);
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.011em;
}

/* ===== Navbar - frosted glass, Apple-style ===== */
.fv-navbar {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: none;
}

.fv-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 600;
    font-size: 18px;
    letter-spacing: -0.02em;
    color: var(--fv-ink) !important;
}

.fv-brand-icon {
    width: 26px;
    height: 26px;
    border-radius: 7px;
}

.fv-install-btn {
    font-weight: 600;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--fv-ink) !important;
    border: none !important;
    color: #fff !important;
    padding: 7px 16px !important;
    font-size: 13px !important;
}

.fv-icon-toggle {
    background: rgba(0, 0, 0, 0.045);
    border: none;
    color: var(--fv-ink);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    margin-right: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.fv-icon-toggle:hover {
    background: rgba(0, 0, 0, 0.09);
}

.fv-plan-badge {
    background: var(--fv-ink);
    color: #fff;
    font-weight: 600;
    font-size: 12px;
    padding: 5px 13px;
    border-radius: 999px;
    margin-right: 12px;
    letter-spacing: -0.01em;
}

/* ===== Hero - clean, generous whitespace, subtle depth instead of a loud gradient ===== */
.fv-hero {
    background: var(--fv-bg);
    color: var(--fv-ink);
    padding: 88px 0 64px;
    text-align: center;
}

.fv-hero-badge {
    display: inline-block;
    background: rgba(79, 70, 229, 0.08);
    border: none;
    color: var(--fv-indigo);
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 22px;
}

.fv-hero-title {
    font-size: clamp(34px, 5vw, 56px);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.08;
    margin-bottom: 20px;
    color: var(--fv-ink);
}

.fv-hero-subtitle {
    max-width: 640px;
    margin: 0 auto 26px;
    font-size: 18px;
    line-height: 1.55;
    color: var(--fv-muted);
    letter-spacing: -0.01em;
}

.fv-hero-subtitle strong {
    color: var(--fv-ink);
    font-weight: 600;
}

.fv-hero-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.fv-chip {
    background: rgba(0, 0, 0, 0.04);
    border: none;
    color: var(--fv-ink);
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 500;
}

.fv-hero-trial {
    margin: 20px 0 0;
    font-size: 13.5px;
    color: var(--fv-muted);
}

/* ===== About / feature section ===== */
.fv-about {
    margin-top: 12px;
    margin-bottom: 36px;
}

.fv-section-heading {
    text-align: center;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 32px;
    color: var(--fv-ink);
}

.fv-feature-card {
    background: var(--fv-card-bg);
    border-radius: var(--fv-radius);
    padding: 26px 20px;
    height: 100%;
    box-shadow: var(--fv-shadow-sm);
    border: 1px solid var(--fv-border);
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s ease;
}

.fv-feature-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--fv-shadow-md);
}

.fv-feature-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(14, 165, 233, 0.1));
    color: var(--fv-indigo);
    margin-bottom: 14px;
}

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

.fv-feature-card h6 {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 15px;
    letter-spacing: -0.01em;
    color: var(--fv-ink);
}

.fv-feature-card p {
    font-size: 13px;
    color: var(--fv-muted);
    margin: 0;
    line-height: 1.5;
}

/* ===== Generic card ===== */
.fv-card {
    background: var(--fv-card-bg);
    border-radius: var(--fv-radius);
    padding: 26px;
    box-shadow: var(--fv-shadow-sm);
    border: 1px solid var(--fv-border);
}

.fv-card-title {
    font-weight: 700;
    margin-bottom: 16px;
    font-size: 17px;
}

/* ===== Dropzone ===== */
.fv-upload-card-hero {
    box-shadow: var(--fv-shadow-md);
    border: 1px solid var(--fv-border);
}

.fv-dropzone {
    border: 1.5px dashed #d2d2d7;
    border-radius: var(--fv-radius-sm);
    padding: 44px 20px;
    text-align: center;
    cursor: pointer;
    background: #fbfbfd;
    transition: all 0.2s ease;
}

.fv-dropzone:hover,
.fv-dropzone-active {
    background: rgba(79, 70, 229, 0.03);
    border-color: var(--fv-indigo);
}

.fv-dropzone-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(79, 70, 229, 0.08);
    color: var(--fv-indigo);
}

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

.fv-dropzone-text {
    margin: 0;
    color: var(--fv-muted);
    font-size: 14.5px;
}

.fv-dropzone-link {
    color: var(--fv-indigo);
    font-weight: 600;
    text-decoration: underline;
}

.fv-progress {
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
}

.fv-storage-note {
    margin: 14px 0 0;
    font-size: 12.5px;
    color: var(--fv-muted);
    text-align: center;
}

/* ===== Pricing ===== */
.fv-price-card {
    background: var(--fv-card-bg);
    border: 1px solid var(--fv-border);
    border-radius: var(--fv-radius);
    padding: 30px 24px;
    text-align: center;
    height: 100%;
    box-shadow: var(--fv-shadow-sm);
}

.fv-price-card h6 {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 12px;
    color: var(--fv-muted);
    font-weight: 600;
    margin-bottom: 12px;
}

.fv-price-amount {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--fv-ink);
    margin-bottom: 10px;
}

.fv-price-amount span {
    font-size: 14px;
    font-weight: 500;
    color: var(--fv-muted);
}

.fv-price-card p {
    font-size: 13.5px;
    color: var(--fv-muted);
    margin: 0;
    line-height: 1.5;
}

.fv-price-card-highlight {
    border: 1.5px solid var(--fv-indigo);
    box-shadow: var(--fv-shadow-md);
}

/* ===== Paywall / Share modal ===== */
.fv-paywall-icon {
    font-size: 44px;
    margin-bottom: 6px;
}

.fv-paywall-price {
    font-size: 34px;
    font-weight: 800;
    color: var(--fv-indigo);
    margin: 6px 0 2px;
}

.fv-paywall-price span {
    font-size: 15px;
    font-weight: 500;
    color: var(--fv-muted);
}

.fv-plan-toggle {
    display: flex;
    gap: 8px;
}

.fv-plan-option {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--fv-border);
    border-radius: 12px;
    background: #fff;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.fv-plan-option.active {
    border-color: var(--fv-indigo);
    background: #eef0ff;
    color: var(--fv-indigo-dark);
}

.fv-qr-box {
    display: flex;
    justify-content: center;
}

.fv-qr-box canvas {
    border-radius: 8px;
    border: 1px solid var(--fv-border);
}

/* ===== Section header ===== */
.fv-section-title {
    font-weight: 700;
    font-size: 19px;
}

.fv-count-badge {
    display: inline-block;
    background: var(--fv-indigo);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 999px;
    margin-left: 6px;
    vertical-align: middle;
}

/* ===== File cards ===== */
.fv-file-card {
    background: #fff;
    border: 1px solid var(--fv-border);
    border-radius: 14px;
    padding: 16px 10px;
    text-align: center;
    height: 100%;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fv-file-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(30, 27, 46, 0.1);
    border-color: #d9dcff;
}

.fv-file-icon {
    font-size: 40px;
    cursor: pointer;
    margin-bottom: 6px;
}

.fv-file-name {
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fv-file-size {
    font-size: 11px;
    color: var(--fv-muted);
    margin-top: 2px;
}

.fv-action-btn {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 6px 8px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(90deg, var(--fv-indigo), var(--fv-sky));
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.fv-action-btn:hover {
    opacity: 0.88;
}

.fv-file-actions {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
}

.fv-icon-btn {
    width: 27px;
    height: 27px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--fv-border);
    background: #fff;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
}

.fv-icon-btn:hover {
    background: #f1f2ff;
}

.fv-icon-btn-danger:hover {
    background: #fee2e2;
}

/* ===== Footer ===== */
.fv-footer {
    padding: 30px 0 50px;
    text-align: center;
    color: var(--fv-muted);
    font-size: 13px;
}

/* ===== Modal / preview content ===== */
/* The outer .modal wrapper covers the full viewport even with the
   backdrop removed - by default it still intercepts every click within
   that area, which was silently blocking clicks on the sidebar behind
   it. Making the wrapper click-through (except for the actual dialog
   box) lets clicks reach the sidebar everywhere the dialog isn't. */
#previewModal {
    pointer-events: none;
}

#previewModal .modal-dialog {
    pointer-events: auto;
    max-height: 92vh;
}

#previewModal .modal-content {
    max-height: 92vh;
    display: flex;
    flex-direction: column;
}

#previewModal #previewBody {
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
}

.fv-modal-content {
    border-radius: 16px;
    border: 1px solid var(--fv-border);
    overflow: hidden;
    box-shadow: var(--fv-shadow-lg), 0 0 0 1px rgba(0, 0, 0, 0.03); /* stands out clearly since there's no dimmed backdrop behind it anymore */
}

.fv-window-controls {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    margin-left: auto;
}

#previewModal .modal-header,
#shareModal .modal-header,
#paywallModal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

#previewFileName {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fv-window-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--fv-border);
    background: #f5f5f7;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--fv-ink);
}

.fv-window-btn:hover {
    background: #e9eaf5;
}

.fv-window-btn-close:hover {
    background: #fee2e2;
    color: #b91c1c;
}

.fv-minimized-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    position: fixed;
    bottom: 18px;
    right: 18px;
    z-index: 1060;
    background: #fff;
    border: 1px solid var(--fv-border);
    border-radius: 999px;
    padding: 10px 18px;
    box-shadow: 0 10px 30px rgba(30, 27, 46, 0.18);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.fv-minimized-bar-restore {
    color: var(--fv-indigo);
}

/* When the preview is minimized: shrink the dialog and free up the page
   underneath instead of blocking it like a normal modal. */
#previewModal.fv-modal-minimized {
    pointer-events: none;
}

#previewModal.fv-modal-minimized .modal-dialog,
#previewModal.fv-modal-minimized .modal-content,
#previewModal.fv-modal-minimized .modal-header {
    display: none;
}

body.fv-has-minimized-modal {
    overflow: auto !important;
    padding-right: 0 !important;
}

body.fv-has-minimized-modal .modal-backdrop {
    display: none;
}

#previewBody img {
    max-width: 100%;
    height: auto;
}

#previewBody pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 15px;
    border-radius: 6px;
    max-height: 60vh;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

#previewBody iframe, #previewBody embed {
    width: 100%;
    height: 65vh;
    border: none;
}

#previewBody video {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 65vh; /* scales down to fit the screen instead of forcing a scroll for tall/vertical videos */
    margin: 0 auto;
}

#previewBody audio {
    width: 100%;
}

#previewBody table {
    font-size: 12px;
}

#previewBody .table-wrap {
    max-height: 60vh;
    overflow: auto;
}

#modelViewerContainer {
    width: 100%;
    height: 420px;
    background: #1e1e1e;
    border-radius: 6px;
    position: relative;
}

.font-sample {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.hex-dump {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 12px;
    border-radius: 6px;
    max-height: 60vh;
    overflow: auto;
    white-space: pre;
}

.archive-table td, .archive-table th {
    font-size: 13px;
}

/* ===== Responsive ===== */
@media (max-width: 576px) {
    .fv-hero { padding: 56px 0 40px; }
    .fv-about { margin-top: 8px; }
}

/* ===== Dark mode ===== */
body.fv-dark {
    --fv-bg: #0f1117;
    --fv-ink: #e5e7eb;
    --fv-muted: #9ca3af;
    --fv-border: #2a2d3a;
    --fv-card-bg: #171923;
}

body.fv-dark .fv-navbar {
    background: rgba(15, 17, 23, 0.72);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.fv-dark .fv-icon-toggle {
    background: rgba(255, 255, 255, 0.08);
}

body.fv-dark .fv-icon-toggle:hover {
    background: rgba(255, 255, 255, 0.14);
}

body.fv-dark .fv-feature-card,
body.fv-dark .fv-card,
body.fv-dark .fv-file-card,
body.fv-dark .fv-price-card,
body.fv-dark .fv-modal-content,
body.fv-dark .modal-content {
    background: #171923;
    color: var(--fv-ink);
}

body.fv-dark .fv-dropzone {
    background: #171923;
    border-color: #3a3d52;
}

body.fv-dark .fv-icon-btn {
    background: #1f2230;
    color: var(--fv-ink);
    border-color: var(--fv-border);
}

body.fv-dark .fv-icon-btn:hover {
    background: #262a3b;
}

body.fv-dark .fv-plan-option {
    background: #1f2230;
    color: var(--fv-ink);
    border-color: var(--fv-border);
}

body.fv-dark .fv-plan-option.active {
    background: #2a2d5c;
}

body.fv-dark .form-control {
    background: #1f2230;
    color: var(--fv-ink);
    border-color: var(--fv-border);
}

/* ===== Toolbar: search / sort / tag filter ===== */
.fv-toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.fv-search-input {
    width: 180px;
}

.fv-sort-select {
    width: auto;
}

/* ===== Thumbnails + tag chip on cards ===== */
.fv-file-thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
}

.fv-tag-chip {
    display: inline-block;
    background: #eef0ff;
    color: var(--fv-indigo-dark);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    margin-top: 4px;
}

/* ===== Preview modal: rename + toolbar ===== */
.fv-preview-title-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1 1 auto;
}

.fv-rename-btn {
    background: none;
    border: none;
    font-size: 12px;
    cursor: pointer;
    opacity: 0.6;
    flex-shrink: 0;
}

.fv-rename-btn:hover {
    opacity: 1;
}

.fv-preview-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 20px;
    border-bottom: 1px solid var(--fv-border);
    background: #fafafe;
}

.fv-tag-input {
    width: 160px;
}

.fv-tool-group {
    display: flex;
    gap: 6px;
}

.fv-tool-btn {
    background: var(--fv-card-bg);
    border: 1px solid var(--fv-border);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    color: var(--fv-ink);
    transition: background 0.15s ease, border-color 0.15s ease;
}

.fv-tool-btn:hover {
    background: rgba(79, 70, 229, 0.06);
    border-color: rgba(79, 70, 229, 0.3);
}

.fv-crop-box {
    position: absolute;
    display: none;
    border: 2px dashed #4f46e5;
    background: rgba(79, 70, 229, 0.15);
    pointer-events: none;
    z-index: 5;
}

#cropOverlayWrap img {
    cursor: crosshair;
    user-select: none;
    -webkit-user-drag: none;
}

.fv-text-editor {
    width: 100%;
    min-height: 300px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    background: #1e1e1e;
    color: #d4d4d4;
    border: 1px solid var(--fv-border);
    border-radius: 6px;
    padding: 12px;
}

/* ===== Dashboard ===== */
.fv-stat-box {
    background: #fafaff;
    border: 1px solid var(--fv-border);
    border-radius: 12px;
    padding: 14px 8px;
}

.fv-stat-num {
    font-size: 24px;
    font-weight: 800;
    color: var(--fv-indigo);
}

.fv-stat-label {
    font-size: 11px;
    color: var(--fv-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.fv-type-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    margin-bottom: 8px;
}

.fv-type-row span:first-child {
    width: 60px;
    flex-shrink: 0;
}

.fv-type-bar-wrap {
    flex: 1;
    background: #eef0ff;
    border-radius: 999px;
    height: 8px;
    overflow: hidden;
}

.fv-type-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--fv-indigo), var(--fv-sky));
}

/* ===== Dark mode additions for new elements ===== */
body.fv-dark .fv-preview-toolbar {
    background: #171923;
    border-color: var(--fv-border);
}

body.fv-dark .fv-tool-btn,
body.fv-dark .fv-stat-box {
    background: #1f2230;
    color: var(--fv-ink);
    border-color: var(--fv-border);
}

body.fv-dark .fv-tag-chip {
    background: #2a2d5c;
    color: #c7c9fb;
}

body.fv-dark .form-select {
    background-color: #1f2230;
    color: var(--fv-ink);
    border-color: var(--fv-border);
}

/* ===== Device ID footer link ===== */
.fv-device-id-link {
    background: none;
    border: none;
    color: var(--fv-muted);
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
    margin-top: 6px;
}

.fv-device-id-link:hover {
    color: var(--fv-indigo);
}

/* ===== Audio/Video trimmer ===== */
.fv-trim-panel {
    padding: 14px 20px;
    border-bottom: 1px solid var(--fv-border);
    background: #fafafe;
}

.fv-trim-times {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
}

.fv-trim-track {
    position: relative;
    height: 10px;
    background: #e5e7eb;
    border-radius: 999px;
    margin: 16px 4px;
}

.fv-trim-selected {
    position: absolute;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--fv-indigo), var(--fv-sky));
    border-radius: 999px;
}

.fv-trim-handle {
    position: absolute;
    top: 50%;
    width: 18px;
    height: 18px;
    background: #fff;
    border: 3px solid var(--fv-indigo);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: ew-resize;
    touch-action: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.fv-trim-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

body.fv-dark .fv-trim-panel {
    background: #171923;
    border-color: var(--fv-border);
}

body.fv-dark .fv-trim-track {
    background: #2a2d3a;
}

/* ===== Word/Excel editing ===== */
.fv-tool-select {
    width: auto;
    font-size: 12px;
    padding: 4px 8px;
}

#docxEditArea {
    outline: none;
    padding: 12px;
    border: 1px dashed transparent;
    border-radius: 6px;
    min-height: 150px;
}

#docxEditArea:focus {
    border-color: var(--fv-indigo);
    background: #fafaff;
}

.fv-xlsx-grid td {
    min-width: 70px;
    outline: none;
}

.fv-xlsx-grid td:focus {
    background: #eef0ff;
    outline: 2px solid var(--fv-indigo);
    outline-offset: -2px;
}

body.fv-dark #docxEditArea:focus {
    background: #1f2230;
}

body.fv-dark .fv-xlsx-grid td:focus {
    background: #2a2d5c;
}

/* ===== Search-inside toggle ===== */
.fv-search-inside-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--fv-muted);
    white-space: nowrap;
    cursor: pointer;
    margin: 0;
}

.fv-search-inside-toggle input {
    cursor: pointer;
}

/* ===== Footer legal links ===== */
.fv-footer-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.fv-footer-links a {
    font-size: 12px;
    color: var(--fv-muted);
    text-decoration: none;
}

.fv-footer-links a:hover {
    color: var(--fv-indigo);
    text-decoration: underline;
}

/* ===== Word paragraph-level editor (format-preserving) ===== */
.fv-docx-para {
    padding: 8px 10px;
    margin-bottom: 4px;
    border-radius: 6px;
    border: 1px dashed transparent;
    outline: none;
    line-height: 1.6;
}

.fv-docx-para:focus {
    border-color: var(--fv-indigo);
    background: #fafaff;
}

.fv-docx-para:hover {
    background: #f8f9ff;
}

body.fv-dark .fv-docx-para:focus,
body.fv-dark .fv-docx-para:hover {
    background: #1f2230;
}

/* ===== Floating upload button ===== */
.fv-floating-upload-btn {
    position: fixed;
    bottom: 28px;
    left: 28px;
    z-index: 1055;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: var(--fv-ink);
    color: #fff;
    font-size: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--fv-shadow-lg);
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.fv-floating-upload-btn svg {
    width: 22px;
    height: 22px;
}

.fv-floating-upload-btn:hover {
    transform: scale(1.06);
}

@media (max-width: 576px) {
    .fv-floating-upload-btn {
        width: 52px;
        height: 52px;
        font-size: 22px;
        bottom: 16px;
        left: 16px;
    }
}

/* ===== Toolbar label / hint - makes "what can I do with this file" obvious ===== */
.fv-toolbar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    margin-bottom: 8px;
}

.fv-toolbar-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(90deg, var(--fv-indigo), var(--fv-sky));
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 999px;
    white-space: nowrap;
}

.fv-toolbar-hint {
    width: 100%;
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--fv-muted);
    font-style: italic;
}

body.fv-dark .fv-toolbar-hint {
    color: #9ca3af;
}

/* ===== File card: make the type-specific action the clear PRIMARY thing
   to do, and the download/print/delete row a quieter secondary row ===== */
.fv-file-actions {
    opacity: 0.75;
}

.fv-file-actions:hover {
    opacity: 1;
}

/* ===== Page-level file tabs (the main file browser now - replaces the
   old card grid). Lives in a sidebar so it's visible from the top of the
   screen without scrolling. ===== */
.fv-layout {
    display: flex;
    align-items: flex-start;
}

.fv-sidebar {
    width: 264px;
    flex-shrink: 0;
    position: sticky;
    top: 60px; /* sits right below the sticky navbar instead of overlapping it */
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    padding: 24px 18px;
    border-right: 1px solid var(--fv-border);
    background: transparent;
}

.fv-sidebar-title {
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--fv-muted);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fv-main {
    flex: 1;
    min-width: 0; /* required so flex children don't overflow the layout */
}

.fv-page-tab-strip {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.fv-page-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 8px;
    border-radius: var(--fv-radius-sm);
    background: var(--fv-card-bg);
    border: 1px solid var(--fv-border);
    color: var(--fv-ink);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    min-width: 0; /* lets fv-tab-name actually truncate inside a grid cell */
    box-shadow: var(--fv-shadow-sm);
}

.fv-page-tab:hover {
    border-color: rgba(79, 70, 229, 0.35);
    transform: translateY(-1px);
    box-shadow: var(--fv-shadow-md);
}

.fv-page-tab.active {
    background: var(--fv-ink);
    border-color: transparent;
    color: #fff;
    box-shadow: var(--fv-shadow-md);
}

.fv-page-tab .fv-tab-icon {
    font-size: 15px;
    flex-shrink: 0;
}

.fv-page-tab .fv-tab-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.fv-page-tab .fv-tab-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 15px;
    line-height: 1;
    padding: 2px 3px;
    cursor: pointer;
    border-radius: 4px;
    opacity: 0.55;
    flex-shrink: 0;
}

.fv-page-tab .fv-tab-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.12);
}

body.fv-dark .fv-sidebar {
    background: #14161f;
    border-color: var(--fv-border);
}

body.fv-dark .fv-page-tab {
    background: #1a1d29;
    border-color: var(--fv-border);
    color: var(--fv-ink);
}

body.fv-dark .fv-page-tab.active {
    border-color: transparent;
}

/* Below ~900px there isn't room for a side-by-side sidebar - it becomes a
   horizontal strip ABOVE everything else instead, so tabs are still the
   very first thing on screen, just not off to the side anymore. */
@media (max-width: 900px) {
    .fv-layout {
        flex-direction: column;
    }
    .fv-sidebar {
        width: 100%;
        position: static;
        max-height: none;
        border-right: none;
        border-bottom: 1px solid var(--fv-border);
    }
    .fv-page-tab-strip {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .fv-page-tab-strip {
        grid-template-columns: 1fr;
    }
}

/* ===== Global button refinement (Apple-style: pill shapes, subtle
   interactions, no harsh Bootstrap-default blue) ===== */
.btn-primary {
    background: var(--fv-ink) !important;
    border-color: var(--fv-ink) !important;
    border-radius: 999px !important;
    font-weight: 600;
    padding: 10px 22px;
    letter-spacing: -0.01em;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn-primary:hover,
.btn-primary:focus {
    background: #000 !important;
    border-color: #000 !important;
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
    opacity: 0.85;
}

.btn-outline-primary {
    color: var(--fv-ink) !important;
    border-color: var(--fv-border) !important;
    border-radius: 999px !important;
    font-weight: 600;
}

.btn-outline-primary:hover {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: var(--fv-ink) !important;
    color: var(--fv-ink) !important;
}

.btn-outline-secondary {
    border-radius: 999px !important;
    font-weight: 600;
}
