/* --- Base Variables & Reset --- */
:root {
    --bg-dark: #09090b;
    --panel-bg: rgba(24, 24, 27, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-main: #f4f4f5;
    --text-muted: #a1a1aa;
    --accent-primary: #6366f1;
    --accent-hover: #4f46e5;
    --accent-glow: rgba(99, 102, 241, 0.4);
    --success: #22c55e;
    --warning: #f59e0b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.05), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(34, 197, 94, 0.03), transparent 25%);
}

/* --- Layout --- */
.app-container {
    display: flex;
    width: 100%;
}

.sidebar {
    width: 280px;
    background: rgba(9, 9, 11, 0.8);
    border-right: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar .logo h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.sidebar .logo span {
    color: var(--accent-primary);
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar nav a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: all 0.2s;
    font-weight: 500;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: var(--panel-bg);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.availability-card {
    margin-top: auto;
    background: var(--panel-bg);
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    border-radius: 12px;
}

.availability-card h3 {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.neon-number {
    color: #38bdf8;
    font-weight: 600;
    text-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

/* --- Main Dashboard --- */
.dashboard-content {
    flex: 1;
    padding: 2rem 4rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.pulsing-dot {
    width: 8px;
    height: 8px;
    background-color: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--success);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

/* --- Provisioning Section --- */
.provisioning-section h1 {
    font-size: 2.5rem;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.tier-cards {
    display: flex;
    gap: 2rem;
}

.pricing-card {
    background: var(--panel-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    flex: 1;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pricing-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.15);
}

.pricing-card.featured {
    border-color: var(--accent-primary);
    box-shadow: 0 0 30px var(--accent-glow);
}

.ribbon {
    position: absolute;
    top: 1rem;
    right: -2rem;
    background: var(--accent-primary);
    color: white;
    padding: 0.25rem 3rem;
    font-size: 0.75rem;
    font-weight: bold;
    transform: rotate(45deg);
    letter-spacing: 1px;
}

.tier-header {
    margin-bottom: 1.5rem;
}

.tier-header h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
}

.price small {
    font-size: 1rem;
    color: var(--text-muted);
}

.features {
    list-style: none;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.features li {
    color: var(--text-muted);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.features li::before {
    content: "→";
    color: var(--accent-primary);
}

.deploy-btn {
    width: 100%;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: transparent;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.deploy-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.deploy-btn.primary {
    background: var(--accent-primary);
    border: none;
}

.deploy-btn.primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 0 15px var(--accent-glow);
}

/* --- Active Instances --- */
.active-instances h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.instance-card {
    background: var(--panel-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.instance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.instance-id {
    font-family: monospace;
    color: var(--text-muted);
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge.deploying {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge.running {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.instance-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.875rem;
}

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

.detail-row span:first-child {
    color: var(--text-muted);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .tier-cards {
        flex-direction: column;
        align-items: center;
    }
    .pricing-card {
        max-width: 400px;
        width: 100%;
    }
    .dashboard-content {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 1rem;
        gap: 1rem;
    }
    .sidebar nav {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .sidebar nav a {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    .availability-card {
        margin-top: 0;
        width: 100%;
    }
    .dashboard-content {
        padding: 1.5rem;
    }
    .provisioning-section h1 {
        font-size: 1.8rem;
    }
    .instances-grid {
        grid-template-columns: 1fr;
    }
    .waitlist-form-container form > div {
        flex-direction: column;
    }
}