* {
    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;
}

[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);
}
