:root {
    --primary: #ffdd45;
    --secondary: #08090b;
    --dark: #0a0d12;
    --light: #f5f7ff;
    --border: rgba(255, 255, 255, 0.1);
    --text: #cad3ff;
    --danger: #ff6b6b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(180deg, #0a0d12 0%, #14191d 100%);
    color: var(--text);
}

.dashboard-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: rgba(255, 255, 255, 0.03);
    border-right: 1px solid var(--border);
    padding: 30px 20px;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    margin-bottom: 40px;
}

.sidebar-header h2 {
    font-size: 1.5rem;
    color: var(--light);
    margin-bottom: 4px;
}

.user-email {
    font-size: 0.85rem;
    color: var(--primary);
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nav-link {
    padding: 12px 16px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 221, 69, 0.1);
    color: var(--primary);
    border-left-color: var(--primary);
}

.sidebar-footer {
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.dashboard-content {
    padding: 40px;
    overflow-y: auto;
}

.dashboard-content h1 {
    font-size: 2rem;
    color: var(--light);
    margin-bottom: 30px;
}

.dashboard-content h2 {
    font-size: 1.5rem;
    color: var(--light);
    margin-bottom: 20px;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
}

.stat-card h3 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 8px;
}

.stat-card p {
    color: var(--text);
    font-weight: 500;
}

.licenses-list,
.orders-list,
.cart-items {
    display: grid;
    gap: 16px;
    margin-bottom: 30px;
}

.license-card,
.order-card,
.cart-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
}

.license-card.expired,
.status-badge.inactive {
    opacity: 0.6;
}

.license-card h3,
.order-card h3,
.cart-item h3 {
    color: var(--light);
    margin-bottom: 12px;
}

.license-card p,
.order-card p,
.cart-item p {
    margin: 8px 0;
    font-size: 0.9rem;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-top: 12px;
}

.status-badge.active {
    background: rgba(144, 255, 150, 0.2);
    color: #90ff96;
}

.status-badge.inactive {
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
}

.status-badge.completed {
    background: rgba(144, 255, 150, 0.2);
    color: #90ff96;
}

.status-badge.pending {
    background: rgba(255, 221, 69, 0.2);
    color: var(--primary);
}

.status-badge.failed {
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
}

.cart-summary {
    background: rgba(255, 221, 69, 0.1);
    border: 1px solid rgba(255, 221, 69, 0.2);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
}

.cart-summary h3 {
    color: var(--light);
    margin-bottom: 16px;
}

.button {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.button-primary {
    background: var(--primary);
    color: var(--secondary);
    width: 100%;
}

.button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(255, 221, 69, 0.3);
}

.button-danger {
    background: var(--danger);
    color: white;
    width: 100%;
}

.button-danger:hover {
    opacity: 0.9;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--light);
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--light);
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 221, 69, 0.1);
}

/* Quick actions on dashboard */
.quick-actions {
    display: flex;
    gap: 16px;
    margin-top: 20px;
}

.quick-actions .button {
    width: auto;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

/* Cart badge */
.cart-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ff3d3d;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 8px;
}

/* Cart layout */
.cart-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: rgba(255, 221, 69, 0.1);
    border: 1px solid rgba(255, 221, 69, 0.2);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 30px;
}

.cart-summary h3 {
    color: var(--light);
    margin: 0;
}

.cart-summary .button {
    width: auto;
    white-space: nowrap;
}

.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.cart-item-info h3 {
    margin-bottom: 4px;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cart-subtotal {
    font-weight: 700;
    color: var(--light);
    font-size: 1.1rem;
}

.button-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
    width: auto;
}

.button-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--light);
    border: 1px solid var(--border);
    width: 100%;
    text-decoration: none;
    display: inline-block;
}

.button-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* Product catalog in cart */
.product-catalog {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}

.product-catalog h3 {
    color: var(--light);
    margin-bottom: 16px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.catalog-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.catalog-card h4 {
    color: var(--light);
    font-size: 1.1rem;
}

.catalog-desc {
    font-size: 0.85rem;
    color: var(--text);
}

.catalog-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.catalog-price .price-old {
    color: rgba(255, 255, 255, 0.35);
    text-decoration: line-through;
    font-size: 0.9rem;
    font-weight: 400;
    margin-right: 6px;
}

.catalog-card .button {
    margin-top: auto;
}

/* License card layout */
.license-header,
.order-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.license-key {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text);
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 12px;
    border-radius: 8px;
    word-break: break-all;
}

.license-meta,
.order-meta {
    display: flex;
    gap: 20px;
    margin-top: 12px;
    font-size: 0.85rem;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text);
}

.empty-state .button {
    width: auto;
    margin-top: 16px;
    text-decoration: none;
    display: inline-block;
}

/* Settings */
.settings-msg {
    margin-top: 12px;
    font-weight: 600;
}

/* Download info */
.download-info {
    margin-top: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 0.9rem;
}

.download-info strong {
    color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-container {
        grid-template-columns: 1fr;
    }
    .sidebar {
        position: relative;
        height: auto;
    }
    .dashboard-content {
        padding: 20px;
    }
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .quick-actions {
        flex-direction: column;
    }
    .products-grid {
        grid-template-columns: 1fr;
    }
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

@media (max-width: 768px) {
    .dashboard-container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .dashboard-content {
        padding: 20px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
