@import url("../css-template.css");

main {
    display: flex;
    justify-content: center;
    padding: 2rem;
    padding-top: calc(56px + 2rem);
    flex: 1;
}

@media (min-width: 769px) {
    main {
        padding-left: calc(220px + 2rem);
    }
}

.container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 900px;
    gap: 1rem;
}

/* ── Top bar ── */
.top-bar {
    display: flex;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    justify-content: space-between;
    align-items: center;
}

.top-bar h1 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

.top-bar-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.transactions-btn {
    background: var(--surface-2);
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.15s;
    font-weight: 500;
    border: 1px solid var(--border);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    white-space: nowrap;
}

.transactions-btn:hover {
    border-color: var(--text-muted);
    color: var(--text);
}

.new-order-btn {
    background: var(--accent);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: background 0.15s;
    font-weight: 500;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    white-space: nowrap;
}

.new-order-btn:hover {
    background: var(--accent-hover);
}

/* ── Orders panel ── */
.orders-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.orders-list {
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    gap: 0.5rem;
}

.order-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    transition: border-color 0.15s;
    background: var(--surface-2);
}

.order-card:hover {
    border-color: rgba(212, 96, 58, 0.3);
}

.card-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 4px;
}

.card-title-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.card-name {
    font-weight: 600;
    color: var(--text);
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-ref {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: monospace;
    flex-shrink: 0;
}

.card-title-row .status {
    margin-right: 0;
    flex-shrink: 0;
}

.card-desc {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin: 4px 0 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    gap: 1rem;
    margin-top: 0.6rem;
    flex-wrap: wrap;
}

.card-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.card-meta-item i { font-size: 0.85rem; }

.card-price {
    font-weight: 600;
    color: var(--text);
}

.card-meta-item.due-overdue {
    color: #dc3545;
    font-weight: 600;
}

.card-meta-item.due-soon {
    color: #e67e22;
    font-weight: 600;
}

.card-preparing {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.6rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    color: var(--accent);
    background: var(--accent-glow);
    border: 1px solid rgba(212, 96, 58, 0.15);
    border-radius: var(--radius);
    animation: preparePulse 2s ease-in-out infinite;
}

@keyframes preparePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

/* ── Stage badges ── */
.status {
    padding: 3px 8px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.stage-pending     { color: #e6a817; background: rgba(230, 168, 23, 0.12); }
.stage-deposit     { color: #e67e22; background: rgba(230, 126, 34, 0.12); }
.stage-deposit-paid { color: var(--green); background: rgba(76, 175, 80, 0.12); }
.stage-progress    { color: var(--accent); background: var(--accent-glow); }
.stage-late        { color: #dc3545; background: rgba(220, 53, 69, 0.12); }
.stage-payment     { color: #e67e22; background: rgba(230, 126, 34, 0.12); }
.stage-completed   { color: var(--green); background: rgba(76, 175, 80, 0.12); }
.stage-cancelled   { color: var(--text-muted); background: rgba(136, 136, 136, 0.12); }

/* ── Action buttons ── */
.action-btn {
    padding: 0.3rem 0.65rem;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s;
    white-space: nowrap;
    text-decoration: none;
}

.action-btn.cancel {
    background: var(--surface-3);
    color: var(--text-muted);
}

.action-btn.cancel:hover {
    background: #dc3545;
    color: white;
}

.action-btn.pay {
    background: var(--accent);
    color: white;
}

.action-btn.pay:hover {
    background: var(--accent-hover);
}

.action-btn.download {
    background: var(--green);
    color: white;
}

.action-btn.download:hover {
    background: #43a047;
}

.action-btn.download-locked {
    background: var(--surface-3);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.6;
    font-weight: 400;
}

.action-btn.download-locked:hover {
    background: var(--surface-3);
}

.action-btn.rate {
    background: rgba(76, 175, 80, 0.1);
    color: var(--green);
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.action-btn.rate:hover {
    background: var(--green);
    color: white;
}

/* ── Empty / Loading states ── */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.no-orders {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-muted);
}

.no-orders i {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    display: block;
    color: var(--text-muted);
}

.no-orders h2 {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.error-text {
    color: #dc3545;
    text-align: center;
}

/* ── Pagination ── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 1rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.page-btn {
    padding: 5px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    color: var(--text-muted);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.82rem;
    transition: all 0.15s;
}

.page-btn:hover:not(:disabled):not(.active) {
    background: var(--surface-3);
    border-color: var(--accent);
    color: var(--text);
}

.page-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.page-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.page-dots {
    padding: 5px 3px;
    color: var(--text-muted);
}

.page-info {
    margin-left: 8px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ── Modal ── */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.modal-content {
    background: var(--surface);
    border: 1px solid var(--border);
    margin: 5% auto;
    padding: 1.5rem;
    border-radius: var(--radius);
    width: 90%;
    max-width: 460px;
    position: relative;
    color: var(--text);
}

.modal-content h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.close-modal {
    position: absolute;
    right: 1rem;
    top: 0.75rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.15s;
}

.close-modal:hover { color: var(--text); }

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.9rem;
    background: var(--surface-2);
    color: var(--text);
    transition: border-color 0.15s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.cancel-btn,
.save-btn {
    padding: 0.55rem 1rem;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
}

.cancel-btn {
    background: var(--surface-3);
    color: var(--text-muted);
}

.cancel-btn:hover { color: var(--text); }

.save-btn {
    background: var(--accent);
    color: white;
}

.save-btn:hover {
    background: var(--accent-hover);
}

/* ══════════════════════════════════════════
   Fullscreen Payment View
   ══════════════════════════════════════════ */

.payment-view {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    color: var(--text);
    overflow-y: auto;
}

.pv-header {
    padding: 1rem 2rem;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.pv-back-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 0.3rem 0;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: color 0.15s;
}

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

.pv-container {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    padding: 1.5rem 2rem 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.pv-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.pv-title-row h1 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.pv-subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.2rem;
}

/* ── Stats row ── */
.pv-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
}

.pv-stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.pv-stat-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.pv-stat-value {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
}

.pv-stat-due {
    color: var(--accent);
    font-size: 1.35rem;
}

.pv-stat-note {
    font-size: 0.75rem;
    color: var(--green);
    font-weight: 600;
}

/* ── Columns ── */
.pv-columns {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1.25rem;
    align-items: start;
}

.pv-main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pv-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pv-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.pv-section h2 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 0.75rem;
}

.pv-section h4 {
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ── Detail list ── */
.pv-detail-list {
    display: flex;
    flex-direction: column;
}

.pv-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}

.pv-detail-row:last-child { border-bottom: none; }

.pv-detail-row span { color: var(--text-muted); }

.pv-detail-row strong {
    color: var(--text);
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}

/* ── Pay section ── */
.pv-pay-section h2 { margin-bottom: 0.35rem; }

.pv-pay-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0 0 0.75rem;
    line-height: 1.4;
}

.pv-pay-btn {
    width: 100%;
    padding: 0.75rem 1.25rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: background 0.15s;
}

.pv-pay-btn:hover:not(:disabled) {
    background: var(--accent-hover);
}

.pv-pay-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pv-pay-btn-disabled { background: var(--surface-3); }

/* Deadline colors */
.pv-stat-value.deadline-overdue,
.pv-stat-note.deadline-overdue { color: #dc3545; }

.pv-stat-value.deadline-urgent,
.pv-stat-note.deadline-urgent { color: #e67e22; }

/* ── Payment status messages ── */
.payment-status { text-align: center; }

.payment-error-msg {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.08);
    border: 1px solid rgba(220, 53, 69, 0.2);
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius);
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.payment-info-msg {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.payment-error {
    text-align: center;
    padding: 2rem;
}

.payment-error i {
    font-size: 2rem;
    color: #dc3545;
    display: block;
    margin-bottom: 0.5rem;
}

.payment-error h3 {
    color: #dc3545;
    font-size: 1rem;
    margin-bottom: 0.35rem;
}

.payment-error p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ── Transaction history ── */
.payment-transactions h4 {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.tx-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.tx-row {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.55rem 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tx-row-main {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tx-type {
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--text);
}

.tx-provider {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: capitalize;
}

.tx-status {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: var(--radius);
}

.tx-pending   { color: #e6a817; background: rgba(230, 168, 23, 0.12); }
.tx-completed { color: var(--green); background: rgba(76, 175, 80, 0.12); }
.tx-failed    { color: #dc3545; background: rgba(220, 53, 69, 0.1); }
.tx-refunded  { color: #5b9bd5; background: rgba(91, 155, 213, 0.12); }

.tx-row-clickable {
    cursor: pointer;
    border-color: rgba(212, 96, 58, 0.25);
}

.tx-row-clickable:hover {
    border-color: var(--accent);
    background: rgba(212, 96, 58, 0.06);
}

.tx-resume {
    font-size: 0.7rem;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 3px;
}

.tx-row-meta {
    display: flex;
    gap: 0.6rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ── Transactions View Table ── */
.tv-table-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow-x: auto;
}

.tv-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.tv-table thead th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.tv-table tbody td {
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.tv-table tbody tr:last-child td { border-bottom: none; }

.tv-table tbody tr:hover { background: var(--surface-2); }

.tv-provider {
    text-transform: capitalize;
    color: var(--text-muted);
}

/* ── Review Banner ── */
@keyframes reviewSlideDown {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.review-banner {
    background: rgba(76, 175, 80, 0.07);
    border: 1px solid rgba(76, 175, 80, 0.18);
    border-radius: var(--radius);
    padding: 0.7rem 1rem;
    margin-bottom: 1rem;
    animation: reviewSlideDown 0.3s ease;
}

.review-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.review-banner-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text);
}

.review-banner-left i {
    color: var(--green);
    font-size: 1rem;
    flex-shrink: 0;
}

.review-banner-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.review-banner-cta {
    background: var(--green);
    color: white;
    padding: 0.28rem 0.7rem;
    border-radius: var(--radius);
    font-size: 0.78rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background 0.15s;
}

.review-banner-cta:hover { background: #43a047; color: white; }

.review-banner-snooze {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.78rem;
    cursor: pointer;
    padding: 0.28rem 0.4rem;
    font-family: inherit;
    transition: color 0.15s;
}

.review-banner-snooze:hover { color: var(--text); }

.review-banner-dismiss {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.2rem;
    display: flex;
    align-items: center;
    font-size: 1rem;
    line-height: 1;
    transition: color 0.15s;
}

.review-banner-dismiss:hover { color: var(--text); }

/* ── Toast ── */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--surface);
    color: var(--text);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.85rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    z-index: 5000;
    transition: transform 0.3s ease;
    pointer-events: none;
    border: 1px solid var(--border);
}

.toast-show { transform: translateX(-50%) translateY(0); }
.toast-success { border-color: rgba(76, 175, 80, 0.4); }
.toast-warning { border-color: rgba(230, 126, 34, 0.4); }


/* ── Invoice link in table ── */
.tv-invoice-link {
    color: var(--accent);
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    transition: color 0.15s;
}

.tv-invoice-link:hover {
    color: var(--accent-hover);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    main {
        padding: 1rem;
        padding-top: calc(56px + 1rem);
        padding-left: 1rem;
        justify-content: flex-start;
    }

    .container {
        margin: 0;
        width: 100%;
    }

    .top-bar {
        padding: 0.85rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .top-bar h1 { font-size: 0.95rem; }

    .transactions-btn,
    .new-order-btn {
        padding: 0.45rem 0.7rem;
        font-size: 0.8rem;
    }

    .orders-list { padding: 0.5rem; gap: 0.5rem; }

    .order-card { padding: 0.85rem 1rem; }

    .card-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .card-meta { gap: 0.5rem; }
    .card-meta-item { font-size: 0.75rem; }
    .card-actions { margin-top: 0.6rem; padding-top: 0.6rem; }
    .action-btn { padding: 0.25rem 0.55rem; font-size: 0.72rem; }

    .pagination { padding: 0.75rem; }
    .page-info { width: 100%; text-align: center; margin-left: 0; margin-top: 0.5rem; }

    .modal-content { margin: 3% auto; padding: 1.25rem; width: 95%; }

    .pv-header { padding: 0.75rem 1rem; }
    .pv-container { padding: 1rem; }
    .pv-title-row { flex-direction: column; gap: 0.5rem; }
    .pv-title-row h1 { font-size: 1.15rem; }
    .pv-stats-row { grid-template-columns: 1fr 1fr; }
    .pv-columns { grid-template-columns: 1fr; }
    .pv-section { padding: 1rem; }

    .tv-table thead th,
    .tv-table tbody td { padding: 0.55rem 0.75rem; font-size: 0.8rem; }
}

@media (max-width: 480px) {
    .top-bar { padding: 0.75rem; }
    .top-bar h1 { width: 100%; }
    .transactions-btn,
    .new-order-btn { padding: 0.4rem 0.6rem; font-size: 0.75rem; }
    .order-card { padding: 0.7rem 0.85rem; }
    .card-ref { display: none; }
    .pv-container { padding: 0.75rem; }
    .pv-stat { padding: 0.75rem; }
    .pv-stat-due { font-size: 1.15rem; }
    .pv-stat-value { font-size: 1rem; }
}

/* ── File Viewer ── */
.fv-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.fv-crumb {
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.15s;
}

.fv-crumb:hover { color: var(--text); text-decoration: underline; }

.fv-breadcrumb i { font-size: 0.7rem; color: var(--text-muted); }

.fv-file-list {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.fv-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.1s;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.fv-row:last-child { border-bottom: none; }
.fv-row:hover { background: var(--surface-2); }

.fv-row > i:first-child {
    font-size: 1.2rem;
    width: 1.5rem;
    text-align: center;
    flex-shrink: 0;
}

.fv-dir > i:first-child { color: #f0c040; }
.fv-back > i:first-child { color: var(--text-muted); }
.fv-file > i:first-child { color: #6ea8fe; }

.fv-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.85rem;
}

.fv-size {
    color: var(--text-muted);
    font-size: 0.78rem;
    white-space: nowrap;
    min-width: 4.5rem;
    text-align: right;
}

.fv-date {
    color: var(--text-muted);
    font-size: 0.78rem;
    white-space: nowrap;
    min-width: 6rem;
    text-align: right;
}

.fv-dl-icon {
    color: var(--text-muted);
    font-size: 1rem;
    transition: color 0.15s;
    flex-shrink: 0;
}

.fv-file:hover .fv-dl-icon { color: var(--accent); }

.fv-downloading {
    opacity: 0.5;
    pointer-events: none;
}

.fv-ctx {
    position: fixed;
    z-index: 5000;
    min-width: 180px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 12px 28px rgba(0,0,0,0.18);
    padding: 4px 0;
}

.fv-ctx-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.7rem 0.9rem;
    font-size: 0.84rem;
    color: var(--text);
    cursor: pointer;
}

.fv-ctx-item:hover {
    background: var(--surface-2);
}

.fv-ctx-item i {
    width: 1rem;
    text-align: center;
    color: var(--text-muted);
}

.fv-ctx-sep {
    height: 1px;
    margin: 4px 0;
    background: var(--border);
}

.fv-loading, .fv-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    gap: 0.5rem;
}

.fv-empty i { font-size: 2rem; color: var(--text-muted); }

.browse-files {
    background: var(--surface-2) !important;
    color: var(--text-muted) !important;
}

.browse-files:hover {
    background: var(--surface-3) !important;
}

@media (max-width: 600px) {
    .fv-date { display: none; }
    .fv-size { min-width: auto; }
    .fv-row { padding: 0.65rem 0.75rem; }
}
