:root {
    --bg: #f6f7fb;
    --card: #ffffff;
    --text: #1f2430;
    --muted: #6b7280;
    --accent: #4f46e5;
    --accent-light: #eef0fe;
    --border: #e5e7eb;
    --success: #16a34a;
    --danger: #dc2626;
    --radius: 12px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Noto Sans Bengali", "Segoe UI", system-ui, -apple-system, sans-serif;
    line-height: 1.5;
}

.wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 32px 20px 80px;
}

h1 { font-size: 1.6rem; margin: 0 0 6px; }
.subtitle { color: var(--muted); margin: 0 0 24px; }
.section-title { font-size: 1.1rem; margin: 32px 0 12px; color: var(--text); }

.alert {
    background: #fef2f2;
    color: var(--danger);
    border: 1px solid #fecaca;
    padding: 10px 14px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 0.9rem;
}

/* Upload dropzone */
.dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 40px 20px;
    background: var(--card);
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    text-align: center;
    transition: border-color .15s, background .15s;
}
.dropzone.dragover {
    border-color: var(--accent);
    background: var(--accent-light);
}
.dropzone input[type="file"] { display: none; }
.dz-title { color: var(--muted); font-size: 0.95rem; }
.dz-button {
    background: var(--accent);
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
}

/* File history list */
.empty { color: var(--muted); }
.file-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.file-item {
    display: flex;
    align-items: stretch;
    gap: 8px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.file-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    text-decoration: none;
    color: var(--text);
}
.file-name { font-weight: 600; }
.file-meta { font-size: 0.82rem; color: var(--muted); }

.progress-track {
    display: block;
    height: 6px;
    background: var(--border);
    border-radius: 999px;
    overflow: hidden;
}
.progress-fill {
    display: block;
    height: 100%;
    background: var(--accent);
    border-radius: 999px;
    transition: width .2s;
}

.delete-form { display: flex; }
.delete-btn {
    width: 44px;
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 1.3rem;
    cursor: pointer;
}
.delete-btn:hover { color: var(--danger); background: #fef2f2; }

/* Checklist view */
.back-link { color: var(--accent); text-decoration: none; font-size: 0.9rem; }
.file-title { margin: 12px 0 16px; font-size: 1.3rem; word-break: break-word; }

.progress-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.progress-header .progress-track { flex: 1; }
.progress-label { font-size: 0.85rem; color: var(--muted); white-space: nowrap; }

.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.check-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    transition: background .15s, border-color .15s;
}
.check-item.checked { background: #f0fdf4; border-color: #bbf7d0; }
.check-item label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.check-box { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--success); flex-shrink: 0; }
.check-text { flex: 1; }
.check-item.checked .check-text { text-decoration: line-through; color: var(--muted); }
