/* ====================================================================
   DASHBOARD — PREMIUM STYLES
   ==================================================================== */

/* ==================== HERO CAROUSEL ==================== */

.mobile-hero-wrapper {
    position: relative;
    height: 240px;
    overflow: hidden;
}

@media (min-width: 768px) {
    .mobile-hero-wrapper { height: 380px; }
}

/* Bottom-to-top gradient vignette */
.mobile-hero-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 30%,
        rgba(8, 8, 20, 0.72) 100%
    );
    z-index: 1;
    pointer-events: none;
}

/* Ken Burns zoom on active slide */
.mobile-hero-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 8s ease;
}

.carousel-item.active .mobile-hero-wrapper img {
    transform: scale(1.06);
}

.carousel-item:not(.active) .mobile-hero-wrapper img {
    transform: scale(1);
}

/* Glassmorphism caption */
.mobile-caption {
    position: absolute;
    bottom: 18px;
    left: 18px;
    right: 18px;
    z-index: 2;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 16px;
    color: #fff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
}

.mobile-caption .badge {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.45);
}

.mobile-caption h5 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

/* Pill-shaped indicators */
.carousel-indicators [data-bs-target] {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    opacity: 1;
    transition: all 0.35s ease;
}

.carousel-indicators .active {
    width: 24px;
    border-radius: 4px;
    background: #fff;
    transform: none;
    opacity: 1;
}

.carousel-fade .carousel-item {
    transition-duration: 0.9s;
}

/* ==================== DASHBOARD PAGE SPACING ==================== */

body.page-dashboard .page-content {
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 992px) {
    body.page-dashboard .page-content {
        padding-left: 1.75rem;
        padding-right: 1.75rem;
    }
}

/* ==================== UTILITIES ==================== */

.x-small { font-size: 0.65rem; }

/* ==================== SECTION COMPONENTS ==================== */

/* Icon badge beside section title */
.section-icon-badge {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.section-icon-danger  { background: rgba(220, 53,  69,  0.1); color: #dc3545; }
.section-icon-primary { background: rgba(99,  102, 241, 0.1); color: #6366f1; }
.section-icon-success { background: rgba(16,  185, 129, 0.1); color: #10b981; }

.section-title {
    font-size: 0.88rem;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.section-subtitle {
    font-size: 10px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    line-height: 1.4;
}

.section-count-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
}

.section-count-danger  { background: rgba(220, 53,  69,  0.1); color: #dc3545; }
.section-count-primary { background: rgba(99,  102, 241, 0.1); color: #6366f1; }
.section-count-success { background: rgba(16,  185, 129, 0.1); color: #10b981; }

/* ==================== PREMIUM CARD ==================== */

/* Adds a 2-px gradient accent stripe at top of card */
.premium-card {
    position: relative;
}

.premium-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    border-radius: 16px 16px 0 0;
    z-index: 1;
    pointer-events: none;
}

.premium-card-indigo::before {
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
}

.premium-card-danger::before {
    background: linear-gradient(90deg, #dc3545 0%, #f05365 60%, #ff6b7a 100%);
}

.premium-card-success::before {
    background: linear-gradient(90deg, #10b981 0%, #34d399 50%, #6ee7b7 100%);
}

/* ==================== ENTRANCE ANIMATION ==================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in { animation: fadeInUp 0.5s ease both; }

/* Stagger dashboard sections */
.dash-section-1 { animation-delay: 0.05s; }
.dash-section-2 { animation-delay: 0.18s; }
.dash-section-3 { animation-delay: 0.31s; }
.dash-section-4 { animation-delay: 0.44s; }

/* ==================== RANDY OFFICIAL BAR ==================== */

.randy-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, #4f52e0 0%, #7c3aed 50%, #9333ea 100%);
    background-size: 200% 200%;
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.35), 0 1px 4px rgba(0,0,0,0.12);
    position: relative;
    overflow: hidden;
    animation: randyGradientShift 6s ease-in-out infinite;
}

/* Animated gradient background */
@keyframes randyGradientShift {
    0%   { background-position: 0%   50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0%   50%; }
}

/* Shimmer sweep */
.randy-bar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        transparent 30%,
        rgba(255, 255, 255, 0.14) 50%,
        transparent 70%
    );
    transform: translateX(-100%);
    animation: randyShimmer 3.5s ease-in-out infinite;
    pointer-events: none;
    border-radius: inherit;
}

@keyframes randyShimmer {
    0%        { transform: translateX(-100%); }
    40%, 100% { transform: translateX(200%);  }
}

/* Decorative glow orbs */
.randy-bar::after {
    content: '';
    position: absolute;
    right: -18px; top: -18px;
    width: 80px; height: 80px;
    background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* ── Icon ── */
.randy-bar-icon {
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.05rem;
    color: #fff;
    position: relative;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    animation: iconFloat 2.8s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0);    }
    50%       { transform: translateY(-3px); }
}

/* ── Body text ── */
.randy-bar-body {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 2;
}

.randy-bar-title {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-weight: 700;
    color: #fff;
    font-size: 0.9rem;
    letter-spacing: -0.01em;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.randy-bar-sub {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

/* ── VERIFIED badge ── */
.randy-bar-badge {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 20px;
    padding: 4px 11px;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    white-space: nowrap;
    position: relative;
    z-index: 2;
    animation: badgeGlow 2.5s ease-in-out infinite;
}

@keyframes badgeGlow {
    0%, 100% { box-shadow: 0 0 0 0   rgba(165, 243, 252, 0.55); }
    50%       { box-shadow: 0 0 0 6px rgba(165, 243, 252, 0);    }
}

.randy-bar-badge i {
    color: #a5f3fc;
    font-size: 0.85rem;
}

.randy-bar-badge .badge-text {
    font-size: 0.67rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.05em;
}

/* ── Live pulsing dot ── */
.randy-live-dot {
    width: 7px;
    height: 7px;
    background: #4ade80;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    display: inline-block;
}

.randy-live-dot::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: rgba(74, 222, 128, 0.45);
    animation: livePulse 1.8s ease-out infinite;
}

@keyframes livePulse {
    0%   { transform: scale(0.85); opacity: 1; }
    100% { transform: scale(2.6);  opacity: 0; }
}

/* ── Mobile ── */
@media (max-width: 400px) {
    .randy-bar          { padding: 9px 11px; gap: 8px; }
    .randy-bar-sub      { display: none; }
    .randy-bar-badge    { padding: 3px 9px; }
    .randy-bar-title    { font-size: 0.83rem; }
}

/* ==================== FAB BUTTON ==================== */

.fab-wrapper {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 9999;
    display: none;
}

.fab-main {
    height: 56px;
    padding: 0 20px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.45), 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform .22s ease, box-shadow .22s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    animation: fabGlow 3.5s ease-in-out infinite;
}

@keyframes fabGlow {
    0%, 100% {
        box-shadow: 0 8px 24px rgba(99, 102, 241, 0.45), 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    50% {
        box-shadow: 0 8px 32px rgba(99, 102, 241, 0.65), 0 0 0 12px rgba(99, 102, 241, 0.07);
    }
}

.fab-main:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.55), 0 4px 12px rgba(0, 0, 0, 0.1);
}

.fab-main:active { transform: scale(0.96); animation: none; }

.fab-icon { font-size: 22px; }
.fab-text  { font-size: 14px; font-weight: 600; white-space: nowrap; }

/* Menu container */
.fab-menu {
    position: absolute;
    bottom: 68px;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(14px) scale(0.95);
    transition: all 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fab-wrapper.active .fab-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.fab-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 30px;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    white-space: nowrap;
}

.fab-item:hover {
    transform: translateX(-5px);
    color: #fff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
}

.fab-item i { font-size: 18px; }

.fab-item.wa { background: linear-gradient(135deg, #1db954, #25D366); }
.fab-item.tg { background: linear-gradient(135deg, #0088cc, #229ED9); }
.fab-item.fb { background: linear-gradient(135deg, #0c5fff, #1877F2); }

/* ==================== TOPBAR CHAT LINK ==================== */
.topbar-chat-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px 5px 10px;
    border-radius: 8px;
    background: transparent;
    color: var(--ct-topbar-item-color);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s, background 0.2s;
}

.topbar-chat-link i {
    font-size: 20px;
}

.topbar-chat-link:hover {
    color: #6366f1;
    background: rgba(99, 102, 241, 0.08);
}

.topbar-chat-link:active {
    background: rgba(99, 102, 241, 0.12);
}

/* ==================== DARK MODE ==================== */

/* Section icon badges — slightly stronger tint in dark */
[data-bs-theme="dark"] .section-icon-danger  { background: rgba(220, 53, 69, 0.15);  color: #f87171; }
[data-bs-theme="dark"] .section-icon-primary { background: rgba(99, 102, 241, 0.15); color: #a5b4fc; }
[data-bs-theme="dark"] .section-icon-success { background: rgba(16, 185, 129, 0.15); color: #34d399; }

[data-bs-theme="dark"] .section-count-danger  { background: rgba(220, 53, 69, 0.15);  color: #f87171; }
[data-bs-theme="dark"] .section-count-primary { background: rgba(99, 102, 241, 0.15); color: #a5b4fc; }
[data-bs-theme="dark"] .section-count-success { background: rgba(16, 185, 129, 0.15); color: #34d399; }

[data-bs-theme="dark"] .section-subtitle {
    color: #64748b;
}

/* Glassmorphism caption — darkened */
[data-bs-theme="dark"] .mobile-caption {
    background: rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.12);
}

/* FAB menu items — darker shadow */
[data-bs-theme="dark"] .fab-item {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

/* Topbar chat link */
[data-bs-theme="dark"] .topbar-chat-link {
    color: #94a3b8;
}

[data-bs-theme="dark"] .topbar-chat-link:hover {
    color: #a5b4fc;
    background: rgba(99, 102, 241, 0.12);
}
