:root {
    --primary-navy: #10233F;
    --secondary-navy: #17365D;
    --emerald: #15966A;
    --emerald-hover: #107553;
    --bg-main: #F5F7FB;
    --surface: #FFFFFF;
    --text-primary: #182230;
    --text-secondary: #667085;
    --border-color: #E4E7EC;
    --warning: #F79009;
    --error: #D92D20;
    --success: #039855;
    --sidebar-width: 260px;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.demo-banner {
    background: linear-gradient(90deg, #F04438 0%, #D92D20 100%);
    color: #ffffff;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 1050;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.demo-badge {
    background-color: #FEF3F2;
    color: #D92D20;
    border: 1px solid #FECDCA;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
}

.badge-live-locked {
    background-color: #FEF0C7;
    color: #B54708;
    border: 1px solid #FEDF89;
}

.navbar-brand-custom {
    color: var(--primary-navy);
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: -0.5px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-brand-custom span {
    color: var(--emerald);
}

.btn-primary-custom {
    background-color: var(--primary-navy);
    border-color: var(--primary-navy);
    color: #fff;
    font-weight: 600;
    border-radius: 6px;
    padding: 8px 18px;
    transition: all 0.2s ease-in-out;
}
.btn-primary-custom:hover {
    background-color: var(--secondary-navy);
    border-color: var(--secondary-navy);
    color: #fff;
}

.btn-emerald {
    background-color: var(--emerald);
    border-color: var(--emerald);
    color: #fff;
    font-weight: 600;
    border-radius: 6px;
    padding: 8px 18px;
}
.btn-emerald:hover {
    background-color: var(--emerald-hover);
    border-color: var(--emerald-hover);
    color: #fff;
}

.card-custom {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.05);
    padding: 24px;
    margin-bottom: 24px;
}

.table-custom {
    width: 100%;
    margin-bottom: 1rem;
    color: var(--text-primary);
    vertical-align: middle;
    border-color: var(--border-color);
}
.table-custom th {
    background-color: #F8F9FC;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}
.table-custom td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

/* App Layout Structure */
.app-wrapper {
    display: flex;
    min-height: calc(100vh - 40px);
}

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--primary-navy);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar .sidebar-brand {
    padding: 24px 20px;
    font-size: 1.3rem;
    font-weight: 800;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: #ffffff;
    text-decoration: none;
}
.sidebar .sidebar-brand span {
    color: var(--emerald);
}

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

.sidebar-nav .nav-link {
    color: #D0D5DD;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
    transition: all 0.15s ease-in-out;
}
.sidebar-nav .nav-link:hover, .sidebar-nav .nav-link.active {
    background-color: var(--secondary-navy);
    color: #ffffff;
}

.content-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.top-bar {
    background-color: var(--surface);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-navy);
    margin-top: 4px;
}
.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.tree-level {
    border-left: 2px dashed var(--emerald);
    margin-left: 20px;
    padding-left: 15px;
    margin-bottom: 15px;
}

/* =====================================================================
   HOMEPAGE ANIMATION & INTERACTIVE STYLES
   ===================================================================== */
@keyframes floatSlow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(21, 150, 106, 0.4); }
    50% { box-shadow: 0 0 0 12px rgba(21, 150, 106, 0); }
}

@keyframes subtleShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-floating-card {
    animation: floatSlow 6s ease-in-out infinite;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hero-floating-card:hover {
    animation-play-state: paused;
    transform: translateY(-10px);
    box-shadow: 0 25px 45px -12px rgba(16, 35, 63, 0.15) !important;
}

.btn-pulse {
    animation: pulseGlow 2.5s infinite;
}

.card-hover-lift {
    transition: transform 0.28s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.28s cubic-bezier(0.165, 0.84, 0.44, 1), border-color 0.28s ease;
}
.card-hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 35px -10px rgba(16, 35, 63, 0.12) !important;
    border-color: rgba(21, 150, 106, 0.3) !important;
}

.metric-counter-box {
    transition: all 0.25s ease-in-out;
}
.metric-counter-box:hover {
    transform: translateY(-4px);
    background-color: #ffffff !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    border-radius: 12px;
}

.badge-shimmer {
    background: linear-gradient(90deg, #15966A 0%, #22c55e 50%, #15966A 100%);
    background-size: 200% 100%;
    animation: subtleShimmer 4s infinite linear;
    color: #ffffff;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

