/* Rubix Technology — professional polish for the XAF admin shell.
   Theme-agnostic (works over both Rubix Light and Rubix Dark). Brand palette:
   navy #0F2A47 · blue #2B7CB0 · cyan #5BC2E7 · orange #E18829. */

/* ---------------------------------------------------------------- Logon */
#logon-template-component .logon-main-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
}

/* Branded gradient banner above the sign-in card */
.rbx-logon-header {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, #0f2a47 0%, #2b7cb0 60%, #5bc2e7 100%) !important;
    border: 0 !important;
    border-radius: 14px 14px 0 0;
    padding: 22px 26px !important;
    color: #fff;
}
.rbx-logon-logo {
    width: 52px !important;
    height: 52px !important;
    background-color: #fff !important;          /* white rounded chip behind the mark */
    border-radius: 12px;
    padding: 6px;
    background-clip: padding-box;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}
.rbx-logon-brand { line-height: 1.2; }
.rbx-logon-title { font-size: 1.45rem; font-weight: 800; letter-spacing: .2px; color: #fff; }
.rbx-logon-sub { font-size: .85rem; font-weight: 500; opacity: .85; color: #e8f4fb; letter-spacing: 2px; text-transform: uppercase; }

/* The sign-in card itself: tighter, elevated, professional */
#logon-template-component .logon-main {
    width: min(420px, 92vw);
    border: 0;
    border-radius: 0 0 14px 14px;
    box-shadow: 0 18px 50px rgba(15, 42, 71, .18);
    overflow: hidden;
}
#logon-template-component .logon-main .card-header {
    background: transparent;
    border-bottom: 1px solid rgba(43, 124, 176, .15);
    font-weight: 700;
}
#logon-template-component .middle-text-separator {
    text-align: center;
    color: #6b7d90;
    margin: 14px 0;
    position: relative;
}

/* ---------------------------------------------------------------- Shell */
/* Branded gradient top header spanning the full width (over the menu), matching
   the login screen. The header uses navbar-dark, so child text/icons stay light. */
#main-window-template-component .header {
    background: linear-gradient(135deg, #0f2a47 0%, #2b7cb0 60%, #5bc2e7 100%) !important;
    border-bottom: 0 !important;
    box-shadow: 0 1px 6px rgba(15, 42, 71, .25);
    color: #fff;
}

/* White rounded chip behind the logo so the navy R stays crisp on the gradient */
#main-window-template-component .rbx-shell-logo {
    background-color: #fff;
    border-radius: 9px;
    padding: 4px;
    background-clip: padding-box;
    width: 40px;
    height: 36px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
}

.rbx-shell-brand { line-height: 1.15; display: flex; flex-direction: column; justify-content: center; }
.rbx-shell-title { font-size: 1.05rem; font-weight: 800; color: #fff; letter-spacing: .2px; }
.rbx-shell-sub { font-size: .66rem; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: #d7ecf8; }

/* Keep the current-view caption + header icons legible on the gradient */
#main-window-template-component .header .header-right-side,
#main-window-template-component .header [role="heading"] { color: #fff; }

/* Hide the brand lockup on very narrow screens to avoid crowding */
@media (max-width: 640px) {
    .rbx-shell-brand { display: none; }
}

/* Make the navigation's active item read in the brand color */
.dxbl-navbar .dxbl-active,
.nav-item.active { color: #2b7cb0; }

/* ------------------------------------------------------------- Dashboard */
.rbx-dash { padding: 18px 22px 28px; }
.rbx-dash-welcome { font-size: 1.5rem; font-weight: 800; color: #0f2a47; margin-bottom: 2px; }
.rbx-dash-sub { color: #6b7d90; margin-bottom: 22px; }

.rbx-dash-section {
    font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1.6px;
    color: #2b7cb0; margin: 18px 0 12px; display: flex; align-items: center; gap: 10px;
}
.rbx-dash-section::after { content: ""; flex: 1; height: 1px; background: rgba(43, 124, 176, .18); }

.rbx-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
}

.rbx-card {
    background: #fff;
    border-radius: 14px;
    padding: 18px 18px 16px;
    box-shadow: 0 2px 12px rgba(15, 42, 71, .07);
    border-left: 4px solid #2b7cb0;
    display: flex; flex-direction: column; gap: 6px;
    transition: transform .12s ease, box-shadow .12s ease;
}
.rbx-card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(15, 42, 71, .14); }
.rbx-card-icon { font-size: 1.5rem; line-height: 1; }
.rbx-card-value { font-size: 2rem; font-weight: 800; color: #0f2a47; line-height: 1.05; }
.rbx-card-label { color: #6b7d90; font-size: .82rem; font-weight: 600; }

.rbx-card-navy { border-left-color: #0f2a47; }
.rbx-card-blue { border-left-color: #2b7cb0; }
.rbx-card-cyan { border-left-color: #5bc2e7; }
.rbx-card-orange { border-left-color: #e18829; }
.rbx-card-green { border-left-color: #2e9b6b; }
