:root{
  --bg: #0b1220;
  --panel: rgba(255,255,255,0.06);
  --panel-2: rgba(255,255,255,0.08);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.68);
  --border: rgba(255,255,255,0.12);
  --shadow: 0 18px 60px rgba(0,0,0,0.35);
  --primary: #6366f1;
  --primary-2: #7c3aed;
  --danger: #ef4444;
  --radius: 16px;
  --radius-sm: 12px;
}

*{ box-sizing: border-box; }
html, body { height: 100%; }
body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* Layout app */
.app{
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
}

.sidebar{
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 18px;
  border-right: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(10px);
}

.sidebar__brand{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 18px;
}

.brand-dot{
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border-radius: 999px;
  box-shadow: 0 0 0 6px rgba(99,102,241,0.18);
}

.brand-text{
  font-weight: 700;
  letter-spacing: .2px;
}

.sidebar__nav{
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-link{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}

.nav-link:hover{
  transform: translateY(-1px);
  background: var(--panel);
  border-color: var(--border);
}

.nav-icon{
  width: 26px;
  display: inline-flex;
  justify-content: center;
  opacity: .95;
}

.nav-link--danger:hover{
  border-color: rgba(239, 68, 68, 0.35);
}

.sidebar__footer{
  margin-top: 24px;
}

.user-chip{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--panel);
  border: 1px solid var(--border);
}

.user-avatar{
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(99,102,241,0.35), rgba(124,58,237,0.25));
  border: 1px solid rgba(255,255,255,0.14);
}

.user-chip__name{
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
}

.user-chip__role{
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

/* Main */
.main{
  padding: 22px 22px 42px;
}

.main__header{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.main__title{
  font-size: 24px;
  margin: 0 0 6px;
  letter-spacing: .2px;
}

.main__subtitle{
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.card{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card__header{
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.card__title{
  margin: 0;
  font-size: 16px;
}

.card__subtitle{
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.stat-card{
  padding: 18px;
}

.stat-card__label{
  color: var(--muted);
  font-size: 13px;
}

.stat-card__value{
  font-size: 40px;
  font-weight: 800;
  margin-top: 10px;
  line-height: 1;
}

.stat-card__hint{
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

    label{
      margin-bottom: 6px;
      display: block;
    }

    .field{
      display: grid;
      gap: 6px;
    }

    input{
      width: 100%;
      padding: 12px 12px;
      border-radius: 12px;
      border: 1px solid rgba(255,255,255,.14);
      background: var(--input-bg);
      color: var(--text);
      outline: none;
      transition: border-color .2s ease, box-shadow .2s ease, transform .02s ease;
	  margin-bottom: 25px;
    }

    input::placeholder{ color: rgba(255,255,255,.45); }

    input:focus{
      border-color: rgba(79,140,255,.75);
      box-shadow: 0 0 0 4px rgba(79,140,255,.18);
    }
	
	select {
		margin-bottom: 25px;
	}

    button{
      margin-top: 6px;
      width: 100%;
      padding: 12px 14px;
      border: 0;
      border-radius: 12px;
      background: linear-gradient(135deg, var(--primary), var(--primary-2));
      color: #fff;
	  font-size: 18px;
      font-weight: 700;
      cursor: pointer;
      transition: transform .06s ease, filter .2s ease;
    }

    button:hover{ filter: brightness(1.05); }
    button:active{ transform: translateY(1px); }

/* Chart container */
.chart-wrap{
  padding: 12px 16px 18px;
  height: 320px;
}

code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.85);
}

.table-wrap{
  padding: 14px 16px 18px;
}

.users-table{
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.users-table thead th{
  text-align: left;
  color: rgba(255,255,255,0.75);
  font-weight: 700;
  padding: 10px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.users-table tbody td{
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.92);
}

.users-table tbody tr:hover td{
  background: rgba(255,255,255,0.04);
}

@media (max-width: 860px){
  .users-table{
    font-size: 13px;
  }
}


/* Responsivo */
@media (min-width: 980px){
  .grid{
    grid-template-columns: 340px 1fr;
  }
}

@media (max-width: 860px){
  .app{
    grid-template-columns: 1fr;
  }
  .sidebar{
    position: relative;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}