/* ═══════════════════════════════════════════════════════════════════════
   FORJE APP — productivity surface
   Esthétique : continuité Forje (bleu nuit, accents chromatiques, DM Sans)
   mais dense et structurée — Linear/Granola-like.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  /* Backgrounds — light productivity surface */
  --app-bg:       #FAFAF8;    /* canvas — warm off-white, paper feel */
  --app-surface:  #FFFFFF;    /* panels, cards */
  --app-surface-2:#F4F4F2;    /* hover, subtle zone */
  --app-surface-3:#EDEDE9;    /* active, input bg */
  --app-line:     rgba(17, 24, 50, 0.06);
  --app-line-2:   rgba(17, 24, 50, 0.10);
  --app-line-3:   rgba(17, 24, 50, 0.16);

  /* Text — inky blue-black, not pure black */
  --app-fg:       #0F1528;
  --app-fg-2:     rgba(15, 21, 40, 0.78);
  --app-fg-3:     rgba(15, 21, 40, 0.55);
  --app-fg-4:     rgba(15, 21, 40, 0.38);

  /* Accent — Forje indigo, kept calm */
  --app-accent:   #4F5BD5;
  --app-accent-2: #7A5BF0;
  --app-accent-3: #0EA5C6;
  --chromatic: linear-gradient(95deg, #E8AE3D 0%, #E76FA5 22%, #9A6BE8 42%, #4F5BD5 62%, #0EA5C6 82%, #37BFDD 100%);

  /* Semantic */
  --app-success: #1F9D6A;
  --app-warn:    #D4942A;
  --app-danger:  #D14545;

  /* Sizing */
  --sidebar-w: 248px;
  --topbar-h: 56px;
  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--app-bg);
  color: var(--app-fg);
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button { font-family: inherit; }

/* Subtle tinted wash — barely-there productivity texture */
.app-bg-texture {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(79,91,213,0.05), transparent 65%),
    radial-gradient(ellipse 700px 500px at 95% 110%, rgba(14,165,198,0.04), transparent 65%);
}

/* ═══ App Shell ═════════════════════════════════════════════════════════ */

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

/* ─── Sidebar ─── */
.sidebar {
  position: sticky; top: 0;
  height: 100vh;
  background: var(--app-surface);
  border-right: 1px solid var(--app-line);
  display: flex;
  flex-direction: column;
  padding: 14px 10px 10px;
  z-index: 5;
}

.sidebar-brand-mark {
  width: 26px;
  height: 26px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 6px;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 18px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.035em;
  color: var(--app-fg);
  user-select: none;
}
.sidebar-brand .brand-suffix {
  font-size: 13px;
  font-weight: 400;
  color: var(--app-fg-3);
  letter-spacing: -0.01em;
}

/* Workspace switcher */
.workspace-switcher {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  margin: 0 -2px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .15s ease;
}
.workspace-switcher:hover { background: var(--app-surface-2); }
.workspace-avatar {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: linear-gradient(135deg, #E76FA5, #4F5BD5 60%, #0EA5C6);
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 1px 2px rgba(15,21,40,0.12);
}
.workspace-meta { flex: 1; min-width: 0; }
.workspace-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--app-fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}
.workspace-plan {
  font-size: 11px;
  color: var(--app-fg-3);
  font-variant: all-small-caps;
  letter-spacing: 0.08em;
}
.workspace-chev {
  color: var(--app-fg-4);
  flex-shrink: 0;
}

/* Search */
.sidebar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  margin-bottom: 14px;
  border-radius: var(--radius);
  background: var(--app-surface-2);
  border: 1px solid var(--app-line);
  color: var(--app-fg-3);
  font-size: 13px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.sidebar-search:hover { border-color: var(--app-line-2); }
.sidebar-search .kbd {
  margin-left: auto;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10.5px;
  color: var(--app-fg-4);
  background: var(--app-surface-3);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--app-line);
}

/* Nav sections */
.sidebar-section {
  margin-bottom: 14px;
}
.sidebar-section-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--app-fg-4);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 10px 4px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--radius);
  color: var(--app-fg-2);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: background .12s ease, color .12s ease;
  position: relative;
  user-select: none;
}
.sidebar-item:hover {
  background: var(--app-surface-2);
  color: var(--app-fg);
}
.sidebar-item.active {
  background: var(--app-surface-3);
  color: var(--app-fg);
}
.sidebar-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 18px;
  background: var(--chromatic);
  border-radius: 0 3px 3px 0;
  filter: saturate(1.2);
}
.sidebar-item .icon {
  width: 16px; height: 16px;
  color: currentColor;
  opacity: 0.75;
  flex-shrink: 0;
}
.sidebar-item.active .icon { opacity: 1; }
.sidebar-item .count {
  margin-left: auto;
  font-size: 11px;
  color: var(--app-fg-4);
  font-variant-numeric: tabular-nums;
}
.sidebar-item .count.badge {
  background: var(--app-surface-3);
  padding: 1px 7px;
  border-radius: 20px;
  color: var(--app-fg-2);
  font-weight: 600;
}

/* Sidebar — account switcher */
.sidebar-accounts {
  margin: 3px 0 6px 13px;
  padding-left: 10px;
  border-left: 1.5px solid var(--app-line);
}
.sidebar-account-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: calc(var(--radius) - 1px);
  cursor: pointer;
  transition: background .12s;
  position: relative;
}
.sidebar-account-item:hover { background: var(--app-surface-2); }
.sidebar-account-item.active { background: var(--app-surface-3); }
.sidebar-account-avatar {
  width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; letter-spacing: 0;
  background: var(--app-surface-3); border: 1px solid var(--app-line);
  color: var(--app-fg-2); overflow: hidden;
}
.sidebar-account-item.active .sidebar-account-avatar {
  background: var(--app-accent); border-color: var(--app-accent); color: #fff;
}
.sidebar-account-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 5px; }
.sidebar-account-meta { flex: 1; min-width: 0; }
.sidebar-account-name {
  font-size: 12px; font-weight: 500; color: var(--app-fg-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.35;
}
.sidebar-account-item.active .sidebar-account-name { color: var(--app-fg); }
.sidebar-account-handle {
  font-size: 10.5px; color: var(--app-fg-4);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.3;
}
.sidebar-account-add {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 8px; border-radius: calc(var(--radius) - 1px);
  cursor: pointer; color: var(--app-fg-4); font-size: 11.5px;
  transition: color .12s, background .12s;
  margin-top: 2px;
}
.sidebar-account-add:hover { color: var(--app-accent); background: var(--app-surface-2); }

/* Sidebar footer */
.sidebar-footer {
  margin-top: auto;
  padding: 12px 4px 4px;
  border-top: 1px solid var(--app-line);
}
.sidebar-usage {
  padding: 10px;
  border-radius: var(--radius);
  background: var(--app-surface-2);
  border: 1px solid var(--app-line);
}
.sidebar-usage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-bottom: 8px;
}
.sidebar-usage-label { color: var(--app-fg-2); font-weight: 500; }
.sidebar-usage-count {
  font-variant-numeric: tabular-nums;
  color: var(--app-fg-3);
  font-size: 11.5px;
}
.sidebar-usage-bar {
  height: 4px;
  background: var(--app-surface-3);
  border-radius: 2px;
  overflow: hidden;
}
.sidebar-usage-fill {
  height: 100%;
  background: var(--chromatic);
  border-radius: 2px;
}
.sidebar-usage-cta {
  display: block;
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--app-accent-3);
  font-weight: 500;
  cursor: pointer;
}

.sidebar-user {
  position: relative;
  margin-top: 4px;
}
.sidebar-user-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .12s ease;
}
.sidebar-user-trigger:hover { background: var(--app-surface-2); }
.sidebar-user-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0EA5C6, #4F5BD5);
  display: grid; place-items: center;
  font-weight: 600;
  font-size: 11.5px;
  color: #fff;
  flex-shrink: 0;
}
.sidebar-user-name {
  flex: 1;
  font-size: 13px;
  color: var(--app-fg-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-chev {
  color: var(--app-fg-4);
  flex-shrink: 0;
  transition: transform .15s ease;
}
.sidebar-user-chev.open { transform: rotate(180deg); }

/* User dropdown menu */
.sidebar-user-menu {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15,21,40,0.1), 0 2px 6px rgba(15,21,40,0.06);
  overflow: hidden;
  padding: 6px 0;
  z-index: 200;
}
.sum-email {
  padding: 7px 14px 4px;
  font-size: 12px;
  color: var(--app-fg-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sum-badge {
  display: inline-block;
  margin: 2px 14px 8px;
  padding: 2px 8px;
  background: var(--app-surface-2);
  border: 1px solid var(--app-line);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--app-fg-3);
  text-transform: capitalize;
}
.sum-divider {
  height: 1px;
  background: var(--app-line);
  margin: 2px 0;
}
.sum-signout {
  all: unset;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  padding: 9px 14px;
  font-size: 13px;
  font-family: inherit;
  color: var(--app-fg-2);
  cursor: pointer;
  transition: background .12s, color .12s;
}
.sum-signout:hover {
  background: rgba(197,48,48,0.06);
  color: #C53030;
}

/* ═══ Main content area ═════════════════════════════════════════════════ */
.app-main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

.topbar {
  height: var(--topbar-h);
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--app-line);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 4;
}
.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--app-fg-3);
  font-weight: 500;
  letter-spacing: -0.01em;
}
.topbar-breadcrumb .crumb-sep { color: var(--app-fg-4); font-size: 12px; }
.topbar-breadcrumb .crumb-current { color: var(--app-fg); font-weight: 600; }

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease, border-color .15s ease, color .15s ease;
  white-space: nowrap;
  user-select: none;
  line-height: 1;
  position: relative;
  overflow: hidden;
}
.btn:active { transform: translateY(0.5px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn:disabled::before { display: none; }

.btn-primary {
  background: var(--app-accent);
  color: #FFFFFF;
  border-color: transparent;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.22),
    inset 0 -1px 0 rgba(0,0,0,0.18),
    0 6px 18px rgba(79,91,213,0.32);
}
.btn-primary::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,0.18) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.7s ease;
}
.btn-primary:hover::before { transform: translateX(100%); }
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.25),
    0 10px 28px rgba(79,91,213,0.42);
}

.btn-ghost {
  background: transparent;
  color: var(--app-fg-2);
  border-color: var(--app-line-2);
}
.btn-ghost:hover {
  background: rgba(79,91,213,0.06);
  color: var(--app-fg);
  border-color: rgba(140,160,255,0.4);
}

.btn-accent {
  background: rgba(79,91,213,0.1);
  color: var(--app-accent);
  border-color: rgba(79,91,213,0.2);
}
.btn-accent::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,0.14) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.7s ease;
}
.btn-accent > * { position: relative; z-index: 1; }
.btn-accent:hover::before { transform: translateX(100%); }
.btn-accent:hover {
  background: rgba(79,91,213,0.15);
  border-color: rgba(79,91,213,0.35);
}

.btn-sm { padding: 5px 11px; font-size: 12px; }
.btn-lg { padding: 10px 22px; font-size: 14px; }
.btn-icon {
  width: 30px; height: 30px; padding: 0;
  border-radius: 999px;
  display: grid; place-items: center;
}

@keyframes pageEnter {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Page content wrapper ─── */
.page-body {
  animation: pageEnter 0.22s ease-out;
  padding: 28px 32px 64px;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
}

.page-header {
  margin-bottom: 24px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}
.page-title {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0 0 4px;
  color: var(--app-fg);
}
.page-subtitle {
  font-size: 13.5px;
  color: var(--app-fg-3);
  margin: 0;
  max-width: 540px;
}
.page-header-actions { display: flex; gap: 8px; }

/* ─── Cards / panels shared ─── */
.card {
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.card-pad { padding: 20px; }
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--app-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--app-fg);
}
.card-subtitle {
  font-size: 12.5px;
  color: var(--app-fg-3);
  margin-top: 2px;
}

/* Section tag (used near cards and in page headers) */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 5px;
  background: var(--app-surface-3);
  color: var(--app-fg-2);
  border: 1px solid var(--app-line);
  line-height: 1.4;
}
.tag-dot::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.tag-success { color: var(--app-success); }
.tag-warn    { color: var(--app-warn); }
.tag-danger  { color: var(--app-danger); }
.tag-accent  { color: var(--app-accent-3); }

/* Kbd */
.kbd {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10.5px;
  background: var(--app-surface-3);
  border: 1px solid var(--app-line);
  color: var(--app-fg-2);
  border-radius: 4px;
  line-height: 1.4;
}

/* Scrollbar nicer */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(17, 24, 50, 0.15);
  border-radius: 5px;
  border: 2px solid var(--app-bg);
}
::-webkit-scrollbar-thumb:hover { background: rgba(17, 24, 50, 0.28); }

/* ─── Command Palette ──────────────────────────────────────────────────── */
.cmd-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.35);
  backdrop-filter: blur(4px); z-index: 900;
  animation: fadeIn .12s ease;
}
.cmd-palette {
  position: fixed; top: 20%; left: 50%; transform: translateX(-50%);
  width: min(520px, 90vw); background: var(--app-surface);
  border: 1px solid var(--app-line-2); border-radius: 14px;
  box-shadow: 0 24px 64px rgba(0,0,0,.18), 0 4px 16px rgba(0,0,0,.08);
  z-index: 901; overflow: hidden;
  animation: cmdSlideIn .14s ease;
}
@keyframes cmdSlideIn {
  from { opacity:0; transform: translateX(-50%) translateY(-8px) scale(.98); }
  to   { opacity:1; transform: translateX(-50%) translateY(0) scale(1); }
}
.cmd-input-row {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--app-line);
}
.cmd-search-icon { color: var(--app-fg-4); flex-shrink: 0; }
.cmd-input {
  flex: 1; background: transparent; border: none; outline: none;
  font-size: 15px; color: var(--app-fg); font-family: inherit;
}
.cmd-input::placeholder { color: var(--app-fg-4); }
.cmd-list { padding: 6px; }
.cmd-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 12px; border-radius: 8px;
  background: transparent; border: none; cursor: pointer;
  font-size: 13.5px; color: var(--app-fg-2); font-family: inherit;
  transition: background .1s;
  text-align: left;
}
.cmd-item:hover { background: var(--app-surface-2); color: var(--app-fg); }

/* ─── Brand Score Chip (sidebar) ───────────────────────────────────────── */
.sidebar-brand-score {
  margin-left: auto; font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: 20px;
  background: rgba(245,158,11,.12); color: #D97706;
  letter-spacing: 0.02em;
}

/* ─── Bouncing block loader ─────────────────────────────────────────────── */
.gen-bounce-loader {
  width: 48px; height: 48px; position: relative; display: inline-block;
}
.gen-bounce-loader::before {
  content: ''; width: 48px; height: 5px;
  background: rgba(79,91,213,.25);
  position: absolute; top: 60px; left: 0;
  border-radius: 50%;
  animation: gbl-shadow .5s linear infinite;
}
.gen-bounce-loader::after {
  content: ''; width: 100%; height: 100%;
  background: var(--app-accent);
  position: absolute; top: 0; left: 0;
  border-radius: 4px;
  animation: gbl-jump .5s linear infinite;
}
.gen-bounce-loader--sm {
  width: 16px; height: 16px; position: relative; display: inline-block; flex-shrink: 0;
}
.gen-bounce-loader--sm::after {
  content: ''; width: 100%; height: 100%;
  background: currentColor;
  position: absolute; top: 0; left: 0;
  border-radius: 2px;
  animation: gbl-jump-sm .5s linear infinite;
}
@keyframes gbl-jump {
  15%  { border-bottom-right-radius: 3px; }
  25%  { transform: translateY(9px) rotate(22.5deg); }
  50%  { transform: translateY(18px) scale(1,.9) rotate(45deg); border-bottom-right-radius: 40px; }
  75%  { transform: translateY(9px) rotate(67.5deg); }
  100% { transform: translateY(0) rotate(90deg); }
}
@keyframes gbl-shadow {
  0%, 100% { transform: scale(1,1); }
  50%       { transform: scale(1.2,1); }
}
@keyframes gbl-jump-sm {
  15%  { border-bottom-right-radius: 1px; }
  25%  { transform: translateY(3px) rotate(22.5deg); }
  50%  { transform: translateY(6px) scale(1,.9) rotate(45deg); border-bottom-right-radius: 12px; }
  75%  { transform: translateY(3px) rotate(67.5deg); }
  100% { transform: translateY(0) rotate(90deg); }
}

/* ─── Floating Gen Toast ────────────────────────────────────────────────── */
.gen-toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 800;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 12px;
  background: var(--app-surface); border: 1px solid var(--app-line-2);
  box-shadow: 0 8px 32px rgba(0,0,0,.14), 0 2px 8px rgba(0,0,0,.06);
  min-width: 280px; max-width: 380px;
  animation: toastSlide .22s cubic-bezier(.34,1.56,.64,1);
}
@keyframes toastSlide {
  from { opacity:0; transform: translateY(16px) scale(.96); }
  to   { opacity:1; transform: translateY(0) scale(1); }
}
.gen-toast--ready {
  border-color: rgba(79,91,213,.4);
  animation: toastSlide .35s cubic-bezier(.34,1.56,.64,1), toastReadyGlow 1.4s ease-out .25s;
}
@keyframes toastReadyGlow {
  0%   { box-shadow: 0 8px 32px rgba(0,0,0,.14), 0 0 0 0 rgba(79,91,213,.55); }
  60%  { box-shadow: 0 8px 32px rgba(0,0,0,.14), 0 0 0 10px rgba(79,91,213,.06); }
  100% { box-shadow: 0 8px 32px rgba(0,0,0,.14), 0 0 0 0 rgba(79,91,213,0); }
}
.gen-toast-icon { flex-shrink: 0; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--app-surface-2); }
.gen-toast-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gen-toast-label { font-size: 13px; font-weight: 600; color: var(--app-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gen-toast-action { font-size: 11.5px; color: var(--app-accent); font-weight: 600; }
.gen-toast-cancel {
  flex-shrink: 0; background: none; border: 1px solid var(--app-line-2); border-radius: 5px;
  cursor: pointer; font-size: 11px; font-weight: 600; color: var(--app-fg-3);
  padding: 3px 7px; line-height: 1; white-space: nowrap; transition: border-color .15s, color .15s;
}
.gen-toast-cancel:hover { border-color: var(--app-fg-3); color: var(--app-fg); }
.gen-toast-close {
  flex-shrink: 0; background: none; border: none; cursor: pointer;
  font-size: 16px; color: var(--app-fg-4); padding: 0 2px; line-height: 1;
}
.gen-toast-close:hover { color: var(--app-fg-2); }

@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
