:root {
    --riva-gold: #C5A059;
    --riva-gold-dark: #A8863D;
    --riva-gold-light: #F5EFE3;
    --riva-bg: #F9F9F9;
    --riva-white: #FFFFFF;
    --riva-text: #1A1A1A;
    --riva-muted: #6c757d;
    --riva-border: #e8e8e8;
    --riva-radius: 10px;
    --riva-radius-sm: 8px;
    --riva-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --riva-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
    --sidebar-width: 272px;
    --sidebar-collapsed-width: 76px;
    --header-height: 68px;
    --riva-font: 'Montserrat', system-ui, -apple-system, sans-serif;
    --riva-font-serif: 'Cormorant Garamond', Georgia, serif;
}

* {
    box-sizing: border-box;
}

body.riva-panel {
    background: var(--riva-bg);
    color: var(--riva-text);
    font-family: var(--riva-font);
    font-size: 0.9375rem;
    line-height: 1.55;
    overflow-x: hidden;
}

/* ── Sidebar ── */
.riva-sidebar {
    background: var(--riva-white);
    height: 100vh;
    width: var(--sidebar-width);
    position: fixed;
    left: 0;
    top: 0;
    border-right: 1px solid var(--riva-border);
    display: flex;
    flex-direction: column;
    z-index: 1045;
    box-shadow: none;
    transition: width 0.25s ease, transform 0.25s ease;
}

.sidebar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 1.15rem 0.85rem 1rem 1rem;
    border-bottom: 1px solid var(--riva-border);
    flex-shrink: 0;
}

.riva-sidebar .brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    min-width: 0;
    flex: 1;
}

.brand-text {
    font-family: var(--riva-font-serif);
    font-weight: 700;
    font-size: 1.65rem;
    letter-spacing: 0.04em;
    color: var(--riva-gold);
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity 0.2s ease, width 0.2s ease;
}

.brand-text span {
    display: block;
    font-family: var(--riva-font);
    color: var(--riva-muted);
    font-size: 0.58rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    margin-top: 0.2rem;
    text-transform: uppercase;
}

.riva-sidebar .nav-menu {
    flex: 1;
    min-height: 0;
    padding: 0.85rem 0.65rem 0.5rem;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #d0d5de transparent;
}

.sidebar-artwork {
    padding: 1.75rem 0.35rem 0.5rem;
    pointer-events: none;
    user-select: none;
}

.sidebar-skyline-svg {
    width: 100%;
    height: auto;
    display: block;
}

.riva-sidebar .nav-menu::-webkit-scrollbar {
    width: 5px;
}

.riva-sidebar .nav-menu::-webkit-scrollbar-thumb {
    background: #d0d5de;
    border-radius: 99px;
}

.riva-sidebar .nav-section {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 1.1rem 0.85rem 0.45rem;
    margin-top: 0.25rem;
}

.riva-sidebar .nav-section::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--riva-border) 0%, transparent 100%);
}

.riva-sidebar .nav-section-text {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #a0a0a0;
    white-space: nowrap;
    flex-shrink: 0;
}

.riva-sidebar .nav-link-support {
    margin-top: 0.35rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--riva-border);
}

.riva-sidebar .nav-link-item {
    color: #5a5a5a;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.62rem 0.85rem;
    margin-bottom: 0.12rem;
    border-radius: var(--riva-radius-sm);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.18s ease;
    white-space: nowrap;
    position: relative;
}

.riva-sidebar .nav-link-item i {
    font-size: 1.05rem;
    width: 1.3rem;
    text-align: center;
    flex-shrink: 0;
    color: #888;
}

.riva-sidebar .nav-link-item:hover {
    background: var(--riva-gold-light);
    color: var(--riva-gold-dark);
}

.riva-sidebar .nav-link-item:hover i {
    color: var(--riva-gold);
}

.riva-sidebar .nav-link-item.active {
    background: var(--riva-gold-light);
    color: var(--riva-gold);
    font-weight: 600;
    box-shadow: none;
}

.riva-sidebar .nav-link-item.active i {
    color: var(--riva-gold);
}

.riva-sidebar .nav-link-text {
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.2s ease;
}

.riva-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(26, 26, 46, 0.45);
    z-index: 1040;
    backdrop-filter: blur(2px);
}

.riva-sidebar-overlay.show {
    display: block;
}

/* Collapsed sidebar (desktop) */
body.riva-sidebar-collapsed .riva-sidebar {
    width: var(--sidebar-collapsed-width);
}

body.riva-sidebar-collapsed .brand-text,
body.riva-sidebar-collapsed .nav-link-text,
body.riva-sidebar-collapsed .nav-section-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

body.riva-sidebar-collapsed .nav-section {
    padding: 0.5rem 0;
    margin: 0.35rem 0.65rem;
    height: auto;
}

body.riva-sidebar-collapsed .nav-section::after {
    flex: 1;
    height: 1px;
    background: var(--riva-border);
}

body.riva-sidebar-collapsed .nav-section-text {
    display: none;
}

body.riva-sidebar-collapsed .nav-link-item {
    justify-content: center;
    padding-left: 0.65rem;
    padding-right: 0.65rem;
}

body.riva-sidebar-collapsed .sidebar-artwork {
    display: none;
}

body.riva-sidebar-collapsed .riva-main {
    margin-left: var(--sidebar-collapsed-width);
}

body.riva-sidebar-collapsed .riva-sidebar .nav-link-item:hover::after {
    content: attr(title);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--riva-text);
    color: #fff;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
    z-index: 1050;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ── Main layout ── */
.riva-main {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.25s ease;
}

/* ── Header ── */
.riva-header {
    background: var(--riva-white);
    border-bottom: 1px solid var(--riva-border);
    padding: 0 1.5rem;
    height: var(--header-height);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.riva-header-start,
.riva-header-end {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.riva-header-center {
    display: flex;
    justify-content: center;
    min-width: 0;
}

.riva-header-start {
    min-width: 0;
}

.riva-header-end {
    justify-content: flex-end;
}

.riva-icon-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--riva-border);
    border-radius: var(--riva-radius-sm);
    background: #fff;
    color: #4a4f63;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.18s ease;
    padding: 0;
}

.riva-icon-btn:hover {
    background: var(--riva-gold-light);
    border-color: rgba(197, 160, 89, 0.35);
    color: var(--riva-gold-dark);
}

.riva-header .search-box {
    position: relative;
    width: 100%;
    max-width: 480px;
}

.riva-header .search-box .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--riva-muted);
    font-size: 0.9rem;
    pointer-events: none;
}

.riva-header .search-box input {
    border-radius: 999px;
    border: 1px solid var(--riva-border);
    padding: 0.6rem 1rem 0.6rem 2.6rem;
    width: 100%;
    background: var(--riva-white);
    font-size: 0.875rem;
    font-family: var(--riva-font);
    transition: all 0.18s ease;
}

.riva-header .search-box input:focus {
    background: #fff;
    border-color: var(--riva-gold);
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.12);
    outline: none;
}

.riva-notify-btn {
    position: relative;
}

.notify-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--riva-gold);
    color: #fff;
    border-radius: 999px;
    border: 2px solid #fff;
    font-size: 0.65rem;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.riva-notify-btn.has-unread .notify-badge {
    display: flex;
}

.notify-dot {
    display: none;
}

/* Profile dropdown */
.riva-profile-dropdown .dropdown-menu {
    margin-top: 0.5rem !important;
}

.riva-profile-trigger {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    border: 1px solid var(--riva-border);
    border-radius: 999px;
    background: #fff;
    padding: 0.3rem 0.65rem 0.3rem 0.3rem;
    cursor: pointer;
    transition: all 0.18s ease;
}

.riva-profile-trigger:hover,
.riva-profile-trigger.show {
    border-color: rgba(197, 160, 89, 0.4);
    background: #fdfcf9;
}

.riva-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--riva-gold), #e8c56a);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(197, 160, 89, 0.3);
}

.riva-profile-meta {
    text-align: left;
    line-height: 1.25;
}

.riva-profile-name {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--riva-text);
}

.riva-profile-role {
    display: block;
    font-size: 0.72rem;
    color: var(--riva-muted);
}

.riva-profile-chevron {
    font-size: 0.7rem;
    color: var(--riva-muted);
    margin-left: 0.15rem;
}

.riva-dropdown-menu {
    border: 1px solid var(--riva-border);
    border-radius: var(--riva-radius);
    box-shadow: var(--riva-shadow-lg);
    padding: 0.5rem;
    min-width: 210px;
}

.riva-dropdown-menu .dropdown-item {
    border-radius: 8px;
    padding: 0.55rem 0.75rem;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.riva-dropdown-menu .dropdown-item i {
    width: 1rem;
    opacity: 0.75;
}

.riva-dropdown-menu .dropdown-item:hover {
    background: var(--riva-gold-light);
    color: var(--riva-gold-dark);
}

.riva-dropdown-menu .dropdown-item.text-danger:hover {
    background: #fde8ea;
    color: #c0392b !important;
}

/* Notifications offcanvas */
.riva-notifications-panel {
    width: min(400px, 100vw);
    border-left: 1px solid var(--riva-border);
}

.riva-notifications-panel .offcanvas-header {
    padding: 1.25rem 1.35rem;
    border-bottom: 1px solid var(--riva-border);
}

.riva-notifications-panel .offcanvas-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.riva-offcanvas-subtitle {
    font-size: 0.82rem;
    color: var(--riva-muted);
}

.riva-notify-filters {
    display: flex;
    gap: 0.5rem;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--riva-border);
    overflow-x: auto;
}

.riva-notify-filter {
    border: 1px solid var(--riva-border);
    background: #fff;
    border-radius: 999px;
    padding: 0.3rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--riva-muted);
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.18s ease;
}

.riva-notify-filter.active,
.riva-notify-filter:hover {
    background: var(--riva-gold-light);
    border-color: rgba(197, 160, 89, 0.35);
    color: var(--riva-gold-dark);
}

.riva-notify-list {
    max-height: calc(100vh - 180px);
    overflow-y: auto;
}

.riva-notify-item {
    display: flex;
    gap: 0.85rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--riva-border);
    transition: background 0.15s ease;
}

.riva-notify-item:hover {
    background: #fafbfc;
}

.riva-notify-item.unread {
    background: rgba(197, 160, 89, 0.04);
}

.riva-notify-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.riva-notify-icon.success { background: #d1e7dd; color: #0f5132; }
.riva-notify-icon.danger { background: #f8d7da; color: #842029; }
.riva-notify-icon.info { background: #cff4fc; color: #055160; }

.riva-notify-title {
    font-weight: 600;
    font-size: 0.88rem;
    margin: 0 0 0.2rem;
}

.riva-notify-text {
    font-size: 0.84rem;
    color: var(--riva-muted);
    margin: 0 0 0.35rem;
    line-height: 1.45;
}

.riva-notify-time {
    font-size: 0.72rem;
    color: #9aa3b2;
}

.riva-notify-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--riva-muted);
}

.riva-notify-empty-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #f0f2f7;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.4rem;
    color: #b0b8c4;
}

.riva-notify-empty h6 {
    font-weight: 700;
    color: var(--riva-text);
    margin-bottom: 0.35rem;
}

.riva-notify-empty p {
    font-size: 0.85rem;
    margin: 0;
}

/* ── Content area ── */
.riva-content {
    padding: 1.5rem 1.75rem 2.5rem;
    flex: 1;
    max-width: 1600px;
    width: 100%;
}

.riva-alert {
    border-radius: var(--riva-radius);
    border: none;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

/* Page header */
.page-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-header-main {
    min-width: 0;
}

.page-header-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--riva-gold-dark);
    background: var(--riva-gold-light);
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    margin-bottom: 0.4rem;
}

.page-header .page-title,
.page-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
    color: var(--riva-text);
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.page-header .page-subtitle,
.page-subtitle {
    color: var(--riva-muted);
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
}

.page-header .page-meta,
.page-meta {
    color: var(--riva-gold);
    margin: 0.25rem 0 0;
    font-size: 0.85rem;
    font-weight: 600;
}

.tool-resource-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--riva-text);
    margin-bottom: 0.5rem;
}

.brand-logo {
    max-height: 42px;
    max-width: 160px;
    width: auto;
    object-fit: contain;
}

.auth-brand-logo {
    max-height: 56px;
    max-width: 200px;
    width: auto;
    object-fit: contain;
}

.brand-logo-preview {
    max-height: 48px;
    max-width: 180px;
    object-fit: contain;
}

.favicon-preview {
    max-height: 32px;
    max-width: 32px;
    object-fit: contain;
}

.page-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

/* Cards */
.riva-card {
    background: var(--riva-white);
    border-radius: var(--riva-radius);
    border: 1px solid var(--riva-border);
    box-shadow: var(--riva-shadow);
    padding: 1.35rem 1.5rem;
    height: 100%;
}

.riva-card + .riva-card {
    margin-top: 1.25rem;
}

.riva-card-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.15rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--riva-border);
}

.riva-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    color: var(--riva-text);
}

.riva-card-subtitle {
    font-size: 0.82rem;
    color: var(--riva-muted);
    margin: 0.2rem 0 0;
}

.riva-card.p-0 {
    padding: 0;
    overflow: hidden;
}

.riva-card.p-0 .table-riva thead th:first-child,
.riva-card.p-0 .table-riva tbody td:first-child {
    padding-left: 1.5rem;
}

.riva-card.p-0 .table-riva thead th:last-child,
.riva-card.p-0 .table-riva tbody td:last-child {
    padding-right: 1.5rem;
}

.riva-card.p-0 .pagination {
    padding: 0 1.5rem 1.25rem;
    margin-bottom: 0;
}

.filter-card {
    margin-bottom: 1.25rem;
}

.filter-card .form-label {
    margin-bottom: 0.3rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: box-shadow 0.2s ease;
}

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

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 50%;
    background: var(--riva-gold-light);
    color: var(--riva-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.stat-card .stat-body {
    min-width: 0;
}

.stat-label {
    color: var(--riva-muted);
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.2rem;
    text-transform: none;
    letter-spacing: 0;
}

.stat-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--riva-text);
    line-height: 1.2;
}

.tier-progress-card .tier-badge-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
}

.tier-progress-card .tier-badge-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--riva-gold-light);
    color: var(--riva-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.tier-progress-card .tier-badge-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--riva-text);
}

.tier-progress-card .progress-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
}

.tier-progress-card .progress-percent {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--riva-text);
}

.tier-progress-card .progress-values {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.8rem;
}

.tier-progress-card .progress-values .current {
    color: var(--riva-gold);
    font-weight: 600;
}

.tier-progress-card .progress-values .remaining {
    color: var(--riva-muted);
}

.welcome-card,
.tier-progress-card {
    background: var(--riva-white);
    border: 1px solid var(--riva-border);
}

.package-gold {
    color: var(--riva-gold);
    font-weight: 700;
}

/* Buttons */
.btn-riva {
    background: var(--riva-gold);
    border-color: var(--riva-gold);
    color: #fff;
    border-radius: 6px;
    padding: 0.55rem 1.25rem;
    font-weight: 600;
    font-size: 0.875rem;
    font-family: var(--riva-font);
    transition: all 0.18s ease;
}

.btn-riva:hover,
.btn-riva:focus {
    background: var(--riva-gold-dark);
    border-color: var(--riva-gold-dark);
    color: #fff;
    box-shadow: 0 4px 12px rgba(197, 160, 89, 0.3);
}

.btn-riva-outline {
    background: transparent;
    border: 1px solid var(--riva-gold);
    color: var(--riva-gold-dark);
    border-radius: 6px;
    padding: 0.5rem 1.15rem;
    font-weight: 600;
}

.btn-riva-outline:hover {
    background: var(--riva-gold-light);
    color: var(--riva-gold-dark);
}

.btn-riva-block {
    display: block;
    width: 100%;
    text-align: center;
}

.progress-riva {
    height: 6px;
    border-radius: 999px;
    background: #E8E8E8;
}

.progress-riva .progress-bar {
    background: var(--riva-gold);
    border-radius: 999px;
}

/* Tables */
.table-riva {
    margin-bottom: 0;
}

.table-riva thead th {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--riva-muted);
    border-bottom-width: 1px;
    background: #f8f9fb;
    font-weight: 600;
    padding: 0.9rem 1rem;
    white-space: nowrap;
}

.table-riva tbody td {
    padding: 0.9rem 1rem;
    vertical-align: middle;
    border-color: var(--riva-border);
    font-size: 0.9rem;
}

.table-riva tbody tr {
    transition: background 0.12s ease;
}

.table-riva tbody tr:hover {
    background: #FAFAFA;
}

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

.table-riva .table-empty td {
    text-align: center;
    color: var(--riva-muted);
    padding: 2.5rem 1rem;
}

/* Badges */
.badge-riva {
    background: var(--riva-gold-light);
    color: var(--riva-gold-dark);
    font-weight: 600;
    padding: 0.35em 0.7em;
    border-radius: 6px;
    font-size: 0.75rem;
}

.badge-status-success { background: #E8F5E9; color: #2E7D32; font-weight: 500; font-size: 0.75rem; border-radius: 6px; }
.badge-status-warning { background: #FFF3E0; color: #E65100; font-weight: 500; font-size: 0.75rem; border-radius: 6px; }
.badge-status-danger { background: #FFEBEE; color: #C62828; font-weight: 500; font-size: 0.75rem; border-radius: 6px; }
.badge-status-orange { background: #FFF3E0; color: #E65100; font-weight: 500; font-size: 0.75rem; border-radius: 6px; }
.badge-status-info { background: #E3F2FD; color: #1565C0; font-weight: 500; font-size: 0.75rem; border-radius: 6px; }
.badge-status-plain { background: transparent; color: #2E7D32; font-weight: 500; font-size: 0.75rem; padding: 0; }

/* Detail grid */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem 1.5rem;
}

.detail-item dt {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--riva-muted);
    margin-bottom: 0.2rem;
    font-weight: 600;
}

.detail-item dd {
    margin: 0;
    font-weight: 500;
    font-size: 0.92rem;
}

/* Forms */
.form-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--riva-text);
    margin: 1.5rem 0 0.85rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--riva-border);
}

.form-section-title:first-child {
    margin-top: 0;
}

.form-control, .form-select {
    border-radius: var(--riva-radius-sm);
    border: 1px solid var(--riva-border);
    padding: 0.58rem 0.85rem;
    font-size: 0.9rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--riva-gold);
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.12);
}

.form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #3d4251;
    margin-bottom: 0.35rem;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--riva-border);
}

.alert {
    border-radius: var(--riva-radius);
    border: none;
}

/* Stacked cards in a dashboard column */
.dashboard-stack {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 100%;
}

.dashboard-stack > .riva-card {
    height: auto;
}

.dashboard-stack > .riva-card + .riva-card {
    margin-top: 0;
}

/* Dashboard section grouping */
.dashboard-section-title {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--riva-muted);
    margin: 0 0 0.85rem;
}

.dashboard-section + .dashboard-section {
    margin-top: 0.25rem;
}

/* Card header with action link */
.riva-card-header-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--riva-border);
}

.riva-card-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 1.35rem 1.5rem 1rem;
}

.riva-card-header-inline .riva-card-title {
    margin: 0;
}

.riva-card-header-inline .card-header-icon {
    color: var(--riva-gold);
    font-size: 1.1rem;
}

.riva-card-link {
    color: var(--riva-gold);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.riva-card-link:hover {
    color: var(--riva-gold-dark);
    text-decoration: underline;
}

/* Summary key-value rows */
.summary-kv {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem 0;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--riva-border);
}

.summary-kv.border-0 {
    border-bottom: none;
}

.summary-kv:last-child,
.summary-kv:last-of-type {
    border-bottom: none;
}

.summary-kv .kv-label {
    color: var(--riva-muted);
}

.summary-kv .kv-value {
    font-weight: 600;
    color: var(--riva-text);
}

.summary-kv .kv-value.text-success {
    color: #2E7D32;
}

/* Announcements */
.announcement-item {
    position: relative;
    padding: 0.55rem 0 0.55rem 0.95rem;
    border-bottom: 1px solid var(--riva-border);
}

.announcement-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.announcement-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.95rem;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--riva-gold);
}

.announcement-title {
    font-size: 0.84rem;
    color: var(--riva-text);
    line-height: 1.45;
    margin: 0;
}

.announcement-date {
    display: block;
    font-size: 0.72rem;
    color: var(--riva-muted);
    margin-top: 0.15rem;
}

/* Auth */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--riva-bg);
    padding: 2rem;
    font-family: var(--riva-font);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--riva-white);
    border-radius: var(--riva-radius);
    border: 1px solid var(--riva-border);
    box-shadow: var(--riva-shadow-lg);
    padding: 2rem;
}

.auth-brand {
    text-align: center;
    margin-bottom: 1.5rem;
    font-family: var(--riva-font-serif);
    font-weight: 700;
    font-size: 1.75rem;
    letter-spacing: 0.04em;
    color: var(--riva-gold);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--riva-muted);
}

.empty-state i {
    font-size: 2rem;
    opacity: 0.35;
    margin-bottom: 0.75rem;
}

/* Links */
.action-link {
    color: var(--riva-gold-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.86rem;
    transition: color 0.15s ease;
}

.action-link:hover {
    color: var(--riva-gold);
    text-decoration: underline;
}

/* List items in cards */
.riva-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--riva-border);
    gap: 1rem;
}

.riva-list-item:last-child {
    border-bottom: none;
}

/* Support messages */
.message-thread .message-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--riva-border);
}

.message-thread .message-item:last-child {
    border-bottom: none;
}

.message-meta {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.5rem;
}

.message-author {
    font-weight: 600;
    font-size: 0.9rem;
}

.message-time {
    font-size: 0.78rem;
    color: var(--riva-muted);
}

/* Pagination */
.pagination {
    gap: 0.25rem;
}

.pagination .page-link {
    border-radius: 8px;
    border-color: var(--riva-border);
    color: var(--riva-text);
    font-size: 0.85rem;
    padding: 0.4rem 0.7rem;
}

.pagination .page-item.active .page-link {
    background: var(--riva-gold);
    border-color: var(--riva-gold);
}

.pagination .page-link:hover {
    background: var(--riva-gold-light);
    border-color: rgba(197, 160, 89, 0.3);
    color: var(--riva-gold-dark);
}

/* Responsive */
@media (max-width: 991.98px) {
    .riva-header {
        grid-template-columns: auto 1fr;
    }

    .riva-header-center {
        display: none !important;
    }

    .riva-sidebar {
        transform: translateX(-100%);
    }

    .riva-sidebar.show {
        transform: translateX(0);
    }

    .riva-main {
        margin-left: 0;
    }

    body.riva-sidebar-collapsed .riva-main {
        margin-left: 0;
    }

    .riva-header {
        padding: 0 1rem;
    }

    .riva-content {
        padding: 1rem;
    }

    .page-header .page-title,
    .page-title {
        font-size: 1.35rem;
    }
}

@media (max-width: 575.98px) {
    .riva-profile-trigger {
        padding-right: 0.35rem;
    }

    .page-header-actions {
        width: 100%;
    }

    .page-header-actions .btn {
        flex: 1;
    }
}
