:root {
    /* Color Palette - Premium Dark Mode */
    --bg-dark: #0f111a;
    --bg-card: rgba(30, 34, 48, 0.7);
    --bg-card-hover: rgba(40, 45, 65, 0.8);
    --bg-header: #1e2230;
    /* Solid header background */
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.5);
    --accent: #10b981;
    --accent-glow: rgba(16, 185, 129, 0.4);
    --danger: #ef4444;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-light: rgba(255, 255, 255, 0.1);

    /* Effects */
    --glass-blur: blur(12px);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-glow: 0 0 15px var(--primary-glow);

    /* Typography */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-card);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Utilities */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.text-gradient {
    background: linear-gradient(135deg, var(--text-main), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    inset: 0;
    background: var(--bg-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.logo-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid var(--border-light);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
    box-shadow: var(--shadow-glow);
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Button Styles */
.btn {
    padding: 10px 24px;
    border-radius: 8px;
    border: none;
    font-family: var(--font-body);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #2563eb);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-muted);
}

/* Dashboard Layout */
.app-container {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 260px;
    background: #111827;
    /* Always dark sidebar as requested */
    border-right: 1px solid #374151;
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 60;
    border-radius: 0 !important;
    /* Ensure square corners */
}

[data-theme="light"] .sidebar {
    background: #111827 !important;
    border-right: 1px solid #e5e7eb;
}

/* Fix text colors in sidebar for light mode since background is dark */
[data-theme="light"] .sidebar .sidebar-header,
[data-theme="light"] .sidebar .nav-link {
    color: #e5e7eb;
}

[data-theme="light"] .sidebar .nav-link:hover,
[data-theme="light"] .sidebar .nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar-header {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #9ca3af;
    /* Default muted text for dark background */
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: var(--transition);
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
}

.nav-link i {
    width: 20px;
    text-align: center;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    /* Offset for fixed sidebar */
    padding: 90px 32px 32px 32px;
    /* Top padding for fixed header */
    position: relative;
    min-height: 100vh;
    background: var(--bg-main);
}

.header-bar {
    position: fixed;
    top: 0;
    left: 260px;
    right: 0;
    height: 70px;
    z-index: 50;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 32px;
    background: var(--bg-header);
    /* Will be white in light mode via inline style or var */
    border-bottom: 1px solid var(--border-light);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
}

.user-profile:hover {
    border-color: var(--primary);
}

.avatar {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
}

/* Cards & Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 160px;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1), transparent 70%);
    border-radius: 50%;
    filter: blur(20px);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
    margin: 8px 0;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.trend {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.trend.up {
    color: var(--accent);
}

.trend.down {
    color: var(--danger);
}

/* Tables */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 16px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-light);
}

td {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent);
}

.status-pending {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.status-closed {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text-muted);
}

.status-awarded {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
}

/* AI Recommendation Styles */
.ai-score {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--accent);
    border: 2px solid var(--accent);
    border-radius: 50%;
}

.ai-badge {
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
}

/* Modal Styles */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: #1e2230;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 32px;
    width: 100%;
    max-width: 500px;
    /* Note: app.js overrides this inline to 800px for large modals */
    max-height: 90vh;
    /* Prevent modal from exceeding viewport height */
    overflow-y: auto;
    /* Enable scrolling for tall content */
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.modal-backdrop.active .modal-content {
    transform: translateY(0);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    color: var(--text-main);
    font-family: var(--font-body);
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

/* Explicit style for select options in dark mode to fix invisibility */
select option {
    background: var(--bg-dark);
    color: var(--text-main);
}

.form-input option,
.floating-input option {
    background: var(--bg-dark);
    color: var(--text-main);
}

/* Login Page Styles */
.login-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #1e2230 0%, #0f111a 100%);
}

.login-card {
    width: 400px;
    padding: 40px;
    text-align: center;
}

.hidden {
    display: none !important;
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
    margin-top: 20px;
}

/* Light Mode Overrides */
[data-theme="light"] {
    --bg-dark: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-card-hover: #ffffff;
    --bg-header: #ffffff;
    /* Solid white for light mode header */
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-light: rgba(99, 102, 241, 0.15);
    --shadow-sm: 0 4px 6px -1px rgba(99, 102, 241, 0.1), 0 2px 4px -1px rgba(99, 102, 241, 0.05);
    --sidebar-bg: #ffffff;
    --accent-glow: rgba(59, 130, 246, 0.3);
}

[data-theme="light"] .glass-panel {
    background: var(--bg-card);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .sidebar {
    background: var(--sidebar-bg);
    border-right: 1px solid #e2e8f0;
}

[data-theme="light"] .main-content {
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.1), transparent 40%);
}

[data-theme="light"] input,
[data-theme="light"] select {
    background: #ffffff;
    border-color: #cbd5e1;
    color: var(--text-main);
}

[data-theme="light"] table td {
    border-bottom: 1px solid #e2e8f0;
    color: var(--text-main);
}

[data-theme="light"] th {
    border-bottom: 1px solid #cbd5e1;
    color: #475569;
}

[data-theme="light"] .nav-link {
    color: #64748b;
}

/* Notifications */
.notification-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    width: 380px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 100;
    overflow: hidden;
    display: none;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.notification-item:hover {
    background: var(--bg-main);
}

.notification-item.unread {
    background: rgba(59, 130, 246, 0.05);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-icon {
    width: 32px;
    height: 32px;
    background: var(--bg-main);
    color: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 2px;
}

.notification-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 6px;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
    text-align: right;
}

/* Modern Flash Animation */
@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0px rgba(16, 185, 129, 0.5);
        border-color: #10b981;
    }

    50% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
        border-color: #10b981;
    }

    100% {
        box-shadow: 0 0 0 0px rgba(16, 185, 129, 0);
        border-color: var(--border-light);
    }
}

.flash-active {
    animation: pulse-glow 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

[data-theme="light"] .nav-link.active,
[data-theme="light"] .nav-link:hover {
    color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
}

/* Stat Card Hover Effect for Clickability */
.clickable-card {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.clickable-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
    border-color: var(--primary);
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

.flash-btn {
    animation: pulse-glow 2s infinite;
}

/* --- Registration Page Styles --- */
.register-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
    position: relative;
    overflow: hidden;
    background-image: url('../img/pattern.svg');
    background-blend-mode: overlay;
    background-size: 40px 40px;
}

.register-card {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    max-width: 1100px;
    width: 100%;
    min-height: 650px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

/* Left Panel */
.register-left {
    padding: 60px 40px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.8), rgba(16, 185, 129, 0.7)), url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?auto=format&fit=crop&q=80');
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.register-left::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    pointer-events: none;
}

.register-left>* {
    z-index: 2;
}

.register-brand {
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.register-hero h1 {
    font-size: 2.75rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.register-hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.6;
    max-width: 90%;
}

.register-stats {
    display: flex;
    gap: 40px;
    margin-top: 40px;
}

.stat-item h3 {
    font-size: 2.25rem;
    margin: 0;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.stat-item span {
    opacity: 0.8;
    font-size: 0.9rem;
    font-weight: 500;
    display: block;
}

.register-quote {
    margin-top: auto;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Right Panel form */
.register-right {
    padding: 50px 40px;
    background: var(--bg-card);
    overflow-y: auto;
    position: relative;
}

.register-header {
    margin-bottom: 32px;
}

.register-header h2 {
    font-size: 2rem;
    margin-bottom: 8px;
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.top-login-link {
    text-align: right;
    margin-bottom: 20px;
    padding-bottom: 10px;
}

/* Tabs */
.role-tabs {
    display: flex;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 32px;
    border: 1px solid var(--border-light);
}

.role-tab {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.role-tab.active {
    background: rgba(59, 130, 246, 0.15);
    /* Fallback if var not set */
    color: var(--primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.role-tab:hover:not(.active) {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.floating-input-group {
    position: relative;
    margin-bottom: 20px;
}

.floating-input {
    width: 100%;
    padding: 16px;
    padding-top: 20px;
    /* More space for label */
    padding-bottom: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    font-size: 1rem;
    color: var(--text-main);
    transition: all 0.2s;
    outline: none;
}

.floating-input:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.floating-label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    transform-origin: left top;
}

.floating-input:focus~.floating-label,
.floating-input:not(:placeholder-shown)~.floating-label {
    top: 10px;
    transform: translateY(0) scale(0.75);
    color: var(--primary);
    font-weight: 600;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    font-size: 1rem;
    border-radius: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 10px;
    background: linear-gradient(135deg, var(--primary), #2563eb);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--primary-glow);
    transition: var(--transition);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow);
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .register-card {
        grid-template-columns: 1fr;
        /* Stack vertically */
        max-width: 600px;
        min-height: auto;
    }

    .register-left {
        padding: 40px 30px;
        min-height: 200px;
        /* Reduced height for header */
        background-position: center top;
        align-items: flex-start;
    }

    .register-hero h1 {
        font-size: 2rem;
        margin-bottom: 12px;
    }

    .register-hero p {
        display: none;
    }

    /* Hide long description on mobile header */
    .register-stats {
        display: none;
    }

    .register-quote {
        display: none;
    }

    .register-brand {
        margin-bottom: 0;
    }

    .register-right {
        padding: 30px 24px;
        border-radius: 0 0 24px 24px;
    }
}

@media (max-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* Single column inputs */
    .register-wrapper {
        padding: 0;
        align-items: flex-start;
    }

    .register-card {
        border-radius: 0;
        border: none;
        min-height: 100vh;
        box-shadow: none;
    }

    .register-left {
        border-radius: 0;
    }

    .register-right {
        border-radius: 0;
    }
}

/* --- Subscription Page Styles --- */
.subscription-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
    position: relative;
    overflow-y: auto;
    background-image: url('../img/pattern.svg');
    background-blend-mode: overlay;
    background-size: 40px 40px;
}

.subscription-card {
    max-width: 900px;
    width: 100%;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
    position: relative;
    z-index: 10;
}

.subscription-header {
    margin-bottom: 40px;
}

.subscription-header h2 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.plan-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 32px;
    text-align: left;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.plan-item:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3);
    border-color: var(--primary);
}

.plan-item.featured {
    border: 2px solid var(--primary);
    background: rgba(37, 99, 235, 0.1);
}

.plan-item.featured:hover {
    background: rgba(37, 99, 235, 0.15);
}

.plan-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.plan-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-main);
}

.plan-price {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 8px;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.plan-price span {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
}

.plan-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.5;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.plan-features li i {
    color: var(--accent);
    font-size: 1rem;
}

.plan-selector {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-light);
    border-radius: 50%;
    transition: all 0.2s;
}

.plan-item.featured .plan-selector {
    border-color: var(--primary);
    background: white;
    box-shadow: inset 0 0 0 4px var(--primary);
}

.payment-details {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 32px;
    text-align: left;
}

.payment-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 1rem;
    color: var(--text-muted);
}

.payment-row.total {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-main);
}

.payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.payment-option {
    position: relative;
    cursor: pointer;
}

.payment-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.payment-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.2s;
}

.payment-option input:checked+.payment-card {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
}

.payment-card i {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

@media (max-width: 768px) {
    .subscription-card {
        padding: 24px;
        margin-top: 50px;
        /* Add some top margin for mobile header if needed */
    }

    .plans-grid {
        grid-template-columns: 1fr;
    }

    .plan-price {
        font-size: 2.5rem;
    }

    .payment-methods {
        grid-template-columns: 1fr;
    }

    .payment-card {
        flex-direction: row;
        justify-content: flex-start;
        padding: 12px 16px;
    }

    .payment-card i {
        margin-bottom: 0;
        margin-right: 12px;
    }
}