/* [project]/src/app/globals.css [app-client] (css) */
:root {
  --bg: #f4f6f5;
  --surface: #fff;
  --surface-muted: #eef2f0;
  --text: #1b2420;
  --muted: #65736d;
  --border: #d8e0dc;
  --brand: #167252;
  --brand-dark: #0e5a40;
  --accent: #d89b22;
  --danger: #b43a3a;
  --shadow: 0 8px 24px #1a302714;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, PingFang SC, Microsoft YaHei, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  min-height: 100%;
}

body {
  background: var(--bg);
  margin: 0;
}

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

button, a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

.login-shell {
  background: #eaf0ed;
  grid-template-columns: minmax(320px, 1fr) minmax(420px, 520px);
  min-height: 100vh;
  display: grid;
}

.login-brand {
  color: #fff;
  background: #164b3a;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(40px, 8vw, 120px);
  display: flex;
}

.login-brand h1 {
  letter-spacing: 0;
  max-width: 650px;
  margin: 0;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 1.15;
}

.login-brand p {
  color: #c7ddd4;
  font-size: 18px;
}

.login-panel {
  place-items: center;
  padding: 32px;
  display: grid;
}

.login-form {
  width: 100%;
  max-width: 380px;
}

.login-form h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.login-form > p {
  color: var(--muted);
  margin: 0 0 32px;
}

.field {
  gap: 7px;
  margin-bottom: 18px;
  display: grid;
}

.field label {
  font-size: 14px;
  font-weight: 650;
}

.input, .select, .textarea {
  border: 1px solid var(--border);
  width: 100%;
  color: var(--text);
  background: #fff;
  border-radius: 6px;
  outline: none;
  min-height: 44px;
  padding: 11px 12px;
}

.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px #1672521f;
}

.textarea {
  resize: vertical;
  min-height: 88px;
}

.button {
  cursor: pointer;
  border: 0;
  border-radius: 6px;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 15px;
  font-weight: 650;
  display: inline-flex;
}

.button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.button-primary {
  background: var(--brand);
  color: #fff;
}

.button-primary:hover {
  background: var(--brand-dark);
}

.button-secondary {
  background: var(--surface-muted);
  color: var(--text);
  border: 1px solid var(--border);
}

.button-danger {
  color: var(--danger);
  background: #fff0f0;
  border: 1px solid #eccccc;
}

.button-block {
  width: 100%;
}

.error-box {
  color: #8e2929;
  background: #fff0f0;
  border: 1px solid #eccccc;
  border-radius: 6px;
  margin-bottom: 16px;
  padding: 11px 12px;
}

.success-box {
  color: #126443;
  background: #e5f4ed;
  border: 1px solid #b9dfce;
  border-radius: 6px;
  margin-bottom: 16px;
  padding: 11px 12px;
}

.form-panel {
  max-width: 620px;
  padding: 22px;
}

.tool-list {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  display: grid;
}

.tool-link {
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  align-items: center;
  gap: 13px;
  padding: 16px;
  text-decoration: none;
  display: flex;
}

.tool-link span {
  gap: 3px;
  display: grid;
}

.tool-link small {
  color: var(--muted);
}

.app-shell {
  grid-template-columns: 230px 1fr;
  min-height: 100vh;
  display: grid;
}

.sidebar {
  color: #fff;
  background: #153f32;
  flex-direction: column;
  height: 100vh;
  padding: 20px 14px;
  display: flex;
  position: sticky;
  top: 0;
}

.brand-lockup {
  border-bottom: 1px solid #ffffff1f;
  align-items: center;
  gap: 11px;
  padding: 8px 8px 22px;
  display: flex;
}

.brand-mark {
  background: var(--accent);
  color: #2d2109;
  border-radius: 6px;
  place-items: center;
  width: 38px;
  height: 38px;
  font-weight: 850;
  display: grid;
}

.brand-lockup strong {
  font-size: 15px;
  display: block;
}

.brand-lockup span {
  color: #acc8bd;
  margin-top: 2px;
  font-size: 12px;
  display: block;
}

.nav {
  gap: 4px;
  margin-top: 18px;
  display: grid;
}

.nav-link {
  color: #d8e8e2;
  border-radius: 6px;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  font-size: 14px;
  display: flex;
}

.nav-link:hover {
  color: #fff;
  background: #ffffff17;
}

.sidebar-user {
  border-top: 1px solid #ffffff1f;
  margin-top: auto;
  padding: 16px 8px 0;
}

.sidebar-user strong {
  font-size: 14px;
  display: block;
}

.sidebar-user span {
  color: #acc8bd;
  font-size: 12px;
}

.logout-button {
  color: #d8e8e2;
  cursor: pointer;
  background: none;
  border: 0;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  padding: 0;
  display: flex;
}

.main {
  min-width: 0;
}

.topbar {
  border-bottom: 1px solid var(--border);
  z-index: 5;
  background: #fff;
  justify-content: space-between;
  align-items: center;
  height: 64px;
  padding: 0 28px;
  display: flex;
  position: sticky;
  top: 0;
}

.topbar h1 {
  margin: 0;
  font-size: 18px;
}

.content {
  max-width: 1500px;
  margin: 0 auto;
  padding: 26px 28px 48px;
}

.page-head {
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
  display: flex;
}

.page-head h2 {
  margin: 0 0 5px;
  font-size: 24px;
}

.page-head p {
  color: var(--muted);
  margin: 0;
}

.stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
  display: grid;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 7px;
  padding: 18px;
}

.stat-label {
  color: var(--muted);
  font-size: 13px;
}

.stat-value {
  margin-top: 8px;
  font-size: 27px;
  font-weight: 760;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 7px;
}

.panel-head {
  border-bottom: 1px solid var(--border);
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  display: flex;
}

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

.panel-body {
  padding: 18px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}

.table th {
  color: var(--muted);
  text-align: left;
  background: #f8faf9;
  font-weight: 650;
}

.table th, .table td {
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  padding: 12px 14px;
}

.table tr:last-child td {
  border-bottom: 0;
}

.badge {
  border-radius: 99px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
}

.badge-success {
  color: #126443;
  background: #e5f4ed;
}

.badge-muted {
  color: #61706a;
  background: #edf0ef;
}

.badge-warning {
  color: #805b0d;
  background: #fff4d9;
}

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

.empty {
  text-align: center;
  color: var(--muted);
  padding: 42px 20px;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
  display: grid;
}

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

.toolbar {
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  display: flex;
}

.muted {
  color: var(--muted);
}

.mobile-only, .mobile-nav {
  display: none;
}

.modal-backdrop {
  z-index: 50;
  background: #0f1e1885;
  place-items: center;
  padding: 18px;
  display: grid;
  position: fixed;
  inset: 0;
}

.modal {
  background: #fff;
  border-radius: 8px;
  width: min(560px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  box-shadow: 0 24px 70px #00000038;
}

.modal-head {
  border-bottom: 1px solid var(--border);
  justify-content: space-between;
  align-items: center;
  padding: 17px 20px;
  display: flex;
}

.modal-head h3 {
  margin: 0;
  font-size: 18px;
}

.icon-button {
  cursor: pointer;
  width: 38px;
  height: 38px;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 5px;
  place-items: center;
  display: grid;
}

.icon-button:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.modal-body {
  padding: 20px;
}

.modal-actions {
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
  display: flex;
}

.switch-row {
  border: 1px solid var(--border);
  border-radius: 6px;
  justify-content: space-between;
  align-items: center;
  min-height: 46px;
  padding: 11px 12px;
  display: flex;
}

.switch-row span {
  gap: 2px;
  display: grid;
}

.switch-row small {
  color: var(--muted);
  font-weight: 400;
}

.switch-row input {
  width: 19px;
  height: 19px;
  accent-color: var(--brand);
}

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

.inline-error {
  color: var(--danger);
  margin: -7px 0 15px;
  font-size: 13px;
}

.money-positive {
  color: #0f704b;
  font-weight: 700;
}

.money-negative {
  color: var(--danger);
  font-weight: 700;
}

.invoice-form {
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr);
  align-items: start;
  gap: 18px;
  display: grid;
}

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

.invoice-line {
  grid-template-columns: minmax(150px, 1.5fr) 110px 130px 130px 42px;
  align-items: end;
  gap: 9px;
  display: grid;
}

.invoice-line .field {
  margin-bottom: 0;
}

.invoice-line-labels {
  color: var(--muted);
  margin-bottom: -4px;
  font-size: 12px;
}

.line-amount {
  align-items: center;
  min-height: 44px;
  font-weight: 730;
  display: flex;
}

.summary-list {
  gap: 12px;
  display: grid;
}

.summary-row {
  color: var(--muted);
  justify-content: space-between;
  gap: 16px;
  display: flex;
}

.summary-row strong {
  color: var(--text);
}

.summary-total {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  font-size: 18px;
}

.signature-field {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}

.signature-field canvas {
  touch-action: none;
  cursor: crosshair;
  width: 100%;
  height: 180px;
  display: block;
}

.signature-hint {
  color: #a1aaa6;
  pointer-events: none;
  font-size: 13px;
  position: absolute;
  bottom: 10px;
  left: 12px;
}

.signature-clear {
  min-height: 34px;
  padding: 6px 9px;
  position: absolute;
  top: 8px;
  right: 8px;
}

.sticky-panel {
  position: sticky;
  top: 82px;
}

.ticket-preview {
  border: 1px solid var(--border);
  color: #171717;
  width: min(760px, 100%);
  box-shadow: var(--shadow);
  background: #fff;
  margin: 0 auto;
  padding: 28px;
}

.reprint-mark {
  color: #b42318;
  text-align: center;
  border: 3px solid #b42318;
  width: fit-content;
  margin: 0 auto 14px;
  padding: 6px 12px;
  font-size: 22px;
  font-weight: 800;
}

.ticket-preview header {
  text-align: center;
  border-bottom: 2px solid #222;
  padding-bottom: 14px;
}

.ticket-preview header h1 {
  letter-spacing: 0;
  margin: 0 0 8px;
  font-size: 25px;
}

.ticket-meta {
  grid-template-columns: 1fr 1fr;
  gap: 8px 18px;
  padding: 16px 0;
  display: grid;
}

.ticket-preview table {
  border-collapse: collapse;
  width: 100%;
}

.ticket-preview th, .ticket-preview td {
  text-align: left;
  border: 1px solid #333;
  padding: 8px;
}

.ticket-balances {
  border-bottom: 1px solid #333;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 16px 0;
  display: grid;
}

.ticket-bottom {
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  padding-top: 16px;
  display: flex;
}

.ticket-bottom > div {
  gap: 10px;
  display: grid;
}

.signature-print {
  align-items: flex-end;
  gap: 8px;
  display: flex;
}

.signature-print img {
  object-fit: contain;
  object-position: left bottom;
  border-bottom: 1px solid #444;
  width: 180px;
  height: 70px;
}

.ticket-number {
  align-self: flex-end;
}

@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-brand {
    min-height: 240px;
    padding: 34px 28px;
  }

  .login-brand h1 {
    font-size: 36px;
  }

  .login-panel {
    padding: 36px 22px;
  }

  .app-shell {
    padding-bottom: 66px;
    display: block;
  }

  .sidebar {
    display: none;
  }

  .topbar {
    padding: 0 18px;
  }

  .content {
    padding: 20px 16px 36px;
  }

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

  .mobile-nav {
    z-index: 20;
    height: calc(64px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    overscroll-behavior-x: contain;
    padding-bottom: env(safe-area-inset-bottom);
    scrollbar-width: none;
    background: #fff;
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    overflow-x: auto;
  }

  .mobile-nav::-webkit-scrollbar {
    display: none;
  }

  .mobile-nav a {
    color: var(--muted);
    flex: 0 0 72px;
    align-content: center;
    place-items: center;
    gap: 2px;
    font-size: 11px;
    display: grid;
  }

  .mobile-nav svg {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 580px) {
  .stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .stat {
    padding: 14px;
  }

  .stat-value {
    font-size: 22px;
  }

  .page-head {
    flex-direction: column;
    align-items: stretch;
  }

  .page-head .button {
    width: 100%;
  }

  .form-grid, .permission-grid {
    grid-template-columns: 1fr;
  }

  .form-grid .span-2 {
    grid-column: auto;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .modal-actions .button {
    width: 100%;
  }

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

  .sticky-panel {
    position: static;
  }

  .invoice-line {
    border-bottom: 1px solid var(--border);
    grid-template-columns: 1fr 86px;
    padding-bottom: 12px;
  }

  .invoice-line > :first-child {
    grid-column: span 2;
  }

  .invoice-line-labels {
    display: none;
  }

  .invoice-line .mobile-only {
    display: block;
  }

  .invoice-line .line-amount-field {
    margin-bottom: 0;
  }

  .invoice-line .line-amount {
    border: 1px solid var(--border);
    background: #f8faf9;
    border-radius: 6px;
    padding: 0 12px;
  }

  .ticket-preview {
    padding: 16px 12px;
  }

  .ticket-preview header h1 {
    font-size: 20px;
  }

  .ticket-meta, .ticket-balances {
    grid-template-columns: 1fr;
  }

  .ticket-bottom {
    flex-direction: column;
    align-items: stretch;
  }
}

/*# sourceMappingURL=src_app_globals_162hn9o.css.map*/