:root {
    --rf-primary: #1e355f;
    --rf-secondary: #2ea7ad;
    --rf-tertiary: #c8f66a;
    --rf-hover-primary: #031c49;
    --rf-hover-secondary: #006b71;
    --rf-hover-tertiary: #a6e22e;
    --rf-white: #ffffff;
    --rf-light-white: #f9f9f9;
    --rf-black: #151728;
    --rf-green: #2ead61;
    --rf-yellow: #ecdd13;
    --rf-red: #ec2513;
    --rf-gray-5: #f2f2f2;
    --rf-gray-4: #e0e0e0;
    --rf-gray-3: #828282;
    --rf-gray-2: #58595b;
    --rf-gray-1: #1d1d1b;
    --rf-font-sans: "Maven Pro", "Segoe UI", Arial, sans-serif;
    --rf-shadow-sm: 0 8px 22px rgba(15, 23, 42, .06);
    --rf-shadow-md: 0 14px 34px rgba(15, 23, 42, .10);
    --bs-primary: var(--rf-primary);
    --bs-primary-rgb: 30, 53, 95;
    --bs-secondary: var(--rf-secondary);
    --bs-secondary-rgb: 46, 167, 173;
    --bs-body-font-family: var(--rf-font-sans);
    --bs-body-color: var(--rf-gray-1);
    --bs-body-bg: #f6f9fc;
    --bs-border-color: rgba(30, 53, 95, .12);
}

html, body { min-height: 100%; }
body, button, input, select, textarea { font-family: var(--rf-font-sans); }
body { color: var(--rf-gray-1); background: linear-gradient(180deg, #f8fbfd, #eef4f8); -webkit-font-smoothing: antialiased; }
::selection { color: var(--rf-primary); background: rgba(46, 167, 173, .20); }
.btn, .form-control, .form-select, .modal-content, .card { border-radius: 10px; }
.btn { font-weight: 800; transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary, .btn.btn-primary { border: 0; color: #fff; background: var(--rf-primary); box-shadow: 0 12px 24px rgba(30, 53, 95, .18); }
.btn-primary:hover, .btn-primary:focus, .btn.btn-primary:hover, .btn.btn-primary:focus { color: #fff; background: var(--rf-hover-primary); }
.form-control, .form-select { border-color: rgba(30, 53, 95, .14); }
.form-control:focus, .form-select:focus { border-color: rgba(46, 167, 173, .56); box-shadow: 0 0 0 .25rem rgba(46, 167, 173, .14); }
.table thead th { color: var(--rf-primary); font-weight: 900; }
.rf-simple-embed { display: flex; flex-direction: column; min-height: 100vh; background: var(--rf-light-white); font-family: var(--rf-font-sans); }
.rf-simple-embed__header { display: flex; align-items: center; gap: 12px; padding: 14px 22px; color: var(--rf-primary); border-bottom: 1px solid var(--rf-gray-5); background: var(--rf-white); }
.rf-simple-embed__header img { width: 30px; height: 34px; object-fit: contain; }
.rf-simple-embed__header h1 { margin: 0; font-size: 18px; font-weight: 700; }
.rf-simple-embed__frame { flex: 1; min-height: 0; padding: 12px; }
.rf-simple-embed__frame iframe { width: 100%; height: 100%; border: 0; border-radius: 10px; background: #fff; }

.rf-theme-toggle {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1800;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 13px;
    border: 1px solid rgba(30, 53, 95, .14);
    border-radius: 999px;
    color: var(--rf-primary);
    background: var(--rf-white);
    box-shadow: var(--rf-shadow-md);
    font-size: 12px;
    font-weight: 800;
}

html[data-theme="dark"] {
    --rf-primary: #a9c9ff;
    --rf-secondary: #55cbd0;
    --rf-tertiary: #c8f66a;
    --rf-hover-primary: #d7e6ff;
    --rf-hover-secondary: #8de4e7;
    --rf-white: #162132;
    --rf-light-white: #0d1624;
    --rf-black: #f6f9fd;
    --rf-green: #5bd58b;
    --rf-yellow: #f3dd5d;
    --rf-red: #ff7466;
    --rf-gray-5: #223047;
    --rf-gray-4: #34435a;
    --rf-gray-3: #9ba9bd;
    --rf-gray-2: #c1cad8;
    --rf-gray-1: #f2f5fa;
    --rf-shadow-sm: 0 8px 22px rgba(0, 0, 0, .2);
    --rf-shadow-md: 0 14px 34px rgba(0, 0, 0, .3);
    --bs-body-color: var(--rf-gray-1);
    --bs-body-bg: var(--rf-light-white);
    --bs-border-color: rgba(169, 201, 255, .18);
}

html[data-theme="dark"] body { color: var(--rf-gray-1); background: linear-gradient(180deg, #101b2b, #09111d); }
html[data-theme="dark"] .card,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .table,
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] .input-group-text { color: var(--rf-gray-1); background-color: var(--rf-white); border-color: var(--bs-border-color); }
html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .form-text { color: var(--rf-gray-3) !important; }
html[data-theme="dark"] .btn-light { color: var(--rf-gray-1); background: var(--rf-gray-5); border-color: var(--rf-gray-4); }
html[data-theme="dark"] .btn-outline-secondary { color: var(--rf-gray-2); border-color: var(--rf-gray-4); }
html[data-theme="dark"] .table > :not(caption) > * > * { color: inherit; border-color: var(--bs-border-color); background-color: transparent; }
html[data-theme="dark"] .rf-theme-toggle { color: var(--rf-primary); border-color: var(--rf-gray-4); background: var(--rf-white); }
@media (max-width: 640px) { .rf-theme-toggle { right: 12px; bottom: 12px; }.rf-theme-toggle span { display: none; } }
