:root {
    color-scheme: dark;
    --background: #111827;
    --surface: #1e293b;
    --text: #f1f5f9;
    --muted: #94a3b8;
    --border: #334155;
    --accent: #60a5fa;
    --primary: #2563eb;
}

html[data-theme="light"] {
    color-scheme: light;
    --background: #f1f5f9;
    --surface: #ffffff;
    --text: #1e293b;
    --muted: #64748b;
    --border: #cbd5e1;
    --accent: #2563eb;
    --primary: #2563eb;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family: system-ui, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

.navigation {
    max-width: 1200px;
    margin: auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
}

.brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
}

nav {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    gap: 18px;
}

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

main {
    width: min(1100px, 92%);
    margin: 40px auto;
    flex: 1;
}

.hero {
    padding: 42px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-bottom: 32px;
}

.hero h1 {
    font-size: clamp(1.8rem, 5vw, 3rem);
    line-height: 1.2;
}

.eyebrow {
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: var(--accent);
}

p {
    color: var(--muted);
}

.tile-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.tile, .panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    color: var(--text);
}

.tile:hover {
    border-color: var(--accent);
}

.tile h2 {
    color: var(--accent);
}

.panel {
    margin-bottom: 24px;
}

.login-panel {
    max-width: 430px;
    margin: 40px auto;
    padding: 36px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    text-align: center;
}

.lab-symbol {
    display: inline-grid;
    place-items: center;
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: var(--primary);
    color: white;
    font-weight: bold;
    font-size: 2rem;
}

input[type="password"] {
    width: 100%;
    padding: 13px;
    margin: 10px 0 18px;
    background: var(--background);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
}

button {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
}

button:hover {
    border-color: var(--accent);
}

.primary {
    background: var(--primary);
    color: white;
}

.full {
    width: 100%;
}

.check-label {
    display: block;
    margin-bottom: 20px;
}

.error, .warning {
    color: #f97316;
}

.status {
    color: #16a34a;
}

footer {
    text-align: center;
    color: var(--muted);
    border-top: 1px solid var(--border);
    padding: 24px;
    font-size: 0.85rem;
}
/* LBWebLab 0.2 – gallery */
.gallery-hero { padding: 30px; }
.gallery-actions, .gallery-pages { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.gallery-button { display: inline-block; padding: 9px 14px; border-radius: 8px; border: 1px solid var(--border); }
.gallery-button.primary { color: white; }
.gallery-filter { display: flex; align-items: end; flex-wrap: wrap; gap: 14px; margin: 0 0 24px; }
.gallery-filter label { flex: 1 1 190px; }
.gallery-filter input, .gallery-filter select, .gallery-editor input:not([type=hidden]):not([type=checkbox]) { display: block; width: 100%; margin: 6px 0 0; background: var(--background); color: var(--text); padding: 11px; border: 1px solid var(--border); border-radius: 8px; font: inherit; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,230px),1fr)); gap: 18px; }
.gallery-tile { min-width: 0; border: 1px solid var(--border); background: var(--surface); border-radius: 12px; overflow: hidden; }
.gallery-tile img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; display: block; background: var(--background); }
.gallery-caption { padding: 12px; overflow-wrap: anywhere; }
.gallery-caption p { margin: 4px 0; }
.gallery-pages { justify-content: center; margin-top: 24px; }
.gallery-detail img { max-width: 100%; max-height: 75vh; width: auto; height: auto; display: block; margin: auto; object-fit: contain; }
.gallery-detail h1, .gallery-detail p { overflow-wrap: anywhere; }
.gallery-editor { max-width: 740px; }
.gallery-editor label { display: block; margin-bottom: 16px; }
.gallery-edit-preview { display: block; max-width: 100%; max-height: 240px; margin-bottom: 16px; }
.gallery-danger { color: #ef4444; border-color: #ef4444; }
