* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #12141a;
    --panel: #1b1e27;
    --panel2: #232733;
    --border: #2e3342;
    --text: #e6e8ee;
    --dim: #8b91a3;
    --accent: #4f8cff;
    --accent2: #3a6fd8;
    --danger: #e05555;
    --radius: 8px;
}

html, body { height: 100%; }

body {
    font-family: "Segoe UI", system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
}

button {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    padding: 8px 14px;
    cursor: pointer;
    font-size: 14px;
}
button:hover { background: var(--accent2); }
button.ghost { background: transparent; color: var(--dim); }
button.ghost:hover { color: var(--text); background: var(--panel2); }
button.danger { background: transparent; color: var(--danger); }
button.danger:hover { background: rgba(224, 85, 85, .15); }
button.small { padding: 4px 10px; font-size: 12px; }
button.active { background: var(--accent2); }

input {
    background: var(--panel2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    padding: 9px 12px;
    font-size: 14px;
    width: 100%;
}
input:focus { outline: none; border-color: var(--accent); }

.dim { color: var(--dim); font-size: 12px; }
.error { color: var(--danger); font-size: 13px; margin-top: 10px; text-align: center; }

/* ---------- Auth ---------- */

[hidden] { display: none !important; }

.auth-screen {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-box {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    width: 320px;
    text-align: center;
}
.auth-box h1 { margin-bottom: 4px; }
.auth-box .dim { margin-bottom: 20px; }
.auth-box form { display: flex; flex-direction: column; gap: 10px; }

/* ---------- App ---------- */

.app-screen {
    height: 100vh;
    display: flex;
}

.sidebar {
    width: 240px;
    background: var(--panel);
    border-right: 1px solid var(--border);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.me-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.side-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.side-box {
    background: var(--panel2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
}
.side-box h3 { margin-bottom: 8px; font-size: 14px; }
.side-box form { display: flex; flex-direction: column; gap: 8px; }

/* ---------- Content ---------- */

.content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.view-header h2 { font-size: 20px; }
.view-header > div { display: flex; gap: 8px; align-items: center; }

.file-btn {
    background: var(--accent);
    color: #fff;
    border-radius: var(--radius);
    padding: 8px 14px;
    font-size: 14px;
    cursor: pointer;
}
.file-btn:hover { background: var(--accent2); }

.list { display: flex; flex-direction: column; gap: 8px; }

.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.card-info { flex: 1; min-width: 0; }
.card-info strong { display: block; }
.card-actions { display: flex; gap: 8px; flex-shrink: 0; }

.empty {
    color: var(--dim);
    text-align: center;
    padding: 40px;
}

.error-inline { color: var(--danger); }

.progress {
    margin-top: 8px;
    height: 6px;
    background: var(--panel2);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: width .3s;
}
