/* ================= RESET ================= */

*{
    box-sizing:border-box;
}

body{
    margin:0;
    font-family:tahoma, sans-serif;
}

/* ================= BACKGROUND ================= */

body{
    background:linear-gradient(135deg,#667eea,#764ba2);
}

/* ================= WRAPPER ================= */

.wrapper{
    max-width:1100px;
    margin:40px auto;
}

/* ================= TOPBAR ================= */

.topbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    color:#fff;
    margin-bottom:25px;
}

.logout{
    background:#e74c3c;
    color:#fff;
    padding:8px 14px;
    border-radius:8px;
    text-decoration:none;
    font-size:13px;
    transition:.2s;
}

.logout:hover{
    opacity:.85;
}

/* ================= CARD ================= */

.card{
    background:#fff;
    padding:25px;
    border-radius:18px;
    box-shadow:0 15px 40px rgba(0,0,0,0.15);
}

/* ================= USER GRID ================= */

.userGrid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(240px,1fr));
    gap:18px;
    margin-top:20px;
}

.userCard{
    background:#f9f9fb;
    border-radius:14px;
    padding:15px;
    transition:.3s;
    border:1px solid #eee;
}

.userCard:hover{
    transform:translateY(-4px);
    box-shadow:0 8px 20px rgba(0,0,0,0.1);
}

.userTop{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:8px;
}

.userTop strong{
    font-size:15px;
}

.badge{
    font-size:11px;
    padding:4px 10px;
    border-radius:20px;
    color:#fff;
    text-transform:uppercase;
}

.badge.wireguard{
    background:#2ecc71;
}

.badge.l2tp{
    background:#9b59b6;
}

.userCard .info{
    font-size:12px;
    color:#555;
    margin-bottom:4px;
}

/* ================= BUTTONS ================= */

button{
    border:none;
    padding:7px 12px;
    border-radius:8px;
    cursor:pointer;
    font-size:13px;
    transition:.2s;
}

button:hover{
    opacity:.85;
}

.btnQR{
    background:#3498db;
    color:#fff;
}

.btnDel{
    background:#e74c3c;
    color:#fff;
}

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

/* ================= MODAL ================= */

.modal{
    display:none;
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.6);
    justify-content:center;
    align-items:center;
    z-index:999;
}

.modalBox{
    background:#fff;
    width:420px;
    padding:25px;
    border-radius:18px;
    text-align:center;
    position:relative;
    animation:fadeIn .25s ease;
}

@keyframes fadeIn{
    from{ transform:scale(.9); opacity:0; }
    to{ transform:scale(1); opacity:1; }
}

.close{
    position:absolute;
    top:10px;
    left:15px;
    cursor:pointer;
    font-size:18px;
}

#qrcode{
    margin-top:15px;
}

#wgConfig{
    width:100%;
    margin-top:10px;
    height:100px;
    font-size:12px;
    padding:8px;
    border-radius:8px;
    border:1px solid #ddd;
    resize:none;
}

.modalBtns{
    margin-top:15px;
    display:flex;
    justify-content:center;
    gap:10px;
}

.modalBtns button{
    background:#667eea;
    color:#fff;
}

/* ================= LOGIN PAGE ================= */

.login-page{
    display:flex;
    justify-content:center;
    align-items:center;
    height:100vh;
}

.login-wrapper{
    width:100%;
    max-width:380px;
}

.login-card{
    background:#fff;
    padding:35px;
    border-radius:16px;
    box-shadow:0 20px 50px rgba(0,0,0,0.2);
    text-align:center;
}

.login-logo{
    font-size:40px;
    margin-bottom:10px;
}

.subtitle{
    font-size:13px;
    color:#777;
    margin-bottom:20px;
}

.login-card input{
    width:100%;
    margin-bottom:10px;
    padding:10px;
    border-radius:10px;
    border:1px solid #ddd;
    font-size:14px;
}

.btn-primary{
    width:100%;
    background:#667eea;
    color:#fff;
    border:none;
    padding:12px;
    border-radius:10px;
    cursor:pointer;
    font-weight:bold;
}

.btn-primary:hover{
    opacity:.9;
}

.error-box{
    margin-top:15px;
    background:#e74c3c;
    color:#fff;
    padding:8px;
    border-radius:8px;
    font-size:13px;
}