.rsag-soft-wrapper {
    /* Biến CSS độc lập */
    --neo-border: 3px solid #111111;
    --neo-shadow: 5px 5px 0px #111111;
    
    --bg-main: #f0f4f8;
    --clr-yellow: #fde74c;
    --clr-cyan: #00f5d4;
    --clr-pink: #f15bb5;
    --clr-dark: #212529;
    --clr-white: #ffffff;
    --clr-green: #06d6a0;
    --clr-text: #111111;

    max-width: 950px; 
    margin: 0 auto;
    font-family: system-ui, -apple-system, sans-serif;
    color: var(--clr-text);
    background: var(--bg-main);
    padding: 20px;
    border: var(--neo-border);
    border-radius: 16px;
    box-shadow: 6px 6px 0px #111111;
}

.rsag-soft-wrapper * { box-sizing: border-box; }

.rsag-soft-header {
    background: #111; padding: 20px; color: #fff;
    border: var(--neo-border); border-radius: 12px;
    text-align: center; margin-bottom: 20px; box-shadow: var(--neo-shadow);
}
.rsag-soft-header h2 { margin: 0 0 10px 0; font-size: 1.8rem; font-weight: 900; color: var(--clr-cyan); text-transform: uppercase;}
.rsag-soft-header p { margin: 0; font-weight: 600; font-size: 0.95rem; color: #ccc;}

/* CẢNH BÁO BẢO MẬT */
.rsag-alert-box {
    display: flex; align-items: center; gap: 15px; background: #e0fbfc; border: 2px dashed #111; 
    border-radius: 10px; padding: 15px; margin-bottom: 20px; box-shadow: 3px 3px 0px #111;
}
.rsag-alert-icon { font-size: 2rem; }
.rsag-alert-content { font-size: 0.9rem; font-weight: 600; color: #111; line-height: 1.5; }
.rsag-alert-content strong { color: var(--clr-pink); font-size: 1rem; display: block; margin-bottom: 3px;}

/* BỐ CỤC 2 CỘT */
.rsag-main-layout { display: flex; flex-direction: column; gap: 20px; }
.rsag-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
@media (min-width: 768px) { .rsag-main-layout { flex-direction: row; align-items: stretch; } }

/* CARDS */
.rsag-card {
    padding: 20px; border: var(--neo-border); 
    border-radius: 12px; box-shadow: var(--neo-shadow); display: flex; flex-direction: column;
}
.rsag-bg-yellow { background: var(--clr-yellow); }
.rsag-bg-cyan { background: var(--clr-cyan); }
.rsag-bg-dark { background: var(--clr-dark); }
.rsag-card-title { margin: 0; font-size: 1.2rem; font-weight: 900; }

.rsag-flex-between { display: flex; justify-content: space-between; align-items: center; }

/* BADGES */
.rsag-badge { background: #fff; padding: 4px 10px; border: 2px solid #111; border-radius: 6px; font-weight: 900; font-size: 0.8rem; box-shadow: 2px 2px 0px #111; text-transform: uppercase; color: #111;}
.rsag-badge-danger { background: var(--clr-pink); color: #fff; }

/* INPUTS & SELECT */
.rsag-group { margin-bottom: 20px; display: flex; flex-direction: column; gap: 8px; }
.rsag-label { font-weight: 900; font-size: 0.95rem; }
.rsag-hint { font-size: 0.85rem; color: #555; font-weight: 700; font-style: italic; line-height: 1.4; }

.rsag-select {
    width: 100%; padding: 12px; border: 2px solid #111; border-radius: 8px; background: #fff;
    font-weight: 900; font-size: 1rem; cursor: pointer; outline: none; box-shadow: 3px 3px 0px #111;
}
.rsag-select:active { transform: translate(2px, 2px); box-shadow: 0px 0px 0px #111; }

/* BUTTON MAIN */
.rsag-btn-main {
    width: 100%; padding: 15px; background: #111; color: var(--clr-yellow);
    border: 2px solid #111; border-radius: 8px; font-size: 1.1rem; font-weight: 900;
    cursor: pointer; box-shadow: 4px 4px 0px #111; transition: 0.1s; text-transform: uppercase;
}
.rsag-btn-main:active:not(:disabled) { transform: translate(4px, 4px); box-shadow: 0px 0px 0px #111; }
.rsag-btn-main:disabled { background: #555; color: #ccc; cursor: not-allowed; box-shadow: none; transform: none;}

/* OUTPUT TEXTAREA */
.rsag-textarea {
    width: 100%; height: 180px; padding: 15px; font-family: monospace; font-size: 0.85rem;
    font-weight: bold; color: #111; background: #fdfdfd; border: 2px solid #111; 
    border-radius: 8px; box-shadow: inset 3px 3px 0px rgba(0,0,0,0.05); resize: vertical; outline: none; white-space: pre; overflow-x: auto;
}
.rsag-textarea-dark { background: #111; color: var(--clr-pink); border-color: #555; }

/* ACTION ROW (Copy / Download) */
.rsag-action-row { display: flex; gap: 10px; margin-top: 15px; }
.rsag-btn-small {
    flex: 1; padding: 10px; background: #fff; border: 2px solid #111; border-radius: 6px;
    font-weight: 900; font-size: 0.95rem; cursor: pointer; box-shadow: 2px 2px 0px #111; transition: 0.1s; display: flex; align-items: center; justify-content: center;
}
.rsag-btn-small:active { transform: translate(2px, 2px); box-shadow: 0px 0px 0px #111; }

.rsag-btn-dark { background: #333; color: #fff; border-color: #555; box-shadow: 2px 2px 0px #000; }
.rsag-btn-dark:active { box-shadow: 0px 0px 0px #000; border-color: var(--clr-pink); }

/* STATUS & LOADING */
.rsag-status-box { margin-top: 15px; background: #fff; border: 2px solid #111; border-radius: 8px; padding: 12px; display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 800;}
.rsag-spinner {
    width: 20px; height: 20px; border: 3px solid rgba(0,0,0,0.1); border-top-color: #111;
    border-radius: 50%; animation: rsagSpin 1s linear infinite;
}
@keyframes rsagSpin { to { transform: rotate(360deg); } }

/* INFO BOX */
.rsag-info-box { margin-top: 20px; background: rgba(255,255,255,0.6); padding: 15px; border: 2px dashed #111; border-radius: 8px; }
.rsag-info-box h4 { margin: 0 0 5px 0; font-weight: 900; color: #111; font-size: 1rem;}
.rsag-info-box ul { margin: 0; padding-left: 20px; font-size: 0.9rem; font-weight: 600; line-height: 1.6; }