:root {
    /* Modern Palette - Deep Space & Neon */
    --bg-body: #050608;
    --bg-surface: #0f1218;
    --bg-card: #161b24;
    --bg-glass: rgba(22, 27, 36, 0.7);

    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.5);
    --secondary: #64748b;
    --accent: #06b6d4;
    /* Cyan */

    --text-main: #ffffff;
    --text-muted: #94a3b8;

    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;

    --font-main: 'Inter', system-ui, -apple-system, sans-serif;

    --radius: 12px;
    --radius-lg: 20px;

    --ease: cubic-bezier(0.23, 1, 0.32, 1);
}

/* Base Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    outline: none;
}

body {
    background-color: var(--bg-body);
    background-image:
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(6, 182, 212, 0.08), transparent 25%);
    min-height: 100vh;
    font-family: var(--font-main);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Layout Utilities */
.container,
.dash-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
}

ul {
    list-style: none;
}

/* -------------------
   Nav & Header (Premium Glass) 
------------------- */
.header,
.dash-header {
    height: 80px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(5, 6, 8, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: 0.3s ease;
}

.header:hover {
    background: rgba(5, 6, 8, 0.9);
    border-bottom-color: rgba(59, 130, 246, 0.3);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #fff;
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 1rem;
    color: #fff;
    box-shadow: 0 0 20px var(--primary-glow);
    position: relative;
    overflow: hidden;
}

.logo-icon::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: translateX(-100%);
    animation: shine 3s infinite;
}

@keyframes shine {
    10% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.dash-user {
    display: flex;
    align-items: center;
    gap: 20px;
}

.device-badge {
    text-align: right;
    line-height: 1.3;
}

.device-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.device-id {
    font-family: 'Courier New', monospace;
    color: var(--accent);
    font-weight: bold;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 8px 24px;
    border-radius: 99px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-link {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
    transition: 0.3s;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
    border-radius: 2px;
}

/* -------------------
   UI Components 
------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: all 0.3s var(--ease);
}

.btn-primary {
    background: linear-gradient(to right, var(--primary), var(--color-primary-dark, #2b6cb0));
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-muted);
}

.btn-outline:hover {
    border-color: #fff;
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.btn-block {
    width: 100%;
}

/* Input Fields */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-label,
label {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-input,
.form-select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    transition: 0.3s;
}

.form-input:focus,
.form-select:focus {
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

/* Cards */
.login-card,
.feature-card,
.stat-card,
.action-panel {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* -------------------
   Dashboard Page 
------------------- */
.dash-main {
    padding: 40px 0;
    animation: fadeIn 0.6s var(--ease);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-radius: var(--radius);
    transition: 0.3s;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
}

.stat-icon-bg {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
}

.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.expired {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

/* Actions Area */
.actions-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 30px;
}

.action-panel {
    padding: 30px;
    border-radius: var(--radius-lg);
}

.panel-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.panel-header h3 {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

/* Dynamic Form */
.dynamic-group {
    display: none;
    animation: fadeIn 0.3s;
}

.dynamic-group.active {
    display: block;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group {
    flex: 1;
}

/* Plan Buttons */
.plans-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.plan-btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    cursor: pointer;
    transition: 0.2s;
    text-align: left;
}

.plan-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.plan-btn.featured {
    border: 1px solid var(--primary);
    background: rgba(59, 130, 246, 0.05);
}

.plan-name {
    font-weight: 700;
    font-size: 1.05rem;
    display: block;
}

.plan-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.plan-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
}

/* -------------------
   Landing & Login 
------------------- */
.hero {
    padding: 100px 0;
    text-align: center;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 24px;
    background: linear-gradient(to bottom right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
}

.login-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-card {
    padding: 40px;
    border-radius: 24px;
}

/* -------------------
   Footer (Mega Layout) 
------------------- */
.footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(to bottom, var(--bg-body), #020305);
    padding: 80px 0 40px;
    margin-top: auto;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.5;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-brand p {
    color: var(--text-muted);
    margin-top: 16px;
    font-size: 0.95rem;
    max-width: 300px;
}

.footer-col h4 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 24px;
    font-weight: 700;
}

.footer-menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-menu a {
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-menu a:hover {
    color: var(--primary);
    transform: translateX(4px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: grid;
    place-items: center;
    transition: 0.3s;
    cursor: pointer;
}

.social-icon:hover {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 15px var(--primary-glow);
    transform: translateY(-3px);
}

/* Toast */
.toast {
    position: fixed;
    top: 24px;
    right: 24px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 16px 24px;
    border-radius: 12px;
    pointer-events: none;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateY(-20px);
    opacity: 0;
    transition: 0.4s var(--ease);
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-success .toast-icon {
    color: var(--success);
}

.toast-error .toast-icon {
    color: var(--danger);
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        padding: 0 16px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .form-row {
        flex-direction: column;
    }

    .actions-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .nav-links {
        display: none;
    }

    /* Mobile Menu would go here */
    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}