#dropzone {
    border: 3px dashed #aaa;
    border-radius: 12px;
    padding: 60px;
    text-align: center;
    color: #888;
    font-size: 1.1rem;
    transition:
        background 0.2s,
        border-color 0.2s;
    cursor: pointer;
}

#dropzone.dragover {
    background: #f0f8ff;
    border-color: #4a90e2;
    color: #4a90e2;
}

#dropzone.error {
    background: #fff0f0;
    border-color: #e24a4a;
    color: #e24a4a;
}

#allowed-types {
    margin-top: 8px;
    font-size: 0.85rem;
    color: #aaa;
    text-align: center;
}

#file-list {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.file-item {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: opacity 0.3s;
}
.file-item.cancelled {
    opacity: 0.5;
}

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    border: 2.5px solid #e0e0e0;
    border-top-color: #4a90e2;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Terminal state icons replace the spinner */
.icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.file-name {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-status {
    font-size: 0.8rem;
    color: #aaa;
    white-space: nowrap;
}
.file-status.success {
    color: #2e9e5b;
}
.file-status.error {
    color: #e24a4a;
}
.file-status.cancelled {
    color: #aaa;
}

.cancel-btn {
    background: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    color: #888;
    font-size: 0.75rem;
    padding: 2px 8px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition:
        background 0.15s,
        color 0.15s,
        border-color 0.15s;
}
.cancel-btn:hover {
    background: #fee;
    border-color: #e24a4a;
    color: #e24a4a;
}

.refresh-btn {
    background: var(--surface);
    border: 1px solid #555;
    border-radius: 4px;
    color: #555;
    font-size: 0.9rem;
    padding: 2px 8px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition:
        background 0.15s,
        color 0.15s,
        border-color 0.15s;
}
.refresh-btn:hover {
    background: #fee;
    border-color: #e24a4a;
    color: #e24a4a;
}
/* ── Confirmation Dialog ── */
#dialog-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(3px);
    z-index: 100;
    align-items: center;
    justify-content: center;
}
#dialog-overlay.open {
    display: flex;
    animation: fade-in 0.15s ease;
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

#dialog-box {
    background: #fff;
    border-radius: 14px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.18),
        0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 28px 28px 22px;
    width: 340px;
    max-width: calc(100vw - 40px);
    animation: slide-up 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slide-up {
    from {
        transform: translateY(12px) scale(0.97);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

#dialog-icon {
    width: 44px;
    height: 44px;
    background: #fff0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 14px;
}

#dialog-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 6px;
}

#dialog-message {
    font-size: 0.875rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 22px;
    word-break: break-all;
}

#dialog-message strong {
    color: #333;
    font-weight: 600;
}

.dialog-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.dialog-btn {
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 8px 20px;
    cursor: pointer;
    transition:
        filter 0.15s,
        transform 0.1s;
}
.dialog-btn:hover {
    filter: brightness(0.94);
}
.dialog-btn:active {
    transform: scale(0.97);
}

#dialog-cancel-btn {
    background: #f0f0f0;
    color: #555;
}

#dialog-confirm-btn {
    background: #e24a4a;
    color: #fff;
    letter-spacing: 0.01em;
}

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

:root {
    --bg: #fff; /*#0d0f14;*/
    --surface: #b1b8e3;
    --border: #1f2330;
    --accent: green;
    --accent2: #4effd1;
    --text: #000;
    --muted: white;
    --row-hover: Tomato;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: Tahoma, Arial, sans-serif;
    min-height: 100vh;
    padding: 24px;
}

.page-header {
    margin-bottom: 40px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.83rem;
}

thead tr {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

th {
    font-family: Georgia, serif;
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    padding: 14px 20px;
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    transition: color 0.15s;
    position: relative;
}

th:hover {
    color: var(--text);
}
th.sorted {
    color: var(--accent);
}

th .sort-icon {
    display: inline-block;
    margin-left: 6px;
    opacity: 0.35;
    font-size: 0.65rem;
    transition: opacity 0.15s;
}

th.sorted .sort-icon {
    opacity: 1;
}

tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.12s;
    animation: fadeIn 0.3s ease both;
}

tbody tr:last-child {
    border-bottom: none;
}
/*tbody tr:hover {
    background: var(--row-hover);
}*/

td {
    padding: 13px 20px;
    color: var(--text);
    white-space: nowrap;
}

.no-results {
    padding: 48px;
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
}

.footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    font-size: 0.72rem;
    /*color: var(--muted);*/
    flex-wrap: wrap;
    gap: 8px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
