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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #0f172a;
    color: #e2e8f0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 480px;
    padding: 2rem;
}

/* ===== LOGIN ===== */
.login-card {
    background: #1e293b;
    border-radius: 24px;
    padding: 3rem 2.5rem;
    box-shadow: 0 25px 60px rgba(0,0,0,.4);
    text-align: center;
}

.login-card h1 {
    font-size: 1.75rem;
    margin-bottom: .5rem;
    background: linear-gradient(135deg, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-card p { color: #94a3b8; margin-bottom: 2rem; font-size: .95rem; }

.input-wrap { position: relative; margin-bottom: 1.5rem; }

.input-wrap input {
    width: 100%;
    padding: .9rem 1.2rem;
    border-radius: 14px;
    border: 2px solid #334155;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 1rem;
    outline: none;
    transition: border-color .3s, box-shadow .3s;
}

.input-wrap input:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(129,140,248,.2);
}

.btn-primary {
    width: 100%;
    padding: .9rem;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    transition: transform .15s, box-shadow .3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99,102,241,.4);
}

.btn-primary:active { transform: scale(.98); }

.error-msg {
    color: #f87171;
    font-size: .85rem;
    margin-top: 1rem;
    display: none;
}

/* ===== DASHBOARD ===== */
#dashboard { text-align: center; display: flex; justify-content: center; align-items: center; min-height: 80vh; }

.dash-card {
    background: #1e293b;
    border-radius: 24px;
    padding: 2.5rem 2rem;
    box-shadow: 0 25px 60px rgba(0,0,0,.4);
}

.dash-header h2 {
    font-size: 1.5rem;
    margin-bottom: .25rem;
}

.dash-header p { color: #94a3b8; font-size: .9rem; }

.store-badge {
    display: inline-block;
    padding: .45rem 1.1rem;
    border-radius: 50px;
    background: rgba(99,102,241,.15);
    color: #a5b4fc;
    font-size: .8rem;
    margin-top: 1.2rem;
}

.btn-execute {
    width: 100%;
    max-width: 320px;
    padding: 1.1rem;
    margin-top: 2rem;
    border: none;
    border-radius: 16px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    color: #ffffff !important;
    background: #7c3aed !important;
    box-shadow: 0 4px 20px rgba(124, 58, 237, .5);
    transition: transform .15s, box-shadow .3s, opacity .3s;
}

.btn-execute:not(.running):not(.ready):hover {
    transform: translateY(-2px);
    background: #6d28d9 !important;
    box-shadow: 0 8px 30px rgba(124, 58, 237, .6);
}

.btn-execute.running {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    cursor: not-allowed;
    opacity: .85;
}

.btn-execute.ready {
    background: linear-gradient(135deg, #10b981, #06b6d4);
}

.btn-execute:active:not(.running) { transform: scale(.97); }

/* ===== PROGRESS ===== */
.progress-area { margin-top: 2rem; }

.progress-ring-wrap {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
}

.progress-ring-wrap svg { transform: rotate(-90deg); }

.progress-ring-bg { fill: none; stroke: #334155; }
.progress-ring-fill {
    fill: none;
    stroke: url(#progressGrad);
    stroke-linecap: round;
    transition: stroke-dashoffset .4s ease-out;
}

.progress-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
}

.progress-text span { font-size: .75rem; color: #94a3b8; font-weight: 400; margin-top: -2px; }

.status-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    color: #94a3b8;
    font-size: .9rem;
}

.spinner {
    width: 14px; height: 14px;
    border: 2px solid #64748b;
    border-top-color: #818cf8;
    border-radius: 50%;
    animation: spin .6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ===== DOWNLOAD ===== */
.download-area {
    margin-top: 1.5rem;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .85rem 2rem;
    border-radius: 14px;
    font-size: .95rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(135deg, #10b981, #059669);
    transition: transform .15s, box-shadow .3s;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16,185,129,.3);
}

/* ===== LOG ===== */
.log-area {
    margin-top: 1.5rem;
    text-align: left;
}

.log-header {
    font-size: .8rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: .5rem;
}

.log-box {
    background: #0f172a;
    border-radius: 12px;
    padding: .8rem 1rem;
    font-family: 'Fira Code', monospace;
    font-size: .75rem;
    color: #4ade80;
    max-height: 120px;
    overflow-y: auto;
    line-height: 1.6;
}

/* ===== LOGOUT ===== */
.logout-btn {
    position: fixed;
    top: 1.2rem;
    right: 1.2rem;
    background: none;
    border: 1px solid #475569;
    color: #cbd5e1;
    padding: .5rem 1rem;
    border-radius: 10px;
    font-size: .8rem;
    cursor: pointer;
    transition: border-color .3s, color .3s;
}

.logout-btn:hover { border-color: #f87171; color: #f87171; }

/* ===== PULSE GLOW ===== */
@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(99,102,241,.15); }
    50%      { box-shadow: 0 0 40px rgba(99,102,241,.35); }
}

.dash-card.active { animation: glow 2.5s ease infinite; }
