* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #fff;
}

button, input, select { font: inherit; }

.cv-root [hidden] { display: none !important; }

.cv-root {
  --text: #0f172a;
  --muted: #54657a;
  --border: #e4eaf1;
  --band: #f5f8fb;
  --teal: #0ea5b7;
  --blue: #2f6df6;
  --emerald: #10b981;
  --grad: linear-gradient(100deg, #10b981 0%, #0ea5b7 50%, #2f6df6 100%);
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(900px 460px at 50% -160px, rgba(14, 165, 183, 0.10), transparent 60%),
    radial-gradient(720px 440px at 100% 0%, rgba(47, 109, 246, 0.06), transparent 55%),
    #fff;
}

.cv-shell { max-width: 1040px; margin: 0 auto; padding: 22px 24px 64px; }
.cv-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.cv-brand img { height: 34px; width: auto; display: block; }
.cv-octet { color: var(--muted); font-size: 12.5px; font-weight: 600; text-decoration: none; }
.cv-octet:hover { color: var(--text); text-decoration: underline; }

.cv-grid { display: grid; grid-template-columns: 250px minmax(230px, 360px); gap: 18px; align-items: start; }
.cv-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04); }
.cv-drop { height: 210px; display: flex; flex-direction: column; padding: 16px; overflow: auto; cursor: pointer; transition: border-color .15s, background .15s; }
.cv-drop:hover, .cv-drop:focus-visible, .cv-drop.dragging { border-color: var(--teal); background: rgba(14, 165, 183, 0.025); outline: none; }
.cv-drop-hint { margin: 0; color: var(--muted); font-size: 12.5px; }
.cv-drop-meta { color: var(--text); font-size: 12px; line-height: 1.55; }
.cv-drop-meta p { margin: 0; overflow-wrap: anywhere; }
.cv-drop-meta .cv-replace { margin-bottom: 8px; font-weight: 600; }
.cv-drop-meta b { color: var(--muted); font-weight: 600; }

.cv-controls { display: flex; flex-direction: column; gap: 14px; }
.cv-label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.cv-select, .cv-input { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--text); font-size: 14px; }
.cv-select:focus, .cv-input:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px rgba(14, 165, 183, .14); }
.cv-check { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 13px; }
.cv-check input, .cv-table input[type="checkbox"] { width: 14px; height: 14px; accent-color: var(--teal); }
.cv-hint { margin-top: 6px; color: var(--muted); font-size: 12px; }
.cv-btn { padding: 9px 16px; border: none; border-radius: 9px; color: #fff; background: var(--grad); box-shadow: 0 6px 18px rgba(14, 165, 183, .28); cursor: pointer; font-size: 13px; font-weight: 700; transition: filter .15s, box-shadow .15s; }
.cv-btn:hover { filter: brightness(1.05); }
.cv-btn:disabled { opacity: .5; box-shadow: none; cursor: default; filter: none; }
.cv-btn-lg { width: 100%; padding: 11px 16px; font-size: 14.5px; text-align: center; }
.cv-status-message { min-height: 16px; margin: -7px 0 0; color: var(--muted); font-size: 11px; }
.cv-status-message.error { color: #b42318; }

.cv-tablecard { max-height: 560px; display: flex; flex-direction: column; margin-top: 22px; padding: 18px; font-size: 12.5px; }
.cv-empty { flex: 1; display: flex; align-items: flex-start; color: var(--muted); font-size: 13px; }
.cv-table-wrap { flex: 1; min-height: 0; overflow: auto; padding-right: 8px; }
.cv-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 12px; }
.cv-col-index { width: 40px; }
.cv-col-pk { width: 44px; }
.cv-col-header { width: 260px; }
.cv-col-type { width: 170px; }
.cv-col-null { width: 90px; }
.cv-table thead { position: sticky; top: 0; z-index: 2; background: #fff; }
.cv-table th, .cv-table td { padding: 5px 8px 5px 0; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.cv-table th { color: var(--text); cursor: pointer; font-weight: 700; user-select: none; }
.cv-table td { overflow: hidden; }
.schema-control { width: 100%; max-width: 100%; padding: 2px 4px; border: 1px solid #d1d5db; border-radius: 4px; background: #fff; color: var(--text); font-size: 11px; }
.schema-name { border-color: transparent; cursor: text; }
.schema-name:hover, .schema-name:focus { border-color: #d1d5db; outline: none; }
.schema-control:disabled { color: #9ca3af; background: #f3f4f6; }
.sample { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-table-note { margin: 8px 0 0; color: #6b7280; font-size: 10px; }

.cv-foot { max-width: 900px; display: flex; justify-content: space-between; gap: 12px; margin: 34px auto 0; padding-top: 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.cv-foot nav a { margin-left: 16px; color: var(--muted); text-decoration: none; }
.cv-foot nav a:hover { color: var(--text); }

@media (max-width: 720px) {
  .cv-grid { grid-template-columns: 1fr; }
  .cv-drop { height: 190px; }
  .cv-tablecard { max-height: 500px; }
  .cv-table { min-width: 780px; }
  .cv-foot { flex-direction: column; }
  .cv-foot nav a { margin: 0 16px 0 0; }
}
