/*
 * Rocky admin: the Rockinfo platform look (white surfaces, red accent, soft
 * gradient glows, rounded cards, pill tabs) for the admin pages.
 *
 * The page templates use Bootstrap 3 class names (panel, btn, form-control,
 * table, label, row/col-*, nav-tabs ...). This file styles those names
 * directly, so there is no Bootstrap stylesheet and no build step.
 */

:root {
    --r-red: #dc1e35;
    --r-red-600: #c0182c;
    --r-red-50: #fdecee;
    --r-red-100: #fbd5da;
    --r-ink: #14161c;
    --r-text: #2b2f38;
    --r-muted: #6b7280;
    --r-faint: #9aa0ab;
    --r-line: #e8e9ee;
    --r-line-strong: #d9dbe2;
    --r-bg: #f6f7f9;
    --r-surface: #fff;
    --r-blue: #3b82f6;
    --r-blue-50: #eaf2ff;
    --r-green: #12a150;
    --r-green-50: #e7f7ee;
    --r-amber: #c27803;
    --r-amber-50: #fff5df;
    --r-violet: #7c5cf5;
    --r-violet-50: #f0ecff;
    --r-radius: 12px;
    --r-radius-sm: 8px;
    --r-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
    --r-shadow-lg: 0 12px 32px -8px rgba(16, 24, 40, .16), 0 2px 6px rgba(16, 24, 40, .06);
    --r-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --r-display: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
    --r-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    --r-side: 248px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--r-bg);
    color: var(--r-text);
    font: 400 14px/1.55 var(--r-font);
    -webkit-font-smoothing: antialiased;
}
a { color: var(--r-red); text-decoration: none; }
a:hover { color: var(--r-red-600); text-decoration: underline; }
h1, h2, h3, h4, h5 { font-family: var(--r-display); color: var(--r-ink); letter-spacing: -.02em; margin: 0 0 .5em; line-height: 1.2; }
h1 { font-size: 30px; font-weight: 800; }
h2 { font-size: 22px; font-weight: 800; }
h3 { font-size: 17px; font-weight: 700; }
h4 { font-size: 15px; font-weight: 700; }
h5 { font-size: 13px; font-weight: 700; }
p { margin: 0 0 12px; }
small, .small { font-size: 12px; }
code, kbd, pre, samp { font-family: var(--r-mono); font-size: 12.5px; }
code { background: var(--r-bg); border: 1px solid var(--r-line); padding: 1px 6px; border-radius: 6px; color: var(--r-ink); }
pre { background: #0f1117; color: #e7e9ee; border-radius: var(--r-radius-sm); padding: 14px 16px; overflow: auto; white-space: pre-wrap; word-break: break-word; margin: 0 0 12px; }
pre code { background: none; border: 0; padding: 0; color: inherit; }
hr { border: 0; border-top: 1px solid var(--r-line); margin: 18px 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--r-red); outline-offset: 2px; }

/* ------------------------------------------------------------------ App shell */

.r-app { min-height: 100vh; }
.r-side {
    position: fixed; inset: 0 auto 0 0; width: var(--r-side); z-index: 30;
    background: var(--r-surface); border-right: 1px solid var(--r-line);
    display: flex; flex-direction: column;
}
.r-brand { display: flex; align-items: center; gap: 10px; padding: 18px 20px 14px; color: var(--r-ink); }
.r-brand:hover { text-decoration: none; color: var(--r-ink); }
.r-brand-mark {
    width: 30px; height: 30px; border-radius: 9px; flex: none;
    background: var(--r-red); color: #fff; display: grid; place-items: center;
    box-shadow: 0 4px 10px -2px rgba(220, 30, 53, .45);
}
.r-brand-mark svg { width: 16px; height: 16px; fill: #fff; }
.r-brand-text { line-height: 1.05; }
.r-brand-text b { display: block; font: 800 16px/1.1 var(--r-display); letter-spacing: -.02em; }
.r-brand-text span { display: block; font-size: 9.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--r-red); margin-top: 2px; }

.r-tenant { margin: 4px 14px 10px; position: relative; }
.r-tenant-btn {
    width: 100%; display: flex; align-items: center; gap: 10px; text-align: left;
    background: var(--r-bg); border: 1px solid var(--r-line); border-radius: 10px;
    padding: 8px 10px; font: inherit; color: var(--r-ink); cursor: pointer;
}
.r-tenant-btn:hover { border-color: var(--r-line-strong); }
.r-avatar {
    width: 28px; height: 28px; border-radius: 8px; flex: none; display: grid; place-items: center;
    background: linear-gradient(135deg, #ffe1e5, #e9edff); color: var(--r-red); font: 800 12px var(--r-display);
}
.r-tenant-btn .r-tenant-name { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-tenant-btn .r-tenant-role { display: block; font-size: 11px; color: var(--r-muted); font-weight: 500; }
.r-tenant-btn .fa { margin-left: auto; color: var(--r-faint); font-size: 11px; }

.r-nav { flex: 1; overflow-y: auto; padding: 4px 12px 16px; }
.r-nav-label { padding: 16px 10px 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--r-faint); }
.r-nav a {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: 1px 0;
    border-radius: 9px; color: var(--r-text); font-weight: 500; font-size: 13.5px;
}
.r-nav a:hover { background: var(--r-bg); text-decoration: none; color: var(--r-ink); }
.r-nav a .fa { width: 18px; text-align: center; color: var(--r-faint); font-size: 14px; }
.r-nav a.active { background: var(--r-red-50); color: var(--r-red); font-weight: 600; }
.r-nav a.active .fa { color: var(--r-red); }
.r-nav .r-count { margin-left: auto; background: var(--r-red); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 1px 7px; }

.r-side-foot { border-top: 1px solid var(--r-line); padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.r-side-foot .r-user { min-width: 0; flex: 1; }
.r-side-foot .r-user b { display: block; font-size: 13px; color: var(--r-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-side-foot .r-user span { display: block; font-size: 11.5px; color: var(--r-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-side-foot a.r-icon-link { color: var(--r-muted); padding: 6px; border-radius: 8px; }
.r-side-foot a.r-icon-link:hover { background: var(--r-bg); color: var(--r-ink); }

.r-main { margin-left: var(--r-side); min-width: 0; }
.r-mobilebar { display: none; }

/* Page header with the soft Rockinfo glow */
/* The glow is a background, not blurred shapes, so the header need not hide
   overflow and its dropdown menus can open over the content below. */
.r-hero {
    position: relative; z-index: 10;
    background:
        radial-gradient(420px 160px at calc(100% - 120px) -40px, rgba(255, 205, 212, .7), transparent 70%),
        radial-gradient(380px 150px at 30% -60px, rgba(214, 224, 255, .7), transparent 70%),
        var(--r-surface);
    border-bottom: 1px solid var(--r-line);
    padding: 26px 36px 20px;
}
.r-eyebrow {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--r-red);
    margin-bottom: 6px;
}
.r-eyebrow::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--r-red); }
.r-hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.r-hero h1 { margin: 0; font-size: 28px; }
.r-hero .r-sub { margin-top: 6px; color: var(--r-muted); font-size: 13.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.r-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* Narrow screens put the header actions under the title, on the left. */
@media (max-width: 991px) { .r-actions .dropdown-menu-right { left: 0; right: auto; } }
.r-crumbs { list-style: none; margin: 0 0 10px; padding: 0; font-size: 12px; color: var(--r-faint); display: flex; flex-wrap: wrap; }
.r-crumbs li + li::before { content: "/"; margin: 0 7px; color: var(--r-line-strong); }
.r-crumbs a { color: var(--r-muted); }
.r-crumbs .active { color: var(--r-text); }
.r-content { padding: 26px 36px 48px; max-width: 1480px; }

/* ------------------------------------------------------------------ Grid (Bootstrap 3 names) */

.row { display: flex; flex-wrap: wrap; margin: 0 -10px; }
.row > [class*="col-"] { padding: 0 10px; width: 100%; min-width: 0; }
.clearfix::after { content: ""; display: table; clear: both; }
@media (min-width: 576px) {
    .col-sm-1{width:8.333%}.col-sm-2{width:16.667%}.col-sm-3{width:25%}.col-sm-4{width:33.333%}.col-sm-5{width:41.667%}.col-sm-6{width:50%}.col-sm-7{width:58.333%}.col-sm-8{width:66.667%}.col-sm-9{width:75%}.col-sm-10{width:83.333%}.col-sm-12{width:100%}
    .row > .col-xs-6 { width: 50%; }
}
.row > .col-xs-6 { width: 50%; }
@media (min-width: 900px) {
    .row > .col-md-1{width:8.333%}.row > .col-md-2{width:16.667%}.row > .col-md-3{width:25%}.row > .col-md-4{width:33.333%}.row > .col-md-5{width:41.667%}.row > .col-md-6{width:50%}.row > .col-md-7{width:58.333%}.row > .col-md-8{width:66.667%}.row > .col-md-9{width:75%}.row > .col-md-10{width:83.333%}.row > .col-md-12{width:100%}
}
@media (min-width: 1200px) {
    .row > .col-lg-2{width:16.667%}.row > .col-lg-3{width:25%}.row > .col-lg-4{width:33.333%}.row > .col-lg-5{width:41.667%}.row > .col-lg-6{width:50%}.row > .col-lg-7{width:58.333%}.row > .col-lg-8{width:66.667%}.row > .col-lg-9{width:75%}.row > .col-lg-12{width:100%}
}
.pull-right { float: right; }
.pull-left { float: left; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-muted { color: var(--r-muted) !important; }
.text-danger { color: var(--r-red) !important; }
.text-success { color: var(--r-green) !important; }
.text-warning { color: var(--r-amber) !important; }
.text-primary { color: var(--r-blue) !important; }
.text-info { color: var(--r-blue) !important; }
.text-semibold { font-weight: 600; }
.text-capitalize { text-transform: capitalize; }
.no-padding { padding: 0 !important; }

/* ------------------------------------------------------------------ Cards (panel, widget, well, box) */

.panel, .widget, .box {
    background: var(--r-surface); border: 1px solid var(--r-line); border-radius: var(--r-radius);
    box-shadow: var(--r-shadow); margin-bottom: 20px; overflow: hidden;
}
.panel-heading, .widget-header {
    padding: 14px 18px; border-bottom: 1px solid var(--r-line);
    display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.panel-heading .panel-title, .widget-header h4, .widget-header h5 { margin: 0; font: 700 14.5px/1.3 var(--r-display); color: var(--r-ink); letter-spacing: -.01em; }
.panel-heading .panel-title .fa { color: var(--r-red); margin-right: 4px; }
.panel-body, .widget-content { padding: 18px; }
.panel-footer { padding: 12px 18px; border-top: 1px solid var(--r-line); background: #fbfbfc; }
.panel > .table, .panel > .table-responsive { border-top: 0; }
.well { background: var(--r-bg); border: 1px solid var(--r-line); border-radius: var(--r-radius-sm); padding: 14px 16px; margin-bottom: 14px; }
.well-sm { padding: 10px 12px; }

/* ------------------------------------------------------------------ Buttons */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    font: 600 13px/1 var(--r-font); padding: 9px 14px; border-radius: 8px; border: 1px solid transparent;
    cursor: pointer; white-space: nowrap; text-decoration: none; user-select: none;
    transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn:hover { text-decoration: none; }
.btn:disabled, .btn.disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--r-red); color: #fff; box-shadow: 0 1px 2px rgba(220, 30, 53, .3); }
.btn-primary:hover { background: var(--r-red-600); color: #fff; }
.btn-default { background: var(--r-surface); color: var(--r-ink); border-color: var(--r-line-strong); box-shadow: 0 1px 1px rgba(16, 24, 40, .04); }
.btn-default:hover, .btn-default.active { background: var(--r-bg); color: var(--r-ink); }
.btn-success { background: var(--r-green); color: #fff; }
.btn-success:hover { background: #0e8a44; color: #fff; }
.btn-warning { background: var(--r-amber-50); color: var(--r-amber); border-color: #f3dfb0; }
.btn-warning:hover { background: #ffedc2; color: #9a5f00; }
.btn-danger { background: var(--r-surface); color: var(--r-red); border-color: var(--r-red-100); }
.btn-danger:hover { background: var(--r-red-50); color: var(--r-red-600); }
.btn-info { background: var(--r-blue-50); color: var(--r-blue); }
.btn-link { background: none; color: var(--r-red); padding-left: 4px; padding-right: 4px; }
.btn-link:hover { text-decoration: underline; }
.btn-sm { padding: 7px 11px; font-size: 12.5px; }
.btn-xs { padding: 4px 8px; font-size: 11.5px; border-radius: 6px; }
.btn-lg { padding: 12px 20px; font-size: 14.5px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-group { display: inline-flex; }
.btn-group > .btn + .btn { margin-left: -1px; }
.btn-group > .btn:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.btn-group > .btn:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.btn-group > .btn.active { background: var(--r-red-50); color: var(--r-red); border-color: var(--r-red-100); z-index: 1; }
.btn-group[data-toggle="buttons"] input { position: absolute; opacity: 0; pointer-events: none; }
.close { background: none; border: 0; font-size: 20px; line-height: 1; color: inherit; opacity: .5; cursor: pointer; float: right; }
.close:hover { opacity: .9; }
.caret { display: inline-block; width: 0; height: 0; border-top: 4px solid; border-left: 4px solid transparent; border-right: 4px solid transparent; margin-left: 2px; }

/* ------------------------------------------------------------------ Forms */

label { display: inline-block; font-weight: 600; font-size: 12.5px; color: var(--r-ink); margin-bottom: 6px; }
.form-group { margin-bottom: 16px; }
.form-control {
    display: block; width: 100%; font: 400 13.5px/1.4 var(--r-font); color: var(--r-ink);
    background: var(--r-surface); border: 1px solid var(--r-line-strong); border-radius: 8px; padding: 9px 12px;
    transition: border-color .15s, box-shadow .15s;
}
.form-control:focus { outline: 0; border-color: var(--r-red); box-shadow: 0 0 0 3px rgba(220, 30, 53, .12); }
.form-control::placeholder { color: var(--r-faint); }
.form-control[disabled], .form-control[readonly] { background: var(--r-bg); color: var(--r-muted); }
textarea.form-control { min-height: 84px; resize: vertical; }
select.form-control { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
select[multiple].form-control { background-image: none; padding-right: 12px; }
.input-sm { padding: 6px 10px; font-size: 12.5px; border-radius: 7px; }
select.input-sm { padding-right: 28px; }
.help-block { display: block; margin-top: 5px; font-size: 12px; color: var(--r-muted); }
.checkbox, .radio { margin: 0 0 10px; }
.checkbox label, .radio label, .checkbox-inline, .radio-inline { font-weight: 500; display: inline-flex; align-items: flex-start; gap: 8px; color: var(--r-text); cursor: pointer; margin-bottom: 0; }
.checkbox-inline + .checkbox-inline { margin-left: 14px; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--r-red); width: 15px; height: 15px; margin: 2px 0 0; flex: none; }
.form-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.form-inline .form-group { margin: 0; }
.form-inline .form-control { width: auto; display: inline-block; }
.input-group { display: flex; align-items: stretch; width: 100%; }
.input-group > .form-control { flex: 1; min-width: 0; border-radius: 0; }
.input-group > .form-control:first-child { border-radius: 8px 0 0 8px; }
.input-group > .form-control:last-child { border-radius: 0 8px 8px 0; }
.input-group-addon, .input-group-btn { display: flex; align-items: center; }
.input-group-addon { padding: 0 11px; background: var(--r-bg); border: 1px solid var(--r-line-strong); color: var(--r-muted); font-size: 12.5px; }
.input-group-addon:first-child { border-right: 0; border-radius: 8px 0 0 8px; }
.input-group-addon:last-child { border-left: 0; border-radius: 0 8px 8px 0; }
.input-group-btn > .btn { height: 100%; border-radius: 0 8px 8px 0; margin-left: -1px; }
label.choice-card { display: block; border: 1px solid var(--r-line-strong); border-radius: 10px; padding: 12px 14px; cursor: pointer; font-weight: 500; height: 100%; background: var(--r-surface); }
label.choice-card.active { border-color: var(--r-red); background: var(--r-red-50); box-shadow: 0 0 0 3px rgba(220, 30, 53, .08); }

/* ------------------------------------------------------------------ Tables */

.table { width: 100%; border-collapse: collapse; margin: 0; font-size: 13px; }
.table > thead > tr > th {
    text-align: left; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--r-faint);
    padding: 11px 16px; border-bottom: 1px solid var(--r-line); background: #fbfbfc; white-space: nowrap;
}
.table > tbody > tr > td { padding: 12px 16px; border-bottom: 1px solid var(--r-line); vertical-align: middle; }
.table > tbody > tr:last-child > td { border-bottom: 0; }
.table-condensed > tbody > tr > td { padding: 9px 16px; }
.table-condensed > thead > tr > th { padding: 9px 16px; }
.table-hover > tbody > tr:hover > td { background: #fcfcfd; }
.table-striped > tbody > tr:nth-child(odd) > td { background: #fcfcfd; }
.table-bordered td, .table-bordered th { border: 1px solid var(--r-line); }
.table td.text-right, .table th.text-right { text-align: right; }
.table-vertical-align td { vertical-align: middle; }

/* ------------------------------------------------------------------ Badges */

.label, .badge {
    display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px;
    font-size: 11px; font-weight: 600; line-height: 1.4; white-space: nowrap; vertical-align: middle;
    background: var(--r-bg); color: var(--r-muted); border: 1px solid var(--r-line);
}
.label-success { background: var(--r-green-50); color: var(--r-green); border-color: #c7ecd6; }
.label-success::before, .label-warning::before, .label-danger::before, .label-primary::before, .label-info::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.label-warning { background: var(--r-amber-50); color: var(--r-amber); border-color: #f3dfb0; }
.label-danger { background: var(--r-red-50); color: var(--r-red); border-color: var(--r-red-100); }
.label-primary { background: var(--r-violet-50); color: var(--r-violet); border-color: #ddd4ff; }
.label-info { background: var(--r-blue-50); color: var(--r-blue); border-color: #cfe0ff; }
.badge { background: var(--r-red); color: #fff; border: 0; padding: 1px 7px; }

/* ------------------------------------------------------------------ Alerts */

.alert { position: relative; padding: 12px 16px; border-radius: 10px; border: 1px solid; margin-bottom: 18px; font-size: 13.5px; }
.alert-success { background: var(--r-green-50); border-color: #c7ecd6; color: #0b6b36; }
.alert-info { background: var(--r-blue-50); border-color: #cfe0ff; color: #1d4ed8; }
.alert-warning { background: var(--r-amber-50); border-color: #f3dfb0; color: #8a5600; }
.alert-danger { background: var(--r-red-50); border-color: var(--r-red-100); color: #a3122a; }
.alert .alert-link { font-weight: 700; color: inherit; text-decoration: underline; }
.alert-dismissable .close { position: absolute; right: 12px; top: 10px; }

/* ------------------------------------------------------------------ Tabs (pill style) */

.nav { list-style: none; margin: 0; padding: 0; }
.nav-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 18px; border-bottom: 1px solid var(--r-line); background: #fbfbfc; }
.nav-tabs > li > a {
    display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px;
    font-weight: 600; font-size: 12.5px; color: var(--r-text); border: 1px solid var(--r-line); background: var(--r-surface);
}
.nav-tabs > li > a:hover { text-decoration: none; border-color: var(--r-line-strong); color: var(--r-ink); }
.nav-tabs > li.active > a { background: var(--r-red); border-color: var(--r-red); color: #fff; box-shadow: 0 2px 6px -1px rgba(220, 30, 53, .35); }
.tab-content > .tab-pane { display: none; }
.tab-content > .tab-pane.active { display: block; }

/* ------------------------------------------------------------------ Dropdowns, pagination, list groups */

.dropdown, .btn-group { position: relative; }
.dropdown-menu {
    display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 50; min-width: 200px;
    list-style: none; margin: 0; padding: 6px; background: var(--r-surface); border: 1px solid var(--r-line);
    border-radius: 10px; box-shadow: var(--r-shadow-lg);
}
.dropdown-menu-right { left: auto; right: 0; }
.open > .dropdown-menu { display: block; }
.dropdown-menu > li > a, .dropdown-menu > li > button {
    display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border-radius: 7px;
    color: var(--r-text); font: 500 13px var(--r-font); background: none; border: 0; text-align: left; cursor: pointer;
}
.dropdown-menu > li > a:hover, .dropdown-menu > li > button:hover { background: var(--r-bg); text-decoration: none; color: var(--r-ink); }
.dropdown-menu .divider { height: 1px; background: var(--r-line); margin: 6px 0; }
.dropdown-header { padding: 6px 10px 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--r-faint); }

.pagination { display: inline-flex; gap: 4px; list-style: none; padding: 0; margin: 0; }
.pagination > li > a { display: grid; place-items: center; min-width: 32px; height: 32px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--r-line); color: var(--r-text); font-weight: 600; font-size: 12.5px; background: var(--r-surface); }
.pagination > li > a:hover { text-decoration: none; border-color: var(--r-line-strong); }
.pagination > li.active > a { background: var(--r-red); border-color: var(--r-red); color: #fff; }
.pagination > li.disabled > a { opacity: .4; pointer-events: none; }
.list-group { list-style: none; margin: 0; padding: 0; }
.list-group-item { display: block; padding: 11px 16px; border-bottom: 1px solid var(--r-line); color: var(--r-text); }
.list-group-item:last-child { border-bottom: 0; }

/* Tooltip (title-based, see rocky-admin.js) */
.r-tip { position: fixed; z-index: 100; max-width: 280px; padding: 7px 10px; border-radius: 8px; background: var(--r-ink); color: #fff; font-size: 12px; line-height: 1.45; pointer-events: none; box-shadow: var(--r-shadow-lg); }

/* ------------------------------------------------------------------ Page helpers (from the bundle's .scb namespace) */

.scb-flex { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.scb-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.scb-grow { flex: 1 1 auto; min-width: 0; }
.scb-inline-form { display: inline-block; margin: 0; }
.scb-muted { color: var(--r-muted); }
.scb-small { font-size: 12.5px; }
.scb-mono { font-family: var(--r-mono); font-size: 12.5px; }
.scb-pre { white-space: pre-wrap; word-wrap: break-word; }
.scb-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scb-mb { margin-bottom: 20px; }
.scb-nowrap { white-space: nowrap; }
.panel.panel-white { overflow-x: auto; }

/* Stat tiles, like the Rockinfo "2M+ Platform Users" cards */
.scb-stat { background: var(--r-surface); border: 1px solid var(--r-line); border-radius: var(--r-radius); padding: 18px 20px; margin-bottom: 20px; min-height: 108px; box-shadow: var(--r-shadow); }
.scb-stat .scb-stat-value { font: 800 28px/1.1 var(--r-display); letter-spacing: -.03em; color: var(--r-ink); margin: 0 0 4px; order: -1; }
.scb-stat .scb-stat-label { font-size: 12.5px; font-weight: 600; color: var(--r-ink); }
.scb-stat .scb-stat-sub { font-size: 12px; color: var(--r-muted); margin-top: 6px; }
.scb-stat { display: flex; flex-direction: column; }
.scb-bar { height: 6px; background: var(--r-line); border-radius: 999px; overflow: hidden; }
.scb-bar > span { display: block; height: 100%; background: linear-gradient(90deg, #f04a5d, var(--r-red)); border-radius: 999px; }

/* Transcripts */
.scb-chat { display: flex; flex-direction: column; gap: 12px; }
.scb-turn { display: flex; flex-direction: column; align-items: flex-start; }
.scb-turn.scb-right { align-items: flex-end; }
.scb-turn.scb-center { align-items: center; }
.scb-bubble { border-radius: 14px; padding: 9px 13px; max-width: 80%; white-space: pre-wrap; word-wrap: break-word; font-size: 13.5px; }
.scb-bubble-user { background: var(--r-red); color: #fff; border-bottom-right-radius: 4px; }
.scb-bubble-assistant { background: var(--r-bg); border: 1px solid var(--r-line); border-bottom-left-radius: 4px; }
.scb-bubble-agent { background: var(--r-blue-50); border: 1px solid #cfe0ff; }
.scb-bubble-note { background: var(--r-amber-50); border: 1px dashed #e9c46a; }
.scb-bubble-system { background: none; color: var(--r-muted); font-size: 12px; text-align: center; max-width: 100%; padding: 2px; }
.scb-meta { font-size: 11px; color: var(--r-faint); margin-bottom: 3px; }
.scb-trace { font-size: 12px; }
.scb-trace summary { cursor: pointer; color: var(--r-muted); }

/* Live inbox */
.scb-inbox { display: flex; gap: 20px; }
.scb-inbox > .panel { margin-bottom: 0; display: flex; flex-direction: column; height: calc(100vh - 230px); min-height: 480px; }
.scb-inbox-list { width: 300px; flex: none; }
.scb-inbox-chat { flex: 1; min-width: 0; }
.scb-inbox-side { width: 280px; flex: none; }
.scb-scroll { overflow-y: auto; flex: 1; }
.scb-inbox-item { display: block; padding: 12px 16px; border-bottom: 1px solid var(--r-line); color: inherit; cursor: pointer; text-decoration: none; }
.scb-inbox-item:hover { background: #fcfcfd; text-decoration: none; color: inherit; }
.scb-inbox-item.active { background: var(--r-red-50); box-shadow: inset 3px 0 0 var(--r-red); }
@media (max-width: 1199px) { .scb-inbox > .scb-inbox-side { display: none; } }
@media (max-width: 767px) { .scb-inbox { flex-direction: column; } .scb-inbox > .scb-inbox-list { width: auto; height: auto; min-height: 0; } }

/* Playground */
.scb-pane { height: calc(100vh - 250px); min-height: 460px; display: flex; flex-direction: column; margin-bottom: 0; }
.scb-pane > .panel-body { flex: 1; overflow-y: auto; }

.scb-chart { width: 100%; height: 170px; display: block; }

/* ------------------------------------------------------------------ New pages */

.r-empty { text-align: center; padding: 48px 20px; color: var(--r-muted); }
.r-empty .r-empty-icon { width: 52px; height: 52px; border-radius: 14px; margin: 0 auto 14px; display: grid; place-items: center; background: var(--r-red-50); color: var(--r-red); font-size: 22px; }
.r-empty h3 { margin-bottom: 6px; }
.r-key { font-family: var(--r-mono); font-size: 12.5px; background: var(--r-bg); border: 1px solid var(--r-line); border-radius: 8px; padding: 8px 10px; display: flex; align-items: center; gap: 8px; word-break: break-all; }
.r-key .btn { margin-left: auto; flex: none; }
.r-steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.r-steps > li { position: relative; padding: 0 0 18px 40px; }
.r-steps > li::before { counter-increment: step; content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 0; font: 700 11px var(--r-mono); color: var(--r-faint); border: 1px solid var(--r-line); border-radius: 8px; width: 28px; height: 22px; display: grid; place-items: center; background: var(--r-surface); }
.r-steps > li > b { display: block; color: var(--r-ink); margin-bottom: 4px; }
.r-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.r-tile { display: block; background: var(--r-surface); border: 1px solid var(--r-line); border-radius: var(--r-radius); padding: 18px; color: var(--r-text); box-shadow: var(--r-shadow); transition: border-color .15s, box-shadow .15s, transform .15s; }
.r-tile:hover { text-decoration: none; border-color: var(--r-red-100); box-shadow: var(--r-shadow-lg); transform: translateY(-1px); color: var(--r-text); }
.r-tile h3 { margin: 12px 0 4px; }
.r-tile .r-tile-meta { display: flex; gap: 14px; margin-top: 12px; font-size: 12px; color: var(--r-muted); }
.r-tile .r-tile-meta b { color: var(--r-ink); }
.r-icon-chip { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--r-red); color: #fff; font-size: 15px; box-shadow: 0 4px 10px -3px rgba(220, 30, 53, .5); }
.r-icon-chip.violet { background: var(--r-violet); box-shadow: 0 4px 10px -3px rgba(124, 92, 245, .5); }
.r-icon-chip.blue { background: var(--r-blue); box-shadow: 0 4px 10px -3px rgba(59, 130, 246, .5); }

/* Auth pages */
.r-auth { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; position: relative; overflow: hidden; background: #fff; }
.r-auth::before, .r-auth::after { content: ""; position: absolute; border-radius: 50%; filter: blur(80px); pointer-events: none; }
.r-auth::before { width: 520px; height: 420px; right: -120px; top: -160px; background: #ffdde2; opacity: .8; }
.r-auth::after { width: 520px; height: 420px; left: -160px; bottom: -180px; background: #dfe6ff; opacity: .8; }
.r-auth-card { position: relative; z-index: 1; width: 100%; max-width: 420px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(6px); border: 1px solid var(--r-line); border-radius: 18px; box-shadow: var(--r-shadow-lg); padding: 32px; }
.r-auth-card h1 { font-size: 26px; margin: 18px 0 6px; }
.r-auth-card .r-lead { color: var(--r-muted); margin-bottom: 22px; }
.r-auth-foot { text-align: center; margin-top: 18px; font-size: 12px; color: var(--r-faint); position: relative; z-index: 1; }

/* ------------------------------------------------------------------ Responsive shell */

@media (max-width: 991px) {
    .r-side { transform: translateX(-100%); transition: transform .2s; box-shadow: var(--r-shadow-lg); }
    .r-app.r-nav-open .r-side { transform: none; }
    .r-main { margin-left: 0; }
    .r-mobilebar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--r-surface); border-bottom: 1px solid var(--r-line); position: sticky; top: 0; z-index: 20; }
    .r-mobilebar button { background: none; border: 1px solid var(--r-line); border-radius: 8px; padding: 6px 10px; font-size: 15px; cursor: pointer; color: var(--r-ink); }
    .r-hero { padding: 20px 16px 16px; }
    .r-content { padding: 18px 16px 40px; }
    .r-hero h1 { font-size: 23px; }
}

input[type="color"].form-control { padding: 4px; height: 38px; cursor: pointer; }
input[type="color"].form-control::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"].form-control::-webkit-color-swatch { border: 0; border-radius: 5px; }

/* Wrapper that greys out admin-only bot fields for editors; no visual box of its own. */
fieldset.scb-lock { border: 0; margin: 0; padding: 0; min-width: 0; }

/* Knowledge source versions: what changed */
.scb-change { margin-bottom: 14px; }
.scb-change:last-child { margin-bottom: 0; }
.scb-change-field { font-weight: 600; margin-bottom: 4px; }
.scb-change-values { margin: 0; }
.scb-diff { background: var(--r-surface); color: var(--r-text); border: 1px solid var(--r-line); font-family: var(--r-mono); white-space: pre-wrap; word-break: break-word; max-height: 420px; overflow: auto; padding: 8px; margin: 0; font-size: 12px; }
.scb-diff span { display: block; }
.scb-diff-add { background: var(--r-green-50); color: var(--r-green); }
.scb-diff-del { background: var(--r-red-50); color: var(--r-red-600); text-decoration: line-through; }
.scb-diff-skip { color: var(--r-muted); font-style: italic; }
.scb-faq { padding: 6px 0; border-bottom: 1px solid #eee; }
.scb-faq:last-child { border-bottom: 0; }
