:root {
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #162b3e;
  background: #f5f8f8;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .66; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid #59c6b9; outline-offset: 3px; }

.shell { min-height: 100vh; display: flex; flex-direction: column; }
.demo-banner { padding: 9px 20px; background: #e8f5ef; color: #175f55; text-align: center; font-size: 12px; font-weight: 700; }
.topbar { min-height: 78px; padding: 0 max(36px, calc((100vw - 1320px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 24px; background: #fff; border-bottom: 1px solid #e6eeee; }
.brand { color: #102f3a; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 25px; letter-spacing: -.055em; white-space: nowrap; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; color: #fff; background: #0a7e75; box-shadow: 0 5px 15px #0c95832c; transform: rotate(-7deg); }
.brand-mark span { transform: rotate(7deg); font-size: 23px; letter-spacing: -.1em; margin-left: -2px; }
.brand-dot { color: #09a596; }
.topbar-note { color: #7d9098; font-size: 13px; }
.topbar-right { display: flex; align-items: center; gap: 20px; }
.topbar-company { font-size: 13px; color: #516b75; font-weight: 600; text-align: right; }
main { flex: 1; }
.footer { display: flex; justify-content: space-between; gap: 16px; padding: 22px max(36px, calc((100vw - 1320px) / 2)); color: #82929b; font-size: 12px; }

.login-layout { max-width: 1320px; margin: 0 auto; min-height: calc(100vh - 150px); padding: 70px 36px 80px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(390px, .75fr); gap: clamp(48px, 8vw, 130px); align-items: center; }
.login-intro { padding-bottom: 35px; }
.eyebrow { color: #087f75; font-size: 11px; font-weight: 800; letter-spacing: .14em; display: inline-flex; align-items: center; gap: 8px; }
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: #12ae99; box-shadow: 0 0 0 4px #d9f5ef; }
.login-intro h1 { margin: 28px 0 25px; font-size: clamp(43px, 4.6vw, 68px); line-height: 1.09; letter-spacing: -.065em; color: #113744; font-weight: 760; }
.login-intro .accent { color: #0a8e82; }
.login-intro > p { max-width: 610px; color: #5d737d; line-height: 1.75; font-size: 17px; }
.trust-row { display: flex; align-items: center; gap: 12px; margin-top: 52px; color: #49636c; font-size: 13px; }
.trust-icon { display: grid; place-items: center; flex: 0 0 30px; height: 30px; border-radius: 50%; background: #def5ee; color: #0a8b76; font-weight: 700; }
.login-card { background: #fff; border: 1px solid #e4eeee; border-radius: 22px; padding: clamp(28px, 3vw, 46px); box-shadow: 0 18px 55px #12394a0d, 0 2px 8px #12394a05; }
.card-kicker { color: #0b9386; letter-spacing: .14em; font-weight: 800; font-size: 11px; }
.login-card h2 { font-size: 30px; letter-spacing: -.04em; margin: 13px 0 4px; color: #173643; }
.muted { color: #778b95; line-height: 1.6; }
.login-card > p { font-size: 14px; margin: 0 0 30px; }
.login-card form { display: flex; flex-direction: column; }
.login-card label { font-size: 13px; font-weight: 700; color: #314d58; margin-bottom: 8px; }
.login-card input { width: 100%; height: 48px; padding: 0 15px; border: 1px solid #d9e5e7; border-radius: 10px; background: #fbfdfd; color: #193946; outline: 0; transition: border-color .15s, box-shadow .15s; }
.login-card input:focus { border-color: #26a899; box-shadow: 0 0 0 3px #c9f0e9; }
.login-card input::placeholder { color: #a9b8bd; }
.login-card input + label { margin-top: 20px; }
.field-hint { color: #91a0a8; font-size: 11px; line-height: 1.5; margin-top: 7px; }
.button { border: 0; border-radius: 10px; min-height: 42px; padding: 0 18px; font-size: 13px; font-weight: 700; transition: background .15s, transform .15s, border-color .15s; }
.button:active { transform: translateY(1px); }
.button-primary { color: #fff; background: #0a8d80; box-shadow: 0 6px 14px #0a8d8028; }
.button-primary:hover { background: #08776f; }
.button-outline { color: #23606a; background: #fff; border: 1px solid #cfe0e2; }
.button-outline:hover { background: #f2faf9; border-color: #8fc8c0; }
.button-subtle { color: #52717b; background: #eef5f5; }
.button-subtle:hover { background: #dfeeed; }
.login-submit { margin-top: 29px; min-height: 51px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 14px; }
.button-demo { display: block; width: 100%; min-height: 47px; margin-top: 16px; background: #e7f6f2; color: #116e63; border: 1px solid #bfe5dc; }
.button-demo:hover { background: #d9f0e9; }
.login-footnote { border-top: 1px solid #edf2f2; margin-top: 28px; padding-top: 21px; color: #94a4ac; font-size: 12px; line-height: 1.5; text-align: center; }
.message { padding: 11px 13px; border-radius: 9px; font-size: 13px; line-height: 1.5; }
.error { color: #a13c43; background: #fff0f0; border: 1px solid #f3d2d2; }
.login-card .error { margin: 16px 0 -10px; }

.dashboard { max-width: 1320px; padding: 49px 36px 75px; margin: 0 auto; }
.dashboard-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 30px; }
.dashboard-heading h1 { font-size: clamp(32px, 3vw, 42px); line-height: 1.2; letter-spacing: -.05em; margin: 13px 0 4px; }
.dashboard-heading p { font-size: 14px; margin: 0; }
.heading-actions { position: relative; width: 350px; max-width: 100%; }
.month-label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 700; color: #58727b; }
.month-controls { display: flex; align-items: center; gap: 7px; }
.month-arrow, .month-current, .month-refresh, .month-year-arrow { display: inline-flex; align-items: center; justify-content: center; border: 1px solid #d7e5e6; background: #fff; color: #1f4b57; box-shadow: 0 2px 8px #12394a08; }
.month-arrow, .month-refresh { flex: 0 0 40px; height: 42px; border-radius: 11px; }
.month-arrow { font-size: 26px; line-height: 1; padding-bottom: 4px; }
.month-current { flex: 1; min-width: 0; height: 42px; padding: 0 13px; border-radius: 11px; gap: 12px; justify-content: space-between; white-space: nowrap; font-weight: 700; font-size: 13px; }
.month-current #month-display { overflow: hidden; text-overflow: ellipsis; }
.month-chevron { width: 7px; height: 7px; flex: 0 0 7px; border-right: 1.5px solid #5f8790; border-bottom: 1.5px solid #5f8790; transform: rotate(45deg) translateY(-2px); }
.month-refresh { margin-left: 5px; background: #edf7f4; color: #0d786d; border-color: #d2e9e3; font-size: 22px; }
.month-arrow:hover, .month-current:hover, .month-year-arrow:hover { border-color: #8fc8c0; background: #f6fbfa; }
.month-refresh:hover { background: #dff1eb; }
.month-arrow:disabled, .month-year-arrow:disabled { opacity: .35; cursor: not-allowed; }
.month-picker { position: absolute; z-index: 10; right: 0; top: calc(100% + 10px); width: min(320px, calc(100vw - 30px)); padding: 15px; border: 1px solid #dce8e8; border-radius: 16px; background: #fff; box-shadow: 0 16px 45px #12394a1e; }
.month-picker-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-size: 14px; font-weight: 800; color: #173b46; }
.month-year-arrow { width: 31px; height: 31px; border-radius: 8px; font-size: 21px; line-height: 1; padding-bottom: 3px; }
.month-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.month-grid button { min-height: 37px; padding: 5px 2px; border: 0; border-radius: 8px; background: transparent; color: #4c6972; font-size: 12px; font-weight: 600; }
.month-grid button:hover { background: #eff8f6; color: #0a756c; }
.month-grid button[aria-pressed="true"] { background: #0a8d80; color: #fff; }
.summary-grid { display: grid; grid-template-columns: 1.18fr .9fr .9fr; gap: 17px; margin-bottom: 24px; }
.summary-card { background: #fff; border: 1px solid #e1ebed; border-radius: 17px; padding: 25px 27px; min-height: 154px; display: flex; flex-direction: column; box-shadow: 0 3px 12px #0b3b4805; }
.summary-primary { background: #0b756f; color: #fff; border-color: #0b756f; background-image: radial-gradient(circle at 95% -15%, #38bba659, transparent 45%); }
.summary-label { color: #7d9098; font-size: 12px; font-weight: 700; }
.summary-primary .summary-label { color: #c6eee7; }
.summary-value { font-size: clamp(31px, 3vw, 42px); line-height: 1.2; letter-spacing: -.055em; margin: 12px 0 auto; font-variant-numeric: tabular-nums; }
.summary-detail { font-size: 11px; color: #93a3aa; margin-top: 9px; }
.summary-primary .summary-detail { color: #bde3dc; }
.status-value { margin: 18px 0 auto; font-size: 17px; letter-spacing: -.02em; display: flex; gap: 9px; align-items: center; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #10aa86; box-shadow: 0 0 0 5px #e1f5ec; }
.invoice-panel { background: #fff; border: 1px solid #e1ebed; border-radius: 18px; box-shadow: 0 3px 13px #0b3b4806; overflow: hidden; }
.panel-heading { padding: 26px 28px 22px; display: flex; justify-content: space-between; align-items: start; gap: 15px; border-bottom: 1px solid #edf2f2; }
.panel-heading h2 { margin: 0 0 3px; font-size: 20px; letter-spacing: -.035em; }
.panel-heading p { margin: 0; font-size: 12px; }
.data-source { border: 1px solid #d4eae6; background: #f4fbf8; color: #328778; border-radius: 30px; padding: 7px 11px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.invoice-panel > .error, .invoice-panel > .loading { margin: 20px 27px; }
.loading { color: #6b848d; font-size: 13px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 860px; }
thead { background: #f9fbfb; }
th { color: #82939b; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-align: left; text-transform: uppercase; padding: 15px 19px; white-space: nowrap; }
td { padding: 17px 19px; border-top: 1px solid #f0f3f3; font-size: 12px; color: #415a65; vertical-align: middle; }
tbody tr:hover { background: #fbfdfd; }
.numeric { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.date-cell { white-space: nowrap; color: #728891; }
.invoice-number { display: block; color: #193b48; font-weight: 700; max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ksef-number { display: block; color: #9babb1; font-size: 10px; margin-top: 5px; max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seller-name { display: block; max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #274957; font-weight: 600; }
.seller-nip { display: block; color: #9babb1; font-size: 10px; margin-top: 5px; }
.negative { color: #bb5457; font-weight: 700; }
.empty-state { padding: 62px 24px 68px; text-align: center; }
.empty-icon { width: 52px; height: 52px; border-radius: 15px; margin: 0 auto 15px; display: grid; place-items: center; background: #e9f7f3; color: #39a494; font-size: 28px; }
.empty-state h3 { margin: 0 0 5px; font-size: 17px; }
.empty-state p { margin: 0; color: #879aa2; font-size: 13px; }
.panel-footer { min-height: 59px; padding: 10px 26px; border-top: 1px solid #edf2f2; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: #92a1a8; font-size: 11px; }
.dashboard-disclaimer { margin: 18px 3px 0; color: #93a3aa; font-size: 11px; line-height: 1.6; }
.startup { text-align: center; padding: 120px 20px; color: #758e97; font-size: 14px; }

@media (max-width: 1000px) {
  .login-layout { grid-template-columns: 1fr 430px; gap: 35px; }
  .login-intro h1 { font-size: 44px; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .status-card { grid-column: 1 / -1; min-height: 120px; }
}
@media (max-width: 760px) {
  .topbar { padding: 0 22px; min-height: 68px; }
  .topbar-note, .topbar-company { display: none; }
  .footer { padding: 20px 22px; }
  .login-layout { padding: 46px 22px 55px; grid-template-columns: 1fr; gap: 28px; align-items: start; }
  .login-intro { padding: 0; }
  .login-intro h1 { margin: 23px 0 16px; font-size: clamp(39px, 9vw, 53px); }
  .login-intro > p { font-size: 15px; }
  .trust-row { margin-top: 25px; }
  .dashboard { padding: 36px 22px 55px; }
  .dashboard-heading { align-items: start; flex-direction: column; }
  .summary-grid { grid-template-columns: 1fr; }
  .status-card { grid-column: auto; }
  .summary-card { min-height: 133px; }
  .panel-heading { padding: 21px 20px; }
}
@media (max-width: 470px) {
  .brand { font-size: 22px; }
  .brand-mark { width: 32px; height: 32px; }
  .login-card { padding: 28px 23px; }
  .dashboard { padding-left: 15px; padding-right: 15px; }
  .heading-actions { width: 100%; }
  .month-controls { gap: 4px; }
  .month-arrow, .month-refresh { flex-basis: 34px; height: 39px; }
  .month-current { height: 39px; padding: 0 9px; gap: 6px; font-size: 12px; }
  .month-refresh { margin-left: 0; }
  .data-source { display: none; }
}
