:root {
  --bg: #f3f6f9;
  --surface: #ffffff;
  --ink: #1a2332;
  --muted: #5b6b7c;
  --line: #d8e0ea;
  --brand: #0f3d5e;
  --brand-2: #1a6b8a;
  --accent: #c45c26;
  --ok: #1f7a4d;
  --warn: #b7791f;
  --danger: #b42318;
  --sidebar-w: 260px;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(15, 61, 94, 0.08);
  --font: "Segoe UI", "Trebuchet MS", Candara, sans-serif;
  --mono: "Cascadia Code", "Consolas", "Courier New", monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(26, 107, 138, 0.12), transparent 60%),
    radial-gradient(900px 400px at 100% 0%, rgba(196, 92, 38, 0.08), transparent 50%),
    var(--bg);
}

a { color: var(--brand-2); text-decoration: none; }
a:hover { color: var(--brand); }

.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #0c3049 0%, #0f3d5e 55%, #123f55 100%);
  color: #e8eef4;
  padding: 1.25rem 0.9rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  flex-shrink: 0;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.4rem 0.7rem 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  margin-bottom: 1rem;
}
.brand-mark {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.brand-sub {
  font-size: 0.78rem;
  opacity: 0.75;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: rgba(255,255,255,0.86);
  padding: 0.62rem 0.75rem;
  border-radius: 8px;
  margin-bottom: 0.2rem;
  font-size: 0.94rem;
}
.nav-link:hover, .nav-link.active {
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.nav-link .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,255,255,0.45);
}
.nav-link.active .dot { background: #f0b27a; }

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  padding: 1rem 1.5rem 0.5rem;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(8px);
  background: rgba(243,246,249,0.88);
}

.search-hero {
  background: linear-gradient(135deg, rgba(15,61,94,0.95), rgba(26,107,138,0.92));
  color: #fff;
  border-radius: 14px;
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow);
}
.search-hero h1 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 600;
}
.search-hero p {
  margin: 0 0 0.85rem;
  opacity: 0.85;
  font-size: 0.9rem;
}
.search-box {
  display: flex;
  gap: 0.5rem;
}
.search-box input {
  flex: 1;
  border: 0;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  outline: none;
}
.search-box button {
  border: 0;
  border-radius: 10px;
  padding: 0 1.15rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.search-box button:hover { filter: brightness(1.05); }

.content {
  padding: 1rem 1.5rem 2rem;
}

.user-chip {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.88rem;
  color: var(--muted);
}
.role-pill {
  background: #e7eef5;
  color: var(--brand);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.1rem;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.stat-card .label { color: var(--muted); font-size: 0.82rem; }
.stat-card .value { font-size: 1.7rem; font-weight: 700; color: var(--brand); margin-top: 0.2rem; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}
.panel-h {
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.panel-h h2, .panel-h h3 {
  margin: 0;
  font-size: 1.02rem;
}
.panel-b { padding: 1.1rem; }

.grid-2 {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1rem;
}

.list-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}
.list-row:last-child { border-bottom: 0; }
.list-row .meta { color: var(--muted); font-size: 0.82rem; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  font-size: 0.9rem;
  cursor: pointer;
  background: var(--brand);
  color: #fff;
}
.btn:hover { color: #fff; filter: brightness(1.05); }
.btn-outline {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn-outline:hover { background: #eef3f8; color: var(--ink); }
.btn-accent { background: var(--accent); }
.btn-danger { background: var(--danger); }
.btn-sm { padding: 0.28rem 0.6rem; font-size: 0.8rem; }

.badge-soft {
  display: inline-block;
  background: #e8f1f6;
  color: var(--brand);
  border-radius: 6px;
  padding: 0.15rem 0.45rem;
  font-size: 0.75rem;
  font-weight: 600;
}
.tag {
  display: inline-block;
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
  font-size: 0.75rem;
  color: #fff;
  margin: 0.1rem;
}

.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
  text-align: left;
  padding: 0.65rem 0.55rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: 0.92rem;
}
.table th { color: var(--muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-size: 0.82rem; color: var(--muted); margin-bottom: 0.25rem; }
input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  font: inherit;
  background: #fff;
}
textarea { min-height: 110px; resize: vertical; }
.form-actions { display: flex; gap: 0.5rem; margin-top: 1rem; }

.md-editor {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}
.md-editor textarea {
  min-height: 420px;
  font-family: var(--mono);
  font-size: 0.88rem;
}
.md-preview {
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  background: #fafcfe;
  overflow: auto;
}

.markdown-body h1, .markdown-body h2, .markdown-body h3 { color: var(--brand); }
.markdown-body pre.code-block,
pre.code-block {
  background: #0f1720;
  color: #ffffff;
  border-radius: 8px;
  padding: 0.9rem 1rem;
  overflow: auto;
  font-family: var(--mono);
  font-size: 0.85rem;
}
.markdown-body pre.code-block code,
pre.code-block code {
  background: transparent;
  padding: 0;
  color: #ffffff;
}
.markdown-body code, code {
  font-family: var(--mono);
  background: #eef3f8;
  color: var(--ink);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.88em;
}

.answer-box {
  background: linear-gradient(180deg, #fff, #f7fbfe);
  border: 1px solid #c9dceb;
  border-left: 4px solid var(--brand-2);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}
.result-item {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}
.result-item:last-child { border-bottom: 0; }
.score {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}

/* Smart search results */
.did-you-mean {
  background: #fff8f1;
  border: 1px solid #f0d7bc;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin-bottom: 1.25rem;
}
.dym-title {
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 0.75rem;
  font-size: 1.05rem;
}
.dym-list { display: flex; flex-direction: column; gap: 0.35rem; }
.dym-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  color: inherit;
  background: #fff;
  border: 1px solid transparent;
}
.dym-item:hover {
  border-color: #e0c4a8;
  background: #fffdf9;
  color: inherit;
}
.dym-icon { font-size: 1.15rem; }
.dym-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.dym-meta { font-size: 0.8rem; color: var(--muted); }
.sim-badge {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand);
  background: #e8f1f6;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}

.results-heading {
  margin: 0.5rem 0 0.75rem;
  font-size: 1.05rem;
  color: var(--brand);
}
.kw-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin-bottom: 0.9rem;
}
.kw-row .meta { color: var(--muted); font-size: 0.85rem; margin-right: 0.25rem; }

.result-cards { display: flex; flex-direction: column; gap: 0.75rem; }
.result-card {
  display: block;
  color: inherit;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  box-shadow: 0 6px 18px rgba(15, 61, 94, 0.05);
  transition: border-color .15s ease, transform .15s ease;
}
.result-card:hover {
  border-color: #b7cfe0;
  transform: translateY(-1px);
  color: inherit;
}
.result-card-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}
.result-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}
.result-meta {
  margin-top: 0.25rem;
  font-size: 0.84rem;
  color: var(--muted);
}
.result-score { text-align: right; }
.stars { letter-spacing: 0.05em; font-size: 0.85rem; }
.score-num {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand-2);
  margin-top: 0.15rem;
}
.result-tags { margin-top: 0.55rem; }
.result-summary {
  margin-top: 0.55rem;
  color: #3d4d5c;
  font-size: 0.92rem;
  line-height: 1.45;
}
.result-preview {
  margin-top: 0.45rem;
  padding: 0.55rem 0.7rem;
  background: #f5f8fb;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

#search-suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px);
  background: #fff; border: 1px solid #d8e0ea; border-radius: 10px;
  box-shadow: 0 12px 30px rgba(15,61,94,.12); overflow: hidden; z-index: 30;
}
#search-suggest .suggest-item {
  display: flex; align-items: center; gap: 0.65rem;
  width: 100%; text-align: left; border: 0; background: #fff;
  padding: .7rem .9rem; cursor: pointer; color: #1a2332;
  text-decoration: none;
}
#search-suggest .suggest-item:hover,
#search-suggest .suggest-item.is-active { background: #eef5f9; }
#search-suggest .suggest-icon { font-size: 1.05rem; }
#search-suggest .suggest-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#search-suggest .suggest-text small { color: #5b6b7c; font-size: 0.78rem; }
#search-suggest .suggest-sim {
  font-size: 0.75rem; font-weight: 700; color: var(--brand);
  background: #e8f1f6; border-radius: 999px; padding: 0.15rem 0.45rem;
}
.search-wrap { position: relative; flex: 1; }

.method-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  color: #fff;
}
.badge-get { background: #1f7a4d; }
.badge-post { background: #1a6b8a; }
.badge-put { background: #b7791f; }
.badge-delete { background: #b42318; }

.alert {
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  margin-bottom: 1rem;
  font-size: 0.92rem;
}
.alert-success { background: #e8f6ee; color: #145c38; border: 1px solid #b7e0c7; }
.alert-error { background: #fdeceb; color: #8a1f16; border: 1px solid #f2c1bc; }

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    linear-gradient(135deg, rgba(15,61,94,0.92), rgba(26,107,138,0.85)),
    radial-gradient(800px 400px at 80% 20%, rgba(196,92,38,0.25), transparent 60%);
}
.auth-card {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 14px;
  padding: 1.6rem;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}
.auth-card h1 {
  margin: 0 0 0.25rem;
  color: var(--brand);
  font-size: 1.45rem;
}
.auth-card .sub { color: var(--muted); margin-bottom: 1.2rem; font-size: 0.9rem; }

.empty {
  color: var(--muted);
  padding: 1rem 0;
  font-size: 0.95rem;
}

.status-pill {
  display: inline-block;
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
}
.status-pending { background: #fff4e5; color: #9a6700; }
.status-approved { background: #e8f6ee; color: #145c38; }
.status-rejected { background: #fdeceb; color: #8a1f16; }

@media (max-width: 992px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .grid-2, .md-editor, .form-grid { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: -280px; z-index: 40; transition: left .2s ease; }
  .sidebar.open { left: 0; }
  .mobile-toggle { display: inline-flex !important; }
}
.mobile-toggle { display: none; }

/* Studio (SSMS / Postman) */
.studio-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1rem;
  min-height: 520px;
}
.studio-tree {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  align-self: start;
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}
.studio-tree-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0.75rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  font-size: 0.85rem;
}
.studio-empty { padding: 0.75rem; color: var(--muted); font-size: 0.85rem; }
.tree-db, .tree-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  color: var(--ink);
  font-size: 0.88rem;
  border-left: 3px solid transparent;
}
.tree-db:hover, .tree-item:hover { background: #f3f6f9; }
.tree-db.active, .tree-item.active {
  background: #e8f2f8;
  border-left-color: var(--brand-2);
  font-weight: 600;
}
.tree-children { padding-left: 0.5rem; }
.tree-group {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 0.5rem 0.75rem 0.25rem;
}
.tree-count { margin-left: auto; font-size: 0.72rem; color: var(--muted); }
.tree-icon { opacity: 0.7; }
.content-studio {
  padding: 0.75rem 1rem 1rem;
}

.ssms-page {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: calc(100vh - 80px);
  border: 1px solid #c8c8c8;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}

/* SSMS Object Explorer — sol ağaç / sağ detay */
.ssms-shell {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: stretch;
  width: 100%;
  min-height: 42vh;
  flex: 1 1 auto;
  background: #fff;
  border: 0;
  border-radius: 0;
  overflow: hidden;
}
.ssms-explorer {
  flex: 0 0 280px !important;
  width: 280px !important;
  max-width: 280px !important;
  background: #f0f0f0;
  border-right: 1px solid #c8c8c8;
  overflow-x: hidden;
  overflow-y: auto;
}
.ssms-workbench {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  background: #fff;
  overflow: auto;
}
.ssms-explorer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.6rem;
  background: #e8e8e8;
  border-bottom: 1px solid #c8c8c8;
  font-size: 0.78rem;
  font-weight: 700;
  color: #333;
}
.ssms-head-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1px solid #adadad;
  background: #fff;
  color: #333;
  border-radius: 2px;
  font-weight: 700;
}
.ssms-head-btn:hover { background: #e5f1fb; color: #000; }
.ssms-tree { padding: 0.25rem 0 0.75rem; font-family: "Segoe UI", Tahoma, sans-serif; font-size: 0.82rem; }
.ssms-node { margin: 0; }
.ssms-node > .ssms-node,
.ssms-node > .ssms-leaf,
.ssms-node > .ssms-empty-child { margin-left: 14px; }
.ssms-row {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.12rem 0.35rem;
  color: #1a1a1a;
  list-style: none;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
}
.ssms-node > summary {
  list-style: none;
}
.ssms-node > summary::-webkit-details-marker,
.ssms-row::-webkit-details-marker {
  display: none;
}
.ssms-node > summary::marker,
.ssms-row::marker {
  content: none;
  display: none;
}
.ssms-row:hover { background: #dcebfd; color: #1a1a1a; }
.ssms-row.is-selected,
.ssms-leaf.is-selected {
  background: #0078d4;
  color: #fff;
}
.ssms-row.is-selected a,
.ssms-leaf.is-selected { color: #fff; }
.ssms-row a { color: inherit; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ssms-caret {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  background: no-repeat center / 8px 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%23555' d='M2 1l4 3-4 3z'/%3E%3C/svg%3E");
}
details[open] > summary > .ssms-caret {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%23555' d='M1 2l3 4 3-4z'/%3E%3C/svg%3E");
}
.ssms-row.is-selected .ssms-caret,
details[open] > summary.is-selected > .ssms-caret {
  filter: brightness(10);
}
.ssms-ico {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  border-radius: 1px;
}
.ssms-ico-db {
  background: linear-gradient(#f4d03f, #d4ac0d);
  border: 1px solid #b7950b;
  border-radius: 7px 7px 3px 3px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}
.ssms-ico-folder {
  background: linear-gradient(#ffe08a, #e6b422);
  border: 1px solid #c9a227;
  clip-path: polygon(0 20%, 35% 20%, 45% 0, 100% 0, 100% 100%, 0 100%);
}
.ssms-ico-table {
  background:
    linear-gradient(#4a90d9, #2e6da4);
  border: 1px solid #1f4e79;
  box-shadow: inset 0 6px 0 -4px #fff, inset 0 -6px 0 -4px #fff;
}
.ssms-ico-view {
  background: linear-gradient(#7dcea0, #1e8449);
  border: 1px solid #145a32;
  border-radius: 2px;
}
.ssms-badge {
  margin-left: auto;
  font-size: 0.7rem;
  color: #666;
}
.ssms-row.is-selected .ssms-badge { color: #fff; }
.ssms-leaf-spacer { width: 10px; flex-shrink: 0; }
.ssms-empty-child {
  padding: 0.15rem 0.35rem 0.15rem 2.2rem;
  color: #888;
  font-size: 0.75rem;
  font-style: italic;
}
.ssms-tabs {
  display: flex;
  background: #e8e8e8;
  border-bottom: 1px solid #c8c8c8;
  padding: 0.25rem 0.25rem 0;
}
.ssms-tab {
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  background: #fff;
  border: 1px solid #c8c8c8;
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
}
.ssms-panel {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
}
.ssms-root-row { font-weight: 600; }
.ssms-query {
  border-top: 1px solid #c8c8c8;
  background: #ececec;
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
}
.ssms-query-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.65rem;
  background: #e8e8e8;
  border-bottom: 1px solid #c8c8c8;
  font-size: 0.82rem;
}
.ssms-query-title {
  font-weight: 700;
  color: #333;
  margin-right: 0.5rem;
}
.ssms-use-label {
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
}
.ssms-use-input {
  width: 220px;
  border: 1px solid #adadad;
  border-radius: 3px;
  padding: 0.28rem 0.45rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  background: #fff;
  color: #111;
}
.ssms-query-editor {
  min-height: 180px;
  border: 0;
  border-radius: 0;
  margin: 0;
}
.studio-new-db {
  padding: 0.75rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.sql-editor,
.code-input {
  width: 100%;
  font-family: var(--mono);
  font-size: 0.85rem;
  border: 1px solid #1f2a37;
  border-radius: 8px;
  padding: 0.75rem;
  background: #0f1720;
  color: #ffffff;
  caret-color: #ffffff;
  resize: vertical;
}
.sql-editor::placeholder,
.code-input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}
.sql-editor:focus,
.code-input:focus {
  outline: 2px solid rgba(255, 255, 255, 0.25);
  outline-offset: 1px;
}
.api-item { flex-wrap: wrap; }
.api-endpoint-line { font-size: 0.95rem; color: var(--brand); }

/* Screens */
.screen-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 0.75rem;
}
.screen-thumb {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.screen-thumb img {
  width: 100%;
  display: block;
  max-height: 200px;
  object-fit: cover;
}
.screen-thumb figcaption, .screen-thumb form {
  padding: 0.4rem 0.5rem;
  font-size: 0.8rem;
}
.screen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
}
.screen-card {
  display: block;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: inherit;
}
.screen-card:hover { border-color: var(--brand-2); box-shadow: var(--shadow); }
.screen-card h3 { margin: 0 0 0.35rem; font-size: 1rem; }
.screen-card code { font-size: 0.78rem; }
.screen-card p { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.85rem; }

@media (max-width: 720px) {
  .ssms-shell { flex-direction: column !important; }
  .ssms-explorer { width: 100% !important; max-width: none !important; flex-basis: auto !important; max-height: 240px; }
}
