@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,300;0,14..32,400;0,14..32,500;0,14..32,600;0,14..32,700;1,14..32,400&display=swap');@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600;700&display=swap');

/* @import 'vaul/style.css'; */

/*
 * CSS reset — adapted from Tailwind CSS preflight.
 * Normalizes browser defaults for consistent rendering.
 */
*,
::before,
::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: currentColor;
}

html {
  -moz-tab-size: 4;
  tab-size: 4;
}

body {
  margin: 0;
  font-family: inherit;
  line-height: inherit;
}

hr {
  height: 0;
  color: inherit;
}

abbr[title] {
  text-decoration: underline dotted;
}

b,
strong {
  font-weight: bolder;
}

code,
kbd,
samp,
pre {
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
    monospace;
  font-size: 1em;
}

small {
  font-size: 80%;
}

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

table {
  text-indent: 0;
  border-color: inherit;
}

button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  font-feature-settings: inherit;
  font-variation-settings: inherit;
  font-size: 100%;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
  border: 0;
}

button,
select {
  text-transform: none;
}

button,
[type='button'],
[type='reset'],
[type='submit'] {
  -webkit-appearance: button;
  cursor: pointer;
}

:-moz-focusring {
  outline: auto;
}

:-moz-ui-invalid {
  box-shadow: none;
}

progress {
  vertical-align: baseline;
}

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}

[type='search'] {
  -webkit-appearance: textfield;
  outline-offset: -2px;
}

::-webkit-search-decoration {
  -webkit-appearance: none;
}

::-webkit-file-upload-button {
  -webkit-appearance: button;
  font: inherit;
}

summary {
  display: list-item;
}

blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
  margin: 0;
}

pre {
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: pre-wrap;
}

fieldset {
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

ol,
ul,
menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

dialog {
  padding: 0;
}

textarea {
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  opacity: 1;
  color: var(--muted);
}

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
  vertical-align: middle;
}

img,
video {
  max-width: 100%;
  height: auto;
}

[hidden] {
  display: none;
}

:root {
  /* ── Colors ─────────────────────────────── */
  --bg: #f6f4ef;
  --surface: #fffefb;
  --surface-2: #f0ece6;
  --text: #171717;
  --muted: #666b73;
  --border: #d9d4ca;
  --surface-hover: #eae4dc;
  --accent: #2e7d5b;
  --accent-hover: #256b4d;
  --accent-soft: #d4ede2;
  --success: #2e8b57;
  --warning: #a97a1a;
  --danger: #b93a3a;
  --danger-hover: #a03030;

  /* ── Radius ──────────────────────────────── */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* ── Spacing (4px base) ──────────────────── */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;

  /* ── Typography ──────────────────────────── */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Inter Tight', 'Inter', system-ui, sans-serif;
  --font-mono: 'ui-monospace', 'SFMono-Regular', 'Menlo', monospace;

  /* Font sizes */
  --text-xs: 11px;
  --text-sm: 12px;
  --text-base: 13px;
  --text-md: 14px;
  --text-lg: 16px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 28px;

  /* Font weights */
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* Line heights */
  --leading-tight: 1.2;
  --leading-snug: 1.35;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;

  /* Letter spacing */
  --tracking-tight: -0.04em;
  --tracking-snug: -0.02em;
  --tracking-normal: 0;
  --tracking-wide: 0.04em;
  --tracking-wider: 0.06em;
}

.dark {
  --bg: #111318;
  --surface: #171a20;
  --surface-2: #1e232b;
  --text: #f2f4f8;
  --muted: #a5adba;
  --border: #2a313b;
  --surface-hover: #212933;
  --accent: #3da67a;
  --accent-hover: #47b37a;
  --accent-soft: #1a2e26;
  --success: #47b37a;
  --warning: #d5a84a;
  --danger: #e05b5b;
  --danger-hover: #c94040;
}

html {
  font-family: var(--font-sans);
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: var(--text-md);
  line-height: var(--leading-normal);
  color: var(--text);
  scrollbar-gutter: stable;
  background-color: var(--bg);
}

/* Viewport */
html,
body {
  height: 100%;
  /* Prevent iOS bounce scroll from causing layout issues */
  overscroll-behavior: none;
}

/* Horizontal scroll containers keep hairlines clean */
.menu-scroll {
  scrollbar-width: none;
}

.menu-scroll::-webkit-scrollbar {
  display: none;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* Selection */
::selection {
  background-color: var(--accent-soft);
  color: var(--text);
}

/* Sidebar collapsed user — show logout icon on hover */
.logout-overlay {
  opacity: 0;
}

.group-user:hover .logout-overlay {
  opacity: 1;
}

/* ── Component animations ─────────────────────────────────── */
@keyframes pl-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pl-scale-in {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes pl-slide-in-right {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes pl-slide-up {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

/* ── Composer input ─────────────────────────────────────────────────────── */
.composer-input {
  width: 100%;
  min-height: 40px;
  font-size: var(--text-base);
  font-family: var(--font-sans);
  line-height: var(--leading-relaxed);
  padding: var(--space-1) var(--space-2);
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  color: var(--text);
}

/* ── Tiptap / ProseMirror editor ──────────────────────────── */
.ProseMirror {
  outline: none;
  min-height: 4em;
}

.ProseMirror p {
  margin: 0 0 var(--space-2);
}

.ProseMirror p:last-child {
  margin-bottom: 0;
}

.ProseMirror ul,
.ProseMirror ol {
  padding-left: var(--space-6);
  margin: 0 0 var(--space-2);
}

.ProseMirror ul {
  list-style: disc;
}

.ProseMirror ol {
  list-style: decimal;
}

.ProseMirror li {
  margin-bottom: var(--space-1);
}

.ProseMirror li p {
  margin: 0;
}

.ProseMirror .is-empty::before {
  content: attr(data-placeholder);
  float: left;
  color: var(--muted);
  pointer-events: none;
  height: 0;
}
