:root {
  --ink: #263349; --muted: #6f746f; --navy: #183653; --red: #b9574f; --paper: #f7f1df; --rule: rgba(104, 146, 168, 0.22);
}
* { box-sizing: border-box;
}
html { min-height: 100%;
}
body { min-height: 100vh; margin: 0; background: #d8d0bd; color: var(--ink); font-family: Georgia, "Times New Roman", serif;
}
button, input, textarea { font: inherit;
}
button { cursor: pointer;
}
a { color: inherit;
}
.hidden { display: none !important;
}
body:before { content: ""; position: fixed; inset: 0; z-index: -1; background: radial-gradient( circle at 20% 18%, rgba(255, 255, 255, 0.4), transparent 28% ), 
    repeating-linear-gradient(
      110deg, rgba(61, 48, 29, 0.025) 0 1px, transparent 1px 5px );
}
.site-header, footer { width: min(1180px, calc(100% - 48px)); margin: auto; display: flex; align-items: center; justify-content: space-between;
}
.site-header { padding: 28px 0;
}
.brand { display: flex; align-items: center; gap: 12px; border: 0; background: none; color: var(--navy); font: bold 21px Arial, sans-serif;
}
.brand-dot, .eyebrow { color: var(--red);
}
.text-button, .link-button, .back-button { border: 0; background: none; color: var(--navy); font-weight: bold;
}
.link-button:hover, .back-button:hover, .text-button:hover { text-decoration: underline;
}
main { padding: 24px 24px 52px;
}
.book { position: relative; width: min(100%, 640px); margin: auto; padding: 34px 42px 38px 72px; border: 1px solid #c5b997; border-radius: 4px 12px 12px 4px; background-color: 
  var(--paper); background-image: linear-gradient(
      90deg, transparent 0 45px, rgba(185, 87, 79, 0.72) 45px 47px, transparent 47px ), linear-gradient(var(--rule) 1px, transparent 1px), linear-gradient(90deg, var(--rule) 1px, 
    transparent 1px);
  background-size: 100% 100%, 0.5mm 0.5mm, 0.5mm 0.5mm; box-shadow: 16px 20px 45px rgba(53, 44, 29, 0.22), 2px 3px 0 #e5dcc3, 5px 6px 0 #bdb091;
}
.account-book:has(#login.active), .account-book:has(#recovery.active) { max-width: 440px;
}
.dashboard-book { width: min(100%, 1180px); min-height: 590px;
}
.book-spine { position: absolute; inset: 0 auto 0 0; width: 25px; display: flex; flex-direction: column; justify-content: space-around; align-items: center; padding: 30px 0; 
  background: linear-gradient(90deg, #11283f, #204766 65%, #132f49);
}
.book-spine i { width: 9px; height: 9px; border-radius: 50%; background: #b8ae96; box-shadow: inset 1px 1px 3px #0008, 0 0 0 3px #eee0bf42;
}
.ledger-meta { display: flex; justify-content: space-between; margin-bottom: 24px; padding-bottom: 8px; border-bottom: 3px double #26334988; color: #685f4e; font: bold 9px "Courier 
  New", monospace; letter-spacing: 0.13em;
}
.view { display: none;
}
.view.active { display: block; animation: enter 0.2s ease;
}
@keyframes enter { from { opacity: 0; transform: translateX(8px);
  }
}
h1 { margin: 0; color: var(--navy); font-size: 30px;
}
.view-heading { margin-bottom: 25px;
}
.view-heading p, .dashboard-heading p { color: var(--muted); line-height: 1.5;
}
.eyebrow { margin: 0 0 8px !important; font: bold 12px "Courier New", monospace !important; letter-spacing: 0.12em; text-transform: uppercase;
}
label { display: block; margin-bottom: 16px; color: var(--ink); font: bold 13px "Courier New", monospace;
}
input, textarea { display: block; width: 100%; margin-top: 7px; border: 1px solid #b5ac95; border-radius: 2px; outline: 0; background: #fffdf5c7; color: var(--ink);
}
input { height: 46px; padding: 0 13px;
}
textarea { padding: 12px; resize: vertical;
}
input:focus, textarea:focus { border-color: var(--navy); box-shadow: 0 0 0 3px #1836531f;
}
small { color: var(--muted); font-weight: normal;
}
.password-field { position: relative; display: block;
}
.password-field button { position: absolute; right: 10px; top: 50%; transform: translateY(-36%); border: 0; background: none; color: var(--navy); font-weight: bold;
}
.password-field input { padding-right: 60px;
}
.align-right { display: block; margin: -8px 0 18px auto;
}
.checkbox { display: flex; align-items: center; gap: 8px; color: var(--muted); font-family: Georgia, serif; font-weight: normal;
}
.checkbox input { width: 16px; height: 16px; margin: 0; accent-color: var(--navy);
}
.primary-button, .secondary-button { min-height: 46px; border: 0; border-radius: 3px; padding: 0 20px; font: bold 13px "Courier New", monospace;
}
.primary-button { width: 100%; background: var(--navy); color: white;
}
.primary-button:hover { background: #102a43;
}
.secondary-button { border: 1px solid #18365388; background: transparent; color: var(--navy);
}
.fit { width: auto;
}
.message { min-height: 18px; color: var(--muted); font-size: 12px; text-align: center;
}
.account-link { padding-top: 20px; border-top: 1px solid #6892a86b; color: var(--muted); font-size: 13px; text-align: center;
}
.back-button { display: block; margin: 18px auto 0;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px;
}
.wide { grid-column: 1/-1;
}
.dashboard-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 15px 0 28px;
}
.logsheet-list { border-top: 3px double #26334988;
}
.logsheet-row { display: grid; grid-template-columns: 38px minmax(220px, 1.5fr) 100px 190px 110px; gap: 16px; align-items: center; padding: 18px 6px; border-bottom: 1px solid 
  #6892a888;
}
.logsheet-row h2 { margin: 0 0 6px; color: var(--navy); font-size: 18px;
}
.logsheet-row p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4;
}
.log-number { color: var(--red); font: bold 12px "Courier New", monospace;
}
.detail-label { display: block; margin-bottom: 4px; color: #877c69; font: bold 9px "Courier New", monospace; text-transform: uppercase;
}
.coordinates { display: flex; gap: 14px; font: 13px "Courier New", monospace;
}
.map-link { color: var(--navy); font-size: 12px; font-weight: bold; text-decoration: none;
}
.map-link:hover { text-decoration: underline;
}
.form-actions { display: flex; justify-content: flex-end; gap: 12px;
}
footer { padding: 24px 0 28px; color: #6d7480; font: 12px Arial, sans-serif;
}
footer a { margin-left: 18px; text-decoration: none;
}
@media (max-width: 800px) { .dashboard-heading { align-items: stretch; flex-direction: column;
  }
  .fit { width: 100%;
  }
  .logsheet-row { grid-template-columns: 28px 1fr;
  }
  .logsheet-row > *:not(.log-number) { grid-column: 2;
  }
  .coordinates { flex-wrap: wrap;
  }
}
@media (max-width: 560px) { .site-header, footer { width: calc(100% - 32px);
  }
  main { padding: 15px 12px 36px;
  }
  .book { padding: 28px 18px 30px 50px;
  }
  .ledger-meta span:last-child { display: none;
  }
  .form-grid { grid-template-columns: 1fr;
  }
  .wide { grid-column: auto;
  }
  .form-actions { flex-direction: column-reverse;
  }
  .form-actions button { width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important;
  }
}
