/* Dashboard Scope */
.dashboard-scope {
    font-family: 'Poppins', sans-serif;
}

/* R1 (navbar fixed) + R3 (no scrollbar shift) */
html {
    scrollbar-gutter: stable;
}

body {
    background-color: #f4f7fc;
    /* Adding a white overlay to make the very dark background much lighter/dimmed */
    background-image: linear-gradient(rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.75)), url("../img/dashboard.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    /* clip (not hidden) so the sticky navbar is not broken by a scroll container */
    overflow-x: clip;
}

/* Container */
.container {
    display: flex;
    max-width: 1800px;
    margin: 40px auto;
    padding: 0 40px;
    gap: 50px;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 260px;
    flex-shrink: 0;
    position: sticky;
    top: 152px;
    height: fit-content;
    align-self: flex-start;
}

.nav-btn {
    padding: 12px 25px;
    border-radius: 30px;
    border: 1px solid #eaeaea;
    background-color: #fff;
    color: #000;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

.nav-btn:hover {
    border-color: #007bff;
    color: #007bff;
}

.nav-btn.active {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
}

/* Main Content */
.main-content {
    flex-grow: 1;
}

.page-title {
    color: #0f172a;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
    letter-spacing: -0.5px;
}

/* Cards */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.card {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    background: #ffffff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 200px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.card-badge {
    position: absolute;
    top: 30px;
    left: 30px;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
}

.card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    margin-top: 40px;
    /* Space for badge */
    max-width: 60%;
    position: relative;
    z-index: 2;
}

.card-content h2 {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 12px;
}

.card-content p {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 24px;
}

.card-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    white-space: nowrap;
}

.card-btn:hover {
    transform: scale(1.05);
}

.card-btn span {
    margin-left: 6px;
    font-size: 16px;
}

.card-illustration {
    position: absolute;
    right: -20px;
    bottom: -15px;
    width: 200px;
    height: 200px;
    z-index: 1;
    pointer-events: none;
}

.card-illustration svg,
.card-illustration img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Lighten the 3D icons to make them match the bright pastel aesthetic */
    filter: brightness(1.25) contrast(0.95) saturate(0.9);
}

/* Color Variants */
.card-blue .card-badge {
    background: #e0e7ff;
    color: #0052ff;
}

.card-blue .card-btn {
    background: #0062ff;
}

.card-blue:hover .card-btn {
    background: #0052cc;
}

.card-blue {
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 300' preserveAspectRatio='none'%3E%3Cpath fill='none' stroke='%23bfdbfe' stroke-width='1.5' d='M0 200 C 300 100, 600 300, 1000 180' /%3E%3Cpath fill='none' stroke='%23bfdbfe' stroke-width='1.5' d='M0 230 C 300 130, 600 330, 1000 210' /%3E%3Cpath fill='none' stroke='%23bfdbfe' stroke-width='1.5' d='M0 260 C 300 160, 600 360, 1000 240' /%3E%3Cpath fill='none' stroke='%23bfdbfe' stroke-width='1.5' d='M0 290 C 300 190, 600 390, 1000 270' /%3E%3C/svg%3E") no-repeat bottom left / 100% 60%,
        radial-gradient(circle at bottom left, #eff6ff 0%, #ffffff 70%);
}

.card-green .card-badge {
    background: #dcfce7;
    color: #059669;
}

.card-green .card-btn {
    background: #10b981;
}

.card-green:hover .card-btn {
    background: #059669;
}

.card-green {
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 300' preserveAspectRatio='none'%3E%3Cpath fill='none' stroke='%23bbf7d0' stroke-width='1.5' d='M0 200 C 300 100, 600 300, 1000 180' /%3E%3Cpath fill='none' stroke='%23bbf7d0' stroke-width='1.5' d='M0 230 C 300 130, 600 330, 1000 210' /%3E%3Cpath fill='none' stroke='%23bbf7d0' stroke-width='1.5' d='M0 260 C 300 160, 600 360, 1000 240' /%3E%3Cpath fill='none' stroke='%23bbf7d0' stroke-width='1.5' d='M0 290 C 300 190, 600 390, 1000 270' /%3E%3C/svg%3E") no-repeat bottom left / 100% 60%,
        radial-gradient(circle at bottom left, #f0fdf4 0%, #ffffff 70%);
}

.card-purple .card-badge {
    background: #f3e8ff;
    color: #7c3aed;
}

.card-purple .card-btn {
    background: #8b5cf6;
}

.card-purple:hover .card-btn {
    background: #7c3aed;
}

.card-purple {
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 300' preserveAspectRatio='none'%3E%3Cpath fill='none' stroke='%23e9d5ff' stroke-width='1.5' d='M0 200 C 300 100, 600 300, 1000 180' /%3E%3Cpath fill='none' stroke='%23e9d5ff' stroke-width='1.5' d='M0 230 C 300 130, 600 330, 1000 210' /%3E%3Cpath fill='none' stroke='%23e9d5ff' stroke-width='1.5' d='M0 260 C 300 160, 600 360, 1000 240' /%3E%3Cpath fill='none' stroke='%23e9d5ff' stroke-width='1.5' d='M0 290 C 300 190, 600 390, 1000 270' /%3E%3C/svg%3E") no-repeat bottom left / 100% 60%,
        radial-gradient(circle at bottom left, #faf5ff 0%, #ffffff 70%);
}

/* =========================================
   DARK THEME ADJUSTMENTS
   ========================================= */
[data-theme="dark"] body {
    background-color: #050811;
    background-image: linear-gradient(rgba(5, 8, 17, 0.65), rgba(5, 8, 17, 0.85)), url("../img/dashboard.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: #f8fafc;
}

[data-theme="dark"] .page-title {
    color: #f8fafc;
}

[data-theme="dark"] .card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.65) 0%, rgba(15, 23, 42, 0.55) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Card Blue Dark - Luminous Wavy Line Background */
[data-theme="dark"] .card-blue {
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 300' preserveAspectRatio='none'%3E%3Cpath fill='none' stroke='%2338bdf8' stroke-opacity='0.4' stroke-width='1.8' d='M0 200 C 300 100, 600 300, 1000 180' /%3E%3Cpath fill='none' stroke='%2338bdf8' stroke-opacity='0.4' stroke-width='1.8' d='M0 230 C 300 130, 600 330, 1000 210' /%3E%3Cpath fill='none' stroke='%2338bdf8' stroke-opacity='0.4' stroke-width='1.8' d='M0 260 C 300 160, 600 360, 1000 240' /%3E%3Cpath fill='none' stroke='%2338bdf8' stroke-opacity='0.4' stroke-width='1.8' d='M0 290 C 300 190, 600 390, 1000 270' /%3E%3C/svg%3E") no-repeat bottom left / 100% 60%,
        linear-gradient(135deg, rgba(30, 41, 59, 0.65) 0%, rgba(15, 23, 42, 0.55) 100%);
    border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .card-blue:hover {
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 300' preserveAspectRatio='none'%3E%3Cpath fill='none' stroke='%2338bdf8' stroke-opacity='0.55' stroke-width='2' d='M0 200 C 300 100, 600 300, 1000 180' /%3E%3Cpath fill='none' stroke='%2338bdf8' stroke-opacity='0.55' stroke-width='2' d='M0 230 C 300 130, 600 330, 1000 210' /%3E%3Cpath fill='none' stroke='%2338bdf8' stroke-opacity='0.55' stroke-width='2' d='M0 260 C 300 160, 600 360, 1000 240' /%3E%3Cpath fill='none' stroke='%2338bdf8' stroke-opacity='0.55' stroke-width='2' d='M0 290 C 300 190, 600 390, 1000 270' /%3E%3C/svg%3E") no-repeat bottom left / 100% 60%,
        linear-gradient(135deg, rgba(40, 53, 72, 0.75) 0%, rgba(20, 28, 48, 0.65) 100%);
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transform: translateY(-5px);
}

[data-theme="dark"] .card-blue .card-badge {
    background: rgba(14, 165, 233, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(14, 165, 233, 0.25);
}

/* Card Green Dark - Luminous Wavy Line Background */
[data-theme="dark"] .card-green {
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 300' preserveAspectRatio='none'%3E%3Cpath fill='none' stroke='%234ade80' stroke-opacity='0.4' stroke-width='1.8' d='M0 200 C 300 100, 600 300, 1000 180' /%3E%3Cpath fill='none' stroke='%234ade80' stroke-opacity='0.4' stroke-width='1.8' d='M0 230 C 300 130, 600 330, 1000 210' /%3E%3Cpath fill='none' stroke='%234ade80' stroke-opacity='0.4' stroke-width='1.8' d='M0 260 C 300 160, 600 360, 1000 240' /%3E%3Cpath fill='none' stroke='%234ade80' stroke-opacity='0.4' stroke-width='1.8' d='M0 290 C 300 190, 600 390, 1000 270' /%3E%3C/svg%3E") no-repeat bottom left / 100% 60%,
        linear-gradient(135deg, rgba(30, 41, 59, 0.65) 0%, rgba(15, 23, 42, 0.55) 100%);
    border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .card-green:hover {
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 300' preserveAspectRatio='none'%3E%3Cpath fill='none' stroke='%234ade80' stroke-opacity='0.55' stroke-width='2' d='M0 200 C 300 100, 600 300, 1000 180' /%3E%3Cpath fill='none' stroke='%234ade80' stroke-opacity='0.55' stroke-width='2' d='M0 230 C 300 130, 600 330, 1000 210' /%3E%3Cpath fill='none' stroke='%234ade80' stroke-opacity='0.55' stroke-width='2' d='M0 260 C 300 160, 600 360, 1000 240' /%3E%3Cpath fill='none' stroke='%234ade80' stroke-opacity='0.55' stroke-width='2' d='M0 290 C 300 190, 600 390, 1000 270' /%3E%3C/svg%3E") no-repeat bottom left / 100% 60%,
        linear-gradient(135deg, rgba(40, 53, 72, 0.75) 0%, rgba(20, 28, 48, 0.65) 100%);
    border-color: rgba(74, 222, 128, 0.35);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transform: translateY(-5px);
}

[data-theme="dark"] .card-green .card-badge {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.25);
}

/* Card Purple Dark - Luminous Wavy Line Background */
[data-theme="dark"] .card-purple {
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 300' preserveAspectRatio='none'%3E%3Cpath fill='none' stroke='%23c084fc' stroke-opacity='0.4' stroke-width='1.8' d='M0 200 C 300 100, 600 300, 1000 180' /%3E%3Cpath fill='none' stroke='%23c084fc' stroke-opacity='0.4' stroke-width='1.8' d='M0 230 C 300 130, 600 330, 1000 210' /%3E%3Cpath fill='none' stroke='%23c084fc' stroke-opacity='0.4' stroke-width='1.8' d='M0 260 C 300 160, 600 360, 1000 240' /%3E%3Cpath fill='none' stroke='%23c084fc' stroke-opacity='0.4' stroke-width='1.8' d='M0 290 C 300 190, 600 390, 1000 270' /%3E%3C/svg%3E") no-repeat bottom left / 100% 60%,
        linear-gradient(135deg, rgba(30, 41, 59, 0.65) 0%, rgba(15, 23, 42, 0.55) 100%);
    border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .card-purple:hover {
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 300' preserveAspectRatio='none'%3E%3Cpath fill='none' stroke='%23c084fc' stroke-opacity='0.55' stroke-width='2' d='M0 200 C 300 100, 600 300, 1000 180' /%3E%3Cpath fill='none' stroke='%23c084fc' stroke-opacity='0.55' stroke-width='2' d='M0 230 C 300 130, 600 330, 1000 210' /%3E%3Cpath fill='none' stroke='%23c084fc' stroke-opacity='0.55' stroke-width='2' d='M0 260 C 300 160, 600 360, 1000 240' /%3E%3Cpath fill='none' stroke='%23c084fc' stroke-opacity='0.55' stroke-width='2' d='M0 290 C 300 190, 600 390, 1000 270' /%3E%3C/svg%3E") no-repeat bottom left / 100% 60%,
        linear-gradient(135deg, rgba(40, 53, 72, 0.75) 0%, rgba(20, 28, 48, 0.65) 100%);
    border-color: rgba(192, 132, 252, 0.35);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transform: translateY(-5px);
}

[data-theme="dark"] .card-purple .card-badge {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.25);
}

[data-theme="dark"] .card-content h2 {
    color: #f8fafc;
}

[data-theme="dark"] .card-content p {
    color: #cbd5e1;
}

/* Responsive */
@media (max-width: 900px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .nav-btn {
        flex: 1;
        min-width: 150px;
    }
}

/* Pricing Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #fff;
    width: 900px;
    max-width: 95vw;
    border-radius: 12px;
    padding: 40px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.modal-close svg {
    width: 28px;
    height: 28px;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 15px;
}

.pricing-card {
    background: #ffffff;
    /* White background matching the clean style */
    color: #111111;
    /* Dark text for readability */
    border-radius: 12px;
    border: 1px solid #e0e6ed;
    /* Subtle border */
    text-align: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pricing-card-content {
    padding: 30px 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.pricing-title {
    font-size: 32px;
    font-weight: 700;
    color: #3b82f6;
    /* Blue title */
    margin-bottom: 15px;
    font-family: 'Poppins', sans-serif;
}

.pricing-subtitle {
    font-size: 15px;
    font-weight: 600;
    color: #555555;
    font-family: 'Poppins', sans-serif;
}

.pricing-number {
    font-size: 48px;
    font-weight: 800;
    color: #111111;
    margin: 5px 0;
    line-height: 1;
    font-family: 'Poppins', sans-serif;
}

.pricing-footer {
    background: #f4f7fc;
    /* Background color type for the footer */
    color: #3b82f6;
    width: 100%;
    padding: 16px 0;
    font-weight: 700;
    font-size: 15px;
    border-top: 1px solid #e0e6ed;
    font-family: 'Poppins', sans-serif;
}

/* Specific color override for Free */
.pricing-card:first-child .pricing-title {
    color: #48cd67;
}

/* Modal Dark Theme */
[data-theme="dark"] .modal-overlay {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
}

[data-theme="dark"] .modal-content {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .modal-close svg {
    stroke: #94a3b8;
}

[data-theme="dark"] .modal-close:hover svg {
    stroke: #f8fafc;
}

[data-theme="dark"] .modal-title {
    color: #f8fafc;
}

[data-theme="dark"] .modal-subtitle {
    color: #94a3b8;
}

[data-theme="dark"] .pricing-card {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .pricing-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.25);
}

[data-theme="dark"] .pricing-subtitle {
    color: #94a3b8;
}

[data-theme="dark"] .pricing-teams {
    color: #f8fafc;
}

[data-theme="dark"] .pricing-number {
    color: #f8fafc;
}

[data-theme="dark"] .pricing-footer {
    background: #0b1120;
    border-top-color: rgba(255, 255, 255, 0.08);
    color: #60a5fa;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .modal-content {
        padding: 24px 16px;
    }

    .pricing-title {
        font-size: 18px;
        margin-bottom: 8px;
    }

    .pricing-subtitle {
        font-size: 11px;
    }

    .pricing-number {
        font-size: 28px;
        margin: 4px 0;
    }

    .pricing-footer {
        font-size: 11px;
        padding: 10px 0;
    }

    .pricing-card-content {
        padding: 16px 12px 12px;
    }

    .card {
        padding: 20px;
        min-height: 160px;
    }

    .card-content {
        max-width: 60%;
        margin-top: 30px;
    }

    .card-content h2 {
        font-size: 18px;
        margin-bottom: 8px;
    }

    .card-content p {
        font-size: 12px;
        margin-bottom: 16px;
    }

    .card-badge {
        top: 20px;
        left: 20px;
        padding: 4px 10px;
        font-size: 12px;
    }

    .card-btn {
        padding: 8px 14px;
        font-size: 12px;
    }

    .card-illustration {
        width: 120px;
        height: 120px;
        right: -10px;
        bottom: 10px;
    }
}