/* BanZhuan.AI Agent Platform - Design System */
/* Aligned with BanZhuan.AI main site design tokens */
/* Theme support: dark (default) and light */

:root {
  /* Dark theme (default) - matches BanZhuan.AI */
  --color-bg: hsl(222.2, 84%, 4.9%);
  --color-bg-card: hsl(222.2, 84%, 4.9%);
  --color-bg-elevated: hsl(217.2, 32.6%, 17.5%);
  --color-bg-muted: hsl(217.2, 32.6%, 17.5%);
  --color-border: hsl(217.2, 32.6%, 17.5%);
  --color-border-light: hsl(217.2, 32.6%, 14%);
  --color-text: hsl(210, 40%, 98%);
  --color-text-muted: hsl(215, 20.2%, 65.1%);
  --color-text-light: hsl(215.4, 16.3%, 46.9%);
  --color-accent: hsl(217.2, 91.2%, 59.8%);
  --color-accent-hover: hsl(213, 94%, 68%);
  --color-accent-glow: rgba(59, 130, 246, 0.15);
  --color-success: hsl(142.1, 70.6%, 45.3%);
  --color-success-bg: rgba(16, 185, 129, 0.1);
  --color-error: hsl(0, 62.8%, 30.6%);
  --color-error-bg: rgba(248, 113, 113, 0.1);
  --color-warning: hsl(38, 92%, 50%);
  --color-warning-bg: rgba(251, 191, 36, 0.1);
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --radius: 0.5rem;
  --radius-lg: 0.5rem;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  --gradient-bg: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.08), transparent),
                 radial-gradient(ellipse 60% 40% at 100% 0%, rgba(139, 92, 246, 0.05), transparent);
}

/* Light theme - matches BanZhuan.AI */
[data-theme="light"] {
  --color-bg: hsl(0, 0%, 100%);
  --color-bg-card: hsl(0, 0%, 100%);
  --color-bg-elevated: hsl(210, 40%, 96.1%);
  --color-bg-muted: hsl(210, 40%, 96.1%);
  --color-border: hsl(214.3, 31.8%, 91.4%);
  --color-border-light: hsl(214.3, 31.8%, 91.4%);
  --color-text: hsl(222.2, 84%, 4.9%);
  --color-text-muted: hsl(215.4, 16.3%, 46.9%);
  --color-text-light: hsl(215.4, 16.3%, 46.9%);
  --color-accent: hsl(221.2, 83.2%, 53.3%);
  --color-accent-hover: hsl(221.2, 83.2%, 43.3%);
  --color-accent-glow: rgba(37, 99, 235, 0.1);
  --color-success: hsl(142.1, 76.2%, 36.3%);
  --color-success-bg: rgba(5, 150, 105, 0.1);
  --color-error: hsl(0, 84.2%, 60.2%);
  --color-error-bg: rgba(220, 38, 38, 0.1);
  --color-warning: hsl(38, 92%, 50%);
  --color-warning-bg: rgba(217, 119, 6, 0.1);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
  --gradient-bg: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.05), transparent),
                 radial-gradient(ellipse 60% 40% at 100% 0%, rgba(139, 92, 246, 0.03), transparent);
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
  background-image: var(--gradient-bg);
  background-attachment: fixed;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.3;
}

h1 { font-size: 24px; }
h2 { font-size: 18px; }
h3 { font-size: 16px; }
h4 { font-size: 14px; }

.text-muted { color: var(--color-text-muted); }
.text-mono { font-family: var(--font-mono); font-size: 13px; }
.text-small { font-size: 12px; }

/* Layout */
.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  background: var(--color-bg);
  background-color: hsla(222.2, 84%, 4.9%, 0.95);
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  height: 64px;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}

[data-theme="light"] .app-header {
  background-color: hsla(0, 0%, 100%, 0.95);
}

.app-header h1 {
  font-size: 18px;
  font-weight: 600;
}

/* Brand styling - aligned with BanZhuan.AI main site */
.header-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-brand img {
  width: 40px;
  height: 40px;
}

.brand-mark {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: -0.5px;
}

.brand-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
}

.login-brand {
  font-size: 32px;
  font-weight: 800;
  color: var(--color-accent);
  letter-spacing: -1px;
  margin-bottom: 4px;
}

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

.app-main {
  flex: 1;
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* Cards - aligned with BanZhuan.AI main site */
.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-elevated);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-header h2 {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
}

.card-body {
  padding: 20px;
}

.card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-muted);
  font-size: 12px;
  color: var(--color-text-muted);
}

/* Buttons - aligned with BanZhuan.AI main site */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: var(--color-accent);
  color: white;
  border-color: var(--color-accent);
}

.btn-primary:hover:not(:disabled) {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--color-bg-elevated);
  border-color: var(--color-text-light);
}

.btn-danger {
  background: var(--color-error-bg);
  color: hsl(0, 84.2%, 60.2%);
  border-color: rgba(248, 113, 113, 0.3);
}

.btn-danger:hover:not(:disabled) {
  background: rgba(248, 113, 113, 0.2);
  border-color: hsl(0, 84.2%, 60.2%);
}

.btn-small {
  height: 32px;
  padding: 0 12px;
  font-size: 14px;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--color-text-muted);
}

.btn-ghost:hover:not(:disabled) {
  color: var(--color-text);
  background: var(--color-bg-elevated);
}

/* Forms */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
}

.form-input {
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg-elevated);
  color: var(--color-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-glow);
}

.form-input::placeholder {
  color: var(--color-text-light);
}

.form-input-mono {
  font-family: var(--font-mono);
  font-size: 13px;
}

.form-select {
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg-elevated);
  color: var(--color-text);
  cursor: pointer;
}

.form-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.form-row .form-group {
  flex: 1;
  min-width: 200px;
}

.form-hint {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.form-error {
  font-size: 12px;
  color: var(--color-error);
  margin-top: 4px;
}

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid;
}

.badge-running {
  background: var(--color-success-bg);
  color: var(--color-success);
  border-color: rgba(16, 185, 129, 0.3);
}

.badge-stopped {
  background: var(--color-error-bg);
  color: var(--color-error);
  border-color: rgba(248, 113, 113, 0.3);
}

.badge-pending {
  background: var(--color-accent-glow);
  color: var(--color-accent-hover);
  border-color: rgba(59, 130, 246, 0.3);
}

/* Tables */
.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th, td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--color-border-light);
}

th {
  font-weight: 600;
  color: var(--color-text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--color-bg-elevated);
}

td {
  vertical-align: middle;
  color: var(--color-text);
}

tr:hover {
  background: var(--color-bg-muted);
}

tr:last-child td {
  border-bottom: none;
}

.table-mono td {
  font-family: var(--font-mono);
  font-size: 12px;
}

/* Agent cards grid */
.agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.agent-card {
  background: var(--color-bg-card);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s ease;
}

.agent-card:hover {
  border-color: hsla(217.2, 91.2%, 59.8%, 0.5);
}

.agent-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.agent-card-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--color-text);
}

.agent-card-id {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 2px;
  word-break: break-all;
}

.agent-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.agent-card-meta-item {
  display: flex;
  gap: 4px;
}

.agent-card-meta-label {
  color: var(--color-text-light);
}

.agent-card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--color-border-light);
}

/* Login page */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--color-bg);
  background-image: var(--gradient-bg);
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
}

.login-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-header h1 {
  font-size: 24px;
  margin-bottom: 8px;
  color: var(--color-text);
  font-weight: 700;
}

.login-header p {
  color: var(--color-text-muted);
  font-size: 14px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-form .btn {
  width: 100%;
  padding: 12px;
}

.login-toggle {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.login-toggle a {
  color: var(--color-accent);
  text-decoration: none;
  cursor: pointer;
}

.login-toggle a:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

/* Theme toggle - aligned with BanZhuan.AI main site */
.theme-toggle {
  background: transparent;
  border: none;
  border-radius: var(--radius);
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.theme-toggle:hover {
  background: var(--color-bg-elevated);
  color: var(--color-text);
}

.theme-toggle-icon {
  width: 16px;
  height: 16px;
}

/* Landing page */
.landing-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.landing-header {
  background-color: hsla(222.2, 84%, 4.9%, 0.95);
  border-bottom: 1px solid var(--color-border);
  height: 64px;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}

[data-theme="light"] .landing-header {
  background-color: hsla(0, 0%, 100%, 0.95);
}

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

.landing-hero {
  text-align: center;
  padding: 80px 24px 80px;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.landing-hero h1 {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  color: var(--color-text);
}

.landing-hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--color-accent) 0%, hsl(221, 83%, 43%) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.landing-hero p {
  font-size: 18px;
  color: var(--color-text-muted);
  margin-bottom: 40px;
  line-height: 1.6;
}

.landing-hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.landing-section {
  padding: 64px 24px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.landing-section h2 {
  font-size: 28px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 16px;
}

.landing-section-subtitle {
  text-align: center;
  color: var(--color-text-muted);
  margin-bottom: 48px;
  font-size: 16px;
}

.landing-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.landing-step {
  background: var(--color-bg-card);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  transition: all 0.2s ease;
}

.landing-step:hover {
  border-color: hsla(217.2, 91.2%, 59.8%, 0.5);
}

.landing-step-number {
  width: 48px;
  height: 48px;
  background: var(--color-accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  margin: 0 auto 16px;
}

.landing-step h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.landing-step p {
  font-size: 14px;
  color: var(--color-text-muted);
}

.landing-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.landing-feature {
  background: var(--color-bg-card);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all 0.2s ease;
}

.landing-feature:hover {
  border-color: hsla(217.2, 91.2%, 59.8%, 0.5);
}

.landing-feature h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-text);
}

.landing-feature p {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.landing-cta {
  background: var(--color-bg-card);
  border-top: 1px solid var(--color-border);
  padding: 64px 24px;
  text-align: center;
}

.landing-cta h2 {
  font-size: 24px;
  margin-bottom: 16px;
}

.landing-cta p {
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

/* Auth required overlay for landing previews */
.auth-required-overlay {
  position: relative;
}

.auth-required-overlay::after {
  content: 'Sign in to access';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 14px;
  border-radius: var(--radius-lg);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.auth-required-overlay:hover::after {
  opacity: 1;
}

[data-theme="light"] .auth-required-overlay::after {
  background: rgba(255, 255, 255, 0.85);
}

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
}

.alert-error {
  background: var(--color-error-bg);
  color: var(--color-error);
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.alert-success {
  background: var(--color-success-bg);
  color: var(--color-success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.alert-info {
  background: var(--color-accent-glow);
  color: var(--color-accent-hover);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.alert-warning {
  background: var(--color-warning-bg);
  color: var(--color-warning);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
}

.modal {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-elevated);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  font-size: 16px;
  color: var(--color-text);
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 4px;
  transition: color 0.15s ease;
}

.modal-close:hover {
  color: var(--color-text);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-muted);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--color-text-muted);
}

.empty-state h3 {
  font-size: 16px;
  margin-bottom: 8px;
  color: var(--color-text);
}

.empty-state p {
  font-size: 14px;
  margin-bottom: 16px;
}

/* Disclaimer */
.disclaimer {
  background: var(--color-warning-bg);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: var(--radius);
  padding: 16px;
  font-size: 13px;
  color: var(--color-warning);
  margin-bottom: 16px;
}

.disclaimer-title {
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Loading spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Scrollbar styling for dark theme */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-muted);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-light);
}

/* Links */
a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--color-accent-hover);
}

/* Selection */
::selection {
  background: var(--color-accent);
  color: white;
}

/* Utilities */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

/* Color utilities */
.color-bid { color: var(--color-success); }
.color-ask { color: var(--color-error); }
.color-success { color: var(--color-success); }
.color-error { color: var(--color-error); }
.color-warning { color: var(--color-warning); }
.color-accent { color: var(--color-accent); }

/* Deploy page layout */
.deploy-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  max-width: 1000px;
}

.deploy-main {
  min-width: 0;
}

.deploy-sidebar {
  position: sticky;
  top: 80px;
  height: fit-content;
}

.deploy-summary {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.deploy-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.disclaimer-compact {
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* Data source options */
.data-source-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.data-source-option {
  cursor: pointer;
}

.data-source-option input {
  display: none;
}

.data-source-option-content {
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.data-source-option input:checked + .data-source-option-content {
  border-color: var(--color-accent);
  background: var(--color-accent-glow);
}

.data-source-option:hover .data-source-option-content {
  border-color: var(--color-text-light);
}

.data-source-option-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}

.data-source-option-desc {
  font-size: 12px;
  color: var(--color-text-muted);
}

/* Tablet breakpoint */
@media (max-width: 900px) {
  .deploy-layout {
    grid-template-columns: 1fr;
  }
  
  .deploy-sidebar {
    position: static;
  }
  
  .data-source-options {
    grid-template-columns: 1fr;
  }
  
  .landing-hero h1 {
    font-size: 36px;
  }
  
  .landing-hero p {
    font-size: 16px;
  }
  
  .landing-section h2 {
    font-size: 24px;
  }
}

/* Mobile breakpoint */
@media (max-width: 768px) {
  body {
    font-size: 13px;
  }
  
  .app-main {
    padding: 16px 12px;
  }
  
  .agents-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .form-row {
    flex-direction: column;
  }
  
  .form-row .form-group {
    min-width: 100%;
  }
  
  .app-header {
    height: auto;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 16px;
  }
  
  .app-header-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  /* Landing page mobile */
  .landing-header {
    height: auto;
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 12px;
  }
  
  .landing-header-actions {
    gap: 8px;
  }
  
  .landing-hero {
    padding: 48px 16px;
  }
  
  .landing-hero h1 {
    font-size: 28px;
    line-height: 1.2;
  }
  
  .landing-hero p {
    font-size: 14px;
    margin-bottom: 24px;
    line-height: 1.6;
  }
  
  .landing-hero-actions {
    flex-direction: column;
    gap: 12px;
  }
  
  .landing-hero-actions .btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
  }
  
  .landing-section {
    padding: 40px 16px;
  }
  
  .landing-section h2 {
    font-size: 22px;
  }
  
  .landing-section-subtitle {
    font-size: 14px;
    margin-bottom: 32px;
  }
  
  .landing-steps {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .landing-step {
    padding: 20px;
  }
  
  .landing-features {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .landing-feature {
    padding: 20px;
  }
  
  .landing-feature h3 {
    font-size: 15px;
  }
  
  .landing-feature p {
    font-size: 13px;
  }
  
  .landing-cta {
    padding: 40px 16px;
  }
  
  .landing-cta h2 {
    font-size: 20px;
  }
  
  /* Cards mobile */
  .card-header {
    padding: 12px 16px;
  }
  
  .card-body {
    padding: 16px;
  }
  
  .card-footer {
    padding: 10px 16px;
  }
  
  /* Agent cards mobile */
  .agent-card {
    padding: 16px;
  }
  
  .agent-card-title {
    font-size: 14px;
  }
  
  .agent-card-meta {
    font-size: 12px;
  }
  
  .agent-card-actions {
    flex-wrap: wrap;
  }
  
  /* Buttons mobile - touch-friendly */
  .btn {
    height: 44px;
    padding: 0 16px;
  }
  
  .btn-small {
    height: 36px;
    padding: 0 12px;
    font-size: 14px;
  }
  
  /* Tables mobile */
  .table-wrap {
    margin: 0 -16px;
    padding: 0 16px;
    -webkit-overflow-scrolling: touch;
  }
  
  table {
    font-size: 12px;
    min-width: 400px;
  }
  
  th, td {
    padding: 8px 10px;
    white-space: nowrap;
  }
  
  /* Forms mobile */
  .form-input,
  .form-select {
    padding: 12px 14px;
    font-size: 16px; /* Prevents iOS zoom on focus */
    min-height: 48px;
  }
  
  .form-group {
    margin-bottom: 12px;
  }
  
  /* Modal mobile */
  .modal-overlay {
    padding: 16px;
    align-items: flex-end;
  }
  
  .modal {
    max-height: 85vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
  
  .modal-header {
    padding: 16px 20px;
  }
  
  .modal-body {
    padding: 20px;
  }
  
  .modal-footer {
    padding: 12px 20px;
    flex-direction: column;
  }
  
  .modal-footer .btn {
    width: 100%;
  }
  
  /* Login mobile */
  .login-container {
    padding: 16px;
    align-items: flex-start;
    padding-top: 48px;
  }
  
  .login-card {
    padding: 24px 20px;
  }
  
  .login-brand {
    font-size: 28px;
  }
  
  .login-header h1 {
    font-size: 20px;
  }
  
  /* Deploy page mobile */
  .deploy-layout {
    gap: 16px;
  }
  
  /* Docs page mobile */
  .docs-container {
    padding: 16px;
  }
  
  .docs-sidebar {
    display: none;
  }
  
  .docs-mobile-nav {
    display: block;
  }
  
  .docs-section h2 {
    font-size: 20px;
  }
  
  .docs-section h3 {
    font-size: 16px;
  }
  
  .docs-content {
    font-size: 13px;
  }
  
  .docs-code-block {
    font-size: 11px;
    padding: 12px;
    margin: 0 -16px;
    border-radius: 0;
  }
  
  /* Typography mobile */
  h1 { font-size: 22px; }
  h2 { font-size: 18px; }
  h3 { font-size: 15px; }
  h4 { font-size: 14px; }
}

/* Small mobile */
@media (max-width: 480px) {
  .landing-hero h1 {
    font-size: 24px;
  }
  
  .landing-hero p {
    font-size: 13px;
  }
  
  .landing-step-number {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  
  .header-brand .brand-text {
    display: none;
  }
  
  .app-header h1 {
    font-size: 16px;
  }
  
  .agent-card-id {
    font-size: 10px;
  }
  
  .badge {
    font-size: 11px;
    padding: 2px 6px;
  }
  
  /* Hide less important text on very small screens */
  .text-muted.hide-xs {
    display: none;
  }
}

/* Docs page styles */
.docs-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.docs-header {
  background-color: hsla(222.2, 84%, 4.9%, 0.95);
  border-bottom: 1px solid var(--color-border);
  height: 64px;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}

[data-theme="light"] .docs-header {
  background-color: hsla(0, 0%, 100%, 0.95);
}

.docs-layout {
  display: flex;
  flex: 1;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  padding: 0 24px;
}

.docs-sidebar {
  width: 220px;
  flex-shrink: 0;
  padding: 24px 0;
  position: sticky;
  top: 60px;
  height: fit-content;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}

.docs-sidebar-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 16px;
}

.docs-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.docs-nav-item {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--color-text-muted);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  background: none;
  border: none;
  width: 100%;
}

.docs-nav-item:hover {
  color: var(--color-text);
  background: var(--color-bg-muted);
}

.docs-nav-item.active {
  color: white;
  background: var(--color-accent);
}

.docs-mobile-nav {
  display: none;
  padding: 16px;
  border-bottom: 1px solid var(--color-border);
}

.docs-mobile-nav select {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg-elevated);
  color: var(--color-text);
}

.docs-content {
  flex: 1;
  padding: 24px 0 48px 48px;
  min-width: 0;
  max-width: 800px;
}

.docs-section {
  margin-bottom: 48px;
  scroll-margin-top: 80px;
}

.docs-section h2 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
}

.docs-section h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 24px 0 12px;
}

.docs-section p {
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
}

.docs-section ul {
  margin: 12px 0;
  padding-left: 24px;
}

.docs-section li {
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 8px;
}

.docs-section a {
  color: var(--color-accent);
}

.docs-section a:hover {
  text-decoration: underline;
}

.docs-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin: 16px 0;
}

.docs-card-title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 8px;
}

.docs-card-desc {
  font-size: 13px;
  color: var(--color-text-muted);
}

.docs-code-block {
  background: hsl(222, 47%, 11%);
  color: hsl(210, 40%, 96%);
  padding: 16px 20px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  margin: 16px 0;
}

.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 16px 0;
}

.docs-external-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--color-accent);
  font-size: 13px;
}

.docs-external-link:hover {
  text-decoration: underline;
}

.docs-table-wrap {
  overflow-x: auto;
  margin: 16px 0;
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.docs-table th,
.docs-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--color-border-light);
}

.docs-table th {
  font-weight: 600;
  color: var(--color-text-muted);
  font-size: 12px;
  background: var(--color-bg-elevated);
}

/* Footer styles - aligned with BanZhuan.AI main site */
.app-footer {
  border-top: 1px solid var(--color-border);
  padding: 48px 24px;
  margin-top: auto;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-brand img {
  width: 40px;
  height: 40px;
}

.footer-brand span {
  font-weight: 700;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  font-size: 14px;
  color: var(--color-text-muted);
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--color-text);
}

.footer-copyright {
  font-size: 14px;
  color: var(--color-text-muted);
}

@media (max-width: 768px) {
  .docs-sidebar {
    display: none;
  }
  
  .docs-mobile-nav {
    display: block;
  }
  
  .docs-content {
    padding: 24px 0;
  }
  
  .docs-layout {
    padding: 0 16px;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  
  .footer-links {
    gap: 16px;
    justify-content: center;
  }
}
