:root {
  --green: #185c37;
  --green-light: #217346;
  --ink: #17212b;
  --muted: #63717c;
  --line: #d2d9de;
  --page: #eef2f0;
  font-family: "Segoe UI", "Malgun Gothic", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--page); color: var(--ink); }
button, input { font: inherit; }
button { cursor: pointer; }
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(440px, 100%); background: #fff; border-radius: 16px; padding: 34px; box-shadow: 0 18px 50px rgba(22, 53, 40, .15); }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.auth-brand .mark { width: 48px; height: 48px; border-radius: 10px; display: grid; place-items: center; background: var(--green); color: #fff; font: italic 700 25px Georgia, serif; }
.auth-brand h1 { margin: 0; font-size: 1.35rem; }
.auth-brand p { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }
.auth-card h2 { margin: 0 0 8px; }
.lead { margin: 0 0 22px; color: var(--muted); line-height: 1.55; }
.field { display: grid; gap: 7px; margin: 15px 0; }
.field span { font-size: .9rem; font-weight: 700; }
.field input { width: 100%; height: 44px; border: 1px solid #aeb9c0; border-radius: 7px; padding: 0 12px; outline: none; }
.field input:focus { border-color: var(--green-light); box-shadow: 0 0 0 3px rgba(33, 115, 70, .14); }
.primary, .secondary, .danger { min-height: 44px; border-radius: 7px; padding: 0 16px; font-weight: 750; }
.primary { width: 100%; border: 0; background: var(--green); color: #fff; }
.secondary { border: 1px solid #aeb9c0; background: #fff; color: var(--ink); }
.danger { border: 1px solid #d8a39d; background: #fff6f4; color: #9b271f; }
.primary:disabled, .secondary:disabled, .danger:disabled { opacity: .55; cursor: wait; }
.message { min-height: 22px; margin: 13px 0 0; color: #b42318; font-size: .9rem; line-height: 1.45; }
.message.success { color: #157347; }
.auth-link { margin: 22px 0 0; text-align: center; color: var(--muted); }
.auth-link a { color: var(--green); font-weight: 700; }
.page-header { background: var(--green); color: #fff; padding: 18px max(20px, calc((100vw - 1000px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.page-header h1 { margin: 0; font-size: 1.25rem; }
.page-header nav { display: flex; gap: 8px; }
.page-header a, .page-header button { color: #fff; background: transparent; border: 1px solid rgba(255,255,255,.55); border-radius: 6px; padding: 8px 12px; text-decoration: none; }
.account-main { width: min(1000px, calc(100% - 32px)); margin: 28px auto 60px; display: grid; gap: 20px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 22px; }
.panel h2 { margin: 0 0 16px; font-size: 1.1rem; }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.metric { background: #f5f8f6; border-radius: 9px; padding: 17px; }
.metric strong { display: block; font-size: 1.5rem; color: var(--green); }
.metric span { color: var(--muted); font-size: .85rem; }
.record-list { display: grid; gap: 10px; }
.record { border: 1px solid var(--line); border-radius: 8px; padding: 14px; display: flex; justify-content: space-between; gap: 15px; align-items: center; }
.record strong, .record span { display: block; }
.record span { color: var(--muted); font-size: .86rem; margin-top: 4px; }
.inline-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; }
.inline-form input { height: 42px; border: 1px solid #aeb9c0; border-radius: 6px; padding: 0 10px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.admin-table th, .admin-table td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; vertical-align: middle; }
.admin-table th { background: #f3f6f4; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-actions button { min-height: 32px; border-radius: 5px; border: 1px solid #aeb9c0; background: #fff; }
.admin-actions button.danger { border-color: #d8a39d; background: #fff6f4; color: #9b271f; }
.admin-table code { white-space: nowrap; color: #164c31; }
@media (max-width: 680px) {
  .auth-card { padding: 26px 22px; }
  .summary-grid { grid-template-columns: 1fr; }
  .inline-form { grid-template-columns: 1fr; }
  .record { align-items: flex-start; flex-direction: column; }
  .table-scroll { overflow-x: auto; }
}
