/* KW Birlik Group — Executive Cockpit
   Apple HIG + Liquid Glass + KW Red */

:root {
  /* KW palette */
  --kw-red: #C8102E;
  --kw-red-soft: #E63946;
  --kw-red-glow: #FF4D6D;
  --kw-red-gradient: linear-gradient(135deg, #C8102E 0%, #E63946 100%);
  --kw-red-halo: 0 0 24px -4px rgba(200, 16, 46, 0.35);
  --kw-red-soft-bg: rgba(200, 16, 46, 0.06);

  /* Light neutrals */
  --bg-primary: #FAFAFA;
  --bg-elevated: #FFFFFF;
  --bg-tinted: #F5F5F7;
  --bg-glass: rgba(255, 255, 255, 0.66);
  --bg-glass-hi: rgba(255, 255, 255, 0.82);
  --bg-glass-strong: rgba(255, 255, 255, 0.90);

  --text-primary: #1D1D1F;
  --text-secondary: #6E6E73;
  --text-tertiary: #A1A1A6;

  --separator: rgba(60, 60, 67, 0.14);
  --separator-strong: rgba(60, 60, 67, 0.22);

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04), 0 1px 1px rgba(0,0,0,0.03);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-lg: 0 24px 60px -20px rgba(0,0,0,0.18), 0 8px 24px -8px rgba(0,0,0,0.08);
  --shadow-glow: 0 0 0 1px rgba(200,16,46,0.15), 0 8px 32px -8px rgba(200,16,46,0.25);

  /* ========== AURORA — multi-layer radial atmosphere ========== */

  /* 🌄 Sabah — Dawn Warmth */
  --aurora-morning:
    radial-gradient(ellipse 70% 50% at 12% 15%, #FFE8DC 0%, transparent 55%),
    radial-gradient(ellipse 60% 45% at 88% 25%, #FFD4D9 0%, transparent 55%),
    radial-gradient(ellipse 90% 65% at 50% 90%, #F4E4FF 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 75% 60%, #FFEDB8 0%, transparent 50%),
    linear-gradient(135deg, #FFFAF6 0%, #FBF6FF 100%);

  /* ☀️ Öğle — Mid-Day Clarity */
  --aurora-noon:
    radial-gradient(ellipse 75% 55% at 20% 18%, #E0EAFF 0%, transparent 60%),
    radial-gradient(ellipse 65% 50% at 85% 75%, #EAE0FF 0%, transparent 55%),
    radial-gradient(ellipse 80% 60% at 60% 30%, #F0F4FF 0%, transparent 65%),
    radial-gradient(ellipse 45% 35% at 30% 80%, #FFFAEC 0%, transparent 50%),
    linear-gradient(135deg, #FAFCFF 0%, #F5F2FF 100%);

  /* 🌇 Akşam — Golden Hour Bloom */
  --aurora-evening:
    radial-gradient(ellipse 70% 50% at 15% 18%, #FFE0CC 0%, transparent 55%),
    radial-gradient(ellipse 75% 55% at 85% 30%, #FFD0DC 0%, transparent 55%),
    radial-gradient(ellipse 90% 70% at 50% 95%, #ECE0FF 0%, transparent 60%),
    radial-gradient(ellipse 55% 40% at 70% 70%, #FFD9C2 0%, transparent 50%),
    linear-gradient(135deg, #FFF4ED 0%, #F6EEFF 100%);

  /* 🌌 Gece — Midnight Aurora */
  --aurora-night:
    radial-gradient(ellipse 75% 55% at 18% 20%, #1F1A3A 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 82% 75%, #1A2A4A 0%, transparent 55%),
    radial-gradient(ellipse 80% 60% at 50% 50%, #1A1530 0%, transparent 70%),
    radial-gradient(ellipse 35% 30% at 85% 15%, #2A1530 0%, transparent 50%),
    linear-gradient(135deg, #0E0E1A 0%, #14101F 100%);
}

[data-theme="dark"] {
  --bg-primary: #0A0A0B;
  --bg-elevated: #1C1C1E;
  --bg-tinted: #161618;
  --bg-glass: rgba(28, 28, 30, 0.62);
  --bg-glass-hi: rgba(28, 28, 30, 0.78);
  --bg-glass-strong: rgba(28, 28, 30, 0.88);

  --text-primary: #F5F5F7;
  --text-secondary: #B5B5BA;
  --text-tertiary: #777780;

  --separator: rgba(255, 255, 255, 0.10);
  --separator-strong: rgba(255, 255, 255, 0.18);

  --kw-red: #FF3B5C;
  --kw-red-soft: #FF4D6D;

  --shadow-md: 0 4px 16px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
  --shadow-lg: 0 24px 60px -20px rgba(0,0,0,0.6), 0 8px 24px -8px rgba(0,0,0,0.4);

  /* ========== AURORA — dark variants ========== */
  --aurora-morning:
    radial-gradient(ellipse 75% 55% at 12% 15%, #2D1F2A 0%, transparent 60%),
    radial-gradient(ellipse 65% 50% at 88% 25%, #2A1A22 0%, transparent 55%),
    radial-gradient(ellipse 90% 65% at 50% 90%, #1F1A2D 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 75% 60%, #2A2118 0%, transparent 50%),
    linear-gradient(135deg, #0F0E10 0%, #131218 100%);

  --aurora-noon:
    radial-gradient(ellipse 75% 55% at 20% 18%, #1A2238 0%, transparent 60%),
    radial-gradient(ellipse 65% 50% at 85% 75%, #221A38 0%, transparent 55%),
    radial-gradient(ellipse 80% 60% at 60% 30%, #181D2C 0%, transparent 65%),
    linear-gradient(135deg, #0E0F14 0%, #11101A 100%);

  --aurora-evening:
    radial-gradient(ellipse 75% 55% at 15% 18%, #2A1A18 0%, transparent 60%),
    radial-gradient(ellipse 75% 55% at 85% 30%, #2A1620 0%, transparent 55%),
    radial-gradient(ellipse 90% 70% at 50% 95%, #1F1A2D 0%, transparent 60%),
    linear-gradient(135deg, #110D10 0%, #14101A 100%);

  --aurora-night:
    radial-gradient(ellipse 75% 55% at 18% 20%, #1A1638 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 82% 75%, #16243F 0%, transparent 55%),
    radial-gradient(ellipse 80% 60% at 50% 50%, #14122E 0%, transparent 70%),
    radial-gradient(ellipse 35% 30% at 85% 15%, #2A1430 0%, transparent 50%),
    linear-gradient(135deg, #0A0A14 0%, #0F0C1A 100%);
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  height: 100vh;
  overflow: hidden;
  transition: background 600ms cubic-bezier(0.32, 0.72, 0, 1);
}

#root { height: 100vh; }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; padding: 0; }
input, textarea { font-family: inherit; color: inherit; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--separator-strong); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }

/* ========== APP SHELL ========== */

.app {
  display: flex;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

.aurora-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  transition: opacity 800ms ease;
}
.aurora-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--aurora-current, var(--aurora-morning));
  background-size: 110% 110%;
  opacity: 0.85;
  transition: background 1500ms cubic-bezier(0.32, 0.72, 0, 1);
  animation: aurora-drift 180s linear infinite;
}
.aurora-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.06;
  mix-blend-mode: overlay;
}
[data-theme="dark"] .aurora-bg::before { opacity: 0.92; }
[data-theme="dark"] .aurora-bg::after  { opacity: 0.04; }

@keyframes aurora-drift {
  0%   { background-position: 0% 0%, 100% 100%, 50% 50%, 80% 30%, 0% 0%; }
  50%  { background-position: 5% 3%, 95% 97%, 52% 48%, 78% 32%, 50% 50%; }
  100% { background-position: 0% 0%, 100% 100%, 50% 50%, 80% 30%, 100% 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .aurora-bg::before { animation: none; }
}

/* ========== SIDEBAR ========== */

.sidebar {
  width: 280px;
  flex-shrink: 0;
  background: var(--bg-glass);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border-right: 1px solid var(--separator);
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 10;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
}
[data-theme="dark"] .sidebar { box-shadow: inset 0 1px 0 rgba(255,255,255,0.06); }

.sidebar-top {
  padding: 20px 20px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.kw-mono {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1D1D1F 0%, #2D2D30 100%);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -0.02em;
  position: relative;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.1);
}
.kw-mono::after {
  content: '';
  position: absolute;
  bottom: 6px; right: 6px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--kw-red);
  box-shadow: 0 0 6px var(--kw-red-glow);
}
.kw-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.2;
}
.kw-role {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 1px;
  letter-spacing: 0;
}

.sidebar-search {
  margin: 4px 16px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: var(--bg-tinted);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  border: 1px solid transparent;
  transition: all 150ms;
}
.sidebar-search:hover { background: var(--bg-elevated); border-color: var(--separator); }
.sidebar-search input { flex: 1; border: none; outline: none; background: none; font-size: 13px; }
.sidebar-search kbd {
  font-family: inherit;
  font-size: 10px;
  padding: 1px 5px;
  background: var(--bg-elevated);
  border: 1px solid var(--separator);
  border-radius: 4px;
  color: var(--text-tertiary);
}

.nav {
  flex: 1;
  overflow-y: auto;
  padding: 4px 12px 12px;
}
.nav-section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-tertiary);
  padding: 14px 8px 6px;
  text-transform: uppercase;
}
/* ─── Sidebar nav-item — slow, flowing, educational ──────────
   Patron'un "neyin ne olduğunu" anlamasına yardımcı micro-interactions.
   Tüm transition'lar spring physics (cubic-bezier) ile yumuşak.
   ────────────────────────────────────────────────────────────── */
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border-radius: 9px;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  position: relative;
  margin-bottom: 2px;
  letter-spacing: -0.01em;
  isolation: isolate;
  transition:
    background-color 360ms cubic-bezier(0.32, 0.72, 0, 1),
    color 360ms cubic-bezier(0.32, 0.72, 0, 1),
    transform 380ms cubic-bezier(0.32, 0.72, 0, 1),
    box-shadow 380ms cubic-bezier(0.32, 0.72, 0, 1),
    padding-left 360ms cubic-bezier(0.32, 0.72, 0, 1);
  overflow: hidden;
}

/* Subtle red wash overlay on hover — slow fade-in */
.nav-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(200,16,46,0.05) 0%,
    rgba(200,16,46,0.02) 60%,
    transparent 100%);
  opacity: 0;
  transition: opacity 420ms cubic-bezier(0.32, 0.72, 0, 1);
  pointer-events: none;
  z-index: -1;
}

.nav-item:hover {
  background: var(--separator);
  padding-left: 14px;
  transform: translateX(0);
}
.nav-item:hover::after { opacity: 1; }

.nav-item:active {
  transform: scale(0.985);
  transition-duration: 120ms;
}

.nav-item.active {
  background: var(--bg-elevated);
  font-weight: 500;
  box-shadow: var(--shadow-sm), inset 0 0 0 1px rgba(200,16,46,0.08);
  padding-left: 14px;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  width: 3px;
  height: 18px;
  background: linear-gradient(180deg, #C8102E, #FF4D6D);
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 12px rgba(200,16,46,0.5);
  transform: translateY(-50%) scaleY(1);
  transform-origin: center;
  animation: nav-active-bar-in 480ms cubic-bezier(0.32, 0.72, 0, 1);
}
@keyframes nav-active-bar-in {
  from { transform: translateY(-50%) scaleY(0.2); opacity: 0; }
  to   { transform: translateY(-50%) scaleY(1);   opacity: 1; }
}
.nav-item.active::after {
  opacity: 1;
  background: linear-gradient(90deg,
    rgba(200,16,46,0.08) 0%,
    rgba(200,16,46,0.02) 70%,
    transparent 100%);
}

.nav-icon {
  width: 18px; height: 18px;
  flex-shrink: 0;
  color: var(--text-secondary);
  transition:
    color 360ms cubic-bezier(0.32, 0.72, 0, 1),
    transform 420ms cubic-bezier(0.32, 0.72, 0, 1);
}
.nav-item:hover .nav-icon {
  color: var(--text-primary);
  transform: scale(1.1) rotate(-2deg);
}
.nav-item.active .nav-icon {
  color: var(--kw-red);
  transform: scale(1.05);
}

/* Accordion caret — smooth rotation */
.nav-accordion-caret {
  display: inline-flex;
  transition: transform 420ms cubic-bezier(0.32, 0.72, 0, 1);
  color: var(--text-tertiary);
}

.nav-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  background: var(--kw-red);
  color: white;
  border-radius: 10px;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px -1px rgba(200,16,46,0.4);
  animation: nav-badge-in 520ms cubic-bezier(0.32, 0.72, 0, 1);
  position: relative;
}
@keyframes nav-badge-in {
  from { opacity: 0; transform: scale(0.4); }
  to   { opacity: 1; transform: scale(1); }
}
.nav-badge::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 12px;
  border: 1.5px solid rgba(200,16,46,0.5);
  opacity: 0;
  animation: nav-badge-ping 2.4s cubic-bezier(0.32, 0.72, 0, 1) 1s infinite;
  pointer-events: none;
}
@keyframes nav-badge-ping {
  0%   { opacity: 0.7; transform: scale(1); }
  70%  { opacity: 0; transform: scale(1.4); }
  100% { opacity: 0; transform: scale(1.4); }
}

.chat-list {
  margin: 4px 0 4px 28px;
  padding-left: 10px;
  border-left: 1px solid var(--separator);
  overflow: hidden;
  transition:
    max-height 480ms cubic-bezier(0.32, 0.72, 0, 1),
    opacity 360ms cubic-bezier(0.32, 0.72, 0, 1),
    margin 380ms cubic-bezier(0.32, 0.72, 0, 1);
}
.chat-list.open { max-height: 500px; opacity: 1; margin-top: 4px; margin-bottom: 6px; }
.chat-list.closed { max-height: 0; opacity: 0; margin-top: 0; margin-bottom: 0; }
.chat-list-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 9px;
  border-radius: 7px;
  font-size: 12.5px;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition:
    background 280ms cubic-bezier(0.32, 0.72, 0, 1),
    color 280ms cubic-bezier(0.32, 0.72, 0, 1),
    padding-left 280ms cubic-bezier(0.32, 0.72, 0, 1);
}
.chat-list-item:hover {
  background: var(--separator);
  color: var(--text-primary);
  padding-left: 12px;
}
.chat-list-item .dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--text-tertiary);
  flex-shrink: 0;
  transition: background 280ms cubic-bezier(0.32, 0.72, 0, 1);
}
.chat-list-item.unread .dot {
  background: var(--kw-red);
  box-shadow: 0 0 8px rgba(200,16,46,0.5);
  animation: chat-unread-pulse 2.4s cubic-bezier(0.32, 0.72, 0, 1) infinite;
}
@keyframes chat-unread-pulse {
  0%, 100% { transform: scale(1);   box-shadow: 0 0 8px rgba(200,16,46,0.5); }
  50%      { transform: scale(1.3); box-shadow: 0 0 14px rgba(200,16,46,0.8); }
}
.chat-list-item.unread { color: var(--text-primary); font-weight: 500; }

.sidebar-bottom {
  padding: 12px 12px 14px;
  border-top: 1px solid var(--separator);
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar-circle {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #C8102E 0%, #FF4D6D 100%);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  box-shadow: 0 2px 8px rgba(200,16,46,0.25);
}
.avatar-name { font-size: 13px; font-weight: 500; line-height: 1.2; }
.avatar-role-line { font-size: 11px; color: var(--text-tertiary); letter-spacing: -0.005em; margin-top: 1px; }
.avatar-mail { font-size: 11px; color: var(--text-secondary); }
.icon-btn {
  width: 28px; height: 28px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  transition: all 200ms cubic-bezier(0.32, 0.72, 0, 1);
}
.icon-btn:hover { background: var(--separator); color: var(--text-primary); }

/* Feedback button — KW kırmızı hover */
.sidebar-feedback-btn:hover {
  background: rgba(200, 16, 46, 0.10);
  color: #C8102E;
  transform: translateY(-1px);
}

/* ────────────────────────────────────────────────────────────
   FEEDBACK MODAL — Liquid Glass · KW kırmızı %5 accent
   Welcome adaptive section ile uyumlu; React Portal ile body'de.
   ──────────────────────────────────────────────────────────── */
.fb-overlay {
  position: fixed;
  inset: 0;
  z-index: 9600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  background: rgba(20, 20, 22, 0.55);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  animation: fb-overlay-in 280ms cubic-bezier(0.32, 0.72, 0, 1);
  overflow-y: auto;

  /* Force light theme tokens — dark mode'da bile modal aydınlık ve okunaklı */
  --fb-text-primary: #1D1D1F;
  --fb-text-secondary: #6E6E73;
  --fb-text-tertiary: #86868B;
  --fb-bg-soft: rgba(0, 0, 0, 0.04);
  --fb-bg-soft-hover: rgba(0, 0, 0, 0.07);
  --fb-border: rgba(0, 0, 0, 0.10);
  --fb-border-soft: rgba(0, 0, 0, 0.06);
}
@keyframes fb-overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Soft aurora ısı halesi — overlay'in üstünde KW kırmızı yumuşak parıltı */
.fb-aurora {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 50% 40% at 50% 30%, rgba(200, 16, 46, 0.15), transparent 60%),
    radial-gradient(ellipse 40% 30% at 30% 70%, rgba(255, 77, 109, 0.08), transparent 60%);
  filter: blur(40px);
  animation: fb-aurora-drift 8s ease-in-out infinite alternate;
}
@keyframes fb-aurora-drift {
  from { transform: translate(0, 0) scale(1); opacity: 0.85; }
  to   { transform: translate(20px, -10px) scale(1.04); opacity: 1; }
}

/* Modal kart */
.fb-modal {
  position: relative;
  width: min(640px, 100%);
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(60px) saturate(200%);
  -webkit-backdrop-filter: blur(60px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 24px;
  padding: 32px 36px 28px;
  color: var(--fb-text-primary);
  box-shadow:
    0 40px 100px -24px rgba(0, 0, 0, 0.55),
    0 12px 32px -8px rgba(200, 16, 46, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
  animation: fb-modal-in 420ms cubic-bezier(0.32, 0.72, 0, 1);
  z-index: 1;
}
@keyframes fb-modal-in {
  from { opacity: 0; transform: scale(0.94) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@media (max-width: 600px) {
  .fb-modal { padding: 24px 22px 22px; border-radius: 20px; }
}

/* Üst sağ kapatma */
.fb-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px; height: 32px;
  border-radius: 10px;
  background: var(--fb-bg-soft);
  border: 1px solid transparent;
  color: var(--fb-text-tertiary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 200ms cubic-bezier(0.32, 0.72, 0, 1);
  z-index: 2;
}
.fb-close:hover {
  background: var(--fb-bg-soft-hover);
  color: var(--fb-text-primary);
  transform: scale(1.05);
}

/* ─── Header ────────────────────────────────────────────── */
.fb-head {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 24px;
  padding-right: 36px;
}
.fb-head-glyph {
  position: relative;
  width: 52px; height: 52px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.fb-head-glyph-ring {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(200,16,46,0.14), rgba(255,77,109,0.08));
  border: 1px solid rgba(200,16,46,0.25);
  animation: fb-glyph-pulse 3s ease-in-out infinite;
}
@keyframes fb-glyph-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200,16,46,0.35); }
  50%      { box-shadow: 0 0 0 8px rgba(200,16,46,0); }
}
.fb-head-glyph-core {
  position: relative;
  z-index: 1;
  font-size: 24px;
  filter: drop-shadow(0 0 8px rgba(200,16,46,0.35));
}
.fb-head-text { flex: 1; min-width: 0; }
.fb-eyebrow {
  font-size: 11px;
  font-weight: 600;
  color: #C8102E;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.fb-h1 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.22;
  margin: 0 0 8px;
  color: var(--fb-text-primary);
}
.fb-sub {
  font-size: 13.5px;
  color: var(--fb-text-secondary);
  line-height: 1.55;
  letter-spacing: -0.005em;
  margin: 0;
}

/* ─── Section labels ────────────────────────────────────── */
.fb-section-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--fb-text-tertiary);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  margin: 18px 0 10px;
}

/* ─── Category grid (3 sütun, açıklayıcı) ──────────────── */
.fb-cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (max-width: 540px) {
  .fb-cat-grid { grid-template-columns: 1fr; }
}
.fb-cat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--fb-bg-soft);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 240ms cubic-bezier(0.32, 0.72, 0, 1);
  font-family: inherit;
  text-align: left;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.fb-cat::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(200,16,46,0.12), rgba(255,77,109,0.06));
  opacity: 0;
  transition: opacity 280ms cubic-bezier(0.32, 0.72, 0, 1);
  z-index: -1;
}
.fb-cat:hover {
  background: var(--fb-bg-soft-hover);
  transform: translateY(-1px);
}
.fb-cat.active {
  border-color: rgba(200,16,46,0.32);
  box-shadow: 0 6px 16px -4px rgba(200,16,46,0.20);
}
.fb-cat.active::before { opacity: 1; }
.fb-cat-emoji { font-size: 18px; line-height: 1; }
.fb-cat-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--fb-text-primary);
  letter-spacing: -0.01em;
}
.fb-cat.active .fb-cat-label { color: #C8102E; }
.fb-cat-desc {
  font-size: 11.5px;
  color: var(--fb-text-secondary);
  line-height: 1.4;
  letter-spacing: -0.005em;
}

/* ─── Textarea ──────────────────────────────────────────── */
.fb-textarea-wrap {
  position: relative;
}
.fb-textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 140px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--fb-border);
  background: rgba(255, 255, 255, 0.6);
  color: var(--fb-text-primary);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: -0.005em;
  resize: vertical;
  outline: none;
  transition:
    border-color 240ms cubic-bezier(0.32, 0.72, 0, 1),
    box-shadow 240ms cubic-bezier(0.32, 0.72, 0, 1),
    background 240ms cubic-bezier(0.32, 0.72, 0, 1);
}
.fb-textarea:focus {
  border-color: rgba(200, 16, 46, 0.55);
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 0 0 4px rgba(200, 16, 46, 0.12),
    0 4px 12px -4px rgba(200, 16, 46, 0.18);
}
.fb-textarea::placeholder {
  color: var(--fb-text-tertiary);
  font-size: 13.5px;
  line-height: 1.6;
}
.fb-counter {
  position: absolute;
  bottom: 10px;
  right: 14px;
  font-size: 11px;
  color: var(--fb-text-tertiary);
  font-variant-numeric: tabular-nums;
  background: rgba(255,255,255,0.85);
  padding: 2px 6px;
  border-radius: 6px;
  pointer-events: none;
}

/* ─── Error mesajı ──────────────────────────────────────── */
.fb-error {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(255, 59, 48, 0.10);
  border: 1px solid rgba(255, 59, 48, 0.25);
  border-radius: 10px;
  font-size: 12.5px;
  color: #C8102E;
  letter-spacing: -0.005em;
  animation: fb-error-shake 360ms cubic-bezier(0.32, 0.72, 0, 1);
}
@keyframes fb-error-shake {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-4px); }
  75%      { transform: translateX(4px); }
}

/* ─── Footer (hint + butonlar) ──────────────────────────── */
.fb-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--fb-border-soft);
}
.fb-hint {
  font-size: 12px;
  color: var(--fb-text-tertiary);
  letter-spacing: -0.005em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.fb-hint kbd {
  font-family: inherit;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--fb-bg-soft);
  border: 1px solid var(--fb-border);
  color: var(--fb-text-secondary);
  font-weight: 500;
}
.fb-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.fb-btn {
  padding: 11px 20px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  border: 1px solid transparent;
  transition: all 240ms cubic-bezier(0.32, 0.72, 0, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: -0.01em;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.fb-btn-ghost {
  background: var(--fb-bg-soft);
  color: var(--fb-text-secondary);
  border-color: var(--fb-border);
}
.fb-btn-ghost:hover {
  background: var(--fb-bg-soft-hover);
  color: var(--fb-text-primary);
}
.fb-btn-primary {
  background: linear-gradient(135deg, #C8102E 0%, #E0233F 50%, #FF4D6D 100%);
  color: white;
  box-shadow:
    0 8px 20px -4px rgba(200, 16, 46, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.fb-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 14px 32px -6px rgba(200, 16, 46, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.fb-btn-primary:active { transform: translateY(0); }
.fb-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}
.fb-btn-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255,255,255,0.32), transparent 70%);
  opacity: 0;
  transition: opacity 240ms;
  z-index: -1;
}
.fb-btn-primary:hover .fb-btn-glow { opacity: 1; }
.fb-btn-label, .fb-btn-arrow { position: relative; z-index: 1; }
.fb-btn-arrow { transition: transform 240ms cubic-bezier(0.32, 0.72, 0, 1); }
.fb-btn-primary:hover .fb-btn-arrow { transform: translateX(4px); }

/* ─── Success state ─────────────────────────────────────── */
.fb-success {
  text-align: center;
  padding: 24px 8px 16px;
}
.fb-success-glyph {
  position: relative;
  width: 80px; height: 80px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fb-success-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #34C759, #30D158);
  box-shadow:
    0 12px 32px -6px rgba(52, 199, 89, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  animation: fb-success-pop 520ms cubic-bezier(0.32, 0.72, 0, 1);
}
.fb-success-ring::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(52, 199, 89, 0.5);
  animation: fb-success-ping 1.6s cubic-bezier(0.32, 0.72, 0, 1) 360ms;
}
@keyframes fb-success-pop {
  from { transform: scale(0.4); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
@keyframes fb-success-ping {
  0%   { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.4); opacity: 0; }
}
.fb-success-tick {
  position: relative;
  z-index: 1;
  color: white;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  animation: fb-success-tick-in 480ms cubic-bezier(0.32, 0.72, 0, 1) 200ms backwards;
}
@keyframes fb-success-tick-in {
  from { transform: scale(0.3); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.fb-success-h {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.022em;
  margin: 0 0 10px;
  color: var(--fb-text-primary);
}
.fb-success-sub {
  font-size: 14px;
  color: var(--fb-text-secondary);
  line-height: 1.55;
  letter-spacing: -0.005em;
  max-width: 440px;
  margin: 0 auto;
}

/* ========== MAIN CANVAS ========== */

.main {
  flex: 1;
  overflow-y: auto;
  position: relative;
  z-index: 1;
}

.main-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 48px 96px;
}

/* ========== HOME ========== */

.greeting {
  padding: 24px 0 8px;
}
.greeting h1 {
  font-size: 52px;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 0;
  color: var(--text-primary);
}
.greeting-meta {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.greeting-meta .dot-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--text-tertiary); }
.greeting-meta .mood {
  color: var(--text-primary);
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(200%);
  -webkit-backdrop-filter: blur(20px) saturate(200%);
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--separator);
  font-size: 12.5px;
  font-weight: 500;
}

/* Chat hero */
.chat-hero {
  margin-top: 36px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.chat-hero-card {
  background: var(--bg-glass-strong);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border: 1px solid var(--separator);
  border-radius: 20px;
  padding: 22px 22px 18px;
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.6);
  transition: transform 300ms cubic-bezier(0.32, 0.72, 0, 1), box-shadow 300ms;
  position: relative;
  overflow: hidden;
}
[data-theme="dark"] .chat-hero-card { box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.06); }
.chat-hero-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.6); }
.chat-hero-card.focused {
  border-color: rgba(200,16,46,0.3);
  box-shadow: var(--shadow-glow), inset 0 1px 0 rgba(255,255,255,0.6);
}
.chat-hero-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 40%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.7), transparent);
}

.chat-hero-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  letter-spacing: -0.005em;
}
.chat-hero-label .agent-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-tinted);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11.5px;
}
.chat-hero-label .sparkle { color: var(--kw-red); font-size: 11px; }

.chat-hero-input-row { display: flex; align-items: flex-end; gap: 10px; }
.chat-hero-textarea {
  flex: 1;
  border: none;
  outline: none;
  background: none;
  font-size: 17px;
  color: var(--text-primary);
  resize: none;
  font-family: inherit;
  line-height: 1.45;
  min-height: 28px;
  max-height: 200px;
  letter-spacing: -0.015em;
}
.chat-hero-textarea::placeholder { color: var(--text-tertiary); font-weight: 400; }

.chat-hero-actions { display: flex; align-items: center; gap: 6px; padding-bottom: 2px; }
.chat-hero-mic {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--bg-tinted);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  transition: all 150ms;
}
.chat-hero-mic:hover { background: var(--separator); color: var(--text-primary); }
.chat-hero-send {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--kw-red) 0%, var(--kw-red-soft) 100%);
  color: white;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 200ms ease, transform 200ms cubic-bezier(0.32, 0.72, 0, 1), filter 150ms;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(200,16,46,0.35);
}
.chat-hero-send.visible { opacity: 1; transform: scale(1); pointer-events: auto; }
.chat-hero-send:hover { filter: brightness(1.08); }
.chat-hero-send:active { transform: scale(0.94); }

.chat-hero-hint {
  margin-top: 12px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.chip {
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--bg-tinted);
  color: var(--text-secondary);
  border: 1px solid var(--separator);
  cursor: pointer;
  transition: all 120ms;
  letter-spacing: -0.005em;
}
.chip:hover { background: var(--bg-elevated); color: var(--text-primary); border-color: var(--separator-strong); }

/* ========== SECTION HEADERS ========== */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 56px 0 16px;
}
.section-head h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--text-primary);
}
.section-head .see-all {
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 120ms;
}
.section-head .see-all:hover { color: var(--kw-red); }

/* ========== BRIEF GRID ========== */

.brief-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.brief-col {
  background: var(--bg-elevated);
  border: 1px solid var(--separator);
  border-radius: 16px;
  padding: 18px 18px 8px;
  box-shadow: var(--shadow-sm);
}
.brief-col-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.brief-col-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text-primary);
  display: flex; align-items: center; gap: 7px;
}
.brief-col-title .ico {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: var(--bg-tinted);
  display: flex; align-items: center; justify-content: center;
  color: var(--kw-red);
}
.brief-col-link { font-size: 12px; color: var(--text-secondary); cursor: pointer; }
.brief-col-link:hover { color: var(--kw-red); }

.news-item {
  padding: 12px 0;
  border-top: 1px solid var(--separator);
  cursor: pointer;
  transition: opacity 150ms;
}
.news-item:first-of-type { border-top: none; padding-top: 4px; }
.news-item:hover { opacity: 0.78; }
.news-source {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 5px;
}
.news-source .src-badge {
  display: inline-block;
  padding: 1px 6px;
  background: var(--bg-tinted);
  border-radius: 4px;
  margin-right: 6px;
  letter-spacing: 0.03em;
}
.news-title {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.news-summary {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.note-item {
  padding: 12px 0;
  border-top: 1px solid var(--separator);
  cursor: pointer;
  display: flex; gap: 10px;
  transition: opacity 150ms;
}
.note-item:first-of-type { border-top: none; padding-top: 4px; }
.note-item:hover { opacity: 0.78; }
.note-emoji { font-size: 18px; line-height: 1.3; flex-shrink: 0; }
.note-body { flex: 1; }
.note-text {
  font-size: 13.5px;
  color: var(--text-primary);
  line-height: 1.4;
  letter-spacing: -0.005em;
}
.note-meta { font-size: 11.5px; color: var(--text-secondary); margin-top: 4px; }

/* ========== MEETINGS + TASKS ========== */

.bottom-grid {
  display: grid;
  grid-template-columns: 6fr 4fr;
  gap: 16px;
}
.panel {
  background: var(--bg-elevated);
  border: 1px solid var(--separator);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 4px;
}
.panel-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.meeting-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 6px;
  border-top: 1px solid var(--separator);
  border-radius: 8px;
  cursor: pointer;
  transition: background 120ms;
}
.meeting-row:first-of-type { border-top: none; }
.meeting-row:hover { background: var(--bg-tinted); }
.meeting-ico {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--bg-tinted);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.meeting-mid { flex: 1; min-width: 0; }
.meeting-topic {
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.meeting-sub { font-size: 11.5px; color: var(--text-secondary); margin-top: 2px; display: flex; align-items: center; gap: 8px; }
.avatar-stack { display: flex; }
.avatar-mini {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--kw-red);
  border: 2px solid var(--bg-elevated);
  margin-left: -5px;
  font-size: 8.5px;
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
}
.avatar-mini:first-child { margin-left: 0; }
.meeting-open {
  font-size: 12px;
  color: var(--text-secondary);
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid var(--separator);
  transition: all 120ms;
  white-space: nowrap;
}
.meeting-row:hover .meeting-open { color: var(--text-primary); border-color: var(--separator-strong); background: var(--bg-elevated); }

/* Tasks */
.task-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 4px;
  border-top: 1px solid var(--separator);
}
.task-row:first-of-type { border-top: none; }
.task-checkbox {
  width: 18px; height: 18px;
  border: 1.5px solid var(--separator-strong);
  border-radius: 5px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 150ms;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-elevated);
}
.task-checkbox:hover { border-color: var(--kw-red); }
.task-checkbox.checked {
  background: var(--kw-red);
  border-color: var(--kw-red);
}
.task-checkbox.checked svg { opacity: 1; }
.task-checkbox svg { opacity: 0; transition: opacity 150ms; color: white; }
.task-title { flex: 1; font-size: 13.5px; letter-spacing: -0.005em; transition: all 200ms; }
.task-row.done .task-title { color: var(--text-tertiary); text-decoration: line-through; }
.task-due {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-tinted);
  color: var(--text-secondary);
}
.task-due.urgent { background: var(--kw-red-soft-bg); color: var(--kw-red); }

/* ========== CHAT SCREEN ========== */

.chat-page {
  height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}
.chat-topbar {
  position: sticky;
  top: 0;
  background: var(--bg-glass);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border-bottom: 1px solid var(--separator);
  padding: 14px 0;
  display: flex; align-items: center; justify-content: space-between;
  z-index: 5;
  margin: 0 -24px;
  padding-left: 24px;
  padding-right: 24px;
}
.chat-topbar-title { font-size: 15px; font-weight: 600; letter-spacing: -0.015em; }
.chat-topbar-sub { font-size: 11.5px; color: var(--text-secondary); margin-top: 1px; }
.chat-thread {
  flex: 1;
  overflow-y: auto;
  padding: 24px 0 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.msg { display: flex; gap: 10px; max-width: 78%; }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.msg-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: white;
}
.msg-bubble {
  padding: 11px 14px;
  border-radius: 16px;
  font-size: 14.5px;
  line-height: 1.5;
  letter-spacing: -0.005em;
}
.msg.user .msg-bubble {
  background: linear-gradient(135deg, var(--kw-red) 0%, var(--kw-red-soft) 100%);
  color: white;
  border-bottom-right-radius: 6px;
  box-shadow: 0 2px 8px rgba(200,16,46,0.18);
}
.msg.agent .msg-bubble {
  background: var(--bg-glass-strong);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  border: 1px solid var(--separator);
  border-bottom-left-radius: 6px;
  color: var(--text-primary);
}
.msg-name { font-size: 11px; color: var(--text-secondary); margin-bottom: 4px; font-weight: 500; }
.msg.user .msg-name { text-align: right; }
.triage-line {
  align-self: flex-start;
  font-size: 12px;
  color: var(--text-secondary);
  padding-left: 38px;
  display: flex; align-items: center; gap: 8px;
  font-style: italic;
}
.triage-dots { display: inline-flex; gap: 3px; }
.triage-dots span {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--text-tertiary);
  animation: pulse 1.4s ease-in-out infinite;
}
.triage-dots span:nth-child(2) { animation-delay: 0.2s; }
.triage-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes pulse {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-2px); }
}

.chat-composer {
  position: sticky;
  bottom: 0;
  background: var(--bg-glass);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border-top: 1px solid var(--separator);
  padding: 14px 0 18px;
  margin: 0 -24px;
  padding-left: 24px;
  padding-right: 24px;
}
.chat-composer-inner {
  background: var(--bg-elevated);
  border: 1px solid var(--separator);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex; align-items: flex-end; gap: 8px;
  transition: border-color 150ms;
}
.chat-composer-inner:focus-within { border-color: rgba(200,16,46,0.4); box-shadow: 0 0 0 4px rgba(200,16,46,0.08); }
.chat-composer-inner textarea {
  flex: 1; border: none; outline: none; background: none; resize: none;
  font-size: 14.5px;
  letter-spacing: -0.005em;
  min-height: 22px;
  max-height: 140px;
  line-height: 1.45;
}

/* ========== TEAM ========== */

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.agent-card {
  background: var(--bg-elevated);
  border: 1px solid var(--separator);
  border-radius: 16px;
  padding: 18px;
  cursor: pointer;
  transition: all 250ms cubic-bezier(0.32, 0.72, 0, 1);
  position: relative;
  overflow: hidden;
}
.agent-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--separator-strong);
}
.agent-card .open-cta {
  position: absolute;
  bottom: 14px; right: 14px;
  font-size: 11.5px;
  color: var(--kw-red);
  font-weight: 500;
  opacity: 0;
  transform: translateY(4px);
  transition: all 200ms;
}
.agent-card:hover .open-cta { opacity: 1; transform: translateY(0); }
.agent-avatar {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  font-weight: 600;
  color: white;
  letter-spacing: -0.015em;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.agent-name { font-size: 14px; font-weight: 600; letter-spacing: -0.015em; }
.agent-role { font-size: 11.5px; color: var(--text-secondary); margin-top: 2px; margin-bottom: 8px; }
.agent-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.agent-active {
  position: absolute;
  top: 16px; right: 16px;
  display: flex; align-items: center; gap: 5px;
  font-size: 10.5px;
  color: var(--text-secondary);
}
.agent-active .green-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #34C759;
  box-shadow: 0 0 0 3px rgba(52,199,89,0.18);
}

.team-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin: 4px 0 22px;
}
.filter-pills { display: flex; gap: 6px; }
.pill {
  font-size: 12.5px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--separator);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 120ms;
  letter-spacing: -0.005em;
}
.pill:hover { color: var(--text-primary); }
.pill.active {
  background: var(--text-primary);
  color: var(--bg-elevated);
  border-color: var(--text-primary);
}

.btn-primary {
  background: var(--kw-red-gradient);
  color: white;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  letter-spacing: -0.005em;
  display: inline-flex; align-items: center; gap: 6px;
  box-shadow: var(--kw-red-halo);
  transition: all 150ms cubic-bezier(0.32, 0.72, 0, 1);
}
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 0 32px -2px rgba(200,16,46,0.45); }
.btn-primary:active { transform: scale(0.98); }

.btn-ghost {
  background: var(--bg-elevated);
  border: 1px solid var(--separator);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 13px;
  border-radius: 8px;
  letter-spacing: -0.005em;
  color: var(--text-primary);
  display: inline-flex; align-items: center; gap: 6px;
  transition: all 120ms;
}
.btn-ghost:hover { border-color: var(--separator-strong); }

/* ========== MEETINGS LIST ========== */

.meeting-list-item {
  background: var(--bg-elevated);
  border: 1px solid var(--separator);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 200ms;
}
.meeting-list-item:hover { border-color: var(--separator-strong); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.meeting-list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.meeting-list-topic { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
.meeting-list-date { font-size: 12px; color: var(--text-secondary); white-space: nowrap; }
.meeting-list-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--text-secondary); }

/* ========== NEWS PAGE ========== */

.news-hero {
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 24px;
  cursor: pointer;
  position: relative;
  aspect-ratio: 16 / 8;
  background: linear-gradient(135deg, #2D2D30, #1D1D1F);
}
.news-hero-img {
  width: 100%; height: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
}
.news-hero-img::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.85) 100%);
}
.news-hero-text {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 28px;
  color: white;
  z-index: 2;
}
.news-hero-cat {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--kw-red-glow);
  margin-bottom: 8px;
}
.news-hero-h {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  max-width: 720px;
}
.news-hero-sum { font-size: 14px; opacity: 0.85; margin-top: 8px; max-width: 640px; }

.news-mag {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.news-mag-card {
  background: var(--bg-elevated);
  border: 1px solid var(--separator);
  border-radius: 14px;
  padding: 18px;
  cursor: pointer;
  transition: all 200ms;
}
.news-mag-card:hover { transform: translateY(-1px); border-color: var(--separator-strong); }
.news-cat-badge {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--kw-red);
  margin-bottom: 8px;
}
.news-mag-title { font-size: 16px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; margin-bottom: 6px; }
.news-mag-sum { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.news-mag-meta { font-size: 11.5px; color: var(--text-tertiary); margin-top: 10px; }

/* ========== INSPECTOR ========== */

.inspector-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.18);
  backdrop-filter: blur(2px);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms;
}
.inspector-overlay.open { opacity: 1; pointer-events: auto; }
.inspector {
  position: fixed;
  top: 16px; right: 16px; bottom: 16px;
  width: 420px;
  background: var(--bg-glass-strong);
  backdrop-filter: blur(50px) saturate(200%);
  -webkit-backdrop-filter: blur(50px) saturate(200%);
  border: 1px solid var(--separator);
  border-radius: 20px;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.5);
  z-index: 51;
  transform: translateX(440px);
  transition: transform 320ms cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  flex-direction: column;
}
[data-theme="dark"] .inspector { box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.06); }
.inspector.open { transform: translateX(0); }
.inspector-head {
  padding: 18px 20px 12px;
  display: flex; align-items: flex-start; justify-content: space-between;
  border-bottom: 1px solid var(--separator);
}
.inspector-body { flex: 1; overflow-y: auto; padding: 18px 20px 20px; }
.inspector-title { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.inspector-section { margin-top: 18px; }
.inspector-section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.inspector-text {
  font-size: 13.5px;
  color: var(--text-primary);
  line-height: 1.55;
  letter-spacing: -0.005em;
}

/* Scroll fade */
.fade-in { animation: fadeUp 400ms cubic-bezier(0.32, 0.72, 0, 1); }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.bounce-in { animation: bounceIn 500ms cubic-bezier(0.32, 0.72, 0, 1); }
@keyframes bounceIn {
  0% { opacity: 0; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* Tweaks panel */
.tweak-panel {
  position: fixed;
  bottom: 16px; right: 16px;
  width: 280px;
  background: var(--bg-glass-strong);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border: 1px solid var(--separator);
  border-radius: 16px;
  padding: 14px 16px 16px;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.5);
  z-index: 100;
  font-size: 13px;
}
.tweak-panel h3 { font-size: 13px; font-weight: 600; margin: 0 0 12px; letter-spacing: -0.01em; }
.tweak-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 10px; }
.tweak-row label { font-size: 12px; color: var(--text-secondary); }
.tweak-segments { display: flex; gap: 4px; background: var(--bg-tinted); padding: 3px; border-radius: 8px; }
.tweak-segments button {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--text-secondary);
}
.tweak-segments button.active { background: var(--bg-elevated); color: var(--text-primary); box-shadow: var(--shadow-sm); }
.tweak-toggle {
  width: 36px; height: 22px;
  border-radius: 999px;
  background: var(--separator-strong);
  position: relative;
  transition: background 200ms;
}
.tweak-toggle.on { background: var(--kw-red); }
.tweak-toggle::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 200ms cubic-bezier(0.32, 0.72, 0, 1);
}
.tweak-toggle.on::after { transform: translateX(14px); }

/* ================ ONBOARDING ================ */

:root {
  --p0-red:   #C8102E;
  --p1-amber: #FF9F0A;
  --p2-gold:  #FFD60A;
  --aurora-onboarding:
    radial-gradient(ellipse 80% 60% at 15% 20%, #FFF0E8 0%, transparent 50%),
    radial-gradient(ellipse 70% 50% at 85% 80%, #FFE0E8 0%, transparent 50%),
    radial-gradient(ellipse 100% 80% at 50% 50%, #F8F0FF 0%, transparent 60%),
    linear-gradient(135deg, #FFFAF7 0%, #F8F4FF 100%);
  --aurora-onboarding-dark:
    radial-gradient(ellipse 80% 60% at 15% 20%, #2A1A2E 0%, transparent 50%),
    radial-gradient(ellipse 70% 50% at 85% 80%, #1A2E3A 0%, transparent 50%),
    radial-gradient(ellipse 100% 80% at 50% 50%, #1F1A2E 0%, transparent 60%),
    linear-gradient(135deg, #0A0A0F 0%, #0F0A1A 100%);
}

.onb-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  /* safe center: kart viewport'a sığarsa merkezde, sığmazsa üstten başlar (scroll edilebilir) */
  align-items: safe center;
  justify-content: center;
  padding: 48px 32px 64px;
  background: var(--aurora-onboarding);
  background-size: 200% 200%;
  animation: onbBreath 180s linear infinite;
  overflow-y: auto;
  overflow-x: hidden;
}
/* Fallback: safe keyword'ü desteklemeyen tarayıcılar için flex-start ile başlangıç + auto margin ile center */
@supports not (align-items: safe center) {
  .onb-overlay { align-items: flex-start; }
  .onb-overlay > .onb-card { margin-top: auto; margin-bottom: auto; }
}
[data-theme="dark"] .onb-overlay { background: var(--aurora-onboarding-dark); }
@keyframes onbBreath {
  0%   { background-position: 0% 0%; }
  50%  { background-position: 100% 100%; }
  100% { background-position: 0% 0%; }
}
.onb-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.025;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.onb-card {
  position: relative;
  width: 100%;
  max-width: 720px;
  background: rgba(255,255,255,0.68);
  backdrop-filter: blur(60px) saturate(200%);
  -webkit-backdrop-filter: blur(60px) saturate(200%);
  border-radius: 32px;
  border: 1px solid rgba(255,255,255,0.4);
  box-shadow:
    0 32px 80px -24px rgba(0,0,0,0.18),
    0 12px 32px -12px rgba(0,0,0,0.08),
    inset 0 1px 0 rgba(255,255,255,0.7),
    inset 0 -1px 0 rgba(0,0,0,0.04);
  padding: 56px 64px;
  animation: onbCardIn 500ms cubic-bezier(0.32, 0.72, 0, 1);
  z-index: 1;
}
[data-theme="dark"] .onb-card {
  background: rgba(28,28,30,0.68);
  border-color: rgba(255,255,255,0.08);
  box-shadow:
    0 32px 80px -24px rgba(0,0,0,0.6),
    0 12px 32px -12px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.06),
    inset 0 -1px 0 rgba(0,0,0,0.2);
}
.onb-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 240px; height: 240px;
  background: radial-gradient(circle at top right, rgba(255,255,255,0.55), transparent 60%);
  border-radius: 32px;
  pointer-events: none;
  z-index: 0;
}
.onb-card > * { position: relative; z-index: 1; }
[data-theme="dark"] .onb-card::before { background: radial-gradient(circle at top right, rgba(255,255,255,0.08), transparent 60%); }

@keyframes onbCardIn {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

@keyframes onbContentIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.onb-stagger > * { opacity: 0; animation: onbContentIn 480ms cubic-bezier(0.32, 0.72, 0, 1) forwards; }
.onb-stagger > *:nth-child(1) { animation-delay: 80ms; }
.onb-stagger > *:nth-child(2) { animation-delay: 140ms; }
.onb-stagger > *:nth-child(3) { animation-delay: 200ms; }
.onb-stagger > *:nth-child(4) { animation-delay: 260ms; }
.onb-stagger > *:nth-child(5) { animation-delay: 320ms; }
.onb-stagger > *:nth-child(6) { animation-delay: 380ms; }
.onb-stagger > *:nth-child(7) { animation-delay: 440ms; }
.onb-stagger > *:nth-child(8) { animation-delay: 500ms; }

.onb-emoji {
  font-size: 32px;
  display: inline-block;
  animation: onbPulse 4s ease-in-out infinite;
}
@keyframes onbPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.06); }
}

.onb-display {
  font-size: 52px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--text-primary);
  margin: 16px 0 20px;
}
.onb-lead {
  font-size: 17px;
  line-height: 1.55;
  color: var(--text-secondary);
  letter-spacing: -0.005em;
  margin: 0;
  max-width: 560px;
}

.onb-divider {
  height: 1px;
  background: var(--separator);
  margin: 28px 0;
  border: none;
}

.onb-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.onb-promise-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.onb-promise {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  background: rgba(255,255,255,0.4);
  border-radius: 14px;
  border: 1px solid var(--separator);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--text-primary);
  letter-spacing: -0.005em;
}
[data-theme="dark"] .onb-promise { background: rgba(255,255,255,0.03); }
.onb-promise b {
  font-weight: 600;
  color: var(--kw-red);
  white-space: nowrap;
}

.onb-meta-list { display: flex; flex-direction: column; gap: 10px; margin: 24px 0 32px; }
.onb-meta-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.onb-meta-item .ico {
  font-size: 14px;
  width: 20px;
  flex-shrink: 0;
  color: var(--kw-red);
}

.onb-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  background: linear-gradient(135deg, var(--kw-red), var(--kw-red-soft));
  color: white;
  font-size: 15px;
  font-weight: 600;
  border-radius: 14px;
  letter-spacing: -0.005em;
  box-shadow:
    0 4px 16px -4px rgba(200,16,46,0.4),
    inset 0 1px 0 rgba(255,255,255,0.25);
  transition: all 200ms cubic-bezier(0.32, 0.72, 0, 1);
}
.onb-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px -6px rgba(200,16,46,0.5), inset 0 1px 0 rgba(255,255,255,0.25); filter: brightness(1.04); }
.onb-btn-primary:active { transform: scale(0.97); }
.onb-btn-primary:disabled { opacity: 0.35; cursor: not-allowed; transform: none; box-shadow: none; }

.onb-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--bg-tinted);
  border: 1px solid var(--separator);
  color: var(--text-primary);
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 12px;
  letter-spacing: -0.005em;
  transition: all 150ms;
}
.onb-btn-ghost:hover { background: var(--bg-elevated); border-color: var(--separator-strong); }

.onb-kbd-hint {
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-tertiary);
  letter-spacing: -0.005em;
}
.onb-kbd-hint kbd {
  font-family: inherit;
  font-size: 11px;
  padding: 1px 6px;
  background: var(--bg-tinted);
  border: 1px solid var(--separator);
  border-radius: 4px;
  color: var(--text-secondary);
  margin: 0 2px;
}

/* Progress bar */
.onb-progress {
  display: flex;
  gap: 4px;
  margin-bottom: 36px;
}
.onb-progress-seg {
  height: 4px;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  background: rgba(60,60,67,0.10);
}
[data-theme="dark"] .onb-progress-seg { background: rgba(255,255,255,0.10); }
.onb-progress-seg > span {
  position: absolute;
  inset: 0;
  width: 0%;
  border-radius: 2px;
  transition: width 600ms cubic-bezier(0.32, 0.72, 0, 1);
}
.onb-progress-seg.p0 > span { background: var(--p0-red); }
.onb-progress-seg.p1 > span { background: var(--p1-amber); }
.onb-progress-seg.p2 > span { background: var(--p2-gold); }

/* Question */
.onb-q-overline {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.onb-q-overline.p0 { color: var(--p0-red); }
.onb-q-overline.p1 { color: var(--p1-amber); }
.onb-q-overline.p2 { color: #B8910A; }
[data-theme="dark"] .onb-q-overline.p2 { color: var(--p2-gold); }

.onb-q-cat {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--text-secondary);
  margin: 0 0 18px;
}
.onb-q-text {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--text-primary);
  margin: 0 0 24px;
}
.onb-q-sub {
  font-size: 15px;
  color: var(--text-tertiary);
  font-style: italic;
  margin-bottom: 22px;
  line-height: 1.5;
}

.onb-textarea {
  width: 100%;
  min-height: 110px;
  max-height: 280px;
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--separator);
  padding: 14px 4px;
  font-family: inherit;
  font-size: 17px;
  line-height: 1.55;
  color: var(--text-primary);
  resize: none;
  outline: none;
  letter-spacing: -0.005em;
  transition: border-color 200ms ease;
}
.onb-textarea:focus { border-bottom-color: var(--kw-red); }
.onb-textarea::placeholder { color: var(--text-tertiary); font-weight: 400; }
.onb-textarea.idle { animation: onbBreathing 2s ease-in-out infinite; }
@keyframes onbBreathing {
  0%, 100% { border-bottom-color: var(--separator); }
  50%      { border-bottom-color: var(--separator-strong); }
}

.onb-helper {
  margin-top: 14px;
  padding: 10px 14px;
  background: var(--bg-tinted);
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  letter-spacing: -0.005em;
}
.onb-helper-needs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.onb-need-pill {
  display: inline-flex;
  align-items: center;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--separator);
  border-radius: 999px;
  color: var(--text-primary);
  letter-spacing: 0;
}
.onb-helper-tip { color: var(--text-tertiary); white-space: nowrap; }

.onb-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 32px;
  gap: 12px;
}
.onb-counter {
  font-size: 13px;
  color: var(--text-tertiary);
  letter-spacing: -0.005em;
  flex: 1;
  text-align: center;
}

/* Phase transition */
.onb-phase-icon {
  font-size: 44px;
  display: inline-block;
  animation: onbBounceIn 700ms cubic-bezier(0.32, 1.6, 0.5, 1);
}
@keyframes onbBounceIn {
  0%   { transform: scale(0.4); opacity: 0; }
  60%  { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); }
}

.onb-tertiary-link {
  margin-top: 14px;
  background: none;
  font-size: 13px;
  color: var(--text-tertiary);
  letter-spacing: -0.005em;
  transition: color 150ms;
}
.onb-tertiary-link:hover { color: var(--text-secondary); }

/* Save indicator */
.onb-save {
  position: fixed;
  top: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  border: 1px solid var(--separator);
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-primary);
  font-weight: 500;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 220ms, transform 220ms;
  pointer-events: none;
  z-index: 250;
}
[data-theme="dark"] .onb-save { background: rgba(28,28,30,0.85); }
.onb-save.visible { opacity: 1; transform: translateY(0); }
.onb-save .check {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #34C759;
  color: white;
  display: flex; align-items: center; justify-content: center;
}

/* Stats card on complete */
.onb-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  border: 1px solid var(--separator);
  border-radius: 18px;
  margin: 28px 0 24px;
  overflow: hidden;
}
[data-theme="dark"] .onb-stats { background: rgba(255,255,255,0.04); }
.onb-stats-cell {
  padding: 22px 16px;
  text-align: center;
  border-right: 1px solid var(--separator);
}
.onb-stats-cell:last-child { border-right: none; }
.onb-stats-num {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}
.onb-stats-lbl {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-top: 4px;
}
.onb-stats-foot {
  grid-column: 1 / -1;
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
  padding: 14px 16px;
  border-top: 1px solid var(--separator);
  line-height: 1.5;
}

/* Confetti particles */
.onb-particles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.onb-particle {
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--kw-red);
  bottom: -10px;
  animation: onbDrift 6s linear infinite;
  opacity: 0.6;
}
@keyframes onbDrift {
  0%   { transform: translateY(0)    translateX(0)   rotate(0); opacity: 0; }
  10%  { opacity: 0.7; }
  100% { transform: translateY(-100vh) translateX(20px) rotate(360deg); opacity: 0; }
}

/* Returning banner */
.onb-returning {
  position: absolute;
  top: 16px; left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid var(--separator);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 12.5px;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  animation: onbReturning 4s ease forwards;
  z-index: 5;
}
[data-theme="dark"] .onb-returning { background: rgba(28,28,30,0.85); }
@keyframes onbReturning {
  0%   { opacity: 0; transform: translate(-50%, -8px); }
  10%  { opacity: 1; transform: translate(-50%, 0); }
  85%  { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -8px); }
}

/* Slide transitions for question changes */
.onb-q-content.exit-left { animation: onbExitLeft 200ms cubic-bezier(0.32, 0.72, 0, 1) forwards; }
.onb-q-content.enter-right { animation: onbEnterRight 280ms cubic-bezier(0.32, 0.72, 0, 1) forwards; }
.onb-q-content.exit-right { animation: onbExitRight 200ms cubic-bezier(0.32, 0.72, 0, 1) forwards; }
.onb-q-content.enter-left { animation: onbEnterLeft 280ms cubic-bezier(0.32, 0.72, 0, 1) forwards; }
@keyframes onbExitLeft  { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(-24px); } }
@keyframes onbEnterRight{ from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }
@keyframes onbExitRight { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(24px); } }
@keyframes onbEnterLeft { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: translateX(0); } }

@media (prefers-reduced-motion: reduce) {
  .onb-overlay { animation: none; }
  .onb-stagger > * { animation-duration: 200ms; }
  .onb-q-content.exit-left, .onb-q-content.exit-right,
  .onb-q-content.enter-left, .onb-q-content.enter-right {
    animation: none;
  }
}

@media (max-width: 720px) {
  .onb-card { padding: 36px 28px; border-radius: 24px; }
  .onb-display { font-size: 36px; }
  .onb-q-text { font-size: 22px; }
}
@media (max-height: 820px) {
  .onb-card { padding: 36px 56px; }
  .onb-display { font-size: 40px; margin: 12px 0 14px; }
  .onb-divider { margin: 18px 0; }
  .onb-promise { padding: 10px 14px; font-size: 13.5px; }
  .onb-promise-list { gap: 10px; }
  .onb-meta-list { margin: 16px 0 22px; gap: 8px; }
  .onb-q-text { font-size: 24px; margin: 0 0 18px; }
  .onb-q-cat { margin: 0 0 12px; font-size: 18px; }
  .onb-progress { margin-bottom: 24px; }
  .onb-textarea { min-height: 80px; }
}
@media (max-height: 680px) {
  .onb-overlay { padding: 16px; }
  .onb-card { padding: 24px 40px; }
  .onb-display { font-size: 32px; }
  .onb-emoji { font-size: 24px; }
  .onb-divider { margin: 14px 0; }
  .onb-meta-list { margin: 12px 0 16px; }
  .onb-meta-item { font-size: 12.5px; }
}


/* ============ NEWS V2 ============ */

.news-page { padding-top: 8px; }

.news-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}
.news-h1 {
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0 0 8px;
  color: var(--text-primary);
}
.news-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}
.news-sub strong { color: var(--text-primary); font-weight: 600; }
.news-fresh-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #34C759;
  margin-left: 4px;
  box-shadow: 0 0 0 0 rgba(52,199,89,0.5);
  animation: liveDot 2.4s ease-in-out infinite;
}
@keyframes liveDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52,199,89,0.45); }
  50%      { box-shadow: 0 0 0 8px rgba(52,199,89,0); }
}

.news-liked-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 10px 14px;
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(200%);
  -webkit-backdrop-filter: blur(20px) saturate(200%);
  border: 1px solid var(--separator);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 200ms cubic-bezier(0.32, 0.72, 0, 1);
  flex-shrink: 0;
  margin-top: 4px;
}
.news-liked-btn:hover {
  border-color: var(--kw-red);
  color: var(--kw-red);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px -10px rgba(200,16,46,0.4);
}
.news-liked-count {
  background: var(--kw-red-gradient);
  color: white;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 999px;
  letter-spacing: -0.01em;
}

.news-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-bottom: 18px;
  padding: 4px 10px 4px 6px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 150ms;
  background: transparent;
}
.news-breadcrumb:hover { background: var(--bg-tinted); color: var(--text-primary); }
.news-breadcrumb .bc-sep { color: var(--text-tertiary); }
.news-breadcrumb .bc-current { color: var(--text-primary); font-weight: 500; }

/* Date bar */
.news-date-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}
.date-bar-track {
  flex: 1;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  padding: 4px 0;
}
.date-bar-track::-webkit-scrollbar { display: none; }
.date-pill {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 72px; height: 58px;
  padding: 8px 14px;
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(200%);
  -webkit-backdrop-filter: blur(20px) saturate(200%);
  border: 1px solid var(--separator);
  border-radius: 14px;
  font-size: 12.5px;
  cursor: pointer;
  transition: all 200ms cubic-bezier(0.32, 0.72, 0, 1);
  scroll-snap-align: start;
  color: var(--text-primary);
  flex-shrink: 0;
}
.date-pill:hover {
  transform: translateY(-1px);
  border-color: var(--separator-strong);
}
.date-pill.active {
  background: var(--kw-red-gradient);
  color: white;
  border-color: transparent;
  box-shadow: var(--kw-red-halo);
  transform: translateY(-1px);
}
.date-pill:active { transform: translateY(-1px) scale(0.96); }
.date-pill-label { font-weight: 600; letter-spacing: -0.005em; }
.date-pill-day { font-size: 10px; opacity: 0.7; margin-top: 2px; text-transform: uppercase; letter-spacing: 0.04em; }

/* Category tabs (segmented) */
.news-cat-tabs {
  display: inline-flex;
  background: var(--bg-tinted);
  border: 1px solid var(--separator);
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 20px;
  gap: 2px;
}
.news-cat-tab {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 180ms cubic-bezier(0.32, 0.72, 0, 1);
  background: transparent;
  border: none;
  white-space: nowrap;
}
.news-cat-tab:hover { color: var(--text-primary); }
.news-cat-tab.active {
  background: var(--bg-elevated);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.5);
}
.news-cat-flag { font-size: 14px; line-height: 1; }
.news-cat-count {
  background: var(--bg-tinted);
  color: var(--text-tertiary);
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 2px;
}
.news-cat-tab.active .news-cat-count {
  background: var(--kw-red-soft-bg);
  color: var(--kw-red);
}

/* News list */
.news-list { display: flex; flex-direction: column; gap: 14px; }

.news-stagger {
  animation: stagFade 380ms cubic-bezier(0.32, 0.72, 0, 1) backwards;
}
@keyframes stagFade {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* News item card */
.news-item-card {
  display: block;
  background: var(--bg-glass);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border: 1px solid var(--separator);
  border-radius: 18px;
  padding: 18px 22px 16px;
  text-decoration: none;
  color: inherit;
  transition: all 220ms cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: 0 4px 16px -10px rgba(0,0,0,0.05), inset 0 1px 0 rgba(255,255,255,0.5);
  cursor: pointer;
  position: relative;
}
.news-item-card:hover {
  transform: translateY(-2px);
  border-color: var(--kw-red);
  box-shadow: 0 14px 34px -14px rgba(0,0,0,0.14), inset 0 1px 0 rgba(255,255,255,0.6);
}
[data-theme="dark"] .news-item-card { box-shadow: 0 4px 16px -10px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.04); }
[data-theme="dark"] .news-item-card:hover { box-shadow: 0 14px 34px -14px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.06); }

.news-item-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 10px;
}
.news-item-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 11.5px;
  flex: 1;
  min-width: 0;
}

.importance-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: -0.005em;
  line-height: 1.4;
}
.importance-dot { font-size: 8px; line-height: 1; transform: translateY(-0.5px); }
.importance-pill.crit { background: rgba(200,16,46,0.10); color: var(--kw-red); }
.importance-pill.high { background: rgba(255,149,10,0.12); color: #C97500; }
[data-theme="dark"] .importance-pill.high { color: #FF9F0A; background: rgba(255,159,10,0.14); }
.importance-pill.mid  { background: rgba(255,204,0,0.16); color: #8B6914; }
[data-theme="dark"] .importance-pill.mid { color: #FFD60A; background: rgba(255,214,10,0.14); }
.importance-pill.low  { background: var(--bg-tinted); color: var(--text-tertiary); }

.news-source-pill {
  background: var(--bg-tinted);
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 10.5px;
  color: var(--text-secondary);
  letter-spacing: -0.005em;
}
.news-time { color: var(--text-tertiary); font-size: 11.5px; }

.news-pin-btn {
  width: 34px; height: 34px;
  border-radius: 11px;
  background: var(--bg-tinted);
  border: 1px solid transparent;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all 200ms cubic-bezier(0.32, 0.72, 0, 1);
  flex-shrink: 0;
}
.news-pin-btn:hover {
  background: var(--kw-red-soft-bg);
  color: var(--kw-red);
  transform: scale(1.06);
}
.news-pin-btn.liked {
  background: var(--kw-red-gradient);
  color: white;
  box-shadow: var(--kw-red-halo);
  animation: pinPop 480ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.news-pin-btn.liked:hover { transform: scale(1.1); }
@keyframes pinPop {
  0%   { transform: scale(0.85); }
  50%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.news-item-title {
  font-size: 17.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.32;
  margin: 0 0 12px;
  color: var(--text-primary);
  text-wrap: pretty;
}

.news-item-hook {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0 0 12px;
  padding-left: 24px;
  position: relative;
  text-wrap: pretty;
}
.news-item-hook .hook-icon {
  position: absolute;
  left: 0; top: 1px;
  font-size: 12px;
  opacity: 0.7;
}

.news-item-why {
  font-size: 12.5px;
  line-height: 1.5;
  background: linear-gradient(135deg, rgba(200,16,46,0.045), rgba(200,16,46,0.02));
  border-left: 2px solid var(--kw-red);
  padding: 10px 14px 10px 38px;
  border-radius: 0 10px 10px 0;
  margin-bottom: 12px;
  color: var(--text-secondary);
  position: relative;
  text-wrap: pretty;
}
[data-theme="dark"] .news-item-why {
  background: linear-gradient(135deg, rgba(200,16,46,0.10), rgba(200,16,46,0.04));
}
.news-item-why .why-icon {
  position: absolute;
  left: 14px; top: 9px;
  font-size: 13px;
}

.news-item-foot {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-tertiary);
  margin-top: 4px;
  transition: color 180ms;
}
.news-item-card:hover .news-item-foot { color: var(--kw-red); }

/* Empty state */
.news-empty {
  text-align: center;
  padding: 64px 24px;
  background: var(--bg-glass);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  border: 1px dashed var(--separator-strong);
  border-radius: 18px;
}
.news-empty .empty-icon { font-size: 40px; margin-bottom: 12px; opacity: 0.85; }
.news-empty h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.015em; margin: 0 0 6px; color: var(--text-primary); }
.news-empty p { font-size: 13px; color: var(--text-secondary); line-height: 1.5; max-width: 420px; margin: 0 auto 16px; }

/* Liked screen extras */
.liked-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 6px;
}
.liked-cat-tabs { margin-left: auto; }

.liked-cos-hint {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, rgba(200,16,46,0.05), rgba(255,149,10,0.04));
  border: 1px solid var(--separator);
  border-radius: 14px;
  padding: 12px 14px 12px 16px;
  margin: 14px 0 24px;
  font-size: 13px;
  color: var(--text-secondary);
  position: relative;
  overflow: hidden;
}
.liked-cos-hint::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--kw-red-gradient);
}
[data-theme="dark"] .liked-cos-hint {
  background: linear-gradient(135deg, rgba(200,16,46,0.12), rgba(255,149,10,0.06));
}
.cos-hint-ico {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: var(--kw-red-gradient);
  color: white;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--kw-red-halo);
}
.cos-hint-body { flex: 1; line-height: 1.45; }
.cos-hint-body strong { color: var(--text-primary); font-weight: 600; }
.cos-hint-btn {
  flex-shrink: 0;
  padding: 8px 14px;
  font-size: 12px;
}

.liked-group { display: flex; flex-direction: column; gap: 14px; }
.liked-group + .liked-group { margin-top: 8px; }
.liked-group-h {
  display: flex; align-items: center; gap: 12px;
  margin: 12px 0 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
}
.liked-group:first-child .liked-group-h { margin-top: 4px; }
.liked-group-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--separator), transparent);
}
.liked-group-label { white-space: nowrap; }
.liked-group-count {
  background: var(--bg-tinted);
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 720px) {
  .news-h1 { font-size: 32px; }
  .news-head { flex-direction: column; gap: 12px; }
  .news-cat-tabs { width: 100%; overflow-x: auto; }
  .news-item-card { padding: 16px 18px 14px; border-radius: 16px; }
  .liked-filter-row { flex-direction: column; }
  .liked-cat-tabs { margin-left: 0; }
  .liked-cos-hint { flex-direction: column; align-items: flex-start; }
  .cos-hint-btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .news-stagger { animation: none; }
  .news-fresh-dot { animation: none; }
  .news-pin-btn.liked { animation: none; }
}


/* ============================================================ */
/* ============ HOME V3 — Phase 3 design refinement =========== */
/* ============================================================ */

.home-v3 {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

/* Phase 3 Home grid layout — prevent overflow + center bottom panels */
.home-v3 .brief-grid,
.home-v3 .bottom-grid {
  width: 100%;
  max-width: 100%;
}
.home-v3 .bottom-grid {
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
}
.home-v3 .panel {
  min-width: 0;
  overflow: hidden;
}
.home-v3 .meeting-row,
.home-v3 .task-row {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}
.home-v3 .meeting-mid {
  min-width: 0;
  flex: 1;
}
.home-v3 .meeting-topic,
.home-v3 .task-title {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-v3 .task-title { flex: 1; }
.home-v3 .meeting-sub {
  min-width: 0;
  flex-wrap: wrap;
}

/* Smaller screens: collapse to single column */
@media (max-width: 920px) {
  .home-v3 .bottom-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Aurora layer (saat dilimine göre) */
.home-aurora {
  position: absolute;
  inset: -40px -40px auto -40px;
  height: 520px;
  pointer-events: none;
  z-index: -1;
  opacity: 0.85;
  transition: background 800ms cubic-bezier(0.32, 0.72, 0, 1);
}
.home-v3[data-daypart="dawn"] .home-aurora {
  background:
    radial-gradient(70% 80% at 28% -10%, rgba(255, 200, 150, 0.32), transparent 55%),
    radial-gradient(60% 70% at 78% 8%,  rgba(255, 168, 184, 0.22), transparent 60%),
    radial-gradient(40% 60% at 50% 0%,  rgba(200, 16, 46, 0.06),   transparent 70%);
}
.home-v3[data-daypart="midday"] .home-aurora {
  background:
    radial-gradient(75% 80% at 35% -10%, rgba(160, 200, 255, 0.22), transparent 55%),
    radial-gradient(60% 70% at 80% 0%,   rgba(220, 200, 255, 0.18), transparent 60%);
}
.home-v3[data-daypart="golden"] .home-aurora {
  background:
    radial-gradient(75% 80% at 70% -8%,  rgba(255, 140, 100, 0.30), transparent 55%),
    radial-gradient(55% 70% at 25% 8%,   rgba(255, 200, 130, 0.18), transparent 60%);
}
.home-v3[data-daypart="midnight"] .home-aurora {
  background:
    radial-gradient(75% 80% at 50% -10%, rgba(80, 60, 160, 0.22),  transparent 60%),
    radial-gradient(55% 70% at 20% 8%,   rgba(40, 100, 200, 0.16), transparent 60%);
}
[data-theme="dark"] .home-aurora { opacity: 0.6; }

/* ---------- Hero greeting ---------- */
.hero-greeting {
  padding: 28px 0 6px;
  animation: home-rise 480ms cubic-bezier(0.32, 0.72, 0, 1) both;
}
.hero-greeting h1 {
  font-size: clamp(34px, 4vw, 46px);
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 1.04;
  margin: 0;
  color: var(--text-primary);
}
.hero-greeting-meta {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-secondary);
}
.hero-greeting-meta .dot-sep {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--text-tertiary);
}
.hero-greeting-meta .hero-greeting-meta > span {
  display: inline-flex; align-items: center; gap: 6px;
}
.hero-greeting-meta span svg { vertical-align: -1px; }
.hero-mood {
  margin-left: auto;
  color: var(--kw-red);
  background: var(--kw-red-soft-bg);
  border: 1px solid rgba(200, 16, 46, 0.18);
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
}
[data-theme="dark"] .hero-mood {
  background: rgba(255, 59, 92, 0.10);
  border-color: rgba(255, 59, 92, 0.25);
  color: #FF6B85;
}

/* ---------- Daily Brief Hero Card ---------- */
.brief-hero {
  position: relative;
  margin-top: 22px;
  background: var(--bg-glass-strong);
  backdrop-filter: blur(50px) saturate(200%);
  -webkit-backdrop-filter: blur(50px) saturate(200%);
  border: 1px solid var(--separator);
  border-radius: 22px;
  padding: 24px 28px 18px;
  box-shadow:
    0 1px 0 inset rgba(255,255,255,0.55),
    0 8px 32px -10px rgba(0,0,0,0.06),
    0 24px 64px -24px rgba(200,16,46,0.10);
  overflow: hidden;
  transition: transform 320ms cubic-bezier(0.32, 0.72, 0, 1), box-shadow 320ms;
  animation: home-rise 520ms 80ms cubic-bezier(0.32, 0.72, 0, 1) both;
}
[data-theme="dark"] .brief-hero {
  box-shadow:
    0 1px 0 inset rgba(255,255,255,0.04),
    0 8px 32px -10px rgba(0,0,0,0.4),
    0 24px 64px -24px rgba(255,59,92,0.10);
}
.brief-hero:hover { transform: translateY(-1px); }

/* Subtle micro-aurora inside the card */
.brief-hero::before {
  content: '';
  position: absolute;
  top: -40px; right: -60px;
  width: 320px; height: 200px;
  background: radial-gradient(closest-side, rgba(200,16,46,0.10), transparent 70%);
  pointer-events: none;
}

/* Top accent rail */
.brief-hero-rail {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(200,16,46,0.55), rgba(200,16,46,0) 60%);
}

/* Refresh progress */
.brief-hero-progress {
  position: absolute; top: 2px; left: 0; right: 0; height: 2px;
  overflow: hidden;
  background: var(--separator);
}
.brief-hero-progress span {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, var(--kw-red), transparent);
  animation: brief-progress 1.6s linear infinite;
}
@keyframes brief-progress {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.brief-hero.refreshing .brief-top3,
.brief-hero.refreshing .brief-hero-lede,
.brief-hero.refreshing .brief-hero-actions {
  opacity: 0.45;
  transition: opacity 200ms;
}

/* Header bar */
.brief-hero-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.brief-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.brief-hero-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.brief-hero-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}
.bh-meta-cell {
  display: inline-flex; align-items: center; gap: 5px;
}
.bh-meta-cell svg { color: var(--text-tertiary); }
.bh-meta-dot { width: 2px; height: 2px; border-radius: 50%; background: var(--text-tertiary); }
.brief-hero-collapse {
  width: 26px; height: 26px;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  border: 1px solid var(--separator);
  background: var(--bg-glass);
  margin-left: 6px;
  transition: all 180ms cubic-bezier(0.32, 0.72, 0, 1);
}
.brief-hero-collapse:hover {
  color: var(--text-primary);
  border-color: var(--separator-strong);
  transform: translateY(-1px);
}
.brief-hero.collapsed .brief-hero-collapse { transform: rotate(-180deg); }
.brief-hero.collapsed .brief-hero-collapse:hover { transform: rotate(-180deg) translateY(1px); }

/* Lede */
.brief-hero-lede {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.brief-hero-lede-flag { font-size: 14px; }

/* Top 3 list */
.brief-top3 {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.brief-top3-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  padding: 12px 14px 12px 12px;
  background: var(--bg-tinted);
  border: 1px solid var(--separator);
  border-radius: 14px;
  transition: all 220ms cubic-bezier(0.32, 0.72, 0, 1);
  animation: top3-rise 420ms cubic-bezier(0.32, 0.72, 0, 1) both;
  cursor: default;
}
[data-theme="dark"] .brief-top3-item {
  background: rgba(255,255,255,0.03);
}
.brief-top3-item:hover {
  border-color: var(--separator-strong);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px -10px rgba(0,0,0,0.10);
}
.brief-top3-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(200, 16, 46, 0.10);
  color: var(--kw-red);
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-top: 2px;
  font-feature-settings: 'tnum';
}
.brief-top3-body { min-width: 0; }
.brief-top3-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  line-height: 1.4;
  display: flex;
  align-items: baseline;
  gap: 8px;
  text-wrap: pretty;
}
.brief-top3-light { font-size: 13px; flex-shrink: 0; }
.brief-top3-detail {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
  text-wrap: pretty;
}
.brief-top3-action {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--separator);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--kw-red);
  font-weight: 500;
}
.brief-top3-action svg { color: var(--kw-red); }

/* Action bar */
.brief-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--separator);
}
.bh-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: transparent;
  border: 1px solid var(--separator);
  color: var(--text-secondary);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 180ms cubic-bezier(0.32, 0.72, 0, 1);
}
.bh-btn:hover:not(:disabled) {
  color: var(--text-primary);
  background: var(--bg-tinted);
  border-color: var(--separator-strong);
  transform: translateY(-1px);
}
.bh-btn:active:not(:disabled) { transform: scale(0.97); }
.bh-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.bh-btn-primary {
  color: white;
  background: var(--kw-red);
  border-color: rgba(200,16,46,0.6);
  box-shadow: 0 4px 12px -4px rgba(200,16,46,0.35);
}
.bh-btn-primary:hover:not(:disabled) {
  color: white;
  background: var(--kw-red);
  filter: brightness(1.06);
  box-shadow: 0 6px 16px -4px rgba(200,16,46,0.45);
}
.bh-btn-ghost { margin-left: auto; color: var(--text-tertiary); }
.bh-btn-ghost:hover:not(:disabled) { color: var(--text-primary); }
.bh-btn .spin { animation: bh-spin 1s linear infinite; }
@keyframes bh-spin { to { transform: rotate(360deg); } }

/* Collapsed summary */
.brief-hero-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px 4px;
  cursor: pointer;
}
.brief-hero-summary-glyph { font-size: 14px; flex-shrink: 0; }
.brief-hero-summary-text {
  flex: 1;
  font-size: 14px;
  color: var(--text-primary);
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brief-hero-summary-cta {
  font-size: 12px;
  color: var(--kw-red);
  font-weight: 500;
  flex-shrink: 0;
}

/* Empty state */
.brief-hero-empty {
  text-align: center;
  padding: 40px 32px 32px;
}
.brief-empty-glyph {
  width: 56px; height: 56px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(200,16,46,0.12), rgba(200,16,46,0.04));
  border: 1px solid rgba(200,16,46,0.16);
  color: var(--kw-red);
  display: flex; align-items: center; justify-content: center;
  animation: bh-pulse 2.4s cubic-bezier(0.4,0,0.6,1) infinite;
}
@keyframes bh-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(200,16,46,0.20); }
  50%      { transform: scale(1.04); box-shadow: 0 0 0 8px rgba(200,16,46,0); }
}
.brief-empty-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.012em;
  color: var(--text-primary);
}
.brief-empty-sub {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}
.brief-empty-cta {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  background: var(--kw-red);
  color: white;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 18px -6px rgba(200,16,46,0.45);
  transition: all 180ms cubic-bezier(0.32, 0.72, 0, 1);
}
.brief-empty-cta:hover { transform: translateY(-1px); filter: brightness(1.06); }
.brief-empty-cta:disabled { opacity: 0.7; cursor: not-allowed; }

/* ---------- Brief modal ---------- */
.brief-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9500;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fade-in 200ms ease-out;
}
.brief-modal {
  background: var(--bg-elevated);
  border: 1px solid var(--separator);
  border-radius: 22px;
  width: min(720px, 100%);
  max-height: 86vh;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: bm-pop 360ms cubic-bezier(0.32, 0.72, 0, 1) both;
  overflow: hidden;
}
@keyframes bm-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}
.brief-modal-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--separator);
}
.brief-modal-title h2 {
  margin: 8px 0 0;
  font-size: 22px; font-weight: 600;
  letter-spacing: -0.018em;
  color: var(--text-primary);
}
.brief-modal-x {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  background: var(--bg-tinted);
  border: 1px solid var(--separator);
  cursor: pointer;
  transition: all 160ms;
}
.brief-modal-x:hover { color: var(--text-primary); background: var(--separator); }
.brief-modal-body {
  padding: 8px 24px 22px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
}
.bm-h2 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text-primary);
  margin: 22px 0 8px;
}
.bm-h2:first-child { margin-top: 8px; }
.bm-p { color: var(--text-secondary); margin: 0 0 8px; }
.bm-ul {
  margin: 0 0 4px;
  padding-left: 20px;
  color: var(--text-secondary);
}
.bm-ul li { margin: 4px 0; }
.bm-firstaction {
  margin-top: 6px;
  padding: 12px 14px;
  background: var(--kw-red-soft-bg);
  border: 1px solid rgba(200,16,46,0.16);
  border-left: 3px solid var(--kw-red);
  border-radius: 12px;
  font-size: 13.5px;
  color: var(--text-primary);
  line-height: 1.5;
}
[data-theme="dark"] .bm-firstaction {
  background: rgba(255,59,92,0.08);
  border-color: rgba(255,59,92,0.22);
  border-left-color: var(--kw-red);
}
.bm-top3 {
  list-style: none;
  margin: 4px 0 4px;
  padding: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.bm-top3 li {
  display: grid;
  grid-template-columns: 24px 22px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  background: var(--bg-tinted);
  border-radius: 12px;
  border: 1px solid var(--separator);
}
[data-theme="dark"] .bm-top3 li { background: rgba(255,255,255,0.03); }
.bm-top3-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(200,16,46,0.10);
  color: var(--kw-red);
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.bm-top3-light { font-size: 14px; line-height: 1; padding-top: 2px; }
.bm-top3-text { display: flex; flex-direction: column; gap: 2px; }
.bm-top3-text strong { font-size: 13.5px; color: var(--text-primary); font-weight: 600; }
.bm-top3-text span { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }

.brief-modal-meta {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--separator);
}
.brief-modal-meta > span {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.bm-toolchips {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 12px;
}
.bm-toolchip {
  padding: 4px 10px;
  background: var(--bg-tinted);
  border: 1px solid var(--separator);
  border-radius: 999px;
  font-size: 11.5px;
  font-family: 'SF Mono', ui-monospace, monospace;
  color: var(--text-secondary);
}
.bm-toolchip-agent {
  font-family: inherit;
  background: var(--kw-red-soft-bg);
  border-color: rgba(200,16,46,0.16);
  color: var(--kw-red);
}

/* ---------- Compact ask bar ---------- */
.ask-bar {
  margin-top: 18px;
  background: var(--bg-glass);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid var(--separator);
  border-radius: 18px;
  padding: 12px 14px 12px 16px;
  transition: all 220ms cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: var(--shadow-sm);
  animation: home-rise 560ms 160ms cubic-bezier(0.32, 0.72, 0, 1) both;
}
.ask-bar.focused {
  border-color: rgba(200,16,46,0.28);
  box-shadow: var(--shadow-glow);
  background: var(--bg-glass-hi);
}
.ask-bar-row {
  display: flex; align-items: flex-end; gap: 10px;
}
.ask-bar-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  background: var(--bg-tinted);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: -0.005em;
  margin-bottom: 4px;
  flex-shrink: 0;
}
.ask-bar-label .sparkle { color: var(--kw-red); }
.ask-bar-textarea {
  flex: 1;
  border: none;
  outline: none;
  background: none;
  font-size: 15px;
  color: var(--text-primary);
  resize: none;
  font-family: inherit;
  padding: 4px 0;
  line-height: 1.5;
  min-height: 22px;
  max-height: 140px;
  letter-spacing: -0.012em;
}
.ask-bar-textarea::placeholder { color: var(--text-tertiary); }
.ask-bar-mic {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  color: var(--text-tertiary);
  border: none;
  transition: all 150ms;
}
.ask-bar-mic:hover { color: var(--text-primary); background: var(--separator); }
.ask-bar-send {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--kw-red);
  color: white;
  border: none;
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
  transition: all 200ms cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: 0 4px 12px rgba(200,16,46,0.35);
}
.ask-bar-send.visible {
  opacity: 1; transform: scale(1); pointer-events: auto;
}
.ask-bar-send:hover { filter: brightness(1.08); }
.ask-bar-send:active { transform: scale(0.94); }
.ask-bar-chips {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 8px;
  padding-left: 60px;
}
.ask-bar .chip {
  font-size: 12px;
  padding: 5px 10px;
  background: var(--bg-tinted);
  border: 1px solid var(--separator);
  border-radius: 999px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 150ms;
}
.ask-bar .chip:hover {
  border-color: var(--separator-strong);
  color: var(--text-primary);
  transform: translateY(-1px);
}

/* ---------- News when chip + why callout (hub polish) ---------- */
.home-v3 .news-source {
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
}
.home-v3 .news-when {
  font-size: 10.5px;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
}
.news-why {
  margin-top: 8px;
  padding: 8px 10px;
  background: rgba(200,16,46,0.05);
  border-left: 2px solid rgba(200,16,46,0.4);
  border-radius: 6px;
  font-size: 11.5px;
  font-style: italic;
  color: var(--kw-red);
  line-height: 1.45;
}
[data-theme="dark"] .news-why {
  background: rgba(255,59,92,0.08);
  border-left-color: rgba(255,59,92,0.5);
  color: #FF6B85;
}

/* Section head spacing tweak inside home-v3 */
.home-v3 .section-head { margin: 36px 0 14px; }
.home-v3 .section-head h2 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text-primary);
}

/* Polish hub cards */
.home-v3 .brief-col {
  border-radius: 18px;
  padding: 18px 18px 14px;
  transition: transform 220ms cubic-bezier(0.32, 0.72, 0, 1), box-shadow 220ms;
}
.home-v3 .brief-col:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* Polish bottom panels */
.home-v3 .panel { border-radius: 18px; padding: 18px 18px 14px; }
.home-v3 .panel-title { font-size: 14px; font-weight: 600; letter-spacing: -0.005em; }
.home-v3 .meeting-row { border-radius: 12px; padding: 12px 10px; }
.home-v3 .task-row { border-radius: 10px; padding: 11px 8px; }

/* Animations */
@keyframes home-rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
@keyframes top3-rise {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* Responsive */
@media (max-width: 920px) {
  .hero-greeting h1 { font-size: 30px; }
  .brief-hero { padding: 20px 18px 16px; border-radius: 18px; }
  .brief-top3-item { grid-template-columns: 24px 1fr; gap: 10px; padding: 10px 12px; }
  .brief-top3-num { width: 22px; height: 22px; font-size: 11px; }
  .ask-bar-chips { padding-left: 0; }
  .hero-mood { margin-left: 0; }
}

/* End HOME V3 */

/* ============ SOLUTION SESSIONS V2 ============ */

.ss-screen {
  max-width: 980px;
  margin: 0 auto;
  padding: 8px 0 80px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

/* === Hero === */
.ss-hero {
  position: relative;
  padding: 60px 32px 56px;
  border-radius: 24px;
  background: var(--bg-elevated);
  border: 1px solid rgba(237, 28, 36, 0.10);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 8px 32px rgba(0, 0, 0, 0.04),
    0 24px 64px rgba(237, 28, 36, 0.04);
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}
.ss-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(237, 28, 36, 0.4) 30%,
    rgba(237, 28, 36, 0.6) 50%,
    rgba(237, 28, 36, 0.4) 70%,
    transparent 100%);
  z-index: 1;
}
.ss-hero-aurora {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(60% 50% at 30% 20%, rgba(237, 28, 36, 0.06), transparent 60%),
    radial-gradient(50% 40% at 75% 70%, rgba(237, 28, 36, 0.04), transparent 65%);
  z-index: -1;
  pointer-events: none;
}
.ss-hero-emoji {
  font-size: 56px;
  line-height: 1;
  margin-bottom: 20px;
  display: inline-block;
  animation: ss-emoji-in 480ms cubic-bezier(0.32, 0.72, 0, 1) both;
  filter: drop-shadow(0 6px 18px rgba(237, 28, 36, 0.18));
}
.ss-hero-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  color: var(--text-primary);
  animation: ss-fade-up 320ms cubic-bezier(0.32, 0.72, 0, 1) 80ms both;
}
.ss-hero-subtitle {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 28px;
  text-wrap: pretty;
  animation: ss-fade-up 320ms cubic-bezier(0.32, 0.72, 0, 1) 140ms both;
}
.ss-hero-subtitle strong {
  color: var(--text-primary);
  font-weight: 600;
}

.ss-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  background: var(--kw-red, #ED1C24);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(237, 28, 36, 0.25);
  transition: transform 200ms cubic-bezier(0.32, 0.72, 0, 1),
              box-shadow 200ms cubic-bezier(0.32, 0.72, 0, 1);
  animation: ss-fade-up 320ms cubic-bezier(0.32, 0.72, 0, 1) 200ms both;
}
.ss-hero-cta:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(237, 28, 36, 0.30);
}
.ss-hero-cta:active:not(:disabled) {
  transform: scale(0.98);
}
.ss-hero-cta:disabled,
.ss-hero-cta.loading { cursor: progress; opacity: 0.85; }
.ss-hero-cta.small {
  padding: 10px 20px;
  font-size: 13px;
}
.ss-cta-plus {
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
}
.ss-cta-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  animation: ss-pulse 1.1s cubic-bezier(0.32, 0.72, 0, 1) infinite;
}

@keyframes ss-pulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50%      { transform: scale(1.4); opacity: 1; }
}
@keyframes ss-emoji-in {
  0%   { opacity: 0; transform: scale(0.6); }
  60%  { transform: scale(1.08); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes ss-fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* === Section header === */
.ss-section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.ss-section-rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-subtle, rgba(0, 0, 0, 0.08)), transparent);
}
.ss-section-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

/* === 4-Faz grid === */
.ss-phases { position: relative; }

.ss-phase-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  position: relative;
}
.ss-phase-grid::before {
  content: "";
  position: absolute;
  top: 50px;
  left: 6%;
  right: 6%;
  height: 1px;
  border-top: 1px dashed rgba(237, 28, 36, 0.20);
  z-index: 0;
  animation: ss-line-draw 600ms cubic-bezier(0.32, 0.72, 0, 1) 480ms both;
  transform-origin: left;
}
@keyframes ss-line-draw {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

.ss-phase-card {
  position: relative;
  z-index: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.06));
  border-radius: 16px;
  padding: 24px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 200ms cubic-bezier(0.32, 0.72, 0, 1),
              border-color 200ms,
              box-shadow 240ms;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  animation: ss-fade-up 320ms cubic-bezier(0.32, 0.72, 0, 1) both;
}
.ss-phase-card:hover {
  transform: translateY(-2px);
  border-color: rgba(237, 28, 36, 0.25);
  box-shadow: 0 4px 12px rgba(237, 28, 36, 0.06);
}
.ss-phase-card.expanded {
  border-color: rgba(237, 28, 36, 0.30);
  box-shadow: 0 6px 18px rgba(237, 28, 36, 0.08);
}

.ss-phase-step {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(237, 28, 36, 0.10);
  color: var(--kw-red, #ED1C24);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.01em;
}
.ss-phase-line {
  width: 24px;
  height: 1px;
  background: var(--kw-red, #ED1C24);
  opacity: 0.45;
  margin: 4px 0 6px;
}
.ss-phase-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.ss-phase-warning {
  font-size: 12px;
  filter: saturate(0.9);
}
.ss-phase-tagline {
  font-size: 13px;
  font-weight: 500;
  font-style: italic;
  color: rgba(237, 28, 36, 0.78);
  letter-spacing: -0.005em;
  margin-bottom: 4px;
}
.ss-phase-desc {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--text-secondary);
  text-wrap: pretty;
  flex: 1;
}

.ss-phase-toggle {
  margin-top: 6px;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  padding: 4px 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--kw-red, #ED1C24);
  cursor: pointer;
  letter-spacing: 0.01em;
}
.ss-phase-toggle:hover { opacity: 0.78; }
.ss-phase-toggle-caret {
  display: inline-block;
  transition: transform 200ms cubic-bezier(0.32, 0.72, 0, 1);
  font-size: 11px;
  transform: rotate(-90deg);
}
.ss-phase-toggle-caret.open {
  transform: rotate(0deg);
}

.ss-phase-example {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 240ms cubic-bezier(0.32, 0.72, 0, 1);
}
.ss-phase-example.open {
  grid-template-rows: 1fr;
}
.ss-phase-example-inner {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0;
}
.ss-phase-example.open .ss-phase-example-inner {
  padding: 10px 0 2px;
}
.ss-phase-example-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.ss-phase-example-text {
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-secondary);
  font-style: italic;
}

/* === History === */
.ss-history-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}
.ss-history-heading {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 0;
}
.ss-history-count {
  color: var(--text-tertiary);
  font-weight: 500;
  margin-left: 4px;
}
.ss-history-all {
  background: transparent;
  border: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--kw-red, #ED1C24);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 160ms;
}
.ss-history-all:hover {
  background: rgba(237, 28, 36, 0.06);
}

.ss-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ss-history-item {
  width: 100%;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.06));
  text-align: left;
  cursor: pointer;
  transition: transform 180ms cubic-bezier(0.32, 0.72, 0, 1),
              border-color 200ms,
              background 200ms,
              box-shadow 240ms;
  animation: ss-fade-up 280ms cubic-bezier(0.32, 0.72, 0, 1) both;
  font-family: inherit;
}
.ss-history-item:hover {
  background: var(--bg-hover, rgba(0, 0, 0, 0.02));
  transform: translateY(-1px);
  border-color: rgba(237, 28, 36, 0.25);
  box-shadow: 0 4px 12px rgba(237, 28, 36, 0.06);
}
.ss-history-item:active { transform: scale(0.997); }

.ss-history-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(237, 28, 36, 0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.ss-history-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.ss-history-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.005em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ss-history-meta {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: -0.005em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ss-phase-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.005em;
  flex-shrink: 0;
  white-space: nowrap;
}
.ss-phase-badge-dot {
  font-size: 8px;
  line-height: 1;
}
.ss-phase-badge.phase-1 {
  background: rgba(237, 28, 36, 0.12);
  color: rgba(237, 28, 36, 0.95);
}
.ss-phase-badge.phase-2,
.ss-phase-badge.phase-3 {
  background: rgba(217, 119, 6, 0.12);
  color: rgba(180, 83, 9, 0.95);
}
.ss-phase-badge.phase-4 {
  background: rgba(22, 163, 74, 0.12);
  color: rgba(21, 128, 61, 0.95);
}

[data-theme="dark"] .ss-phase-badge.phase-2,
[data-theme="dark"] .ss-phase-badge.phase-3 {
  color: rgba(252, 211, 77, 0.95);
}
[data-theme="dark"] .ss-phase-badge.phase-4 {
  color: rgba(134, 239, 172, 0.95);
}

/* History — empty */
.ss-history-empty {
  text-align: center;
  padding: 56px 28px;
  border-radius: 18px;
  background: var(--bg-elevated);
  border: 1px dashed rgba(237, 28, 36, 0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.ss-empty-glyph {
  font-size: 36px;
  opacity: 0.65;
  margin-bottom: 4px;
}
.ss-empty-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}
.ss-empty-tip {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 440px;
  text-wrap: pretty;
  margin-bottom: 8px;
}
.ss-empty-tip em {
  display: block;
  margin-top: 6px;
  font-style: italic;
  color: var(--text-tertiary);
}

/* === Responsive === */
@media (max-width: 1024px) {
  .ss-phase-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .ss-phase-grid::before { display: none; }
}
@media (max-width: 720px) {
  .ss-screen { padding: 0 0 60px; gap: 28px; }
  .ss-hero { padding: 44px 20px 40px; border-radius: 20px; }
  .ss-hero-emoji { font-size: 44px; }
  .ss-hero-title { font-size: 26px; }
  .ss-hero-subtitle { font-size: 14px; }
  .ss-phase-grid { grid-template-columns: 1fr; gap: 12px; }
  .ss-history-item {
    grid-template-columns: 32px 1fr;
    grid-template-rows: auto auto;
    row-gap: 6px;
  }
  .ss-phase-badge {
    grid-column: 2;
    justify-self: start;
  }
}

/* End SOLUTION SESSIONS V2 */

.nav-item.kw-accent .nav-icon { color: var(--kw-red, #ED1C24); }
.nav-item.kw-accent.active { background: rgba(237, 28, 36, 0.06); }
.nav-item.kw-accent.active .nav-icon { color: var(--kw-red, #ED1C24); }
