/* ── NovaPDF Global Styles ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --accent: #FF4D1C;
    --accent-dim: #FF4D1C22;
    --bg: #0a0a12;
    --bg-mid: #111118;
    --bg-card: #141420;
    --border: #1f1f2e;
    --text: #e0e0e0;
    --text-dim: #888;
    --text-muted: #555;
    --font-sans: 'Inter', -apple-system, sans-serif;
    --font-display: 'Syne', sans-serif;
    --font-mono: 'DM Mono', monospace;
}

html, body {
    height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
}

/* ── Top Nav ── */
.topnav {
    height: 56px;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px;
    background: var(--bg-mid);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 100;
}

.brand {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none; color: white;
    font-family: var(--font-display); font-weight: 700; font-size: 16px;
}

.nav-links {
    display: flex; align-items: center; gap: 24px;
}
.nav-links a {
    color: var(--text-dim); text-decoration: none;
    font-size: 13px; transition: color 0.15s;
}
.nav-links a:hover { color: white; }
.nav-btn-upload {
    display: flex !important; align-items: center; gap: 6px;
    padding: 7px 16px; border-radius: 8px;
    background: var(--accent) !important; color: white !important;
    font-size: 13px !important; font-weight: 600;
    transition: opacity 0.15s !important;
}
.nav-btn-upload:hover { opacity: 0.85; color: white !important; }

/* ── Dashboard ── */
.dashboard {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 24px;
}

/* ── Upload Zone ── */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-mid);
    margin-bottom: 40px;
}
.upload-zone:hover, .upload-zone.drag-over {
    border-color: var(--accent);
    background: var(--accent-dim);
}
.upload-inner { pointer-events: none; }
.upload-icon {
    display: flex; justify-content: center;
    margin-bottom: 16px;
}
.upload-zone h2 {
    font-family: var(--font-display); font-weight: 700;
    font-size: 24px; color: white; margin-bottom: 8px;
}
.upload-zone p { font-size: 14px; color: var(--text-dim); margin-bottom: 10px; }
.file-link {
    color: var(--accent); cursor: pointer; pointer-events: all;
    text-decoration: underline; text-underline-offset: 2px;
}
.upload-hint {
    font-size: 12px; color: var(--text-muted);
    font-family: var(--font-mono);
}

/* ── Progress Bar ── */
.upload-progress {
    background: var(--bg-mid); border: 1px solid var(--border);
    border-radius: 12px; padding: 20px;
    margin-bottom: 40px; text-align: center;
}
.progress-bar {
    width: 100%; height: 4px; background: var(--border);
    border-radius: 4px; overflow: hidden; margin-bottom: 10px;
}
.progress-fill {
    height: 100%; background: var(--accent);
    border-radius: 4px; transition: width 0.3s ease;
    width: 0%;
}
.upload-progress span {
    font-size: 12px; color: var(--text-dim);
    font-family: var(--font-mono);
}

/* ── Section Header ── */
.section-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px;
}
.section-header h3 {
    font-family: var(--font-display); font-weight: 700;
    font-size: 18px; color: white;
}
.doc-count {
    font-size: 12px; color: var(--text-muted);
    font-family: var(--font-mono);
    padding: 4px 10px; border-radius: 20px;
    background: var(--bg-mid); border: 1px solid var(--border);
}

/* ── Empty State ── */
.empty-state {
    text-align: center; padding: 60px;
    border: 1px dashed var(--border); border-radius: 16px;
    color: var(--text-muted); font-size: 14px;
}
.empty-icon { font-size: 40px; margin-bottom: 12px; }

/* ── Docs Grid ── */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.doc-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    display: flex; flex-direction: column; gap: 12px;
    transition: all 0.2s;
    cursor: pointer;
}
.doc-card:hover {
    border-color: #2a2a3e;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.doc-thumb {
    display: flex; justify-content: center;
    padding: 16px; background: var(--bg-mid);
    border-radius: 10px;
}

.doc-info h4 {
    font-size: 13px; color: white; font-weight: 500;
    margin-bottom: 4px; line-height: 1.3;
}
.doc-meta {
    display: flex; gap: 6px;
    font-size: 11px; color: var(--text-muted);
    font-family: var(--font-mono);
}

.doc-actions {
    display: flex; gap: 6px; margin-top: auto;
}
.btn-edit {
    flex: 1; display: flex; align-items: center;
    justify-content: center; gap: 6px;
    padding: 8px 12px; border-radius: 8px;
    background: var(--accent); color: white;
    text-decoration: none; font-size: 12px; font-weight: 600;
    transition: opacity 0.15s;
}
.btn-edit:hover { opacity: 0.85; }
.btn-dl, .btn-del {
    width: 34px; height: 34px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border); background: var(--bg-mid);
    color: var(--text-dim); text-decoration: none; cursor: pointer;
    transition: all 0.15s; flex-shrink: 0;
}
.btn-dl:hover { background: #1a2a1a; border-color: #2a4a2a; color: #4caf79; }
.btn-del:hover { background: #2a1a1a; border-color: #4a2a2a; color: #ff6b6b; }

/* ── Scrollbars ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2a2a3a; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #3a3a4a; }

/* ── Utilities ── */
main { min-height: calc(100vh - 56px); }
