:root {
    --bg-base: #f7f7f5; --bg-surface: #ffffff; --bg-hover: #f1efe6; --border-subtle: rgba(0,0,0,.09);
    --text-primary: #111; --text-muted: #6c6c67; --accent: #e0bf5e; --accent-subtle: #fbf3d6; --accent-text: #8a6a12;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg-base); color: var(--text-primary); font: 14px/1.5 'DM Sans', -apple-system, Arial, sans-serif; }
.shell { max-width: 1000px; margin: 0 auto; padding: 20px 16px 60px; }
.topnav { display: flex; align-items: center; gap: 4px; padding: 10px 16px; background: var(--bg-surface); border-bottom: 1px solid var(--border-subtle); flex-wrap: wrap; }
.topnav-logo { height: 34px; margin-right: 16px; }
.topnav a { padding: 8px 14px; border-radius: 8px; color: var(--text-primary); text-decoration: none; font-weight: 500; }
.topnav a:hover { background: var(--bg-hover); }
.topnav a.on { background: var(--accent-subtle); color: var(--accent-text); }
.topnav-out { margin-left: auto; color: var(--text-muted) !important; }
.card { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: 14px; padding: 18px; margin-bottom: 16px; }
h1 { font-size: 20px; margin: 0 0 4px; } .muted, .form-hint { color: var(--text-muted); font-size: 12.5px; }
.form-label { display: block; font-size: 12px; font-weight: 600; margin: 0 0 4px; color: var(--text-muted); }
.form-control { width: 100%; padding: 9px 11px; border: 1px solid rgba(0,0,0,.18); border-radius: 8px; background: #fff; font: inherit; color: inherit; }
.form-control:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
textarea.form-control { font-family: 'DM Mono', ui-monospace, Menlo, monospace; font-size: 12.5px; min-height: 180px; resize: vertical; word-break: break-all; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border: 1px solid var(--border-subtle); border-radius: 8px; background: var(--bg-surface); font: inherit; font-weight: 600; cursor: pointer; color: var(--text-primary); }
.btn:hover { background: var(--bg-hover); }
.btn-primary { background: #111; color: #fff; border-color: #111; } .btn-primary:hover { background: #333; }
.btn-sm { padding: 6px 12px; font-size: 13px; } .btn-ghost { border-color: transparent; background: transparent; }
.flex { display: flex; } .flex-between { justify-content: space-between; align-items: center; } .flex-gap-sm { gap: 8px; }
.wrap { flex-wrap: wrap; } .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } .mb-lg { margin-bottom: 16px; }
.alert { background: #fdecea; color: #a12a1f; padding: 9px 12px; border-radius: 8px; margin-bottom: 12px; font-size: 13px; }
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 16px; }
.login-card { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 6px; padding: 28px; }
.login-logo { height: 54px; align-self: center; margin-bottom: 14px; }
.login-card .btn { margin-top: 12px; }
.drop { border: 2px dashed rgba(0,0,0,.2); border-radius: 12px; padding: 22px; text-align: center; color: var(--text-muted); cursor: pointer; }
.drop.over { border-color: var(--accent); background: var(--accent-subtle); }
.preview { max-width: 100%; max-height: 220px; border-radius: 8px; border: 1px solid var(--border-subtle); display: none; margin-top: 10px; }
.tabs { display: inline-flex; gap: 2px; padding: 3px; background: var(--bg-hover); border-radius: 10px; margin-bottom: 14px; }
.tabs button { border: 0; background: transparent; padding: 7px 16px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; color: var(--text-muted); }
.tabs button.on { background: #fff; color: var(--text-primary); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.hidden { display: none !important; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } }
@media print { .no-print { display: none !important; } body { background: #fff; } .shell { padding: 0; max-width: none; } }
/* doc-body / toolbar classes used by the print page */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.card h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin: 16px 0 10px; }
.card h2:first-child { margin-top: 0; }
.calc { font-weight: 700; font-family: 'DM Mono', ui-monospace, Menlo, monospace; }
@media (max-width: 760px) { .grid3 { grid-template-columns: 1fr; } }
.pw-wrap { position: relative; }
.pw-wrap .form-control { padding-right: 42px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border: 0; background: transparent; color: var(--text-muted); cursor: pointer; border-radius: 8px; }
.pw-eye:hover { color: var(--text-primary); background: var(--bg-hover); }
.pw-eye svg { width: 20px; height: 20px; }
