:root {
    color-scheme: light;
    --font-sans: "Segoe UI", system-ui, -apple-system, sans-serif;
    --text: #1f2937;
    --muted: #4b5563;
    --surface: #ffffff;
    --surface-soft: #f5f6fa;
    --border: #e5e7eb;
    --accent: #0f52ba;
    --accent-strong: #0c3f8c;
    --accent-soft: #e7efff;
    --danger: #b91c1c;
    --radius: 10px;
    --shadow: 0 10px 30px rgba(15, 82, 186, 0.08);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    color: var(--text);
    background: var(--surface-soft);
    line-height: 1.6;
    margin: 0;
}

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

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

a:hover {
    text-decoration: underline;
}

header {
    background: #0f172a;
    color: #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

header nav {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.9rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

nav a {
    color: #e2e8f0;
    font-weight: 600;
    padding: 0.35rem 0.55rem;
    border-radius: 6px;
    transition: background 0.15s ease;
}

nav a:hover {
    background: rgba(226, 232, 240, 0.15);
}

h1, h2, h3, h4 {
    margin: 0 0 0.5rem 0;
    font-weight: 700;
    color: #0f172a;
}

p {
    margin: 0.4rem 0;
}

section {
    margin: 1rem 0;
}

.card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

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

th {
    background: #f1f5f9;
    font-weight: 700;
}

tr:last-child td {
    border-bottom: none;
}

.table-scroll {
    overflow-x: auto;
}

button,
input,
select {
    font: inherit;
}

button,
.btn {
    background: linear-gradient(135deg, var(--accent), #5b8def);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.65rem 1.15rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: transform 0.08s ease, box-shadow 0.12s ease;
}

button:hover,
.btn:hover {
    box-shadow: 0 12px 24px rgba(15, 82, 186, 0.16);
}

button:active,
.btn:active {
    transform: translateY(1px);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select {
    width: 100%;
    padding: 0.5rem 0.6rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-weight: 600;
    font-size: 0.9rem;
}

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

.flash {
    padding: 0.9rem 1rem;
    border-radius: var(--radius);
    border: 1px solid #cde8d2;
    background: #eaf7ec;
    color: #155724;
    box-shadow: var(--shadow);
}

.errors {
    color: var(--danger);
    font-weight: 600;
}

@media (max-width: 800px) {
    main {
        padding: 1rem;
    }

    table {
        display: block;
    }

    .table-scroll {
        overflow-x: auto;
    }
}
