/* ══════════════════════════════════════════════════
   INDEX DASHBOARD SPECIFIC STYLES
══════════════════════════════════════════════════ */

/* Custom Scrollbars for Widgets */
.db-scrollable-y {
    max-height: 380px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
}

.db-scrollable-y::-webkit-scrollbar {
    width: 6px;
}

.db-scrollable-y::-webkit-scrollbar-track {
    background: transparent;
}

.db-scrollable-y::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.db-scrollable-y:hover::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
}

/* ── Connections Module ── */
.db-conn-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.75rem;
}

.db-conn-item {
    border-radius: 14px;
    border: 1.5px solid rgba(22, 16, 106, 0.08);
    background: rgba(255, 255, 255, 0.7);
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
}

.db-conn-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.db-conn-meta {
    flex-grow: 1;
    min-width: 0;
}

.db-conn-label {
    font-size: clamp(0.7rem, 1.2vw + 0.4rem, 0.85rem);
    font-weight: 600;
}

.db-conn-label i {
    font-size: clamp(0.7rem, 1.2vw + 0.4rem, 0.95rem);
    font-weight: 500;
    color: #222;
}

.quick-action-btn i {
    font-weight: 500;
    color: #222;
}

.quick-action-btn {
    /* color: #3b82f6; */
    color: #222;
}

.db-conn-label a.share-ids {
    color: #222;
}

.share-id-box {
    background-color: rgb(255 255 255);
}

.db-conn-val {
    font-size: clamp(0.85rem, 1.5vw + 0.5rem, 0.95rem);
    font-weight: 700;
    color: var(--bs-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.db-conn-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 4px;
}

/* ── Quick Actions Grid ── */
.db-qa-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.75rem;
}

.db-qa-btn {
    position: relative;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 16px;
    padding: 1.25rem 0.5rem;
    text-align: center;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    z-index: 1;
}

.db-qa-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    z-index: -1;
    transition: opacity 0.4s ease;
    opacity: 0;
}

.db-qa-btn .qa-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    transition: all 0.4s ease;
}

.db-qa-btn span {
    font-size: clamp(0.75rem, 1vw + 0.5rem, 0.85rem);
    font-weight: 700;
    color: var(--bs-dark);
    line-height: 1.2;
    transition: color 0.3s ease;
}

/* Hover effects */
.db-qa-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    border-color: transparent;
}

.db-qa-btn:hover .qa-icon-wrap {
    transform: scale(1.1) rotate(5deg);
}

/* Variants */
.qa-promo .qa-icon-wrap {
    background: rgba(var(--bs-warning-rgb), 0.15);
    color: var(--bs-warning);
}

.qa-promo:hover::before {
    background: linear-gradient(135deg, #ffb100, #ff9800);
    opacity: 1;
}

.qa-info .qa-icon-wrap {
    background: rgba(var(--bs-info-rgb), 0.15);
    color: var(--bs-info);
}

.qa-info:hover::before {
    background: linear-gradient(135deg, #0dcaf0, #00bcd4);
    opacity: 1;
}

.qa-action .qa-icon-wrap {
    background: rgba(var(--bs-danger-rgb), 0.15);
    color: var(--bs-danger);
}

.qa-action:hover::before {
    background: linear-gradient(135deg, #dc3545, #f44336);
    opacity: 1;
}

/* Common text inversion on hover */
.db-qa-btn:hover span,
.db-qa-btn:hover .qa-icon-wrap {
    color: #fff !important;
}

.db-qa-btn:hover .qa-icon-wrap {
    background: rgba(255, 255, 255, 0.25);
}


/* ── CMS / Articles ── */
.db-cms-item {
    background: #fdfdfd;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
    position: relative;
    overflow: hidden;
}

.db-cms-item:last-child {
    margin-bottom: 0;
}

.db-cms-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    background: #eee;
    flex-shrink: 0;
}

.db-cms-content {
    flex-grow: 1;
    min-width: 0;
}

.db-cms-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--bs-dark);
    margin-bottom: 0.25rem;
    line-height: 1.3;
    display: block;
    text-decoration: none;
    transition: color 0.2s;
}

a.db-cms-title:hover {
    color: var(--bs-primary) !important;
}

.db-cms-meta {
    font-size: 0.75rem;
    color: var(--bs-gray-600);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.db-cms-expiring {
    background: rgba(var(--bs-danger-rgb), 0.1);
    color: var(--bs-danger);
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ── Welfare & Insurance ── */
.db-welfare-card {
    background: linear-gradient(145deg, #ffffff, #fcfcfc);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
}

.db-welfare-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(var(--bs-success-rgb), 0.05) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    transform: translate(30%, -30%);
    pointer-events: none;
}

.welfare-stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
}

.welfare-stat-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.welfare-stat-val {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--bs-dark);
}

/* Utilities for extreme content */
.text-max-2-lines {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Hero Banner Dots */
.db-hero-dots {
    bottom: 15px !important;
    margin-bottom: 0 !important;
}

.db-hero-banner.fade-up {
    opacity: 1;
}

.db-hero-banner .db-hero-dots button {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background-color: var(--primary);
    opacity: 0.4;
    margin: 0 4px;
    transition: all 0.3s ease;
    padding: 0;
}

.db-hero-banner .db-hero-dots .active {
    opacity: 1;
    transform: scale(1.3);
}

/* Individual Slide Close Button */
.db-slide-close-btn {
    opacity: 0.8;
    font-size: 1.4rem;
    transition: opacity 0.2s ease;
}

.db-slide-close-btn:hover {
    opacity: 1;
}

/* Slide Dismiss Modal Options */
.dismiss-option-label {
    border-color: #dee2e6 !important;
    transition: all 0.2s ease;
}

.dismiss-option-label:hover {
    border-color: #adb5bd !important;
    background-color: #f8f9fa;
}

.btn-check:checked+.dismiss-option-label {
    border-color: var(--bs-success) !important;
    background-color: rgba(var(--bs-success-rgb), 0.04) !important;
}

.dismiss-option-check {
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
}

.btn-check:checked+.dismiss-option-label .dismiss-option-check {
    opacity: 1;
    transform: scale(1);
}

/* Custom Tracker Tabs Design */
.tracker-nav-pills {
    background: #f1f5f9 !important;
    border-radius: 50px !important;
    padding: 0.35rem !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03);
}

.tracker-nav-pills .nav-link {
    color: #64748b;
    border-radius: 50px;
    font-size: clamp(0.75rem, 1.5vw, 0.85rem) !important;
    font-weight: 600 !important;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem !important;
}

.tracker-nav-pills .nav-link:hover {
    color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.08);
}

.tracker-nav-pills .nav-link.active {
    background: linear-gradient(135deg, #4089f4 0%, #5f9df4 100%);
    color: #fff;
    box-shadow: 0px 1px 7px rgba(37, 99, 235, 0.3);
}

.tracker-nav-pills .nav-link i {
    font-size: 1rem;
    margin-right: 0.3rem;
    font-weight: 500;
}

/* ── Global Search ── */
.global-search-label {
    min-width: auto;
    white-space: nowrap;
    font-size: 0.85rem;
    height: -webkit-fill-available;
    background-color: #e2ebf9;
    color: #333;
}

@media (min-width: 768px) {
    .global-search-label {
        min-width: auto;
        font-size: .9rem;
    }
}

/* ── Hero Banner Energy Pastel Theme ── */
.db-hero-banner {
    background: linear-gradient(-45deg, #fbc2eb, #a6c1ee, #ffc3a0, #f8cdda) !important;
    background-size: 400% 400% !important;
    animation: heroEnergyBG 15s ease infinite !important;
    border: 1px solid rgba(255, 255, 255, 0.7) !important;
    box-shadow: 0 15px 35px rgba(251, 194, 235, 0.4) !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    position: relative;
}

@keyframes heroEnergyBG {
    0% {
        background-position: 0% 50%;
    }

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

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

/* Force text to dark for pastel contrast */
.db-hero-banner .text-dark {
    color: #0f172a !important;
}

.db-hero-banner .text-muted,
.db-hero-banner .text-secondary {
    color: #475569 !important;
    opacity: 1 !important;
}

/* Subtext opacity */
.db-hero-banner .db-event-details,
.db-hero-banner .db-event-type,
.db-hero-banner .db-event-details i,
.db-hero-banner .db-event-type i {
    color: #475569 !important;
}

/* Badge update */
.db-hero-banner .badge.bg-white {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    color: #3b82f6 !important;
}

/* Make event title pop */
.db-hero-banner .db-event-title {
    background: linear-gradient(135deg, #0f172a, #334155) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    text-shadow: none !important;
}

/* Outline button fix */
.db-hero-banner .db-hero-btn-outline {
    background: rgba(255, 255, 255, 0.6) !important;
    border-color: rgba(255, 255, 255, 0.9) !important;
    color: #2563eb !important;
    font-weight: 700;
}

.db-hero-banner .db-hero-btn-outline:hover {
    background: #ffffff !important;
    color: #1d4ed8 !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.2);
}

.db-hero-glow {
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.7) 0%, transparent 70%);
    top: -150px;
    right: -100px;
    pointer-events: none;
    z-index: 0;
}

.db-hero-glow::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.5) 0%, transparent 70%);
    bottom: -200px;
    left: -150px;
}

/* ── New Decorative Elements ── */
.db-hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(255, 255, 255, 0.5) 1px, transparent 1px);
    background-size: 16px 16px;
    pointer-events: none;
    z-index: 1;
}

.db-hero-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(50px);
    z-index: 0;
    opacity: 0.8;
    animation: pulseShape 8s ease-in-out infinite alternate;
    pointer-events: none;
}

.db-hero-shape-1 {
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.7);
    top: -50px;
    left: -50px;
}

.db-hero-shape-2 {
    width: 250px;
    height: 250px;
    background: rgba(255, 255, 255, 0.6);
    bottom: -100px;
    right: 15%;
    animation-delay: -4s;
}

@keyframes pulseShape {
    0% {
        transform: scale(1) translate(0, 0);
        opacity: 0.3;
    }

    100% {
        transform: scale(1.3) translate(20px, -20px);
        opacity: 0.6;
    }
}

@keyframes floatElement {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-5px);
    }

    100% {
        transform: translateY(0px);
    }
}

.db-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    transition: 0.22s;
    white-space: nowrap;
}

.db-hero-btn-outline {
    border: 1.5px solid var(--primary) !important;
    color: var(--primary) !important;
    background: transparent !important;
}

.db-hero-btn-outline:hover {
    color: #ffffff !important;
    background: var(--primary) !important;
}

.db-hero-content-wrap {
    row-gap: 16px;
    position: relative;
    z-index: 2;
}

.db-calendar-block {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
    border: 1px solid rgba(59, 130, 246, 0.15);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 20px !important;
    animation: floatElement 5s ease-in-out infinite;
}

.db-calendar-month {
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: var(--primary) !important;
    font-weight: 800 !important;
}

.db-calendar-date {
    font-size: 2.1rem;
    font-weight: 900 !important;
    color: #1e293b !important;
    line-height: 1;
    letter-spacing: -1px;
}

.db-hero-btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #1e40af 100%);
    color: #fff !important;
    border: none;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.db-hero-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(37, 99, 235, 0.35);
    background: linear-gradient(135deg, #1e40af 0%, var(--primary) 100%);
}

.db-badge-tomorrow {
    font-size: 0.65rem;
    letter-spacing: 0.5px;
    background: rgba(59, 130, 246, 0.1) !important;
    color: var(--primary) !important;
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: none !important;
}

.db-badge-spinner {
    width: 6px;
    height: 6px;
    animation-duration: 1.5s;
    background-color: var(--primary) !important;
}

.db-event-title {
    font-size: clamp(1.2rem, 3vw, 1.65rem);
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800 !important;
    margin-bottom: 0.5rem;
}

.db-event-type {
    font-size: 0.7rem;
    letter-spacing: 1px;
}

.db-event-details {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* -- Quick Actions Pastel Theme -- */
.db-pastel-grid .col-6:nth-child(1) .quick-action-btn {
    background: #eef2ff;
    border-color: #e0e7ff;
    /* color: #4f46e5; */
}

/* .db-pastel-grid .col-6:nth-child(1) .quick-action-btn i { color: #4f46e5; } */

.db-pastel-grid .col-6:nth-child(2) .quick-action-btn {
    background: #ecfdf5;
    border-color: #d1fae5;
    /* color: #059669; */
}

/* .db-pastel-grid .col-6:nth-child(2) .quick-action-btn i { color: #059669; } */

.db-pastel-grid .col-6:nth-child(3) .quick-action-btn {
    background: #fff7ed;
    border-color: #ffedd5;
    /* color: #ea580c; */
}

/* .db-pastel-grid .col-6:nth-child(3) .quick-action-btn i { color: #ea580c; } */

.db-pastel-grid .col-6:nth-child(4) .quick-action-btn {
    background: #fdf4ff;
    border-color: #fae8ff;
    /* color: #c026d3; */
}

/* .db-pastel-grid .col-6:nth-child(4) .quick-action-btn i { color: #c026d3; } */

.db-pastel-grid .col-6:nth-child(5) .db-conn-item {
    background: #f0fdfa;
    border-color: #ccfbf1;
}

.db-pastel-grid .col-6:nth-child(6) .db-conn-item {
    background: #fff1f2;
    border-color: #ffe4e6;
}

.db-pastel-grid .col-6 .db-conn-item:hover {
    transform: translateY(-2px);
    background-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: rgba(var(--bs-primary-rgb), 0.2);
}

.db-pastel-grid .col-6 .quick-action-btn:hover {
    transform: translateY(-2px);
    background-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: rgba(var(--bs-primary-rgb), 0.2);
}

.db-pastel-grid .col-6 .db-conn-item:hover a.share-ids {
    color: #fff;
}

.db-pastel-grid .col-6 .db-conn-item:hover .db-conn-label i {
    color: #fff;
}

/* -- Premium Tracker Badges -- */
.tracker-count-badge {
    background: rgba(59, 130, 246, 0.12);
    color: var(--primary);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 800;
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    transition: all 0.3s ease;
}

.nav-link.active .tracker-count-badge {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}