:root {
    --rhu-red: #c0392b;
    --rhu-red-dark: #922b21;
    --rhu-red-light: #e74c3c;
    --rhu-red-pale: #fadbd8;
    --rhu-white: #ffffff;
    --rhu-light: #fdf2f2;
    --rhu-gray: #f8f9fa;
    --rhu-border: #e8d5d5;
    --rhu-text: #2c3e50;
    --rhu-muted: #7f8c8d;
    --gradient-hero: linear-gradient(135deg, #922b21 0%, #c0392b 40%, #e74c3c 70%, #ff6b6b 100%);
    --gradient-sidebar: linear-gradient(180deg, #922b21 0%, #c0392b 100%);
    --gradient-card: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
    --shadow-sm: 0 2px 10px rgba(192, 57, 43, 0.12);
    --shadow-md: 0 8px 30px rgba(192, 57, 43, 0.18);
    --shadow-lg: 0 20px 60px rgba(192, 57, 43, 0.22);
    --radius: 12px;
    --radius-lg: 20px;
}

/* ===========================
   GLOBAL RESETS & BASE
=========================== */
* { box-sizing: border-box; }

body {
    font-family: 'Century Gothic', CenturyGothic, AppleGothic, sans-serif;
    color: var(--rhu-text);
    background: var(--rhu-gray);
    margin: 0;
}

a { text-decoration: none; transition: all 0.2s; }

/* ===========================
   LANDING PAGE STYLES
=========================== */

/* NAVBAR */
/* ===========================
   HERO ENTRANCE ANIMATIONS
   Panel slides in from the right, then CTA/nav buttons pop up staggered
=========================== */
.slide-in-panel {
    opacity: 0;
    transform: translateX(60px);
    animation: slideInPanel 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
}

@keyframes slideInPanel {
    from { opacity: 0; transform: translateX(60px); }
    to   { opacity: 1; transform: translateX(0); }
}

.pop-in {
    opacity: 0;
    transform: scale(0.85) translateY(8px);
    animation: popIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: var(--pop-delay, 0.9s);
}

@keyframes popIn {
    0%   { opacity: 0; transform: scale(0.85) translateY(8px); }
    60%  { opacity: 1; transform: scale(1.06) translateY(-2px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .slide-in-panel, .pop-in {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

.landing-nav {
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--rhu-border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 1050;
    box-shadow: 0 2px 20px rgba(192,57,43,0.08);
}

.landing-nav .navbar-brand {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--rhu-red) !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.landing-nav .navbar-brand .brand-icon {
    width: 40px; height: 40px;
    background: var(--gradient-card);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-size: 1.1rem;
    box-shadow: var(--shadow-sm);
}

.landing-nav .nav-link {
    color: var(--rhu-text) !important;
    font-weight: 500;
    padding: 6px 14px !important;
    border-radius: 8px;
    transition: all 0.2s;
}

.landing-nav .nav-link:hover {
    color: var(--rhu-red) !important;
    background: var(--rhu-light);
}

.btn-nav-login {
    background: var(--gradient-card);
    color: white !important;
    border-radius: 25px;
    padding: 8px 24px !important;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.btn-nav-login:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white !important;
}

/* HERO */
.hero-section {
    background: var(--gradient-hero);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    width: 800px; height: 800px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    top: -300px; right: -200px;
}

.hero-section::after {
    content: '';
    position: absolute;
    width: 500px; height: 500px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
    bottom: -200px; left: -100px;
}

.hero-content { position: relative; z-index: 2; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 28px;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: white;
    line-height: 1.15;
    margin-bottom: 24px;
}

.hero-title span {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    color: rgba(255,255,255,0.88);
    font-size: 1.15rem;
    line-height: 1.7;
    margin-bottom: 36px;
    max-width: 520px;
}

.hero-cta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.btn-hero-primary {
    background: white;
    color: var(--rhu-red);
    border: none;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    transition: all 0.3s;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-hero-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
    color: var(--rhu-red-dark);
}

.btn-hero-secondary {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    color: white;
    border: 2px solid rgba(255,255,255,0.5);
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-hero-secondary:hover {
    background: rgba(255,255,255,0.25);
    border-color: white;
    transform: translateY(-3px);
    color: white;
}

.hero-stats {
    display: flex;
    gap: 32px;
    margin-top: 48px;
    flex-wrap: wrap;
}

.stat-item { text-align: center; color: white; }
.stat-number {
    font-size: 2rem;
    font-weight: 800;
    display: block;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.stat-label {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.75);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-visual {
    position: relative;
    z-index: 2;
}

.hero-card-mockup {
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-lg);
}

.card-mockup-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.card-mockup-header .avatar {
    width: 44px; height: 44px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.card-mockup-header h6 { color: white; margin: 0; font-weight: 700; }
.card-mockup-header p { color: rgba(255,255,255,0.7); margin: 0; font-size: 0.8rem; }

.mockup-list-item {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 14px;
    color: white;
}

.mockup-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.mockup-item-text { flex: 1; }
.mockup-item-title { font-size: 0.88rem; font-weight: 600; margin: 0; }
.mockup-item-sub { font-size: 0.75rem; color: rgba(255,255,255,0.65); margin: 0; }
.mockup-badge {
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 50px;
    font-weight: 600;
    white-space: nowrap;
}

.floating-card {
    position: absolute;
    background: white;
    border-radius: var(--radius);
    padding: 14px 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--rhu-border);
    animation: float 3s ease-in-out infinite;
}

.floating-card-1 { bottom: -20px; left: -40px; animation-delay: 0s; }
.floating-card-2 { top: -20px; right: -40px; animation-delay: 1.5s; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* FEATURES */
.features-section {
    padding: 100px 0;
    background: white;
}

.section-eyebrow {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--rhu-red);
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 800;
    color: var(--rhu-text);
    margin-bottom: 16px;
    line-height: 1.2;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--rhu-muted);
    max-width: 560px;
    margin: 0 auto 60px;
    line-height: 1.7;
}

.feature-card {
    background: white;
    border: 1px solid var(--rhu-border);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    height: 100%;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--gradient-card);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s;
}

.feature-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-6px);
    border-color: var(--rhu-red-pale);
}

.feature-card:hover::before { transform: scaleX(1); }

.feature-icon {
    width: 64px; height: 64px;
    background: var(--rhu-light);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    margin-bottom: 22px;
    transition: all 0.3s;
}

.feature-card:hover .feature-icon {
    background: var(--gradient-card);
    color: white;
    box-shadow: var(--shadow-sm);
}

.feature-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--rhu-text);
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--rhu-muted);
    font-size: 0.92rem;
    line-height: 1.7;
    margin: 0;
}

/* SERVICES SECTION */
.services-section {
    padding: 100px 0;
    background: var(--rhu-light);
}

.service-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 24px;
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--rhu-border);
    transition: all 0.3s;
    margin-bottom: 16px;
}

.service-item:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--rhu-red-pale);
    transform: translateX(4px);
}

.service-num {
    width: 44px; height: 44px;
    background: var(--gradient-card);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 1rem;
    flex-shrink: 0;
}

.service-item h5 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.service-item p { font-size: 0.88rem; color: var(--rhu-muted); margin: 0; line-height: 1.6; }

.services-visual {
    position: sticky;
    top: 100px;
}

.services-image-card {
    background: var(--gradient-hero);
    border-radius: var(--radius-lg);
    padding: 40px;
    color: white;
    position: relative;
    overflow: hidden;
}

.services-image-card::before {
    content: '';
    position: absolute;
    width: 300px; height: 300px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
    top: -100px; right: -80px;
}

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; }

.stat-box {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.stat-box .num { font-size: 1.8rem; font-weight: 800; display: block; }
.stat-box .lbl { font-size: 0.75rem; color: rgba(255,255,255,0.75); text-transform: uppercase; letter-spacing: 1px; }

/* CTA SECTION */
.cta-section {
    padding: 100px 0;
    background: var(--gradient-hero);
    position: relative;
    overflow: hidden;
}

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

.cta-section h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: white;
    margin-bottom: 20px;
}

.cta-section p {
    color: rgba(255,255,255,0.85);
    font-size: 1.1rem;
    max-width: 520px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

/* FOOTER */
.landing-footer {
    background: #1a1a2e;
    color: rgba(255,255,255,0.75);
    padding: 60px 0 30px;
}

.footer-brand .brand-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
}

.footer-brand p { font-size: 0.88rem; line-height: 1.7; }

.footer-heading {
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
}

.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a {
    color: rgba(255,255,255,0.6);
    font-size: 0.88rem;
    transition: color 0.2s;
}
.footer-links a:hover { color: white; }

.footer-divider {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin: 40px 0 24px;
}

.footer-bottom {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.45);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-badge {
    background: var(--gradient-card);
    color: white;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ===========================
   AUTH PAGES (LOGIN)
=========================== */
.auth-wrapper {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

@media (max-width: 768px) {
    .auth-wrapper { grid-template-columns: 1fr; }
    .auth-visual { display: none; }
}

.auth-visual {
    background: var(--gradient-hero);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

.auth-visual::before {
    content: '';
    position: absolute;
    width: 500px; height: 500px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
    top: -150px; right: -100px;
}

.auth-visual::after {
    content: '';
    position: absolute;
    width: 300px; height: 300px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
    bottom: -80px; left: -60px;
}

.auth-visual-content { position: relative; z-index: 2; color: white; max-width: 380px; }

.auth-visual-icon {
    width: 80px; height: 80px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.2rem;
    margin-bottom: 32px;
}

.auth-visual h2 { font-size: 2rem; font-weight: 800; margin-bottom: 16px; }
.auth-visual p { color: rgba(255,255,255,0.8); font-size: 1rem; line-height: 1.7; margin-bottom: 36px; }

.auth-feature-list { list-style: none; padding: 0; margin: 0; }
.auth-feature-list li {
    display: flex; align-items: center; gap: 12px;
    color: rgba(255,255,255,0.9);
    font-size: 0.9rem; font-weight: 500;
    margin-bottom: 14px;
}
.auth-feature-list li::before {
    content: '✓';
    width: 24px; height: 24px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 700;
    flex-shrink: 0;
}

.auth-form-panel {
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
}

.auth-form-inner { width: 100%; max-width: 400px; }

.auth-logo {
    display: flex; align-items: center; gap: 12px;
    text-decoration: none;
    margin-bottom: 40px;
}

.auth-logo-icon {
    width: 44px; height: 44px;
    background: var(--gradient-card);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.2rem;
    box-shadow: var(--shadow-sm);
}

.auth-logo-text { font-size: 1.1rem; font-weight: 700; color: var(--rhu-red); }
.auth-logo-sub { font-size: 0.72rem; color: var(--rhu-muted); }

.auth-title { font-size: 1.8rem; font-weight: 800; color: var(--rhu-text); margin-bottom: 8px; }
.auth-subtitle { font-size: 0.92rem; color: var(--rhu-muted); margin-bottom: 36px; line-height: 1.6; }

.form-label { font-weight: 600; font-size: 0.88rem; color: var(--rhu-text); margin-bottom: 6px; }

.form-control {
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: all 0.2s;
    background: #fafafa;
}

.form-control:focus {
    border-color: var(--rhu-red);
    box-shadow: 0 0 0 4px rgba(192, 57, 43, 0.1);
    background: white;
    outline: none;
}

.input-group .form-control { border-radius: 10px 0 0 10px; }
.input-group-text {
    background: #fafafa;
    border: 1.5px solid #e0e0e0;
    border-left: none;
    border-radius: 0 10px 10px 0;
    color: var(--rhu-muted);
    cursor: pointer;
    transition: all 0.2s;
}
.input-group-text:hover { color: var(--rhu-red); }

.btn-auth {
    width: 100%;
    background: var(--gradient-card);
    border: none;
    color: white;
    padding: 14px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
}

.btn-auth:active { transform: translateY(0); }

/* ===========================
   ADMIN LAYOUT (SIDEBAR + TOPBAR)
=========================== */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
    width: 270px;
    background: var(--gradient-sidebar);
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 20px rgba(146, 43, 33, 0.3);
    transition: transform 0.3s;
    overflow-y: auto;
}

.sidebar-brand {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.sidebar-brand-icon {
    width: 44px; height: 44px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.3rem;
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar-brand-icon img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 11px;
}

.sidebar-brand-text .name { color: white; font-weight: 700; font-size: 0.95rem; line-height: 1.2; }
.sidebar-brand-text .subtitle { color: rgba(255,255,255,0.6); font-size: 0.72rem; }

.sidebar-nav { padding: 16px 0; flex: 1; }

.nav-section-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    padding: 12px 20px 6px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 20px;
    color: rgba(255,255,255,0.72) !important;
    transition: all 0.25s cubic-bezier(0.34, 1.2, 0.64, 1);
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    margin: 2px 10px;
    border-radius: 10px;
    overflow: hidden;
    /* Entrance animation */
    animation: sidebarLinkIn 0.4s ease both;
    animation-delay: calc(var(--link-index, 0) * 0.04s);
}

@keyframes sidebarLinkIn {
    from { opacity: 0; transform: translateX(-14px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* Hover glow background sweep */
.sidebar-link::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0) 100%);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
    pointer-events: none;
    border-radius: 10px;
}

.sidebar-link:hover::after { transform: translateX(100%); }

.sidebar-link:hover {
    background: rgba(255,255,255,0.13);
    color: white !important;
    transform: translateX(3px);
}

.sidebar-link.active {
    background: rgba(255,255,255,0.2);
    color: white !important;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.15);
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0; top: 6px; bottom: 6px;
    width: 3px;
    background: white;
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 10px rgba(255,255,255,0.8), 0 0 20px rgba(255,255,255,0.4);
    animation: pulseGlow 2.5s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 6px rgba(255,255,255,0.6); }
    50%       { box-shadow: 0 0 14px rgba(255,255,255,0.95), 0 0 24px rgba(255,255,255,0.4); }
}

.sidebar-link .icon {
    width: 32px; height: 32px;
    background: rgba(255,255,255,0.1);
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sidebar-link:hover .icon {
    background: rgba(255,255,255,0.22);
    transform: scale(1.15) rotate(-4deg);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.sidebar-link.active .icon {
    background: rgba(255,255,255,0.25);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

/* Ripple effect (injected by JS) */
.sidebar-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    pointer-events: none;
    transform: scale(0);
    animation: sidebarRipple 0.55s linear;
}

@keyframes sidebarRipple {
    to { transform: scale(1); opacity: 0; }
}

.sidebar-link .badge-count {
    margin-left: auto;
    background: rgba(255,255,255,0.2);
    color: white;
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 0.72rem;
    font-weight: 600;
}

/* Red "new resident booking" notification badge — bright/contrasting on
   purpose so it still pops against the maroon sidebar background. */
.sidebar-link .badge-new-count {
    margin-left: auto;
    background: #ff3b30;
    color: #fff;
    border-radius: 999px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    font-size: 0.7rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.3);
    animation: badgePulse 1.8s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 2px rgba(255,255,255,0.3), 0 0 0 0 rgba(255,59,48,0.5); }
    50%      { transform: scale(1.12); box-shadow: 0 0 0 2px rgba(255,255,255,0.3), 0 0 0 6px rgba(255,59,48,0); }
}

/* "NEW" tag used on newly-arrived rows (e.g. Resident Bookings table) */
.tag-new {
    display: inline-block;
    background: #ff3b30;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 6px;
    vertical-align: middle;
    animation: badgePulse 1.8s ease-in-out infinite;
}

.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 10px;
    background: rgba(255,255,255,0.08);
}

.sidebar-avatar {
    width: 36px; height: 36px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 0.9rem; font-weight: 700;
    flex-shrink: 0;
}

.sidebar-user-info .name { color: white; font-size: 0.85rem; font-weight: 600; line-height: 1.2; }
.sidebar-user-info .role { color: rgba(255,255,255,0.55); font-size: 0.72rem; }

.sidebar-user .logout-btn {
    margin-left: auto;
    width: 30px; height: 30px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.7);
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.sidebar-user .logout-btn:hover {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* TOPBAR */
.admin-topbar {
    background: white;
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid var(--rhu-border);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0; z-index: 500;
    gap: 16px;
}

.topbar-toggle {
    width: 38px; height: 38px;
    border: 1.5px solid var(--rhu-border);
    border-radius: 10px;
    background: white;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.2s;
    display: none;
}

@media (max-width: 992px) { .topbar-toggle { display: flex; } }

.topbar-toggle:hover {
    border-color: var(--rhu-red);
    color: var(--rhu-red);
}

.topbar-breadcrumb { flex: 1; }
.topbar-breadcrumb .page-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--rhu-text);
    margin: 0;
}
.topbar-breadcrumb .breadcrumb { margin: 0; font-size: 0.78rem; }
.topbar-breadcrumb .breadcrumb-item { color: var(--rhu-muted); }
.topbar-breadcrumb .breadcrumb-item.active { color: var(--rhu-red); font-weight: 500; }

.topbar-actions { display: flex; align-items: center; gap: 10px; }

.topbar-btn {
    width: 38px; height: 38px;
    border: 1.5px solid var(--rhu-border);
    border-radius: 10px;
    background: white;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.2s;
    color: var(--rhu-muted);
    position: relative;
    text-decoration: none;
}

.topbar-btn:hover {
    border-color: var(--rhu-red);
    color: var(--rhu-red);
}

.topbar-notif-dot {
    position: absolute;
    top: 6px; right: 6px;
    width: 8px; height: 8px;
    background: var(--rhu-red);
    border-radius: 50%;
    border: 1.5px solid white;
}

.topbar-user {
    display: flex; align-items: center; gap: 10px;
    cursor: pointer;
    padding: 6px 12px 6px 6px;
    border-radius: 50px;
    border: 1.5px solid var(--rhu-border);
    transition: all 0.2s;
    text-decoration: none;
}

.topbar-user:hover { border-color: var(--rhu-red-pale); background: var(--rhu-light); }

.topbar-avatar {
    width: 32px; height: 32px;
    background: var(--gradient-card);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 0.85rem; font-weight: 700;
}

.topbar-user-info .uname { font-size: 0.85rem; font-weight: 600; color: var(--rhu-text); line-height: 1.2; }
.topbar-user-info .urole { font-size: 0.72rem; color: var(--rhu-muted); }

/* MAIN CONTENT */
.admin-content {
    margin-left: 270px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

@media (max-width: 992px) {
    .admin-content { margin-left: 0; }
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay { display: block !important; }
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

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

/* ===========================
   DASHBOARD STATS CARDS
=========================== */
.stats-card {
    background: white;
    border: 1px solid var(--rhu-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s;
    height: 100%;
}

.stats-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.stats-icon {
    width: 60px; height: 60px;
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stats-icon.red { background: var(--rhu-light); color: var(--rhu-red); }
.stats-icon.blue { background: #eef2ff; color: #4f6ef7; }
.stats-icon.green { background: #eafaf1; color: #27ae60; }
.stats-icon.orange { background: #fef6ec; color: #e67e22; }
.stats-icon.purple { background: #f4eeff; color: #9b59b6; }
.stats-icon.teal { background: #e6fbfb; color: #17a2b8; }

.stats-card-gradient {
    background: var(--gradient-card);
    color: white;
}

.stats-info .label { font-size: 0.82rem; color: var(--rhu-muted); font-weight: 500; margin-bottom: 6px; }
.stats-card-gradient .stats-info .label { color: rgba(255,255,255,0.75); }
.stats-info .value { font-size: 2rem; font-weight: 800; line-height: 1; margin-bottom: 6px; }
.stats-info .change { font-size: 0.78rem; color: var(--rhu-muted); }
.stats-card-gradient .stats-info .change { color: rgba(255,255,255,0.7); }

.change .up { color: #27ae60; }
.change .down { color: var(--rhu-red); }

/* ===========================
   PANEL / CARD COMPONENTS
=========================== */
.panel {
    background: white;
    border: 1px solid var(--rhu-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.panel-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--rhu-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.panel-title { font-size: 1rem; font-weight: 700; color: var(--rhu-text); margin: 0; }
.panel-body { padding: 24px; }
.panel-table { padding: 0; }

/* ===========================
   TABLES
=========================== */
.table-rhu { margin: 0; }

.table-rhu thead {
    background: var(--rhu-light);
}

.table-rhu thead th {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--rhu-muted);
    border-bottom: 1px solid var(--rhu-border);
    padding: 14px 20px;
    white-space: nowrap;
}

.table-rhu tbody td {
    padding: 16px 20px;
    vertical-align: middle;
    font-size: 0.9rem;
    color: var(--rhu-text);
    border-bottom: 1px solid #f5f5f5;
}

.table-rhu tbody tr:hover { background: var(--rhu-light); }
.table-rhu tbody tr:last-child td { border-bottom: none; }

.patient-cell { display: flex; align-items: center; gap: 12px; }
.patient-avatar {
    width: 36px; height: 36px;
    background: var(--gradient-card);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 0.8rem; font-weight: 700;
    flex-shrink: 0;
}
.patient-name { font-weight: 600; font-size: 0.92rem; }
.patient-id { font-size: 0.75rem; color: var(--rhu-muted); }

/* BADGES */
.badge-rhu {
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.badge-pending { background: #fef9ec; color: #b7791f; }
.badge-confirmed { background: #eafaf1; color: #27ae60; }
.badge-completed { background: #eef2ff; color: #4f6ef7; }
.badge-cancelled { background: #fdf2f2; color: var(--rhu-red); }
.badge-active { background: #eafaf1; color: #27ae60; }
.badge-inactive { background: #f5f5f5; color: var(--rhu-muted); }

/* FORM STYLES */
.form-section {
    background: white;
    border: 1px solid var(--rhu-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 20px;
}

.form-section-header {
    padding: 16px 24px;
    background: var(--rhu-light);
    border-bottom: 1px solid var(--rhu-border);
}

.form-section-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--rhu-red);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-section-body { padding: 24px; }

.form-select {
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: all 0.2s;
    background: #fafafa;
}

.form-select:focus {
    border-color: var(--rhu-red);
    box-shadow: 0 0 0 4px rgba(192, 57, 43, 0.1);
    background: white;
    outline: none;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* BUTTONS */
.btn-primary-rhu {
    background: var(--gradient-card);
    border: none;
    color: white;
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary-rhu:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
}

.btn-secondary-rhu {
    background: white;
    border: 1.5px solid var(--rhu-border);
    color: var(--rhu-text);
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-secondary-rhu:hover {
    border-color: var(--rhu-red);
    color: var(--rhu-red);
}

.btn-danger-rhu {
    background: white;
    border: 1.5px solid #fca5a5;
    color: var(--rhu-red);
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.btn-danger-rhu:hover {
    background: #fdf2f2;
    border-color: var(--rhu-red);
    color: var(--rhu-red);
}

.btn-icon {
    width: 34px; height: 34px;
    border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 1.5px solid transparent;
    text-decoration: none;
}

.btn-icon-view { background: #eef2ff; color: #4f6ef7; border-color: #c7d2fe; }
.btn-icon-view:hover { background: #4f6ef7; color: white; }
.btn-icon-edit { background: #fef6ec; color: #e67e22; border-color: #fdd8a5; }
.btn-icon-edit:hover { background: #e67e22; color: white; }
.btn-icon-delete { background: #fdf2f2; color: var(--rhu-red); border-color: var(--rhu-red-pale); }
.btn-icon-delete:hover { background: var(--rhu-red); color: white; }

/* SEARCH & FILTER BAR */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.search-input-wrap {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 320px;
}

.search-input-wrap .search-icon {
    position: absolute;
    left: 12px; top: 50%;
    transform: translateY(-50%);
    color: var(--rhu-muted);
    font-size: 0.9rem;
}

.search-input-wrap .form-control {
    padding-left: 38px;
}

/* PAGINATION */
.pagination-rhu .page-link {
    border: 1.5px solid var(--rhu-border);
    border-radius: 8px !important;
    margin: 0 2px;
    color: var(--rhu-text);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 6px 12px;
    transition: all 0.2s;
}

.pagination-rhu .page-link:hover,
.pagination-rhu .page-item.active .page-link {
    background: var(--gradient-card);
    border-color: transparent;
    color: white;
    box-shadow: var(--shadow-sm);
}

/* ALERT / NOTIFICATION */
.alert-rhu {
    border-radius: 12px;
    border: none;
    padding: 14px 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.alert-success { background: #eafaf1; color: #1e8449; }
.alert-danger { background: #fdf2f2; color: #c0392b; }
.alert-warning { background: #fef9ec; color: #b7791f; }
.alert-info { background: #eef2ff; color: #3b5bdb; }

/* POP-UP TOAST NOTIFICATION (e.g. "visit record completed") */
.rhu-toast-wrap {
    position: fixed;
    top: 22px;
    right: 22px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.rhu-toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    color: var(--rhu-text);
    border-left: 5px solid #1e8449;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.18);
    padding: 14px 18px;
    min-width: 280px;
    max-width: 360px;
    font-size: 0.88rem;
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}
.rhu-toast.show { opacity: 1; transform: translateX(0); }
.rhu-toast .rhu-toast-icon {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #eafaf1;
    color: #1e8449;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}
.rhu-toast .rhu-toast-title { font-weight: 800; font-size: 0.88rem; margin-bottom: 2px; }
.rhu-toast .rhu-toast-msg { font-size: 0.78rem; color: var(--rhu-muted); }
.rhu-toast .rhu-toast-close {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--rhu-muted);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 4px;
}

/* EMPTY STATE */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--rhu-muted);
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state h5 { font-weight: 700; color: var(--rhu-text); margin-bottom: 8px; }
.empty-state p { font-size: 0.9rem; margin-bottom: 20px; }

/* BREADCRUMB */
.breadcrumb { background: transparent; padding: 0; }
.breadcrumb-item + .breadcrumb-item::before { color: var(--rhu-muted); content: '/'; }

/* DETAIL VIEW */
.detail-label { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--rhu-muted); margin-bottom: 4px; }
.detail-value { font-size: 0.95rem; color: var(--rhu-text); font-weight: 500; }

/* REPORT CARDS */
.report-card {
    background: white;
    border: 1px solid var(--rhu-border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
}

.report-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-3px); }
.report-card .icon { font-size: 2rem; margin-bottom: 12px; }
.report-card h6 { font-weight: 700; font-size: 0.9rem; margin-bottom: 6px; }
.report-card p { font-size: 0.82rem; color: var(--rhu-muted); margin-bottom: 16px; }

/* PASSWORD DISPLAY */
.pw-pill {
    display: inline-flex;
    align-items: center;
    background: #f8f9fa;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    padding: 4px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--rhu-text);
    letter-spacing: 0.5px;
    font-family: 'Courier New', monospace;
}

.form-control-plaintext-box {
    background: var(--rhu-light);
    border: 1.5px dashed var(--rhu-border);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: var(--rhu-text);
    letter-spacing: 0.5px;
}

/* INPUT RESTRICTION INDICATOR */
[data-input-type="alpha"] { caret-color: var(--rhu-red); }
[data-input-type="numeric"] { caret-color: #4f6ef7; font-family: 'Courier New', monospace; }

/* CHART CONTAINERS */
.chart-container { position: relative; }

/* SCROLLBAR */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--rhu-red-pale); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--rhu-red-light); }

/* RESPONSIVE ADJUSTMENTS */
@media (max-width: 768px) {
    .content-area { padding: 16px; }
    .filter-bar { gap: 8px; }
    .search-input-wrap { max-width: 100%; }
    .hero-stats { gap: 20px; }
}

/* PRINT STYLES */
@media print {
    .sidebar, .admin-topbar, .no-print, .sidebar-overlay { display: none !important; }
    .admin-content { margin-left: 0 !important; }
    .content-area { padding: 0 !important; }
    .panel { border: 1px solid #ccc !important; box-shadow: none !important; }
    .stats-card { border: 1px solid #ccc !important; box-shadow: none !important; }
    body { background: white !important; }
    .print-only { display: block !important; }
}
.print-only { display: none; }
