* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; 
    background: radial-gradient(circle at top right, #1a1a3a, #0f0f1a); 
    color: #e0e0e0; 
    min-height: 100vh;
}

/* Glassmorphism Helper */
.glass {
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Login / Install */
.login-page, .install-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.login-box, .install-box { 
    background: rgba(26, 26, 46, 0.8); 
    padding: 48px; 
    border-radius: 28px; 
    max-width: 420px; 
    width: 100%; 
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.login-box h1, .install-box h1 { font-size: 28px; margin-bottom: 8px; color: #fff; text-align: center; }
.subtitle { color: #a0a0b8; margin-bottom: 32px; font-size: 15px; text-align: center; line-height: 1.5; }

/* Form elements */
form { display: flex; flex-direction: column; gap: 16px; }
label { font-size: 13px; color: #a0a0b8; font-weight: 600; margin-bottom: -8px; margin-left: 4px; }
input, textarea {
    background: rgba(37, 37, 66, 0.5); border: 1px solid rgba(51, 51, 102, 0.5); color: #fff; padding: 14px 18px;
    border-radius: 14px; font-size: 15px; outline: none; transition: all 0.3s ease;
    width: 100%;
}
input:focus, textarea:focus { 
    border-color: #667eea; 
    background: rgba(37, 37, 66, 0.8);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}
button, .btn {
    background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; border: none;
    padding: 14px 28px; border-radius: 14px; font-size: 15px; font-weight: 600;
    cursor: pointer; transition: all 0.3s ease; text-decoration: none; display: inline-block;
    text-align: center; box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}
button:hover, .btn:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4); opacity: 0.9; }
.btn-outline { background: transparent; border: 1px solid #667eea; color: #667eea; box-shadow: none; }
.btn-outline:hover { background: rgba(102, 126, 234, 0.1); }
.btn-danger { background: linear-gradient(135deg, #ff4b2b, #ff416c); }
.btn-link { color: #667eea; text-decoration: none; font-weight: 600; }
.small { padding: 8px 16px; font-size: 13px; }

/* Messages */
.msg { padding: 14px 20px; border-radius: 14px; font-size: 14px; margin-bottom: 20px; font-weight: 500; }
.msg.success { background: rgba(76,175,80,0.1); color: #81c784; border: 1px solid rgba(76,175,80,0.2); }
.msg.error { background: rgba(244,67,54,0.1); color: #ef9a9a; border: 1px solid rgba(244,67,54,0.2); }
.msg code { background: rgba(0,0,0,0.3); padding: 2px 8px; border-radius: 4px; }

/* Topbar */
.topbar { 
    display: flex; align-items: center; justify-content: space-between; 
    padding: 16px 32px; background: rgba(26, 26, 46, 0.7); 
    border-bottom: 1px solid rgba(255, 255, 255, 0.05); 
    gap: 12px; flex-wrap: wrap; 
    backdrop-filter: blur(10px);
    position: sticky; top: 0; z-index: 100;
}
.topbar span { font-size: 14px; color: #a0a0b8; font-weight: 500; }

/* Container */
.container { max-width: 1100px; margin: 40px auto; padding: 0 24px; }
.container h2 { margin-bottom: 24px; font-size: 28px; color: #fff; font-weight: 700; }

/* Stats Grid */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 32px; }
.stat-card { 
    background: rgba(26, 26, 46, 0.6); padding: 24px; border-radius: 24px; 
    border: 1px solid rgba(255, 255, 255, 0.05); text-align: center;
    transition: transform 0.3s ease;
}
.stat-card:hover { transform: translateY(-5px); }
.stat-card .label { display: block; color: #a0a0b8; font-size: 14px; margin-bottom: 8px; }
.stat-card .value { display: block; font-size: 32px; font-weight: 800; color: #fff; }

/* App Grid */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.app-card {
    background: rgba(26, 26, 46, 0.6); border: 1px solid rgba(255, 255, 255, 0.05); 
    border-radius: 24px; padding: 24px; transition: all 0.3s ease;
    display: flex; flex-direction: column; justify-content: space-between;
}
.app-card:hover { 
    background: rgba(37, 37, 66, 0.8); 
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.3);
}
.app-info h3 { font-size: 20px; margin-bottom: 8px; color: #fff; }
.app-info .version { font-size: 13px; color: #8888aa; margin-bottom: 12px; display: block; }
.app-info .code { font-size: 13px; margin-top: 8px; display: flex; align-items: center; gap: 8px; color: #a0a0b8; }
.app-info .code code { 
    background: rgba(102, 126, 234, 0.1); padding: 4px 10px; border-radius: 8px; 
    font-size: 12px; color: #667eea; border: 1px solid rgba(102, 126, 234, 0.2);
}
.app-info .link { margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.05); }
.app-info .link a { color: #667eea; font-weight: 600; text-decoration: none; }
.app-info .downloads { font-size: 13px; color: #8888aa; margin-top: 8px; display: flex; align-items: center; gap: 6px; }

.app-actions { display: flex; gap: 10px; margin-top: 20px; }

.empty { text-align: center; padding: 80px 20px; color: #666; background: rgba(26, 26, 46, 0.4); border-radius: 24px; border: 2px dashed rgba(255, 255, 255, 0.05); }
.empty p { margin-bottom: 20px; font-size: 16px; }

.form-page { display: flex; flex-direction: column; align-items: center; }
.form-page form { 
    background: rgba(26, 26, 46, 0.8); padding: 40px; border-radius: 28px; 
    max-width: 700px; width: 100%; border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

/* Modal de Confirmação */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(4px);
    display: none; align-items: center; justify-content: center; z-index: 1000;
}
.modal {
    background: rgba(26, 26, 46, 0.9); padding: 32px; border-radius: 24px;
    max-width: 400px; width: 90%; text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    animation: modalScale 0.3s ease-out;
}
@keyframes modalScale { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal h3 { font-size: 22px; margin-bottom: 12px; color: #fff; }
.modal p { color: #a0a0b8; margin-bottom: 24px; line-height: 1.5; }
.modal-actions { display: flex; gap: 12px; justify-content: center; }
