@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  --ink: #202832;
  --muted: #746d73;
  --line: rgba(32, 40, 50, 0.12);
  --soft: #fff4f6;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-solid: #ffffff;
  --accent: #f72557;
  --accent-strong: #dc1747;
  --green: #54bd2e;
  --mauve: #f06989;
  --mauve-dark: #c81546;
  --leaf: #58c936;
  --leaf-soft: #eefadf;
  --sky: #fbd6de;
  --sky-soft: #fff5f7;
  --cream: #fff9f3;
  --earth: #7b6a61;
  --warn: #d62545;
  --radius-lg: 30px;
  --radius-md: 22px;
  --radius-sm: 15px;
  --shadow: 0 24px 70px rgba(39, 29, 38, 0.14);
  --glass-shadow: 0 18px 50px rgba(33, 29, 24, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: Manrope, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(247, 37, 87, 0.13), transparent 32%),
    radial-gradient(circle at 92% 14%, rgba(88, 201, 54, 0.13), transparent 28%),
    linear-gradient(180deg, #fff 0%, #fff6f8 46%, #fffdf8 100%);
  overflow: auto;
}

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

button {
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.landing-page {
  min-height: 100vh;
  padding: 28px 22px 42px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.86) 58%, #fff 100%),
    url("./assets/landing-gradient.png") top center / cover no-repeat;
  overflow: visible;
}

.landing-nav {
  width: min(1180px, 100%);
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.landing-hero,
.landing-proof,
.landing-selling {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.landing-hero {
  min-height: calc(100vh - 138px);
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 0.84fr) minmax(420px, 1.16fr);
  align-items: center;
  gap: 42px;
  padding: 34px 0 58px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.landing-hero::after {
  display: none;
}

.landing-hero-image {
  position: static;
  width: 100%;
  height: auto;
  display: block;
  border-radius: 24px;
  background: transparent;
  box-shadow: 0 28px 80px rgba(32, 40, 50, 0.14);
}

.landing-copy {
  max-width: 490px;
  display: grid;
  gap: 16px;
}

.landing-brand {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
  box-shadow: none;
}

.landing-brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 10px;
}

.landing-login-button {
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 14px 34px rgba(32, 40, 50, 0.12);
}

.landing-login-button:hover {
  transform: translateY(-1px);
  background: var(--ink);
  color: #fff;
}

.landing-copy h1 {
  margin: 0;
  color: var(--ink);
  font-size: 64px;
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: 0;
}

.landing-subtitle {
  margin: 0;
  color: #28362b;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.34;
}

.landing-promise {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.48;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.landing-actions .primary-button {
  min-height: 54px;
  padding: 0 30px;
  background: var(--green);
  color: #fff;
  font-size: 17px;
  box-shadow: 0 16px 34px rgba(40, 86, 66, 0.22);
}

.landing-actions .primary-button:hover {
  background: #1f4434;
  box-shadow: 0 18px 38px rgba(40, 86, 66, 0.28);
}

.landing-actions .secondary-button {
  min-height: 54px;
  padding: 0 24px;
  border-color: rgba(40, 86, 66, 0.22);
  background: rgba(255, 253, 247, 0.88);
  color: var(--green);
  font-size: 17px;
}

.google-button {
  gap: 10px;
  text-decoration: none;
}

.google-button.is-disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.google-mark {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  color: #4285f4;
  font-weight: 800;
}

.signup-card {
  width: min(430px, 100%);
  display: grid;
  gap: 12px;
  margin-top: 6px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.auth-form {
  display: grid;
  gap: 11px;
}

.signup-heading {
  display: grid;
  gap: 3px;
}

.signup-heading strong {
  color: var(--ink);
  font-size: 21px;
  line-height: 1.16;
}

.signup-heading span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.auth-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.auth-form input {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  padding: 0 14px;
  background: #fffdfa;
  color: var(--ink);
  outline: none;
  box-shadow: 0 12px 28px rgba(32, 40, 50, 0.08);
}

.auth-form input:focus {
  box-shadow:
    0 0 0 4px rgba(247, 37, 87, 0.12),
    0 12px 28px rgba(32, 40, 50, 0.08);
}

.auth-submit,
.signup-card .google-button {
  width: 100%;
  min-height: 48px;
  font-size: 15px;
  text-decoration: none;
}

.signup-card .google-button {
  border: 0;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 12px 28px rgba(32, 40, 50, 0.08);
}

.signup-card .google-button::before {
  content: "G";
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #f5f7fb;
  color: #4285f4;
  font-size: 13px;
  font-weight: 800;
}

.auth-switch {
  width: fit-content;
  justify-self: center;
  border: 0;
  background: transparent;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  box-shadow: none;
}

.auth-switch {
  padding: 3px 0 0;
}

.auth-form button:disabled,
.auth-form input:disabled {
  cursor: wait;
  opacity: 0.7;
}

.auth-status {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.landing-proof {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 34px 0 10px;
}

.landing-proof div {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 16px 18px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 40px rgba(32, 40, 50, 0.08);
}

.landing-proof strong {
  color: var(--green, #285642);
  font-size: 24px;
  line-height: 1;
}

.landing-proof span {
  color: var(--muted);
  font-size: 15px;
}

.landing-selling {
  margin: 0 auto 34px;
  padding: 42px 0 8px;
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
  gap: 28px;
  align-items: start;
}

.selling-intro {
  display: grid;
  gap: 12px;
}

.selling-intro h2 {
  max-width: 520px;
  margin: 0;
  color: var(--ink);
  font-size: 46px;
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: 0;
}

.selling-intro p {
  max-width: 460px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.45;
}

.selling-grid {
  display: grid;
  gap: 12px;
}

.selling-grid article {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 8px 18px;
  padding: 22px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 16px 40px rgba(32, 40, 50, 0.08);
}

.selling-grid span {
  grid-row: span 2;
  color: var(--green, #285642);
  font-size: 13px;
  font-weight: 800;
}

.selling-grid h3,
.selling-grid p {
  margin: 0;
}

.selling-grid h3 {
  color: var(--ink);
  font-size: 24px;
  line-height: 1.08;
}

.selling-grid p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.45;
}

.app-shell {
  height: 100vh;
  display: grid;
  grid-template-columns: 278px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  overflow: hidden;
}

.sidebar {
  background: var(--panel);
  border: 1px solid rgba(247, 37, 87, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(22px);
  color: var(--ink);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  overflow: hidden;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(247, 37, 87, 0.12);
  border-radius: 18px;
  background: #fff;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: 0 14px 30px rgba(247, 37, 87, 0.12);
  overflow: hidden;
}

.brand-mark img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.brand h1,
.brand p,
.topbar h2,
.topbar p,
.panel-title h3,
.form-block h3 {
  margin: 0;
}

.brand h1 {
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
}

.brand p,
.eyebrow,
.panel-title span,
.mission-meta,
.chat-message time {
  color: var(--muted);
  font-size: 13px;
}

.sidebar .brand p,
.sidebar .side-heading,
.sidebar .mission-meta {
  color: var(--muted);
}

.side-section {
  min-height: 0;
}

.side-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: none;
}

.icon-button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 999px;
  background: rgba(191, 230, 250, 0.72);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(31, 86, 118, 0.14);
}

.icon-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(31, 86, 118, 0.18);
}

.mission-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: auto;
}

.mission-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  gap: 6px;
}

.mission-item,
.profile-link {
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  width: 100%;
  border-radius: 18px;
  padding: 12px;
  text-align: left;
}

.mission-item {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.mission-item.active,
.profile-link.active {
  background: rgba(7, 24, 50, 0.94);
  border-color: rgba(255, 255, 255, 0.36);
  color: #fff;
  box-shadow: 0 18px 34px rgba(7, 24, 50, 0.18);
}

.mission-item.active .mission-meta {
  color: rgba(255, 255, 255, 0.68);
}

.mission-item:hover,
.profile-link:hover {
  border-color: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.54);
}

.mission-item.active:hover,
.profile-link.active:hover {
  background: rgba(7, 24, 50, 0.94);
}

.mission-delete {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(42, 24, 48, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  color: var(--muted);
  box-shadow: none;
}

.mission-delete:hover {
  color: var(--warn);
  border-color: rgba(180, 72, 59, 0.18);
  background: rgba(255, 255, 255, 0.7);
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(39, 29, 38, 0.08);
}

.mission-delete svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.mission-delete:disabled {
  cursor: not-allowed;
  opacity: 0.32;
  transform: none;
  box-shadow: none;
}

.profile-link {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.profile-link + .user-menu {
  margin-top: 4px;
}

.profile-icon {
  color: currentColor;
  font-size: 20px;
}

.workspace {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}

.topbar {
  min-height: 82px;
  padding: 16px 22px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(22px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.topbar h2 {
  font-size: 36px;
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: 0;
}

.eyebrow {
  width: fit-content;
  margin-bottom: 6px !important;
  border: 1px solid rgba(165, 102, 120, 0.18);
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.42);
  color: var(--mauve-dark);
  font-weight: 780;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.user-menu {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 4px 4px 4px 12px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.sidebar .user-menu {
  width: 100%;
  min-height: 40px;
  justify-content: space-between;
  padding: 8px 2px 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  font-size: 14px;
}

.sidebar .user-menu span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-button {
  min-height: 32px;
  padding-inline: 12px;
}

.sidebar .logout-button {
  flex: 0 0 auto;
  min-height: 32px;
  padding-inline: 4px;
  border: 0;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}

.sidebar .logout-button:hover {
  color: var(--accent);
  background: transparent;
  box-shadow: none;
}

.primary-button,
.secondary-button,
.send-button,
.upload-button {
  min-height: 40px;
  border-radius: 999px;
  padding: 0 16px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.primary-button,
.send-button {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 26px rgba(247, 37, 87, 0.2);
}

.primary-button:hover,
.send-button:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(247, 37, 87, 0.24);
}

.secondary-button,
.upload-button {
  background: rgba(255, 255, 255, 0.56);
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.7);
}

.secondary-button:hover,
.upload-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(61, 76, 83, 0.12);
}

.bulk-upload-button {
  white-space: nowrap;
}

.mission-view {
  flex: 1;
  min-height: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(300px, 340px) minmax(0, 1fr);
  gap: 14px;
  overflow: hidden;
}

.chat-panel,
.preview-panel,
.profile-form {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.chat-panel {
  min-height: 0;
  height: 100%;
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.panel-title {
  min-height: 60px;
  border-bottom: 1px solid var(--line);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-title h3 {
  font-size: 20px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0;
}

.panel-title span {
  border: 1px solid rgba(88, 191, 75, 0.25);
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(233, 247, 222, 0.82);
  color: #2f742d;
  font-weight: 700;
}

.chat-log {
  overflow: auto;
  padding: 18px 18px 150px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.chat-message {
  width: fit-content;
  max-width: min(88%, 540px);
  min-width: 0;
  border-radius: 24px;
  padding: 12px 14px;
  display: grid;
  gap: 5px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

.chat-message > * {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.chat-message.assistant {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.62);
  box-shadow: 0 14px 30px rgba(39, 29, 38, 0.08);
}

.chat-message.user {
  align-self: flex-end;
  margin-left: auto;
  background: linear-gradient(135deg, #f72557, #de1748);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  box-shadow: 0 14px 32px rgba(247, 37, 87, 0.22);
}

.chat-message.user time {
  color: #c8c8c8;
}

.receipt-chip {
  color: currentColor;
  font-size: 13px;
  font-weight: 700;
}

.confirmation-summary {
  margin: 8px 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}

.confirmation-summary div {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.74);
}

.confirmation-summary dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.confirmation-summary dd {
  margin: 2px 0 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.confirmation-full {
  grid-column: 1 / -1;
}

.confirm-input {
  width: 100%;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  padding: 4px 0;
  font-size: 18px;
  font-weight: 700;
}

.confirm-input:hover,
.confirm-input:focus {
  border-color: rgba(165, 102, 120, 0.34);
  background: rgba(255, 255, 255, 0.72);
  padding-inline: 6px;
  outline: none;
}

.chat-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.small-primary,
.small-secondary {
  border-radius: 999px;
  min-height: 32px;
  padding: 0 14px;
  font-weight: 800;
}

.small-primary {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
}

.small-secondary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.chat-form {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 26px;
  box-shadow: 0 18px 44px rgba(39, 29, 38, 0.16);
  background: rgba(255, 253, 247, 0.82);
  backdrop-filter: blur(18px);
  padding: 10px;
  display: grid;
  grid-template-columns: auto minmax(112px, 1fr);
  grid-template-areas:
    "input input"
    "bulk send";
  align-items: center;
  gap: 8px 10px;
  z-index: 3;
}

.chat-form.dragging {
  border-color: rgba(88, 191, 75, 0.58);
  outline: 2px dashed rgba(88, 191, 75, 0.55);
  outline-offset: 4px;
}

.drop-hint {
  display: none;
  position: absolute;
  inset: -42px 0 auto;
  min-height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 18px;
  background: rgba(233, 247, 222, 0.94);
  color: #2f742d;
  font-size: 13px;
  font-weight: 700;
}

.chat-form.dragging .drop-hint,
.chat-form.has-drop .drop-hint {
  display: grid;
}

.chat-form.is-analyzing {
  opacity: 0.72;
}

.chat-form.is-analyzing::after {
  content: "Analyse...";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: rgba(255, 253, 247, 0.78);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.chat-form input[type="file"] {
  display: none;
}

.bulk-upload-button input {
  display: none;
}

.chat-form .bulk-upload-button {
  grid-area: bulk;
}

.chat-form input[type="text"] {
  grid-area: input;
  height: 46px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.68);
  font-size: 14px;
}

.chat-form .upload-button,
.chat-form .send-button {
  min-height: 44px;
  padding: 0 18px;
  font-size: 14px;
  white-space: nowrap;
}

.chat-form .send-button {
  grid-area: send;
  justify-self: end;
  min-width: 118px;
  font-size: 16px;
}

.chat-form input[type="text"]:focus {
  border-color: rgba(165, 102, 120, 0.46);
  outline: none;
  box-shadow: 0 0 0 3px rgba(165, 102, 120, 0.12);
}

.preview-panel {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}

.preview-panel .panel-title span {
  background: #fff;
  border-color: #deded9;
  color: #333;
}

.expense-report {
  overflow: auto;
  padding: 20px;
  background: #f4f4f2;
  min-height: 0;
}

.report-paper {
  width: 100%;
  min-width: 0;
  background: #fff;
  border: 1px solid #deded9;
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(32, 32, 32, 0.08);
  padding: 24px;
  overflow: hidden;
  color: #1f1f1f;
}

.report-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid #deded9;
  padding-bottom: 18px;
  margin-bottom: 20px;
}

.report-title {
  font-size: 34px;
  font-weight: 600;
  letter-spacing: 0;
  color: #1f1f1f;
}

.note-number-field {
  width: fit-content;
  display: grid;
  grid-template-columns: auto minmax(120px, 170px);
  align-items: center;
  gap: 8px;
  margin: 8px 0 6px;
  color: #666;
  font-size: 13px;
  font-weight: 800;
}

.note-number-field input {
  width: 100%;
  min-height: 32px;
  border: 1px solid #deded9;
  border-radius: 10px;
  padding: 5px 9px;
  background: #fff;
  color: #1f1f1f;
  font-weight: 800;
  outline: none;
}

.note-number-field input:focus {
  border-color: #777;
  box-shadow: 0 0 0 3px rgba(32, 32, 32, 0.08);
}

.note-number-print {
  display: none;
  color: #1f1f1f;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 18px 0;
}

.report-box {
  border: 1px solid #deded9;
  border-radius: 14px;
  background: #fff;
  padding: 12px;
  min-height: 82px;
}

.report-box:nth-child(1) {
  background: #fff;
}

.report-box:nth-child(2) {
  background: #fff;
}

.report-box:nth-child(3) {
  background: #fff;
}

.report-box strong {
  display: block;
  margin-bottom: 6px;
}

.preview-tools {
  display: flex;
  justify-content: flex-end;
  margin: 4px 0 -10px;
}

.tiny-action,
.receipt-delete {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: #777;
  display: inline-grid;
  place-items: center;
  padding: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

.tiny-action:hover,
.receipt-delete:hover {
  color: #1f1f1f;
  border-color: #deded9;
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(32, 32, 32, 0.08);
}

.tiny-action.add-line {
  width: 28px;
  height: 28px;
  color: #1f1f1f;
  border-color: #deded9;
  background: #fff;
  box-shadow: 0 10px 20px rgba(32, 32, 32, 0.08);
}

.tiny-action.danger,
.receipt-delete {
  color: #555;
}

.tiny-action.danger:hover {
  color: var(--warn);
  border-color: rgba(180, 72, 59, 0.18);
}

.expense-table {
  width: 100%;
  min-width: 0;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 18px;
  font-size: 11px;
  table-layout: fixed;
}

.expense-table th,
.expense-table td {
  border: 0;
  border-right: 1px solid #deded9;
  border-bottom: 1px solid #deded9;
  padding: 7px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: break-word;
  word-break: normal;
}

.expense-table th {
  background: #f3f3f1;
  border-top: 1px solid #deded9;
  font-size: 11px;
  line-height: 1.15;
  white-space: nowrap;
  overflow-wrap: normal;
}

.expense-table th:first-child,
.expense-table td:first-child {
  border-left: 1px solid #deded9;
}

.expense-table thead th:first-child {
  border-top-left-radius: 16px;
}

.expense-table thead th:last-child {
  border-top-right-radius: 16px;
}

.expense-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 16px;
}

.expense-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 16px;
}

.preview-control-col {
  width: 26px;
  min-width: 26px;
  padding: 4px !important;
  text-align: center !important;
}

.table-control-col {
  width: 28px;
}

.table-date-col {
  width: 17%;
}

.table-category-col {
  width: 13%;
}

.table-vendor-col {
  width: 15%;
}

.table-description-col {
  width: 21%;
}

.table-vat-col {
  width: 7%;
}

.table-receipt-col {
  width: 14%;
}

.table-amount-col {
  width: 9%;
}

.table-input {
  width: 100%;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #1f1f1f;
  padding: 5px;
  font-size: 10.8px;
}

select.table-input {
  appearance: none;
  padding-right: 2px;
}

.date-input {
  font-variant-numeric: tabular-nums;
  font-size: 9.8px;
  padding-inline: 2px;
}

.table-input:hover,
.table-input:focus {
  border-color: #bdbdb8;
  background: #fff;
  outline: none;
}

.text-cell {
  min-width: 0;
}

.vendor-cell {
  width: 18%;
}

.description-cell {
  width: 30%;
}

.table-textarea {
  min-height: 34px;
  line-height: 1.35;
  resize: vertical;
  overflow: hidden;
  white-space: pre-wrap;
  field-sizing: content;
}

.subtle-input {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.amount-input {
  min-width: 0;
  text-align: right;
  -moz-appearance: textfield;
}

.amount-input::-webkit-inner-spin-button,
.amount-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.amount {
  text-align: right;
  white-space: nowrap;
}

.receipt-cell {
  white-space: normal;
}

.print-expense-table {
  display: none;
}

.print-payment {
  color: #666;
  margin-top: 3px;
}

.signature-section {
  margin-top: 30px;
  border-top: 1px solid #deded9;
  padding-top: 18px;
  break-inside: avoid;
  page-break-inside: avoid;
}

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

.signature-card {
  border: 1px solid #deded9;
  border-radius: 14px;
  background: #fff;
  padding: 14px;
  display: grid;
  gap: 6px;
}

.signature-title {
  font-weight: 700;
}

.signature-person {
  font-weight: 700;
}

.signature-role,
.signature-caption {
  color: #666;
  font-size: 12px;
}

.signature-date-field {
  display: grid;
  grid-template-columns: auto minmax(0, 180px);
  align-items: center;
  justify-content: start;
  gap: 8px;
  color: #666;
  font-size: 12px;
  font-weight: 700;
}

.signature-date-input {
  padding: 6px 8px;
  font-size: 12px;
  border-radius: 12px;
}

.signature-date-print {
  display: none;
  color: #1f1f1f;
}

.signature-empty-box {
  height: 92px;
  border: 1px solid #deded9;
  border-radius: 14px;
  margin-top: 8px;
  background: #fff;
}

.total-row td {
  font-weight: 700;
  background: #f3f3f1;
  color: #1f1f1f;
}

.empty-table {
  color: #666;
  text-align: center;
  padding: 28px;
}

.print-value {
  display: none;
}

.receipt-section {
  margin-top: 28px;
  break-before: auto;
}

.receipt-section h3 {
  margin: 0 0 14px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0;
}

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

.receipt-page-break {
  display: none;
}

.receipt-card {
  margin: 0;
  border: 1px solid #deded9;
  border-radius: 14px;
  page-break-inside: avoid;
  break-inside: avoid;
  background: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 14px 30px rgba(32, 32, 32, 0.08);
}

.receipt-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  width: 28px;
  height: 28px;
  border: 1px solid #deded9;
  background: #fff;
  box-shadow: 0 8px 18px rgba(32, 32, 32, 0.1);
}

.receipt-card img,
.pdf-receipt-frame {
  width: 100%;
  height: 360px;
  display: block;
  background: #f5f5f3;
}

.receipt-card img {
  object-fit: contain;
}

.pdf-receipt-frame {
  border: 0;
}

.pdf-receipt {
  height: 180px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  background: #f5f5f3;
  font-weight: 800;
}

.receipt-card figcaption {
  border-top: 1px solid #deded9;
  padding: 10px;
  display: grid;
  gap: 3px;
  font-size: 12px;
}

.receipt-card figcaption span {
  color: var(--muted);
}

.profile-view {
  padding: 0;
  overflow: auto;
  min-height: 0;
}

.profile-form {
  max-width: 980px;
  padding: 22px;
  display: grid;
  gap: 22px;
}

.form-block {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(42, 24, 48, 0.1);
  border-radius: 26px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.7);
}

.form-block:nth-child(1) {
  background: rgba(255, 244, 221, 0.72);
}

.form-block:nth-child(2) {
  background: rgba(234, 246, 251, 0.78);
}

.form-block:nth-child(3) {
  background: rgba(233, 247, 222, 0.72);
}

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

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(42, 24, 48, 0.16);
  border-radius: 999px;
  color: var(--ink);
  padding: 11px 13px;
  background: rgba(255, 253, 247, 0.76);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(165, 102, 120, 0.36);
  box-shadow: 0 0 0 4px rgba(165, 102, 120, 0.12);
}

textarea {
  min-height: 86px;
  resize: vertical;
  border-radius: 20px;
}

.profile-save {
  justify-self: start;
}

dialog {
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 30px;
  padding: 0;
  box-shadow: 0 28px 80px rgba(31, 20, 35, 0.24);
  background: var(--panel);
  backdrop-filter: blur(20px);
}

dialog::backdrop {
  background: rgba(42, 24, 48, 0.28);
  backdrop-filter: blur(10px);
}

.dialog-card {
  width: min(460px, calc(100vw - 28px));
  padding: 26px;
  display: grid;
  gap: 16px;
}

.dialog-card h3,
.dialog-card menu {
  margin: 0;
}

.dialog-card h3 {
  font-size: 34px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.04;
}

.date-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.checkbox-field {
  display: flex;
  width: fit-content;
  grid-template-columns: none;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.checkbox-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--leaf);
}

.dialog-card menu {
  padding: 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.paywall-dialog {
  max-width: min(980px, calc(100vw - 28px));
}

.paywall-card {
  width: min(980px, calc(100vw - 28px));
}

.paywall-heading {
  display: grid;
  gap: 8px;
}

.paywall-heading p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.paywall-plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.paywall-plans article {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 250px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 16px 40px rgba(32, 40, 50, 0.08);
}

.paywall-plans span {
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
}

.paywall-plans strong {
  color: var(--ink);
  font-size: 28px;
  line-height: 1.04;
}

.paywall-plans p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 980px) {
  .landing-nav {
    margin-bottom: 4px;
  }

  .landing-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 34px 0 42px;
  }

  .landing-copy {
    max-width: 100%;
  }

  .landing-copy h1 {
    font-size: 56px;
  }

  .landing-proof {
    grid-template-columns: 1fr;
  }

  .landing-selling {
    grid-template-columns: 1fr;
  }

  .paywall-plans {
    grid-template-columns: 1fr;
  }

  .app-shell {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .sidebar {
    min-height: auto;
    border-right: 1px solid rgba(255, 255, 255, 0.58);
    border-bottom: 1px solid rgba(255, 255, 255, 0.58);
    overflow: visible;
  }

  .mission-view {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .chat-panel {
    min-height: 520px;
  }

  body {
    overflow: auto;
  }
}

@media (max-width: 680px) {
  .landing-page {
    padding: 12px 10px 28px;
  }

  .landing-nav {
    align-items: flex-start;
  }

  .landing-login-button {
    min-height: 40px;
    padding: 0 16px;
  }

  .landing-hero {
    padding: 30px 0 34px;
    border-radius: 0;
  }

  .landing-hero-image {
    height: auto;
    border-radius: 18px;
  }

  .landing-copy h1 {
    font-size: 38px;
  }

  .landing-subtitle,
  .landing-promise,
  .selling-intro p,
  .selling-grid p {
    font-size: 16px;
  }

  .selling-intro h2 {
    font-size: 32px;
  }

  .selling-grid article {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .selling-grid span {
    grid-row: auto;
  }

  .landing-actions,
  .landing-actions .primary-button,
  .landing-actions .secondary-button {
    width: 100%;
  }

  .topbar,
  .chat-form,
  .form-grid,
  .date-row {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: stretch;
    display: grid;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .mission-view,
  .profile-view {
    padding: 12px;
  }

  .expense-report {
    padding: 12px;
  }

  .chat-form {
    left: 10px;
    right: 10px;
    bottom: 10px;
    grid-template-columns: 1fr;
    grid-template-areas:
      "input"
      "bulk"
      "send";
  }

  .upload-button,
  .send-button {
    width: 100%;
  }
}

@page {
  size: A4 landscape;
  margin: 12mm;
}

@media print {
  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body {
    background: #fff;
    overflow: visible;
  }

  .sidebar,
  .topbar,
  .chat-panel,
  .panel-title,
  .preview-tools,
  .preview-control-col,
  .receipt-delete {
    display: none !important;
  }

  .editable-expense-table {
    display: none !important;
  }

  .table-input {
    display: none !important;
    appearance: none;
    border: none;
    padding: 0;
    background: transparent;
    color: inherit;
  }

  .print-value {
    display: block;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .app-shell,
  .workspace,
  .mission-view,
  .preview-panel,
  .expense-report {
    display: block;
    padding: 0;
    border: none;
    box-shadow: none;
    overflow: visible;
  }

  .report-paper {
    width: 100%;
    min-width: 0;
    border: none;
    padding: 0;
    overflow: visible;
  }

  .expense-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    font-size: 9.5px;
    line-height: 1.25;
    page-break-inside: auto;
  }

  .expense-table th,
  .expense-table td {
    min-width: 0;
    padding: 5px 6px;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
  }

  .expense-table th {
    white-space: nowrap;
  }

  .expense-table tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .table-control-col {
    width: 0;
    visibility: collapse;
  }

  .table-date-col {
    width: 12%;
  }

  .table-category-col {
    width: 12%;
  }

  .table-vendor-col {
    width: 16%;
  }

  .table-description-col {
    width: 28%;
  }

  .table-vat-col {
    width: 9%;
  }

  .table-receipt-col {
    width: 12%;
  }

  .table-amount-col {
    width: 11%;
  }

  .print-value {
    display: block;
    white-space: normal;
    overflow-wrap: break-word;
  }

  td:nth-child(2) .print-value,
  td:nth-child(6) .print-value,
  td:nth-child(8) .print-value,
  .receipt-cell {
    white-space: nowrap;
    overflow-wrap: normal;
  }

  .print-expense-table {
    display: table;
    width: 100%;
    border-collapse: collapse;
    margin-top: 14px;
    table-layout: fixed;
    font-size: 10px;
    line-height: 1.28;
  }

  .print-expense-table th,
  .print-expense-table td {
    border: 1px solid var(--line);
    padding: 6px 7px;
    text-align: left;
    vertical-align: top;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
  }

  .print-expense-table th {
    background: #f3f3f3;
    white-space: nowrap;
  }

  .print-expense-table tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .print-date-col {
    width: 12%;
  }

  .print-category-col {
    width: 12%;
  }

  .print-vendor-col {
    width: 16%;
  }

  .print-description-col {
    width: 29%;
  }

  .print-vat-col {
    width: 9%;
  }

  .print-receipt-col {
    width: 11%;
  }

  .print-amount-col {
    width: 11%;
  }

  .print-expense-table td:nth-child(1),
  .print-expense-table td:nth-child(5),
  .print-expense-table td:nth-child(6),
  .print-expense-table td:nth-child(7) {
    white-space: nowrap;
  }

  .print-expense-table .amount {
    text-align: right;
  }

  .print-payment {
    color: #555;
  }

  .signature-section {
    margin-top: 18px;
    padding-top: 12px;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .signature-grid {
    gap: 12px;
  }

  .signature-card {
    padding: 10px;
  }

  .signature-date-input {
    display: none !important;
  }

  .note-number-field {
    display: block;
    margin: 5px 0 6px;
    color: #1f1f1f;
    font-size: 11px;
  }

  .note-number-field > span:first-child,
  .note-number-field input {
    display: none !important;
  }

  .note-number-print {
    display: inline;
  }

  .signature-date-print {
    display: inline;
  }

  .signature-date-field {
    grid-template-columns: auto auto;
    font-size: 10px;
  }

  .signature-empty-box {
    height: 64px;
  }

  .receipt-section {
    margin-top: 0;
    padding-top: 0;
    break-before: page;
    page-break-before: always;
  }

  .receipt-section h3 {
    margin: 0 0 7mm;
    font-size: 16px;
  }

  .receipt-grid {
    display: block;
    font-size: 0;
  }

  .receipt-card {
    width: calc((100% - 7mm) / 2);
    height: 82mm;
    display: inline-flex;
    flex-direction: column;
    margin: 0 0 7mm;
    vertical-align: top;
    font-size: 10px;
    overflow: hidden;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .receipt-card:nth-of-type(odd) {
    margin-right: 7mm;
  }

  .receipt-page-break {
    display: block;
    height: 0;
    overflow: hidden;
    clear: both;
    break-after: page;
    page-break-after: always;
  }

  .receipt-card img {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    max-height: none;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .receipt-card figcaption {
    flex: 0 0 auto;
    padding: 3mm;
    font-size: 9px;
    line-height: 1.2;
  }

  .pdf-receipt-frame {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    max-height: none;
    break-inside: avoid;
    page-break-inside: avoid;
  }
}
