:root{
    --bg:#0b1120;
    --sidebar:#111827;
    --card:#ffffff;
    --line:#e5e7eb;
    --text:#111827;
    --muted:#6b7280;
    --primary:#2563eb;
    --primary-hover:#1d4ed8;
    --danger:#ef4444;
    --success:#10b981;
}

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

html,body{
    height:100%;
}

body{
    font-family:'Inter',sans-serif;
    background:#f8fafc;
    color:var(--text);
}

#__next{
    min-height:100%;
}

.layout{
    display:flex;
    min-height:100vh;
}

.sidebar{
    width:260px;
    background:var(--sidebar);
    color:#fff;
    padding:28px 20px;
    border-right:1px solid rgba(255,255,255,.06);
}

.brand{
    display:flex;
    align-items:center;
    gap:14px;
    margin-bottom:40px;
}

.brand-logo{
    width:42px;
    height:42px;
    border-radius:12px;
    background:var(--primary);
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:700;
    font-size:18px;
}

.brand-title{
    font-size:15px;
    font-weight:700;
}

.brand-sub{
    font-size:13px;
    color:#9ca3af;
}

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

.menu-item{
    padding:12px 14px;
    border-radius:10px;
    color:#cbd5e1;
    cursor:pointer;
    transition:.2s;
    font-size:14px;
}

.menu-item:hover{
    background:rgba(255,255,255,.05);
}

.menu-item.active{
    background:rgba(37,99,235,.18);
    color:#fff;
}

.content{
    flex:1;
    display:flex;
    flex-direction:column;
}

.topbar{
    height:80px;
    background:#fff;
    border-bottom:1px solid var(--line);
    padding:0 32px;
    display:flex;
    align-items:center;
    justify-content:space-between;
}

.topbar h1{
    font-size:24px;
    font-weight:700;
}

.topbar p{
    color:var(--muted);
    font-size:14px;
    margin-top:4px;
}

.avatar{
    width:42px;
    height:42px;
    border-radius:50%;
    background:#dbeafe;
    color:var(--primary);
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:700;
}

.page{
    flex:1;
    padding:40px;
    display:flex;
    align-items:center;
    justify-content:center;
}

.card{
    background:var(--card);
    border:1px solid var(--line);
    border-radius:20px;
    box-shadow:0 10px 30px rgba(15,23,42,.08);
}

.auth-card{
    width:100%;
    max-width:460px;
    padding:34px;
}

.card-header{
    margin-bottom:24px;
}

.card-header h2{
    font-size:26px;
    font-weight:700;
}

.card-header p{
    margin-top:6px;
    color:var(--muted);
    font-size:14px;
}

.field{
    margin-bottom:18px;
}

.field label{
    display:block;
    margin-bottom:8px;
    font-size:14px;
    font-weight:500;
}

.field input{
    width:100%;
    height:48px;
    border:1px solid var(--line);
    border-radius:12px;
    padding:0 14px;
    font-size:15px;
    outline:none;
    transition:.2s;
}

.field input:focus{
    border-color:var(--primary);
    box-shadow:0 0 0 4px rgba(37,99,235,.08);
}

.row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:20px;
    font-size:14px;
}

.row a{
    color:var(--primary);
    text-decoration:none;
}

.row a:hover{
    text-decoration:underline;
}

.remember{
    display:flex;
    align-items:center;
    gap:8px;
    color:var(--muted);
}

button{
    width:100%;
    height:48px;
    border:none;
    border-radius:12px;
    background:var(--primary);
    color:#fff;
    font-size:15px;
    font-weight:600;
    cursor:pointer;
    transition:.2s;
}

button:hover{
    background:var(--primary-hover);
}

button:disabled{
    opacity:.7;
    cursor:not-allowed;
}

#msg{
    min-height:20px;
    margin-top:16px;
    font-size:14px;
}

#msg.error{
    color:var(--danger);
}

#msg.success{
    color:var(--success);
}

@media(max-width:900px){
    .sidebar{
        display:none;
    }

    .page{
        padding:20px;
    }

    .topbar{
        padding:0 20px;
    }
}

.auth-layout{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:24px;
    background:
        radial-gradient(circle at top right, rgba(37,99,235,.08), transparent 25%),
        radial-gradient(circle at bottom left, rgba(59,130,246,.08), transparent 25%),
        #f8fafc;
}

.auth-wrapper{
    width:100%;
    max-width:460px;
}

.auth-brand{
    display:flex;
    align-items:center;
    gap:14px;
    justify-content:center;
    margin-bottom:24px;
}

.dark{
    color:#111827;
}

.dark-sub{
    color:#6b7280;
}