﻿:root {
  --bg: #eef2f7;
  --panel: #ffffff;
  --ink: #18263b;
  --muted: #5f6f86;
  --line: #c9d3e2;
  --brand: #1f4f7a;
  --brand-2: #2c679b;
  --accent: #d4af37;
  --ok: #0f5e31;
  --warn: #8a4b00;
  --err: #7f1d1d;
  --suggest: #e8f1ff;
  --shadow: 0 8px 20px rgba(24, 38, 59, 0.08);
  --shadow-soft: 0 3px 8px rgba(24, 38, 59, 0.06);
}

* {
  box-sizing: border-box;
  border-radius: 0 !important;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Manrope", "Segoe UI", Tahoma, sans-serif;
  color: var(--ink);
  background: #edf2f8;
}

body {
  min-height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("assets/branding/faktino-back.png") center bottom / cover no-repeat;
  opacity: 0.5;
  z-index: 0;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.22) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.22) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.14) 0 1px, transparent 1px 18px);
  z-index: 0;
  pointer-events: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

.app-shell {
  min-height: 100vh;
  padding-top: 60px;
  padding-bottom: 14px;
  position: relative;
  z-index: 1;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f5f8fc 100%);
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-soft);
}

.top-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #173c61;
  white-space: nowrap;
}

.brand-logo {
  height: 28px;
  width: auto;
  display: block;
}

.brand-btn {
  border: 0;
  background: transparent;
  padding: 4px 12px 4px 2px;
  margin-right: 2px;
  border-right: 1px solid #c6d3e3;
  box-shadow: none;
  cursor: pointer;
  font-size: 16px;
}

.brand-btn:hover {
  background: transparent;
  color: #245f94;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: auto;
  padding-bottom: 2px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.top-actions .btn,
.user-menu .btn {
  background: linear-gradient(180deg, #ffffff 0%, #f3f7fd 100%);
  color: #163a5d;
  border-color: #b9c9dc;
  font-size: 12px;
  padding: 6px 9px;
  box-shadow: 0 3px 8px rgba(18, 45, 76, 0.12);
}

.top-actions .btn:hover,
.user-menu .btn:hover {
  background: linear-gradient(180deg, #2e649c 0%, #23507f 100%);
  color: #ffffff;
  border-color: #2c6aa4;
  box-shadow: 0 8px 16px rgba(14, 38, 64, 0.28), 0 0 0 2px rgba(120, 181, 255, 0.22);
}

.user-menu-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.user-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 220px;
  border: 1px solid #b8c7db;
  background: #f7fbff;
  box-shadow: 0 10px 24px rgba(18, 38, 61, 0.2);
  padding: 6px;
  display: grid;
  gap: 6px;
  z-index: 60;
}

.user-menu-btn {
  width: 100%;
  text-align: left;
}

.mobile-menu-toggle {
  display: none;
}

.badge-plan {
  background: var(--brand);
  color: #fff;
  padding: 3px 8px;
  font-size: 12px;
  text-transform: uppercase;
}

.badge-plan-btn {
  border: 1px solid #1f4f7a;
  cursor: pointer;
}

.plan-mascot {
  display: inline-block;
  margin-right: 6px;
  font-weight: 700;
  opacity: 0.95;
}

.main-area {
  height: auto;
  overflow: visible;
  padding: 12px;
}

.screen {
  height: auto;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(249, 251, 255, 0.9) 100%);
  overflow: visible;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.screen-scroll {
  overflow: visible;
  padding: 12px;
  height: auto;
}

.btn {
  border: 1px solid #1a3e66;
  background: linear-gradient(180deg, #244f7d 0%, #1c3e63 100%);
  color: #ffffff;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 8px 16px rgba(15, 33, 54, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.12s ease;
}

.btn-mini {
  padding: 4px 8px;
  font-size: 12px;
}

.btn-danger-text {
  color: #ffd9d9;
}

.btn-danger-text:hover {
  color: #fff2f2;
}

.btn:hover {
  background: linear-gradient(180deg, #2e649c 0%, #23507f 100%);
  border-color: #2c6aa4;
  box-shadow: 0 10px 20px rgba(14, 38, 64, 0.34), 0 0 0 2px rgba(120, 181, 255, 0.25);
  transform: translateY(-1px);
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(175, 222, 255, 0.3), rgba(175, 222, 255, 0) 60%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  z-index: 0;
}

.btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -40%;
  width: 30%;
  height: 100%;
  background: linear-gradient(110deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0));
  transform: skewX(-20deg);
  opacity: 0;
  transition: left 0.24s ease, opacity 0.24s ease;
  pointer-events: none;
  z-index: 0;
}

.btn:hover::before {
  opacity: 1;
}

.btn:hover::after {
  left: 78%;
  opacity: 1;
}

.btn > * {
  position: relative;
  z-index: 1;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn:disabled::before,
.btn:disabled::after {
  display: none;
}

.btn-nav {
  padding: 6px 9px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(180deg, #1f4a75 0%, #17385b 100%);
  border-color: #173f68;
}

.btn-nav.is-active {
  background: linear-gradient(180deg, #3a78b3 0%, #285c90 100%);
  border-color: #2b68a3;
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(16, 47, 80, 0.38), 0 0 0 2px rgba(146, 201, 255, 0.32);
}

.nav-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  opacity: 1;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.45);
}

.ico-svg {
  width: 1em;
  height: 1em;
  display: inline-block;
  fill: currentColor;
}

.nav-svg {
  width: 15px;
  height: 15px;
}

.btn-primary {
  background: linear-gradient(180deg, #2e6ea8 0%, #215888 100%);
  color: #fff;
  border-color: #245f95;
}

.btn-primary:hover {
  background: linear-gradient(180deg, #3c82c2 0%, #2b679f 100%);
}

.invoice-toolbar-btn {
  min-height: 32px;
}

.invoice-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.invoice-action-btn {
  padding: 4px 8px;
  font-size: 12px;
  min-height: 28px;
}

.invoice-action-open {
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.invoice-action-open:hover {
  letter-spacing: 0.04em;
}

/* Invoice editor action tones (normal state differentiation) */
#line-add {
  background: linear-gradient(180deg, #50607a 0%, #3f4d63 100%);
  border-color: #4f607c;
}

#inv-save,
#inv-save-top {
  background: linear-gradient(180deg, #0f6a47 0%, #0b573b 100%);
  border-color: #1a7a56;
}

#inv-save-send,
#inv-save-send-top {
  background: linear-gradient(180deg, #1f6b92 0%, #165678 100%);
  border-color: #2a7ea8;
}

#inv-save-recurring,
#inv-save-recurring-top {
  background: linear-gradient(180deg, #66528a 0%, #534174 100%);
  border-color: #735ea0;
}

#inv-share,
#inv-share-top {
  background: linear-gradient(180deg, #8a5a1f 0%, #734915 100%);
  border-color: #9a6a2d;
}

#inv-pdf,
#inv-pdf-top {
  background: linear-gradient(180deg, #2a4f7a 0%, #203f61 100%);
  border-color: #345f8f;
}

#inv-mark-paid,
#inv-mark-paid-top {
  background: linear-gradient(180deg, #0f7a50 0%, #0c6341 100%);
  border-color: #188961;
}

.btn-ghost {
  background: linear-gradient(180deg, #3a424e 0%, #2f3743 100%);
  border-color: #2d3440;
  color: #fff;
}

.login-wrap {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 96px);
}

.login-main {
  padding: 0;
}

.login-shell {
  padding: 16px 14px 10px;
}

.login-shell-grid {
  width: min(1320px, calc(100vw - 28px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 430px);
  gap: 20px;
  align-items: stretch;
}

.login-shell-content {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.login-shell-sidebar {
  min-width: 0;
}

.login-hero {
  min-height: auto;
  display: block;
  padding: 0;
}

.login-shell-grid > * {
  min-height: 0;
}

.login-cards-stack {
  width: 100%;
  margin: 0 auto;
}

.login-hero-grid-split {
  align-items: stretch;
}

.login-auth-pane {
  display: grid;
  align-items: center;
  justify-items: stretch;
  position: sticky;
  top: 16px;
  min-height: calc(100vh - 32px);
  padding: 28px;
  border: 1px solid rgba(24, 56, 90, 0.12);
  background: linear-gradient(180deg, rgba(241, 246, 252, 0.96) 0%, rgba(230, 238, 248, 0.96) 100%);
  box-shadow: 0 24px 56px rgba(12, 31, 53, 0.14);
}

.login-promo-pane {
  display: grid;
  grid-template-rows: auto minmax(220px, 1fr);
  gap: 24px;
  min-height: 100%;
  padding: 36px 40px;
  position: relative;
  border: 1px solid rgba(24, 56, 90, 0.08);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.8) 38%, rgba(238, 245, 252, 0.95) 100%),
    linear-gradient(180deg, rgba(245, 249, 254, 0.96) 0%, rgba(231, 240, 249, 0.97) 100%);
  box-shadow: 0 18px 40px rgba(12, 31, 53, 0.08);
  overflow: hidden;
  min-height: calc(100vh - 92px);
}

.login-promo-pane::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("assets/bgl.png") left top / cover no-repeat;
  opacity: 0.3;
  pointer-events: none;
}

.login-promo-copy {
  display: grid;
  align-content: start;
  gap: 14px;
  max-width: 40rem;
  position: relative;
  z-index: 1;
}

.login-promo-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #5a7791;
}

.login-promo-title {
  margin: 0;
  color: #143b60;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 0.94;
  letter-spacing: 0.05em;
}

.login-promo-text {
  margin: 0;
  color: #244b6f;
  font-size: 20px;
  line-height: 1.55;
}

.login-promo-list {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  color: #2d567b;
}

.login-promo-list li {
  position: relative;
  padding-left: 20px;
  line-height: 1.45;
}

.login-promo-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(180deg, #1f6aa5 0%, #184c78 100%);
}

.login-promo-cta {
  min-width: 0;
}

.login-promo-art {
  display: none;
}

.login-scroll-cta-wrap {
  display: flex;
  justify-content: center;
  padding: 8px 0 14px;
}

.login-scroll-cta {
  min-width: 280px;
}

.login-card {
  width: min(440px, 96vw);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 16px;
  box-shadow: var(--shadow);
}

.login-card-compact {
  width: 100%;
  max-width: 430px;
  padding: 20px;
  border: 1px solid rgba(185, 202, 221, 0.9);
  box-shadow: 0 20px 40px rgba(14, 35, 59, 0.12);
}

.global-app-loader {
  position: fixed;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.28);
  z-index: 120;
}

.global-app-loader.is-visible {
  display: flex;
}

.global-app-loader-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-top-color: #ffffff;
  border-radius: 50% !important;
  animation: global-app-loader-spin 0.75s linear infinite;
}

@keyframes global-app-loader-spin {
  to {
    transform: rotate(360deg);
  }
}

.login-scroll-cta-wrap-inline {
  justify-content: flex-start;
  padding: 18px 0 0;
}

.login-link-row {
  margin-top: 10px;
  font-size: 14px;
}

.login-wrap .login-card h2 {
  margin: 0 0 10px;
  color: #173f67;
  font-size: 30px;
}

.login-wrap .login-card h3 {
  margin: 14px 0 10px;
}

.login-wrap .login-card p,
.login-wrap .login-card small {
  line-height: 1.45;
}

.login-mode {
  margin-bottom: 12px;
}

#login-auth-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 249, 255, 0.98) 100%);
}

.login-link-row a {
  color: #1f4f7a;
  text-decoration: underline;
  font-weight: 600;
}

.login-link-row a:hover {
  color: #2a6aa5;
}

.landing-about,
.pricing-compare {
  width: min(1240px, calc(100vw - 24px));
  margin: 0 auto 12px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(247, 251, 255, 0.95) 100%);
  box-shadow: var(--shadow);
  padding: 16px;
}

.login-shell .landing-about {
  width: auto;
  margin: 0;
}

.pricing-compare h2 {
  margin: 0 0 10px;
}

.landing-about {
  padding: 28px 30px 34px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.96), rgba(243, 248, 254, 0.93) 48%, rgba(234, 242, 251, 0.96) 100%);
}

.landing-story,
.landing-flow-block,
.landing-modules-block {
  max-width: 960px;
}

.landing-flow-block,
.landing-modules-block {
  margin-top: 34px;
}

.landing-story-kicker,
.landing-section-kicker {
  margin: 0 0 10px;
  font-family: "Caveat", cursive;
  font-size: 28px;
  font-weight: 700;
  color: #4b7ca2;
  letter-spacing: 0.02em;
}

.landing-story h2,
.landing-section-head h3 {
  margin: 0;
  font-family: "DM Serif Display", Georgia, serif;
  color: #14324f;
  line-height: 1.08;
}

.landing-story h2 {
  font-size: clamp(34px, 4vw, 52px);
  max-width: 13ch;
}

.landing-story p,
.landing-step-copy p,
.landing-module-card p {
  margin: 0;
  color: #34516e;
  font-size: 18px;
  line-height: 1.8;
}

.landing-story p + p {
  margin-top: 16px;
}

.landing-story-note {
  margin-top: 22px;
  max-width: 42rem;
  padding: 18px 22px;
  border: 1px solid rgba(76, 120, 157, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(237, 245, 252, 0.9) 100%);
  color: #234667;
  box-shadow: 0 12px 28px rgba(20, 50, 79, 0.08);
}

.landing-section-head {
  margin-bottom: 18px;
}

.landing-section-head h3 {
  font-size: clamp(28px, 3vw, 40px);
}

.landing-steps {
  display: grid;
  gap: 16px;
}

.landing-step {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding: 22px 24px;
  border: 1px solid rgba(112, 145, 178, 0.18);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 34px rgba(15, 39, 65, 0.06);
}

.landing-step-no {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 0 !important;
  background: linear-gradient(180deg, #2f70b8 0%, #1e4c80 100%);
  color: #fff;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 30px;
  box-shadow: 0 12px 24px rgba(31, 79, 142, 0.24);
}

.landing-step-copy h4,
.landing-module-card h4 {
  margin: 0 0 8px;
  color: #173a5f;
}

.landing-step-copy h4 {
  font-size: 22px;
}

.landing-module-list {
  display: grid;
  gap: 14px;
}

.landing-module-card {
  position: relative;
  padding: 26px 26px 24px;
  border: 1px solid rgba(118, 146, 173, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(241, 247, 253, 0.92) 100%);
  box-shadow: 0 16px 34px rgba(15, 39, 65, 0.06);
}

.landing-module-card h4 {
  font-size: 24px;
  letter-spacing: 0.06em;
  padding-right: 120px;
}

.landing-module-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(20, 50, 79, 0.18);
}

.landing-module-badge-free { background: linear-gradient(180deg, #66768a 0%, #475567 100%); }
.landing-module-badge-basic { background: linear-gradient(180deg, #2b9a56 0%, #1c7041 100%); }
.landing-module-badge-pro { background: linear-gradient(180deg, #2f74cb 0%, #1e4e90 100%); }
.landing-module-badge-enterprise { background: linear-gradient(180deg, #8662d7 0%, #603ea8 100%); }

.landing-module-card:hover .landing-module-badge,
.landing-module-badge:hover {
  transform: translateY(-1px);
}

.login-plan-picker {
  display: grid;
  gap: 6px;
  color: #22486d;
  font-weight: 700;
}

.login-plan-help {
  color: #597692;
}

.pricing-table-scroll {
  max-height: calc(100vh - 170px);
  overflow: auto;
  border: 1px solid #c4d1e2;
  background: #f9fbff;
}

.pricing-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 980px;
}

.pricing-table th,
.pricing-table td {
  border-bottom: 1px solid #d3dceb;
  border-right: 1px solid #d3dceb;
  padding: 10px 10px;
  vertical-align: top;
  background: #ffffff;
}

.pricing-table th:last-child,
.pricing-table td:last-child {
  border-right: 0;
}

.pricing-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
}

.cmp-param-head,
.cmp-param {
  position: sticky;
  left: 0;
  z-index: 3;
  background: #f0f5fd !important;
  min-width: 260px;
  max-width: 340px;
  font-weight: 600;
}

.cmp-param-head {
  z-index: 6;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #294768;
}

.cmp-plan-head {
  min-width: 180px;
  text-align: center;
  color: #fff;
}

.cmp-free { background: linear-gradient(180deg, #4f637a 0%, #384759 100%) !important; }
.cmp-basic { background: linear-gradient(180deg, #2a9a48 0%, #1f6f34 100%) !important; }
.cmp-pro { background: linear-gradient(180deg, #2d6dbe 0%, #1f4f8e 100%) !important; }
.cmp-enterprise { background: linear-gradient(180deg, #6f55b6 0%, #4c3782 100%) !important; }

.cmp-plan-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.cmp-plan-price {
  font-size: 15px;
  margin: 4px 0 8px;
}

.cmp-yes {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  color: #0f6a2d;
  font-weight: 800;
  font-size: 22px;
  line-height: 1;
}

.cmp-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  color: #b42318;
  font-weight: 800;
  font-size: 22px;
  line-height: 1;
}

.login-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.form-grid {
  display: grid;
  gap: 8px;
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid #b8c5d8;
  padding: 7px 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 1px 3px rgba(21, 40, 62, 0.12);
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: #8fa7c6;
  box-shadow: 0 0 0 2px rgba(92, 130, 173, 0.15);
}

.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.dashboard-grid {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-content: stretch;
}

.dashboard-screen {
  height: calc(100vh - 98px);
  padding: 12px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
}

.dashboard-meta {
  display: flex;
  align-items: baseline;
  gap: 10px;
  border: 1px solid #c7d3e3;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.92) 0%, rgba(237, 244, 255, 0.92) 100%);
  box-shadow: var(--shadow-soft);
  padding: 8px 12px;
  margin-bottom: 0;
}

.dashboard-meta-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dashboard-meta-value {
  font-size: 18px;
  font-weight: 700;
  color: #1d4d78;
  text-transform: capitalize;
}

.dashboard-meta-inline {
  font-size: 12px;
  color: #3a536f;
  margin-left: 6px;
}

.dashboard-meta-inline strong {
  color: #1d3c5a;
}

.dashboard-meta-date {
  margin-left: auto;
  font-weight: 600;
  color: #22364f;
}

.tile {
  border: 1px solid #c7d3e3;
  background-color: #f4f8fe;
  background-image: linear-gradient(160deg, #ffffff 0%, #f1f6fd 100%);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  position: relative;
  min-width: 0;
  min-height: 0;
}

.tile[data-go="new-invoice"] {
  background-image: linear-gradient(160deg, rgba(255, 255, 255, 0.8) 0%, rgba(241, 246, 253, 0.8) 100%), url("assets/dashboard/tile-new-invoice.png");
  background-size: cover, 82% auto;
  background-position: center, right 8px bottom 8px;
}

.tile[data-go="invoices"] {
  background-image: linear-gradient(160deg, rgba(255, 255, 255, 0.8) 0%, rgba(241, 246, 253, 0.8) 100%), url("assets/dashboard/tile-invoices.png");
  background-size: cover, 82% auto;
  background-position: center, right 8px bottom 8px;
}

.tile[data-go="customers"] {
  background-image: linear-gradient(160deg, rgba(255, 255, 255, 0.8) 0%, rgba(241, 246, 253, 0.8) 100%), url("assets/dashboard/tile-customers.png");
  background-size: cover, 82% auto;
  background-position: center, right 8px bottom 8px;
}

.tile[data-go="exports"] {
  background-image: linear-gradient(160deg, rgba(255, 255, 255, 0.8) 0%, rgba(241, 246, 253, 0.8) 100%), url("assets/dashboard/tile-exports.png");
  background-size: cover, 82% auto;
  background-position: center, right 8px bottom 8px;
}

.tile[data-go="calendar"] {
  background-image: linear-gradient(160deg, rgba(255, 255, 255, 0.8) 0%, rgba(241, 246, 253, 0.8) 100%), url("assets/dashboard/tile-calendar.png");
  background-size: cover, 82% auto;
  background-position: center, right 8px bottom 8px;
}

.tile[data-go="settings"] {
  background-image: linear-gradient(160deg, rgba(255, 255, 255, 0.8) 0%, rgba(241, 246, 253, 0.8) 100%), url("assets/dashboard/tile-settings.png");
  background-size: cover, 82% auto;
  background-position: center, right 8px bottom 8px;
}

.tile:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(31, 79, 122, 0.18);
}

.tile-icon {
  color: #214f79;
  line-height: 1;
}

.tile-svg {
  width: 34px;
  height: 34px;
}

.menu-svg {
  width: 14px;
  height: 14px;
  margin-right: 4px;
  vertical-align: -2px;
}

.tile h3 {
  margin: 0;
}

.tile p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.tile-bank {
  margin-top: 8px;
  display: grid;
  gap: 3px;
}

.tile-bank small {
  font-size: 12px;
  color: #2b4b6d;
}

.tile-bank-warn small {
  color: #7a3f00;
}

.tile-bank-error {
  font-weight: 700;
}

.tile-bank-locked small {
  color: #617389;
}

.tile-due {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}

.tile-due-empty {
  margin-top: 10px;
  font-size: 12px;
  color: #36506d;
  font-weight: 600;
}
.onboarding-box {
  border-color: #b9d7ff;
  background: linear-gradient(135deg, #eef6ff 0%, #f8fbff 100%);
}
.onboarding-box .btn {
  margin-top: 8px;
}

.supplier-setup-alert {
  border-color: #e4b24e;
  background: linear-gradient(180deg, #fff7e7 0%, #fff1d4 100%);
  color: #6b3e00;
  font-size: 14px;
  line-height: 1.3;
  padding: 7px 10px;
  min-height: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 191, 72, 0.35);
}

.supplier-setup-alert strong {
  color: #9a4f00;
}

.supplier-setup-alert::before {
  content: "⚠ ";
  color: #d67d00;
  font-weight: 800;
  margin-right: 2px;
}

.tile-due-day {
  border: 1px solid #c7d3e3;
  background: #f6f9ff;
  padding: 6px;
}

.tile-due-head {
  font-size: 12px;
  font-weight: 700;
  color: #1c4c77;
  margin-bottom: 3px;
}

.tile-due-day ul {
  margin: 0;
  padding-left: 16px;
  font-size: 12px;
  line-height: 1.25;
}

.tile-due-total {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 700;
}

.tile-metric {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 26px;
  padding: 2px 6px;
  border: 1px solid #9eb5cf;
  background: linear-gradient(180deg, #f6faff 0%, #e5f0ff 100%);
  color: #184772;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.stats-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.stats-cards {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
  gap: 8px;
}

.stats-card {
  border: 1px solid #c8d6e8;
  background: linear-gradient(180deg, #ffffff 0%, #f4f9ff 100%);
  padding: 8px;
  box-shadow: var(--shadow-soft);
}

.stats-card small {
  display: block;
  color: #516983;
  margin-bottom: 4px;
}

.stats-card strong {
  font-size: 16px;
  color: #123c67;
}

.profile-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.profile-cards {
  margin-top: 8px;
}

.profile-trial-banner {
  margin-top: 10px;
  border-left: 5px solid #1b6ca5;
  background: #e8f4ff;
  color: #103d61;
}

.stats-legend {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13px;
}

.stats-dot {
  width: 12px;
  height: 12px;
  display: inline-block;
  margin-right: 6px;
  vertical-align: -1px;
}

.stats-dot-issued { background: #4f79c9; }
.stats-dot-paid { background: #2d9f56; }

.stats-chart-wrap {
  overflow-x: auto;
  border: 1px solid #d2deee;
  background: #fbfdff;
  padding: 10px;
}

.stats-chart {
  min-height: 260px;
  min-width: 780px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 34px;
  gap: 8px;
  align-items: end;
}

.stats-col {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 6px;
}

.stats-col-bars {
  height: 210px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 3px;
}

.stats-bar {
  width: 12px;
  min-height: 2px;
}

.stats-bar-issued { background: linear-gradient(180deg, #8cadf2 0%, #4f79c9 100%); }
.stats-bar-paid { background: linear-gradient(180deg, #72d197 0%, #2d9f56 100%); }

.stats-col-label {
  font-size: 10px;
  color: #35516f;
  text-align: center;
  white-space: nowrap;
}

.invoice-layout {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 100%;
}

.invoice-number-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #cad7e7;
  background: #f4f8ff;
  padding: 7px 10px;
  box-shadow: var(--shadow-soft);
}

.invoice-number-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.invoice-top-pairs .invoice-card {
  background: #eef1f4;
}

.invoice-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.invoice-supplier-summary {
  display: grid;
  gap: 8px;
  line-height: 1.45;
}

.supplier-name {
  font-size: 30px;
  font-weight: 700;
}

.invoice-form-lines {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 6px 8px;
  align-items: center;
}

.invoice-form-lines label {
  text-align: right;
  font-weight: 600;
  color: #2f3d51;
}

.invoice-form-lines-dates {
  grid-template-columns: 170px 1fr;
}

.invoice-note-wrap {
  display: grid;
  gap: 4px;
}

.invoice-bottom-zone {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 12px;
  align-items: start;
}

.invoice-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.invoice-number-right > .btn,
.invoice-actions > .btn {
  padding: 6px 9px;
  font-size: 12px;
}

.share-box {
  border-color: #93bde6;
  background: linear-gradient(180deg, #eef7ff 0%, #e6f2ff 100%);
}

.share-url {
  display: inline-block;
  margin-top: 4px;
  word-break: break-all;
  color: #123e73;
  font-weight: 600;
}

.shared-badge {
  display: inline-block;
  margin-top: 2px;
  color: #1b5f9b;
  font-weight: 700;
}

.invoice-summary-box {
  border: 1px solid #c7d3e3;
  background: #eef1f4;
  padding: 10px 12px;
  box-shadow: var(--shadow-soft);
}

.invoice-summary-box h4 {
  margin: 0 0 8px;
}

.invoice-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 0;
}

.invoice-summary-row.total {
  font-weight: 700;
}

.invoice-summary-sep {
  border-top: 1px solid #9eb0c7;
  margin: 6px 0;
}

.invoice-qr-wrap {
  display: grid;
  justify-items: center;
  gap: 4px;
}

.invoice-qr-box {
  width: 108px;
  height: 108px;
  background: #fff;
  border: 1px solid #c4d2e4;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.invoice-qr-box img,
.invoice-qr-box canvas {
  width: 104px !important;
  height: 104px !important;
  display: block;
}

.status-pill {
  display: inline-block;
  padding: 2px 7px;
  border: 1px solid #9fb3cd;
  font-size: 12px;
  font-weight: 700;
}

.status-pill.issued {
  background: #e4f7e9;
  border-color: #9fc9ab;
  color: #1f5d35;
}

.status-pill.draft {
  background: #fff4dd;
  border-color: #e1c890;
  color: #7a5500;
}

.status-pill.overdue {
  background: #fde7e7;
  border-color: #d48e8e;
  color: #7f1d1d;
}

.status-pill.neutral {
  background: #eef2f7;
  border-color: #c2cedd;
  color: #536273;
}

.status-pill.partial {
  background: #fff0dc;
  border-color: #e2b072;
  color: #9a4f00;
}

.type-switch {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  border: 1px solid #cad7e7;
  padding: 8px;
  background: #f4f8ff;
  box-shadow: var(--shadow-soft);
}
.type-switch-compact {
  border: 0;
  box-shadow: none;
  background: transparent;
  padding: 2px 0 0;
  gap: 8px;
}
.invoice-top-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.invoice-top-quick-card {
  min-height: 78px;
  display: grid;
  align-content: start;
  gap: 4px;
}
.invoice-top-quick-card > strong {
  font-size: 12px;
}
.invoice-top-quick-card small {
  font-size: 12px;
  line-height: 1.25;
}

.twocol {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.box {
  border: 1px solid #cad7e7;
  padding: 8px;
  overflow: auto;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
  box-shadow: 0 6px 14px rgba(21, 43, 69, 0.12);
}

.box h4 {
  margin: 0 0 8px;
}

.madmin-shell {
  background:
    linear-gradient(180deg, rgba(243, 248, 255, 0.95) 0%, rgba(234, 244, 255, 0.96) 100%),
    radial-gradient(circle at 20% 0%, rgba(69, 140, 201, 0.14) 0%, rgba(69, 140, 201, 0) 45%);
  border: 1px solid #c9dbef;
  box-shadow: 0 16px 34px rgba(22, 47, 76, 0.18);
}

.madmin-hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid #bfd4ea;
  background: linear-gradient(140deg, #fafdff 0%, #e8f2ff 100%);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.madmin-hero::after {
  content: "";
  position: absolute;
  right: -46px;
  bottom: -46px;
  width: 220px;
  height: 220px;
  background-image: url("assets/dashboard/tile-settings.png");
  background-size: cover;
  background-position: center;
  opacity: 0.14;
  pointer-events: none;
}

.madmin-hero-text {
  position: relative;
  z-index: 1;
}

.madmin-hero h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.madmin-title-ico {
  width: 22px;
  height: 22px;
  color: #1e4f86;
}

.madmin-hero p {
  margin: 7px 0 0;
  color: #223f61;
}

.madmin-hero-badges {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.madmin-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid #b9cfe8;
  background: rgba(255, 255, 255, 0.86);
  color: #17395b;
  font-size: 13px;
  font-weight: 600;
}

.madmin-badge-ico {
  width: 15px;
  height: 15px;
  color: #2f629b;
}

.madmin-hero-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.madmin-btn-ico {
  width: 14px;
  height: 14px;
  margin-right: 6px;
  vertical-align: -2px;
}

.madmin-kpis {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.madmin-kpi {
  border: 1px solid #bed4ea;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.96) 0%, rgba(240, 248, 255, 0.94) 100%),
    url("assets/dashboard/tile-invoices.png") center/cover no-repeat;
  box-shadow: var(--shadow-soft);
  padding: 10px 10px 9px;
  position: relative;
  overflow: hidden;
}

.madmin-kpi::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0.82) 100%);
  pointer-events: none;
}

.madmin-kpi > * {
  position: relative;
  z-index: 1;
}

.madmin-kpi-ico {
  width: 28px;
  height: 28px;
  border: 1px solid #afc9e4;
  background: rgba(255, 255, 255, 0.88);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.madmin-kpi-svg {
  width: 17px;
  height: 17px;
  color: #21558b;
}

.madmin-kpi-label {
  margin-top: 6px;
  font-size: 12px;
  color: #2d4e73;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.madmin-kpi-value {
  margin-top: 4px;
  color: #102e4f;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
}

.madmin-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.madmin-admin-grid {
  margin-top: 12px;
}

.madmin-card {
  border: 1px solid #bed3ea;
  background: linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
  box-shadow: 0 8px 18px rgba(18, 44, 74, 0.12);
  padding: 10px;
  overflow: hidden;
}

.madmin-card-head {
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #12375c;
}

.madmin-card-ico {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(160deg, #f8fcff 0%, #e3f0ff 100%);
  border: 1px solid #b2cbe5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.madmin-card-svg {
  width: 18px;
  height: 18px;
  color: #2d5f94;
}

.madmin-span-2 {
  grid-column: span 2;
}

.madmin-profile-grid,
.madmin-promoter-grid,
.madmin-stripe-grid {
  max-width: 100%;
}

.madmin-note {
  margin: -3px 0 9px;
  color: #415e80;
}

.madmin-payout-row {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.madmin-table-wrap {
  border: 1px solid #c7d8eb;
  background: #fff;
  box-shadow: var(--shadow-soft);
  overflow: auto;
}

.madmin-table-wrap .list-table th {
  background: #edf4fd;
}

.madmin-table-wrap .list-table td {
  background: #fdfefe;
}

@media (max-width: 1180px) {
  .madmin-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .madmin-hero {
    flex-direction: column;
  }
  .madmin-grid {
    grid-template-columns: 1fr;
  }
  .madmin-span-2 {
    grid-column: span 1;
  }
  .madmin-payout-row {
    grid-template-columns: 1fr;
  }
}

.hr {
  border-top: 1px solid #d4dfed;
}

.line-table-wrap {
  border: 1px solid #c7d3e3;
  overflow: auto;
  background: #fff;
  box-shadow: var(--shadow-soft);
  min-height: 96px;
}

.line-table {
  min-width: 1530px;
  width: 100%;
  border-collapse: collapse;
}

.line-table th,
.line-table td {
  border: 1px solid #d4deeb;
  padding: 3px;
  text-align: left;
}

.line-table th {
  background: #eaf1fb;
  font-size: 13px;
  text-align: center;
}

.line-table input,
.line-table select {
  width: 100%;
  border: 1px solid #b7c4d7;
  padding: 4px;
  background: #fff;
}

.due-quick-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  align-items: center;
}

.due-quick-buttons {
  display: inline-flex;
  gap: 4px;
  flex-wrap: wrap;
}

@media (max-width: 1200px) {
  .invoice-top-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 901px) {
  .invoice-top-pairs .box {
    padding: 6px;
  }
  .invoice-top-pairs .input,
  .invoice-top-pairs .select {
    padding: 5px 6px;
    min-height: 30px;
  }
  .invoice-form-lines-dates {
    grid-template-columns: 145px 1fr;
  }
  .invoice-note-wrap .textarea {
    min-height: 42px;
    padding-top: 4px;
    padding-bottom: 4px;
  }
}

/* Faktura: ciselne hodnoty zarovnat doprava, MJ + popis vlevo */
.line-table input[data-lf="qty"],
.line-table input[data-lf="unitWithoutVat"],
.line-table input[data-lf="unitWithVat"],
.line-table input[data-out="totalWithoutVat"],
.line-table input[data-out="totalWithVat"] {
  text-align: right;
}

.line-table select[data-lf="vatRate"] {
  text-align-last: right;
}

.line-table input[data-lf="name"],
.line-table input[data-lf="unit"] {
  text-align: left;
}

.line-table td {
  background: #eff4fa;
}

.drag-handle {
  cursor: grab;
}

tr[draggable="true"] .drag-handle:active {
  cursor: grabbing;
}

.row-dragging {
  opacity: 0.65;
}

.customer-picker {
  margin-top: 8px;
  border: 1px solid #b7c7dc;
  background: #f7fbff;
}

.customer-picker-modal {
  width: min(860px, calc(100vw - 40px));
}

.customer-picker-modal .customer-picker {
  margin-top: 0;
}

.customer-picker-modal .customer-picker-list {
  max-height: min(55vh, 420px);
}

.customer-picker-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-bottom: 1px solid #cad9ec;
}

.customer-picker-head small {
  color: var(--muted);
  white-space: nowrap;
}

.customer-picker-list {
  max-height: 260px;
  overflow: auto;
}

.invoice-customer-hint {
  display: block;
  margin: 2px 0 8px;
  font-size: 11px;
  color: #5c6e86;
}

.suggest-item {
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #b5cef0;
  background: transparent;
  padding: 6px;
  cursor: pointer;
}

.suggest-item:last-child {
  border-bottom: 0;
}

.suggest-preview .input {
  background: var(--suggest);
  color: #1d4ed8;
}

.list-shell {
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100%;
  gap: 8px;
}
.list-screen {
  height: calc(100vh - 130px);
  min-height: 420px;
  overflow: hidden;
  padding: 12px;
}
.list-shell-fixed {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px;
}
.list-head h2 {
  margin: 0;
}
.list-body-scroll {
  min-height: 0;
  overflow-y: auto;
  overflow-x: auto;
  border: 1px solid #d1dceb;
  background: #fff;
  padding-bottom: 6px;
}
.list-body-scroll .list-table {
  border-collapse: collapse;
}
.list-body-scroll .list-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}
.list-pager-stick {
  padding-top: 4px;
}

.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.calendar-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.calendar-tools {
  display: grid;
  gap: 8px;
}

.calendar-wrap {
  border: 1px solid #c7d3e3;
  background: #fff;
  padding: 8px;
  box-shadow: var(--shadow-soft);
}

.fc .fc-toolbar-title {
  font-size: 18px;
  color: #1d4d78;
}

.fc .fc-button {
  border-radius: 0 !important;
}

/* Tydenni pohled ma byt vyssi, aby se lepe cetly udalosti */
.fc .fc-dayGridWeek-view .fc-daygrid-day-frame {
  min-height: 240px;
}

.mobile-lines-wrap {
  display: grid;
  gap: 10px;
}

.mobile-line-card {
  border: 1px solid #c7d3e3;
  background: #fff;
  padding: 8px;
  box-shadow: var(--shadow-soft);
}

.mobile-line-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.mobile-line-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.mobile-line-grid label {
  font-weight: 600;
  font-size: 12px;
  color: #2f3d51;
}

.mobile-line-grid input,
.mobile-line-grid select {
  width: 100%;
  border: 1px solid #b8c5d8;
  padding: 7px 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 1px 3px rgba(21, 40, 62, 0.12);
}

.mobile-line-grid input[data-lf="qty"],
.mobile-line-grid input[data-lf="unitWithoutVat"],
.mobile-line-grid input[data-lf="unitWithVat"],
.mobile-line-grid input[data-out="totalWithoutVat"],
.mobile-line-grid input[data-out="totalWithVat"] {
  text-align: right;
}

.mobile-line-grid select[data-lf="vatRate"] {
  text-align-last: right;
}

.mobile-line-grid input[data-lf="name"],
.mobile-line-grid input[data-lf="unit"] {
  text-align: left;
}

.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 58;
  background: rgba(12, 21, 32, 0.46);
  display: flex;
  justify-content: flex-end;
}

.mobile-menu-panel {
  width: min(88vw, 360px);
  height: 100%;
  background: #f7fbff;
  border-left: 1px solid #c6d5e8;
  box-shadow: -12px 0 24px rgba(12, 24, 40, 0.24);
  display: grid;
  grid-template-rows: auto 1fr;
}

.mobile-menu-head {
  border-bottom: 1px solid #c6d5e8;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-menu-body {
  padding: 10px;
  display: grid;
  gap: 8px;
  align-content: start;
  overflow: auto;
}

.mobile-menu-btn {
  width: 100%;
  text-align: left;
}

.list-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.list-table th,
.list-table td {
  border: 1px solid #d1dceb;
  padding: 8px;
}

.list-table th {
  background: #eaf1fb;
  text-transform: uppercase;
  font-size: 12px;
}

.list-table tr.invoice-row-link {
  cursor: pointer;
  transition: background-color 0.12s ease;
}

.list-table tr.invoice-row-link:hover td {
  background: linear-gradient(180deg, #eef8ff 0%, #e7f7ee 100%);
}

.pager {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.settings-grid-half > .settings-bank,
.settings-grid-half > .settings-series {
  min-width: 0;
}

.settings-grid-half .list-table {
  font-size: 12px;
}

.settings-grid-half .list-table th,
.settings-grid-half .list-table td {
  padding: 6px;
}

.settings-card {
  border-width: 1px;
  border-style: solid;
  box-shadow: var(--shadow-soft);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  letter-spacing: 0.01em;
}

.sec-ico {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid currentColor;
  font-size: 12px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.7);
}

.settings-plan {
  border-color: #95aac8;
  background: linear-gradient(160deg, #f5f9ff 0%, #eef5ff 100%);
}

.settings-series {
  border-color: #8fb1c7;
  background: linear-gradient(160deg, #f4fbff 0%, #eaf6ff 100%);
}

.settings-bank {
  border-color: #9dbf9b;
  background: linear-gradient(160deg, #f3fff5 0%, #ebf8ef 100%);
}

.settings-suppliers {
  border-color: #b7a58f;
  background: linear-gradient(160deg, #fff9f2 0%, #f9f1e8 100%);
}

.settings-demo {
  border-color: #aa9ac4;
  background: linear-gradient(160deg, #faf5ff 0%, #f1ebfa 100%);
}

.settings-migration {
  border-color: #c19696;
  background: linear-gradient(160deg, #fff5f5 0%, #fbecec 100%);
}

.settings-upgrade {
  border-color: #9ca8bf;
  background: linear-gradient(160deg, #f8faff 0%, #eef2fb 100%);
}

.plan-warning-box {
  border-color: #d0a252;
  background: linear-gradient(160deg, #fff9ed 0%, #fff3dd 100%);
}

.reminder-box {
  border-color: #ce8f3e;
  background: linear-gradient(160deg, #fff5e5 0%, #ffe8c4 100%);
  color: #643200;
}

.reminder-box label {
  font-weight: 700;
}

.paid-box {
  border-color: #4caa68;
  background: linear-gradient(160deg, #eefcf1 0%, #d7f4de 100%);
  color: #165b2d;
}

.paid-box strong {
  color: #0f6b31;
}

.paid-box small {
  color: #22663a;
  font-weight: 600;
}

.plan-card {
  background: linear-gradient(160deg, #ffffff 0%, #f2f6fd 100%);
  border-color: #c2d0e2;
  padding: 8px;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px;
}

.plan-card h4 {
  margin: 0 0 4px;
}

.plan-card p {
  margin: 0 0 6px;
}

.plan-card small {
  display: block;
  line-height: 1.28;
  margin-bottom: 6px;
}

.settings-upgrade .plan-card .btn {
  margin-top: 0;
}

.toast-stack {
  position: fixed;
  right: 10px;
  top: 68px;
  z-index: 30;
  display: grid;
  gap: 6px;
  width: min(340px, 92vw);
}

.toast {
  border: 1px solid #b8c8dc;
  background: #fff;
  padding: 8px;
  font-size: 13px;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.toast.ok {
  border-left: 4px solid var(--ok);
}

.toast.warn {
  border-left: 4px solid var(--warn);
}

.toast.err {
  border-left: 4px solid var(--err);
}

.toast.err::before {
  content: "!";
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-right: 6px;
  background: #b91c1c;
  color: #fff;
  font-weight: 700;
}
.toast-meta {
  font-size: 11px;
  color: #48627f;
  margin-bottom: 2px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.toast.remote .toast-meta {
  color: #24507a;
}
.toast.local .toast-meta {
  color: #3d516b;
}
.toast-text {
  line-height: 1.3;
}

.log-panel {
  position: fixed;
  right: 10px;
  bottom: 24px;
  width: min(620px, 96vw);
  height: min(68vh, 620px);
  z-index: 32;
  border: 1px solid #b8c8dc;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  display: grid;
  grid-template-rows: auto 1fr;
  box-shadow: var(--shadow);
}

.hidden {
  display: none !important;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(12, 21, 32, 0.45);
  display: grid;
  place-items: center;
  padding: 14px;
}

.modal-card {
  width: min(760px, 96vw);
  border: 1px solid #b9c9dd;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  box-shadow: 0 18px 38px rgba(11, 24, 39, 0.3);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid #c9d6e8;
  padding: 10px 12px;
}

.modal-head h3 {
  margin: 0;
}

.modal-body {
  padding: 10px 12px;
  display: grid;
  gap: 8px;
}

.modal-card-register {
  width: min(720px, 96vw);
}

.modal-card-register .modal-head h3 {
  font-size: 22px;
  color: #143e6f;
}

.modal-card-register .modal-body p {
  font-size: 16px;
  line-height: 1.45;
}

.modal-card-register-progress .modal-body {
  padding: 18px 16px;
}

.modal-card-reminder {
  max-height: min(92vh, 980px);
  display: flex;
  flex-direction: column;
}

.modal-card-reminder .modal-body {
  overflow: auto;
}

.paid-confirm-modal {
  width: min(520px, 94vw);
  border: 1px solid #d8c48b;
  background: linear-gradient(180deg, #fffdf7 0%, #fff6e6 100%);
}

.paid-confirm-modal .modal-head h3 {
  color: #6c4300;
}

.share-confirm-modal {
  width: min(560px, 94vw);
  border: 1px solid #8eb3d8;
  background: linear-gradient(180deg, #f7fbff 0%, #eaf3ff 100%);
}

.share-confirm-modal .modal-head h3 {
  color: #154777;
}

.delete-confirm-modal {
  width: min(480px, 94vw);
  border: 1px solid #ddb4b4;
  background: linear-gradient(180deg, #fffafb 0%, #fff1f1 100%);
}

.delete-confirm-modal .modal-head h3 {
  color: #8a2424;
}

.paid-confirm-actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.register-progress-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.register-spinner {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 3px solid #c6d9ee;
  border-top-color: #1f63a2;
  animation: spin 0.85s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.plan-quick {
  border: 1px solid #cad7e7;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px;
}

.plan-quick.is-active {
  border-color: #8bb1d6;
  background: linear-gradient(180deg, #eef6ff 0%, #e6f2ff 100%);
}

.plan-enterprise {
  border: 1px solid #d5dce8;
  background: #f8fbff;
  padding: 8px;
  font-size: 13px;
}

.log-panel-head {
  border-bottom: 1px solid #c9d6e8;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.log-panel-head h3 {
  margin: 0;
  font-size: 16px;
}

.log-panel-head .btn {
  background: linear-gradient(180deg, #ffffff 0%, #f3f7fd 100%);
  color: #163a5d;
  border-color: #b9c9dc;
  font-size: 12px;
  padding: 5px 8px;
  box-shadow: 0 2px 6px rgba(18, 45, 76, 0.12);
}

.log-panel-head .btn:hover {
  background: linear-gradient(180deg, #2e649c 0%, #23507f 100%);
  color: #ffffff;
  border-color: #2c6aa4;
  box-shadow: 0 8px 16px rgba(14, 38, 64, 0.28), 0 0 0 2px rgba(120, 181, 255, 0.22);
}

.log-list {
  overflow: auto;
  padding: 8px;
  display: grid;
  gap: 4px;
}

.log-item {
  border: 1px solid #ccd9ea;
  padding: 4px 6px;
  font-size: 11px;
  background: #fff;
}

.log-item-compact {
  display: grid;
  grid-template-columns: 130px 64px 88px minmax(0, 1fr);
  align-items: start;
  column-gap: 8px;
}

.log-item-compact .li-time,
.log-item-compact .li-kind,
.log-item-compact .li-action {
  color: #385677;
  overflow: hidden;
  text-overflow: ellipsis;
}

.log-item-compact .li-action {
  font-weight: 700;
  color: #173f67;
}

.log-item-compact .li-detail {
  color: #1d3148;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.footer-strip {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  height: 14px;
  border-top: 1px solid #857024;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
  padding: 0 10px;
}

.footer-strip a {
  color: var(--accent);
  font-size: 10px;
  text-decoration: none;
  letter-spacing: 0.04em;
}

.footer-madmin-link {
  position: absolute;
  right: 10px;
  color: #9d7b2f !important;
  text-transform: uppercase;
  opacity: 0.9;
}

.footer-accountant-link {
  position: absolute;
  right: 76px;
  color: #9d7b2f !important;
  text-transform: uppercase;
  opacity: 0.9;
}

.footer-accountant-link:hover {
  color: #ffffff !important;
}

.footer-madmin-link:hover {
  color: #ffffff !important;
}

.badge-readonly {
  border: 1px solid #d5a447;
  background: #fff4df;
  color: #8b5b00;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 14px;
  font-weight: 700;
}

.accountant-readonly-banner {
  border-left: 4px solid #d4a03c;
  background: #fff4de;
  color: #6e4700;
}

.footer-log-btn {
  position: fixed;
  right: 10px;
  bottom: 22px;
  z-index: 41;
  padding: 6px 10px;
  font-size: 12px;
}

@media (max-width: 1200px) {
  .top-actions span {
    display: none;
  }
}

@media (max-width: 900px) {
  .app-shell {
    min-height: 100vh;
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
    min-height: 0;
    height: 100%;
    gap: 8px;
  }

  .dashboard-screen {
    height: calc(100vh - 98px);
    padding: 8px;
    gap: 8px;
  }

  .tile {
    padding: 10px;
  }

  .calendar-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-meta {
    flex-wrap: wrap;
  }

  .dashboard-meta-date {
    margin-left: 0;
  }

  .twocol,
  .settings-grid,
  .plan-grid,
  .landing-feature-grid {
    grid-template-columns: 1fr;
  }

  .login-shell-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .login-shell-content {
    gap: 8px;
  }

  .invoice-form-lines,
  .invoice-form-lines-dates {
    grid-template-columns: 1fr;
  }

  .invoice-form-lines label {
    text-align: left;
  }

  .due-quick-wrap {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .invoice-bottom-zone {
    grid-template-columns: 1fr;
  }
  .invoice-top-quick-grid {
    grid-template-columns: 1fr;
  }

  .stats-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .invoice-number-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .screen { min-height: 74vh; }
  .list-screen {
    height: calc(100vh - 124px);
    min-height: 320px;
  }

  .topbar {
    padding: 0 8px;
  }

  .top-nav,
  .top-actions {
    display: none;
  }

  .mobile-menu-toggle {
    display: inline-flex;
  }

  .brand-btn {
    border-right: 0;
    margin-right: 0;
    padding-right: 2px;
  }

  .line-table-wrap {
    overflow: visible;
  }

  .fc .fc-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .login-shell {
    padding: 10px 8px 8px;
  }

  .login-hero {
    min-height: auto;
    padding: 0;
  }

  .login-scroll-cta {
    min-width: 0;
    width: 100%;
  }

  .login-promo-pane {
    padding: 18px 16px;
    gap: 16px;
  }

  .landing-about {
    padding: 18px 16px 22px;
  }

  .landing-flow-block,
  .landing-modules-block {
    margin-top: 22px;
  }

  .landing-story-kicker,
  .landing-section-kicker {
    font-size: 22px;
  }

  .landing-story h2,
  .landing-section-head h3 {
    max-width: none;
  }

  .landing-story p,
  .landing-step-copy p,
  .landing-module-card p {
    font-size: 15px;
    line-height: 1.6;
  }

  .landing-step {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 14px;
    padding: 16px;
  }

  .landing-step-no {
    width: 56px;
    height: 56px;
    font-size: 24px;
  }

  .landing-step-copy h4 {
    font-size: 18px;
  }

  .landing-module-card {
    padding: 18px 16px 16px;
  }

  .landing-module-card h4 {
    padding-right: 0;
    margin-top: 38px;
    font-size: 20px;
  }

  .landing-module-badge {
    top: 14px;
    right: 14px;
    min-height: 32px;
    padding: 6px 10px;
    font-size: 11px;
  }

  .login-promo-title {
    font-size: clamp(30px, 9vw, 42px);
  }

  .login-promo-text {
    font-size: 15px;
    line-height: 1.45;
  }

  .login-promo-list {
    margin-top: 4px;
    gap: 6px;
    font-size: 14px;
  }

  .login-promo-art {
    min-height: 120px;
    background-position: center;
  }

  .login-auth-pane {
    position: static;
    top: auto;
    min-height: auto;
    padding: 12px;
  }

  .login-cards-stack,
  .login-card,
  .login-card-compact {
    width: 100%;
  }

  .login-card-compact {
    padding: 16px 14px;
  }

  .login-wrap .login-card h2 {
    font-size: 24px;
  }

  .landing-about,
  .pricing-compare {
    margin: 0 8px 8px;
    padding: 12px;
  }

  .pricing-table-scroll {
    max-height: 68vh;
  }

  .cmp-param-head,
  .cmp-param {
    min-width: 180px;
    max-width: 220px;
  }

  .cmp-plan-title {
    font-size: 20px;
  }
}
