:root {
  --ink: #172126;
  --muted: #607079;
  --line: #d9e0e3;
  --soft: #f4f7f6;
  --green: #1f7a58;
  --red: #b84a43;
  --blue: #2864a6;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #eef3f2;
  color: var(--ink);
}
a { color: var(--blue); }
.btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  color: var(--ink);
}
.btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn.danger { color: #96352f; border-color: #efc2bd; background: #fff7f6; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  font: inherit;
}
label { display: grid; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 12px; }

/* Auth pages (login/signup/forgot password) */
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}
.auth-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 16px 34px rgba(23, 33, 38, 0.12);
  padding: 32px;
  width: 100%;
  max-width: 400px;
}
.auth-brand { text-align: center; margin-bottom: 20px; }
.auth-brand .mark {
  width: 56px; height: 56px; border-radius: 14px;
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink) 45%, var(--green) 100%);
  color: #fff; display: grid; place-items: center; font-weight: 900; font-size: 22px;
  letter-spacing: -0.5px; margin: 0 auto 10px;
  box-shadow: 0 8px 18px rgba(23, 33, 38, 0.25);
  border-bottom: 3px solid var(--green);
}
.auth-brand h1 { margin: 0; font-size: 22px; }
.auth-brand p { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.error-box {
  background: #fae4e1; color: #923a34; border-radius: 8px; padding: 10px 12px;
  font-size: 13px; font-weight: 700; margin-bottom: 14px;
}
.notice-box {
  background: #f3faf6; color: #24513f; border: 1px solid #cfe0d8; border-radius: 8px;
  padding: 10px 12px; font-size: 13px; font-weight: 700; margin-bottom: 14px;
}
.auth-links { text-align: center; margin-top: 14px; font-size: 13px; color: var(--muted); }

/* App shell (dashboard, resource pages) */
.app { min-height: 100vh; display: grid; grid-template-columns: 220px 1fr; }
aside { background: var(--ink); color: #fff; padding: 20px 14px; }
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.mark {
  width: 38px; height: 38px; border-radius: 9px;
  background: linear-gradient(135deg, #fff 0%, #fff 45%, var(--green) 100%);
  color: var(--ink); display: grid; place-items: center; font-weight: 900; font-size: 15px;
  letter-spacing: -0.5px; border-bottom: 2px solid var(--green);
}
nav { display: grid; gap: 6px; }
nav a { display: block; color: #d8e3e6; border-radius: 8px; padding: 11px; text-decoration: none; font-weight: 700; }
nav a.active, nav a:hover { background: rgba(255,255,255,.12); color: #fff; }
main { padding: 26px; }
.page-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap: 12px; flex-wrap: wrap; }
h1 { margin: 0; font-size: 26px; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.metric { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 16px; }
.metric span { color: var(--muted); font-size: 13px; font-weight: 800; display: block; margin-bottom: 8px; }
.metric strong { font-size: 26px; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; }
th, td { border-bottom: 1px solid var(--line); padding: 12px; text-align: left; font-size: 14px; }
th { background: var(--soft); color: var(--muted); text-transform: uppercase; font-size: 11px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 22px; max-width: 560px; }
.row-actions { display: flex; gap: 8px; }
.section-title { font-size: 18px; margin: 0 0 6px; }
.section-note { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.positive { color: var(--green); font-weight: 700; }
.negative { color: var(--red); font-weight: 700; }
