:root{
  --bg:#0b1220;
  --bg-soft:#0f172a;
  --panel:#111827;
  --panel-2:#0f1a2f;
  --line:#1f2937;
  --line-soft:rgba(255,255,255,.07);
  --text:#e5eefc;
  --muted:#94a3b8;
  --primary:#2563eb;
  --primary-hover:#1d4ed8;
  --success:#10b981;
  --danger:#ef4444;
  --warning:#f59e0b;
  --shadow:0 18px 45px rgba(0,0,0,.28);
  --radius:16px;
  --radius-sm:12px;
}

*{box-sizing:border-box}

html,body{
  margin:0;
  padding:0;
  min-height:100%;
}

body{
  background:
    radial-gradient(circle at top right, rgba(37,99,235,.16), transparent 22%),
    linear-gradient(180deg, #08111f 0%, #0b1220 100%);
  color:var(--text);
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}

a{
  color:inherit;
  text-decoration:none;
}

img{
  max-width:100%;
  display:block;
}

button,
input,
select,
textarea{
  font:inherit;
}

.app{
  min-height:100vh;
  display:grid;
  grid-template-columns:280px 1fr;
}

.sidebar{
  background:rgba(6,13,27,.92);
  border-right:1px solid var(--line-soft);
  padding:22px 18px;
  position:sticky;
  top:0;
  height:100vh;
  backdrop-filter:blur(10px);
}

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

.brand__logo{
  width:42px;
  height:42px;
  border-radius:12px;
  object-fit:cover;
  box-shadow:var(--shadow);
}

.brand__text{
  display:flex;
  flex-direction:column;
  line-height:1.1;
}

.brand__title{
  font-size:1.2rem;
  font-weight:800;
  color:#fff;
}

.brand__subtitle{
  color:var(--muted);
  font-size:.85rem;
  margin-top:4px;
}

.profile{
  background:rgba(255,255,255,.03);
  border:1px solid var(--line-soft);
  border-radius:var(--radius);
  padding:14px;
  margin-bottom:18px;
}

.profile__label{
  color:var(--muted);
  font-size:.82rem;
  margin-bottom:6px;
}

.profile__name{
  font-weight:700;
  color:#fff;
  margin-bottom:3px;
}

.profile__email{
  color:#c7d3e6;
  font-size:.92rem;
  word-break:break-word;
}

.nav{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.nav__link{
  display:flex;
  align-items:center;
  gap:10px;
  padding:13px 14px;
  border-radius:14px;
  border:1px solid var(--line-soft);
  background:rgba(255,255,255,.02);
  color:#e9f1ff;
  font-weight:600;
  transition:.18s ease;
}

.nav__link:hover{
  background:rgba(37,99,235,.16);
  border-color:rgba(37,99,235,.35);
  transform:translateY(-1px);
}

.nav__link.is-active{
  background:linear-gradient(180deg, rgba(37,99,235,.20), rgba(37,99,235,.12));
  border-color:rgba(37,99,235,.38);
}

.main{
  min-width:0;
  padding:24px 28px 32px;
}

.topbar{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:22px;
}

.topbar__left h1{
  margin:0 0 6px;
  font-size:2rem;
  line-height:1.05;
  color:#fff;
}

.topbar__left p{
  margin:0;
  color:var(--muted);
  font-size:.98rem;
}

.topbar__actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.card{
  background:linear-gradient(180deg, rgba(17,24,39,.96), rgba(14,23,40,.96));
  border:1px solid var(--line-soft);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:18px;
}

.card + .card{
  margin-top:16px;
}

.card__title{
  margin:0 0 8px;
  font-size:1.1rem;
  font-weight:800;
  color:#fff;
}

.card__text{
  margin:0;
  color:var(--muted);
  line-height:1.6;
}

.grid{
  display:grid;
  gap:18px;
}

.grid--cards{
  grid-template-columns:repeat(auto-fit, minmax(280px, 1fr));
}

.form-grid{
  display:grid;
  gap:14px;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
}

.field{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.field label{
  font-size:.9rem;
  color:#cbd5e1;
  font-weight:600;
}

.input,
.select,
.textarea{
  width:100%;
  background:#08111f;
  color:#e5eefc;
  border:1px solid #334155;
  border-radius:12px;
  padding:12px 13px;
  outline:none;
  transition:border-color .18s ease, box-shadow .18s ease;
}

.input:focus,
.select:focus,
.textarea:focus{
  border-color:rgba(37,99,235,.8);
  box-shadow:0 0 0 4px rgba(37,99,235,.12);
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border:1px solid transparent;
  border-radius:12px;
  padding:11px 16px;
  cursor:pointer;
  font-weight:700;
  transition:.18s ease;
  white-space:nowrap;
}

.btn:hover{
  transform:translateY(-1px);
}

.btn--primary{
  background:var(--primary);
  color:#fff;
}

.btn--primary:hover{
  background:var(--primary-hover);
}

.btn--ghost{
  background:rgba(255,255,255,.05);
  color:#fff;
  border-color:var(--line-soft);
}

.btn--danger{
  background:var(--danger);
  color:#fff;
}

.btn--success{
  background:var(--success);
  color:#052e1a;
}

.btn--block{
  width:100%;
}

.btn--sm{
  padding:8px 12px;
  border-radius:10px;
  font-size:.92rem;
}

.alert{
  border-radius:14px;
  padding:12px 14px;
  border:1px solid transparent;
  margin-bottom:16px;
  font-weight:600;
}

.alert--success{
  background:#064e3b;
  border-color:#10b981;
  color:#d1fae5;
}

.alert--error{
  background:#7f1d1d;
  border-color:#ef4444;
  color:#fecaca;
  white-space:pre-wrap;
}

.table-wrap{
  width:100%;
  overflow:auto;
  border:1px solid var(--line-soft);
  border-radius:14px;
}

.table{
  width:100%;
  border-collapse:collapse;
  min-width:760px;
}

.table th,
.table td{
  padding:12px 14px;
  border-bottom:1px solid var(--line-soft);
  text-align:left;
  font-size:.95rem;
}

.table th{
  color:#cbd5e1;
  background:rgba(255,255,255,.02);
}

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

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

.login-card{
  width:100%;
  max-width:460px;
  background:linear-gradient(180deg, rgba(17,24,39,.96), rgba(14,23,40,.96));
  border:1px solid var(--line-soft);
  border-radius:20px;
  padding:26px;
  box-shadow:var(--shadow);
}

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

.login-brand__logo{
  width:58px;
  height:58px;
  object-fit:cover;
  border-radius:14px;
}

.login-brand__title{
  font-size:1.25rem;
  font-weight:800;
  color:#fff;
}

.login-brand__subtitle{
  font-size:.92rem;
  color:var(--muted);
  margin-top:4px;
}

.login-header h1{
  margin:0 0 8px;
  font-size:1.8rem;
  color:#fff;
}

.login-header p{
  margin:0 0 18px;
  color:var(--muted);
}

.login-form{
  display:grid;
  gap:14px;
}

@media (max-width: 1100px){
  .app{
    grid-template-columns:1fr;
  }

  .sidebar{
    position:static;
    height:auto;
    border-right:0;
    border-bottom:1px solid var(--line-soft);
  }
}

@media (max-width: 720px){
  .main{
    padding:18px 14px 24px;
  }

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

  .topbar__left h1{
    font-size:1.7rem;
  }
}