@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');

/* Core Theme & Background */
:root {
  --theme-bg-top: #16324f;
  --theme-bg-bottom: #0b1727;
  --theme-cyan: #12b3d6;
  --theme-cyan-soft: rgba(18, 179, 214, 0.25);
  --theme-slate: #c8d5e2;
  --theme-panel: rgba(10, 20, 34, 0.66);
}

body {
  background: radial-gradient(circle at 50% 0%, var(--theme-bg-top) 0%, var(--theme-bg-bottom) 100%);
  color: #e2e8f0;
  font-family: "Montserrat", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Streaming cursor blink */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
.stream-cursor {
  display: inline-block;
  width: 0.6ch;
  animation: blink 0.8s step-start infinite;
  color: var(--theme-cyan);
  font-weight: bold;
  vertical-align: middle;
  margin-left: 2px;
}

.dashboard-page {
  height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
}

.app-container {
  display: flex;
  height: 100vh;
  min-height: 0;
  min-width: 0;
  background: transparent;
  position: relative;
}

.sidebar-backdrop,
.mobile-menu-btn,
.sidebar-mobile-bar,
.mobile-sidebar-actions {
  display: none;
}

.mobile-sidebar-action-grid {
  display: grid;
  gap: 10px;
}

.mobile-sidebar-link,
.mobile-sidebar-button {
  width: 100%;
  min-width: 0;
  text-align: center;
}

/* Glassmorphism Sidebar */
.sidebar {
  width: 280px;
  background: var(--theme-panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-right: 1px solid var(--theme-cyan-soft);
  box-shadow: 5px 0 25px rgba(0, 0, 0, 0.5);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
}

.logo {
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(90deg, #21d0b8 0%, #31a5d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 20px rgba(33, 208, 184, 0.35);
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.logo-link {
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.section h3 {
  font-size: 12px;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 1.5px;
  margin-bottom: 10px;
}

/* Glowing Buttons */
button, .upload-btn, .market-btn {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--theme-cyan-soft);
  color: #fff;
  box-shadow: 0 0 10px rgba(18, 179, 214, 0.15), inset 0 0 10px rgba(18, 179, 214, 0.05);
  border-radius: 6px;
  padding: 10px 15px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  text-align: center;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

button:hover, .upload-btn:hover, .market-btn:hover {
  background: rgba(33, 208, 184, 0.12);
  border-color: rgba(33, 208, 184, 0.85);
  box-shadow: 0 0 20px rgba(33, 208, 184, 0.35), inset 0 0 15px rgba(33, 208, 184, 0.2);
  transform: translateY(-1px);
}

/* Dropdowns & Inputs */
.dropdown, select, input[type="text"] {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  padding: 10px;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition: all 0.3s ease;
}

.dropdown:focus, input[type="text"]:focus {
  border-color: var(--theme-cyan);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.4);
}

.dropdown option {
  background: #0d0d0d;
  color: #fff;
}

/* Chat Area */
.chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  background: radial-gradient(circle at 100% 100%, rgba(20, 20, 20, 0.84) 0%, rgba(10, 10, 10, 0.35) 100%);
  position: relative;
}

.doc-editor-pane {
  width: 420px;
  min-width: 280px;
  max-width: 44vw;
  background: rgba(12, 12, 12, 0.82);
  border-left: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  transition: width 0.22s ease, min-width 0.22s ease;
}

.doc-editor-pane.collapsed {
  width: 70px;
  min-width: 70px;
}

.doc-editor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.doc-editor-header h3 {
  margin: 0;
  color: #f5f5f5;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.doc-editor-subtitle {
  margin: 6px 0 0;
  color: #a3a3a3;
  font-size: 12px;
  line-height: 1.45;
}

.doc-editor-toggle {
  width: auto;
  min-width: 86px;
  padding: 8px 10px;
  font-size: 12px;
}

.doc-editor-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  min-height: 0;
  flex: 1;
}

.doc-editor-pane.collapsed .doc-editor-header {
  padding: 10px 8px;
}

.doc-editor-pane.collapsed .doc-editor-header h3,
.doc-editor-pane.collapsed .doc-editor-subtitle,
.doc-editor-pane.collapsed .doc-editor-body {
  display: none;
}

.doc-editor-pane.collapsed .doc-editor-toggle {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  min-width: 0;
  width: 100%;
  padding: 10px 6px;
}

.doc-editor-toolbar {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 8px;
  align-items: center;
}

.doc-editor-canvas {
  flex: 1;
  min-height: 0;
  width: 100%;
  resize: none;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
  color: #0f172a;
  font-family: "Montserrat", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  padding: 18px;
  box-sizing: border-box;
}

.doc-editor-canvas:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.45);
}

.doc-editor-footnote {
  margin: 0;
  color: #a3a3a3;
  font-size: 12px;
}

.chat-header {
  padding: 20px 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(15, 15, 15, 0.4);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.chat-header h2 {
  margin: 0;
  font-weight: 400;
  color: #cbd5e1;
}

.chat-header-subtitle {
  margin-top: 6px;
  color: #94a3b8;
  font-size: 14px;
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.header-link {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 14px;
}

.header-link:hover {
  color: #fff;
}

.header-action-btn {
  width: auto;
  min-width: 120px;
}

/* Chat Window & Messages */
.chat-window {
  flex: 1;
  padding: 30px;
  overflow-y: auto;
  min-height: 0;
  min-width: 0;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.message {
  max-width: 80%;
  padding: 15px 20px;
  border-radius: 12px;
  line-height: 1.5;
  animation: fadeIn 0.3s ease forwards;
}

.message.user {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(58, 123, 213, 0.15));
  border: 1px solid rgba(0, 212, 255, 0.3);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border-bottom-right-radius: 2px;
}

.message.bot {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border-bottom-left-radius: 2px;
}

/* Bot response card */
.message-card {
  width: 100%;
  background: rgba(14, 26, 46, 0.75);
  border: 1px solid rgba(18, 179, 214, 0.22);
  border-radius: 12px;
  overflow: visible;
  animation: fadeIn 0.3s ease forwards;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.message-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: rgba(18, 179, 214, 0.07);
  border-bottom: 1px solid rgba(18, 179, 214, 0.14);
}

.message-card-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #12b3d6;
  opacity: 0.9;
}

.message-card-body {
  padding: 16px 20px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}

.message-card-body.streaming {
  min-height: 2.2em;
  contain: content;
}

.message-card-body .stream-plain {
  white-space: pre-wrap;
  line-height: 1.65;
}

.tool-phase-wrap {
  display: none;
  padding: 10px 16px 0 16px;
}

.tool-phase-wrap.active {
  display: block;
}

.tool-phase-label {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: #92dceb;
  margin-bottom: 6px;
}

.tool-phase-bar {
  position: relative;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(146, 220, 235, 0.18);
  overflow: hidden;
}

.tool-phase-fill {
  position: absolute;
  top: 0;
  left: -35%;
  width: 35%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(18, 179, 214, 0.75), rgba(33, 208, 184, 0.95));
}

.tool-phase-wrap.active .tool-phase-fill {
  animation: toolPhaseScan 1.15s ease-in-out infinite;
}

@keyframes toolPhaseScan {
  0% { left: -35%; }
  100% { left: 100%; }
}

.copy-btn {
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 5px;
  border: 1px solid rgba(18, 179, 214, 0.35);
  background: rgba(18, 179, 214, 0.07);
  color: #12b3d6;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  letter-spacing: 0.03em;
  line-height: 1;
}

.copy-btn:hover {
  background: rgba(18, 179, 214, 0.18);
  color: #21d0b8;
  border-color: rgba(33, 208, 184, 0.45);
}

.copy-btn.copied {
  background: rgba(33, 208, 184, 0.16);
  color: #21d0b8;
  border-color: rgba(33, 208, 184, 0.5);
}

/* Chat Input Area */
.chat-input {
  padding: 20px 30px;
  background: rgba(15, 15, 15, 0.8);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  gap: 15px;
  backdrop-filter: blur(10px);
}

.chat-input input,
.chat-input textarea {
  flex: 1;
  padding: 15px 20px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
  color: #e2e8f0;
  font-size: 15px;
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
  min-height: 52px;
  max-height: 200px;
  overflow-y: auto;
  box-sizing: border-box;
}

.chat-input textarea:focus {
  outline: none;
  border-color: var(--theme-cyan);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.4);
}

.chat-input button {
  width: 120px;
  /* Extra glow for the primary action button */
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.3), inset 0 0 10px rgba(255, 255, 255, 0.2);
}

.chat-input button:hover {
  border-color: #ffffff;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.5), inset 0 0 15px rgba(255, 255, 255, 0.25);
}

/* Custom Scrollbar for sleekness */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.45);
}

/* Toggle Switch Styling */
.toggle {
  display: flex;
  align-items: center;
  cursor: pointer;
  gap: 10px;
  color: #cbd5e1;
  font-size: 14px;
}
.toggle input {
  display: none;
}
.slider {
  width: 40px;
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  position: relative;
  transition: 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.slider::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  top: 2px;
  left: 3px;
  background: #94a3b8;
  transition: 0.3s;
}
.toggle input:checked + .slider {
  background: rgba(255, 255, 255, 0.2);
  border-color: #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}
.toggle input:checked + .slider::before {
  transform: translateX(18px);
  background: #fff;
  box-shadow: 0 0 8px #fff;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Uploaded File Cards */
.data-list {
    list-style: none;
    padding: 0;
    margin: 15px 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.data-list li {
    background: rgba(15, 15, 15, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-left: 3px solid rgba(255, 255, 255, 0.5);
    padding: 12px 45px 12px 15px;
    border-radius: 6px;
    font-size: 13px;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

/* Card Hover Glow */
.data-list li:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.45);
  border-left-color: #ffffff;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2), inset 0 0 10px rgba(255, 255, 255, 0.05);
    transform: translateX(4px); /* Slight bump to the right on hover */
}

/* File Icon Emulation */
.data-list li::before {
    content: "📄";
    margin-right: 10px;
    font-size: 14px;
    opacity: 0.7;
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.4));
    flex-shrink: 0;
}

.file-name-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-break: break-all;
}

.file-delete-btn {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    background: rgba(244, 63, 94, 0.15);
    box-shadow: none;
    color: #fda4af;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.file-delete-btn:hover {
    background: rgba(244, 63, 94, 0.3);
    border: none;
    box-shadow: 0 0 12px rgba(244, 63, 94, 0.3);
    transform: translateY(-50%) scale(1.1);
    color: #ff6b7a;
}

.markdown-content {
  font-family: "Montserrat", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #bec4ed;
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4 {
    margin-top: 1em;
    margin-bottom: 0.5em;
}

.markdown-content p {
    margin-bottom: 1em;
}

.markdown-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 1em 0;
}

.markdown-content th,
.markdown-content td {
    border: 1px solid #334155;
    padding: 8px;
    text-align: left;
}

.markdown-content code {
    background: rgba(148, 163, 184, 0.12);
    padding: 2px 4px;
    border-radius: 4px;
    font-family: Consolas, "Courier New", monospace;
}

.markdown-content pre {
    background: #1e1e1e;
    color: #f8f8f2;
    padding: 12px;
    overflow-x: auto;
  overflow-y: auto;
  max-height: 60vh;
  -webkit-overflow-scrolling: touch;
    border-radius: 6px;
    margin: 1em 0;
    white-space: pre;
}

.markdown-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    border-radius: 0;
}

.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.auth-card {
  width: min(460px, 92vw);
  background: rgba(15, 23, 42, 0.96);
  color: #f9fafb;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.auth-card h2 {
  margin-top: 0;
  margin-bottom: 8px;
}

.auth-subtitle {
  color: #94a3b8;
  margin-bottom: 16px;
}

.auth-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.auth-mode-btn {
  width: auto;
  padding: 10px 12px;
  border-color: rgba(148, 163, 184, 0.25);
  box-shadow: none;
}

.auth-mode-btn.active {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.75);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.2);
}

.auth-card input {
  width: 100%;
  margin-bottom: 10px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #334155;
  background: #111827;
  color: #f9fafb;
  box-sizing: border-box;
}

.auth-primary-btn {
  width: 100%;
  margin-top: 6px;
}

.auth-error {
  color: #ffffff;
  font-weight: 600;
  min-height: 20px;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.auth-helper-text {
  margin-top: 14px;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.auth-link-button {
  width: auto;
  background: transparent;
  border: none;
  box-shadow: none;
  color: #d9d9d9;
  padding: 0;
  text-shadow: none;
}

.auth-link-button:hover {
  background: transparent;
  border: none;
  box-shadow: none;
  color: #ffffff;
  transform: none;
}

.signup-only[hidden] {
  display: none !important;
}

.landing-page {
  background:
    radial-gradient(circle at 85% 8%, rgba(255, 255, 255, 0.1), transparent 36%),
    linear-gradient(160deg, #1b1b1b 0%, #090909 45%, #020202 100%);
  color: #f5f5f5;
}

.landing-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.landing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  background: linear-gradient(165deg, rgba(28, 28, 28, 0.93) 0%, rgba(10, 10, 10, 0.9) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.landing-brand {
  background: linear-gradient(180deg, #ffffff 0%, #cfcfcf 70%, #8b8b8b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.22);
  text-decoration: none;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.landing-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.landing-nav-link {
  color: #d9d9d9;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 4px 2px;
}

.landing-nav-link:hover {
  color: #fff;
}

.landing-nav-signin,
.landing-nav-cta {
  width: auto;
  min-width: 120px;
  padding: 9px 14px;
  font-size: 14px;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 32px;
  align-items: center;
  padding: 40px 0 52px;
}

.landing-eyebrow {
  display: inline-block;
  margin-bottom: 16px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #f2f2f2;
  border: 1px solid rgba(255, 255, 255, 0.24);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.landing-hero-copy h1,
.landing-section-heading h2,
.landing-final-cta h2 {
  font-size: clamp(2.25rem, 5vw, 4rem);
  line-height: 1.05;
  margin-bottom: 18px;
}

.landing-hero-copy p,
.landing-section-heading p,
.pricing-tagline,
.feature-card p,
.hero-feature-list p,
.landing-stat-list span {
  color: #d0d0d0;
  line-height: 1.7;
}

.landing-cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 28px 0;
}

.landing-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  padding: 12px 18px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.72);
  color: #f8f8f8;
  background:
    linear-gradient(130deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.04) 28%, rgba(0, 0, 0, 0.18) 100%),
    linear-gradient(180deg, #2b2b2b 0%, #121212 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.15) inset,
    0 10px 22px rgba(0, 0, 0, 0.38),
    0 0 16px rgba(255, 255, 255, 0.09);
  position: relative;
  overflow: hidden;
}

.landing-button::after {
  content: "";
  position: absolute;
  top: -115%;
  left: -55%;
  width: 42%;
  height: 340%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.32), transparent);
  transform: rotate(22deg);
  transition: left 0.45s ease;
}

.landing-button:hover {
  transform: translateY(-1px);
  border-color: #ffffff;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.28) inset,
    0 12px 28px rgba(0, 0, 0, 0.48),
    0 0 18px rgba(255, 255, 255, 0.18);
}

.landing-button:hover::after {
  left: 145%;
}

.landing-button-primary {
  border-color: rgba(255, 255, 255, 0.82);
}

.landing-button-secondary {
  border-color: rgba(255, 255, 255, 0.5);
}

.landing-stat-list {
  list-style: none;
  display: grid;
  gap: 12px;
  padding: 0;
}

.landing-stat-list li {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(35, 35, 35, 0.86), rgba(12, 12, 12, 0.9));
}

.landing-hero-card,
.feature-card,
.pricing-card,
.landing-final-cta {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(165deg, rgba(28, 28, 28, 0.93) 0%, rgba(10, 10, 10, 0.9) 100%);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.42);
  border-radius: 24px;
}

.landing-hero-card {
  padding: 28px;
}

.hero-panel-badge,
.pricing-tier {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #f2f2f2;
  border: 1px solid rgba(255, 255, 255, 0.24);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-feature-list {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.hero-feature-list div {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-feature-list div:last-child {
  border-bottom: none;
}

.landing-section {
  padding: 28px 0 18px;
}

.landing-section-heading {
  max-width: 740px;
  margin-bottom: 24px;
}

.landing-section-heading h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.feature-grid,
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.feature-card,
.pricing-card {
  padding: 24px;
}

.feature-card h3,
.pricing-card h3 {
  margin: 16px 0 12px;
  font-size: 1.5rem;
}

.pricing-card h3 span {
  font-size: 1rem;
  color: #94a3b8;
}

.pricing-card ul {
  list-style: none;
  padding: 0;
  margin: 18px 0 24px;
  display: grid;
  gap: 10px;
}

.pricing-card ul li::before {
  content: "✓";
  color: #e7e7e7;
  margin-right: 10px;
}

.pricing-card-featured {
  transform: translateY(-8px);
  border-color: rgba(255, 255, 255, 0.36);
  background: linear-gradient(170deg, rgba(58, 58, 58, 0.64), rgba(14, 14, 14, 0.94));
}

.landing-final-cta {
  margin-top: 28px;
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.landing-final-cta h2 {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  margin-bottom: 0;
}

.blog-shell {
  max-width: 900px;
}

.blog-header {
  margin-bottom: 20px;
}

.blog-main {
  padding-bottom: 32px;
}

.blog-article {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(15, 15, 15, 0.7);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  border-radius: 24px;
  padding: clamp(22px, 4vw, 40px);
}

.blog-article h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  margin-bottom: 16px;
}

.blog-lead {
  font-size: 1.08rem;
  color: #f5f5f5;
}

.blog-article h2 {
  margin-top: 28px;
  margin-bottom: 10px;
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
}

.blog-article p {
  color: #cbd5e1;
  line-height: 1.8;
}

.blog-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.blog-ordering {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.35);
}

.blog-ordering h2 {
  margin: 0 0 6px;
  font-size: 1rem;
  color: #f5f5f5;
}

.blog-ordering p {
  margin: 0;
  color: #cbd5e1;
}

.blog-list-item {
  display: block;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.45);
  border-radius: 16px;
  padding: 18px;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.blog-list-item:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(20, 20, 20, 0.9);
}

.blog-list-item h2 {
  margin: 0 0 8px;
  font-size: clamp(1.1rem, 1.7vw, 1.3rem);
  color: #f5f5f5;
}

.blog-list-item p {
  margin: 0;
}

.blog-list-meta {
  margin: 0 0 8px;
  color: #d9d9d9;
  font-size: 0.9rem;
  font-weight: 600;
}

.blog-post-meta {
  margin: 0 0 8px;
  color: #cbd5e1;
  font-size: 0.9rem;
}

.blog-byline {
  margin: 0 0 16px;
  color: #cbd5e1;
  font-size: 0.95rem;
}

.blog-cta-row {
  margin-top: 30px;
}

@media (max-width: 960px) {
  .landing-hero,
  .feature-grid,
  .pricing-grid,
  .landing-final-cta {
    grid-template-columns: 1fr;
  }

  .landing-final-cta {
    display: grid;
  }

  .chat-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .doc-editor-pane {
    display: none;
  }
}

@media (max-width: 720px) {
  .landing-shell {
    width: min(100% - 24px, 1180px);
  }

  .landing-header,
  .landing-nav,
  .chat-input {
    flex-direction: column;
    align-items: stretch;
  }

  .landing-nav-link,
  .landing-nav-signin,
  .landing-nav-cta {
    width: 100%;
    text-align: center;
  }

  .app-container {
    height: 100dvh;
    min-height: 100dvh;
    overflow: visible;
  }

  .dashboard-page {
    height: 100dvh;
    overflow: visible;
  }

  .chat-container {
    height: 100dvh;
    min-height: 0;
  }

  .message {
    max-width: 100%;
  }

  .mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 88px;
    margin-right: auto;
  }

  .chat-header {
    padding: 10px 14px;
    gap: 8px;
  }

  .chat-header-actions {
    display: none;
  }

  .header-link,
  .header-action-btn {
    width: 100%;
    min-width: 0;
    text-align: center;
  }

  .chat-window {
    padding: 12px 10px 82px;
    gap: 12px;
  }

  .chat-input {
    padding: 10px;
    gap: 8px;
  }

  .chat-input button {
    width: 100%;
  }

  .chat-input input,
  .chat-input textarea {
    padding: 12px;
    font-size: 16px;
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(2, 8, 23, 0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 20;
    border: 0;
    padding: 0;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(86vw, 360px);
    max-width: 360px;
    max-height: none;
    z-index: 30;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    padding: 16px 16px 28px;
  }

  .sidebar-mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .mobile-sidebar-actions {
    display: block;
  }

  .sidebar-mobile-title {
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #94a3b8;
  }

  .sidebar-close-btn {
    width: auto;
    padding: 8px 12px;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 520px) {
  .chat-header h2 {
    font-size: 1.2rem;
  }

  .chat-header-subtitle {
    display: none;
  }

  .message-card-header,
  .message-card-body {
    padding-left: 12px;
    padding-right: 12px;
  }

  .markdown-content pre {
    max-height: 48vh;
  }
}

/* -------------------------------------------------------------------------- */
/* Legal Studio Theme Override                                                 */
/* -------------------------------------------------------------------------- */

:root {
  --theme-bg-top: #242424;
  --theme-bg-bottom: #070707;
  --theme-cyan: #f0f0f0;
  --theme-cyan-soft: rgba(255, 255, 255, 0.28);
  --theme-panel: rgba(17, 17, 17, 0.9);
}

body.dashboard-page {
  background:
    radial-gradient(circle at 85% 8%, rgba(255, 255, 255, 0.1), transparent 36%),
    linear-gradient(160deg, #1b1b1b 0%, #090909 45%, #020202 100%);
  color: #f5f5f5;
  font-family: "Montserrat", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.chat-header h2,
.doc-editor-header h3,
.clm-header h3,
.logo {
  font-family: "Montserrat", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.logo {
  background: linear-gradient(180deg, #ffffff 0%, #cfcfcf 70%, #8b8b8b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.22);
}

.sidebar,
.doc-editor-pane,
.clm-pane,
.chat-header,
.chat-input,
.message-card,
.auth-card {
  border-color: rgba(255, 255, 255, 0.22);
  background: linear-gradient(165deg, rgba(28, 28, 28, 0.93) 0%, rgba(10, 10, 10, 0.9) 100%);
}

button,
.upload-btn,
.market-btn,
.header-action-btn,
.auth-primary-btn,
.doc-editor-toggle {
  border: 1px solid rgba(255, 255, 255, 0.72);
  color: #f8f8f8;
  background:
    linear-gradient(130deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.04) 28%, rgba(0, 0, 0, 0.18) 100%),
    linear-gradient(180deg, #2b2b2b 0%, #121212 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.15) inset,
    0 10px 22px rgba(0, 0, 0, 0.38),
    0 0 16px rgba(255, 255, 255, 0.09);
  position: relative;
  overflow: hidden;
}

button::after,
.upload-btn::after,
.market-btn::after,
.header-action-btn::after,
.auth-primary-btn::after,
.doc-editor-toggle::after {
  content: "";
  position: absolute;
  top: -115%;
  left: -55%;
  width: 42%;
  height: 340%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.32), transparent);
  transform: rotate(22deg);
  transition: left 0.45s ease;
}

button:hover,
.upload-btn:hover,
.market-btn:hover,
.header-action-btn:hover,
.auth-primary-btn:hover,
.doc-editor-toggle:hover {
  border-color: #ffffff;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.28) inset,
    0 12px 28px rgba(0, 0, 0, 0.48),
    0 0 18px rgba(255, 255, 255, 0.18);
}

button:hover::after,
.upload-btn:hover::after,
.market-btn:hover::after,
.header-action-btn:hover::after,
.auth-primary-btn:hover::after,
.doc-editor-toggle:hover::after {
  left: 145%;
}

.chat-container {
  background:
    linear-gradient(140deg, rgba(0, 0, 0, 0.66) 0%, rgba(21, 21, 21, 0.92) 42%, rgba(7, 7, 7, 0.98) 100%),
    radial-gradient(circle at 92% 0%, rgba(255, 255, 255, 0.11), transparent 30%);
}

.message.user {
  border-color: rgba(255, 255, 255, 0.36);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(32, 32, 32, 0.86));
}

.message.bot,
.message-card {
  border-color: rgba(255, 255, 255, 0.2);
  background: linear-gradient(160deg, rgba(35, 35, 35, 0.88), rgba(12, 12, 12, 0.9));
}

.message-card-label,
.tool-phase-label,
.chat-header-subtitle,
.doc-editor-subtitle,
.clm-subtitle {
  color: #cfcfcf;
}

.doc-editor-pane {
  width: 400px;
  min-width: 260px;
  max-width: 38vw;
}

.clm-pane {
  width: 360px;
  min-width: 250px;
  max-width: 34vw;
  border-left: 1px solid rgba(255, 255, 255, 0.26);
  display: flex;
  flex-direction: column;
  transition: width 0.22s ease, min-width 0.22s ease;
}

.security-pane {
  width: 360px;
  min-width: 250px;
  max-width: 34vw;
  border-left: 1px solid rgba(255, 255, 255, 0.26);
  display: flex;
  flex-direction: column;
  transition: width 0.22s ease, min-width 0.22s ease;
}

.compare-pane {
  width: 380px;
  min-width: 250px;
  max-width: 36vw;
  border-left: 1px solid rgba(255, 255, 255, 0.26);
  display: flex;
  flex-direction: column;
  transition: width 0.22s ease, min-width 0.22s ease;
}

.clm-pane.collapsed {
  width: 70px;
  min-width: 70px;
}

.security-pane.collapsed {
  width: 70px;
  min-width: 70px;
}

.compare-pane.collapsed {
  width: 70px;
  min-width: 70px;
}

.clm-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.security-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.clm-subtitle {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.45;
}

.compare-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.clm-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  min-height: 0;
  flex: 1;
  overflow-y: auto;
}

.security-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  min-height: 0;
  flex: 1;
  overflow-y: auto;
}

.security-toolbar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.security-summary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.security-control-group {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.security-control-group h4 {
  margin: 0 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #efefef;
}

.security-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: #dfdfdf;
  padding: 6px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.security-control-row:first-of-type {
  border-top: 0;
}

.security-control-status {
  min-width: 96px;
  text-align: center;
  font-size: 11px;
  border-radius: 999px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #f0f0f0;
}

.security-control-status.pass {
  color: #f5f5f5;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.16);
}

.security-control-status.warn {
  color: #d9d9d9;
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.08);
}

.security-control-status.fail {
  color: #bfbfbf;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.32);
}

.compare-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  min-height: 0;
  flex: 1;
  overflow-y: auto;
}

.clm-toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.clm-file-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.clm-file-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.clm-load-status {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.clm-status-pill {
  margin: 0;
  font-size: 11px;
  color: #e5e5e5;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.06);
}

.clm-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d8d8d8;
}

.clm-canvas,
.clm-notes {
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.23);
  color: #f5f5f5;
  background: linear-gradient(180deg, rgba(13, 13, 13, 0.98), rgba(30, 30, 30, 0.95));
  font-family: "Montserrat", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.6;
  padding: 12px;
  resize: vertical;
  min-height: 140px;
}

.clm-notes {
  min-height: 92px;
}

.clm-redline-preview {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(8, 8, 8, 0.9);
  padding: 18px;
  min-height: 58vh;
  max-height: none;
  overflow: auto;
  line-height: 1.8;
  font-size: 14px;
}

.clm-compare-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #ebebeb;
  font-size: 12px;
}

.clm-compare-view {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(10, 10, 10, 0.92);
  min-height: 120px;
  max-height: 38vh;
  overflow: auto;
}

.clm-redline-preview,
.clm-compare-view {
  flex: 1;
}

.clm-pane.collapsed .clm-header {
  padding: 10px 8px;
}

.clm-pane.collapsed .clm-header h3,
.clm-pane.collapsed .clm-subtitle,
.clm-pane.collapsed .clm-body {
  display: none;
}

.clm-pane.collapsed .doc-editor-toggle {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  min-width: 0;
  width: 100%;
  padding: 10px 6px;
}

.security-pane.collapsed .security-header {
  padding: 10px 8px;
}

.security-pane.collapsed .security-header h3,
.security-pane.collapsed .clm-subtitle,
.security-pane.collapsed .security-body {
  display: none;
}

.security-pane.collapsed .doc-editor-toggle {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  min-width: 0;
  width: 100%;
  padding: 10px 6px;
}

.compare-pane.collapsed .compare-header {
  padding: 10px 8px;
}

.compare-pane.collapsed .compare-header h3,
.compare-pane.collapsed .clm-subtitle,
.compare-pane.collapsed .compare-body {
  display: none;
}

.compare-pane.collapsed .doc-editor-toggle {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  min-width: 0;
  width: 100%;
  padding: 10px 6px;
}

.legal-add {
  background: rgba(255, 255, 255, 0.18);
  color: #f5f5f5;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 3px;
  padding: 0 2px;
  font-weight: 600;
}

.clm-redline-preview .legal-add {
  background: rgba(255, 255, 255, 0.18) !important;
  color: #f5f5f5 !important;
  border-color: rgba(255, 255, 255, 0.34) !important;
}

.legal-del {
  background: rgba(0, 0, 0, 0.4);
  color: #a3a3a3;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 3px;
  padding: 0 2px;
  text-decoration: line-through;
}

.clm-redline-preview .legal-del {
  background: rgba(0, 0, 0, 0.4) !important;
  color: #a3a3a3 !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
  text-decoration: line-through !important;
}

.legal-compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.legal-compare-table th,
.legal-compare-table td {
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 8px;
  vertical-align: top;
  white-space: pre-wrap;
  word-break: break-word;
}

.legal-compare-table tr.same td {
  background: rgba(255, 255, 255, 0.03);
}

.legal-compare-table tr.add td:last-child {
  background: rgba(255, 255, 255, 0.14);
}

.legal-compare-table tr.del td:first-child {
  background: rgba(0, 0, 0, 0.35);
}

.legal-compare-table tr.change td {
  background: rgba(255, 255, 255, 0.07);
}

@media (max-width: 1200px) {
  .clm-pane,
  .security-pane,
  .compare-pane {
    display: none;
  }
}

@media (max-width: 1420px) {
  .clm-file-grid,
  .clm-file-actions {
    grid-template-columns: 1fr;
  }
}

/* -------------------------------------------------------------------------- */
/* Terminal Green + Purple Glow Override                                       */
/* -------------------------------------------------------------------------- */

:root {
  --theme-bg-top: #06120a;
  --theme-bg-bottom: #000000;
  --theme-cyan: #39ff14;
  --theme-cyan-soft: rgba(57, 255, 20, 0.28);
  --theme-slate: #9df7b5;
  --theme-panel: rgba(4, 12, 6, 0.92);
  --theme-purple: #a855f7;
  --theme-purple-soft: rgba(168, 85, 247, 0.35);
}

body.dashboard-page,
.landing-page {
  background:
    radial-gradient(circle at 85% 6%, rgba(168, 85, 247, 0.28), transparent 40%),
    radial-gradient(circle at 8% 92%, rgba(168, 85, 247, 0.18), transparent 45%),
    linear-gradient(160deg, #061006 0%, #020402 45%, #000000 100%);
  color: #d6ffe0;
}

.logo,
.landing-brand {
  background: linear-gradient(180deg, #baffce 0%, #39ff14 55%, #1c9e0c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 18px rgba(57, 255, 20, 0.45), 0 0 32px rgba(168, 85, 247, 0.35);
}

.sidebar,
.doc-editor-pane,
.clm-pane,
.security-pane,
.compare-pane,
.chat-header,
.chat-input,
.message-card,
.auth-card,
.landing-header,
.landing-hero-card,
.feature-card,
.pricing-card,
.landing-final-cta,
.landing-stat-list li {
  border-color: rgba(57, 255, 20, 0.3);
  background: linear-gradient(165deg, rgba(6, 20, 10, 0.92) 0%, rgba(0, 0, 0, 0.94) 100%);
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.12);
}

button,
.upload-btn,
.market-btn,
.header-action-btn,
.auth-primary-btn,
.doc-editor-toggle,
.landing-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px solid rgba(57, 255, 20, 0.6);
  color: #d6ffe0;
  background:
    linear-gradient(130deg, rgba(57, 255, 20, 0.16) 0%, rgba(168, 85, 247, 0.08) 45%, rgba(0, 0, 0, 0.2) 100%),
    linear-gradient(180deg, #0c1a0e 0%, #030603 100%);
  box-shadow:
    0 0 0 1px rgba(57, 255, 20, 0.12) inset,
    0 10px 22px rgba(0, 0, 0, 0.5),
    0 0 18px rgba(168, 85, 247, 0.25);
}

button::after,
.upload-btn::after,
.market-btn::after,
.header-action-btn::after,
.auth-primary-btn::after,
.doc-editor-toggle::after,
.landing-button::after {
  background: linear-gradient(90deg, transparent, rgba(57, 255, 20, 0.4), transparent);
}

button:hover,
.upload-btn:hover,
.market-btn:hover,
.header-action-btn:hover,
.auth-primary-btn:hover,
.doc-editor-toggle:hover,
.landing-button:hover {
  border-color: #39ff14;
  box-shadow:
    0 0 0 1px rgba(57, 255, 20, 0.3) inset,
    0 12px 28px rgba(0, 0, 0, 0.55),
    0 0 24px rgba(168, 85, 247, 0.4);
}

.landing-button-primary {
  border-color: rgba(57, 255, 20, 0.85);
}

.landing-button-secondary {
  border-color: rgba(168, 85, 247, 0.55);
}

.chat-container {
  background:
    radial-gradient(circle at 100% 100%, rgba(168, 85, 247, 0.16) 0%, transparent 55%),
    radial-gradient(circle at 0% 0%, rgba(57, 255, 20, 0.08) 0%, transparent 45%);
}

.message.user {
  border-color: rgba(57, 255, 20, 0.4);
  background: linear-gradient(145deg, rgba(57, 255, 20, 0.14), rgba(10, 10, 10, 0.88));
}

.message.bot,
.message-card {
  border-color: rgba(168, 85, 247, 0.28);
  background: linear-gradient(160deg, rgba(20, 10, 28, 0.85), rgba(4, 4, 4, 0.92));
}

.message-card-header {
  background: rgba(57, 255, 20, 0.08);
  border-bottom-color: rgba(57, 255, 20, 0.18);
}

.message-card-label,
.tool-phase-label,
.chat-header-subtitle,
.doc-editor-subtitle,
.clm-subtitle {
  color: #8fe6a5;
}

.tool-phase-bar {
  background: rgba(57, 255, 20, 0.15);
}

.tool-phase-fill {
  background: linear-gradient(90deg, rgba(57, 255, 20, 0.85), rgba(168, 85, 247, 0.85));
}

.copy-btn {
  border-color: rgba(57, 255, 20, 0.4);
  background: rgba(57, 255, 20, 0.08);
  color: #7dffa0;
}

.copy-btn:hover {
  background: rgba(168, 85, 247, 0.2);
  color: #d9b6ff;
  border-color: rgba(168, 85, 247, 0.5);
}

.copy-btn.copied {
  background: rgba(57, 255, 20, 0.2);
  color: #39ff14;
  border-color: rgba(57, 255, 20, 0.55);
}

.dropdown, select, input[type="text"] {
  border-color: rgba(57, 255, 20, 0.22);
  color: #d6ffe0;
}

.dropdown:focus, input[type="text"]:focus {
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
}

.dropdown option {
  background: #060a06;
  color: #d6ffe0;
}

.chat-input button {
  border-color: rgba(57, 255, 20, 0.6);
  box-shadow: 0 0 15px rgba(57, 255, 20, 0.3), inset 0 0 10px rgba(168, 85, 247, 0.15);
}

.chat-input button:hover {
  border-color: #39ff14;
  box-shadow: 0 0 25px rgba(57, 255, 20, 0.5), inset 0 0 15px rgba(168, 85, 247, 0.25);
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb {
  background: rgba(57, 255, 20, 0.35);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 85, 247, 0.5);
}

.security-control-status {
  border-color: rgba(57, 255, 20, 0.25);
  background: rgba(57, 255, 20, 0.05);
  color: #d6ffe0;
}

.security-control-status.pass {
  color: #39ff14;
  border-color: rgba(57, 255, 20, 0.55);
  background: rgba(57, 255, 20, 0.16);
}

.security-control-status.warn {
  color: #d9b6ff;
  border-color: rgba(168, 85, 247, 0.4);
  background: rgba(168, 85, 247, 0.12);
}

.security-control-status.fail {
  color: #ff6b81;
  border-color: rgba(255, 107, 129, 0.35);
  background: rgba(255, 107, 129, 0.1);
}

.landing-eyebrow,
.hero-panel-badge,
.pricing-tier {
  background: rgba(57, 255, 20, 0.1);
  color: #8fe6a5;
  border-color: rgba(57, 255, 20, 0.3);
}

.landing-nav-link {
  color: #9df7b5;
}

.landing-nav-link:hover {
  color: #39ff14;
}

.pricing-card-featured {
  border-color: rgba(168, 85, 247, 0.5);
  background: linear-gradient(170deg, rgba(30, 12, 40, 0.75), rgba(6, 6, 6, 0.95));
}

.pricing-card ul li::before {
  color: #39ff14;
}

.clm-status-pill {
  color: #8fe6a5;
  border-color: rgba(57, 255, 20, 0.25);
  background: rgba(57, 255, 20, 0.08);
}

.clm-label {
  color: #9df7b5;
}

.clm-canvas,
.clm-notes {
  border-color: rgba(57, 255, 20, 0.25);
  color: #d6ffe0;
  background: linear-gradient(180deg, rgba(4, 10, 5, 0.98), rgba(10, 4, 16, 0.95));
}

.clm-redline-preview,
.clm-compare-view {
  border-color: rgba(57, 255, 20, 0.22);
  background: rgba(2, 6, 3, 0.92);
}

.clm-compare-header {
  color: #9df7b5;
}

.legal-add,
.clm-redline-preview .legal-add {
  background: rgba(57, 255, 20, 0.18) !important;
  color: #baffce !important;
  border-color: rgba(57, 255, 20, 0.4) !important;
}

.legal-del,
.clm-redline-preview .legal-del {
  background: rgba(0, 0, 0, 0.4) !important;
  color: #b98fe0 !important;
  border-color: rgba(168, 85, 247, 0.3) !important;
  text-decoration: line-through !important;
}

.legal-compare-table th,
.legal-compare-table td {
  border-color: rgba(57, 255, 20, 0.18);
}

.legal-compare-table tr.same td {
  background: rgba(57, 255, 20, 0.03);
}

.legal-compare-table tr.add td:last-child {
  background: rgba(57, 255, 20, 0.14);
}

.legal-compare-table tr.del td:first-child {
  background: rgba(168, 85, 247, 0.12);
}

.legal-compare-table tr.change td {
  background: rgba(168, 85, 247, 0.08);
}
