:root { --bg: #f5f6f8; --card: #ffffff; --text: #1f2933; --muted: #617080; --accent: #2563eb; --accent-hover: #1d4ed8; --danger: #dc2626; --danger-hover: #b91c1c; --border: #d9dee5; --radius: 8px; }
* { box-sizing: border-box; }
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-size: 16px; line-height: 1.5; color: var(--text); background: var(--bg); margin: 0; padding: 2rem 1rem; }
body > * { max-width: 900px; margin-left: auto; margin-right: auto; }
body > h1 { margin-top: 0; }

h1 { font-size: 1.75rem; margin: 0 0 1rem; }
h2 { font-size: 1.25rem; margin: 2rem 0 0.75rem; }
p { margin: 0.5rem 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

form { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; margin: 0.75rem 0; display: flex; flex-direction: column; gap: 0.75rem; max-width: 480px; }
form[action="logout.php"], td form { display: inline-flex; flex-direction: row; background: none; border: 0; padding: 0; margin: 0; max-width: none; }
label { display: flex; flex-direction: column; gap: 0.25rem; font-weight: 600; font-size: 0.95rem; }
input[type="text"], input[type="email"], input[type="password"], input:not([type]), select { font: inherit; padding: 0.5rem 0.65rem; border: 1px solid var(--border); border-radius: 6px; background: #fff; width: 100%; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
input[type="file"] { font: inherit; }

br { display: none; }

.site-header { max-width: none; background: var(--card); border-bottom: 1px solid var(--border); padding: 0.75rem 1rem; margin: -2rem -1rem 2rem; }
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.site-name { font-weight: 700; font-size: 1.1rem; color: var(--text); }

.login-box { max-width: 380px; }
.login-box form { max-width: none; padding: 1.5rem; }
.login-box h1 { text-align: center; }


nav { display: flex; justify-content: flex-end; align-items: center; gap: 0.5rem; max-width: 900px; margin: 0 auto 1.5rem; }

button { font: inherit; font-weight: 600; padding: 5; border: 0; border-radius: 6px; background: var(--accent); color: #fff; cursor: pointer; align-self: flex-start; }

button:hover { background: var(--accent-hover); }
td button, form[action="logout.php"] button { background: var(--danger); }
td button:hover, form[action="logout.php"] button:hover { background: var(--danger-hover); }

table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { background: #eef1f5; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
tr:hover td { background: #fafbfc; }

ul { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1rem 1rem 2.25rem; margin: 0.75rem 0; }
li { margin: 0.4rem 0; }

p[style*="red"] { background: #fef2f2; border: 1px solid #fecaca; color: var(--danger); padding: 0.5rem 0.75rem; border-radius: 6px; }

.container { max-width: 900px; margin: 0 auto; }
footer { max-width: 900px; margin: 2rem auto 0; padding-top: 1rem; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.9rem; }
footer p { margin: 0; }
footer { text-align: center; }

.boxes { display: flow-root; }
.box { float: left; width: 50%; box-sizing: border-box; padding: 0.75rem; }
.box > h2:first-child { margin-top: 0; }
.box form { max-width: none; border: 0; padding: 0; margin: 0 0 1rem; box-shadow: none; background: none; }
.box table { margin-bottom: 0; }
.box > div, .box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
@media (max-width: 700px) { .box { float: none; width: 100%; } }


