:root {
  --ink: #14211c;
  --muted: #6b706a;
  --line: #e4dece;
  --paper: #f4f0e7;
  --card: #fffdf8;
  --gold: #a78455;
  --pine: #10241c;
  --pos: #1b6b45;
  --neg: #8b3c34;
  --warn: #8a5e2c;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
}
button, input, select, textarea { font-family: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.topbar {
  min-height: 68px; background: var(--pine); color: #f7f2e8;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 22px; position: sticky; top: 0; z-index: 40;
  border-bottom: 1px solid rgba(167, 132, 85, 0.55);
}
.brand { display: flex; align-items: center; gap: 12px; color: inherit; }
.mark {
  width: 36px; height: 36px; flex: 0 0 36px; border: 0; border-radius: 2px;
  background: #10241c url("assets/logo.jpg") center/cover no-repeat;
  color: transparent; font-size: 0;
}
.brand b { font-family: Palatino, Georgia, serif; font-weight: 500; font-size: 18px; display: block; line-height: 1; }
.brand small { display: block; color: var(--gold); letter-spacing: 0.2em; font-size: 9px; text-transform: uppercase; margin-top: 4px; }
.top-meta { display: flex; align-items: center; gap: 16px; font-size: 12px; color: rgba(247, 242, 232, 0.72); }
.who { text-align: right; line-height: 1.35; color: #f7f2e8; }
.clock { font-variant-numeric: tabular-nums; }
.logout {
  border: 1px solid rgba(215, 196, 161, 0.7); background: transparent; color: #f7f2e8;
  padding: 8px 12px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
}
.shell { display: grid; grid-template-columns: 228px 1fr; min-height: calc(100vh - 68px); }
nav.side { background: #0e1c17; padding: 18px 10px 28px; }
nav.side button {
  width: 100%; text-align: left; border: 0; background: transparent; color: rgba(247, 242, 232, 0.78);
  padding: 11px 12px; font-size: 14px; border-left: 2px solid transparent;
}
nav.side button.active, nav.side button:hover { color: #fff; border-left-color: var(--gold); background: rgba(255,255,255,0.04); }
nav.side .group { margin: 18px 12px 6px; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }
.content { padding: 32px 36px 70px; max-width: 1080px; }
.kicker { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: #8d6d3f; margin-bottom: 8px; }
h1 { font-family: Palatino, Georgia, serif; font-weight: 500; font-size: 38px; margin: 0 0 8px; }
.lead { color: var(--muted); font-size: 14.5px; margin: 0 0 20px; line-height: 1.5; }
.grid-2 { display: grid; grid-template-columns: 1.45fr 0.85fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.card { background: var(--card); border: 1px solid var(--line); padding: 22px 24px; box-shadow: 0 12px 32px rgba(16, 36, 28, 0.04); }
.label { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.balance { font-family: Palatino, Georgia, serif; font-size: 46px; line-height: 0.95; letter-spacing: -0.03em; }
.balance span { font-family: "Avenir Next", "Segoe UI", sans-serif; font-size: 13px; color: #8d6d3f; margin-left: 8px; letter-spacing: 0.12em; }
.rowline { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; color: var(--muted); font-size: 13px; }
.rowline b { color: var(--ink); font-weight: 600; }
.pill { display: inline-block; margin-top: 14px; border: 1px solid #e0cba4; color: var(--warn); background: #fbf6ee; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; padding: 6px 8px; }
dl.kv { display: grid; grid-template-columns: 150px 1fr; row-gap: 10px; font-size: 13.5px; margin: 0; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; text-align: right; font-weight: 600; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 0 8px 10px 0; border-bottom: 1px solid var(--line); }
td { padding: 13px 8px 13px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.in { color: var(--pos); font-weight: 650; }
.out { color: var(--neg); font-weight: 650; }
.ref { color: var(--muted); font-size: 12px; margin-top: 3px; }
.notice { background: #f8f1e4; border: 1px solid #e4d3b0; color: #5c4a2e; padding: 12px 14px; font-size: 13.5px; margin-bottom: 16px; line-height: 1.5; }
.tools { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
input, select, textarea { border: 1px solid #ddd6c8; background: #fff; padding: 11px 12px; font-size: 14px; color: var(--ink); width: 100%; }
input:focus, select:focus, textarea:focus { outline: 1px solid var(--gold); border-color: var(--gold); }
.btn { background: var(--pine); color: #f7f3ea; border: 0; padding: 12px 16px; letter-spacing: 0.08em; text-transform: uppercase; font-size: 12px; }
.btn.block { width: 100%; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.full { grid-column: 1 / -1; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.msg { border-bottom: 1px solid var(--line); padding: 15px 0; }
.msg b { display: block; margin: 3px 0; }
.msg p, .letter p { margin: 8px 0 0; color: #3c3a34; font-size: 14.5px; line-height: 1.55; }
.msg time { color: var(--muted); font-size: 12px; }
.err { color: var(--neg); font-size: 13px; min-height: 18px; margin-top: 8px; }
.foot { margin-top: 26px; color: #9a9488; font-size: 11px; display: flex; justify-content: space-between; gap: 12px; }
.acct { border: 1px solid var(--line); background: #fff; padding: 16px; display: flex; justify-content: space-between; gap: 10px; align-items: flex-end; }
.login-body { min-height: 100vh; display: grid; grid-template-columns: 1.12fr 0.88fr; background: #efeae1; }
.login-visual { position: relative; background: #1a2420; min-height: 100vh; }
.login-visual img { width: 100%; height: 100vh; object-fit: cover; display: block; }
.login-visual .cap { position: absolute; left: 36px; bottom: 32px; color: white; text-shadow: 0 8px 24px rgba(0,0,0,.4); }
.login-visual .cap b { font-family: Palatino, Georgia, serif; font-size: 32px; font-weight: 500; display: block; }
.login-visual .cap span { letter-spacing: 0.16em; font-size: 11px; text-transform: uppercase; color: #ead9b8; }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 36px 24px; }
.login-card { width: 100%; max-width: 420px; }
.login-card h1 { font-size: 36px; margin: 12px 0 6px; }
.pw-wrap { position: relative; }
.pw-wrap button { position: absolute; right: 8px; top: 9px; border: 0; background: transparent; color: var(--muted); font-size: 12px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); margin: 8px 0 14px; }
.check input { width: auto; }
@media (max-width: 860px) {
  .login-body { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .topbar { padding: 10px 12px; }
  .clock { display: none; }
  .brand b { font-size: 16px; }
  .shell { display: block; }
  nav.side { position: sticky; top: 58px; z-index: 30; display: flex; overflow-x: auto; padding: 0; border-bottom: 1px solid rgba(167, 132, 85, 0.4); }
  nav.side .group { display: none; }
  nav.side button { width: auto; white-space: nowrap; border-left: 0; border-bottom: 2px solid transparent; padding: 12px 14px; }
  nav.side button.active { border-bottom-color: var(--gold); background: transparent; }
  .content { padding: 20px 14px 40px; }
  h1 { font-size: 30px; }
  .balance { font-size: 34px; }
  .grid-2, .grid-3, .form-grid { grid-template-columns: 1fr; }
  .foot { flex-direction: column; }
}
@media print { .topbar, nav.side, .noprint { display: none !important; } .shell { display: block; } }

body { background: #f3eee4; }
.topbar { background: #0c1a15; }
.balance { font-size: 48px; }
.card { border-radius: 2px; }
.login-panel { background: #f7f3eb; }
.login-card h1 { letter-spacing: -0.03em; }
.btn { letter-spacing: 0.14em; }
input, select, textarea { background: #fffcf7; }
.waitbar { height: 2px; background: #e6dfd2; margin-top: 18px; overflow: hidden; }
.waitbar span { display:block; height:100%; width:40%; background:#8d6d3f; animation: load 1.1s ease-in-out infinite; }
@keyframes load { 0% { transform: translateX(-120%);} 100% { transform: translateX(280%);} }
.cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; background: #0c1a15; color: #f7f2e8; display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 14px 16px; border: 1px solid rgba(215,196,161,.4); }
.cookie p { margin: 0; font-size: 13px; line-height: 1.4; }
.cookie button { background: transparent; color: #f7f2e8; border: 1px solid #d7c4a1; padding: 8px 12px; letter-spacing: .08em; text-transform: uppercase; font-size: 11px; }
