/* =========================================================
   TMB — Tes Minat & Bakat  ·  Light Premium Stylesheet
   UNTS - Universitas Telogorejo Semarang
   ========================================================= */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ---------- Design Tokens (Light Theme) ---------- */
:root {
    --tmb-bg: #f0f4f8;
    --tmb-bg-card: #ffffff;
    --tmb-bg-card-hover: #ffffff;
    --tmb-bg-subcard: #f8fafc;
    --tmb-surface: #ffffff;
    --tmb-text: #1e293b;
    --tmb-text-muted: #64748b;
    --tmb-text-dim: #94a3b8;
    --tmb-line: #e2e8f0;
    --tmb-brand: #2563eb;
    --tmb-brand-light: #3b82f6;
    --tmb-brand-dark: #1d4ed8;
    --tmb-brand-glow: rgba(37,99,235,0.15);
    --tmb-accent: #059669;
    --tmb-accent-light: #10b981;
    --tmb-accent-glow: rgba(5,150,105,0.12);
    --tmb-danger: #dc2626;
    --tmb-danger-bg: #fef2f2;
    --tmb-success: #16a34a;
    --tmb-warning: #d97706;
    --tmb-orange: #f97316;
    --tmb-gradient-1: linear-gradient(135deg, #2563eb, #3b82f6);
    --tmb-gradient-2: linear-gradient(135deg, #059669, #34d399);
    --tmb-gradient-3: linear-gradient(135deg, #2563eb, #059669);
    --tmb-gradient-hero: linear-gradient(135deg, #e8f4fd, #b3d9f7, #d4ecfc);
    --tmb-radius: 16px;
    --tmb-radius-sm: 10px;
    --tmb-radius-xl: 20px;
    --tmb-shadow: 0 4px 24px rgba(0,0,0,0.06);
    --tmb-shadow-sm: 0 2px 12px rgba(0,0,0,0.04);
    --tmb-shadow-lg: 0 8px 40px rgba(0,0,0,0.08);
    --tmb-transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    min-width: 0;
}



html { overflow-x: hidden; }

body.tmb-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--tmb-bg);
    color: var(--tmb-text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Layout ---------- */
.tmb-wrapper {
    position: relative;
    z-index: 1;
    overflow-x: hidden;
    max-width: 100vw;
}

/* Global overflow guards */
img, canvas, video, iframe { max-width: 100%; height: auto; }
table { max-width: 100%; }
.tmb-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ---------- Hero Header ---------- */
.tmb-hero {
    background: var(--tmb-gradient-hero);
    padding: 40px 24px 36px;
    text-align: center;
    position: relative;
    overflow: hidden;
    max-width: 100%;
}

.tmb-hero::before {
    content: '';
    position: absolute;
    top: -60%; left: -30%;
    width: 160%; height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(59,130,246,0.08) 0%, transparent 40%),
                radial-gradient(circle at 80% 50%, rgba(59,130,246,0.06) 0%, transparent 40%);
    animation: tmb-pulse 10s ease-in-out infinite alternate;
}

@keyframes tmb-pulse {
    0% { transform: scale(1) rotate(0deg); }
    100% { transform: scale(1.05) rotate(2deg); }
}

.tmb-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    max-width: 640px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.tmb-hero-logo {
    width: 90px;
    height: auto;
    margin-bottom: 6px;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.08));
    transition: transform 0.3s ease;
    background: rgba(255,255,255,0.75);
    padding: 23px;
    border-radius: 16px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.6);
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.tmb-hero-logo:hover {
    transform: scale(1.08);
}

.tmb-hero h1 {
    font-size: 2.2rem;
    font-weight: 900;
    color: #1e3a5f;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
    text-shadow: 0 1px 2px rgba(255,255,255,0.5);
}

.tmb-hero p {
    color: #475569;
    font-size: 1rem;
    max-width: 560px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    word-break: break-word;
}

.tmb-hero .tmb-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(37,99,235,0.1);
    color: #2563eb;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid rgba(37,99,235,0.15);
    backdrop-filter: blur(4px);
}

/* ---------- Container ---------- */
.tmb-container {
    width: min(1140px, calc(100% - 40px));
    margin: 0 auto;
    padding: 32px 0;
    max-width: 100%;
    box-sizing: border-box;
}

/* ---------- Cards ---------- */
.tmb-card {
    background: var(--tmb-bg-card);
    border: 1px solid var(--tmb-line);
    border-radius: var(--tmb-radius-xl);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--tmb-shadow);
    transition: var(--tmb-transition);
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
}

.tmb-card:hover {
    box-shadow: var(--tmb-shadow-lg);
}

.tmb-card h2 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--tmb-text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.tmb-card h2 .tmb-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    color: #fff;
}

.tmb-card h2 .tmb-icon.brand { background: var(--tmb-gradient-1); }
.tmb-card h2 .tmb-icon.accent { background: var(--tmb-gradient-2); }

.tmb-subcard {
    background: var(--tmb-bg-subcard);
    border: 1px solid var(--tmb-line);
    border-radius: var(--tmb-radius);
    padding: 24px;
    margin-bottom: 16px;
}

.tmb-subcard h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--tmb-brand);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--tmb-line);
}

/* ---------- Grid ---------- */
.tmb-grid { display: grid; gap: 24px; }
.tmb-grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* ---------- Form Elements ---------- */
.tmb-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tmb-input-group label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--tmb-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tmb-input {
    padding: 13px 16px;
    background: #fff;
    border: 1.5px solid var(--tmb-line);
    border-radius: var(--tmb-radius-sm);
    color: var(--tmb-text);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--tmb-transition);
    outline: none;
}

.tmb-input:focus {
    border-color: var(--tmb-brand);
    box-shadow: 0 0 0 3px var(--tmb-brand-glow);
}

.tmb-input::placeholder { color: var(--tmb-text-dim); }

/* ---------- Question Row ---------- */
.tmb-question-row {
    padding: 14px 0;
    border-bottom: 1px solid #f1f5f9;
}

.tmb-question-row:last-child { border-bottom: none; }

.tmb-question-text {
    font-size: 0.92rem;
    color: var(--tmb-text);
    margin-bottom: 12px;
}

.tmb-question-text strong {
    color: var(--tmb-brand);
    font-weight: 700;
}

/* ---------- Custom Radio ---------- */
.tmb-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tmb-radio-label {
    position: relative;
    cursor: pointer;
    user-select: none;
}

.tmb-radio-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.tmb-radio-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1.5px solid var(--tmb-line);
    color: var(--tmb-text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--tmb-transition);
}

.tmb-radio-label input[type="radio"]:checked + .tmb-radio-btn {
    background: var(--tmb-gradient-1);
    border-color: var(--tmb-brand);
    color: #fff;
    box-shadow: 0 4px 12px var(--tmb-brand-glow);
    transform: scale(1.05);
}

/* radio hover removed per user request */

/* ---------- Ya / Tidak Radio Buttons ---------- */
.tmb-yn-options {
    gap: 10px;
}

.tmb-yn-label {
    flex-shrink: 0;
}

.tmb-yn-ya,
.tmb-yn-tidak {
    width: auto;
    height: auto;
    padding: 8px 20px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 700;
    gap: 6px;
    min-width: 90px;
    justify-content: center;
    white-space: nowrap;
    flex-shrink: 0;
}

.tmb-yn-ya {
    background: #f0fdf4;
    border-color: #86efac;
    color: #16a34a;
}

.tmb-yn-tidak {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #dc2626;
}

/* Checked state for Ya */
.tmb-yn-label input[type="radio"]:checked + .tmb-yn-ya {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    border-color: #16a34a;
    color: #fff;
    box-shadow: 0 4px 14px rgba(22,163,74,0.3);
    transform: scale(1.04);
}

/* Checked state for Tidak */
.tmb-yn-label input[type="radio"]:checked + .tmb-yn-tidak {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    border-color: #dc2626;
    color: #fff;
    box-shadow: 0 4px 14px rgba(220,38,38,0.3);
    transform: scale(1.04);
}

/* ---------- Scale Box ---------- */
.tmb-scale-box {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.tmb-scale-item {
    background: #eff6ff;
    color: var(--tmb-brand);
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid #dbeafe;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tmb-scale-ya {
    background: #f0fdf4;
    color: #16a34a;
    border-color: #86efac;
}

.tmb-scale-tidak {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fca5a5;
}

/* ---------- Activity Checkbox ---------- */
.tmb-activity-grid {
    display: grid;
    gap: 10px;
}

.tmb-activity-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: #fff;
    border: 1.5px solid var(--tmb-line);
    border-radius: var(--tmb-radius-sm);
    cursor: pointer;
    transition: var(--tmb-transition);
    user-select: none;
}

.tmb-activity-item:hover {
    border-color: var(--tmb-accent-light);
    background: #f0fdf4;
}

.tmb-activity-item.checked {
    border-color: var(--tmb-accent);
    background: #ecfdf5;
    box-shadow: 0 0 0 2px var(--tmb-accent-glow);
}

.tmb-activity-item input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border: 2px solid var(--tmb-text-dim);
    border-radius: 6px;
    flex-shrink: 0;
    transition: var(--tmb-transition);
    position: relative;
    cursor: pointer;
}

.tmb-activity-item input[type="checkbox"]:checked {
    background: var(--tmb-gradient-2);
    border-color: var(--tmb-accent);
}

.tmb-activity-item input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 14px;
    font-weight: 900;
}

.tmb-activity-item span {
    font-size: 0.92rem;
    color: var(--tmb-text);
    font-weight: 500;
}

/* ---------- Buttons ---------- */
.tmb-action-bar {
    display: flex;
    justify-content: flex-end;
    margin-top: 24px;
    gap: 12px;
}

.tmb-action-bar.left { justify-content: flex-start; }

.tmb-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: 12px;
    border: none;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    transition: var(--tmb-transition);
}

.tmb-btn-primary {
    background: var(--tmb-gradient-1);
    color: #fff;
    box-shadow: 0 4px 16px var(--tmb-brand-glow);
}

.tmb-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--tmb-brand-glow);
}

.tmb-btn-secondary {
    background: #f1f5f9;
    color: var(--tmb-text);
    border: 1px solid var(--tmb-line);
}

.tmb-btn-secondary:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

.tmb-btn-accent {
    background: var(--tmb-gradient-2);
    color: #fff;
    font-weight: 800;
}

.tmb-btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--tmb-accent-glow);
}

/* ---------- Flash Messages ---------- */
.tmb-flash-stack {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
}

.tmb-flash-error {
    background: var(--tmb-danger-bg);
    color: var(--tmb-danger);
    border: 1px solid #fecaca;
    padding: 14px 18px;
    border-radius: var(--tmb-radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tmb-flash-error::before { content: '⚠'; }

/* ---------- Summary / Result Cards ---------- */
.tmb-summary-card {
    background: linear-gradient(135deg, #1e3a5f, #2563eb, #1e40af);
    border-radius: var(--tmb-radius-xl);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--tmb-shadow-lg);
}

.tmb-summary-card h2 {
    color: #fff;
    margin-bottom: 12px;
}

.tmb-summary-card p {
    color: rgba(255,255,255,0.85);
    font-size: 0.95rem;
    line-height: 1.7;
}

.tmb-summary-card .tmb-student-info {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.6);
    margin-bottom: 16px;
}

.tmb-summary-card .tmb-student-name {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
}

/* ---------- Stat Card ---------- */
.tmb-stat-card {
    background: #fff;
    border: 1px solid var(--tmb-line);
    border-radius: var(--tmb-radius);
    padding: 24px;
    text-align: center;
    transition: var(--tmb-transition);
    box-shadow: var(--tmb-shadow-sm);
}

.tmb-stat-card:hover {
    border-color: var(--tmb-brand-light);
    transform: translateY(-4px);
    box-shadow: var(--tmb-shadow-lg);
}

.tmb-stat-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--tmb-text-dim);
    margin-bottom: 8px;
}

.tmb-stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--tmb-brand);
    margin-bottom: 4px;
}

.tmb-stat-score {
    font-size: 2rem;
    font-weight: 900;
    color: var(--tmb-brand-dark);
}

.tmb-stat-category {
    font-size: 0.8rem;
    color: var(--tmb-accent);
    font-weight: 600;
    margin-top: 4px;
}

/* ---------- Tables ---------- */
.tmb-table-wrap { overflow-x: auto; }

.tmb-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.tmb-table th,
.tmb-table td {
    padding: 13px 16px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--tmb-line);
}

.tmb-table th {
    background: #f8fafc;
    color: var(--tmb-brand);
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.tmb-table tbody tr {
    transition: var(--tmb-transition);
}

.tmb-table tbody tr:hover {
    background: #f8fafc;
}

.tmb-table td { color: var(--tmb-text); }

/* ---------- Tags ---------- */
.tmb-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0;
}

.tmb-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: #eff6ff;
    color: var(--tmb-brand);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid #dbeafe;
    transition: var(--tmb-transition);
}

.tmb-tag:hover {
    background: #dbeafe;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--tmb-brand-glow);
}

/* ---------- Note ---------- */
.tmb-note {
    color: var(--tmb-text-muted);
    font-size: 0.88rem;
    font-style: italic;
    margin-top: 12px;
    padding: 16px;
    background: #f8fafc;
    border-radius: var(--tmb-radius-sm);
    border-left: 3px solid var(--tmb-brand);
}

/* ---------- Chart Container ---------- */
.tmb-chart-container {
    position: relative;
    width: 100%;
    max-height: 400px;
    padding: 16px 0;
}

/* ---------- Progress Bar (top) ---------- */
.tmb-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--tmb-gradient-3);
    z-index: 9999;
    transition: width 0.3s ease;
    box-shadow: 0 0 8px var(--tmb-brand-glow);
}

/* ---------- Activity List in Result ---------- */
.tmb-activity-result-list {
    list-style: none;
    padding: 0;
}

.tmb-activity-result-list li {
    padding: 12px 16px;
    border-left: 3px solid var(--tmb-accent);
    background: #f0fdf4;
    margin-bottom: 8px;
    border-radius: 0 8px 8px 0;
    font-size: 0.9rem;
    color: var(--tmb-text);
    transition: var(--tmb-transition);
}

.tmb-activity-result-list li:hover {
    background: #dcfce7;
    padding-left: 24px;
}

/* ---------- Footer ---------- */
.tmb-footer {
    text-align: center;
    padding: 32px 0;
    color: var(--tmb-text-dim);
    font-size: 0.8rem;
    border-top: 1px solid var(--tmb-line);
    margin-top: 40px;
}

/* ---------- Animations ---------- */
@keyframes tmb-fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.tmb-animate {
    opacity: 0;
    transform: translateY(20px);
}

.tmb-animate.tmb-visible {
    animation: tmb-fadeInUp 0.5s ease-out forwards;
}

.tmb-animate-delay-1.tmb-visible { animation-delay: 0.08s; }
.tmb-animate-delay-2.tmb-visible { animation-delay: 0.15s; }
.tmb-animate-delay-3.tmb-visible { animation-delay: 0.22s; }
.tmb-animate-delay-4.tmb-visible { animation-delay: 0.28s; }

/* ---------- Print ---------- */
@media print {
    .tmb-hero { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .tmb-card, .tmb-subcard, .tmb-stat-card { box-shadow: none; border: 1px solid #ddd; }
    .tmb-btn, .tmb-action-bar { display: none !important; }
    .tmb-progress-bar { display: none; }
}

/* ---------- Responsive 768px ---------- */
@media (max-width: 768px) {
    .tmb-hero { padding: 28px 20px 24px; }
    .tmb-hero h1 { font-size: 1.5rem; }
    .tmb-hero p { font-size: 0.9rem; }
    .tmb-hero-logo { width: 68px; padding: 16px; }
    .tmb-container { width: calc(100% - 20px); padding: 16px 0; }
    .tmb-card { padding: 18px 16px; border-radius: var(--tmb-radius); margin-bottom: 16px; }
    .tmb-subcard { padding: 14px 12px; margin-bottom: 12px; }
    .tmb-grid-2 { grid-template-columns: 1fr !important; }
    .tmb-radio-btn { width: 38px; height: 38px; font-size: 0.8rem; }
    .tmb-stat-card { padding: 16px 12px; }
    .tmb-stat-score { font-size: 1.4rem; }
    .tmb-summary-card { padding: 20px 16px; }
    .tmb-summary-card .tmb-student-name { font-size: 1.2rem; }
    .tmb-summary-card h2 { font-size: 1rem; }
    .tmb-table th, .tmb-table td { padding: 10px 10px; font-size: 0.82rem; }
    .tmb-tag-list { gap: 8px; }
    .tmb-tag { font-size: 0.8rem; padding: 8px 12px; }
    .tmb-question-row { padding: 12px 0; }
    .tmb-yn-ya, .tmb-yn-tidak { min-width: 76px; padding: 7px 14px; font-size: 0.84rem; }
}

@media (max-width: 480px) {
    .tmb-hero { padding: 22px 16px 20px; }
    .tmb-hero h1 { font-size: 1.2rem; }
    .tmb-hero p { font-size: 0.85rem; }
    .tmb-hero-logo { width: 60px; padding: 12px; }
    .tmb-hero .tmb-btn { width: auto; max-width: 90%; }
    .tmb-scale-box { flex-direction: column; gap: 6px; }
    .tmb-btn { width: 100%; justify-content: center; }
    .tmb-action-bar { flex-direction: column; }
    .tmb-card h2 { font-size: 1.05rem; }
    .tmb-subcard h3 { font-size: 0.88rem; }
    .tmb-question-text { font-size: 0.87rem; }
    .tmb-stat-card { padding: 14px 10px; }
    .tmb-stat-score { font-size: 1.2rem; }
    .tmb-stat-value { font-size: 0.85rem; }
    .tmb-table { font-size: 0.78rem; }
    .tmb-table th, .tmb-table td { padding: 8px 8px; }
}



/* ===== Result Search Page ===== */
.rs-search-card {
    background: var(--tmb-bg-card);
    border: 1px solid var(--tmb-line);
    border-radius: var(--tmb-radius-xl);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--tmb-shadow);
}
.rs-search-card h2 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--tmb-text);
    display: flex;
    align-items: center;
    gap: 10px;
}
.rs-search-card h2 .tmb-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    color: #fff;
    background: var(--tmb-gradient-1);
}
.rs-search-desc {
    color: var(--tmb-text-muted);
    font-size: 0.9rem;
    margin-bottom: 24px;
    line-height: 1.6;
}

/* Filter grid */
.rs-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

/* Required asterisk */
.rs-required { color: var(--tmb-danger); font-weight: 700; }

/* Autocomplete wrapper */
.rs-autocomplete { position: relative; width: 100%; }
.rs-autocomplete .tmb-input { width: 100%; }
.rs-autocomplete .rs-dropdown {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #fff;
    border: 1.5px solid var(--tmb-brand);
    border-top: none;
    border-radius: 0 0 var(--tmb-radius-sm) var(--tmb-radius-sm);
    max-height: 200px;
    overflow-y: auto;
    z-index: 200;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.rs-autocomplete .rs-dropdown.show { display: block; animation: rs-fadeDown 0.2s ease; }
@keyframes rs-fadeDown {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
.rs-dropdown-item {
    padding: 10px 14px; font-size: 0.88rem;
    color: var(--tmb-text); cursor: pointer;
    transition: background 0.15s; border-bottom: 1px solid #f1f5f9;
}
.rs-dropdown-item:last-child { border-bottom: none; }
.rs-dropdown-item:hover, .rs-dropdown-item.active { background: #eff6ff; color: var(--tmb-brand); }
.rs-dropdown-item mark { background: #fef08a; color: inherit; padding: 0 1px; border-radius: 2px; }
.rs-dropdown-empty { padding: 14px; text-align: center; color: var(--tmb-text-dim); font-size: 0.82rem; font-style: italic; }

/* Search actions */
.rs-actions { display: flex; gap: 12px; align-items: center; }

/* Input validation error state */
.tmb-input.rs-invalid { border-color: var(--tmb-danger); box-shadow: 0 0 0 3px rgba(220,38,38,0.12); }

/* Loader */
.rs-loader { display: none; text-align: center; padding: 40px; }
.rs-loader.show { display: block; }
.rs-spinner {
    display: inline-block; width: 36px; height: 36px;
    border: 3px solid var(--tmb-line); border-top-color: var(--tmb-brand);
    border-radius: 50%; animation: rs-spin 0.7s linear infinite;
}
@keyframes rs-spin { to { transform: rotate(360deg); } }
.rs-loader-text { margin-top: 12px; color: var(--tmb-text-muted); font-size: 0.88rem; }

/* Result container */
#rs-results { min-height: 80px; }

/* Empty & Error states */
.rs-empty-state { text-align: center; padding: 48px 20px; color: var(--tmb-text-dim); }
.rs-empty-state i { font-size: 2.5rem; display: block; margin-bottom: 12px; color: var(--tmb-line); }
.rs-empty-state p { font-size: 0.92rem; margin-bottom: 4px; }
.rs-empty-state .hint { font-size: 0.8rem; color: var(--tmb-text-dim); }

.rs-error-msg {
    background: var(--tmb-danger-bg); color: var(--tmb-danger);
    border: 1px solid #fecaca; padding: 14px 18px;
    border-radius: var(--tmb-radius-sm); font-size: 0.9rem; font-weight: 500;
    display: flex; align-items: center; gap: 8px; margin-bottom: 16px;
}

/* ===== Description / Kesimpulan Card ===== */
.rs-desc-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #e8f5e9 50%, #fff3e0 100%);
    border: 1.5px solid #c8e6c9;
    border-radius: var(--tmb-radius-xl);
    padding: 28px 32px;
    position: relative;
    overflow: hidden;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    word-break: break-word;
}
.rs-desc-card::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 120px; height: 120px;
    background: radial-gradient(circle, rgba(76,175,80,0.12) 0%, transparent 70%);
    border-radius: 50%;
}
.rs-desc-card h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: #2e7d32;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.rs-desc-card h3 .desc-icon {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, #43a047, #66bb6a);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(67,160,71,0.3);
}
.rs-desc-text {
    font-size: 0.92rem;
    line-height: 1.8;
    color: #37474f;
    position: relative;
    z-index: 1;
}
.rs-desc-text strong {
    color: #1b5e20;
    font-weight: 700;
}
.rs-desc-highlight {
    display: inline-block;
    background: linear-gradient(135deg, #a5d6a7, #c8e6c9);
    padding: 2px 10px;
    border-radius: 6px;
    font-weight: 700;
    color: #1b5e20;
}
.rs-desc-list {
    margin-top: 12px;
    padding-left: 0;
    list-style: none;
}
.rs-desc-list li {
    padding: 6px 0;
    font-size: 0.88rem;
    color: #455a64;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.rs-desc-list li i {
    color: #43a047;
    margin-top: 3px;
    flex-shrink: 0;
}

/* ===== Spider/Radar chart container ===== */
.rs-radar-container {
    position: relative;
    width: 100%;
    height: 320px;
}

/* ===== Profile Sections (Laporan Detail) ===== */
.rs-profile-section {
    margin-bottom: 16px;
    border-radius: var(--tmb-radius-sm);
    overflow: hidden;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.rs-profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 18px;
    background: #f8fafc;
}
.rs-profile-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}
.rs-badge {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
    white-space: nowrap;
}
.rs-profile-body {
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.rs-profile-body p {
    font-size: 0.88rem;
    line-height: 1.7;
    color: #475569;
    margin: 0;
}
.rs-act-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #e0f2fe;
    color: #0891b2;
    border: 1px solid #bae6fd;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 4px;
}
.rs-rec-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}
.rs-rec-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.84rem;
    font-weight: 600;
    transition: all 0.2s;
}
.rs-rec-chip:hover {
    background: #dcfce7;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(22,163,74,0.15);
}

/* ===== Stat Grid (3 cols desktop, 1 col mobile) ===== */
.rs-stat-grid {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {
    .rs-stat-grid { grid-template-columns: 1fr; }
    .rs-filter-grid { grid-template-columns: 1fr; }
    .rs-actions { flex-direction: column; width: 100%; }
    .rs-actions .tmb-btn { width: 100%; justify-content: center; }
    .rs-search-card { padding: 20px 16px; }
    .rs-desc-card { padding: 18px 14px; }
    .rs-desc-card h3 { font-size: 0.95rem; }
    .rs-profile-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 12px 14px;
    }
    .rs-profile-body { padding: 12px 14px; }
    .rs-profile-title { font-size: 0.88rem; }
    .rs-badge { font-size: 0.74rem; padding: 3px 10px; }
    .rs-rec-chips { gap: 6px; }
    .rs-rec-chip { font-size: 0.78rem; padding: 5px 10px; }
    .rs-act-chip { font-size: 0.78rem; padding: 3px 10px; }
}

@media (max-width: 480px) {
    .rs-search-card { padding: 16px 12px; border-radius: var(--tmb-radius); }
    .rs-desc-card { padding: 14px 12px; border-radius: var(--tmb-radius); }
    .rs-profile-title { font-size: 0.85rem; gap: 6px; }
    .rs-profile-body p { font-size: 0.83rem; }
    .rs-radar-container { height: 240px; }
    .tmb-stat-card { padding: 14px 10px; }
}

/* Print: hide search card */
@media print {
    .rs-search-card { display: none !important; }
}