:root {
    --rg-action: #2742DB;
    --rg-brand: #3B5BF0;
    --rg-ink: #0F1B3D;
    --rg-text: #16213E;
    --rg-muted: #5A6580;
    --rg-border: #E4E9F2;
    --rg-surface: #FFFFFF;
    --rg-canvas: #F5F7FC;
    --rg-success: #1E9E6A;
    --rg-warning: #E08A1E;
    --rg-danger: #E0483D;
    --rg-radius: 12px;
    --rg-radius-sm: 8px;
    --rg-shadow: 0 1px 2px rgba(15, 27, 61, 0.06), 0 4px 16px rgba(15, 27, 61, 0.05);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--rg-canvas);
    color: var(--rg-text);
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

h1, h2, h3, h4, h5, .rg-font-title {
    font-family: 'Sora', system-ui, sans-serif;
    color: var(--rg-ink);
    margin: 0;
}

a {
    color: var(--rg-action);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Layout */
.rg-shell {
    display: flex;
    min-height: 100vh;
}

.rg-sidebar {
    width: 252px;
    background: var(--rg-surface);
    border-right: 1px solid var(--rg-border);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.rg-brand-mark {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: var(--rg-brand);
    padding: 0 8px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rg-brand-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--rg-action);
}

.rg-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rg-nav-section {
    font-size: 11px;
    letter-spacing: 0.04em;
    color: var(--rg-muted);
    padding: 16px 12px 6px;
    font-weight: 600;
}

.rg-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--rg-radius-sm);
    color: var(--rg-text);
    font-weight: 500;
    transition: background 0.12s ease, color 0.12s ease;
}

.rg-nav-link:hover {
    background: var(--rg-canvas);
    text-decoration: none;
}

.rg-nav-link.is-active {
    background: rgba(39, 66, 219, 0.08);
    color: var(--rg-action);
    font-weight: 600;
}

.rg-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.rg-header {
    background: var(--rg-surface);
    border-bottom: 1px solid var(--rg-border);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.rg-header h1 {
    font-size: 20px;
}

.rg-content {
    padding: 28px 32px;
    flex: 1;
}

/* Cards */
.rg-card {
    background: var(--rg-surface);
    border: 1px solid var(--rg-border);
    border-radius: var(--rg-radius);
    box-shadow: var(--rg-shadow);
    padding: 20px;
}

.rg-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.rg-stat-label {
    color: var(--rg-muted);
    font-size: 13px;
    font-weight: 500;
}

.rg-stat-value {
    font-family: 'Sora', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--rg-ink);
    margin-top: 4px;
}

.rg-section-title {
    font-size: 16px;
    margin-bottom: 14px;
}

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

.rg-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.rg-table th {
    text-align: left;
    padding: 11px 14px;
    color: var(--rg-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--rg-border);
    white-space: nowrap;
}

.rg-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--rg-border);
    vertical-align: middle;
}

.rg-table tbody tr:hover {
    background: var(--rg-canvas);
}

.rg-table tbody tr:last-child td {
    border-bottom: none;
}

/* Badges */
.rg-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}

.rg-badge-success { background: rgba(30, 158, 106, 0.12); color: var(--rg-success); }
.rg-badge-warning { background: rgba(224, 138, 30, 0.12); color: var(--rg-warning); }
.rg-badge-danger { background: rgba(224, 72, 61, 0.12); color: var(--rg-danger); }
.rg-badge-info { background: rgba(39, 66, 219, 0.10); color: var(--rg-action); }
.rg-badge-neutral { background: var(--rg-canvas); color: var(--rg-muted); }

/* Buttons */
.rg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: var(--rg-radius-sm);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.12s ease, opacity 0.12s ease;
}

.rg-btn-primary {
    background: var(--rg-action);
    color: #fff;
}

.rg-btn-primary:hover {
    background: #1f37b8;
    text-decoration: none;
    color: #fff;
}

.rg-btn-outline {
    background: var(--rg-surface);
    border-color: var(--rg-border);
    color: var(--rg-text);
}

.rg-btn-outline:hover {
    background: var(--rg-canvas);
    text-decoration: none;
}

.rg-btn-danger {
    background: var(--rg-danger);
    color: #fff;
}

.rg-btn-danger:hover {
    background: #c73a30;
    text-decoration: none;
    color: #fff;
}

.rg-btn-success {
    background: var(--rg-success);
    color: #fff;
}

.rg-btn-success:hover {
    background: #18815700;
    background: #188157;
    text-decoration: none;
    color: #fff;
}

/* Forms */
.rg-input, .rg-select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--rg-border);
    border-radius: var(--rg-radius-sm);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    color: var(--rg-text);
    background: var(--rg-surface);
}

.rg-input:focus, .rg-select:focus {
    outline: none;
    border-color: var(--rg-brand);
    box-shadow: 0 0 0 3px rgba(59, 91, 240, 0.12);
}

.rg-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--rg-text);
    margin-bottom: 6px;
}

.rg-filter-bar {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.rg-filter-bar .rg-field {
    min-width: 200px;
}

/* Alerts */
.rg-alert {
    padding: 12px 16px;
    border-radius: var(--rg-radius-sm);
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.rg-alert-success {
    background: rgba(30, 158, 106, 0.10);
    color: var(--rg-success);
    border: 1px solid rgba(30, 158, 106, 0.25);
}

.rg-alert-danger {
    background: rgba(224, 72, 61, 0.10);
    color: var(--rg-danger);
    border: 1px solid rgba(224, 72, 61, 0.25);
}

/* Login */
.rg-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--rg-canvas);
}

.rg-login-card {
    width: 100%;
    max-width: 400px;
    background: var(--rg-surface);
    border: 1px solid var(--rg-border);
    border-radius: var(--rg-radius);
    box-shadow: var(--rg-shadow);
    padding: 32px;
}

.rg-login-card .rg-brand-mark {
    justify-content: center;
    padding-top: 0;
}

.rg-form-group {
    margin-bottom: 16px;
}

.rg-muted {
    color: var(--rg-muted);
}

.rg-pagination {
    margin-top: 20px;
}

.rg-pagination nav {
    display: flex;
    justify-content: center;
}

.rg-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.rg-kv {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--rg-border);
    font-size: 14px;
}

.rg-kv:last-child {
    border-bottom: none;
}

.rg-kv-key {
    color: var(--rg-muted);
    font-weight: 500;
}

.rg-kv-value {
    color: var(--rg-text);
    font-weight: 600;
    text-align: right;
}

.rg-mono {
    font-family: ui-monospace, 'SF Mono', Menlo, monospace;
    font-size: 12.5px;
}

.rg-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--rg-muted);
}

.rg-stack {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

@media (max-width: 900px) {
    .rg-sidebar { width: 200px; }
    .rg-detail-grid { grid-template-columns: 1fr; }
}

/* Utilitarios (evitar style inline no Blade) */
.rg-center { text-align: center; }
.rg-w-full { width: 100%; }
.rg-mt-0 { margin-top: 0; }
.rg-mb-0 { margin-bottom: 0; }
.rg-mb-6 { margin-bottom: 24px; }
.rg-flex { display: flex; }
.rg-items-center { align-items: center; }
.rg-justify-between { justify-content: space-between; }
.rg-gap-2 { gap: 8px; }
.rg-gap-3 { gap: 14px; }
.rg-header-actions { display: flex; align-items: center; gap: 14px; }
.rg-check-label { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.rg-card + .rg-card { margin-top: 24px; }
.rg-page-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.rg-grow { flex: 1; }
.rg-text-right { text-align: right; }
.rg-pre {
    background: var(--rg-canvas);
    border: 1px solid var(--rg-border);
    border-radius: var(--rg-radius-sm);
    padding: 12px;
    font-family: ui-monospace, 'SF Mono', Menlo, monospace;
    font-size: 12.5px;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
    color: var(--rg-text);
}
.rg-truncate {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
