:root {
  --bg: #070a0e;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.09);
  --border-glow: rgba(1, 93, 81, 0.5);
  --primary: #015d51;
  --primary-hover: #027a6b;
  --primary-glow: rgba(1, 93, 81, 0.35);
  --accent: #14b8a6;
  --accent-glow: rgba(20, 184, 166, 0.25);
  --danger: #ef4444;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --font-code: 'Fira Code', monospace;
}

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

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Glassmorphism */
.glass {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.glass:hover {
  border-color: rgba(1, 93, 81, 0.45);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

/* Layout */
.layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  background: rgba(8, 12, 17, 0.95);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 34px;
}

.logo-img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--border-glow);
}

.logo-text {
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(135deg, #2dd4bf, #015d51);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-tag {
  font-size: 10px;
  background: rgba(1, 93, 81, 0.25);
  color: #2dd4bf;
  padding: 2px 6px;
  border-radius: 4px;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.nav-section {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.8px;
  margin: 16px 0 8px 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 10px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.nav-item.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.nav-item:hover, .nav-item.active {
  background: var(--primary-glow);
  color: #ffffff;
  border-left: 3px solid #2dd4bf;
}

.sidebar-footer {
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-placeholder {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.user-info {
  display: flex;
  flex-direction: column;
  font-size: 12px;
}

.user-name {
  font-weight: 600;
}

/* Main Content */
.main-content {
  display: flex;
  flex-direction: column;
  padding: 28px 36px;
  gap: 28px;
}

/* Auth Lock Screen */
.auth-lock-screen {
  min-height: 520px;
  border: 1px solid var(--border-glow);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.lock-shield-icon {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border-glow);
}

/* Topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.divider-vertical {
  width: 1px;
  height: 24px;
  background: var(--border);
}

.select-input, .input-text {
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 14px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  outline: none;
}

.select-input:focus, .input-text:focus {
  border-color: #2dd4bf;
  box-shadow: 0 0 0 2px var(--primary-glow);
}

/* Buttons */
.btn {
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 0 16px var(--primary-glow);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-sm {
  padding: 7px 12px;
  font-size: 12px;
}

.btn-xs {
  padding: 4px 8px;
  font-size: 11px;
}

.btn-danger-outline {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: var(--danger);
}
.btn-danger-outline:hover {
  background: rgba(239, 68, 68, 0.18);
}

/* Stats Cards (Spacious) */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.stat-card {
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--primary-glow);
  color: #2dd4bf;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  border: 1px solid var(--border-glow);
}

.stat-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
}

/* Studio Layout */
.grid-studio {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 560px;
}

.schema-sidebar {
  border-right: 1px solid var(--border);
}

.schema-tree-item {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  transition: all 0.2s ease;
}

.schema-tree-item:hover {
  background: var(--primary-glow);
  color: #fff;
}

.code-editor {
  flex: 1;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: #2dd4bf;
  font-family: var(--font-code);
  font-size: 14px;
  padding: 16px;
  outline: none;
  resize: none;
  min-height: 200px;
  line-height: 1.6;
}

.results-table-wrapper {
  margin-top: 14px;
  overflow-x: auto;
}

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

.data-table th, .data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  background: rgba(0, 0, 0, 0.4);
  color: var(--text-muted);
  font-weight: 600;
}

.cell-editable {
  cursor: pointer;
  transition: background 0.2s ease;
}

.cell-editable:hover {
  background: var(--primary-glow);
}

.cell-input {
  background: #000;
  border: 1px solid #2dd4bf;
  color: #2dd4bf;
  padding: 4px 8px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 13px;
  width: 100%;
}

/* Cards & Grid (Spacious Bubble Cards) */
.grid-3Col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.table-card {
  padding: 26px 28px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.table-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 6px;
}

.table-card-title {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
}

.bridge-card {
  padding: 30px 28px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.bridge-card-title {
  font-size: 16px;
  font-weight: 700;
}

.bridge-card-desc {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-muted);
}

.provider-icon-badge {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  border: 1px solid var(--border-glow);
}

/* Drop Zone */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: 16px;
  padding: 36px 28px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.drop-zone:hover {
  border-color: #2dd4bf;
  background: var(--primary-glow);
}

/* Badges */
.badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.badge-teal {
  background: var(--primary-glow);
  color: #2dd4bf;
  border: 1px solid var(--border-glow);
}

/* Utilities */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 20px; }
.flex-1 { flex: 1; }
.p-3 { padding: 14px; }
.p-4 { padding: 20px; }
.p-5 { padding: 28px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 14px; }
.mt-4 { margin-top: 20px; }
.mr-2 { margin-right: 8px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 14px; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-teal { color: #2dd4bf; }
.text-danger { color: var(--danger); }
.text-primary { color: var(--primary); }
.text-small { font-size: 13px; }
.font-bold { font-weight: 600; }
.font-code { font-family: var(--font-code); }
.w-full { width: 100%; }

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal-backdrop.z-top {
  z-index: 1050 !important;
}

.modal-card {
  width: 480px;
  border-radius: 16px;
}

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

.btn-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
}
