/* ====================================
   ANALYSIS RESULTS DISPLAY (admin config)
   ==================================== */

:root {
    --rd-primary: #005068;
    --rd-primary-dark: #003d5c;
    --rd-success: #28a745;
    --rd-danger: #dc3545;
}

.rd-page {
    padding: 30px;
    font-family: 'Saira Condensed', sans-serif;
}

.rd-page h1 {
    color: var(--rd-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.rd-page h1 .rd-save-btn {
    margin-left: auto;
}

.rd-intro {
    color: #555;
    max-width: 90%;
    line-height: 1.55;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.rd-intro code {
    background: #eef2f4;
    padding: 1px 5px;
    border-radius: 3px;
    color: var(--rd-primary-dark);
}

.rd-alert:not(:empty) {
    margin-bottom: 15px;
}

/* ---------- Buttons ---------- */
.rd-btn {
    font-family: inherit;
    font-size: 0.9rem;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background .2s ease, opacity .2s ease;
}

.rd-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.rd-btn-primary {
    background: var(--rd-primary);
    color: #fff;
}

.rd-btn-primary:hover:not(:disabled) {
    background: var(--rd-primary-dark);
}

.rd-btn-add {
    background: var(--rd-success);
    color: #fff;
    padding: 6px 12px;
    font-size: .85rem;
}

.rd-btn-add:hover {
    background: #218838;
}

/* ---------- Alerts ---------- */
.rd-alert .alert,
.alert {
    padding: 12px 15px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.rd-alert .alert-success,
.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.rd-alert .alert-error,
.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ---------- Section ---------- */
.rd-section {
    margin-bottom: 35px;
}

.rd-section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.rd-section-header h2 {
    color: var(--rd-primary);
    font-size: 1.2rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rd-section-desc {
    color: #666;
    font-size: .9rem;
    flex: 1;
    min-width: 200px;
}

/* ---------- Table ---------- */
.rd-table-wrap {
    overflow: auto;
    max-height: 430px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .06);
    background: #fff;
}

.rd-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.rd-table thead {
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--rd-primary);
    color: #fff;
}

.rd-table th {
    padding: 10px 12px;
    text-align: left;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .4px;
    font-weight: 600;
}

.rd-table td {
    padding: 6px 10px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.rd-table tbody tr:hover {
    background: #f5f9fa;
}

.rd-input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #cfd6d9;
    border-radius: 4px;
    font-family: inherit;
    font-size: .9rem;
    box-sizing: border-box;
}

.rd-input:focus {
    outline: none;
    border-color: var(--rd-primary);
    box-shadow: 0 0 0 3px rgba(0, 80, 104, .1);
}

.rd-order {
    max-width: 90px;
    text-align: center;
}

/* ---------- Select sheets cibles (items) ---------- */
.rd-sheets-select {
    width: 100%;
    height: 34px;
    padding: 6px 8px;
    border: 1px solid #cfd6d9;
    border-radius: 4px;
    font-family: inherit;
    font-size: .9rem;
    box-sizing: border-box;
    background: #fff;
}

.rd-sheets-select:focus {
    outline: none;
    border-color: var(--rd-primary);
    box-shadow: 0 0 0 3px rgba(0, 80, 104, .1);
}

.rd-sheets-select option {
    padding: 4px 6px;
}

.rd-visible {
    text-align: center;
}

.rd-visible input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--rd-primary);
}

.rd-move,
.rd-del {
    white-space: nowrap;
    text-align: center;
}

.rd-move button,
.rd-del button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--rd-primary);
    padding: 4px 6px;
    font-size: .95rem;
    border-radius: 4px;
}

.rd-move button:hover,
.rd-del button:hover {
    background: #eef2f4;
}

.rd-del button {
    color: var(--rd-danger);
}

.rd-empty {
    text-align: center;
    color: #999;
    padding: 20px;
    font-style: italic;
}

/* ---------- Script level ---------- */
.rd-script-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 12px 15px;
    background: #eef4f6;
    border: 1px solid #d5e2e7;
    border-radius: 6px;
}

.rd-script-bar label {
    color: var(--rd-primary);
    font-weight: 600;
}

.rd-script-sel {
    width: auto;
    min-width: 280px;
}

.rd-script-hint {
    color: #666;
    font-size: .85rem;
    font-style: italic;
}

.rd-btn-del {
    background: #fff;
    color: var(--rd-danger);
    border: 1px solid var(--rd-danger);
    padding: 6px 12px;
    font-size: .85rem;
}

.rd-btn-del:hover {
    background: #fdecea;
}