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

body {
    min-height: 100vh;
    background: #0b1020;
    color: #e5e7eb;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.dashboard-header {
    background: rgba(15, 23, 42, 0.9);
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    justify-content: center;
}

.databricks-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.hero-panel,
.builder-shell,
.builder-card,
.command-card {
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.82);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.hero-panel {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    align-items: flex-end;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.eyebrow,
.card-kicker {
    color: #93c5fd;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

h1 {
    margin-top: 0.4rem;
    font-size: clamp(2rem, 4vw, 3.2rem);
    color: #f8fafc;
}

h2 {
    color: #f8fafc;
    font-size: 1.15rem;
}

.description {
    max-width: 780px;
    margin-top: 0.85rem;
    color: #cbd5e1;
    line-height: 1.6;
}

.root-note {
    min-width: 240px;
    border: 1px solid rgba(96, 165, 250, 0.35);
    background: rgba(30, 64, 175, 0.22);
    border-radius: 12px;
    padding: 1rem;
    color: #bfdbfe;
}

.root-note span {
    display: block;
    color: #93a4b8;
    font-size: 0.8rem;
    margin-bottom: 0.35rem;
}

.root-note strong {
    color: #eff6ff;
}

.builder-shell {
    border-radius: 16px;
    padding: 1rem;
}

.tab-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding: 0.6rem;
    background: rgba(2, 6, 23, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 12px;
    margin-bottom: 1rem;
}

.tab-button {
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(30, 41, 59, 0.95);
    color: #cbd5e1;
    min-height: 42px;
    padding: 0 1rem;
    border-radius: 9px;
    font-weight: 700;
    cursor: pointer;
}

.tab-button.active {
    background: #2563eb;
    border-color: #60a5fa;
    color: white;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.3);
}

.section-description {
    margin: 0 0 1rem;
    border: 1px solid rgba(96, 165, 250, 0.28);
    border-radius: 12px;
    background: rgba(30, 64, 175, 0.18);
    color: #dbeafe;
    line-height: 1.55;
    padding: 0.9rem 1rem;
}

.builder-grid {
    display: grid;
    grid-template-columns: minmax(340px, 0.9fr) minmax(420px, 1.1fr);
    gap: 1rem;
}

.builder-card,
.command-card {
    border-radius: 14px;
    padding: 1.4rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.field-label {
    display: block;
    margin: 0 0 0.45rem;
    color: #dbeafe;
    font-weight: 700;
    font-size: 0.88rem;
}

.field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.45rem;
}

.field-label-row .field-label {
    margin: 0;
}

.taxonomy-button,
.taxonomy-close {
    border: 1px solid rgba(96, 165, 250, 0.6);
    background: rgba(37, 99, 235, 0.18);
    color: #bfdbfe;
    border-radius: 8px;
    min-height: 32px;
    padding: 0 0.75rem;
    font-weight: 800;
    cursor: pointer;
}

.taxonomy-button:hover,
.taxonomy-close:hover {
    background: rgba(37, 99, 235, 0.35);
}

.command-control,
.command-textarea {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 8px;
    background: #f8fafc;
    color: #111827;
    min-height: 46px;
    padding: 0.65rem 0.75rem;
    font: inherit;
    outline: none;
}

.command-textarea {
    min-height: 110px;
    resize: vertical;
    line-height: 1.5;
}

.command-control:focus,
.command-textarea:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.28);
}

.command-description {
    margin: 1rem 0;
    color: #cbd5e1;
    line-height: 1.5;
}

.fields-grid {
    display: grid;
    gap: 1rem;
}

.copy-button {
    border: 0;
    background: #2563eb;
    color: white;
    border-radius: 8px;
    min-height: 40px;
    padding: 0 1rem;
    font-weight: 800;
    cursor: pointer;
}

.copy-button:hover {
    background: #1d4ed8;
}

.command-output {
    min-height: 360px;
    max-height: 620px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    background: #020617;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 10px;
    padding: 1.1rem;
    color: #dbeafe;
    font-size: 0.9rem;
    line-height: 1.65;
}

.command-note {
    margin-top: 0.9rem;
    color: #94a3b8;
    font-size: 0.88rem;
}

.taxonomy-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(2, 6, 23, 0.76);
    z-index: 100;
}

.taxonomy-modal.open {
    display: flex;
}

.taxonomy-dialog {
    width: min(980px, 100%);
    max-height: 86vh;
    overflow: auto;
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-radius: 16px;
    background: #0f172a;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
}

.taxonomy-header {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.2rem;
    background: #111827;
    border-bottom: 1px solid rgba(148, 163, 184, 0.24);
}

.taxonomy-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    padding: 1.2rem;
}

.taxonomy-section {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.8);
    padding: 1rem;
}

.taxonomy-section h3 {
    color: #f8fafc;
    font-size: 0.98rem;
    margin-bottom: 0.75rem;
}

.taxonomy-row {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 0.75rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.taxonomy-row:last-child {
    border-bottom: 0;
}

.taxonomy-id {
    color: #93c5fd;
    font-weight: 800;
}

.taxonomy-description {
    color: #cbd5e1;
    font-size: 0.86rem;
}

@media (max-width: 980px) {
    .hero-panel,
    .builder-grid {
        grid-template-columns: 1fr;
    }

    .hero-panel {
        display: block;
    }

    .root-note {
        margin-top: 1rem;
    }

    .taxonomy-grid {
        grid-template-columns: 1fr;
    }
}
