:root{
  --bg:#f6f8fc;
  --card:#ffffff;
  --text:#1f2940;
  --muted:#7e8ca1;
  --line:#e8edf4;
  --primary-1:#79a9f5;
  --primary-2:#5f8fe6;
  --success-bg:#effaf6;
  --success:#62c9b4;
  --danger:#d14343;
  --shadow:0 10px 30px rgba(31,41,64,.06);
  --radius:24px;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family:Arial,Helvetica,sans-serif;
  background:var(--bg);
  color:var(--text);
}
a{text-decoration:none;color:inherit}
.layout{display:grid;grid-template-columns:280px 1fr;min-height:100vh}
.sidebar{
  background:#fff;
  border-right:1px solid var(--line);
  padding:28px 20px;
}
.brand{
  display:flex;align-items:center;gap:14px;margin-bottom:30px;
}
.brand-badge{
  width:52px;height:52px;border-radius:16px;
  background:linear-gradient(135deg,var(--primary-1),var(--primary-2));
  color:#fff;display:flex;align-items:center;justify-content:center;
  font-weight:700;font-size:22px;
}
.brand-meta h1{font-size:22px;margin:0}
.brand-meta p{margin:4px 0 0;color:var(--muted);font-size:13px}
.nav-group{margin-top:24px}
.nav-title{
  font-size:12px;text-transform:uppercase;letter-spacing:.12em;
  color:var(--muted);margin:0 0 12px 10px;
}
.nav-item{
  display:flex;align-items:center;gap:12px;
  padding:14px 16px;border-radius:18px;color:#576882;
  margin-bottom:8px;
}
.nav-item.is-active, .nav-item:hover{
  background:#edf4ff;color:#35578c;
}
.nav-item .dot{
  width:10px;height:10px;border-radius:999px;background:#9db8ea;
}
.main{
  padding:26px 28px 34px;
}
.topbar{
  display:flex;align-items:center;justify-content:space-between;
  gap:16px;margin-bottom:26px;
}
.topbar h2{font-size:32px;font-weight:600;margin:0}
.topbar p{margin:8px 0 0;color:var(--muted)}
.topbar .userbox{
  background:#fff;border:1px solid var(--line);border-radius:18px;
  padding:14px 18px;min-width:240px;box-shadow:var(--shadow)
}
.userbox .role{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.12em}
.hero{
  background:linear-gradient(135deg,var(--primary-1),var(--primary-2));
  border-radius:28px;padding:22px 24px;color:#fff;
  box-shadow:0 18px 40px rgba(95,143,230,.22);
  display:flex;align-items:center;justify-content:space-between;gap:18px;
}
.hero-left{display:flex;align-items:center;gap:16px}
.hero-badge{
  width:54px;height:54px;border-radius:999px;background:rgba(255,255,255,.16);
  display:flex;align-items:center;justify-content:center;font-size:30px;font-weight:700;
}
.hero h3{margin:0;font-size:21px}
.hero p{margin:8px 0 0;color:rgba(255,255,255,.9)}
.hero-actions{display:flex;gap:10px;flex-wrap:wrap}
.button{
  border:none;border-radius:18px;padding:14px 18px;cursor:pointer;
  font-size:15px;font-weight:700;
}
.button-primary{
  color:#fff;background:linear-gradient(135deg,var(--primary-1),var(--primary-2));
}
.button-soft{
  color:#35578c;background:rgba(255,255,255,.18);border:1px solid rgba(255,255,255,.24);
}
.grid{display:grid;gap:18px}
.grid-3{grid-template-columns:repeat(3, minmax(0,1fr))}
.grid-2{grid-template-columns:repeat(2, minmax(0,1fr))}
.card{
  background:var(--card);border:1px solid var(--line);border-radius:24px;padding:18px;box-shadow:var(--shadow);
}
.metric h4{margin:0;color:var(--muted);font-size:14px;font-weight:400}
.metric strong{display:block;margin-top:8px;font-size:34px;font-weight:700}
.metric span{display:block;margin-top:6px;color:var(--muted);font-size:14px}
.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:26px 0 16px}
.section-head h3{margin:0;font-size:24px;font-weight:600}
.badge{
  display:inline-flex;align-items:center;gap:8px;
  padding:8px 12px;border-radius:999px;background:#edf4ff;color:#35578c;font-size:12px;font-weight:700;
}
.table-wrap{overflow:auto}
table{width:100%;border-collapse:collapse}
th,td{text-align:left;padding:14px 10px;border-bottom:1px solid var(--line)}
th{color:var(--muted);font-size:12px;text-transform:uppercase;letter-spacing:.08em}
.status-pill{
  display:inline-flex;padding:8px 12px;border-radius:999px;font-size:12px;font-weight:700
}
.status-active{background:#effaf6;color:#3a8a78}
.status-inactive{background:#fff1f1;color:#c45555}
.forms-grid{display:grid;grid-template-columns:1.2fr .8fr;gap:18px}
.form-card{
  background:#fff;border:1px solid var(--line);border-radius:24px;padding:22px;box-shadow:var(--shadow)
}
.form-card h3{margin:0 0 8px;font-size:24px}
.form-card p{margin:0 0 18px;color:var(--muted)}
.field{margin-bottom:14px}
.field label{display:block;margin-bottom:8px;font-size:14px;font-weight:700}
.field input,.field select,.field textarea{
  width:100%;padding:14px 15px;border-radius:16px;border:1px solid var(--line);
  background:#fbfcff;font-size:15px;outline:none;
}
.field textarea{min-height:110px;resize:vertical}
.row-2{display:grid;grid-template-columns:repeat(2, minmax(0,1fr));gap:12px}
.checkbox-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.check{
  display:flex;align-items:center;gap:10px;padding:12px 14px;border:1px solid var(--line);
  border-radius:16px;background:#fbfcff
}
.alert{
  border-radius:18px;padding:14px 16px;margin-bottom:16px;font-weight:700
}
.alert-success{background:#effaf6;color:#3a8a78;border:1px solid #dceee7}
.alert-error{background:#fff1f1;color:#c45555;border:1px solid #f1d7d7}
.login-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px}
.login-box{width:min(460px, 100%)}
.login-hero{
  padding:28px;border-radius:30px;background:linear-gradient(135deg,#bfe3ff,#6ea8ff);color:#fff;margin-bottom:22px
}
.login-card{
  background:#fff;border:1px solid var(--line);border-radius:28px;padding:22px;box-shadow:var(--shadow)
}
.small{font-size:13px;color:var(--muted)}
.footer-actions{display:flex;gap:12px;justify-content:flex-end;margin-top:18px}
@media (max-width: 1100px){
  .layout{grid-template-columns:1fr}
  .sidebar{display:none}
  .forms-grid,.grid-3,.grid-2,.row-2,.checkbox-grid{grid-template-columns:1fr}
}
.brand-logo {
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 18px;
    border-radius: 24px;
}

.brand-image {
    display: block;
    width: 100%;
    max-width: 220px;
    height: auto;
    margin: 0 auto 10px auto;
}

.brand-meta-center {
    text-align: center;
}

.brand-meta-center p {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
    font-weight: 700;
}
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--bg);
}

.login-panel {
    width: 100%;
    max-width: 460px;
}

.login-brand-card {
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-radius: 28px;
    padding: 22px;
    margin-bottom: 18px;
    text-align: center;
}

.login-brand-image {
    display: block;
    width: 100%;
    max-width: 240px;
    height: auto;
    margin: 0 auto 10px auto;
}

.login-brand-card p {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
    font-weight: 700;
}

.login-card {
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-radius: 28px;
    padding: 24px;
}

.login-card h1 {
    margin: 0 0 8px;
    font-size: 30px;
    color: var(--text);
}

.login-subtitle {
    margin: 0 0 18px;
    color: var(--muted);
    line-height: 1.5;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.full-width {
    width: 100%;
}

.login-help {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: #fbfcff;
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
}

.login-help strong {
    color: var(--text);
    font-size: 14px;
}

.login-help code {
    background: #eef4ff;
    color: var(--primaryDark);
    padding: 2px 6px;
    border-radius: 8px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow);
    padding: 18px;
}

.stat-card span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 10px;
}

.stat-card strong {
    font-size: 30px;
    color: var(--text);
    font-weight: 700;
}

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

.quick-card {
    display: block;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 20px;
    transition: .2s ease;
}

.quick-card:hover {
    transform: translateY(-2px);
    border-color: #d8e6fb;
    box-shadow: 0 12px 24px rgba(27, 42, 65, .08);
}

.quick-card h4 {
    margin: 0 0 8px;
    font-size: 18px;
    color: var(--text);
}

.quick-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
    font-size: 14px;
}

@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

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

@media (max-width: 768px) {
    .stats-grid,
    .quick-grid {
        grid-template-columns: 1fr;
    }
}

.table-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.button-danger {
    background: #fff1f1;
    color: #cc3d3d;
    border: 1px solid #f0caca;
}
.table-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.button-danger {
    background: #fff1f1;
    color: #cc3d3d;
    border: 1px solid #f0caca;
}