.automation-panel {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 24px;
    border: 1px solid rgba(165, 255, 205, 0.12);
    background:
        radial-gradient(circle at top right, rgba(52, 211, 153, 0.12), transparent 28%),
        linear-gradient(180deg, rgba(8, 21, 16, 0.96), rgba(6, 14, 11, 0.94));
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
}

.automation-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.9rem;
}

.automation-title {
    margin: 0;
    font-size: 1.2rem;
}

.automation-copy {
    margin: 0.25rem 0 0;
    color: rgba(242, 255, 248, 0.72);
    max-width: 780px;
    line-height: 1.6;
}

.automation-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.2);
    color: #9ef0be;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

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

.automation-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.8rem 0.85rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.automation-field label,
.automation-switch-label {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 800;
    color: rgba(242, 255, 248, 0.74);
}

.automation-field input,
.automation-field select {
    appearance: none;
    border: 1px solid rgba(165, 255, 205, 0.14);
    border-radius: 12px;
    background: rgba(4, 12, 9, 0.68);
    color: #f2fff8;
    padding: 0.75rem 0.8rem;
    font: inherit;
    outline: none;
}

.automation-field input[readonly] {
    opacity: 0.85;
    cursor: not-allowed;
}

.automation-field input:focus,
.automation-field select:focus {
    border-color: rgba(158, 240, 190, 0.55);
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.14);
}

.automation-switches {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.automation-switch {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.85rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.automation-switch input {
    width: 18px;
    height: 18px;
    accent-color: #34d399;
}

.automation-summary {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
    margin-top: 0.9rem;
}

.automation-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(165, 255, 205, 0.1);
    color: rgba(242, 255, 248, 0.9);
    font-size: 0.82rem;
    font-weight: 700;
}

.automation-status {
    margin-top: 0.9rem;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    border: 1px solid rgba(165, 255, 205, 0.12);
    background: rgba(255, 255, 255, 0.03);
    color: #f2fff8;
    line-height: 1.6;
}

.automation-status strong {
    color: #9ef0be;
}

.automation-status.warn {
    border-color: rgba(251, 191, 36, 0.2);
    background: rgba(55, 41, 8, 0.22);
}

.automation-status.buy {
    border-color: rgba(52, 211, 153, 0.24);
    background: rgba(7, 34, 23, 0.42);
}

.automation-status.hold {
    border-color: rgba(251, 113, 133, 0.18);
    background: rgba(44, 14, 20, 0.42);
}

@media (max-width: 900px) {
    .automation-grid,
    .automation-switches {
        grid-template-columns: 1fr;
    }

    .automation-header {
        flex-direction: column;
    }
}
