:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #192522;
  background: #f4f7f5;
  --surface: #fff;
  --border: #dbe4df;
  --muted: #52645d;
  --accent: #075b47;
  --accent-dark: #044231;
  --ring: #2b806a;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, input { font: inherit; }
a { color: var(--accent); text-underline-offset: .2em; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; }

.topbar { background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar-inner {
  max-width: 1120px;
  padding: .8rem clamp(1rem, 4vw, 2.5rem);
  min-height: 68px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .55rem 1.5rem;
}
.brand { display: inline-flex; gap: .6rem; align-items: center; color: #192522; font-weight: 750; text-decoration: none; }
.brand-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: #d8eee5; }
.brand-icon::before { content: ""; border: solid transparent; border-width: 6px 0 6px 9px; border-left-color: var(--accent); margin-left: 2px; }
nav { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem; font-size: .875rem; font-weight: 650; }
nav a, .quiet { display: inline-block; padding: .5rem .65rem; border-radius: 7px; text-decoration: none; }
nav a:hover, nav a[aria-current="page"], .quiet:hover { background: #eaf3ef; }
.quiet { background: transparent; color: var(--muted); border: 0; }

.wrap { max-width: 1120px; margin: auto; padding: clamp(2.5rem, 7vw, 5.25rem) clamp(1rem, 4vw, 2.5rem); }
.guest { max-width: 510px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 17px; box-shadow: 0 8px 28px #16352a08; }
.auth-card, .profile-card { padding: clamp(1.25rem, 5vw, 2.25rem); }
.profile-card { max-width: 760px; }
h1 { margin: 0; font-size: clamp(1.7rem, 5vw, 2.5rem); font-weight: 725; letter-spacing: -.035em; line-height: 1.12; }
.auth-card h1 { font-size: clamp(1.65rem, 5vw, 2.1rem); margin-bottom: 1.65rem; }
.page-heading { margin-bottom: 1.65rem; }
.page-heading p, .auth-switch { margin: .6rem 0 0; color: var(--muted); }
.auth-switch { margin-top: 1.4rem; font-size: .92rem; line-height: 1.5; }

.fields, .two-cols { display: grid; gap: 1.1rem; }
.two-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
label { font-size: .9rem; font-weight: 640; display: grid; gap: .36rem; }
input:not([type="hidden"]) {
  width: 100%;
  min-height: 44px;
  color: inherit;
  background: #fbfdfc;
  border: 1px solid #cddbd3;
  border-radius: 8px;
  padding: .65rem .75rem;
  font-weight: 450;
}
small { color: var(--muted); font-weight: 450; font-size: .8rem; }
.password-field { max-width: 21rem; }
.primary { min-height: 44px; padding: .65rem 1.05rem; color: #fff; background: var(--accent); border: 0; border-radius: 8px; font-weight: 680; }
.primary:hover { background: var(--accent-dark); }
.notice { margin: 0 0 1.15rem; padding: .75rem .9rem; border-radius: 8px; font-size: .9rem; line-height: 1.5; }
.notice.error { color: #86272c; background: #fae9e9; }
.notice.success { color: #084d3b; background: #e4f3eb; }

.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 650px; border-collapse: collapse; text-align: left; }
th, td { padding: .95rem 1.15rem; font-size: .9rem; }
th { color: var(--muted); font-size: .8rem; background: #f0f5f2; }
td { border-top: 1px solid var(--border); }
.role { display: inline-block; background: #f0f4f2; color: #394d44; border-radius: 6px; padding: .25rem .55rem; font-size: .8rem; white-space: nowrap; }
.role-admin { background: #dcefe5; color: #084d3b; }

@media (max-width: 540px) {
  .two-cols { grid-template-columns: 1fr; }
  .topbar-inner { padding-block: .65rem; }
  .profile-card .primary { width: 100%; }
}
