:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --success: #10b981;
    --bg: #f3f4f6;
    --surface: #ffffff;
    --text: #111827;
    --text-muted: #6b7280;
    --border: #e5e7eb;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    overflow-x: hidden;
}

/* Centered Login View */
#login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-card {
    background: var(--surface);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 420px;
    border: 1px solid var(--border);
    transform: scale(1);
    transition: all 0.5s ease;
}

.login-card.minimized {
    transform: scale(0.9);
    opacity: 0;
    pointer-events: none;
}

/* Header (Appears after login) */
.header-bar {
    position: fixed;
    top: -80px;
    /* Hidden initially */
    left: 0;
    right: 0;
    height: 70px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 2rem;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: top 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-bar.visible {
    top: 0;
}

.logo {
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--primary);
    margin-right: auto;
}

/* Packages Dashboard */
.dashboard {
    max-width: 1000px;
    margin: 100px auto 3rem;
    padding: 0 1.5rem;
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease 0.3s;
}

.dashboard.visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Package Grid */
.pkg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.pkg-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: default;
}

.pkg-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.1);
}

.pkg-card.expired {
    background: #ef4444;
    border-color: #dc2626;
    color: white !important;
}

.pkg-card.expired .text-secondary,
.pkg-card.expired .info-label {
    color: rgba(255, 255, 255, 0.8) !important;
}

.info-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.info-label {
    color: var(--text-muted);
}

.info-value {
    font-weight: 500;
}

.text-bold {
    font-weight: 700;
}

/* UI Elements */
.input-group-custom {
    margin-bottom: 1.25rem;
}

.input-group-custom label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.control {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 0.95rem;
    background: #f9fafb;
    transition: all 0.2s;
}

.control:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.btn-main {
    width: 100%;
    padding: 0.9rem;
    border-radius: 12px;
    border: none;
    background: var(--primary);
    color: white;
    font-weight: 700;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.btn-main:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-migrate-all {
    background: var(--success);
    margin-top: 3rem;
    padding: 1.25rem 4rem;
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 600px) {
    .login-card {
        padding: 2rem;
        margin: 1rem;
    }

    .header-bar {
        padding: 0 1rem;
    }
}

/* Download Results Styles */
#download-links-list .pkg-card {
    display: flex;
    flex-direction: column;
}

#download-links-list .btn-main {
    margin-top: auto;
    text-decoration: none;
}

#download-links-list .small.text-secondary p {
    margin-bottom: 0.5rem;
}

#download-links-list .small.text-secondary p:last-child {
    margin-bottom: 0;
}