*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: Inter, system-ui, sans-serif;
  background: #f1f5f9;
  color: #1e293b;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* Header */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 56px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

header .logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: -0.02em;
}

header .logo img {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

header .logo .brand {
  color: #2563eb;
}

header .logo .title-text {
  color: #64748b;
  font-weight: 500;
}

header .logo .subtitle-text {
  color: #94a3b8;
  font-weight: 400;
}

#upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.45rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

#upload-btn:hover { background: #1d4ed8; }

#upload-btn svg { flex-shrink: 0; }

#file-input { display: none; }

#agent-file-input { display: none; }

/* Main columns */
main {
  display: grid;
  grid-template-columns: 1fr 300px;
  flex: 1;
  overflow: hidden;
}

/* Editor pane */
#editor-pane {
  overflow-y: auto;
  background: #fff;
  border-right: 1px solid #e2e8f0;
}

#editor {
  width: 100%;
  min-height: 100%;
}

/* Right sidebar */
aside {
  display: flex;
  flex-direction: column;
  background: #fff;
  overflow-y: auto;
}

aside::-webkit-scrollbar,
#editor-pane::-webkit-scrollbar {
  width: 4px;
}

aside::-webkit-scrollbar-track,
#editor-pane::-webkit-scrollbar-track {
  background: transparent;
}

aside::-webkit-scrollbar-thumb,
#editor-pane::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

aside::-webkit-scrollbar-thumb:hover,
#editor-pane::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Standard (Firefox + Chrome 121+) */
aside,
#editor-pane {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

/* Toast */
#toast {
  display: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

#toast.show {
  display: flex;
  opacity: 0;
  transform: translateY(-4px);
}

#toast.show.visible {
  opacity: 1;
  transform: translateY(0);
}
