/* Apple Developer Design System for Symbiosis (sbio.cloud) */

:root {
  --bg-color: #000000;
  --bg-surface: rgba(22, 22, 23, 0.8);
  --bg-card: rgba(28, 28, 30, 0.5);
  --bg-terminal: #121217;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  
  --text-primary: #ffffff;
  --text-secondary: #8e8e93;
  --text-muted: #48484a;
  
  --accent-blue: #0a84ff;
  --accent-emerald: #30d158;
  --accent-purple: #bf5af2;
  --accent-amber: #ff9f0a;
  --accent-red: #ff453a;
  
  --transition-smooth: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", "Fira Code", Monaco, Consolas, monospace;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  letter-spacing: -0.011em;
}

/* Apple-style background: pure clean gradient without noisy grids */
.glow-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: -2;
  background: radial-gradient(circle at 50% -20%, rgba(10, 132, 255, 0.08) 0%, transparent 60%);
}

.grid-overlay {
  display: none; /* Removed gaming style grid */
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.24);
}

/* Button UI */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 13.5px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition-smooth);
  font-family: var(--font-sans);
}

.btn-primary {
  background-color: #f5f5f7;
  color: #000000;
  border-color: transparent;
  font-weight: 600;
}
.btn-primary:hover {
  background-color: #e5e5ea;
  color: #000000;
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.04);
  border-color: var(--border-color);
  color: var(--text-primary);
}
.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: var(--border-hover);
}

.btn-danger {
  background-color: rgba(255, 69, 58, 0.1);
  border-color: rgba(255, 69, 58, 0.2);
  color: var(--accent-red);
}
.btn-danger:hover {
  background-color: var(--accent-red);
  color: #ffffff;
}

.btn-small {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 6px;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* Avatar Dropdown Styles */
.user-dropdown-container {
  position: relative;
  display: inline-block;
}

.avatar-btn {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  padding: 0;
}
.avatar-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(10, 132, 255, 0.3);
}
.avatar-initial {
  color: #fff;
  font-weight: 600;
  font-size: 14px;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: rgba(30, 30, 35, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  min-width: 200px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 200;
}
.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-header {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dropdown-username {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}
.dropdown-email {
  font-size: 12px;
  color: var(--text-secondary);
}

.dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  width: 100%;
}

.dropdown-item {
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition-smooth);
}
.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}
.dropdown-item.danger:hover {
  color: var(--accent-red);
  background: rgba(255, 69, 58, 0.1);
}
.dropdown-item:last-child {
  border-radius: 0 0 12px 12px;
}

/* Header */
.main-header {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.022em;
  color: var(--text-primary);
}
.logo-svg {
  color: var(--text-primary);
  transition: var(--transition-smooth);
}
.logo:hover .logo-svg {
  transform: rotate(72deg);
}
.domain-badge {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

/* iOS Segmented Navigation */
.nav-links {
  display: flex;
  background: rgba(120, 120, 128, 0.12);
  padding: 2px;
  border-radius: 8px;
  gap: 2px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}
.nav-btn:hover {
  color: var(--text-primary);
}
.nav-btn.active {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.2);
}

.user-status-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}
/* Removed .user-name-badge */

/* Layout */
.main-content {
  flex: 1;
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px;
}

/* Clean Dashboard Statistics Widgets */
.stats-section {
  margin-bottom: 40px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.stat-card {
  background: transparent;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.stat-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: #86868b;
}

.stat-info {
  display: flex;
  flex-direction: column;
}
.stat-label {
  font-size: 11.5px;
  color: var(--text-secondary);
  font-weight: 500;
}
.stat-value {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.022em;
  margin-top: 2px;
}

/* Tabs */
.tab-pane {
  display: none;
  animation: appleFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.tab-pane.active {
  display: block;
}

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

.pane-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}
.pane-header h1 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.022em;
}
.subtitle {
  color: var(--text-secondary);
  font-size: 13.5px;
  margin-top: 4px;
}

/* Search Bar */
.filter-bar {
  display: flex;
  gap: 12px;
}
.search-input-wrapper {
  position: relative;
  width: 260px;
}
.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-size: 13px;
}
.search-input-wrapper input {
  padding-left: 36px !important;
}

/* Custom Dropdown UI for Filters */
.custom-dropdown-container {
  position: relative;
  width: 180px;
}
.custom-dropdown-selected {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f5f5f7;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s;
}
.custom-dropdown-selected:hover {
  background: rgba(255, 255, 255, 0.08);
}
.custom-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  background: rgba(30, 30, 35, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s;
  z-index: 200;
  max-height: 250px;
  overflow-y: auto;
}
.custom-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.custom-option {
  padding: 12px 14px;
  font-size: 13.5px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.2s;
}
.custom-option:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

/* Global Form Elements (Inputs, Selects, Textareas) */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
select,
textarea,
.code-textarea {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f5f5f7;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  outline: none;
  font-family: var(--font-sans);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
}

input:focus, select:focus, textarea:focus, .code-textarea:focus {
  border-color: var(--accent-blue);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.15);
}

/* Custom Pro Dropdown Select */
select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%2386868b%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpolyline%20points%3D%226%209%2012%2015%2018%209%22%3E%3C%2Fpolyline%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
  cursor: pointer;
}
select option {
  background-color: #1c1c1e;
  color: #f5f5f7;
}

/* Grid Layout */
.agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

/* Apple-style Catalog Card */
.agent-card {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}
.agent-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.03);
}
.agent-card:hover .card-action-link {
  color: #ffffff;
}

.card-top {
  margin-bottom: 12px;
}
.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.agent-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.011em;
  color: #ffffff;
}
.agent-status-badge {
  font-size: 11px;
  font-weight: 500;
  color: var(--accent-emerald);
  background: rgba(48, 209, 88, 0.1);
  padding: 1px 7px;
  border-radius: 10px;
}
.agent-id-str {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 10px;
}
.agent-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-bottom {
  margin-top: 12px;
}
.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 14px;
}
.tag {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}
.tag.skill-tag {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

.card-action-row {
  margin-top: 16px;
  text-align: left;
}
.card-action-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}

/* Xcode-style Console Layout */
.terminal-wrapper {
  background-color: var(--bg-terminal);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
}
.terminal-header {
  background-color: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-color);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.terminal-dots {
  display: flex;
  gap: 6px;
}
.terminal-dots .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}
.terminal-title {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-secondary);
}
.terminal-status {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent-emerald);
  display: flex;
  align-items: center;
  gap: 6px;
}

.terminal-body {
  padding: 16px;
  height: 480px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
}
.terminal-line {
  margin-bottom: 6px;
  padding-left: 6px;
}
.terminal-line.system { color: var(--text-secondary); }
.terminal-line.info { color: var(--text-primary); }
.terminal-line.call {
  color: #e2e8f0;
  border-left: 2px solid var(--accent-blue);
  background-color: rgba(10, 132, 255, 0.02);
  padding-left: 8px;
}
.terminal-line.error {
  color: #ffb3b3;
  border-left: 2px solid var(--accent-red);
  background-color: rgba(255, 69, 58, 0.02);
  padding-left: 8px;
}
.log-time {
  color: var(--text-muted);
  margin-right: 8px;
}

/* Clean Forms */
.auth-container {
  max-width: 380px;
  margin: 60px auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 28px;
}
.auth-tabs {
  display: flex;
  margin-bottom: 20px;
  background: rgba(120, 120, 128, 0.08);
  padding: 2px;
  border-radius: 6px;
}
.auth-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 8px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 4px;
  font-size: 12.5px;
  transition: var(--transition-smooth);
}
.auth-tab.active {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.1);
}

.auth-form h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.022em;
}
.form-desc {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 20px;
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.field-help {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.4;
}

/* Console Workspace */
.console-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 0;
  min-height: 600px;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
}
.console-card {
  background: transparent;
  padding: 24px;
  display: flex;
  flex-direction: column;
}
.my-agents-card {
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.card-header h2 {
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.my-agents-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  flex: 1;
}
.my-agent-item {
  background: transparent;
  border: 1px solid transparent;
  padding: 12px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.my-agent-item:hover {
  background: rgba(255, 255, 255, 0.05);
}
.my-agent-item.active {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}
.my-agent-name {
  font-weight: 500;
  font-size: 14px;
  color: var(--text-primary);
  display: block;
}
.my-agent-id {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-secondary);
}
.my-agent-item.active .my-agent-name {
  color: #ffffff;
}
.my-agent-item.active .my-agent-id {
  color: rgba(255, 255, 255, 0.8);
}

.workspace-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-secondary);
  text-align: center;
  padding: 40px;
  gap: 16px;
}
.placeholder-icon {
  font-size: 48px;
  margin-bottom: 4px;
  color: #86868b;
}

.agent-details-view {
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: left;
}
.agent-details-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 20px;
  margin-bottom: 4px;
}
.agent-details-header h2 {
  font-size: 20px;
  letter-spacing: -0.022em;
}
.id-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-blue);
  background: rgba(10, 132, 255, 0.08);
  padding: 2px 8px;
  border-radius: 6px;
  margin-top: 4px;
}

/* Minimal Access Token Box */
.token-alert-box {
  background: linear-gradient(145deg, rgba(20, 20, 22, 0.8), rgba(30, 30, 32, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
}
.token-alert-box label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  display: block;
}
.token-help {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
  margin-bottom: 10px;
}
.token-input-row {
  display: flex;
  gap: 8px;
}
.token-input-row input {
  font-family: var(--font-mono);
  background: var(--bg-color);
}
.token-note {
  font-size: 11.5px;
  color: var(--accent-amber);
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.metadata-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}
.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.meta-item label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}
.meta-item p, .meta-item span {
  font-size: 13px;
}

/* Code Previews */
.schemas-section h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}
.schema-tabs-wrapper {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}
.schema-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-color);
}
.schema-tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.schema-tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--text-primary);
}
.schema-code-block {
  padding: 16px;
  background: #0d0d10;
  overflow-x: auto;
  max-height: 240px;
  border-radius: 0 0 8px 8px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}
.schema-code-block code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #a7f3d0;
}

/* Wizard Form grid */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.code-textarea {
  font-family: var(--font-mono);
  font-size: 12px;
}

/* Modals */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(15px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.modal.show {
  opacity: 1;
  pointer-events: all;
}
.modal-content {
  background: #1c1c1e;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  width: 90%;
  max-width: 540px;
  max-height: 85vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h2 {
  font-size: 17px;
  font-weight: 600;
}
.modal-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.modal-close:hover {
  color: var(--text-primary);
}
.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Toast Notification System */
.toast-container {
  position: fixed;
  bottom: 32px;
  right: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999;
  pointer-events: none;
}
.toast {
  background: rgba(30, 30, 35, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  color: var(--text-primary);
  padding: 14px 20px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  font-weight: 500;
  animation: slideInToast 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: all;
  min-width: 280px;
}
.toast.success {
  border-left: 3px solid var(--accent-emerald);
}
.toast.error {
  border-left: 3px solid var(--accent-red);
}
.toast.info {
  border-left: 3px solid var(--accent-blue);
}
.toast-icon {
  font-size: 16px;
}
.toast.success .toast-icon { color: var(--accent-emerald); }
.toast.error .toast-icon { color: var(--accent-red); }
.toast.info .toast-icon { color: var(--accent-blue); }

.toast.hiding {
  animation: slideOutToast 0.3s ease-in forwards;
}

@keyframes slideInToast {
  from { opacity: 0; transform: translateX(100%) scale(0.95); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes slideOutToast {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to { opacity: 0; transform: translateX(100%) scale(0.95); }
}

/* Footer */
.main-footer {
  text-align: center;
  padding: 32px 24px;
  font-size: 11.5px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-color);
  margin-top: 60px;
}
.main-footer a {
  color: var(--accent-blue);
  text-decoration: none;
}
.main-footer a:hover {
  text-decoration: underline;
}

/* Helpers */
.hidden { display: none !important; }
.empty-state-text {
  color: var(--text-secondary);
  font-size: 13px;
  padding: 20px 0;
}
.loading-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
  color: var(--text-secondary);
}
.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border-color);
  border-top-color: var(--text-primary);
  border-radius: 50%;
  animation: spin 0.8s infinite linear;
  margin-bottom: 12px;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

@media(max-width: 768px) {
  .console-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .header-container {
    flex-direction: column;
    gap: 12px;
  }
  .filter-bar {
    flex-direction: column;
    width: 100%;
  }
  .search-input-wrapper {
    width: 100%;
  }
}

/* Landing Page Styles */
.hero-section {
  text-align: center;
  padding: 100px 20px 60px 20px;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}
.hero-tagline {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-secondary);
  font-weight: 600;
  display: inline-block;
  margin-bottom: 20px;
}
.hero-section h1 {
  font-size: 56px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #ffffff;
  margin-bottom: 24px;
}
.hero-desc {
  font-size: 19px;
  line-height: 1.5;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 40px auto;
}
.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}

/* CLI Showcase Terminal */
.terminal-showcase {
  max-width: 720px;
  margin: 0 auto 60px auto;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: none;
}
.terminal-dots {
  display: flex;
  gap: 6px;
}
.dot.close-dot { background-color: #ff5f56; }
.dot.min-dot { background-color: #ffbd2e; }
.dot.max-dot { background-color: #27c93f; }
.showcase-body {
  height: auto;
  min-height: 200px;
}
.showcase-line {
  margin-bottom: 8px;
}
.cmd-prompt {
  color: var(--text-secondary);
  margin-right: 8px;
  user-select: none;
}
.text-muted { color: var(--text-secondary); }
.text-emerald { color: var(--accent-emerald); }

/* Landing Features Section */
.landing-features-section {
  padding: 80px 0;
  text-align: center;
  margin-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.landing-features-section h2 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
.section-subtitle {
  color: var(--text-secondary);
  font-size: 16px;
  margin-bottom: 48px;
}
.landing-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.feature-box {
  background: transparent;
  border: none;
  padding: 0;
  text-align: left;
}
.feature-icon {
  font-size: 32px;
  color: #f5f5f7;
  margin-bottom: 20px;
}
.feature-box h3 {
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.feature-box p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Call to Action Banner */
.cta-banner {
  padding: 48px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  text-align: center;
  margin: 40px 0;
}
.cta-banner h2 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.022em;
  margin-bottom: 8px;
}
.cta-banner p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 20px;
}

@media(max-width: 768px) {
  .hero-section h1 {
    font-size: 36px;
  }
  .hero-desc {
    font-size: 15px;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Dedicated Login Page Styles */
.auth-page-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  padding: 40px 20px;
}
.auth-header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.022em;
  color: var(--text-primary);
}
.auth-brand {
  color: var(--text-primary);
}
.auth-container {
  width: 100%;
  max-width: 380px;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 32px;
  margin: 0 auto;
}

.auth-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 24px;
}
.auth-tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 8px 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.auth-tab.active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.auth-form h2 {
  font-size: 22px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  text-align: center;
}

.auth-form .btn-primary {
  background-color: #f5f5f7;
  color: #000000;
  font-weight: 600;
  margin-top: 12px;
}
.auth-form .btn-primary:hover {
  background-color: #e5e5ea;
  color: #000000;
}

/* Dashboard UI/UX Enhancements */
.terminal-search-wrapper {
  position: relative;
  width: 200px;
}
.terminal-search-wrapper input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 4px 10px 4px 28px;
  font-size: 11.5px;
  color: var(--text-primary);
  outline: none;
  font-family: var(--font-sans);
  transition: var(--transition-smooth);
  width: 100%;
}
.terminal-search-wrapper input:focus {
  border-color: var(--accent-blue);
  background: rgba(255, 255, 255, 0.08);
}
.terminal-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-size: 10px;
}

.agent-actions-row {
  display: flex;
  gap: 8px;
}

.json-validation-msg {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 500;
}
.text-emerald {
  color: var(--accent-emerald) !important;
}
.text-red {
  color: var(--accent-red) !important;
}

/* Documentation Page Styles */
.docs-container {
  display: flex;
  max-width: 1100px;
  margin: 0 auto;
  gap: 40px;
  padding: 40px 20px;
  align-items: flex-start;
}

.docs-sidebar {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: 100px;
}
.docs-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.docs-nav li {
  padding: 8px 12px;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
  border-left: 2px solid transparent;
}
.docs-nav li:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}
.docs-nav li.active {
  color: var(--text-primary);
  font-weight: 500;
  border-left-color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.docs-content {
  flex: 1;
  min-width: 0; /* Prevents flex overflow */
}
.docs-content h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  color: #ffffff;
}
.docs-lead {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 40px;
}
.docs-h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 48px;
  margin-bottom: 16px;
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
}
.docs-content p {
  font-size: 15px;
  line-height: 1.6;
  color: #d1d1d6; /* Apple secondary text */
  margin-bottom: 20px;
}
.docs-content code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  color: #ffffff;
}
.docs-code-block {
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
  margin-bottom: 24px;
}
.docs-code-block code {
  background: transparent;
  padding: 0;
  color: #f5f5f7;
}

@media(max-width: 768px) {
  .docs-container {
    flex-direction: column;
  }
  .docs-sidebar {
    width: 100%;
    position: static;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 20px;
  }
}



