:root {
    color-scheme: light;
    --bg: #f4f6f8;
    --panel: #ffffff;
    --text: #1f2933;
    --muted: #616e7c;
    --border: #d9e0e7;
    --accent: #2563eb;
    --green: #1a7f37;
    --yellow: #9a6700;
    --red: #cf222e;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
}

nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0.75rem 1.5rem;
    background: var(--panel);
    border-bottom: 1px solid var(--border);
}

nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
}

nav a:hover { color: var(--accent); }

nav .brand { font-weight: 700; margin-right: auto; }
nav .user { color: var(--muted); font-size: 0.9rem; }

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

.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; }

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

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

th { color: var(--muted); font-weight: 600; }

.badge {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
}

.badge-green { background: var(--green); }
.badge-yellow { background: var(--yellow); }
.badge-red { background: var(--red); }
.badge-muted { background: var(--muted); }
.badge-blue { background: var(--accent); }

form label {
    display: block;
    margin-top: 0.9rem;
    font-weight: 500;
    font-size: 0.9rem;
}

form input[type="text"],
form input[type="password"],
form input[type="number"],
form textarea {
    width: 100%;
    padding: 0.5rem 0.6rem;
    margin-top: 0.3rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.95rem;
}

form textarea { font-family: inherit; resize: vertical; }

code {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.05rem 0.35rem;
    font-size: 0.85em;
}

.actions { margin-top: 1.25rem; display: flex; gap: 0.75rem; }

button, .btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0.55rem 1.1rem;
    border-radius: 6px;
    font-size: 0.92rem;
    cursor: pointer;
    text-decoration: none;
}

button.secondary, .btn.secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

button.danger { background: var(--red); }

.icon-btn {
    width: 1.6rem;
    height: 1.6rem;
    padding: 0;
    line-height: 1.5rem;
    text-align: center;
    border-radius: 50%;
    font-size: 1rem;
}
.icon-btn:hover { border-color: var(--red); color: var(--red); }

.error {
    background: #ffebe9;
    border: 1px solid #ffcecb;
    color: var(--red);
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.success {
    background: #dafbe1;
    border: 1px solid #b4f1c1;
    color: var(--green);
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

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