/* --- Dataset Profiler Mock Styles --- */

.profile-shell {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-muted {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.profile-control-card {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 2fr;
    gap: 1.5rem;
    align-items: end;
}

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

.profile-source-line {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.profile-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.profile-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.25rem;
}

.profile-stat-label {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.profile-stat-value {
    font-size: 1.55rem;
    font-weight: 800;
}

.profile-stat-hint {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 0.4rem;
}

.profile-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: 1.5rem;
    align-items: start;
}

.profile-side-stack {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.profile-mini-select {
    width: auto;
    min-width: 150px;
    padding: 0.45rem 0.65rem;
    font-size: 0.85rem;
}

.profile-view-toggle {
    display: inline-flex;
    gap: 0.35rem;
    padding: 0.25rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: rgba(15, 23, 42, 0.45);
}

.profile-toggle-btn {
    width: auto;
    border: none;
    border-radius: 0.35rem;
    padding: 0.4rem 0.75rem;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 700;
}

.profile-toggle-btn:hover,
.profile-toggle-active {
    background: rgba(16, 185, 129, 0.14);
    color: var(--text-main);
}

.profile-column-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.profile-table-wrap {
    margin-top: 1.25rem;
}

.profile-table-title {
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.profile-table-scroll {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
}

.profile-column-table {
    min-width: 980px;
    margin-top: 0;
}

.profile-column-table th,
.profile-column-table td {
    vertical-align: top;
}

.profile-column-table th {
    padding: 0.75rem 1rem;
}

.profile-column-table td {
    color: var(--text-main);
}

.profile-column-table td:last-child {
    color: var(--text-muted);
    line-height: 1.45;
}

.profile-sort-btn {
    width: auto;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    padding: 0;
    text-align: left;
}

.profile-sort-btn:hover {
    color: var(--text-main);
}

.profile-distribution-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    max-width: 360px;
}

.profile-distribution-cell span {
    display: inline-flex;
    border: 1px solid var(--border);
    border-radius: 9999px;
    padding: 0.15rem 0.45rem;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    font-size: 0.74rem;
    font-weight: 700;
}

.profile-column-card {
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.38);
    border-radius: 0.75rem;
    padding: 1rem;
}

.profile-column-head {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.profile-column-head h3 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
    overflow-wrap: anywhere;
}

.profile-column-head p {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.profile-column-note {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.45;
    min-height: 2.5rem;
    margin-bottom: 0.9rem;
}

.profile-column-metrics,
.profile-mini-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    margin-bottom: 0.9rem;
}

.profile-mini-stats {
    grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
}

.profile-column-metrics div,
.profile-mini-stats div {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.55rem;
    min-width: 0;
}

.profile-column-metrics span,
.profile-mini-stats span {
    display: block;
    color: var(--text-muted);
    font-size: 0.7rem;
    margin-bottom: 0.2rem;
}

.profile-column-metrics strong,
.profile-mini-stats strong {
    display: block;
    font-size: 0.86rem;
    overflow-wrap: anywhere;
}

.profile-histogram {
    height: 120px;
    display: flex;
    align-items: end;
    gap: 0.45rem;
    padding-top: 0.75rem;
}

.profile-histogram span {
    flex: 1;
    min-width: 10px;
    border-radius: 0.35rem 0.35rem 0 0;
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.9), rgba(16, 185, 129, 0.35));
}

.profile-top-value {
    margin-bottom: 0.75rem;
}

.profile-top-value-label {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    color: var(--text-main);
    font-size: 0.82rem;
    margin-bottom: 0.35rem;
}

.profile-bar-track {
    width: 100%;
    height: 7px;
    border-radius: 9999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
}

.profile-bar-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--success);
}

.profile-preview-title {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
    overflow-wrap: anywhere;
}

.profile-flag-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.profile-flag {
    border: 1px solid var(--border);
    border-radius: 0.65rem;
    padding: 0.85rem;
    background: rgba(15, 23, 42, 0.38);
}

.profile-flag strong,
.profile-flag span {
    display: block;
}

.profile-flag strong {
    margin-bottom: 0.3rem;
}

.profile-flag span {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.45;
}

.profile-flag-warning {
    border-color: rgba(245, 158, 11, 0.35);
}

.profile-flag-info {
    border-color: rgba(99, 102, 241, 0.3);
}

.profile-json-preview {
    max-height: 420px;
    overflow: auto;
    margin: 0;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 0.65rem;
    background: rgba(15, 23, 42, 0.7);
    color: var(--text-main);
    font-size: 0.82rem;
    line-height: 1.5;
}

.profile-empty-state {
    color: var(--text-muted);
    border: 1px dashed var(--border);
    border-radius: 0.75rem;
    padding: 1rem;
}

@media (max-width: 980px) {
    .profile-control-card,
    .profile-layout,
    .profile-stat-grid {
        grid-template-columns: 1fr;
    }

    .profile-control-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .profile-section-heading {
        display: block;
    }

    .profile-mini-select {
        margin-bottom: 1rem;
    }

    .profile-mini-select {
        width: 100%;
    }
}
