/*
 * EcoDBX Custom Brand Theme
 * Professional Modern Color Palette
 * Deep Teal + Emerald + Slate
 */

/* ============================================
   EcoDBX Brand Color Variables
   ============================================ */
:root {
    /* Primary Colors - Deep Professional Teal */
    --eco-primary: #0F766E;
    --eco-primary-light: #14B8A6;
    --eco-primary-dark: #115E59;

    /* Secondary Colors - Rich Emerald */
    --eco-secondary: #10B981;
    --eco-secondary-light: #34D399;
    --eco-secondary-dark: #059669;

    /* Accent Colors - Cyan/Ocean */
    --eco-accent: #0EA5E9;
    --eco-accent-light: #38BDF8;
    --eco-accent-dark: #0284C7;

    /* Dark/Slate for text and backgrounds */
    --eco-dark: #1E293B;
    --eco-darker: #0F172A;
    --eco-slate: #334155;

    /* Premium Gradients - More Sophisticated */
    --eco-gradient-primary: linear-gradient(135deg, #0F766E 0%, #10B981 100%);
    --eco-gradient-header: linear-gradient(135deg, #115E59 0%, #0F766E 100%);
    --eco-gradient-sidebar: linear-gradient(180deg, #1E293B 0%, #0F172A 100%);
    --eco-gradient-button: linear-gradient(135deg, #0F766E 0%, #10B981 100%);
    --eco-gradient-success: linear-gradient(135deg, #10B981 0%, #34D399 100%);
    --eco-gradient-card: linear-gradient(135deg, rgba(15, 118, 110, 0.08) 0%, rgba(16, 185, 129, 0.08) 100%);
    --eco-gradient-premium: linear-gradient(135deg, #0F766E 0%, #0EA5E9 50%, #10B981 100%);
}

/* Override Bootstrap primary color to match EcoDBX */
[data-primary="color_3"] {
    --bs-primary: #0F766E !important;
    --bs-primary-rgb: 15, 118, 110 !important;
    --bs-primary-text-emphasis: #115E59 !important;
    --bs-primary-bg-subtle: rgba(15, 118, 110, 0.08) !important;
    --bs-primary-border-subtle: rgba(15, 118, 110, 0.2) !important;
    --bs-link-color: #0F766E !important;
    --bs-link-color-rgb: 15, 118, 110 !important;
    --bs-link-hover-color: #115E59 !important;
}

[data-primary="color_3"] .btn-primary {
    --bs-btn-bg: #0F766E !important;
    --bs-btn-border-color: #0F766E !important;
    --bs-btn-hover-bg: #115E59 !important;
    --bs-btn-hover-border-color: #115E59 !important;
    --bs-btn-active-bg: #115E59 !important;
    background: var(--eco-gradient-button) !important;
    border: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 14px rgba(15, 118, 110, 0.25) !important;
}

[data-primary="color_3"] .btn-primary:hover {
    background: linear-gradient(135deg, #115E59 0%, #059669 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(15, 118, 110, 0.4) !important;
}

/* Info button - EcoDBX Ocean Blue */
[data-primary="color_3"] .btn-info,
.btn-info {
    --bs-btn-bg: #0EA5E9 !important;
    --bs-btn-border-color: #0EA5E9 !important;
    --bs-btn-hover-bg: #0284C7 !important;
    --bs-btn-hover-border-color: #0284C7 !important;
    background: linear-gradient(135deg, #0EA5E9 0%, #0284C7 100%) !important;
    border: none !important;
    color: #ffffff !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.25) !important;
}

[data-primary="color_3"] .btn-info:hover,
.btn-info:hover {
    background: linear-gradient(135deg, #0284C7 0%, #0369A1 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.4) !important;
}

/* ============================================
   Navigation Header Styling
   ============================================ */
.nav-header {
    background: linear-gradient(273deg, #1E293B 0%, var(--eco-dark) 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15) !important;
}

.nav-header .brand-logo {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.nav-header .logo-abbr {
    position: relative !important;
    z-index: 1 !important;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.6)) drop-shadow(0 0 40px rgba(255, 255, 255, 0.4)) drop-shadow(0 0 60px rgba(84, 199, 54, 0.3)) !important;
    transition: all 0.3s ease !important;
}

.nav-header .logo-abbr:hover {
    filter: drop-shadow(0 0 25px rgba(255, 255, 255, 0.7)) drop-shadow(0 0 50px rgba(255, 255, 255, 0.5)) drop-shadow(0 0 80px rgba(84, 199, 54, 0.4)) !important;
    transform: scale(1.02) !important;
}

/* ============================================
   Header Styling - Match Sidebar
   ============================================ */
.header {
    background: linear-gradient(90deg, #1E293B 0%, #0F172A 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
}

.header-content {
    background: transparent !important;
}

.header .header-left .dashboard_bar {
    color: #ffffff !important;
    font-weight: 600 !important;
}

.header .nav-control {
    background: rgba(255, 255, 255, 0.1) !important;
}

.header .nav-control .hamburger span {
    background: #ffffff !important;
}

.header-right .header-profile>a.nav-link {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 12px !important;
    padding: 8px 12px !important;
}

.header-right .header-profile .header-info span,
.header-right .header-profile .header-info small,
.header-right .header-profile .header-info strong,
.header-right .header-profile .nav-link span,
.header-right .header-profile .nav-link small,
.header .header-profile span,
.header .header-profile small,
.header .header-profile .header-info * {
    color: #ffffff !important;
}

.header-right .header-profile .header-info span {
    font-weight: 600 !important;
}

.header-right .header-profile .header-info small {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 0.8rem !important;
}

.header-right .notification_dropdown .nav-link,
.header-right .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
}

.header-right .notification_dropdown .nav-link:hover,
.header-right .nav-link:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

.header-right .header-profile .dropdown-menu {
    background: #1E293B !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3) !important;
}

.header-right .header-profile .dropdown-menu a {
    color: rgba(255, 255, 255, 0.85) !important;
}

.header-right .header-profile .dropdown-menu a:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

/* ============================================
   Sidebar Styling with Gradient
   ============================================ */
.deznav {
    background: var(--eco-gradient-sidebar) !important;
}

.deznav .metismenu>li>a {
    color: rgba(255, 255, 255, 0.85) !important;
    transition: all 0.3s ease !important;
}

.deznav .metismenu>li>a:hover,
.deznav .metismenu>li.mm-active>a {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.15) !important;
    border-radius: 10px;
}

.deznav .metismenu>li>a i,
.deznav .metismenu>li>a .nav-text {
    color: rgba(255, 255, 255, 0.9) !important;
}

.deznav .metismenu>li.mm-active>a i {
    color: #4ADE80 !important;
}

.deznav .menu-title {
    color: rgba(255, 255, 255, 0.6) !important;
    font-weight: 600;
    letter-spacing: 1px;
}

/* ============================================
   Card Styling with Modern Look
   ============================================ */
.card {
    border: none !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.3s ease !important;
}

.card:hover {
    box-shadow: 0 8px 30px rgba(13, 148, 136, 0.15) !important;
    transform: translateY(-3px);
}

/* Profile Page Cards - Auto height based on content */
.profile-settings-page .card,
.content-body .row>[class*="col-"]>.card {
    height: auto !important;
    min-height: auto !important;
    align-self: flex-start !important;
}

/* Prevent equal height stretching in rows */
.content-body .row {
    align-items: flex-start !important;
}

.card-header {
    background: transparent !important;
    border-bottom: 1px solid rgba(13, 148, 136, 0.1) !important;
}

.card-title {
    color: var(--eco-dark) !important;
    font-weight: 600;
}

/* Stats Cards with Gradient Backgrounds */
.stats-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fffe 100%) !important;
}

.stats-card:hover {
    background: var(--eco-gradient-card) !important;
}

/* Reading Detail Hero Card */
.reading-detail-hero {
    background: var(--eco-gradient-primary) !important;
    color: #ffffff !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    position: relative !important;
}

.reading-detail-hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(50%, -50%);
}

.reading-detail-hero .card-body {
    position: relative;
    z-index: 1;
}

.reading-detail-hero h1,
.reading-detail-hero h2,
.reading-detail-hero h3,
.reading-detail-hero h4,
.reading-detail-hero h5,
.reading-detail-hero h6,
.reading-detail-hero p,
.reading-detail-hero span,
.reading-detail-hero .text-muted {
    color: rgba(255, 255, 255, 0.9) !important;
}

.reading-detail-hero .badge {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    backdrop-filter: blur(10px);
}

/* Fix icon containers inside hero cards */
.reading-detail-hero .bg-primary,
.reading-detail-hero .bg-opacity-10,
.reading-detail-hero [class*="bg-primary"] {
    background: rgba(255, 255, 255, 0.2) !important;
}

.reading-detail-hero .text-primary,
.reading-detail-hero .text-primary i,
.reading-detail-hero i {
    color: #ffffff !important;
}

.reading-detail-hero .rounded-circle {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

/* ============================================
   Success, Info, Warning States
   ============================================ */
.bg-success,
.badge-success {
    background: var(--eco-gradient-success) !important;
}

.text-success {
    color: var(--eco-secondary) !important;
}

.bg-primary {
    background: var(--eco-gradient-primary) !important;
}

/* Gradient Primary Card */
.bg-gradient-primary {
    background: var(--eco-gradient-primary) !important;
}

.card.bg-gradient-primary {
    border: none !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    position: relative !important;
}

.card.bg-gradient-primary::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.card.bg-gradient-primary .card-body {
    position: relative;
    z-index: 1;
}

.card.bg-gradient-primary h1,
.card.bg-gradient-primary h2,
.card.bg-gradient-primary h3,
.card.bg-gradient-primary h4,
.card.bg-gradient-primary h5,
.card.bg-gradient-primary h6 {
    color: #ffffff !important;
}

.card.bg-gradient-primary i {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* ============================================
   Gradient Cards (Owner Dashboard)
   ============================================ */

/* Professional EcoDBX themed gradient cards */
.gradient-primary {
    background: linear-gradient(135deg, #0F766E 0%, #115E59 100%) !important;
}

.gradient-success {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
}

.gradient-info {
    background: linear-gradient(135deg, #0284C7 0%, #0369A1 100%) !important;
}

.gradient-warning {
    background: linear-gradient(135deg, #D97706 0%, #B45309 100%) !important;
}

.gradient-danger {
    background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%) !important;
}

.gradient-secondary {
    background: linear-gradient(135deg, #475569 0%, #334155 100%) !important;
}

/* Stats Cards - Professional Clean Look */
.stats-card {
    border: none !important;
    border-radius: 16px !important;
    position: relative !important;
    overflow: hidden !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
}

.stats-card[class*="gradient-"] {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15) !important;
}

/* Decorative overlay */
.stats-card[class*="gradient-"]::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    pointer-events: none;
    border-radius: 50%;
    transform: translate(30%, -30%);
}

/* Text visibility on gradient cards */
.stats-card[class*="gradient-"] .card-body {
    position: relative;
    z-index: 1;
}

.stats-card[class*="gradient-"] .text-white,
.stats-card[class*="gradient-"] h1,
.stats-card[class*="gradient-"] h2,
.stats-card[class*="gradient-"] h3,
.stats-card[class*="gradient-"] h4,
.stats-card[class*="gradient-"] h5,
.stats-card[class*="gradient-"] h6 {
    color: #ffffff !important;
    opacity: 1 !important;
}

.stats-card[class*="gradient-"] .text-white-50 {
    color: rgba(255, 255, 255, 0.75) !important;
    opacity: 1 !important;
}

.stats-card[class*="gradient-"] i {
    color: #ffffff !important;
    opacity: 1 !important;
}

.stats-card[class*="gradient-"] .bg-white.bg-opacity-25,
.stats-card[class*="gradient-"] .rounded-circle {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

/* Hover lift effect - FIXED to keep text visible */
.hover-lift {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.hover-lift:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2) !important;
}

/* Ensure text stays visible on hover */
.hover-lift:hover .text-white,
.hover-lift:hover h1,
.hover-lift:hover h2,
.hover-lift:hover h3,
.hover-lift:hover h4,
.hover-lift:hover h5,
.hover-lift:hover h6,
.hover-lift:hover .text-white-50,
.hover-lift:hover i,
.hover-lift:hover span {
    color: inherit !important;
    opacity: 1 !important;
}

.text-primary {
    color: var(--eco-primary) !important;
}

.bg-primary-light {
    background: rgba(13, 148, 136, 0.1) !important;
}

.bg-success-light {
    background: rgba(34, 197, 94, 0.1) !important;
}

/* Global icon container fixes for visibility */
.bg-primary.bg-opacity-10 {
    background: rgba(13, 148, 136, 0.15) !important;
}

.bg-primary.bg-opacity-10.text-primary,
.bg-primary.bg-opacity-10 .text-primary,
.bg-primary.bg-opacity-10.text-primary i,
.bg-primary.bg-opacity-10 i {
    color: var(--eco-primary) !important;
}

/* When inside gradient backgrounds, make icons white */
.reading-detail-hero .bg-primary.bg-opacity-10 {
    background: rgba(255, 255, 255, 0.2) !important;
}

.reading-detail-hero .bg-primary.bg-opacity-10.text-primary,
.reading-detail-hero .bg-primary.bg-opacity-10 i,
.reading-detail-hero .text-primary {
    color: #ffffff !important;
}

/* ============================================
   Button Styles
   ============================================ */
.btn-outline-primary {
    color: var(--eco-primary) !important;
    border-color: var(--eco-primary) !important;
}

.btn-outline-primary:hover {
    background: var(--eco-gradient-button) !important;
    color: #ffffff !important;
    border-color: transparent !important;
}

.btn-success {
    background: var(--eco-gradient-success) !important;
    border: none !important;
}

.btn-success:hover {
    background: linear-gradient(135deg, #16A34A 0%, #22C55E 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.35) !important;
}

/* Rounded Buttons */
.btn-rounded {
    border-radius: 50px !important;
}

/* View Details Button */
.btn-view-details {
    background: var(--eco-gradient-button) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 10px 20px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.btn-view-details:hover {
    background: linear-gradient(135deg, #0F766E 0%, #16A34A 100%) !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(13, 148, 136, 0.35) !important;
}

.btn-view-details:active,
.btn-view-details:focus {
    background: linear-gradient(135deg, #0F766E 0%, #16A34A 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(13, 148, 136, 0.4) !important;
}

/* ============================================
   Page Title / Breadcrumb Area
   ============================================ */
.page-titles {
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.05) 0%, rgba(34, 197, 94, 0.05) 100%) !important;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

/* ============================================
   Data Tables
   ============================================ */
.table thead th {
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.08) 0%, rgba(34, 197, 94, 0.08) 100%) !important;
    color: var(--eco-dark) !important;
    font-weight: 600;
    border: none !important;
}

.table tbody tr:hover {
    background: rgba(13, 148, 136, 0.05) !important;
}

/* ============================================
   Form Controls
   ============================================ */
.form-control:focus,
.form-select:focus {
    border-color: var(--eco-primary) !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 148, 136, 0.25) !important;
}

/* ============================================
   Charts Area
   ============================================ */
.apexcharts-tooltip {
    border-radius: 10px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
}

/* ============================================
   Environmental Impact Section
   ============================================ */
.environmental-impact {
    background: var(--eco-gradient-card) !important;
    border-radius: 16px;
    padding: 1.5rem;
}

.environmental-impact .icon {
    background: var(--eco-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Sustainability Hero Card */
.sustainability-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3d3e 100%) !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    position: relative !important;
    border: 1px solid rgba(84, 199, 54, 0.3) !important;
    box-shadow:
        0 15px 50px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(84, 199, 54, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

.sustainability-hero::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(84, 199, 54, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    animation: heroGlow 8s ease-in-out infinite;
}

@keyframes heroGlow {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

.sustainability-hero::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(84, 199, 54, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.sustainability-hero .card-body {
    position: relative;
    z-index: 1;
}

.sustainability-hero h1,
.sustainability-hero h2,
.sustainability-hero h3,
.sustainability-hero h4,
.sustainability-hero h5,
.sustainability-hero h6 {
    color: #ffffff !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.sustainability-hero .text-white-50 {
    color: rgba(255, 255, 255, 0.75) !important;
}

.sustainability-hero i {
    color: #54c736 !important;
}

.sustainability-hero .btn-light {
    background: linear-gradient(135deg, #54c736 0%, #45a82d 100%) !important;
    color: #ffffff !important;
    border: none !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 15px rgba(84, 199, 54, 0.3) !important;
}

.sustainability-hero .btn-light:hover {
    background: linear-gradient(135deg, #5fd93f 0%, #54c736 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(84, 199, 54, 0.4) !important;
}

.sustainability-hero .btn-success {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(10px);
}

.sustainability-hero .btn-success:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-2px);
}

/* ============================================
   Badges with Gradients
   ============================================ */
.badge-primary {
    background: var(--eco-gradient-primary) !important;
}

.badge.badge-success,
.badge.bg-success {
    background: var(--eco-gradient-success) !important;
}

/* ============================================
   Pagination Active State
   ============================================ */
.page-item.active .page-link {
    background: var(--eco-gradient-primary) !important;
    border-color: transparent !important;
}

.page-link {
    color: var(--eco-primary) !important;
}

.page-link:hover {
    background: rgba(13, 148, 136, 0.1) !important;
}

/* ============================================
   Dropdown & Select Styling
   ============================================ */
.dropdown-item:hover,
.dropdown-item:focus {
    background: rgba(13, 148, 136, 0.1) !important;
    color: var(--eco-primary) !important;
}

/* ============================================
   Loading States
   ============================================ */
.spinner-border {
    color: var(--eco-primary) !important;
}

.sk-bounce1,
.sk-bounce2,
.sk-bounce3 {
    background: var(--eco-primary) !important;
}

/* ============================================
   Scrollbar Styling
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--eco-primary) 0%, var(--eco-secondary) 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--eco-primary-dark) 0%, var(--eco-secondary-dark) 100%);
}

/* ============================================
   Welcome Banner
   ============================================ */
.welcome-banner,
.card.bg-primary-light {
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.1) 0%, rgba(34, 197, 94, 0.15) 100%) !important;
    border: 1px solid rgba(13, 148, 136, 0.2) !important;
}

/* ============================================
   Activity Timeline
   ============================================ */
.activity-timeline .badge {
    background: var(--eco-gradient-primary) !important;
}

/* ============================================
   Header Search & Icons
   ============================================ */
.header-right .notification_dropdown .nav-link {
    color: var(--eco-dark) !important;
}

.header-right .notification_dropdown .nav-link:hover {
    color: var(--eco-primary) !important;
}

/* Profile Photo Placeholder */
.profile-photo-placeholder {
    background: var(--eco-gradient-primary) !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 4px 15px rgba(13, 148, 136, 0.3) !important;
}

.profile-photo-placeholder i {
    color: #ffffff !important;
}

/* ============================================
   Subscription / Payment Cards
   ============================================ */
.subscription-header {
    background: var(--eco-gradient-primary) !important;
    padding: 2rem !important;
    border-radius: 16px 16px 0 0 !important;
    position: relative !important;
    overflow: hidden !important;
}

.subscription-header::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -30%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.subscription-header .plan-badge {
    display: inline-block;
}

.subscription-header .plan-badge span {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    padding: 6px 16px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    backdrop-filter: blur(10px);
}

.subscription-header .plan-price {
    position: relative;
    z-index: 1;
}

.subscription-header .plan-price .price {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff !important;
}

.subscription-header .plan-price .period {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8) !important;
}

.subscription-card.premium {
    background: var(--eco-gradient-primary) !important;
    color: #ffffff !important;
}

.subscription-card .price {
    color: var(--eco-primary) !important;
}

/* ============================================
   Modal Styling
   ============================================ */
.modal-header {
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.05) 0%, rgba(34, 197, 94, 0.05) 100%) !important;
    border-bottom: 1px solid rgba(13, 148, 136, 0.1) !important;
}

.modal-content {
    border-radius: 16px !important;
    border: none !important;
}

/* AI Modal Specific Styling */
.ai-modal-content {
    border-radius: 20px !important;
    border: none !important;
    overflow: hidden !important;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15) !important;
}

.ai-modal-header {
    background: var(--eco-gradient-primary) !important;
    padding: 1.5rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    position: relative !important;
}

.ai-modal-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.ai-modal-title-wrapper {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    position: relative;
    z-index: 1;
}

.ai-modal-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2) !important;
    border-radius: 12px;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    backdrop-filter: blur(10px);
}

.ai-modal-icon i {
    font-size: 1.5rem;
    color: #ffffff !important;
}

.ai-modal-title {
    color: #ffffff !important;
    font-weight: 600 !important;
    margin: 0 !important;
}

.ai-modal-subtitle {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 0.85rem;
}

.ai-modal-close {
    background: rgba(255, 255, 255, 0.15) !important;
    border: none !important;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.ai-modal-close i {
    color: #ffffff !important;
}

.ai-modal-close:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    transform: rotate(90deg);
}

.ai-modal-body {
    padding: 1.5rem !important;
    background: #ffffff;
}

.ai-modal-badges {
    display: flex !important;
    gap: 0.75rem !important;
    flex-wrap: wrap !important;
    margin-bottom: 1.5rem !important;
}

.ai-modal-badge {
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex !important;
    align-items: center !important;
}

.ai-modal-badge.confidence-high {
    background: rgba(34, 197, 94, 0.15) !important;
    color: var(--eco-secondary-dark) !important;
}

.ai-modal-badge.status-verified {
    background: rgba(13, 148, 136, 0.15) !important;
    color: var(--eco-primary-dark) !important;
}

.ai-modal-remarks-container {
    background: #f8fffe;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(13, 148, 136, 0.1);
}

.ai-modal-remarks-header {
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.08) 0%, rgba(34, 197, 94, 0.08) 100%);
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: var(--eco-dark);
    border-bottom: 1px solid rgba(13, 148, 136, 0.1);
}

.ai-modal-remarks-content {
    padding: 1rem;
}

.ai-modal-remarks-content pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: inherit;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
}

.ai-modal-footer {
    padding: 1rem 1.5rem !important;
    background: #f8fffe;
    border-top: 1px solid rgba(13, 148, 136, 0.1);
    display: flex !important;
    justify-content: flex-end !important;
}

.ai-modal-btn {
    background: var(--eco-gradient-button) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 10px 24px !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    cursor: pointer;
    transition: all 0.3s ease !important;
}

.ai-modal-btn:hover {
    background: linear-gradient(135deg, #0F766E 0%, #16A34A 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(13, 148, 136, 0.35) !important;
}

/* ============================================
   Alert Boxes
   ============================================ */
.alert-primary {
    background: rgba(13, 148, 136, 0.1) !important;
    border-color: rgba(13, 148, 136, 0.2) !important;
    color: var(--eco-dark) !important;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1) !important;
    border-color: rgba(34, 197, 94, 0.2) !important;
    color: var(--eco-secondary-dark) !important;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.02) 0%, rgba(34, 197, 94, 0.02) 100%) !important;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .card {
        border-radius: 12px !important;
    }

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

/* ============================================
   Animation Classes
   ============================================ */
.eco-fade-in {
    animation: ecoFadeIn 0.5s ease-out;
}

@keyframes ecoFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.eco-pulse {
    animation: ecoPulse 2s infinite;
}

@keyframes ecoPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(13, 148, 136, 0.4);
    }

    50% {
        box-shadow: 0 0 0 15px rgba(13, 148, 136, 0);
    }
}

/* ============================================
   Sidebar Logout Button - Modern & Animated
   ============================================ */
.sidebar-logout-wrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    width: var(--dz-sidebar-width, 16.5rem);
    padding: 1rem 1.25rem 1.5rem;
    background: linear-gradient(to top, var(--eco-darker, #0F172A) 0%, var(--eco-darker, #0F172A) 80%, transparent 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 10;
}

.logout-form {
    width: 100%;
}

.sidebar-logout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.15) 100%);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 14px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-logout-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.sidebar-logout-btn:hover::before {
    left: 100%;
}

.sidebar-logout-btn:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.9) 0%, rgba(220, 38, 38, 1) 100%);
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.4);
}

.logout-icon-wrapper {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.2);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.sidebar-logout-btn:hover .logout-icon-wrapper {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(-5deg) scale(1.1);
}

.logout-icon {
    font-size: 1.1rem;
    color: #EF4444;
    transition: all 0.3s ease;
}

.sidebar-logout-btn:hover .logout-icon {
    color: #ffffff;
    animation: logoutShake 0.5s ease-in-out;
}

@keyframes logoutShake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-3px);
    }

    50% {
        transform: translateX(3px);
    }

    75% {
        transform: translateX(-3px);
    }
}

.logout-ripple {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(239, 68, 68, 0.3) 0%, transparent 70%);
    border-radius: 10px;
    opacity: 0;
    animation: ripplePulse 2s infinite;
}

.sidebar-logout-btn:hover .logout-ripple {
    animation: none;
    opacity: 0;
}

@keyframes ripplePulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.3;
    }
}

.logout-text {
    flex: 1;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
}

.sidebar-logout-btn:hover .logout-text {
    color: #ffffff;
    letter-spacing: 0.5px;
}

.logout-arrow {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.logout-arrow i {
    font-size: 0.8rem;
    color: #ffffff;
}

.sidebar-logout-btn:hover .logout-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Active/Click State */
.sidebar-logout-btn:active {
    transform: translateY(-1px) scale(0.98);
}

/* Focus State for Accessibility */
.sidebar-logout-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3);
}

/* Mini Sidebar State */
[data-sidebar-style="mini"] .sidebar-logout-wrapper {
    padding: 1rem 0.5rem 1.5rem;
}

[data-sidebar-style="mini"] .sidebar-logout-btn {
    padding: 12px;
    justify-content: center;
}

[data-sidebar-style="mini"] .logout-text,
[data-sidebar-style="mini"] .logout-arrow {
    display: none;
}

[data-sidebar-style="mini"] .logout-icon-wrapper {
    margin: 0;
}

/* Mobile Responsive - Hide logout when sidebar is collapsed */
@media (max-width: 991.98px) {
    .sidebar-logout-wrapper {
        display: none;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    /* Show logout button ONLY when sidebar is visible on mobile */
    .deznav.mm-show~.sidebar-logout-wrapper,
    .deznav.mm-show .sidebar-logout-wrapper,
    body.menu-toggle .sidebar-logout-wrapper {
        display: none;
    }
}

/* Alternative: Position logout inside the sidebar for mobile */
@media (max-width: 991.98px) {
    .sidebar-logout-wrapper {
        position: absolute;
        width: 100%;
        left: -100%;
        opacity: 0;
        transition: left 0.3s ease, opacity 0.3s ease;
    }

    /* When sidebar is shown (mm-show class), show the logout */
    .mm-show~.sidebar-logout-wrapper,
    body:has(.deznav.mm-show) .sidebar-logout-wrapper {
        left: 0;
        opacity: 1;
        display: block;
        visibility: visible;
    }
}

/* ============================================
   Content Body - Premium Aurora Gradient BG
   ============================================ */
.content-body {
    background: #1a0a1c !important;
    position: relative !important;
    overflow-x: hidden !important;
    min-height: 100vh !important;
}

/* Main aurora gradient - super smooth */
.content-body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(45deg,
            rgba(116, 30, 120, 1) 0%,
            rgba(155, 45, 159, 0.95) 25%,
            rgba(84, 199, 54, 0.15) 50%,
            rgba(116, 30, 120, 0.98) 75%,
            rgba(90, 22, 96, 1) 100%);
    background-size: 400% 400%;
    animation: premiumAurora 45s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes premiumAurora {

    0%,
    100% {
        background-position: 0% 50%;
    }

    25% {
        background-position: 50% 0%;
    }

    50% {
        background-position: 100% 50%;
    }

    75% {
        background-position: 50% 100%;
    }
}

/* Floating color blobs */
.content-body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 50% 40% at 20% 30%, rgba(84, 199, 54, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 70%, rgba(155, 45, 159, 0.35) 0%, transparent 55%),
        radial-gradient(ellipse 40% 60% at 50% 50%, rgba(116, 30, 120, 0.25) 0%, transparent 50%);
    animation: blobDance 60s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
    filter: blur(60px);
}

@keyframes blobDance {

    0%,
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    25% {
        transform: translateY(-3%) scale(1.05);
        opacity: 0.9;
    }

    50% {
        transform: translateY(2%) scale(0.98);
        opacity: 1;
    }

    75% {
        transform: translateY(-2%) scale(1.02);
        opacity: 0.95;
    }
}

/* Ensure content stays above */
.content-body>.container-fluid,
.content-body>.container-sm,
.content-body>.container-md,
.content-body>.container-lg,
.content-body>.container-xl,
.content-body>.container {
    position: relative !important;
    z-index: 1 !important;
}

/* Premium glass cards */
.content-body .card {
    background: rgb(255, 255, 255) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 20px !important;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.18),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Exception for hero cards - preserve their gradients */
.content-body .card.sustainability-hero,
.content-body .card.reading-detail-hero,
.content-body .card.bg-gradient-primary,
.content-body .card.bg-primary,
.content-body .card[class*="gradient-"] {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3d3e 100%) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.content-body .card:hover {
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.22),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset !important;
    transform: translateY(-8px) !important;
}

/* Exception for hero cards hover - preserve their gradients */
.content-body .card.sustainability-hero:hover,
.content-body .card.reading-detail-hero:hover,
.content-body .card.bg-gradient-primary:hover,
.content-body .card.bg-primary:hover,
.content-body .card[class*="gradient-"]:hover {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3d3e 100%) !important;
    transform: translateY(-4px) !important;
}

/* Page titles glass effect */
.content-body .page-titles {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
}

.content-body .page-titles .page-title,
.content-body .page-titles h4 {
    color: #ffffff !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.25) !important;
}

.content-body .page-titles .breadcrumb .breadcrumb-item,
.content-body .page-titles .breadcrumb .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.85) !important;
}

.content-body .page-titles .breadcrumb .breadcrumb-item a:hover {
    color: #7adb5a !important;
}

.content-body .page-titles .breadcrumb .breadcrumb-item.active {
    color: #54c736 !important;
    font-weight: 600 !important;
}

/* Stats card glow animation */
@keyframes cardGlow {

    0%,
    100% {
        box-shadow:
            0 10px 40px rgba(0, 0, 0, 0.18),
            0 0 20px rgba(84, 199, 54, 0.1);
    }

    50% {
        box-shadow:
            0 10px 40px rgba(0, 0, 0, 0.18),
            0 0 35px rgba(84, 199, 54, 0.2);
    }
}

.content-body .card.stats-card,
.content-body .card.hover-lift {
    animation: cardGlow 4s ease-in-out infinite;
}

/* Text visibility on purple background */
.content-body>.container-fluid>.text-black,
.content-body>.container>.text-black,
.content-body .text-black:not(.card .text-black),
.content-body>.container-fluid>h1,
.content-body>.container-fluid>h2,
.content-body>.container-fluid>h3,
.content-body>.container-fluid>h4,
.content-body>.container-fluid>h5,
.content-body>.container-fluid>h6,
.content-body>.container-fluid>p,
.content-body>.container-fluid>.row>.col-12>h1,
.content-body>.container-fluid>.row>.col-12>h2,
.content-body>.container-fluid>.row>.col-12>h3,
.content-body>.container-fluid>.row>.col-12>h4,
.content-body>.container-fluid>.row>.col-12>p,
.content-body>.container-fluid>.row>[class*="col-"]>h1:not(.card h1),
.content-body>.container-fluid>.row>[class*="col-"]>h2:not(.card h2),
.content-body>.container-fluid>.row>[class*="col-"]>h3:not(.card h3),
.content-body>.container-fluid>.row>[class*="col-"]>h4:not(.card h4),
.content-body>.container-fluid>.row>[class*="col-"]>p:not(.card p) {
    color: #ffffff !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Subtext/description on purple bg */
.content-body>.container-fluid>.row>[class*="col-"]>.text-muted:not(.card .text-muted),
.content-body>.container-fluid>.text-muted:not(.card .text-muted) {
    color: rgba(255, 255, 255, 0.75) !important;
}

/* Form inputs on purple background */
.content-body .input-group:not(.card .input-group) {
    background: rgba(255, 255, 255, 0.95) !important;
    border-radius: 12px !important;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.content-body .input-group:not(.card .input-group) .form-control {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.content-body .input-group:not(.card .input-group) .input-group-text {
    background: transparent !important;
    border: none !important;
    color: #666 !important;
}

.content-body .form-control:not(.card .form-control):not(.input-group .form-control) {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

.content-body .form-control:focus:not(.card .form-control) {
    border-color: #54c736 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1), 0 0 0 3px rgba(84, 199, 54, 0.15) !important;
}

/* Select dropdowns on purple bg */
.content-body .form-select:not(.card .form-select) {
    background-color: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}
