/* Mail Pro.io design system 2.0: design tokens and base styles.
   Flat SaaS design with solid surfaces, no glass and no blur (owner's master prompt, 21 Nov 2026).
   Typeface Manrope. Brand colours: primary #155EEF, secondary #3985FF, dark background
   #080D1B, light background #F5F7FB, text #111827, white #FFFFFF.
   Every colour, surface, size and timing used by components comes from here.
   Light theme on :root, dark theme on [data-theme="dim"] (the stored value keeps its 1.x name). */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/static/fonts/Manrope-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;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/static/fonts/Manrope-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;
}

:root {
  color-scheme: light;

  /* Brand */
  --brand-primary: #155eef;
  --brand-secondary: #3985ff;
  --brand-navy: #080d1b;

  /* Accent. --accent-fill: button and badge fills (white text on #155EEF is 5.3:1), in both
     themes. --accent: indicators, borders, focus. --accent-strong / --accent-text: accent as text. */
  --accent-fill: #155eef;
  --accent: #155eef;
  --accent-strong: #155eef;
  --accent-hover: #0f4fd6;
  --accent-soft: #eaf1fe;
  --accent-soft-strong: #d6e4fd;
  --accent-ink: #ffffff;
  --accent-text: #1149c9;              /* accent used as text on light surfaces: 6.6:1 on white */

  /* Status colours: the strong colour is also used as text on its soft background (4.5:1+) */
  --success: #067647;
  --success-soft: #ecfdf3;
  --warning: #a24400;
  --warning-soft: #fff6e5;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --info: #1149c9;
  --info-soft: #eaf1fe;

  /* Text: every pairing meets WCAG AA on --surface and on --canvas */
  --text: #111827;
  --text-muted: #475467;
  --text-subtle: #5b6779;
  --text-on-accent: #ffffff;
  --link: #155eef;
  --border-input: #8592a6;              /* form control edges: 3:1 on white */

  /* Surfaces: the page, chrome (sidebar and top bar), content, raised (menus and dialogs) */
  --canvas: #f5f7fb;
  --chrome: #ffffff;
  --chrome-border: #e4e9f1;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --surface-sunken: #f2f5fa;
  --surface-hover: #f2f5fa;
  --raised: #ffffff;
  --border: #e4e9f1;
  --border-strong: #cfd7e3;

  /* Kept for components written before 2.0; flat now */
  --highlight: transparent;
  --sheen: transparent;
  --glass-blur: 0px;
  --glass-saturate: 100%;
  --canvas-glow-1: transparent;
  --canvas-glow-2: transparent;
  --canvas-glow-3: transparent;

  /* Elevation: quiet, for separation only */
  --shadow-1: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-2: 0 2px 4px -2px rgba(16, 24, 40, .06), 0 4px 10px -2px rgba(16, 24, 40, .08);
  --shadow-3: 0 4px 6px -2px rgba(16, 24, 40, .04), 0 14px 28px -6px rgba(16, 24, 40, .14);
  --shadow-accent: 0 1px 2px rgba(16, 24, 40, .08);
  --focus-ring: 0 0 0 4px rgba(21, 94, 239, .20);

  /* Shape */
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-pill: 999px;

  /* Spacing (4 px grid) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-7: 32px;
  --s-8: 40px;
  --s-9: 56px;

  /* Type */
  --font: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-md: 14px;
  --fs-lg: 16px;
  --fs-xl: 18px;
  --fs-2xl: 24px;
  --fs-3xl: 30px;
  --fs-4xl: 46px;
  --lh-tight: 1.2;
  --lh-normal: 1.55;

  /* Motion */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --t-fast: 120ms;
  --t-med: 200ms;

  /* Layout */
  --sidebar-w: 256px;
  --topbar-h: 64px;
  --content-max: 1240px;
}

[data-theme="dim"] {
  color-scheme: dark;
  /* Dark theme on the brand navy #080D1B. Buttons keep the primary blue (white text 5.3:1);
     accent text uses a lighter blue, as the dark logo uses the secondary blue. */
  --accent-fill: #155eef;
  --accent: #3985ff;
  --accent-strong: #7fb0ff;
  --accent-hover: #2a6cf5;
  --accent-soft: #10244a;
  --accent-soft-strong: #16305f;
  --accent-ink: #ffffff;
  --accent-text: #7fb0ff;

  --success: #5fd49a;
  --success-soft: #0c2a1d;
  --warning: #f5b84f;
  --warning-soft: #2c210c;
  --danger: #ff8a80;
  --danger-soft: #331516;
  --info: #7fb0ff;
  --info-soft: #10244a;

  --text: #f5f7fb;
  --text-muted: #b8c2d4;
  --text-subtle: #9aa6bb;
  --text-on-accent: #ffffff;
  --link: #7fb0ff;
  --border-input: #64739a;

  --canvas: #080d1b;
  --chrome: #0c1324;
  --chrome-border: #1c2640;
  --surface: #0f172b;
  --surface-strong: #121b31;
  --surface-sunken: #0a1121;
  --surface-hover: #16203a;
  --raised: #141d34;
  --border: #1f2a45;
  --border-strong: #2d3a5c;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-2: 0 2px 4px -2px rgba(0, 0, 0, .40), 0 6px 14px -4px rgba(0, 0, 0, .45);
  --shadow-3: 0 6px 10px -4px rgba(0, 0, 0, .45), 0 18px 36px -8px rgba(0, 0, 0, .60);
  --shadow-accent: 0 1px 2px rgba(0, 0, 0, .40);
  --focus-ring: 0 0 0 4px rgba(57, 133, 255, .32);
}

@media (prefers-contrast: more) {
  :root { --border: #b3bdcc; --border-strong: #8592a6; --text-muted: #344054; --text-subtle: #3f4b5c; }
  [data-theme="dim"] { --border: #3d4b70; --border-strong: #64739a; --text-muted: #dbe2ee; --text-subtle: #c9d2e0; }
}
@media (prefers-reduced-motion: reduce) {
  :root { --t-fast: 0ms; --t-med: 0ms; }
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--canvas); }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: var(--lh-normal);
  color: var(--text);
  background: var(--canvas);
  font-feature-settings: "tnum" 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4 { margin: 0; line-height: var(--lh-tight); letter-spacing: -0.02em; font-weight: 700; color: var(--text); }
h1 { font-size: var(--fs-3xl); font-weight: 800; letter-spacing: -0.025em; }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
p { margin: 0 0 var(--s-3); }
a { color: var(--link); text-decoration: none; text-underline-offset: 3px; font-weight: 600; }
a:hover { text-decoration: underline; }
code, kbd, pre { font-family: var(--font-mono); font-size: .92em; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--accent-soft-strong); }
/* A real outline: never hidden by component shadows, shown in forced colours */
:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
/* Regions that receive focus from script (results, main content) so screen readers announce
   them: no ring, they are not controls. */
[tabindex="-1"]:focus { outline: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-muted); }
.subtle { color: var(--text-subtle); }
.small { font-size: var(--fs-sm); }
.mono { font-family: var(--font-mono); font-size: .92em; }
.nowrap { white-space: nowrap; }
.wrap { overflow-wrap: anywhere; }
.grow { flex: 1 1 260px; }

/* Helpers in place of style="" (forbidden by the CSP); they win like inline styles did. */
.mt-2 { margin-top: var(--s-2) !important; }
.mt-4 { margin-top: var(--s-4) !important; }
.mt-5 { margin-top: var(--s-5) !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: var(--s-2) !important; }
.mb-3 { margin-bottom: var(--s-3) !important; }
.mb-5 { margin-bottom: var(--s-5) !important; }
.p-0 { padding: 0 !important; }
.p-4 { padding: var(--s-4) !important; }
.gap-4 { gap: var(--s-4) !important; }
.justify-center { justify-content: center !important; }
.justify-between { justify-content: space-between !important; }
.justify-end { justify-content: flex-end !important; }
