/* chat.ecomstat.io's layout (Montserrat, the ecomstat.io wordmark, its login
   card) in the desktop app's own greens: the tokens below are
   src/renderer/styles.css's, and /brand holds the app's green wordmarks. */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/montserrat-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/montserrat-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light dark;
  --h-background: 165 18% 97%;
  --h-card: 0 0% 100%;
  --h-foreground: 170 30% 9%;
  --h-muted: 165 14% 91%;
  --h-muted-foreground: 170 18% 18%;
  --h-border: 165 12% 84%;
  --h-input: 165 12% 89%;
  --h-primary: 160 84% 28%;
  --h-primary-strong: 160 88% 22%;
  --h-primary-foreground: 0 0% 100%;
  --h-destructive: 0 72% 51%;
  --radius: 0.625rem;

  --bg: hsl(var(--h-background));
  --card: hsl(var(--h-card));
  --text: hsl(var(--h-foreground));
  --muted: hsl(var(--h-muted-foreground));
  --border: hsl(var(--h-border));
  --primary: hsl(var(--h-primary));
  --danger: hsl(var(--h-destructive));
  --shadow: 0 1px 2px hsl(0 0% 0% / 0.04), 0 12px 32px hsl(0 0% 0% / 0.07);
}

@media (prefers-color-scheme: dark) {
  :root {
    --h-background: 170 26% 7%;
    --h-card: 170 22% 11%;
    --h-foreground: 160 12% 95%;
    --h-muted: 170 18% 15%;
    --h-muted-foreground: 165 10% 68%;
    --h-border: 170 14% 21%;
    --h-input: 170 16% 17%;
    --h-primary: 158 62% 46%;
    --h-primary-strong: 160 65% 58%;
    --h-primary-foreground: 172 40% 8%;
    --h-destructive: 0 72% 60%;
    --shadow: 0 1px 2px hsl(0 0% 0% / 0.3), 0 12px 32px hsl(0 0% 0% / 0.35);
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, hsl(var(--h-primary) / 0.13), transparent 70%) no-repeat,
    var(--bg);
  color: var(--text);
  font: 15px/1.5 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

a:hover {
  text-decoration: underline;
}

h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h2 {
  margin: 8px 0 0;
  font-size: 1.3rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: var(--radius);
  background: linear-gradient(135deg, hsl(var(--h-primary)), hsl(var(--h-primary-strong)));
  color: hsl(var(--h-primary-foreground));
  font: inherit;
  font-weight: 600;
  padding: 0 16px;
  cursor: pointer;
}

button:hover:not(:disabled) {
  filter: brightness(1.07);
}

button:disabled {
  opacity: 0.6;
  cursor: default;
}

button.plain {
  background: none;
  color: var(--primary);
  padding: 0 4px;
}

input,
.typed {
  width: 100%;
  min-height: 44px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

input::placeholder,
.typed::placeholder {
  color: hsl(var(--h-muted-foreground) / 0.7);
}

input:focus,
.typed:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px hsl(var(--h-primary) / 0.16);
}

/* Sign-in: chat.ecomstat.io's login card. */
.login-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
}

.login-card {
  margin: auto 0 0;
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 32px;
  box-shadow: var(--shadow);
  text-align: center;
}

.login-logo {
  display: block;
  width: 148px;
  margin: 0 auto 8px;
}

.login-product {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.login-sub {
  color: var(--muted);
  margin: 10px 0 28px;
  font-size: 14px;
  line-height: 1.55;
}

.login-card form {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.login-card label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 7px;
  letter-spacing: 0.01em;
}

.login-card input {
  margin-bottom: 18px;
}

.login-card button[type='submit'] {
  padding: 13px;
}

.login-card button.plain {
  margin-top: 10px;
}

.login-foot {
  margin: 20px 0 auto;
  font-size: 13px;
}

/* Signed in. */
.topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: 0 -16px 8px;
  padding: 0 16px;
  background: hsl(var(--h-background) / 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

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

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

.brand-product {
  padding-left: 10px;
  border-left: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.page-title {
  margin: 16px 0 14px;
}

.error {
  color: var(--danger);
}

.status {
  color: var(--muted);
  font-size: 0.875rem;
}

.app {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px 32px;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
}

.search {
  margin-bottom: 12px;
}

.notes {
  list-style: none;
  margin: 0;
  padding: 0;
}

.note-row {
  border-radius: 12px;
  box-shadow: 0 1px 2px hsl(0 0% 0% / 0.04);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  height: auto;
  margin-bottom: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-weight: 400;
  text-align: left;
}

.note-title {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.snippet {
  margin-top: 4px;
}

.more {
  width: 100%;
}

.tabs {
  display: flex;
  gap: 8px;
  margin: 12px 0;
  border-bottom: 1px solid var(--border);
}

.tabs button {
  border-radius: 0;
  background: none;
  color: var(--muted);
}

.tabs button[aria-selected='true'] {
  border-bottom: 2px solid var(--primary);
  color: var(--text);
}

.note-body,
.transcript {
  overflow-wrap: anywhere;
}

.recorder {
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
}

.recorder .status {
  margin: 8px 0 0;
}

.record,
.stop {
  min-height: 52px;
  font-size: 1.1rem;
}

.record {
  width: 100%;
}

.stop {
  background: var(--danger);
  padding: 0 28px;
}

.recording-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.label {
  display: block;
  margin: 16px 0 6px;
  font-weight: 600;
}

.typed {
  width: 100%;
  min-height: 30vh;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  font: inherit;
  resize: vertical;
}

.live {
  max-height: 38vh;
  overflow-y: auto;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
}

.live p {
  margin: 0 0 8px;
}

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

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--danger);
  animation: pulse 1.2s ease-in-out infinite;
}

.clock {
  font-size: 1.6rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

@keyframes pulse {
  50% {
    opacity: 0.3;
  }
}

.today {
  list-style: none;
  margin: 0;
  padding: 0;
}

.today li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.today .meeting {
  flex: 1;
  min-width: 0;
}

.today .meeting strong {
  display: block;
  overflow-wrap: anywhere;
}

.today button {
  background: var(--danger);
}

.answer {
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  overflow-wrap: anywhere;
}

.answer p:first-child {
  margin-top: 0;
}

.sources {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sources button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border);
  background: none;
  color: var(--primary);
  font-weight: 400;
  font-size: 0.875rem;
}


/* /download */
.dl-card {
  max-width: 440px;
}

.dl-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  text-align: left;
}

.dl-button {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 13px 16px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, hsl(var(--h-primary)), hsl(var(--h-primary-strong)));
  color: hsl(var(--h-primary-foreground));
}

.dl-button:hover {
  text-decoration: none;
  filter: brightness(1.07);
}

.dl-label {
  font-weight: 600;
}

.dl-meta {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.85;
}

.dl-version {
  margin: 20px 0 0;
  font-size: 12px;
  color: var(--muted);
}
