/* home-library — minimal dark-mode styling. No build step. */

:root {
    --bg: #0f1115;
    --bg-elevated: #171a21;
    --bg-hover: #1f232c;
    --border: #2a2f3a;
    --text: #e6e8eb;
    --text-muted: #9aa1ac;
    --accent: #5b8def;
    --accent-hover: #7ba3f2;
    --danger: #e5534b;
    --success: #3fb950;
    --radius: 6px;
    --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    line-height: 1.5;
    min-height: 100vh;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

h1,
h2,
h3 {
    color: var(--text);
    font-weight: 600;
}

main,
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}

button,
input[type="submit"] {
    background: var(--accent);
    color: #ffffff;
    border: none;
    border-radius: var(--radius);
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    cursor: pointer;
}

button:hover,
input[type="submit"]:hover {
    background: var(--accent-hover);
}

input[type="text"],
input[type="password"],
input[type="file"] {
    background: var(--bg-hover);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem 0.75rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
}

.muted {
    color: var(--text-muted);
}

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

.success {
    color: var(--success);
}

/* --- nav --- */

.topnav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.topnav .brand {
    color: var(--text);
    font-weight: 700;
}

.nav-links {
    display: flex;
    gap: 1rem;
    flex: 1;
}

#theme-toggle {
    background: transparent;
    border: 1px solid var(--border);
}

/* --- flash messages --- */

.flash {
    border-radius: var(--radius);
    padding: 0.6rem 0.9rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.flash-error {
    background: rgba(229, 83, 75, 0.15);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.flash-success {
    background: rgba(63, 185, 80, 0.15);
    color: var(--success);
    border: 1px solid var(--success);
}

/* --- auth card --- */

.auth-card {
    max-width: 360px;
    margin: 4rem auto 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.auth-card form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* --- quota bar --- */

.quota-bar {
    margin-bottom: 1.5rem;
}

.quota-track {
    background: var(--bg-hover);
    border-radius: var(--radius);
    height: 10px;
    overflow: hidden;
}

.quota-fill {
    background: var(--accent);
    height: 100%;
}

.quota-label {
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

/* --- upload zone --- */

.upload-zone {
    text-align: center;
    border: 2px dashed var(--border);
    margin-bottom: 1.5rem;
}

.upload-zone.dragover {
    border-color: var(--accent);
}

/* --- file list --- */

.file-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.file-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
}

.file-name {
    flex: 1;
    color: var(--text);
}

.file-card .danger {
    background: transparent;
    border: 1px solid var(--danger);
    padding: 0.3rem 0.7rem;
}

.link-button {
    background: none;
    border: none;
    color: var(--accent);
    padding: 0;
    text-decoration: underline;
}
