/* ======================================== */
/* AI Data Generator View                   */
/* ======================================== */
.dg-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.dg-header {
    text-align: center;
    margin-bottom: 2rem;
}

.dg-header h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -.02em;
    background: linear-gradient(135deg, var(--accent), #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dg-header p {
    color: var(--text-dim);
    margin-top: .35rem;
}

/* Tabs */
.dg-tabs {
    display: flex;
    gap: 2px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 4px;
    margin-bottom: 1.5rem;
}

.dg-tab {
    flex: 1;
    padding: .65rem 1rem;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-dim);
    font-family: inherit;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s var(--ease), color .2s var(--ease);
}

.dg-tab:hover {
    color: var(--text);
    background: rgba(255,255,255,.04);
}

.dg-tab.active {
    background: rgba(34, 211, 238, .1);
    color: var(--accent);
}

.dg-tab.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    position: relative;
}

.dg-tab.disabled:hover {
    color: var(--text-dim);
    background: transparent;
}

.dg-tab.disabled:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: .75rem;
    white-space: nowrap;
    color: var(--text-dim);
}

/* Panels */
.dg-panel {
    display: none;
}

.dg-panel.active {
    display: block;
    animation: fadeIn .3s var(--ease);
}

/* Split pane */
.dg-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Textarea */
.dg-textarea {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    border: 1px solid var(--border-hi);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-family: 'Courier New', 'Fira Code', monospace;
    font-size: .85rem;
    line-height: 1.6;
    resize: vertical;
    transition: border-color .2s var(--ease);
}

.dg-textarea::placeholder {
    color: var(--text-mute);
}

.dg-textarea:focus {
    outline: none;
    border-color: var(--accent);
}

/* Label */
.dg-label {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: .5rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* Button row */
.dg-actions {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.dg-btn {
    padding: .6rem 1.25rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s var(--ease), transform .15s var(--ease);
}

.dg-btn:hover {
    transform: translateY(-1px);
}

.dg-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.dg-btn-primary {
    background: var(--accent);
    color: var(--bg);
}

.dg-btn-primary:hover:not(:disabled) {
    background: var(--accent-dim);
}

.dg-btn-secondary {
    background: rgba(255,255,255,.06);
    color: var(--text-dim);
    border: 1px solid var(--border);
}

.dg-btn-secondary:hover:not(:disabled) {
    background: rgba(255,255,255,.1);
    color: var(--text);
}

.dg-btn-success {
    background: rgba(74, 222, 128, .15);
    color: var(--green);
    border-color: var(--green);
}

/* Schema display */
.dg-schema-display {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 500px;
    overflow-y: auto;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
}

.dg-field-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: rgba(255,255,255,.02);
}

.dg-field-name {
    font-family: 'Courier New', monospace;
    font-size: .85rem;
    font-weight: 600;
    color: var(--text);
    min-width: 120px;
}

.dg-field-type {
    font-size: .75rem;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(255,255,255,.06);
    color: var(--text-dim);
}

.dg-field-semantic {
    font-size: .75rem;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(34, 211, 238, .1);
    color: var(--accent);
    font-weight: 600;
}

/* Empty state */
.dg-empty-state {
    color: var(--text-mute);
    font-size: .85rem;
    text-align: center;
    padding: 2rem 1rem;
}

/* Generation controls */
.dg-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.dg-input {
    padding: .55rem .75rem;
    border: 1px solid var(--border-hi);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
    font-size: .85rem;
    width: 100px;
}

.dg-input:focus {
    outline: none;
    border-color: var(--accent);
}

.dg-select {
    padding: .55rem .75rem;
    border: 1px solid var(--border-hi);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
    font-size: .85rem;
    cursor: pointer;
}

.dg-select:focus {
    outline: none;
    border-color: var(--accent);
}

/* Progress bar */
.dg-progress {
    width: 100%;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin: 1rem 0;
}

.dg-progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s var(--ease);
}

/* Stats row */
.dg-stats {
    display: flex;
    gap: 0.75rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.dg-stat {
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: .8rem;
    color: var(--text-dim);
}

.dg-stat strong {
    color: var(--accent);
    margin-right: 0.25rem;
}

/* Error message */
.dg-error {
    background: rgba(248, 113, 113, .08);
    color: var(--red);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--red);
    font-size: .85rem;
    margin-top: .75rem;
}

/* ======================== */
/* Responsive               */
/* ======================== */
@media (max-width: 768px) {
    .dg-split {
        grid-template-columns: 1fr;
    }

    .dg-tabs {
        flex-direction: column;
    }

    .dg-header h1 {
        font-size: 1.5rem;
    }

    .dg-controls {
        flex-direction: column;
        align-items: stretch;
    }
}
