*{
    box-sizing:border-box;
}

body{
    margin:0;
    font-family:Arial,Helvetica,sans-serif;
    background:#f5f7fb;
    color:#111827;
}

a{
    text-decoration:none;
    color:inherit;
}

.app{
    display:flex;
    min-height:100vh;
}

.sidebar{
    width:240px;
    background:#ffffff;
    border-right:1px solid #e5e7eb;
    padding:20px;
    display:flex;
    flex-direction:column;
}

.brand{
    font-size:22px;
    font-weight:700;
    margin-bottom:24px;
}

.nav{
    display:flex;
    flex-direction:column;
    gap:8px;
}

.nav a{
    padding:12px 14px;
    border-radius:10px;
    color:#374151;
    transition:background .2s ease,color .2s ease;
}

.nav a:hover{
    background:#f3f4f6;
}

.sidebar-user{
    margin-top:auto;
    font-size:14px;
    color:#6b7280;
    padding-top:20px;
}

.content{
    flex:1;
    padding:24px;
    min-width:0;
}

.page-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:20px;
    gap:12px;
    flex-wrap:wrap;
}

.cards{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:16px;
    margin-bottom:24px;
}

.card{
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:16px;
    padding:18px;
}

.card .label{
    font-size:13px;
    color:#6b7280;
    margin-bottom:8px;
}

.card .value{
    font-size:28px;
    font-weight:700;
}

.table-wrap{
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:16px;
    padding:16px;
    overflow:auto;
}

table{
    width:100%;
    border-collapse:collapse;
}

th,
td{
    text-align:left;
    padding:12px;
    border-bottom:1px solid #eef2f7;
    font-size:14px;
    vertical-align:middle;
}

th{
    color:#6b7280;
    font-weight:600;
}

.btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    padding:10px 14px;
    border-radius:10px;
    border:1px solid #d1d5db;
    background:#fff;
    color:#111827;
    cursor:pointer;
    transition:background .2s ease,border-color .2s ease,color .2s ease;
}

.btn:hover{
    background:#f9fafb;
}

.btn-primary{
    background:#2563eb;
    color:#fff;
    border-color:#2563eb;
}

.btn-primary:hover{
    background:#1d4ed8;
    border-color:#1d4ed8;
}

.btn-danger,
.btn-danger:visited,
.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active{
    background:#dc2626 !important;
    color:#ffffff !important;
    border-color:#dc2626 !important;
    opacity:1 !important;
}

.btn-danger:hover{
    background:#b91c1c !important;
    border-color:#b91c1c !important;
}

.btn-success,
.btn-success:visited,
.btn-success:hover,
.btn-success:focus,
.btn-success:active{
    background:#16a34a !important;
    color:#ffffff !important;
    border-color:#16a34a !important;
    opacity:1 !important;
}

.btn-success:hover{
    background:#15803d !important;
    border-color:#15803d !important;
}

.btn-success{
    background:#16a34a;
    color:#fff;
    border-color:#16a34a;
}

.btn-success:hover{
    background:#15803d;
    border-color:#15803d;
}

.badge{
    display:inline-block;
    padding:6px 10px;
    border-radius:999px;
    font-size:12px;
    font-weight:700;
    white-space:nowrap;
}

.badge-success{
    background:#dcfce7;
    color:#166534;
}

.badge-danger{
    background:#fee2e2;
    color:#991b1b;
}

.badge-muted{
    background:#e5e7eb;
    color:#374151;
}

.form-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:16px;
}

.form-group{
    display:flex;
    flex-direction:column;
    gap:8px;
}

label{
    font-size:14px;
    color:#374151;
}

input,
textarea,
select{
    width:100%;
    padding:12px;
    border:1px solid #d1d5db;
    border-radius:10px;
    background:#fff;
    color:#111827;
}

input:focus,
textarea:focus,
select:focus{
    outline:none;
    border-color:#2563eb;
    box-shadow:0 0 0 3px rgba(37,99,235,.12);
}

textarea{
    min-height:100px;
    resize:vertical;
}

.actions{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    align-items:center;
}

.section{
    margin-bottom:24px;
}

.login-wrap{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:20px;
}

.login-card{
    width:100%;
    max-width:420px;
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:18px;
    padding:24px;
}

.error{
    background:#fee2e2;
    color:#991b1b;
    border:1px solid #fecaca;
    padding:12px 14px;
    border-radius:10px;
    margin-bottom:16px;
}

.success{
    background:#dcfce7;
    color:#166534;
    border:1px solid #bbf7d0;
    padding:12px 14px;
    border-radius:10px;
    margin-bottom:16px;
}

.inline-form{
    display:inline;
}

.secret-text{
    display:inline-block;
    font-family:Consolas,monospace;
    letter-spacing:.5px;
    vertical-align:middle;
    word-break:break-all;
}

.eye-btn{
    margin-left:8px;
    border:none;
    background:transparent;
    cursor:pointer;
    font-size:16px;
    line-height:1;
    padding:4px 6px;
    border-radius:8px;
    vertical-align:middle;
}

.eye-btn:hover{
    background:#f3f4f6;
}

@media (max-width:1100px){
    .cards{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

@media (max-width:860px){
    .app{
        flex-direction:column;
    }

    .sidebar{
        width:100%;
        border-right:none;
        border-bottom:1px solid #e5e7eb;
    }

    .form-grid{
        grid-template-columns:1fr;
    }

    th,
    td{
        padding:10px;
        font-size:13px;
    }
}

@media (max-width:600px){
    .cards{
        grid-template-columns:1fr;
    }

    .content{
        padding:16px;
    }

    .table-wrap{
        padding:10px;
    }

    .btn{
        width:100%;
    }

    .actions{
        flex-direction:column;
        align-items:stretch;
    }
}