:root {
    /* White Theme Colors */
    --bg-dark: #ffffff;
    --bg-card: #f8f9fa;
    --bg-glass: rgba(255, 255, 255, 0.95);
    /* More opaque for mobile */

    --primary: #00c853;
    --primary-glow: rgba(0, 200, 83, 0.2);

    --accent: #2962ff;

    --text-main: #111111;
    --text-muted: #666666;

    --border: #e0e0e0;

    --font-head: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;

    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
    touch-action: pan-x pan-y;
    /* Disable pinch zoom */
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    padding-bottom: 20px;
}

/* Background Glow Effect */
.bg-glow {
    position: fixed;
    top: -20%;
    left: 20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(41, 98, 255, 0.05) 0%, transparent 70%);
    filter: blur(80px);
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

/* Navbar */
.navbar {
    height: 70px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--text-main);
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
    flex: 1;
}

/* === SIMPLE AUTH PAGE (Image Replication) === */
.simple-auth-body {
    background-color: #f5f6fa;
    /* Light grey background */
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.simple-auth-container {
    width: 100%;
    max-width: 450px;
}

.simple-card {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #eaeaea;
    text-align: center;
}

.simple-title {
    font-family: var(--font-head);
    font-size: 1.8rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 8px;
}

.simple-subtitle {
    color: #888;
    font-size: 0.95rem;
    margin-bottom: 30px;
}

.simple-group {
    margin-bottom: 20px;
    text-align: left;
}

.simple-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    color: #333;
    outline: none;
    transition: 0.3s;
    background: white;
}

.simple-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.password-wrapper {
    position: relative;
}

.password-wrapper .toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    cursor: pointer;
}

.simple-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.simple-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #555;
    cursor: pointer;
}

.simple-link-blue {
    color: #3b82f6;
    font-weight: 600;
    text-decoration: none;
}

.simple-link-blue:hover {
    text-decoration: underline;
}

.simple-btn {
    width: 100%;
    background-color: #3b82f6;
    /* Bright Blue */
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.simple-btn:hover {
    background-color: #2563eb;
}

.simple-footer-text {
    margin-top: 24px;
    font-size: 0.9rem;
    color: #666;
}

/* Override Dark Mode for this specific page if body has class */
.simple-auth-body .input-wrapper i {
    display: none;
    /* remove icons if copied from old */
}

/* === MULTI-STEP FORM === */
.form-step {
    display: none;
    animation: fadeIn 0.4s ease;
}

.form-step.active {
    display: block;
}

.step-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.step-dot {
    width: 32px;
    height: 32px;
    background: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #999;
    font-weight: 600;
    transition: 0.3s;
    border: 2px solid transparent;
}

.step-dot.active {
    background: #3b82f6;
    color: white;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

.step-dot.completed {
    background: #10b981;
    /* Green */
    color: white;
}

.step-line {
    width: 40px;
    height: 2px;
    background: #e0e0e0;
    margin: 0 8px;
    transition: 0.3s;
}

.step-line.active {
    background: #10b981;
}

.step-actions {
    display: flex;
    gap: 16px;
    margin-top: 24px;
}

.secondary-btn {
    background-color: #e5e7eb;
    color: #4b5563;
}

.secondary-btn:hover {
    background-color: #d1d5db;
}

.input-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #555;
    text-align: left;
}

.readonly-input {
    background-color: #f3f4f6;
    color: #666;
    cursor: not-allowed;
    border-color: #e5e5e5;
    font-family: monospace;
    letter-spacing: 1px;
    font-weight: 700;
}

/* === AUTHENTICATION PAGES === */
.auth-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 60px;
    background: radial-gradient(circle at 50% 50%, rgba(41, 182, 246, 0.05) 0%, transparent 70%);
}

.auth-container {
    width: 100%;
    max-width: 480px;
}

.glass-form {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid white;
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

.auth-title {
    font-family: var(--font-head);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
    background: linear-gradient(135deg, var(--text-main) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    /* Fallback */
}

.auth-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-main);
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 16px 12px 48px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
    background: rgba(255, 255, 255, 0.5);
}

.input-wrapper input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(41, 98, 255, 0.1);
    background: white;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 0.9rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.checkbox-container input {
    accent-color: var(--accent);
}

.forgot-pass {
    color: var(--accent);
    font-weight: 600;
}

.full-width {
    width: 100%;
    margin-bottom: 24px;
    font-size: 1rem;
    padding: 14px;
}

.auth-footer {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--text-main);
    font-weight: 700;
    margin-left: 4px;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.nav-links {
    display: flex;
    gap: 32px;
    margin: 0 auto;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
    font-weight: 600;
}

.nav-actions {
    display: flex;
    gap: 10px;
}

/* Buttons */
.btn-glass {
    background: white;
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
    font-family: var(--font-body);
}

.btn-neon {
    background: var(--text-main);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
    font-family: var(--font-body);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-neon:hover {
    transform: translateY(-2px);
    background: var(--accent);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1.1rem;
}

.btn-xl {
    padding: 16px 40px;
    font-size: 1.2rem;
}

/* Hero */
.hero {
    padding: 120px 0 80px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #e3fcf0;
    border: 1px solid #b9f6ca;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    color: #007029;
    margin-bottom: 20px;
    font-weight: 600;
}

.dot {
    width: 6px;
    height: 6px;
    background: #00c853;
    border-radius: 50%;
    box-shadow: 0 0 5px #00c853;
}

.hero h1 {
    font-family: var(--font-head);
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -1px;
    color: var(--text-main);
}

.gradient-text {
    background: linear-gradient(90deg, var(--accent), #1565c0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    /* Fix: Define standard property */
}

.hero p {
    color: var(--text-muted);
    font-size: 1.15rem;
    margin-bottom: 32px;
    max-width: 90%;
}

.cta-group {
    display: flex;
    gap: 12px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.market-ticker-box {
    display: flex;
    gap: 20px;
    padding: 16px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    overflow-x: auto;
    /* Allow horizontal scroll on mobile */
    scrollbar-width: none;
}

.ticker-item {
    display: flex;
    flex-direction: column;
    min-width: 100px;
    flex-shrink: 0;
}

.ticker-item span {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    font-weight: 600;
}

.ticker-item b {
    font-size: 1rem;
    color: var(--text-main);
}

.up {
    color: #00c853;
}

.down {
    color: #ff3d00;
}

/* Visual */
.hero-visual {
    position: relative;
}

.phone-mockup {
    width: 100%;
    max-width: 320px;
    height: 600px;
    background: #ffffff;
    border-radius: 40px;
    border: 8px solid #f0f0f0;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.screen-content {
    padding: 24px;
    height: 100%;
    background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.chart-header span {
    color: var(--text-muted);
    display: block;
    font-size: 0.9rem;
}

.chart-header b {
    font-size: 1.5rem;
    color: var(--text-main);
}

.label-positive {
    color: #007029;
    background: #e3fcf0;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
}

.chart-area {
    margin-bottom: 100px;
    height: 200px;
}

.line-chart {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.buy-sell-actions {
    display: flex;
    gap: 16px;
    position: absolute;
    bottom: 30px;
    left: 20px;
    right: 20px;
}

.buy-sell-actions button {
    flex: 1;
    padding: 16px;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.btn-buy {
    background: var(--primary);
    color: white;
}

.btn-sell {
    background: #ff3d00;
    color: white;
}

.float-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid white;
    padding: 10px 18px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    color: var(--text-main);
}

.card-1 {
    top: 80px;
    left: -10px;
    animation: float 5s ease-in-out infinite;
}

.card-2 {
    bottom: 80px;
    right: -10px;
    animation: float 6s ease-in-out infinite 1s;
}

@keyframes float {

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

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

/* Features */
.features {
    padding: 80px 0;
    background-color: #fcfcfc;
}

.section-badge {
    text-align: center;
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 2px;
    font-size: 0.8rem;
    margin-bottom: 12px;
}

.features h2 {
    text-align: center;
    font-family: var(--font-head);
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: var(--text-main);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.feature-box {
    background: white;
    border: 1px solid var(--border);
    padding: 32px;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
}

.icon-glow {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.icon-glow.blue {
    background: #e3f2fd;
    color: #1565c0;
}

.icon-glow.green {
    background: #e8f5e9;
    color: #2e7d32;
}

.icon-glow.purple {
    background: #f3e5f5;
    color: #7b1fa2;
}

.feature-box h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    font-family: var(--font-head);
    color: var(--text-main);
}

.feature-box p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Stats */
.stats-banner {
    padding: 50px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: #fafafa;
}

.stats-flex {
    display: flex;
    justify-content: space-around;
    text-align: center;
    flex-wrap: wrap;
    gap: 30px;
}

.stat-block span {
    color: var(--text-muted);
    display: block;
    margin-bottom: 6px;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 600;
}

.stat-block h3 {
    font-size: 2rem;
    font-family: var(--font-head);
    color: var(--text-main);
}

/* Reviews (Marquee) */
.reviews-section {
    padding: 80px 0;
    background: #fafafa;
    overflow: hidden;
}

.reviews-section h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-align: center;
}

.marquee-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.marquee-wrapper::before,
.marquee-wrapper::after {
    content: "";
    position: absolute;
    top: 0;
    width: 80px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.marquee-wrapper::before {
    left: 0;
    background: linear-gradient(to right, #fafafa, transparent);
}

.marquee-wrapper::after {
    right: 0;
    background: linear-gradient(to left, #fafafa, transparent);
}

.marquee-content {
    display: flex;
    gap: 24px;
    width: max-content;
    animation: scrollLeft 30s linear infinite;
}

@keyframes scrollLeft {
    to {
        transform: translateX(-50%);
    }
}

.review-card {
    width: 300px;
    background: white;
    border: 1px solid var(--border);
    padding: 24px;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    flex-shrink: 0;
}

.stars {
    color: #feac00;
    margin-bottom: 12px;
    font-size: 0.9rem;
    letter-spacing: 2px;
}

.review-card p {
    font-size: 1rem;
    margin-bottom: 20px;
}

/* CTA */
.cta-section {
    padding: 100px 0;
    text-align: center;
}

.cta-box {
    background: var(--text-main);
    color: white;
    border-radius: 24px;
    padding: 60px 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.cta-box h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-family: var(--font-head);
    color: white;
}

.cta-box p {
    color: #cccccc;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.cta-box .btn-neon {
    background: white;
    color: black;
}

/* Footer */
.footer {
    padding: 60px 0 30px;
    background: #f9f9f9;
    border-top: 1px solid var(--border);
}

.footer-row {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand {
    flex: 1;
    min-width: 250px;
}

.footer-brand h3 {
    margin-bottom: 14px;
    font-family: var(--font-head);
    font-size: 1.4rem;
    color: var(--text-main);
}

.footer-brand p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.socials {
    display: flex;
    gap: 20px;
}

.socials a {
    color: var(--text-muted);
    font-size: 1.2rem;
}

.footer-links {
    min-width: 140px;
}

.footer-links h4 {
    color: var(--text-main);
    margin-bottom: 20px;
    font-weight: 700;
}

.footer-links a {
    display: block;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.footer-copy {
    text-align: center;
    color: #999;
    font-size: 0.85rem;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

/* Modal */
.modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 2000;
    align-items: flex-end;
    /* Mobile: Bottom sheet style */
    justify-content: center;
}

.glass-modal {
    background: white;
    padding: 32px 24px;
    border-radius: 24px 24px 0 0;
    /* Bottom sheet radius */
    width: 100%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: #999;
    font-size: 1.5rem;
    cursor: pointer;
}

.input-contain {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.input-contain input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-main);
    outline: none;
    font-size: 1rem;
}

.full-width {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
}

/* Learn Page Styles */
.page-header {
    padding: 120px 0 60px;
    text-align: center;
    background: #fafafa;
    border-bottom: 1px solid var(--border);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 60px 0;
}

.blog-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.2s;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-soft);
}

.blog-img {
    height: 200px;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
}

.blog-content {
    padding: 24px;
}

.blog-tag {
    background: #e3f2fd;
    color: #1565c0;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.blog-content h3 {
    margin: 12px 0;
    font-size: 1.25rem;
}

.read-more {
    color: var(--accent);
    font-weight: 600;
    margin-top: 16px;
    display: inline-block;
}


/* === MOBILE OPTIMIZATION === */
@media (min-width: 769px) {
    .modal-backdrop {
        align-items: center;
    }

    .glass-modal {
        border-radius: 24px;
    }

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

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

@media (max-width: 768px) {
    html {
        font-size: 90%;
        /* Scale down text for mobile */
    }

    .navbar {
        height: 70px;
        position: sticky;
        top: 0;
        bottom: auto;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
    }

    .nav-container {
        justify-content: space-between;
        padding: 0 20px;
    }

    .logo {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 32px;
        padding: 40px;
        transform: translateX(100%);
        visibility: hidden;
        transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1), visibility 0.3s step-end;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        border-top: 1px solid var(--border);
    }

    .nav-menu.active {
        transform: translateX(0);
        visibility: visible;
        transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1), visibility 0s step-start;
    }

    .nav-links {
        flex-direction: column;
        align-items: center;
        gap: 24px;
        width: 100%;
    }

    .nav-links a {
        font-size: 1.25rem;
        flex-direction: row;
        /* Keeping icon and text inline */
        width: auto;
        padding: 0;
    }

    .nav-links a::before {
        display: none;
        /* remove css content icons if any were forced */
    }

    .nav-actions {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 16px;
        margin-top: 20px;
    }

    .nav-actions button {
        width: 100%;
        padding: 12px;
        font-size: 1.1rem;
    }

    /* Hero Adjustments */
    .hero {
        padding: 40px 0;
        text-align: center;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

    .cta-group {
        justify-content: center;
    }

    /* Stats */
    .stat-block {
        width: 45%;
        margin-bottom: 20px;
    }

    /* Features */
    .features h2 {
        font-size: 2rem;
    }

    /* Trade Page Mobile - Stack Layout */
    .trade-layout {
        flex-direction: column;
        height: auto;
        margin-top: 0;
        margin-bottom: 70px;
        /* Space for bottom nav */
    }

    .sidebar {
        width: 100%;
        height: 300px;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .main-chart {
        height: 400px;
        padding: 10px;
    }

    .order-panel {
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--border);
    }

    /* Analysis Page Mobile */
    .analysis-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .widget-card {
        height: 400px;
    }

    /* Learn Page Mobile */
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    /* Generic Paddings */
    .container {
        padding: 0 16px;
    }
}



/* Trade Dashboard Panel */
.dashboard-panel {
    background: white;
    border-top: 1px solid var(--border);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 250px;
    overflow: hidden;
}

.panel-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    background: #fafafa;
}

.panel-tabs button {
    flex: 1;
    padding: 12px;
    border: none;
    background: none;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    border-right: 1px solid var(--border);
    transition: 0.2s;
}

.panel-tabs button.active {
    background: white;
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
}

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

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table th {
    background: #f8f9fa;
    padding: 10px 16px;
    text-align: left;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    color: var(--text-main);
}

.inst-name {
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tag-buy {
    background: #e3fcf0;
    color: #00c853;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
}

.tag-sell {
    background: #ffebee;
    color: #ff3d00;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
}

.panel-footer {
    display: flex;
    justify-content: space-between;
    padding: 12px 24px;
    background: #fafafa;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-item span {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.stat-item b {
    color: var(--text-main);
    font-size: 1rem;
}

@media (max-width: 768px) {
    .dashboard-panel {
        min-height: auto;
    }

    /* Let it fit content on mobile stack */
    .data-table th,
    .data-table td {
        padding: 10px;
        font-size: 0.85rem;
    }
}

/* =========================================
   DASHBOARD LAYOUT
   ========================================= */
.dashboard-body {
    background-color: #f7f9fc;
    display: flex;
    /* overflow: hidden; REMOVED to prevent content cutoff */
    overflow-x: hidden;
    /* Only prevent Horizontal Scroll */
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background-color: white;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    height: 100vh;
    /* Fallback */
    height: 100dvh;
    /* Mobile Friendly */
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    transition: 0.3s;
    border-radius: 0 20px 20px 0;
    /* Rounded Right Corners */
}

.sidebar-header {
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid var(--border);
}

.sidebar-menu {
    flex: 1;
    padding: 24px 16px;
    overflow-y: auto;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-muted);
    font-weight: 500;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: 0.2s;
}

.menu-item:hover,
.menu-item.active {
    background-color: #e3fcf0;
    /* Light green tint matching primary */
    color: var(--primary);
}

.menu-item i {
    width: 20px;
    text-align: center;
}

.user-profile-mini {
    padding: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-avatar {
    width: 40px;
    height: 40px;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.profile-info h4 {
    font-size: 0.9rem;
    color: var(--text-main);
    margin: 0;
}

.profile-info span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* MAIN CONTENT */
.main-content {
    flex: 1;
    margin-left: 260px;
    /* Sidebar width */
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: relative;
    background-color: #f7f9fc;
    min-width: 0;
    /* Fix flex child overflow issue */
}

.top-bar {
    height: 70px;
    background-color: white;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
}

.page-title {
    font-family: var(--font-head);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.balance-card {
    background: #e3fcf0;
    padding: 6px 16px;
    border-radius: 50px;
    color: #007029;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.content-wrapper {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
}

/* CARDS & WIDGETS */
.dash-card {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 24px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 24px;
}

.dash-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.quick-tools-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* Always 2 columns */
    gap: 24px;
}

.dash-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* TABLES */
.custom-table {
    width: 100%;
    border-collapse: collapse;
}

.custom-table th {
    text-align: left;
    padding: 12px 16px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border);
}

.custom-table td {
    padding: 16px;
    color: var(--text-main);
    font-size: 0.95rem;
    border-bottom: 1px solid #f0f0f0;
}

.custom-table tr:last-child td {
    border-bottom: none;
}

/* RESPONSIVE DASHBOARD */
@media (max-width: 992px) {
    .hide-on-mobile {
        display: none !important;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }
}

/* =========================================
   MOBILE RESPONSIVENESS (ADDED)
   ========================================= */

/* Mobile Toggle Button */
.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-main);
    margin-right: 16px;
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 90;
    display: none;
    opacity: 0;
    transition: 0.3s;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Responsive Tables */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Mobile Changes */
@media (max-width: 992px) {
    .hide-on-mobile {
        display: none !important;
    }

    .mobile-toggle {
        display: block;
    }

    .sidebar {
        transform: translateX(-100%);
        box-shadow: none;
    }

    .sidebar.active {
        transform: translateX(0);
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
    }

    .main-content {
        margin-left: 0;
    }

    .top-bar {
        padding: 0 16px;
    }

    .content-wrapper {
        padding: 16px;
    }

    .p-list-full-width {
        margin-left: -16px !important;
        margin-right: -16px !important;
        width: calc(100% + 32px) !important;
    }

    .dash-grid-3,
    .dash-grid-2 {
        grid-template-columns: 1fr;
    }

    .quick-tools-grid {
        gap: 12px;
    }

    .dash-card {
        padding: 16px;
    }
}

/* =========================================
   BOTTOM NAVIGATION (MOBILE ONLY)
   ========================================= */
.bottom-nav {
    display: none;
    /* Hidden on Desktop */
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: white;
    height: 70px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    padding: 0 10px;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100px);
    }

    to {
        transform: translateY(0);
    }
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #9ca3af;
    font-size: 0.7rem;
    font-weight: 500;
    gap: 4px;
    width: 60px;
}

.nav-item i {
    font-size: 1.2rem;
    transition: 0.3s;
}

.nav-item.active {
    color: var(--accent);
}

.nav-item.active i {
    transform: translateY(-2px);
}

/* Center Button (Portfolio) */
.nav-item-center {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--accent), #1565c0);
    border-radius: 50%;
    margin-top: -30px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(41, 98, 255, 0.4);
    border: 4px solid #f7f9fc;
    /* Agnostic match to body bg */
    transition: 0.3s;
}

.nav-item-center i {
    color: white;
    font-size: 1.4rem;
}

.nav-item-center:active {
    transform: scale(0.95);
}

@media (max-width: 992px) {
    .hide-on-mobile {
        display: none !important;
    }

    .sidebar {
        /* display: none !important;  REMOVED so it can be opened */
        z-index: 9999;
        /* Ensure it's above everything */
        transform: translateX(-100%);
        /* Hide off-screen by default */
    }

    .sidebar.active {
        transform: translateX(0);
        /* Slide in when active */
    }

    .mobile-toggle {
        display: none !important;
        /* Hide Hamburger */
    }

    .bottom-nav {
        display: flex;
        /* Show Bottom Nav */
    }

    .main-content {
        margin-left: 0 !important;
        /* Fix: Remove sidebar margin on mobile */
        width: 100%;
        padding-bottom: 100px;
        /* Space for nav */
    }

    /* Adjust body background to handle floating nav cutout visual */
    body.dashboard-body {
        background-color: #f7f9fc;
    }
}

/* =========================================
   TOP BAR PROFILE ICON
   ========================================= */
.profile-circle {
    width: 36px;
    height: 36px;
    background-color: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
    text-decoration: none;
    border: 1px solid var(--border);
}

.profile-circle:hover {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* =========================================
   RESPONSIVE UTILITIES
   ========================================= */
@media (max-width: 992px) {
    .hide-on-mobile {
        display: none !important;
    }

    .desktop-only {
        display: none !important;
    }
}

@media (min-width: 993px) {
    .mobile-only {
        display: none !important;
    }
}

/* =========================================
   SIDEBAR SECTIONS
   ========================================= */
.sidebar-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 16px 16px 8px;
    margin-top: 8px;
}

/* =========================================
   MOBILE WALLET CARD
   ========================================= */
@media (max-width: 992px) {
    .mobile-wallet-card {
        /* background: white;  Default dash-card background */
        /* color inputs removed to use default */
        text-align: center !important;
        /* Revert to center or keep left? Standard is center for this app */
        padding: 16px !important;
        /* Reduced from 24px */
    }

    .mobile-wallet-card .available-label {
        /* Use default color */
        font-size: 0.85rem !important;
        /* Slightly smaller label */
    }

    .mobile-wallet-card .wallet-amount {
        /* Use default color */
        font-size: 2.2rem !important;
        /* Reduced from 3rem */
        margin-top: 4px;
        margin-bottom: 20px;
    }

    .mobile-wallet-card .btn-neon {
        /* Revert to default button colors */
        width: 100% !important;
        /* Keep full width but share space via flex */
        flex: 1;
        /* Share space equally */
        margin-bottom: 0 !important;
        /* Remove bottom margin */
    }

    .mobile-wallet-card .action-buttons {
        display: flex;
        /* Ensure flex */
        flex-direction: row !important;
        /* Force Row */
        gap: 12px !important;
        /* Add gap between buttons */
        margin-top: 0 !important;
    }
}

/* =========================================
   SCROLL ROW (GLOBAL)
   ========================================= */
.scroll-row {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
    padding-right: 16px;
    /* Prevent last card from sticking to edge */
    /* Space for scrollbar */
    /* scroll-snap-type: x mandatory;  <-- REMOVED */
    -webkit-overflow-scrolling: touch;
    /* Smooth scroll on iOS */
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
}

.scroll-row::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome/Safari */
}

.scroll-row .dash-card {
    min-width: 260px;
    /* Fixed width for consistent cards */
    flex: 0 0 auto;
    /* Prevent shrinking */
    /* scroll-snap-align REMOVED */
}

/* =========================================
   MOBILE OPTIMIZATIONS (Small Indices)
   ========================================= */
@media (max-width: 768px) {
    .scroll-row {
        gap: 8px;
        /* Smaller gap */
    }

    .scroll-row .dash-card {
        min-width: 29vw;
        /* Fit ~3 items (29*3=87 + gaps) */
        padding: 10px;
        border-radius: 12px;
    }

    .scroll-row .dash-card div:nth-child(1) {
        /* Title */
        font-size: 0.65rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .scroll-row .dash-card div:nth-child(2) {
        /* Price */
        font-size: 0.9rem !important;
        margin-top: 2px;
    }

    .scroll-row .dash-card div:nth-child(3) {
        /* Change */
        font-size: 0.65rem !important;
        margin-top: 2px !important;
    }
}

/* =========================================
   CATEGORY PILLS (Market Page)
   ========================================= */
.category-scroll-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    overflow-x: auto;
    padding: 12px 2px;
    margin-bottom: 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.category-scroll-container::-webkit-scrollbar {
    display: none;
}

.category-pill {
    background: white;
    border: 1px solid var(--border);
    padding: 8px 20px;
    border-radius: 24px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #666;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-pill.active {
    background: var(--primary);
    color: black;
    border-color: var(--primary);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 230, 118, 0.2);
}

.category-pill:hover {
    border-color: #ccc;
}

/* =========================================
   MOBILE RESPONSIVENESS (Text Sizing)
   ========================================= */
@media (max-width: 768px) {

    .custom-table th,
    .custom-table td {
        padding: 10px 8px;
        /* Tighter padding */
        font-size: 0.85rem;
        /* Smaller text */
    }

    .custom-table th {
        font-size: 0.75rem;
        /* Even smaller headers */
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    /* Compact Category Pills */
    .category-pill {
        padding: 6px 14px;
        /* Reduced from 8px 20px */
        font-size: 0.8rem;
        /* Reduced from 0.9rem */
    }
}

/* =========================================
   MARKET SENTIMENT WIDGET
   ========================================= */

/* =========================================
   MOBILE WATCHLIST SWIPE
   ========================================= */
.watchlist-container {
    width: 100%;
}

/* Desktop: Table Look (Grid) */
.watchlist-header {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    padding: 12px 16px;
    background: #f9f9f9;
    border-bottom: 1px solid var(--border);
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.watchlist-list {
    display: flex;
    flex-direction: column;
}

.watchlist-item {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #f0f0f0;
    min-height: 65px;
    /* Ensure height for swipe actions */
}

/* The Background Layer (Delete Button) */
.swipe-bg {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 100%;
    background-color: #ff5252;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 20px;
    z-index: 1;
}

.swipe-bg i {
    color: white;
    font-size: 1.2rem;
}

/* The Foreground Layer (Content) */
.swipe-content {
    position: relative;
    background-color: white;
    z-index: 2;
    width: 100%;
    height: 100%;
    transition: transform 0.2s ease-out;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    align-items: center;
    padding: 16px;
}

.swipe-content.swiped {
    transform: translateX(-80px);
    /* Reveal potential delete width */
}

.wl-col {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Action Buttons in Row */
.wl-actions {
    display: flex;
    gap: 8px;
}

/* Watchlist Action Buttons */
.btn-buy {
    background: #00c853;
    padding: 4px 12px;
    font-size: 0.8rem;
    flex: 1;
}

.btn-sell {
    background: #ff3d00;
    padding: 4px 12px;
    font-size: 0.8rem;
    flex: 1;
}

/* Watchlist Management Buttons */
.wl-mgmt-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    font-size: 1rem;
    color: #888;
    border-radius: 4px;
    transition: all 0.2s;
}


/* =========================================
   PORTFOLIO REDESIGN (KITE STYLE)
   ========================================= */
.portfolio-header {
    background: #f9f9f9;
    padding: 16px;
    margin-bottom: 0;
}

.p-total-card {
    background: #fff;
    padding: 24px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    text-align: center;
    margin-bottom: 8px;
}

.p-total-label {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 8px;
    text-transform: none;
}

.p-total-value {
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 0;
}

.p-stats-row {
    display: flex;
    justify-content: space-between;
}

/* Portfolio Tabs (Standard: 2 tabs centered) */
.portfolio-tabs {
    display: flex;
    justify-content: center;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 0 16px;
}

/* History Tabs (Compact: 6 tabs fit on one screen) */
.history-tabs {
    display: flex;
    justify-content: space-between;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 0 8px;
    white-space: nowrap;
}

.p-tab {
    padding: 12px 10px;
    margin: 0 38px;
    font-size: 0.95rem;
    color: #999;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

/* Override for History Page Density */
.history-tabs .p-tab {
    padding: 12px 0;
    margin: 0 4px;
    font-size: 0.88rem;
}

.p-tab.active {
    color: #3f51b5;
    border-bottom: 2px solid #3f51b5;
}

.p-tab-count {
    font-size: 0.65rem;
    background: #bbb;
    color: #fff;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    font-weight: 600;
}

.p-tab.active .p-tab-count {
    background: #3f51b5;
}

/* Portfolio List */
.portfolio-list {
    background: #fff;
}

/* Portfolio List Item (3-Row Layout Refined) */
.portfolio-item {
    display: block;
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
    cursor: pointer;
    transition: background 0.2s;
}

.portfolio-item:hover {
    background: #fafafa;
}

/* Row 1: Qty | Avg | Tags */
.p-row-top {
    display: grid;
    grid-template-columns: 45px 1fr auto;
    align-items: center;
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 4px;
}

.p-qty-label .p-val {
    color: #3f51b5;
    font-weight: 500;
}

.p-avg-label .p-val {
    color: #333;
    font-weight: 500;
}

.p-tags {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

.p-tag {
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 2px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.4px;
}

.p-tag.holding {
    background: #e3f2fd;
    color: #3f51b5;
}

.p-tag.cnc,
.p-tag.mis,
.p-tag.nrml {
    background: #f1f3f6;
    color: #666;
}

/* Row 2: Script Name | P&L */
.p-row-mid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.p-script-name {
    font-size: 1rem;
    font-weight: 500;
    color: #333;
}

.p-pnl {
    font-size: 1rem;
    font-weight: 500;
}

/* Row 3: Exchange | LTP */
.p-row-bot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #999;
}

.p-ex {
    text-transform: uppercase;
}

.p-ltp span {
    color: #333;
    font-weight: 500;
    margin-left: 4px;
}

/* History / Orders Specific Badges */
.p-act-badge {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 2px;
    font-weight: 600;
    text-transform: uppercase;
}

.p-act-buy {
    background: #e3f2fd;
    color: #2196f3;
}

.p-act-sell {
    background: #fdecea;
    color: #df514c;
}

.p-stat-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 2px;
    font-weight: 600;
    text-transform: uppercase;
}

.p-stat-complete {
    background: #e8f5e9;
    color: #4caf50;
}

.p-stat-rejected {
    background: #fdecea;
    color: #df514c;
}

.p-stat-open {
    background: #fff3e0;
    color: #ff9800;
}

/* History Item Overrides */
.history-item {
    border-bottom: 1px solid #f5f5f5;
}

/* Colors */
.text-green {
    color: #4caf50 !important;
    /* Kite Green */
}

.text-red {
    color: #df514c !important;
    /* Kite Red */
}

.text-muted {
    color: #999 !important;
}

@media (max-width: 576px) {
    .watchlist-header {
        display: none;
        /* Hide header on mobile */
    }

    .watchlist-item {
        min-height: 50px;
        /* Reduced from 65px */
    }

    .swipe-content {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        /* Two slim rows */
        padding: 8px 12px;
        /* Tighter padding */
        gap: 2px;
        align-content: center;
    }

    /* Script Name */
    .wl-col-script {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
        font-size: 0.9rem;
        /* Smaller font */
        line-height: 1.2;
    }

    .wl-col-script>div:last-child {
        font-size: 0.7rem !important;
        /* Extremely small subtext */
    }

    /* LTP */
    .wl-col-ltp {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
        text-align: right;
        font-weight: 600;
        font-size: 0.9rem;
    }

    /* Change % */
    .wl-col-change {
        grid-column: 2 / 3;
        grid-row: 2 / 3;
        text-align: right;
        font-size: 0.75rem;
        line-height: 1.2;
    }

    /* Actions (Buy/Sell) */
    .wl-col-actions {
        grid-column: 1 / 2;
        grid-row: 2 / 3;
        display: flex;
        align-items: center;
    }

    .wl-actions {
        gap: 6px;
    }

    .wl-col-actions .btn-neon {
        padding: 0;
        width: 24px;
        height: 24px;
        line-height: 22px;
        font-size: 0.7rem;
        text-align: center;
        border-radius: 4px;
        /* Square-ish buttons */
        display: inline-block;
        flex: none;
        /* Prevent flex-grow from desktop styles */
    }

    .desktop-delete-btn {
        display: none;
    }

    /* Hide hint to save space */
    .swipe-hint {
        display: none;
    }
}

.sentiment-bar-container {
    height: 8px;
    width: 100%;
    background: #f0f0f0;
    border-radius: 4px;
    display: flex;
    overflow: hidden;
}

/* =========================================
   MARKET SESSION BADGES
   ========================================= */
.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.open {
    background: #e0f2f1;
    color: #00695c;
}

.status-badge.closed {
    background: #ffebee;
    color: #c62828;
}

.sentiment-bar {
    height: 100%;
}

.sentiment-bar.buy {
    background: #00c853;
}

.sentiment-bar.sell {
    background: #ff3d00;
}

/* =========================================
   CUSTOM MODALS (Popups)
   ========================================= */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.custom-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.custom-modal {
    background: white;
    width: 90%;
    max-width: 450px;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    max-height: 90vh;
    /* Scroll if tall */
    overflow-y: auto;
}

.custom-modal-overlay.active .custom-modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-main);
}

.close-modal {
    font-size: 1.5rem;
    color: #888;
    cursor: pointer;
    background: #f0f0f0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.close-modal:hover {
    background: #ffcdd2;
    color: #c62828;
}

/* Watchlist Tabs & Ripple */
.btn-ripple {
    position: relative;
    overflow: hidden;
    transform: translate3d(0, 0, 0);
    transition: all 0.2s ease;
}

.btn-ripple:active {
    transform: scale(0.95);
    opacity: 0.8;
}

.watchlist-tab {
    padding: 10px 20px;
    border-radius: 30px;
    border: none;
    font-size: 0.9rem;
    white-space: nowrap;
    margin-right: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.watchlist-tab.active {
    background: #333;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.watchlist-tab.inactive {
    background: #f5f5f5;
    color: #666;
    font-weight: 500;
}

.watchlist-add-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 50%;
    background: #e0f2f1;
    color: #009688;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.watchlist-add-btn:hover {
    background: #b2dfdb;
}

/* Button Chips (General Usage) */
.btn-chip {
    padding: 6px 14px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid #eee;
    font-size: 0.85rem;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
}

.btn-chip:hover {
    background: #f9f9f9;
    border-color: #ddd;
}

.btn-chip.active {
    background: #000;
    color: #fff;
    border: 1px solid #000;
    font-weight: 500;
}

/* Portfolio Filter Row */
.p-filter-row {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

.p-filter-row .simple-input,
.p-filter-row .btn-neon {
    height: 42px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 0.9rem;
    box-sizing: border-box;
}

.p-filter-row .simple-input {
    background: white;
    border: 1px solid #ddd;
    color: #333;
    width: auto;
}

/* Order Modal (Bottom Sheet) */
.order-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    /* Hidden by default */
    align-items: flex-end;
    /* Bottom sheet */
    justify-content: center;
    backdrop-filter: blur(2px);
}

.order-modal-overlay.active {
    display: flex;
}

.order-modal-content {
    background: white;
    width: 100%;
    max-width: 500px;
    /* Desktop constraint */
    border-radius: 20px 20px 0 0;
    padding: 20px 20px 50px 20px;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.om-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.om-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
}

.om-header .om-price {
    font-size: 1.2rem;
    font-weight: 700;
}

.om-type-badge {
    padding: 4px 8px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.om-form-group {
    margin-bottom: 16px;
}

.om-label {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 6px;
}

.om-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.om-input {
    flex: 1;
    width: 100%;
    /* Force full width in block containers */
    max-width: 100%;
    /* Prevent overflow */
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
}

.om-btn-cancel {
    background: #f5f5f5;
    color: #333;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    flex: 1;
}

.om-btn-submit {
    background: #000;
    /* Dynamic */
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    flex: 2;
}

/* Buy/Sell Themes */
.theme-buy .om-btn-submit {
    background: #00c853;
}

.theme-buy .om-price {
    color: #00c853;
}

.theme-sell .om-btn-submit {
    background: #ff3d00;
}

.theme-sell .om-price {
    color: #ff3d00;
}

/* Desktop Tweaks for Order Modal */
@media (min-width: 768px) {
    .order-modal-overlay {
        align-items: center;
        /* Center vertically */
    }

    .order-modal-content {
        max-width: 400px;
        border-radius: 16px;
        /* All corners rounded */
        padding: 24px;
        /* Reset padding */
        animation: fadeInScale 0.2s ease-out;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    }

    @keyframes fadeInScale {
        from {
            opacity: 0;
            transform: scale(0.9);
        }

        to {
            opacity: 1;
            transform: scale(1);
        }
    }
}

/* Order Modal Refinements */
.theme-buy .om-type-badge {
    background: #e8f5e9;
    color: #2e7d32;
}

.theme-sell .om-type-badge {
    background: #ffebee;
    color: #c62828;
}

.om-header .om-price {
    white-space: nowrap;
    margin-left: 10px;
}

.om-checkbox-row {
    margin-top: 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
}

.om-checkbox-row label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #333;
    font-weight: 500;
    cursor: pointer;
}

.om-checkbox-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #333;
}

/* --- ADMIN PANEL STYLES --- */
:root {
    --admin-bg: #f5f7fa;
    --admin-sidebar: #111827;
    --admin-primary: #3b82f6;
    --admin-text: #1f2937;
    --admin-text-light: #9ca3af;
}

.admin-sidebar {
    width: 260px;
    background: var(--admin-sidebar);
    color: white;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    padding: 24px;
    z-index: 1000;
    transition: transform 0.3s ease;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
}

.admin-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: #9ca3af;
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.95rem;
}

.admin-menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    transform: translateX(3px);
}

.admin-menu-item.active {
    background: var(--admin-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.admin-content {
    margin-left: 260px;
    padding: 32px;
    background: var(--admin-bg);
    min-height: 100vh;
    transition: margin 0.3s ease;
    color: var(--admin-text);
}

/* Modern Card */
/* Modern Card */
.stat-card {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    /* Vertical Layout Globally */
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 12px;
    transition: transform 0.2s;
}

.stat-card>div:last-child {
    width: 100%;
}

.stat-icon {
    margin-bottom: 4px;
    /* Space below icon */
}

/* Adjust grid for compact vertical cards */
.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    /* Allow smaller cards */
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

/* Modern Table */
.data-table {
    width: 100%;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 24px;
}

.data-table th {
    background: #f9fafb;
    padding: 16px 24px;
    font-weight: 600;
    font-size: 0.8rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #f3f4f6;
}

.data-table td {
    padding: 20px 24px;
    border-bottom: 1px solid #f3f4f6;
    color: var(--admin-text);
    font-size: 0.95rem;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: #f9fafb;
}

/* Badges */
.status-badge {
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Action Buttons */
.action-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    font-size: 0.85rem;
    margin-right: 8px;
    transition: all 0.2s;
}

.action-btn:hover {
    filter: brightness(0.95);
    transform: translateY(-1px);
}

.admin-mobile-toggle {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--admin-primary);
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
    z-index: 1001;
    border: none;
    cursor: pointer;
}

.admin-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999;
    display: none;
    backdrop-filter: blur(4px);
}

/* Hide Scrollbar for Admin Nav */
.admin-sidebar nav::-webkit-scrollbar {
    display: none;
}

.admin-sidebar nav {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.admin-sidebar::-webkit-scrollbar {
    display: none;
}

.admin-sidebar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}


/* Mobile Responsive */
@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
        width: 270px;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.2);
    }

    .admin-sidebar.active {
        transform: translateX(0);
    }

    .admin-content {
        margin-left: 0;
        padding: 12px;
        padding-bottom: 90px;
        width: 100%;
    }

    /* Force 3 columns on mobile (Compact View) */
    .grid-4 {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        /* Small gap */
        overflow: visible;
        padding-bottom: 0;
    }

    .grid-4::-webkit-scrollbar {
        display: none;
    }

    .stat-card {
        min-width: 0;
        /* Allow shrink */
        width: 100%;
        flex-direction: column;
        padding: 10px 4px;
        text-align: center;
        gap: 6px;
        height: 100%;
        border-radius: 8px;
        /* Smaller radius */
        justify-content: center;
    }

    .stat-card>div:last-child {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        margin-left: 0;
        flex: unset;
    }

    .stat-icon {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
        margin: 0 auto;
        border-radius: 8px;
    }

    .stat-card h2 {
        font-size: 1rem;
        margin: 2px 0 0 0;
        line-height: 1;
    }

    /* Label Styling */
    .stat-card>div:last-child>div:first-child {
        font-size: 0.65rem;
        line-height: 1.1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
        margin-bottom: 2px;
    }

    .admin-mobile-toggle {
        display: flex;
    }

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

    .data-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        border: 1px solid #e5e7eb;
    }

    .data-table th,
    .data-table td {
        padding: 14px 16px;
    }
}

/* Premium Filter Styles */
.filter-select {
    padding: 10px 35px 10px 15px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    background-color: #fff !important;
    font-family: 'Outfit', sans-serif !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    color: #374151 !important;
    cursor: pointer !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    min-width: 140px;
}

.filter-select:hover {
    border-color: #3b82f6 !important;
    background-color: #f9fafb !important;
}

.filter-select:focus {
    outline: none !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}