:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #18202f;
  background: #f4f7fb;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --motion-fast: 140ms;
  --motion-normal: 220ms;
  --motion-slow: 320ms;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --ease-emphasized: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

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

body {
  min-width: 320px;
  margin: 0;
}

button, input {
  font: inherit;
}

button,
a,
.semi-button,
.semi-input-wrapper,
.semi-select,
.semi-tag {
  transition-duration: var(--motion-fast);
  transition-timing-function: var(--ease-standard);
}

.brand-logo {
  display: block;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  object-fit: contain;
}

.brand-logo.large {
  width: 68px;
  height: 68px;
}

.page-eyebrow {
  color: #66758b;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

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

@keyframes contentFadeUp {
  from { opacity: 0; transform: translate3d(0, 10px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

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

@keyframes contentScaleIn {
  from { opacity: 0; transform: translate3d(0, 8px, 0) scale(0.985); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes panelSlideIn {
  from { opacity: 0; transform: translate3d(14px, 0, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes rowFadeIn {
  from { opacity: 0; transform: translate3d(0, 5px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes caretBlink {
  to { opacity: 0; }
}

@keyframes agentPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.55; }
}

@keyframes agentPending {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.45; }
  40% { transform: translateY(-3px); opacity: 1; }
}

@keyframes streamPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.route-fallback {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #f4f7fb;
}

.route-fallback-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(36, 47, 69, 0.16);
  border-top-color: #cf3f40;
  border-radius: 999px;
  animation: routeFallbackSpin 720ms linear infinite;
}

@keyframes routeFallbackSpin {
  to { transform: rotate(360deg); }
}

@keyframes gridDrift {
  from { background-position: 0 0; }
  to { background-position: 48px 48px; }
}

@keyframes scanline {
  0% { transform: translateY(-110%); opacity: 0; }
  45%, 55% { opacity: 0.7; }
  100% { transform: translateY(110%); }
}

@media (prefers-reduced-motion: reduce) {
  .login-panel,
  .session-row,
  .chat-row,
  .agent-picker,
  .composer-picker,
  .subagent-side-panel,
  .execution-row,
  .nested-panel,
  .file-manager-list-row,
  .file-manager-icon-item,
  .file-manager-viewer-overlay {
    animation: none !important;
    transition: none !important;
  }
}
