* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-card: #ffffff;
    --reco-bg: #dbdbdb;
    --text-primary: #1a1a1a;
    --text-secondary: #6c757d;
    --accent-buy: #10b981;
    /* --accent-sell: #ef4444; */
    --accent-sell: #f87171;
    --accent-primary: #3b82f6;
    --border-color: #e5e7eb;
    --shadow: rgba(0, 0, 0, 0.05);
    --revised-badge: #f59e0b;
    --stamp-highlight: rgba(0, 0, 0, 0.08);
    --stamp-bg: rgba(0, 0, 0, 0.02);
    --inverse-bg: #0a0a0a;
    --inverse-text: #ffffff;

    --gradient-1: #f59e0b;
    --gradient-2: #ec4899;
    --gradient-3: #8b5cf6;
    --gradient-4: #3b82f6;
}

[data-theme="dark"] {
    --bg-primary: #0a0a0a;
    /* --bg-primary: #292828; */
    --bg-secondary: #141414;
    --bg-card: #1a1a1a;
    --reco-bg: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --border-color: #2a2a2a;
    --shadow: rgba(0, 0, 0, 0.3);
    --stamp-highlight: rgba(255, 255, 255, 0.08);
    --stamp-bg: rgba(255, 255, 255, 0.03);
    --inverse-bg: #ffffff;
    --inverse-text: #1a1a1a;

}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    transition: background 0.2s ease, color 0.2s ease;
    padding-bottom: 80px;
}

/* Clean header without animations */
.app-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 0.25rem 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Updated header to be responsive with hamburger at start, logo center, mode at end */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.hamburger-btn {
    order: 1;
}

.app-title {
    order: 2;
}

.theme-toggle {
    order: 3;
}

@media (min-width: 768px) {
    .header-content {
        justify-content: space-between;
    }

    .hamburger-btn {
        order: 1;
    }

    .app-title {
        order: 2;

    }

    .theme-toggle {
        order: 3;
    }
}

.theme-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
}

.theme-toggle:hover {
    background: var(--border-color);
}

.theme-toggle i {
    font-size: 1.1rem;
    color: var(--text-primary);
}

/* Clean professional card design */
.reco-card {
    background: var(--bg-card);
    /* background: var(--reco-bg); */
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Gradient border on all four corners with consistent color order */
.reco-card::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 3px;
    background: linear-gradient(135deg, #f59e0b, #ec4899, #8b5cf6, #3b82f6);
    border-radius: 12px;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 1;
}

.reco-card:hover {
    box-shadow: 0 4px 12px var(--shadow);
}

/* Updated profit card with bold gradient and shimmer animation */
.reco-card.profit {
    background: linear-gradient(135deg,
            rgba(16, 185, 129, 0.15) 0%,
            rgba(52, 211, 153, 0.08) 50%,
            var(--bg-card) 100%);
    border: 2px solid var(--accent-buy);
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.25);
    position: relative;
    overflow: hidden;
    padding-bottom: 0.60rem !important;
}

.reco-card.profit::before {
    opacity: 0;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.reco-card.profit::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent 30%,
            rgba(16, 185, 129, 0.1) 50%,
            transparent 70%);
    animation: shimmer 3s infinite;
    pointer-events: none;
}

/* Updated loss card with gradient and pulse animation */
.reco-card.loss {
    background: linear-gradient(135deg,
            rgba(239, 68, 68, 0.15) 0%,
            rgba(248, 113, 113, 0.08) 50%,
            var(--bg-card) 100%);
    border: 2px solid var(--accent-sell);
    box-shadow: 0 8px 32px rgba(239, 68, 68, 0.25);
    position: relative;
    overflow: hidden;
    padding-bottom: 0.60rem !important;
}

.reco-card.loss::before {
    opacity: 0;
}

.reco-card.loss::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle,
            rgba(239, 68, 68, 0.08) 0%,
            transparent 70%);
    animation: pulse 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulse {

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

    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

/* Added stamp-style indicators for revised, profit, and loss */
.status-stamp {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    text-align: center;
    padding: 2.3rem 0;
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-radius: 6px;
    opacity: 0.9;
    z-index: 10;
    pointer-events: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    background-color: var(--stamp-bg);
    background:
        radial-gradient(circle at 0 0,
            var(--stamp-highlight) 0,
            rgba(0, 0, 0, 0) 70%),
        repeating-linear-gradient(45deg,
            var(--stamp-highlight) 0px,
            var(--stamp-highlight) 6px,
            transparent 6px,
            transparent 12px);
    backdrop-filter: blur(1px);
    mask-image: radial-gradient(circle,
            rgba(0, 0, 0, 1) 60%,
            rgba(0, 0, 0, 0.6) 100%);
}



.status-stamp.revised-stamp {
    color: var(--accent-primary);
    /* border-color: var(--accent-primary);
    background: var(--bg-card); */
}

.status-stamp.profit-stamp {
    color: var(--accent-buy);
    /* border-color: var(--accent-buy);
    background: var(--bg-card); */
}

.status-stamp.loss-stamp {
    color: var(--accent-sell);
    /* border-color: var(--accent-sell);
    background: var(--bg-card); */
}

/* Updated profit/loss card backgrounds with light watermark effect */
.reco-card.profit {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, var(--bg-card) 100%);
    /* border-left: 4px solid var(--accent-buy); */
}

.reco-card.profit::before {
    opacity: 0;
}

.reco-card.loss {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, var(--bg-card) 100%);
    /* border-left: 4px solid var(--accent-sell); */
}

.reco-card.loss::before {
    opacity: 0;
}

/* Added watermark effect for revised cards in active tab */
.reco-card.revised-watermark .detail-value .strikethrough::after {
    content: 'REVISED';
    position: absolute;
    top: 50%;
    left: -40%;
    right: -40%;
    transform: translateY(-50%) rotate(-10deg);
    font-size: 1rem;
    font-weight: 900;
    color: var(--accent-primary);
    opacity: 0.25;
    letter-spacing: 4px;
    white-space: nowrap;
    pointer-events: none;
    text-align: center;
}

/* Status badges */
.status-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

/* Updated status badges with modern glassmorphic design */
.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    border: 1.5px solid;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.status-badge.profit-badge {
    background: linear-gradient(135deg,
            rgba(16, 185, 129, 0.9) 0%,
            rgba(52, 211, 153, 0.8) 100%);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
    animation: celebratePulse 1.5s ease-in-out infinite;
}

/* Added celebration animation for profit badge */
@keyframes celebratePulse {

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

    50% {
        transform: scale(1.05);
    }
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.status-badge.loss-badge {
    background: linear-gradient(135deg,
            rgba(239, 68, 68, 0.9) 0%,
            rgba(248, 113, 113, 0.8) 100%);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
    animation: celebratePulse 1.5s ease-in-out infinite;

}

/* Card header */
.card-header-custom {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 0.75rem;
}

.script-info {
    flex: 1;
    min-width: 0;
}

.script-name-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.stock-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.live-price {
    display: inline-flex;
    align-items: center;
    /* background: var(--bg-secondary); */
    border-radius: 6px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-buy);
}

/* Added Live tag with blinking red dot and light color label */
.live-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(239, 68, 68, 0.1);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--accent-sell);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-sell);
    animation: blink 1.5s infinite;
}

@keyframes blink {

    0%,
    50%,
    100% {
        opacity: 1;
    }

    25%,
    75% {
        opacity: 0.3;
    }
}

.recommended-time {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-size: 0.8rem;
}

.research-report {
    font-size: 0.75rem;
    margin-left: auto;
    color: var(--text-secondary);
}

/* Professional action badge without animations */
.action-badge {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    color: white;
    margin-top: 6px;
}

.action-badge.buy {
    background: var(--accent-buy);
}

.action-badge.sell {
    background: var(--accent-sell);
}

/* Emphasized buying zone with clean design */
.buying-zone {
    background: rgba(59, 130, 246, 0.08);
    border: 2px solid var(--accent-primary);
    border-radius: 10px;
    padding: 1rem;
    margin: 1rem 0;
}

.buying-zone-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
}

.buying-zone-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-primary);
}

.buying-zone-label.profit {
    color: var(--accent-buy);
}

.buying-zone-value.profit {
    color: var(--accent-buy);
}

.buying-zone-label.loss {
    color: var(--accent-sell);
}

.buying-zone-value.loss {
    color: var(--accent-sell);
}

/* Card details */
.card-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.card-detail:last-of-type {
    margin-bottom: 0;
}

.detail-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
}

.detail-value {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 700;
    text-align: right;
}

.detail-value.small {
    font-size: 0.75rem;
}

.strikethrough {
    text-decoration: line-through;
    color: var(--text-secondary);
    opacity: 0.6;
    margin-right: 0.5rem;
}

/* Clean arrow button */
.view-revised-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: transparent;
    /* color: white; */
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-top: 1rem;
    width: 100%;
}


/* Revision History - same card design as recommendations */
.revision-card {
    background: var(--bg-card);
    /* background: var(--reco-bg); */
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Updated gradient to match reco-card order */
.revision-card::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 3px;
    background: linear-gradient(135deg, #f59e0b, #ec4899, #8b5cf6, #3b82f6);
    border-radius: 12px;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 1;
}

.revision-card:hover {
    box-shadow: 0 4px 12px var(--shadow);
}

/* Updated profit styling to match reco-card exactly */
.revision-card.profit {
    background: linear-gradient(135deg,
            rgba(16, 185, 129, 0.15) 0%,
            rgba(52, 211, 153, 0.08) 50%,
            var(--bg-card) 100%);
    border: 2px solid var(--accent-buy);
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.25);
    position: relative;
    overflow: hidden;
    padding-bottom: 0.60rem !important;
}

.revision-card.profit::before {
    opacity: 0;
}

.revision-card.profit::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent 30%,
            rgba(16, 185, 129, 0.1) 50%,
            transparent 70%);
    animation: shimmer 3s infinite;
    pointer-events: none;
}

/* Updated loss styling to match reco-card exactly */
.revision-card.loss {
    background: linear-gradient(135deg,
            rgba(239, 68, 68, 0.15) 0%,
            rgba(248, 113, 113, 0.08) 50%,
            var(--bg-card) 100%);
    border: 2px solid var(--accent-sell);
    box-shadow: 0 8px 32px rgba(239, 68, 68, 0.25);
    position: relative;
    overflow: hidden;
    padding-bottom: 0.60rem !important;
}

.revision-card.loss::before {
    opacity: 0;
}

.revision-card.loss::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle,
            rgba(239, 68, 68, 0.08) 0%,
            transparent 70%);
    animation: pulse 2s ease-in-out infinite;
    pointer-events: none;
}

.revision-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 0.75rem;
}

.revision-header-left {
    flex: 1;
    min-width: 0;
}

.revision-script-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.revision-script-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.revision-live-price {
    display: inline-flex;
    align-items: center;
    /* background: var(--bg-secondary); */
    border-radius: 6px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-buy);
}

.revision-time {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Revision timestamp styling */
.revision-timestamp {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 0;
    /* CHANGE: Remove top margin so timestamp stays inline */
}

.revision-buying-info {
    background: rgba(59, 130, 246, 0.08);
    border: 2px solid var(--accent-primary);
    border-radius: 10px;
    padding: 1rem;
    margin: 1rem 0;
}

.revision-buying-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
}

.revision-buying-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-primary);
}

/* Updated revision item styling to match card details */
/* .revision-current-prices {
    margin-bottom: 1rem;
} */

.revision-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.revision-price-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
}

.revision-price-value {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 700;
    text-align: right;
}

/* Styling for strikethrough with light tone in history */
.revision-row-value .old-price {
    text-decoration: line-through;
    color: var(--text-secondary);
    opacity: 0.5;
    margin-right: 0.5rem;
    font-size: 0.85rem;
}

.revised-text {
    display: block;
    font-size: 0.75rem;
    color: var(--accent-primary);
    font-weight: 700;
    margin-top: 0.25rem;
}

/* History toggle button */
.history-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    margin-top: 1rem;
}

.history-toggle-btn:hover {
    background: var(--border-color);
}

.history-toggle-btn i {
    transition: transform 0.3s ease;
}

/* .history-toggle-btn.expanded i {
    transform: rotate(180deg);
} */

/* Collapsible history section */
.revision-history-section {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.revision-history-section.expanded {
    max-height: 100%;
}

/* KPI Cards Styling */
.kpi-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.kpi-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 2px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6, #ec4899, #f59e0b);
    border-radius: 12px;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.5;
}

.kpi-card:hover {
    box-shadow: 0 4px 12px var(--shadow);
    transform: translateY(-2px);
}

.kpi-card-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.kpi-card-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.kpi-card-value.profit {
    color: var(--accent-buy);
}

.kpi-card-value.loss {
    color: var(--accent-sell);
}

.kpi-card-value.primary {
    color: var(--accent-primary);
}

.kpi-card-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

@media (max-width: 576px) {
    .kpi-container {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 0.5rem;
    }

    .kpi-card {
        padding: 1.25rem;
    }

    .kpi-card-value {
        font-size: 1.75rem;
    }
}

.kpi-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.kpi-card-right {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.confetti::before,
.confetti::after {
    content: '';
    position: absolute;
    width: 120%;
    height: 120%;
    background:
        radial-gradient(circle, rgba(34, 197, 94, 0.25) 2px, transparent 3px),
        radial-gradient(circle, rgba(59, 130, 246, 0.2) 2px, transparent 3px),
        radial-gradient(circle, rgba(168, 85, 247, 0.2) 2px, transparent 3px);
    background-size: 18px 18px;
    animation: confetti-float 6s linear infinite;
}

.confetti::after {
    animation-duration: 9s;
    opacity: 0.6;
}

@keyframes confetti-float {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-30%);
    }
}


/* Simplified timeline without excessive decorations */
.revision-timeline {
    position: relative;
    padding-left: 1.5rem;
    margin-top: 1rem;
}

.revision-timeline::before {
    content: '';
    position: absolute;
    left: 0.4rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.revision-item {
    position: relative;
    margin-bottom: 1.25rem;
}

.revision-item::before {
    content: '';
    position: absolute;
    left: -1.15rem;
    top: 0.35rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-primary);
    border: 2px solid var(--bg-card);
}

.revision-item.green::before {
    background: var(--accent-buy);
}

.revision-item.red::before {
    background: var(--accent-sell);
}

/* CHANGE: Update layout to flex for inline date/time */
.revision-label {
    font-size: 0.85rem;
    color: var(--accent-primary);
    font-weight: 700;
    text-transform: uppercase;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.revision-label.green {
    color: var(--accent-buy);
}

.revision-label.red {
    color: var(--accent-sell);
}

.revision-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.revision-row {
    display: flex;
    justify-content: space-between;
    padding: 0.6rem;
    background: var(--bg-secondary);
    border-radius: 6px;
}

.revision-row-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
}

.revision-row-value {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 700;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* Tab Content */
.tab-content-custom {
    display: none;
}

.tab-content-custom.active {
    display: block;
}

/* Adding missing tab buttons styling that was lost */
.custom-tabs {
    position: sticky;
    top: 3.15rem;
    z-index: 99;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0.25rem;
    margin-bottom: 1rem;
}

.tab-buttons {
    display: flex;
    gap: 0.5rem;
    /* max-width: 1200px; */
    /* margin: 0 auto; */
}

.tab-btn {
    flex: 1;
    padding: 0.75rem 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.tab-btn.active {
    /* background: var(--bg-primary); */
    color: var(--accent-primary);
    border-color: var(--border-color);
    border-bottom: 2px solid var(--accent-primary);
}

.tab-btn {
    position: relative;
    /* REQUIRED */
}

.tab-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    font-size: 1rem;
    padding: 0.35em 0.5em;
    border-radius: 50%;
    min-width: 18px;
    /* height: 18px; */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Adding greeting section styling */
.greeting-section {
    /* max-width: 1200px; */
    /* margin: 0 auto; */
    padding: 1.5rem 1rem 0;
}

.greeting-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.greeting-subtext {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Adding bottom navigation bar styles */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    /* padding: 0.75rem 1rem; */
    z-index: 100;
    box-shadow: 0 -2px 10px var(--shadow);
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
    position: relative;
}

.bottom-nav-item i {
    font-size: 1.25rem;
}

.bottom-nav-item.active {
    color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.1);
}

.bottom-nav-item:hover {
    color: var(--accent-primary);
}

/* Adding download icon styling */
.download-icon {
    margin-left: 0.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s ease;
    margin-top: 6px;
}

.download-icon.no-top {
    margin-top: 0;
}

.download-icon:hover {
    color: var(--accent-primary);
}

/* Added hamburger menu and sidebar styles */
.hamburger-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hamburger-btn i {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100%;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    z-index: 999;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
}

.sidebar-menu.active {
    left: 0;
}

.sidebar-header {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.sidebar-close {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.sidebar-close i {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.sidebar-content {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    font-size: 1rem;
}

.sidebar-nav-item:hover {
    background: var(--bg-secondary);
}

.sidebar-nav-item i {
    font-size: 1.25rem;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

.theme-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    color: var(--text-primary);
}

.theme-switch-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1rem;
}

.theme-switch-label i {
    font-size: 1.25rem;
}

.theme-toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
    background: var(--bg-secondary);
    border-radius: 13px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.theme-toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: var(--text-primary);
    border-radius: 50%;
    transition: transform 0.3s ease;
}

[data-theme="light"] .theme-toggle-switch {
    background: var(--accent-primary);
}

[data-theme="light"] .theme-toggle-switch::after {
    transform: translateX(24px);
    background: var(--bg-card);
}

/* Added horizontal rule between cards for better separation */
.card-separator {
    border: none;
    height: 2px;
    background: var(--border-color);
    margin: 1.5rem auto;
    opacity: 1;
    width: 80%;
}

/* Responsive */
@media (min-width: 768px) {
    .cards-container {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
        gap: 1.5rem;
    }

    .reco-card,
    .revision-card {
        margin-bottom: 0;
    }

    .card-separator {
        display: none;
    }
}

@media (min-width: 1200px) {
    .cards-container {
        grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
    }
}

/* Added collapsible details section for completed recommendations */
.collapsible-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.collapsible-details.expanded {
    max-height: 100%;
    transition: max-height 0.5s ease-in;
}

.show-more-btn {
    color: var(--accent-primary);
    /* Changed to accent-primary */
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    margin-top: 0.75rem;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.show-more-btn:hover {
    color: var(--text-primary);
    /* Changed to text-primary for better contrast */
    transform: translateX(4px);
}

.show-more-btn i {
    transition: transform 0.3s ease;
}

.show-more-btn.expanded i {
    transform: rotate(180deg);
}

/* Added rotating border effect for completed recommendations */
.completed-card {
    position: relative;
    overflow: hidden;
}

.completed-card::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 3px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary));
    /* Placeholder, adjust gradient as needed */
    border-radius: 12px;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 1;
    opacity: 0.5;
}

.profit-complete::before {
    background: linear-gradient(135deg, var(--accent-buy), var(--accent-buy));
}

.loss-complete::before {
    background: linear-gradient(135deg, var(--accent-sell), var(--accent-sell));
}

.completed-card:hover {
    box-shadow: 0 4px 12px var(--shadow);
}

/* Floating status for completed recommendations */
.floating-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    z-index: 2;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.profit-status {
    background: linear-gradient(135deg, var(--accent-buy), rgba(16, 185, 129, 0.7));
}

.loss-status {
    background: linear-gradient(135deg, var(--accent-sell), rgba(239, 68, 68, 0.7));
}

.floating-status i {
    font-size: 1rem;
}

/* CHANGE: Adding styles for completion box and collapsible content */
.completion-box {
    background: var(--bg-card);
    border: 2px solid var(--accent-buy);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    /* text-align: center; */
    color: var(--accent-buy);
}

.completion-box.loss-box {
    border-color: var(--accent-sell);
    color: var(--accent-sell);
}

/* .show-more-btn {
    color: var(--accent-primary);
    font-weight: 500;
    cursor: pointer;
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.show-more-btn:hover {
    color: var(--accent-secondary);
} */

/* .collapsible-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.collapsible-details.expanded {
    max-height: 2000px;
} */



/* PDF Viewer Canvas Styling */
#document-viewer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow-y: auto;
    max-height: 80vh;
    /* Restrict the height to fit within the modal */
}

#pdf-render {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    /* Optional border for clarity */
    margin-top: 10px;
}

#pdf-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 10px;
    background-color: #f8f9fa;
    color: black !important;
    padding: 10px;
    border-radius: 5px;
}

#pdf-controls button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#current-page,
#total-pages {
    font-weight: 800;
    color: var(--eh-blue-primary);
}

#page-info {
    font-weight: 700;
    color: var(--eh-dark-grey);
}

.btn-page-primary {
    /* background: linear-gradient(135deg, var(--primary) 0%, var(--primary-soft) 100%); */
    background: var(--accent-primary);
    color: white;
    color: white;
    box-shadow: var(--shadow-soft);
}

.btn-page-primary:hover {
    background: linear-gradient(135deg, var(--deep-chocolate) 0%, var(--rich-brown) 100%);
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s ease;
    min-width: 300px;
}

.toast.success {
    border-left: 4px solid var(--accent-buy);
}

.toast.success i {
    color: var(--accent-buy);
}

.toast.error {
    border-left: 4px solid var(--accent-sell);
}

.toast.error i {
    color: var(--accent-sell);
}

/* NEW Tag on Recommendation Cards */
.new-tag {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    /* background: linear-gradient(135deg, #ff6b6b, #ff4757); */
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(255, 75, 87, 0.4);
    animation: newTagPulse 2s ease-in-out infinite;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.new-tag.fade-out {
    opacity: 0;
    transform: scale(0.8) translateY(-10px);
    pointer-events: none;
}

@keyframes newTagPulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(255, 75, 87, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(255, 75, 87, 0.6);
    }
}

/* Category Badge on Bottom Nav Buttons */
.category-badge {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    /* background: #ff4757; */
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.25rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: categoryBadgePulse 1.5s ease-in-out infinite;
}

@keyframes categoryBadgePulse {

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

    50% {
        transform: scale(1.15);
    }
}

/* Update existing notification badge to be more prominent */
.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: linear-gradient(135deg, #ff4757, #ff6b6b);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.35rem;
    box-shadow: 0 2px 6px rgba(255, 75, 87, 0.4);
    animation: badgePulse 2s ease-in-out infinite;
    z-index: 10;
}

@keyframes badgePulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 2px 6px rgba(255, 75, 87, 0.4);
    }

    50% {
        transform: scale(1.1);
        box-shadow: 0 3px 10px rgba(255, 75, 87, 0.6);
    }
}

/* Make sure recommendation cards have position relative for absolute positioning of new-tag */
.recommendation-card,
.revision-card {
    position: relative;
}

/* Dark mode adjustments */
body.dark-mode .new-tag {
    box-shadow: 0 2px 8px rgba(255, 75, 87, 0.5);
}

body.dark-mode .notification-badge {
    box-shadow: 0 2px 6px rgba(255, 75, 87, 0.5);
}

body.dark-mode .category-badge {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* New Recommendations Separator - WhatsApp style */
.new-reco-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1.5rem 0;
    position: relative;
}

.new-reco-separator::before,
.new-reco-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border-color) 20%, var(--border-color) 80%, transparent);
}

.new-reco-separator span {
    padding: 0.5rem 1rem;
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    margin: 0 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Dark mode adjustments */
body.dark-mode .new-reco-separator span {
    background: #1a1a1a;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.revision-timestamp {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 12px;
    color: #9aa4b2;
    /* adjust to your theme */
}

.revision-timestamp i {
    margin-top: 2px;
    /* aligns icon with first line */
    font-size: 13px;
}

.revision-timestamp .time-text {
    line-height: 1.2;
    text-transform: uppercase;
}

/* Added separator line styling for new recommendations */
.new-recommendations-separator {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.new-recommendations-separator.fading {
    opacity: 0;
}

.new-recommendations-separator::before,
.new-recommendations-separator::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
}

.new-recommendations-separator-text {
    padding: 0.5rem 1rem;
    background: var(--accent-primary);
    color: white;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    margin: 0 1rem;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

td,
th {
    background-color: var(--bg-primary) !important;
    border: solid 4px var(--border-color) !important;
}

.primary_bg_text {
    color: var(--inverse-text);
    background-color: var(--inverse-bg);
}

/* Notification Bell Styles */
.notification-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

/* Notification Panel Styles */
.notification-panel {
    position: fixed;
    right: 0;
    top: 0;
    width: 350px;
    height: 100vh;
    background: var(--bg-card);
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.15);
    z-index: 1040;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border-color);
}

.notification-panel.active {
    transform: translateX(0);
}

.notification-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.notification-panel-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.notification-close-btn {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.notification-close-btn:hover {
    background: var(--border-color);
}

.notification-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1030;
    display: none;
}

.notification-overlay.active {
    display: block;
}

/* Notification Item */
.notification-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
    cursor: pointer;
}

.notification-item:hover {
    background: var(--bg-secondary);
}

.notification-item.unread {
    background: rgba(59, 130, 246, 0.08);
    border-left: 4px solid var(--accent-primary);
}

.notification-item-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
    font-size: 0.95rem;
}

.notification-item-body {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.notification-item-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-item-unread-badge {
    width: 6px;
    height: 6px;
    background: var(--accent-primary);
    border-radius: 50%;
}

.notification-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
}

.notification-empty i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 480px) {
    .notification-panel {
        width: 100%;
    }
}

/* Skeleton Loader Styles */
@keyframes skeleton-loading {
    0% {
        background-color: var(--bg-secondary);
        background-image: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
        background-size: 200% 100%;
        background-position: -200% 0;
    }

    100% {
        background-color: var(--bg-secondary);
        background-image: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
        background-size: 200% 100%;
        background-position: 200% 0;
    }
}

.skeleton-loader-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    animation: skeleton-loading 1.5s infinite ease-in-out;
}

.skeleton-loader-card::before {
    content: '';
    display: block;
    height: 28px;
    margin-bottom: 1rem;
    background-color: var(--bg-secondary);
    border-radius: 6px;
    animation: skeleton-loading 1.5s infinite ease-in-out;
}

.skeleton-loader-card::after {
    content: '';
    display: block;
    height: 20px;
    margin-bottom: 0.75rem;
    background-color: var(--bg-secondary);
    border-radius: 4px;
    animation: skeleton-loading 1.5s infinite ease-in-out;
}

/* Skeleton sub-lines for more detailed effect */
.skeleton-loader-card {
    position: relative;
}

.skeleton-loader-card .skeleton-line {
    height: 16px;
    margin-bottom: 0.75rem;
    background-color: var(--bg-secondary);
    border-radius: 4px;
    animation: skeleton-loading 1.5s infinite ease-in-out;
}

.skeleton-loader-card .skeleton-line:nth-child(2) {
    width: 90%;
    animation-delay: 0.1s;
}

.skeleton-loader-card .skeleton-line:nth-child(3) {
    width: 80%;
    animation-delay: 0.2s;
}

.skeleton-loader-card .skeleton-line:last-child {
    margin-bottom: 0;
}

/* Fade out animation when content loads */
.cards-container.loading .skeleton-loader-card {
    opacity: 1;
}

.cards-container:not(.loading) .skeleton-loader-card {
    display: none;
}

/* Stagger animation for multiple skeletons */
.skeleton-loader-card:nth-child(1) {
    animation-delay: 0s;
}

.skeleton-loader-card:nth-child(2) {
    animation-delay: 0.1s;
}

.skeleton-loader-card:nth-child(3) {
    animation-delay: 0.2s;
}

/* ===== NEW HERO PLANS SECTION ===== */
.hero-plans-section {
    background: linear-gradient(135deg, var(--accent-primary) 0%, rgba(59, 130, 246, 0.9) 100%);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    margin: 1rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
    animation: slideInDown 0.5s ease;
    display: none;
}

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

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

[data-theme="dark"] .hero-plans-section {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.95) 0%, rgba(37, 99, 235, 0.9) 100%);
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.3);
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.hero-plans-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-icon {
    font-size: 3rem;
    color: white;
    margin-bottom: 1rem;
    display: inline-block;
    animation: heroIconPulse 2s ease-in-out infinite;
}

@keyframes heroIconPulse {

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

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

.hero-title {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.hero-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 480px) {
    .hero-plans-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }
}

.hero-plan-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    padding: 1rem 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    margin-bottom: 1.5rem;
}

.hero-plan-card:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.4);
}

.plan-icon-large {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.plan-category {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    letter-spacing: 0.5px;
}

.plan-benefit {
    font-size: 0.8rem;
    opacity: 0.95;
    margin: 0;
}

.hero-cta-btn {
    background: white;
    color: var(--accent-primary);
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: block;
    margin: 0 auto 0.75rem;
    font-size: 0.95rem;
}

.hero-cta-btn:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hero-cta-btn:focus {
    color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5);
}

.hero-close-btn {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.5rem;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    position: absolute;
    top: 1rem;
    right: 1rem;
    transition: all 0.3s ease;
}

.hero-close-btn:hover {
    color: white;
    transform: rotate(90deg);
}

#plansModal .modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

[data-theme="dark"] #plansModal .modal-content {
    background: var(--bg-card);
    border-color: rgba(255, 255, 255, 0.1);
}

#plansModal .modal-header {
    background: linear-gradient(135deg, var(--accent-primary) 0%, rgba(59, 130, 246, 0.8) 100%);
    border-radius: 16px 16px 0 0;
    color: white;
    border: none;
}

#plansModal .modal-title {
    font-weight: 700;
    font-size: 1.25rem;
}

#plansModal .btn-close {
    filter: brightness(0) invert(1);
}

.category-section {
    margin-bottom: 2rem;
}

.category-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

[data-theme="dark"] .category-title {
    color: rgba(255, 255, 255, 0.9);
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.75rem;
}

@media (max-width: 480px) {
    .plans-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

.plan-card {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .plan-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}

.plan-card:not(.disabled):hover {
    border-color: var(--accent-primary);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
}

[data-theme="dark"] .plan-card:not(.disabled):hover {
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35);
}

.plan-card.selected {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--accent-primary);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.35);
}

[data-theme="dark"] .plan-card.selected {
    background: rgba(59, 130, 246, 0.2);
}

.plan-card.selected::before {
    content: '✓';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--accent-primary);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.85rem;
}

.plan-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

[data-theme="dark"] .plan-card.disabled {
    background: rgba(255, 255, 255, 0.02);
}

.plan-header {
    margin-bottom: 0.75rem;
}

.plan-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

[data-theme="dark"] .plan-name {
    color: rgba(255, 255, 255, 0.9);
}

.plan-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--accent-primary);
    display: block;
}

.plan-description {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

[data-theme="dark"] .plan-description {
    color: rgba(255, 255, 255, 0.7);
}

.plan-time-period {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-buy);
    background: rgba(16, 185, 129, 0.1);
    padding: 0.4rem;
    border-radius: 6px;
}

[data-theme="dark"] .plan-time-period {
    background: rgba(16, 185, 129, 0.15);
}

#subscribePlansBtn {
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

#subscribePlansBtn:hover:not(:disabled) {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

@media (max-width: 576px) {
    .hero-plans-section {
        margin: 0.75rem;
        padding: 1.5rem 1rem;
        border-radius: 12px;
    }

    .hero-title {
        font-size: 1.35rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.25rem;
    }

    .hero-icon {
        font-size: 2.5rem;
    }

    #plansModal .modal-content {
        border-radius: 12px;
    }

    #plansModal .modal-header {
        border-radius: 12px 12px 0 0;
    }

    .category-title {
        font-size: 1rem;
    }
}

/* ===== PLAN DURATION & PAN VERIFICATION STYLES ===== */

/* Duration badge styling */
.plan-duration {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.1);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    margin: 0.3rem 0;
}

[data-theme="dark"] .plan-duration {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

/* Selected plans info alert */
#selectedPlansInfo {
    border-radius: 8px;
    border-left: 4px solid var(--accent-primary);
    background: rgba(59, 130, 246, 0.05);
}

[data-theme="dark"] #selectedPlansInfo {
    background: rgba(59, 130, 246, 0.1);
}

/* PAN verification modal styling - DEPRECATED */
/* Use KYC verification modal instead */

/* KYC Verification Modal Styles */
#kycVerificationModal .modal-header {
    background: linear-gradient(135deg, var(--accent-primary) 0%, rgba(59, 130, 246, 0.8) 100%);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
}

#kycVerificationModal .modal-title {
    font-weight: 700;
    font-size: 1.15rem;
}

#kycVerificationModal .btn-close {
    filter: brightness(0) invert(1);
}

#kycVerificationModal .modal-body {
    padding: 1.5rem;
    background: var(--bg-modal);
}

/* KYC Info Box with selected plans */
.kyc-info-box {
    background: rgba(59, 130, 246, 0.08);
    border-left: 4px solid var(--accent-primary);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

[data-theme="dark"] .kyc-info-box {
    background: rgba(59, 130, 246, 0.12);
}

.kyc-info-box h6 {
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.kyc-info-box .d-flex {
    color: var(--text-secondary);
}

.kyc-info-box .border-top {
    border-color: rgba(0, 0, 0, 0.1) !important;
}

[data-theme="dark"] .kyc-info-box .border-top {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* KYC Form Styling */
#kycVerificationForm .form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

[data-theme="dark"] #kycVerificationForm .form-label {
    color: rgba(255, 255, 255, 0.9);
}

#kycVerificationForm .form-control {
    border-radius: 6px;
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

[data-theme="dark"] #kycVerificationForm .form-control {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: white;
}

#kycVerificationForm .form-control::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

#kycVerificationForm .form-control:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.15);
    background: var(--bg-card);
    color: var(--text-primary);
}

[data-theme="dark"] #kycVerificationForm .form-control:focus {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

#kycVerificationForm small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* KYC Alert Messages */
#kycVerificationModal .alert {
    border-radius: 6px;
    border-left: 4px solid;
    margin-bottom: 1rem;
}

#kycErrorMsg {
    background: rgba(220, 53, 69, 0.08);
    border-left-color: #dc3545;
    color: #721c24;
}

[data-theme="dark"] #kycErrorMsg {
    background: rgba(220, 53, 69, 0.12);
    color: #f8d7da;
}

#kycSuccessMsg {
    background: rgba(40, 167, 69, 0.08);
    border-left-color: #28a745;
    color: #155724;
}

[data-theme="dark"] #kycSuccessMsg {
    background: rgba(40, 167, 69, 0.12);
    color: #d4edda;
}

#kycVerificationModal .alert-warning {
    background: rgba(255, 193, 7, 0.08);
    border-left-color: #ffc107;
    color: #856404;
}

[data-theme="dark"] #kycVerificationModal .alert-warning {
    background: rgba(255, 193, 7, 0.12);
    color: #fff3cd;
}

/* KYC Modal Footer */
#kycVerificationModal .modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    background: var(--bg-modal);
}

[data-theme="dark"] #kycVerificationModal .modal-footer {
    border-color: rgba(255, 255, 255, 0.1);
}

#kycVerificationModal .btn-primary {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    border-radius: 6px;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

#kycVerificationModal .btn-primary:hover:not(:disabled) {
    background: rgba(59, 130, 246, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

#kycVerificationModal .btn-primary:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Spinner in button */
#kycVerificationModal .spinner-border {
    width: 1rem;
    height: 1rem;
}

/* Modal scrolling */
#kycVerificationModal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}


/* New User Plans Modal Styles */
.new-user-welcome {
    text-align: center;
    padding: 1rem 0;
}

.welcome-icon {
    font-size: 3.5rem;
    color: var(--accent-primary);
    animation: bounce 1.5s ease-in-out infinite;
}

@keyframes bounce {

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

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

.welcome-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.welcome-subtitle {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

/* Plans Preview Cards */
.plans-preview {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.plan-card-preview {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.plan-card-preview:hover {
    background: var(--border-color);
    transform: translateX(4px);
}

.plan-category-badge {
    background: var(--accent-primary);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.plan-preview-item {
    text-align: left;
    flex: 1;
}

.plan-preview-item h5 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* All Plans Section */
.all-plans-section {
    animation: slideUp 0.3s ease;
}

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

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

.category-section {
    margin-bottom: 2rem;
}

.category-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

@media (max-width: 480px) {
    .plans-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.75rem;
    }
}

/* Plan Cards */
.plan-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.plan-card:not(.disabled):hover {
    border-color: var(--accent-primary);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.plan-card.selected {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--accent-primary);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.plan-card.selected::before {
    content: '✓';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--accent-primary);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.85rem;
}

.plan-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--bg-secondary);
}

.plan-header {
    margin-bottom: 0.75rem;
}

.plan-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.plan-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--accent-primary);
    display: block;
}

.plan-description {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.plan-time-period {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-buy);
    background: rgba(16, 185, 129, 0.1);
    padding: 0.4rem;
    border-radius: 6px;
}

/* Modal adjustments for mobile */
@media (max-width: 576px) {
    .modal-fullscreen-sm-down {
        display: flex;
        flex-direction: column;
        max-height: 100vh;
    }

    .modal-content {
        max-height: 100vh;
        overflow-y: auto;
    }

    .welcome-title {
        font-size: 1.5rem;
    }

    .welcome-icon {
        font-size: 3rem;
    }
}

* Success Modal Styles */
.confetti-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #3b82f6;
    border-radius: 50%;
}

@keyframes confetti-fall {
    to {
        transform: translateY(500px) rotateZ(360deg);
        opacity: 0;
    }
}

.success-icon-wrapper {
    position: relative;
    display: inline-block;
}

.success-check-circle {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: white;
    margin: 0 auto;
    animation: scale-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scale-pop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.plans-summary-success {
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 1rem;
}

.plan-success-card {
    animation: slide-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slide-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Confetti Animation */
@keyframes confetti-fall {
    to {
        transform: translateY(100vh) rotateZ(360deg);
        opacity: 0;
    }
}

@keyframes confetti-spin {
    to {
        transform: rotateZ(720deg);
    }
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background: var(--accent-buy);
    animation: confetti-fall 3s ease-in forwards;
    pointer-events: none;
    z-index: 10000;
}

.confetti.spin {
    animation: confetti-fall 3s ease-in forwards, confetti-spin 3s linear forwards;
}

/* Price Drop Animation */
@keyframes price-drop {
    0% {
        opacity: 1;
        transform: scale(1);
        color: var(--text-primary);
    }
    50% {
        opacity: 0.7;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        color: var(--accent-buy);
    }
}

.price-drop {
    animation: price-drop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Coupon Button Styles */
#haveCouponBtn {
    font-size: 0.85rem;
    padding: 0.35rem 0.75rem;
    transition: all 0.2s ease;
}

#haveCouponBtn:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}


.modal-blur {
    filter: blur(4px);
    pointer-events: none; /* prevents interaction */
}

