/**
 * MRPDA Core stylesheet
 * Implements mobile-first app aesthetics and premium desktop admin layout.
 * Follows clean typography, light blue active menu highlights, and card layouts.
 * Optimized for Noto Sans Myanmar font loaded locally to prevent overlapping.
 */

/* =========================================================
   LOCAL FONT-FACE DEFINITIONS (NOTO SANS MYANMAR)
   ========================================================= */
@font-face {
    font-family: 'Noto Sans Myanmar';
    src: url('../fonts/NotoSansMyanmar-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Noto Sans Myanmar';
    src: url('../fonts/NotoSansMyanmar-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

:root {
    --primary-color: #156DB5;
    --secondary-color: #D8A328;
    --primary-rgb: 21, 109, 181;
    --secondary-rgb: 216, 163, 40;
    --primary-deep: #0D4F88;
    --secondary-deep: #B8881E;
    --ink-strong: #172033;
    --ink-muted: #5B6475;
    --surface-base: #F4F5F0;
    --surface-soft: #FCFCF8;
    --surface-panel: rgba(255, 255, 255, 0.84);
    --line-soft: rgba(148, 163, 184, 0.18);
    --line-strong: rgba(148, 163, 184, 0.26);
    --shadow-soft: 0 18px 48px rgba(15, 23, 42, 0.08);
    --shadow-card: 0 10px 30px rgba(15, 23, 42, 0.06);
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

/* =========================================================
   GLOBAL RESET & TYPOGRAPHY STYLE (Student Management System Reference)
   ========================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans Myanmar', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--ink-muted);
    background:
        radial-gradient(circle at top left, rgba(var(--secondary-rgb), 0.14), transparent 24%),
        radial-gradient(circle at top right, rgba(var(--primary-rgb), 0.10), transparent 22%),
        linear-gradient(180deg, #FCFCF8 0%, #F5F8FC 48%, #EDF3F9 100%);
    line-height: 1.5;
    font-size: 14px;
    min-height: 100vh;
}

p, li, a, button, .btn, .nav-link, .dropdown-item, .badge, .small, .form-control, .form-select, .card, .table, .alert {
    overflow-wrap: anywhere;
    word-break: normal;
}

.btn, .nav-link, .dropdown-item, .badge, .form-label, .metric-label, .metric-footnote, .panel-topline, .section-title, .hero-kicker, .hero-subtext, .page-context-title, .page-context-text {
    line-height: 1.35;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--ink-strong);
    font-weight: 600;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease-in-out;
}

img {
    max-width: 100%;
}

::selection {
    background: rgba(var(--primary-rgb), 0.16);
    color: #08233A;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #F1F3F5;
}
::-webkit-scrollbar-thumb {
    background: #D0D5DD;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #98A2B3;
}

/* =========================================================
   MYANMAR UNICODE OVERLAPPING PROTECTION RULES
   ========================================================= */
html[lang="mm"] body {
    font-family: 'Noto Sans Myanmar', sans-serif;
    line-height: 1.7;
}

html[lang="mm"] h1, 
html[lang="mm"] h2, 
html[lang="mm"] h3, 
html[lang="mm"] h4, 
html[lang="mm"] h5, 
html[lang="mm"] h6,
html[lang="mm"] .display-4,
html[lang="mm"] .navbar-brand {
    line-height: 1.6 !important;
    letter-spacing: normal !important;
    padding-bottom: 4px;
}

/* =========================================================
   MEMBER MOBILE-FIRST WEB APP WRAPPER LAYOUT
   ========================================================= */
.member-body {
    background-color: #E2E8F0; /* Centered background wrapper color */
}

.admin-body,
.member-body {
    color: var(--ink-muted);
}

/* Centered Mobile screen simulator on Desktop, Full-width on mobile */
.mobile-app-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 10px 0;
}

.mobile-app-container {
    width: 100%;
    max-width: 480px; /* Centered device simulator size */
    height: 92vh;
    background-color: #FFFFFF;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

@media (max-width: 576px) {
    .mobile-app-wrapper {
        padding: 0;
    }
    .mobile-app-container {
        height: 100vh;
        border-radius: 0;
        border: none;
    }
}

/* Mobile Scrollable Core Content Area */
.mobile-main-content {
    flex-grow: 1;
    overflow-y: auto;
    padding-bottom: 80px !important; /* Spacing for fixed Bottom Nav */
    background: #F8FAFC;
}

/* Mobile Header style */
.mobile-header {
    height: 56px;
    background: #FFFFFF;
    border-bottom: 1px solid #E2E8F0;
    z-index: 100;
}

/* =========================================================
   MOBILE BOTTOM NAVIGATION & FLOATING ACTION BUTTON (FAB)
   ========================================================= */
.mobile-bottom-nav {
    height: 65px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #FFFFFF;
    border-top: 1px solid #E2E8F0;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.03);
    z-index: 1010;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    padding: 0 8px;
}

.mobile-bottom-nav .nav-cluster {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
    flex: 1 1 0;
    min-width: 0;
}

.mobile-bottom-nav .nav-cluster-left {
    padding-right: 34px;
}

.mobile-bottom-nav .nav-cluster-right {
    padding-left: 34px;
}

.mobile-bottom-nav .nav-item {
    font-size: 9px;
    font-weight: 600;
    line-height: 1.08;
    color: #94A3B8; /* Muted gray for inactive items */
    transition: color 0.2s ease;
    min-width: 0;
    width: 100%;
    text-align: center;
    justify-content: center;
    padding: 8px 0 6px;
}

.mobile-bottom-nav .nav-item i {
    font-size: 16px;
    margin-bottom: 2px;
}

.mobile-bottom-nav .nav-item span {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-bottom-nav .nav-item.active {
    color: var(--primary-color) !important;
}

/* FAB design */
.fab-wrapper {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: -20px;
    width: 60px;
    height: 60px;
    z-index: 3;
}

.fab-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-deep) 100%);
    border: 4px solid #FFFFFF;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(var(--primary-rgb), 0.28);
}

/* =========================================================
   PREMIUM CARD & TABLE DESIGN SYSTEM
   ========================================================= */
.card-premium {
    background: #FFFFFF;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02), 0 2px 8px rgba(0, 0, 0, 0.01);
    margin-bottom: 20px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-premium:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.02);
}

.card-header-premium {
    background: #FFFFFF;
    border-bottom: 1px solid #EDF2F7;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-body-premium {
    padding: 24px;
}

.chart-panel-body {
    height: auto;
    min-height: 360px;
    padding: 6px 0 0;
    display: flex;
    align-items: stretch;
    flex: 1 1 auto;
}

.chart-fill-canvas {
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    min-height: 340px !important;
    flex: 1 1 auto;
}

.chart-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chart-panel .card-body-premium,
.chart-panel .chart-panel-body {
    flex: 1 1 auto;
}

/* Custom Table Styles */
.table thead th {
    background-color: #F8FAFC !important;
    color: #475569 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 14px 16px !important;
    border-bottom: 1px solid #E2E8F0 !important;
}

.table tbody td {
    padding: 14px 16px !important;
    border-bottom: 1px solid #F1F5F9 !important;
    color: #475569 !important;
}

.table tbody tr {
    transition: background-color 0.15s ease-in-out;
}

.table tbody tr:hover {
    background-color: #F8FAFC !important;
}

/* Gradient balance card (Ruby red / Royal blue depending on preferences) */
.balance-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-deep) 100%);
    color: #FFFFFF;
    border-radius: 18px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.2);
}

.balance-card::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

/* EXACT 4 COLOR THEMED SUMMARY CARDS FROM KPI TRACKER REFERENCE */
.summary-card-purple {
    background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%) !important;
    color: #FFFFFF;
    border-radius: 16px;
    padding: 24px !important;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.15);
    border: none;
    position: relative;
    overflow: hidden;
}

.summary-card-teal {
    background: linear-gradient(135deg, #0EA5E9 0%, #0284C7 100%) !important;
    color: #FFFFFF;
    border-radius: 16px;
    padding: 24px !important;
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.15);
    border: none;
    position: relative;
    overflow: hidden;
}

.summary-card-green {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%) !important;
    color: #FFFFFF;
    border-radius: 16px;
    padding: 24px !important;
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.15);
    border: none;
    position: relative;
    overflow: hidden;
}

.summary-card-orange {
    background: linear-gradient(135deg, #F43F5E 0%, #E11D48 100%) !important;
    color: #FFFFFF;
    border-radius: 16px;
    padding: 24px !important;
    box-shadow: 0 8px 20px rgba(225, 29, 72, 0.15);
    border: none;
    position: relative;
    overflow: hidden;
}

/* =========================================================
   DESKTOP ADMIN SYSTEM LAYOUT
   ========================================================= */
.admin-body {
    background:
        linear-gradient(135deg, rgba(var(--primary-rgb), 0.05), transparent 24%),
        linear-gradient(180deg, #FBFAF7 0%, #EEF2F7 100%);
}

.admin-layout-wrapper {
    min-height: 100vh;
}

.admin-main-wrapper {
    min-width: 0;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.8), transparent 55%),
        transparent;
}

.admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 252px;
    min-width: 252px;
    flex: 0 0 252px;
    overflow-y: auto;
    background:
        linear-gradient(180deg, #10253D 0%, #123B5D 42%, #165987 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 4px 0 30px rgba(15, 23, 42, 0.12);
}

.admin-sidebar .accordion {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-brand {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0));
}

.sidebar-brand-text {
    color: #FFFFFF !important;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.sidebar-brand-text i {
    color: var(--primary-color) !important;
}

/* LEFT SIDEBAR NAVIGATION HIGHLIGHT RULES (KPI Tracker Layout style) */
.admin-sidebar .nav-link {
    font-size: 13px;
    font-weight: 500;
    color: #94A3B8 !important; /* Slate 400 */
    padding: 10px 14px !important;
    border-radius: 10px !important;
    margin-bottom: 2px;
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    transition: all 0.15s ease-in-out;
}

.admin-sidebar .nav-link > i:first-child,
.admin-sidebar .nav-link .sidebar-link-main > i:first-child {
    width: 18px;
    min-width: 18px;
    flex: 0 0 18px;
    text-align: center;
}

.admin-sidebar .nav-link .sidebar-link-main {
    min-width: 0;
    flex: 1 1 auto;
}

.admin-sidebar .nav-link span {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.2;
    white-space: nowrap;
}

.admin-sidebar .nav-link .menu-label {
    display: block;
}

.admin-sidebar .nav-link i {
    color: #64748B !important; /* Slate 500 */
    transition: all 0.15s ease-in-out;
}

.admin-sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.04) !important;
    color: #F1F5F9 !important; /* Slate 100 */
}

.admin-sidebar .nav-link:hover i {
    color: #F1F5F9 !important;
}

/* Active sidebar item */
.admin-sidebar .nav-link.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-deep) 100%) !important;
    color: #FFFFFF !important;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.25);
}

.admin-sidebar .nav-link.active i {
    color: #FFFFFF !important;
}

.sidebar-user-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(var(--secondary-rgb), 0.16);
    border-radius: 18px;
    padding: 14px 16px;
    color: #E2E8F0;
    backdrop-filter: blur(8px);
}

.sidebar-user-card .user-name {
    color: #FFFFFF;
    font-weight: 700;
    font-size: 13px;
}

.sidebar-user-card .user-role {
    color: #94A3B8;
    font-size: 11px;
}

.sidebar-section-header {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 16px;
    padding-top: 16px;
}

.sidebar-section-header span {
    color: #475569 !important; /* Slate 600 text for header */
}

.sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 18px !important;
    background-color: rgba(0, 0, 0, 0.12);
}

.btn-logout {
    background-color: transparent;
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #EF4444 !important;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.15s ease-in-out;
}

.btn-logout:hover {
    background-color: #EF4444;
    color: #FFFFFF !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

/* Top Admin Header */
.admin-header {
    min-height: 60px;
    z-index: 99;
    background: rgba(255, 255, 255, 0.78) !important;
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9) !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

.page-context-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--primary-color);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.page-context-chip i {
    font-size: 12px;
}

.page-context-chip {
    display: none !important;
}

.admin-header-title h5,
.admin-header-title h6 {
    font-size: 1.02rem;
}

.admin-header-title .small {
    font-size: 11.5px;
}

.admin-header-profile .btn.rounded-circle,
.member-main-container .btn.rounded-circle {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(203, 213, 225, 0.8) !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

/* =========================================================
   LIST VIEW & BADGES & FORM ELEMENTS
   ========================================================= */
.list-item-custom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #EDF2F7;
}

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

/* Status Badges */
.badge-pending {
    background-color: #FEF9C3 !important;
    color: #A16207 !important;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
}
.badge-active {
    background-color: #DCFCE7 !important;
    color: #15803D !important;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
}
.badge-expired {
    background-color: #FEE2E2 !important;
    color: #B91C1C !important;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
}

/* Form Styles */
.form-control-premium, .form-select-premium {
    border: 1px solid #E2E8F0 !important;
    background-color: #F8FAFC !important;
    border-radius: 10px !important;
    padding: 10px 14px !important;
    font-size: 13.5px !important;
    transition: all 0.15s ease-in-out !important;
    color: #334155 !important;
}

.form-control-premium:focus, .form-select-premium:focus {
    border-color: var(--primary-color) !important;
    background-color: #FFFFFF !important;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.12) !important;
    outline: none !important;
}

.position-relative .fa-magnifying-glass + .form-control-premium {
    padding-left: 38px !important;
}

.btn {
    border-radius: 12px !important;
}

.btn-danger,
.btn-primary {
    box-shadow: 0 10px 22px rgba(var(--primary-rgb), 0.16);
}

.alert {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 16px !important;
    box-shadow: var(--shadow-card);
}

/* Quick Action Circle Buttons in Mobile View */
.quick-action-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    transition: transform 0.2s ease;
}

.quick-action-circle:hover {
    transform: scale(1.05);
}

/* Friend chat bubble styling */
.chat-bubble-received {
    background-color: #F1F5F9;
    border-radius: 12px 12px 12px 0px;
    max-width: 80%;
    padding: 10px 14px;
    margin-bottom: 10px;
    align-self: flex-start;
}

.chat-bubble-sent {
    background-color: var(--primary-color);
    color: #FFFFFF;
    border-radius: 12px 12px 0px 12px;
    max-width: 80%;
    padding: 10px 14px;
    margin-bottom: 10px;
    align-self: flex-end;
}

/* =========================================================
   RESPONSIVE MEMBER SYSTEM LAYOUT RULES
   ========================================================= */
.member-layout-wrapper {
    width: 100%;
    min-height: 100vh;
}

.member-sidebar-wrapper {
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 1020;
}

.member-main-container {
    min-height: 100vh;
}

.member-mobile-simulator-wrapper {
    width: 100%;
}

@media (min-width: 992px) {
    .member-body {
        background-color: #F8FAFC !important;
    }
    
    .member-layout-wrapper {
        display: flex;
    }
    
    .member-main-container {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        background-color: #F8FAFC;
    }
    
    .member-mobile-simulator-wrapper {
        display: block;
    }
    
    .member-mobile-simulator-container {
        width: 100%;
        height: auto;
        border-radius: 0;
        border: none;
        box-shadow: none;
        background-color: transparent;
        display: block;
        overflow: visible;
        position: static;
    }
    
    .member-content-area {
        padding: 24px !important;
        background: linear-gradient(180deg, rgba(255,255,255,0.38), transparent);
        overflow-y: visible;
    }
}

@media (max-width: 991px) {
    .member-body {
        background-color: #E2E8F0 !important;
    }
    
    .member-layout-wrapper {
        display: block;
    }
    
    .member-main-container {
        display: block;
    }
    
    .member-mobile-simulator-wrapper {
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: 100vh;
        padding: 12px 0;
    }
    
    .member-mobile-simulator-container {
        width: 100%;
        max-width: 480px;
        height: 92vh;
        background:
            linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.98));
        border-radius: 24px;
        box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
        overflow: hidden;
        display: flex;
        flex-direction: column;
        position: relative;
        border: 1px solid rgba(226, 232, 240, 0.9);
    }
    
    .member-content-area {
        flex-grow: 1;
        overflow-y: auto;
        padding: 14px !important;
        padding-bottom: 80px !important;
        background: #F8FAFC;
    }
}

@media (max-width: 576px) {
    .member-body {
        background-color: #FFFFFF !important;
    }
    
    .member-mobile-simulator-wrapper {
        padding: 0;
    }
    
    .member-mobile-simulator-container {
        height: 100vh;
        border-radius: 0;
        border: none;
        box-shadow: none;
    }
}

/* =========================================================
   RESPONSIVE ADMIN SYSTEM LAYOUT RULES
   ========================================================= */
@media (max-width: 991px) {
    .admin-sidebar {
        position: fixed;
        left: -252px;
        top: 0;
        bottom: 0;
        z-index: 1050;
        transition: left 0.3s ease;
        box-shadow: 0 0 15px rgba(0,0,0,0.1);
    }
    
    .admin-sidebar.active {
        left: 0;
    }
    
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.4);
        z-index: 1040;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
}

/* =========================================================
   SIDEBAR ACCORDION CATEGORIES & ENTERPRISE MODULE CHEVRONS
   ========================================================= */
.admin-sidebar .sidebar-category-header {
    font-size: 11px;
    font-weight: 700;
    color: #64748B; /* Slate 500 */
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 10px 12px 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: color 0.15s ease;
    user-select: none;
}

.admin-sidebar .sidebar-category-header:hover {
    color: #F1F5F9; /* Slate 100 */
}

.admin-sidebar .sidebar-category-header i.chevron-icon {
    font-size: 10px;
    flex: 0 0 auto;
    margin-left: 10px;
    transition: transform 0.2s ease;
}

.admin-sidebar .sidebar-category-header[aria-expanded="true"] i.chevron-icon {
    transform: rotate(90deg);
}

.admin-sidebar .submenu-list {
    list-style: none;
    padding-left: 8px;
    margin-bottom: 2px;
    transition: all 0.2s ease;
}

.admin-sidebar .submenu-list .nav-link {
    font-size: 12.8px;
    padding: 10px 14px !important;
}

.admin-sidebar .accordion .nav-link {
    margin-bottom: 0;
}

.admin-sidebar .accordion-item + .accordion-item {
    margin-top: -2px;
}

/* =========================================================
   NOTIFICATION BELL STYLING
   ========================================================= */
.noti-bell-btn {
    position: relative;
    color: #64748B;
    background: transparent;
    border: none;
    font-size: 20px;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.15s ease;
}

.noti-bell-btn:hover {
    background-color: #F1F5F9;
    color: #0F172A;
}

.noti-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    font-size: 10px;
    font-weight: 700;
    color: #FFFFFF;
    background-color: #EF4444; /* Tailwind Red 500 */
    border: 2px solid #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.noti-dropdown-menu {
    width: 320px;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.noti-item {
    padding: 12px 16px;
    border-bottom: 1px solid #F1F5F9;
    transition: background-color 0.15s ease;
    font-size: 12.5px;
}

.noti-item:hover {
    background-color: #F8FAFC;
}

.noti-item.unread {
    background-color: #EFF6FF; /* Blue 50 unread background */
}

.noti-item.unread:hover {
    background-color: #DBEAFE;
}

/* =========================================================
   CONDITION BADGE STYLING
   ========================================================= */
.badge-condition-good {
    background-color: rgba(34, 197, 94, 0.1);
    color: #15803d;
    border: 1px solid rgba(34, 197, 94, 0.2);
}
.badge-condition-repair {
    background-color: rgba(234, 179, 8, 0.1);
    color: #a16207;
    border: 1px solid rgba(234, 179, 8, 0.2);
}
.badge-condition-disposed {
    background-color: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Premium Card and form enhancements */
.card-premium {
    border-radius: 20px !important;
    background: linear-gradient(180deg, rgba(255,255,255,0.94), #FFFFFF);
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    box-shadow: var(--shadow-card) !important;
}

.form-control-premium, .form-select-premium {
    border-radius: 12px !important;
    border: 1px solid #CBD5E1 !important;
    padding: 10px 14px !important;
    font-size: 13.5px !important;
    transition: all 0.15s ease-in-out !important;
}

.form-control-premium:focus, .form-select-premium:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15) !important;
}

.admin-content-container,
.member-content-area {
    position: relative;
}

.admin-content-container {
    padding: 22px !important;
}

.admin-content-container,
.member-content-area {
    min-width: 0;
}

.admin-content-container > *:first-child,
.member-content-area > *:first-child {
    position: relative;
}

.admin-content-container::before,
.member-content-area::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 180px;
    background: linear-gradient(180deg, rgba(255,255,255,0.45), transparent);
    pointer-events: none;
}

.table-responsive {
    border-radius: 18px;
}

.modal-content {
    border-radius: 22px !important;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.14);
}

.page-shell {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.public-surface,
.card-premium {
    border-radius: 18px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 18px 20px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255,255,255,0.96), #FFFFFF);
    border: 1px solid rgba(226, 232, 240, 0.92);
    color: inherit;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.06);
}

.page-hero::after {
    content: "";
    position: absolute;
    inset: auto -8% -68% auto;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.08), transparent 68%);
    pointer-events: none;
}

.page-hero h3,
.page-hero h4,
.page-hero h5,
.page-hero p,
.page-hero .text-muted {
    color: inherit !important;
}

.page-hero h3 {
    font-size: clamp(1.9rem, 2.35vw, 2.55rem);
    line-height: 1.08;
    margin-top: 0 !important;
    margin-bottom: 10px !important;
}

.page-hero .hero-kicker {
    display: none !important;
}

.page-hero .hero-subtext {
    max-width: 820px;
    color: #64748B !important;
    font-size: 14px;
    margin-bottom: 0;
}

.page-hero .hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: flex-start;
}

.page-hero .hero-actions .btn {
    min-height: 40px;
    padding-inline: 18px !important;
    border-radius: 14px !important;
    box-shadow: none !important;
}

.page-context-strip {
    display: none !important;
}

.page-context-copy {
    display: none !important;
}

.page-context-title {
    font-size: clamp(1.25rem, 1.7vw, 1.65rem);
    line-height: 1.14;
    margin: 0 0 6px;
    color: #334155;
    font-weight: 800;
}

.page-context-text {
    margin: 0;
    color: #64748B;
    font-size: 13.5px;
    line-height: 1.6;
    max-width: 860px;
}

.page-context-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
    align-items: center;
    flex: 0 0 auto;
}

.page-context-actions .btn {
    min-height: 40px;
    padding-inline: 18px !important;
    border-radius: 14px !important;
    box-shadow: none !important;
}

.hero-actions-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.hero-actions-compact .btn {
    min-width: 168px;
    justify-content: center;
}

.hero-soft-btn {
    background: #FFFFFF !important;
    border: 1px solid rgba(203, 213, 225, 0.9) !important;
    color: #1F2937 !important;
}

.hero-soft-btn:hover {
    background: #F8FAFC !important;
}

.member-dashboard-shell {
    gap: 18px;
}

.member-dashboard-hero {
    position: relative;
    overflow: hidden;
    padding: 22px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(var(--secondary-rgb), 0.22), transparent 24%),
        linear-gradient(135deg, rgba(var(--primary-rgb), 0.95) 0%, rgba(13, 79, 136, 0.98) 58%, rgba(29, 41, 59, 0.98) 100%);
    color: #FFFFFF;
    box-shadow: 0 18px 38px rgba(var(--primary-rgb), 0.18);
}

.member-dashboard-hero::after {
    content: "";
    position: absolute;
    right: -56px;
    bottom: -82px;
    width: 210px;
    height: 210px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.09);
}

.member-dashboard-hero-top,
.member-dashboard-hero-meta {
    position: relative;
    z-index: 1;
}

.member-dashboard-hero-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.member-dashboard-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #FFF7E8;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.member-dashboard-title {
    font-size: clamp(28px, 5vw, 34px);
    line-height: 1.08;
    margin: 16px 0 8px;
    color: #FFFFFF !important;
}

.member-dashboard-subtitle {
    color: rgba(255, 255, 255, 0.82) !important;
    font-size: 13px;
    line-height: 1.55;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-status-pill {
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.member-dashboard-date {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 600;
}

.member-dashboard-hero-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.member-dashboard-meta-item {
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(8px);
}

.member-dashboard-meta-label {
    display: block;
    margin-bottom: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.70);
}

.member-dashboard-meta-item strong {
    color: #FFFFFF;
    font-size: 13px;
}

.member-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.member-overview-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: var(--shadow-card);
}

.member-overview-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.member-overview-label {
    color: #64748B;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.member-overview-value {
    color: var(--ink-strong);
    font-size: 24px;
    font-weight: 800;
    line-height: 1.1;
    margin-top: 4px;
}

.member-highlight-panel {
    padding: 18px;
}

.member-highlight-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.member-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.member-action-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 20px;
    background: #FFFFFF;
    border: 1px solid rgba(226, 232, 240, 0.92);
    box-shadow: var(--shadow-card);
}

.member-action-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.member-action-title {
    color: var(--ink-strong);
    font-size: 14px;
    font-weight: 700;
}

.member-action-text {
    color: #64748B;
    font-size: 12px;
    line-height: 1.45;
    margin-top: 2px;
}

.member-detail-list {
    display: grid;
    gap: 12px;
}

.member-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #EEF2F7;
}

.member-detail-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.member-detail-label {
    color: #64748B;
    font-size: 12px;
}

.member-detail-row strong {
    color: var(--ink-strong);
    font-size: 13px;
    text-align: right;
}

.member-checklist {
    display: grid;
    gap: 10px;
}

.member-checklist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 16px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
}

.member-checklist-item.is-complete {
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.22);
    color: #166534;
}

.member-checklist-icon {
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.member-timeline-panel {
    padding: 18px;
}

.member-timeline-list {
    display: grid;
    gap: 12px;
}

.member-timeline-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding-bottom: 12px;
    border-bottom: 1px solid #EEF2F7;
}

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

.member-timeline-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary-color);
    flex-shrink: 0;
}

.member-timeline-icon.is-read {
    background: #F1F5F9;
    color: #64748B;
}

.member-timeline-title {
    display: block;
    color: var(--ink-strong);
    font-size: 13px;
    line-height: 1.45;
}

.member-timeline-time {
    color: #94A3B8;
    font-size: 11px;
    white-space: nowrap;
}

.member-timeline-text {
    color: #64748B;
    font-size: 12px;
    line-height: 1.55;
    margin-top: 3px;
}

.member-empty-state {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    border-radius: 16px;
    background: #F8FAFC;
    color: #64748B;
    font-size: 13px;
}

.member-profile-shell {
    gap: 18px;
}

.member-profile-card {
    position: sticky;
    top: 92px;
}

.member-profile-top {
    display: grid;
    justify-items: center;
}

.member-profile-avatar-wrap {
    margin-bottom: 14px;
}

.member-profile-avatar {
    width: 112px;
    height: 112px;
    border-radius: 28px;
    object-fit: cover;
    border: 4px solid rgba(var(--primary-rgb), 0.12);
    box-shadow: 0 14px 30px rgba(var(--primary-rgb), 0.16);
    background: #F8FAFC;
}

.member-profile-avatar-placeholder {
    color: var(--primary-color);
    font-size: 34px;
    background:
        radial-gradient(circle at top right, rgba(var(--secondary-rgb), 0.16), transparent 40%),
        linear-gradient(145deg, rgba(var(--primary-rgb), 0.08), rgba(255, 255, 255, 0.95));
}

.member-profile-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.member-profile-stat {
    padding: 14px;
    border-radius: 16px;
    background: #F8FAFC;
    border: 1px solid #E7EDF5;
}

.member-profile-stat span {
    display: block;
    color: #64748B;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.member-profile-stat strong {
    display: block;
    margin-top: 6px;
    color: var(--ink-strong);
    font-size: 16px;
    line-height: 1.25;
}

.member-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.member-form-grid-password {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.member-quiz-question-list {
    display: grid;
    gap: 16px;
}

.member-quiz-question-card {
    padding: 18px;
    border-radius: 18px;
    background: #F8FAFC;
    border: 1px solid #E7EDF5;
}

.member-quiz-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #E2E8F0;
    background: #FFFFFF;
    margin-bottom: 10px;
    color: var(--ink-strong);
    font-size: 13px;
    line-height: 1.55;
}

.member-quiz-option:last-child {
    margin-bottom: 0;
}

.metric-card {
    position: relative;
    overflow: hidden;
    min-height: 176px;
    height: 100%;
    padding: 22px;
    border-radius: 24px;
    color: #FFFFFF;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.metric-card::after {
    content: "";
    position: absolute;
    top: -36px;
    right: -26px;
    width: 130px;
    height: 130px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.metric-card.metric-wine {
    background: linear-gradient(135deg, #8F1239 0%, #BE123C 100%);
}

.metric-card.metric-ocean {
    background: linear-gradient(135deg, #0F766E 0%, #0891B2 100%);
}

.metric-card.metric-forest {
    background: linear-gradient(135deg, #166534 0%, #16A34A 100%);
}

.metric-card.metric-amber {
    background: linear-gradient(135deg, #B45309 0%, #F97316 100%);
}

.metric-card .metric-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.88) !important;
    white-space: normal;
}

.metric-card .metric-label,
.metric-card .metric-label * {
    color: rgba(255,255,255,0.88) !important;
}

.metric-card .metric-value {
    font-size: clamp(1.4rem, 1.6vw, 1.7rem);
    line-height: 1.02;
    color: #FFFFFF !important;
    word-break: break-word;
    letter-spacing: -0.03em;
}

.metric-card .metric-value,
.metric-card .metric-value *,
.metric-card h1.metric-value,
.metric-card h2.metric-value,
.metric-card h3.metric-value,
.metric-card h4.metric-value {
    color: #FFFFFF !important;
}

.metric-card .metric-footnote {
    color: rgba(255,255,255,0.94) !important;
    font-size: 0.86rem;
    line-height: 1.42;
    max-width: 23ch;
    min-height: 2.7em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.metric-card .metric-icon {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.12);
    font-size: 24px;
}

.metric-card.complaint-stat-card {
    display: none;
}

.admin-action-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.75rem;
    margin: 1rem 0 1.25rem;
}

.admin-action-row.is-start {
    justify-content: flex-start;
}

.complaint-summary-card {
    min-height: 168px;
    background: #FFFFFF;
    color: #0f172a;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-top: 4px solid #CBD5E1;
    border-radius: 24px;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.06);
    padding: 26px 28px;
    height: 100%;
}

.complaint-summary-card .metric-label {
    color: #64748b;
}

.complaint-summary-card .metric-value {
    color: #0f172a;
}

.complaint-summary-card .metric-footnote {
    color: #475569;
    line-height: 1.45;
}

.complaint-summary-card .metric-icon {
    background: #FFFFFF;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    width: 74px;
    height: 74px;
    border-radius: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.complaint-summary-card.complaint-stat-open {
    border-top: 4px solid #BE123C;
}

.complaint-summary-card.complaint-stat-open .metric-icon,
.complaint-summary-card.complaint-stat-open .metric-value {
    color: #BE123C;
}

.complaint-summary-card.complaint-stat-investigating {
    border-top: 4px solid #0F766E;
}

.complaint-summary-card.complaint-stat-investigating .metric-icon,
.complaint-summary-card.complaint-stat-investigating .metric-value {
    color: #0F766E;
}

.complaint-summary-card.complaint-stat-resolved {
    border-top: 4px solid #15803D;
}

.complaint-summary-card.complaint-stat-resolved .metric-icon,
.complaint-summary-card.complaint-stat-resolved .metric-value {
    color: #15803D;
}

.complaint-summary-card.complaint-stat-oldest {
    border-top: 4px solid #C2410C;
}

.complaint-summary-card.complaint-stat-oldest .metric-icon,
.complaint-summary-card.complaint-stat-oldest .metric-value {
    color: #C2410C;
}

.surface-toolbar {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 22px;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(8px);
}

.section-title {
    color: var(--ink-strong);
    font-size: 18px;
    font-weight: 700;
}

.surface-toolbar form,
.surface-toolbar .row {
    margin-top: 0 !important;
}

.surface-toolbar {
    padding-top: 1rem !important;
}

.surface-toolbar .filter-strip-label,
.surface-toolbar .filter-strip-title,
.surface-toolbar .filter-strip-copy,
.data-panel .panel-copy-muted,
.surface-toolbar .small.text-muted {
    display: none !important;
}

.member-action-text {
    display: none !important;
}

.dashboard-page .chart-panel-body {
    min-height: 460px;
}

.reports-page .chart-panel-body {
    min-height: 310px;
}

.dashboard-page .chart-panel.compact-chart .chart-panel-body,
.dashboard-page .chart-panel.revenue-chart-panel .chart-panel-body {
    min-height: 90px;
}

.dashboard-page .chart-panel.compact-chart .card-header-premium {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

.dashboard-page .data-panel.chart-panel,
.reports-page .data-panel.chart-panel {
    min-height: 100%;
}

.dashboard-page .data-panel.chart-panel.compact-chart,
.dashboard-page .data-panel.chart-panel.revenue-chart-panel {
    min-height: auto;
    height: auto;
}

.chart-panel .card-body-premium,
.chart-panel-body {
    padding: 10px 16px 6px !important;
    display: flex;
    align-items: stretch;
}

.chart-fill-canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    min-height: 420px;
    flex: 1 1 auto;
}

.dashboard-page .chart-panel.compact-chart .chart-fill-canvas,
.dashboard-page .chart-panel.revenue-chart-panel .chart-fill-canvas {
    min-height: 90px;
}

.data-panel {
    padding: 22px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255,255,255,0.95), #FFFFFF);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: var(--shadow-card);
    height: 100%;
}

.reports-page .data-panel,
.dashboard-page .data-panel {
    height: 100%;
}

.data-panel .panel-topline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--primary-color);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: normal;
}

.data-panel .section-title,
.data-panel h5,
.data-panel h6 {
    color: var(--ink-strong);
}

.data-panel .text-muted,
.data-panel .small,
.data-panel .metric-footnote {
    color: var(--ink-muted);
}

.stats-grid-tight .metric-card {
    min-height: 250px;
}

.complaints-page .metric-card,
.payments-page .metric-card,
.dashboard-page .metric-card,
.reports-page .metric-card,
.members-page .metric-card,
.expenses-page .metric-card,
.assets-page .metric-card,
.events-page .metric-card,
.announcements-page .metric-card,
.documents-page .metric-card,
.donations-page .metric-card,
.properties-page .metric-card {
    min-height: 140px;
}

.complaints-page .metric-card .metric-footnote,
.payments-page .metric-card .metric-footnote,
.dashboard-page .metric-card .metric-footnote,
.reports-page .metric-card .metric-footnote,
.members-page .metric-card .metric-footnote,
.expenses-page .metric-card .metric-footnote,
.assets-page .metric-card .metric-footnote,
.events-page .metric-card .metric-footnote,
.announcements-page .metric-card .metric-footnote,
.documents-page .metric-card .metric-footnote,
.donations-page .metric-card .metric-footnote,
.properties-page .metric-card .metric-footnote {
    max-width: none;
    min-height: auto;
    font-size: 0.88rem;
}

.btn-premium-icon-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    font-size: 1.05rem;
    border-radius: 10px !important;
    background-color: #F8FAFC !important;
    border: 1px solid #E2E8F0 !important;
    transition: all 0.15s ease-in-out;
}
.btn-premium-icon-action:hover {
    background-color: #FFFFFF !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.12) !important;
    transform: translateY(-1px);
}
.btn-premium-icon-action i {
    font-size: 1.05rem;
}

.metric-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin: 6px 0 18px;
}

.metric-action-row .btn {
    min-height: 42px;
    padding-inline: 18px !important;
    border-radius: 14px !important;
    font-weight: 700;
}

.compact-action-cluster {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.compact-action-cluster .btn {
    min-height: 40px;
    border-radius: 14px !important;
    padding-inline: 16px !important;
    font-weight: 700;
}

.members-page .page-hero .compact-action-cluster {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    justify-content: end;
    align-items: center;
}

.members-page .page-hero .compact-action-cluster .btn {
    white-space: nowrap;
    min-width: 0;
}

.metric-action-row.is-right {
    justify-content: flex-end;
}

.section-inline-title {
    margin: 6px 0 10px;
    color: var(--ink-strong);
    font-size: clamp(1.4rem, 2vw, 1.9rem);
    line-height: 1.12;
    font-weight: 800;
}

.section-inline-subtitle {
    margin: 0 0 16px;
    color: #64748B;
    font-size: 13px;
    line-height: 1.55;
}

.compact-filter-bar {
    margin-top: 0;
}

.compact-filter-bar .row {
    align-items: center;
}

.compact-filter-bar .form-label {
    display: none !important;
}

.complaint-card-copy {
    min-height: 52px;
    display: flex;
    align-items: flex-start;
}

.fixed-fill-card {
    min-height: 100%;
}

.empty-state-panel {
    border: 1px dashed rgba(203, 213, 225, 0.95);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.95), #FFFFFF);
    padding: 36px 24px;
    text-align: center;
}

.empty-state-panel .empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--primary-color);
    font-size: 24px;
}

.card-premium,
.data-panel,
.metric-card {
    min-width: 0;
}

@media (max-width: 991px) {
    .page-hero {
        padding: 16px 18px;
        border-radius: 24px;
    }

    .page-hero h3 {
        font-size: clamp(1.55rem, 4.6vw, 2rem);
    }

    .page-context-strip {
        padding: 16px;
        border-radius: 18px;
        flex-direction: column;
        align-items: stretch;
    }

    .page-context-actions {
        justify-content: flex-start;
    }

    .metric-card {
        min-height: 160px;
    }

    .chart-panel-body {
        min-height: 320px;
    }

    .metric-action-row {
        gap: 10px;
    }

    .member-profile-card {
        position: static;
    }

    .member-form-grid,
    .member-form-grid-password {
        grid-template-columns: 1fr;
    }

    .members-page .page-hero .compact-action-cluster {
        grid-auto-flow: row;
        grid-template-columns: repeat(2, minmax(0, max-content));
        justify-content: start;
    }
}

@media (max-width: 767px) {
    .page-shell {
        gap: 14px;
    }

    .page-hero {
        padding: 16px 15px;
    }

    .page-hero .hero-actions,
    .compact-action-cluster,
    .admin-action-row,
    .metric-action-row {
        justify-content: stretch;
    }

    .page-hero .hero-actions .btn,
    .compact-action-cluster .btn,
    .admin-action-row .btn,
    .metric-action-row .btn {
        width: 100%;
    }

    .data-panel {
        padding: 16px;
        border-radius: 18px;
    }

    .card-body-premium {
        padding: 18px;
    }

    .metric-card {
        min-height: 152px;
        padding: 18px;
        border-radius: 20px;
    }

    .metric-card .metric-footnote {
        max-width: none;
    }

    .empty-state-panel {
        padding: 28px 18px;
        border-radius: 18px;
    }
}
