.img-layout {
    width: 100%;
    height: 100%;
    display: flex;
    box-sizing: border-box;
}

.img-form {
    width: 380px;
    flex-shrink: 0;
    background: #0d1117;
    border: 1px solid rgba(48, 54, 61, 0.9);
    padding: 24px;
    overflow-y: auto;
    box-sizing: border-box;
}

.img-form label {
    display: block;
    color: #8b949e;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 8px;
    margin-top: 20px;
}

.img-form label:first-child {
    margin-top: 0;
}

.img-form textarea {
    width: 100%;
    background: #161b22;
    color: #fff;
    border: 1px solid #30363d;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.img-form textarea:focus {
    border-color: #06b6d4;
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.12);
}

.img-form textarea::placeholder {
    color: #64748b;
}

.img-form select.model-selector {
    width: 100%;
    max-width: none;
}

.img-form .btn-guion-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.img-form .btn-guion-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ===== Panel de preview de imagen ===== */
.img-preview-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow: hidden;
}

.img-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #4b5563;
    text-align: center;
}

.img-placeholder i {
    font-size: 48px;
}

.img-placeholder p {
    font-size: 14px;
    margin: 0;
}

.img-generada {
    max-width: 100%;
    max-height: 100%;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

/* ===== Spinner de carga ===== */
.img-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid #1c2128;
    border-top-color: #06b6d4;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== Estado "generando..." en el header ===== */
.estado-generando {
    display: inline-flex;
    gap: 3px;
    margin-right: 4px;
}

.estado-generando span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #06b6d4;
    display: inline-block;
    animation: typingBounce 1.2s infinite ease-in-out;
}

.estado-generando span:nth-child(2) { animation-delay: 0.15s; }
.estado-generando span:nth-child(3) { animation-delay: 0.3s; }

/* ===== Metadata debajo de la imagen ===== */
.img-meta {
    padding: 18px 24px;
    border-top: 1px solid rgba(48, 54, 61, 0.9);
    flex-shrink: 0;
}

.toma-body-title {
    color: #8b949e;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.img-prompt-text {
    color: #8b949e;
    font-size: 13px;
    line-height: 1.6;
    margin: 8px 0 0;
}

.img-prompt-text b {
    color: #c9d1d9;
}

@media (max-width: 900px) {
    .img-layout {
        flex-direction: column;
        height: auto;
    }
    .img-form {
        width: 100%;
    }
}
