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

html,body{
    height:100%;
}

body{
    font-family:Arial, Helvetica, sans-serif;
    background:#0b1220;
    color:#ffffff;
}

/* layout */

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

/* sidebar */

.sidebar{
    width:260px;
    background:#0f172a;
    border-right:1px solid rgba(255,255,255,.06);
    padding:22px 16px;
    position:sticky;
    top:0;
    height:100vh;
    overflow:auto;
}

.brand{
    font-size:28px;
    font-weight:800;
    margin-bottom:26px;
    letter-spacing:.3px;
}

.brand span{
    color:#3b82f6;
}

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

.menu a{
    color:#d7e1f5;
    text-decoration:none;
    padding:12px 14px;
    border-radius:14px;
    font-size:15px;
    transition:.15s ease;
}

.menu a:hover{
    background:#162033;
    color:#fff;
}

.menu a.active{
    background:linear-gradient(135deg,#2563eb,#1d4ed8);
    color:#fff;
    font-weight:700;
}

/* main */

.main{
    flex:1;
    padding:24px;
    overflow:auto;
}

/* topbar */

.topbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:20px;
    flex-wrap:wrap;
    margin-bottom:20px;
}

.page-title h2{
    font-size:30px;
    font-weight:800;
    margin-bottom:6px;
}

.page-title p{
    color:#9db0d3;
    font-size:14px;
}

.user-box{
    background:#111827;
    border:1px solid rgba(255,255,255,.08);
    padding:12px 16px;
    border-radius:14px;
    font-size:14px;
    color:#dbe7ff;
}

/* containers */

.table-box,
.card-box{
    background:#111827;
    border:1px solid rgba(255,255,255,.08);
    border-radius:20px;
    padding:20px;
    margin-bottom:20px;
}

.table-box h3,
.card-box h3{
    font-size:20px;
    margin-bottom:16px;
}

/* form */

form{
    width:100%;
}

.form-group{
    margin-bottom:16px;
}

label{
    display:block;
    margin-bottom:8px;
    color:#c6d5f0;
    font-size:14px;
}

input,
select,
textarea{
    width:100%;
    height:44px;
    border:none;
    outline:none;
    border-radius:12px;
    padding:0 14px;
    background:#0b1220;
    color:#fff;
    border:1px solid rgba(255,255,255,.08);
    font-size:15px;
}

textarea{
    min-height:120px;
    padding:14px;
    resize:vertical;
}

input:focus,
select:focus,
textarea:focus{
    border-color:#3b82f6;
}

/* buttons */

.btn,
button{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    min-height:44px;
    padding:0 18px;
    border:none;
    border-radius:12px;
    background:linear-gradient(135deg,#2563eb,#1d4ed8);
    color:#fff;
    text-decoration:none;
    cursor:pointer;
    font-weight:700;
    font-size:14px;
    transition:.15s ease;
}

.btn:hover,
button:hover{
    transform:translateY(-1px);
    opacity:.96;
}

.btn-secondary{
    background:#374151;
}

.btn-secondary:hover{
    background:#2f3947;
}

.btn-danger{
    background:linear-gradient(135deg,#dc2626,#b91c1c);
}

.btn-success{
    background:linear-gradient(135deg,#059669,#047857);
}

/* tables */

table{
    width:100%;
    border-collapse:collapse;
}

thead th{
    text-align:left;
    padding:14px 12px;
    color:#9db0d3;
    font-size:13px;
    border-bottom:1px solid rgba(255,255,255,.08);
}

tbody td{
    padding:14px 12px;
    border-bottom:1px solid rgba(255,255,255,.05);
    vertical-align:middle;
}

tbody tr:hover{
    background:#0f1624;
}

/* messages */

.success-box,
.error-box,
.warning-box{
    padding:14px 16px;
    border-radius:14px;
    margin-bottom:18px;
    font-size:14px;
}

.success-box{
    background:rgba(34,197,94,.15);
    border:1px solid rgba(34,197,94,.35);
    color:#86efac;
}

.error-box{
    background:rgba(239,68,68,.15);
    border:1px solid rgba(239,68,68,.35);
    color:#fca5a5;
}

.warning-box{
    background:rgba(245,158,11,.15);
    border:1px solid rgba(245,158,11,.35);
    color:#fde68a;
}

/* utilities */

.grid-2{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:20px;
}

.grid-3{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:20px;
}

.grid-4{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:20px;
}

.mono{
    font-family:Consolas, monospace;
}

.small{
    font-size:13px;
    color:#9db0d3;
}

/* responsive */

@media(max-width:1100px){

    .grid-4{
        grid-template-columns:repeat(2,1fr);
    }

    .grid-3{
        grid-template-columns:1fr 1fr;
    }
}

@media(max-width:850px){

    .sidebar{
        width:220px;
    }

    .grid-2,
    .grid-3,
    .grid-4{
        grid-template-columns:1fr;
    }
}

@media(max-width:700px){

    .app{
        flex-direction:column;
    }

    .sidebar{
        width:100%;
        height:auto;
        position:relative;
    }

    .main{
        padding:16px;
    }

    .topbar{
        flex-direction:column;
        align-items:flex-start;
    }
}