:root {
  --ink: #171a24;
  --ink-soft: #252b39;
  --gold: #f4d06f;
  --gold-strong: #d6a93a;
  --gold-deep: #8c681c;
  --cream: #faf9f6;
  --surface: #ffffff;
  --border: #e8e6df;
  --muted: #737888;
  --green: #287a5a;
  --amber: #b97816;
  --red: #b84d4d;
  --shadow: 0 16px 44px rgba(23, 26, 36, .09);
  --radius: 18px;
}
* { box-sizing: border-box; }
html { background: var(--cream); }
body { margin: 0; color: var(--ink); background: var(--cream); font: 14px/1.45 Inter, system-ui, sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.eyebrow { margin: 0 0 10px; color: var(--gold-deep); font-size: 10px; font-weight: 800; letter-spacing: .14em; }

/* Login */
.login-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(340px, .95fr) minmax(460px, 1.05fr); }
.login-visual { position: relative; min-height: 100vh; overflow: hidden; padding: clamp(42px, 7vw, 94px); color: #fff; background: radial-gradient(circle at 78% 18%, #3c465c 0%, #222837 37%, #141823 86%); display: flex; flex-direction: column; justify-content: flex-end; }
.gold-orbit { position: absolute; border: 1px solid rgba(244,208,111,.23); border-radius: 50%; pointer-events: none; }
.orbit-one { width: 600px; height: 600px; right: -230px; top: -160px; }
.orbit-two { width: 370px; height: 370px; left: -190px; bottom: -170px; border-width: 32px; border-color: rgba(244,208,111,.07); }
.visual-copy, .visual-stats { position: relative; z-index: 1; }
.visual-copy .eyebrow { color: var(--gold); }
.visual-copy h2 { max-width: 520px; margin: 0 0 20px; font: 800 clamp(36px, 4vw, 58px)/1.08 Manrope, sans-serif; letter-spacing: -.05em; }
.visual-copy p { max-width: 390px; margin: 0; color: rgba(255,255,255,.72); font-size: 16px; line-height: 1.6; }
.login-panel { width: min(100%, 500px); padding: 48px clamp(32px, 7vw, 92px); margin: auto; display: flex; flex-direction: column; }
.security-chip { align-self: flex-start; padding: 7px 10px; color: #70500a; border-radius: 20px; background: #fff3d4; font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.brand-wordmark { margin: 28px 0 34px; color: var(--ink); font: 800 33px/1 Manrope, sans-serif; letter-spacing: -.06em; }
.brand-wordmark small { display: block; margin: 7px 0 0 2px; color: var(--gold-deep); font: 800 8px/1 Inter, sans-serif; letter-spacing: .16em; }
.brand-pin { color: var(--gold-strong); font-size: 30px; vertical-align: 4px; }
.login-head h1 { margin: 0 0 13px; font: 800 34px/1.16 Manrope, sans-serif; letter-spacing: -.04em; }
.login-head > p:last-child { margin: 0 0 24px; color: var(--muted); line-height: 1.65; }
.demo-password-label { display: block; margin: 12px 0 6px; color: var(--muted); font-size: 11px; font-weight: 750; }
.demo-password { width: 100%; min-height: 44px; padding: 0 12px; color: var(--ink); border: 1px solid var(--border); border-radius: 10px; background: var(--surface); outline: none; }
.demo-password:focus, .production-form input:focus { border-color: var(--gold-strong); box-shadow: 0 0 0 3px rgba(244,208,111,.28); }
.login-error { min-height: 17px; margin: 8px 0 0; color: var(--red); font-size: 12px; }
.login-foot { margin: 18px 0 0; color: var(--muted); font-size: 11px; text-align: center; }
.login-forgot { align-self: center; margin-top: 12px; font-size: 12px; }

/* Shared */
.btn { min-height: 44px; padding: 0 18px; border: 0; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-weight: 800; transition: .2s ease; }
.btn-primary { color: #251d0c; background: var(--gold); box-shadow: 0 8px 16px rgba(214,169,58,.2); }
.btn-primary:hover { background: #f9dd8b; transform: translateY(-1px); }
.btn-wide { width: 100%; }
.btn:disabled { cursor: wait; opacity: .65; transform: none; }

/* Dashboard */
.dashboard-shell { min-height: 100vh; background: var(--cream); }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 10; display: flex; flex-direction: column; width: 248px; padding: 28px 14px 18px; color: #fff; background: var(--ink); }
.brand-lockup { padding: 0 13px 25px; }
.sidebar-brand { color: var(--gold); font: 800 26px/1 Manrope, sans-serif; letter-spacing: -.06em; }
.sidebar-brand strong { color: #fff; }
.brand-lockup > span { display: block; margin: 5px 0 0 3px; color: rgba(255,255,255,.5); font-size: 9px; font-weight: 800; letter-spacing: .18em; }
.nav-menu { display: grid; gap: 5px; }
.nav-item { width: 100%; padding: 11px 13px; border: 0; border-radius: 10px; display: flex; gap: 12px; align-items: center; color: rgba(255,255,255,.67); background: transparent; font-weight: 650; text-align: left; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-item.active { color: #2a210c; background: var(--gold); }
.nav-symbol { width: 18px; text-align: center; font-size: 16px; }
.sidebar-bottom { margin-top: auto; }
.support-card { display: flex; gap: 9px; margin: 0 5px 16px; padding: 11px; border-radius: 12px; color: rgba(255,255,255,.87); background: rgba(244,208,111,.1); }
.support-icon { width: 21px; height: 21px; display: grid; place-items: center; flex: none; border-radius: 50%; color: #2d2614; background: var(--gold); font-weight: 800; }
.support-card b, .support-card small, .profile-mini b, .profile-mini small { display: block; }
.support-card b, .profile-mini b { font-size: 11px; }.support-card small, .profile-mini small { margin-top: 2px; color: rgba(255,255,255,.5); font-size: 10px; }
.profile-mini { display: flex; align-items: center; gap: 9px; padding: 14px 7px 0; border-top: 1px solid rgba(255,255,255,.11); }
.avatar { width: 38px; height: 38px; display: inline-grid; place-items: center; flex: none; border-radius: 50%; font-size: 11px; font-weight: 800; }
.avatar.gold { color: #5c4310; background: var(--gold); }
.icon-button { min-width: 32px; height: 32px; padding: 0; border: 0; border-radius: 9px; color: rgba(255,255,255,.7); background: transparent; font-weight: 700; }
.profile-mini .icon-button { margin-left: auto; }
.main-content { min-height: 100vh; padding-left: 248px; }
.topbar { position: sticky; top: 0; z-index: 8; min-height: 68px; padding: 0 36px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); background: rgba(250,249,246,.92); backdrop-filter: blur(14px); }
.crumb { display: flex; gap: 9px; align-items: center; color: var(--muted); font-size: 12px; }.crumb strong { color: var(--ink); }.crumb-dot { color: #c5c7cb; }
.top-actions { display: flex; gap: 10px; align-items: center; }.period-pill { padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; color: var(--muted); background: #fff; font-size: 11px; font-weight: 600; }
.top-avatar { border: 0; }.menu-toggle { display: none; }
.page-root { max-width: 1440px; padding: 35px 36px 48px; margin: auto; }
.page-title-row { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; }.page-title-row h1 { margin: 0; font: 800 28px/1.15 Manrope, sans-serif; letter-spacing: -.04em; }.page-title-row p { margin: 8px 0 0; color: var(--muted); }
.notice { display: flex; gap: 12px; align-items: center; padding: 13px 15px; margin-bottom: 22px; border: 1px solid #eedda5; border-radius: 12px; color: #785d1e; background: #fff9e9; font-size: 12px; }.notice b { color: #5d4612; }.notice-icon { width: 22px; height: 22px; display: grid; place-items: center; flex: none; border-radius: 50%; background: #f8e1a0; font-weight: 800; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }.kpi-card { position: relative; overflow: hidden; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }.kpi-card::before { content: ''; position: absolute; inset: 0 auto auto 0; width: 46px; height: 3px; background: var(--gold); }.kpi-label { color: var(--muted); font-size: 11px; font-weight: 700; }.kpi-value { display: block; margin: 11px 0 7px; font: 800 25px Manrope, sans-serif; letter-spacing: -.04em; }.kpi-meta { color: var(--green); font-size: 11px; font-weight: 700; }.kpi-meta.amber { color: var(--amber); }
.content-grid, .production-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: 18px; }
.content-grid { margin-top: 19px; }
.card { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 20px 16px; }.card-title { margin: 0; font: 700 15px Manrope, sans-serif; }.card-subtitle { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.accountant-link-card { padding-bottom: 20px; }.link-display { display: flex; gap: 7px; align-items: center; max-width: calc(100% - 40px); padding: 12px; margin: 0 20px; overflow: hidden; border: 1px solid rgba(214,169,58,.35); border-radius: 10px; color: #5d4612; background: #fff9e9; font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; }.link-display code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.security-note { display: flex; gap: 8px; align-items: flex-start; padding: 11px; margin: 14px 20px 0; border-radius: 10px; color: #7d6424; background: #fff9e9; font-size: 11px; line-height: 1.45; }
.empty-state { min-height: 230px; padding: 30px; display: grid; place-items: center; align-content: center; color: var(--muted); text-align: center; }.empty-art { width: 50px; height: 50px; margin-bottom: 11px; display: grid; place-items: center; border-radius: 50%; color: var(--gold-deep); background: #fff3d4; font-size: 22px; }.empty-state b { color: var(--ink); }.empty-state p { max-width: 300px; margin: 7px 0 0; font-size: 12px; line-height: 1.55; }
.timeline { padding: 0 20px 20px; }.timeline-item { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: center; padding: 11px 0; }.timeline-item:not(:last-child)::after { content: ''; position: absolute; top: 33px; left: 13px; width: 1px; height: 18px; background: var(--border); }.timeline-dot { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; color: var(--gold-deep); background: #fff3d4; font-size: 12px; }.timeline-item.success .timeline-dot { color: var(--green); background: #eaf5ef; }.timeline-copy b, .timeline-copy small { display: block; }.timeline-copy b { font-size: 12px; }.timeline-copy small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.production-grid { margin-top: 4px; }.form-card { padding-bottom: 20px; }.production-form { display: grid; gap: 14px; padding: 0 20px; }.production-form label { display: grid; gap: 7px; color: var(--ink); font-size: 12px; font-weight: 750; }.production-form input { width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; color: var(--ink); background: #fff; outline: none; font-size: 13px; }.field-optional { color: var(--muted); font-size: 10px; font-weight: 500; }.info-button { display: inline-grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 1px solid #d7b85d; border-radius: 50%; color: #6e5212; background: #fff7df; font-size: 11px; font-weight: 800; }.table-wrap { overflow: auto; }.data-table { width: 100%; min-width: 620px; border-collapse: collapse; }.data-table th { padding: 10px 20px; border-block: 1px solid var(--border); color: var(--muted); background: #fcfbf8; font-size: 10px; text-align: left; text-transform: uppercase; letter-spacing: .06em; }.data-table td { padding: 14px 20px; border-bottom: 1px solid #f0eee9; font-size: 12px; }.table-person { display: flex; gap: 9px; align-items: center; font-weight: 700; }.table-person small { display: block; margin-top: 3px; color: var(--muted); font-weight: 400; }.mini-avatar { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 9px; color: #4b3b14; background: #f5e7b5; font-size: 9px; font-weight: 800; }.status { display: inline-flex; gap: 5px; align-items: center; padding: 5px 8px; border-radius: 14px; font-size: 10px; font-weight: 800; }.status::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }.status.green { color: var(--green); background: #eaf5ef; }.status.amber { color: var(--amber); background: #fcf3de; }.link-inline { border: 0; color: var(--gold-deep); background: transparent; font-size: 11px; font-weight: 800; }.table-code { display: inline-block; max-width: 190px; overflow: hidden; color: var(--gold-deep); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.toast { position: fixed; right: 28px; bottom: 25px; z-index: 30; opacity: 0; transform: translateY(14px); pointer-events: none; padding: 12px 15px; border-radius: 10px; color: #fff; background: var(--ink); box-shadow: var(--shadow); font-size: 12px; transition: .2s ease; }.toast.show { opacity: 1; transform: translateY(0); }.toast.error { background: var(--red); }
.modal-overlay { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 20px; background: rgba(20,24,35,.48); }.modal { width: min(100%, 430px); padding: 24px; border-radius: 18px; background: #fff; box-shadow: var(--shadow); }.modal h2 { margin: 0 0 9px; font: 800 20px Manrope, sans-serif; }.modal p { color: var(--muted); line-height: 1.55; }.auth-modal-form { display: grid; gap: 12px; }.auth-modal-form label { display: grid; gap: 7px; color: var(--ink); font-size: 12px; font-weight: 750; }.auth-modal-form input { width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; outline: none; }.auth-modal-form input:focus { border-color: var(--gold-strong); box-shadow: 0 0 0 3px rgba(244,208,111,.28); }.modal-actions { display: flex; gap: 9px; justify-content: flex-end; margin-top: 8px; }.btn-secondary { color: var(--ink); background: #f0eee8; }.modal-success { padding: 12px; border-radius: 10px; color: var(--green) !important; background: #eaf5ef; }
@media (max-width: 1050px) { .kpi-grid { grid-template-columns: repeat(2,1fr); } .login-screen { grid-template-columns: .8fr 1fr; } }
@media (max-width: 760px) { .login-screen { display: block; }.login-visual { min-height: 250px; padding: 32px 28px; }.visual-copy h2 { font-size: 34px; }.visual-stats, .visual-copy p { display: none; }.login-panel { min-height: calc(100vh - 250px); padding: 34px 24px; }.sidebar { left: -260px; width: 246px; transition: left .24s ease; box-shadow: 18px 0 35px rgba(0,0,0,.15); }.sidebar.open { left: 0; }.main-content { padding-left: 0; }.topbar { padding: 0 18px; }.menu-toggle { width: 34px; height: 34px; padding: 0; margin-right: 10px; display: inline-grid; place-items: center; border: 0; border-radius: 8px; color: var(--ink); background: #f0eee8; }.crumb { margin-right: auto; }.period-pill { display: none; }.page-root { padding: 25px 18px 42px; }.page-title-row { flex-direction: column; align-items: flex-start; margin-bottom: 20px; }.page-title-row h1 { font-size: 25px; }.kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }.kpi-card { padding: 15px; }.kpi-value { font-size: 21px; }.content-grid, .production-grid { grid-template-columns: 1fr; }.data-table { min-width: 570px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }

.modal-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.modal-head h2 { margin-right: auto; }
.modal-close { width: 34px; height: 34px; padding: 0; border: 0; border-radius: 9px; color: var(--muted); background: #f0eee8; font-size: 24px; line-height: 1; }
.modal-close:hover { color: var(--ink); background: #e7e4dc; }
.info-modal { width: min(100%, 520px); }
.info-modal p { margin: 16px 0 0; white-space: pre-wrap; }
.search-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 0 20px 18px; }
.search-form input { min-width: 240px; min-height: 42px; flex: 1; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; color: var(--ink); background: #fff; outline: none; }
.search-form input:focus { border-color: var(--gold-strong); box-shadow: 0 0 0 3px rgba(244,208,111,.28); }
.search-form .btn { min-height: 42px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
