:root{
  --bg: #1f1f1f;
  --text: #cdcdcd;
  --muted: #9b9b9b;
  --card: #454545;
  --card-alt: #494949;
  --border: #3a3a3a;
  --accent: #5aa0ff;
  --radius: 5px;
  --input-h: 38px;
  --sidebar-w: 260px;
  --max-width: 1080px;
}

*{
  box-sizing: border-box;
}

html,body{
  height: 100%;
}

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  line-height: 1.5;
}

.top-nav{
  background: #262626;
  border-bottom: 1px solid var(--border);
}

.top-nav-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0;
  height: 80px;
}

.brand-logo{
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

.brand-logo img{
  display: block;
  height: 36px;
  width: auto;
}

.top-nav-links{
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.top-nav-links a{
  color: var(--muted);
  font-weight: 500;
}

.top-nav-links a:hover,
.top-nav-links a:focus{
  color: var(--text);
}

a{
  color: var(--text);
  text-decoration: none;
  transition: color .2s ease;
}

a:hover{
  color: #ffffff;
}

h1,h2,h3,h4,h5,h6{
  margin: 0 0 .75rem;
  font-weight: 600;
}

p{
  margin: 0 0 1rem;
  color: var(--text);
}

.tag{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .125rem .5rem;
  border-radius: 999px;
  background: #3a3a3a;
  border: 1px solid #4a4a4a;
  font-size: .8rem;
  color: var(--text);
}

.wrapper{
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

.section{
  padding: 4rem 0;
}

.section.dark{
  background: #262626;
}

.section + .section{
  border-top: 1px solid var(--border);
}

.hero{
  display: grid;
  gap: 1.5rem;
}

.hero h1{
  font-size: clamp(2.5rem, 5vw, 3.25rem);
}

.hero p{
  max-width: 640px;
  color: var(--muted);
}

.actions{
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.button{
  display: inline-grid;
  place-items: center;
  height: var(--input-h);
  padding: 0 1.5rem;
  border-radius: var(--radius);
  border: 1px solid #4b4b4b;
  background: #3b3b3b;
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
  transition: background .2s ease, border-color .2s ease;
}

.button:hover{
  background: #333333;
  border-color: var(--accent);
}

.button.secondary{
  background: transparent;
  border-color: var(--border);
}

.grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.card.alt{
  background: var(--card-alt);
}

.card h3{
  margin-bottom: .5rem;
}

.list{
  display: grid;
  gap: .5rem;
  color: var(--muted);
  padding: 0;
  margin: 0;
  list-style: none;
}

input,select,textarea,button{
  font: inherit;
}

.field{
  display: flex;
  flex-direction: column;
  gap: .375rem;
}

label{
  color: var(--muted);
}

.input,
.select,
textarea{
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #2a2a2a;
  color: var(--text);
  height: var(--input-h);
  padding: 0 .75rem;
}

textarea{
  min-height: calc(var(--input-h) * 2.5);
  padding: .75rem;
}

.input:focus,
.select:focus,
textarea:focus{
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(90, 160, 255, .12);
}

::placeholder{
  color: #8a8a8a;
}

.table{
  width: 100%;
  border-collapse: collapse;
  color: var(--text);
}

.table th,
.table td{
  padding: .75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.table th{
  color: #d8d8d8;
}

.layout{
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

.sidebar{
  background: #2b2b2b;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.brand{
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--muted);
}

.sidebar-nav{
  padding: .5rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.nav-link{
  padding: .625rem .75rem;
  border-radius: var(--radius);
  color: var(--muted);
}

.nav-link:hover,
.nav-link.active{
  background: #3a3a3a;
  color: var(--text);
}

.content{
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: #262626;
  position: sticky;
  top: 0;
  z-index: 10;
}

.main{
  flex: 1;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.footer{
  margin-top: auto;
  padding: .75rem 1rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .9rem;
}

.breadcrumbs{
  display: flex;
  gap: .5rem;
  color: var(--muted);
  font-size: .9rem;
}

.status{
  display: inline-flex;
  align-items: center;
  padding: .125rem .5rem;
  border-radius: 999px;
  background: #3a3a3a;
  border: 1px solid #4a4a4a;
}

.stack{
  display: grid;
  gap: 1rem;
}

@media (max-width: 1024px){
  .layout{
    grid-template-columns: 64px 1fr;
  }
  .nav-text{
    display: none;
  }
}

@media (max-width: 900px){
  .main{
    grid-template-columns: 1fr;
  }
  .grid{
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px){
  :root{
    --sidebar-w: 260px;
  }
  .layout{
    grid-template-columns: 1fr;
  }
  .sidebar{
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-w);
    transform: translateX(-100%);
    transition: transform .2s ease;
  }
  .sidebar[data-open="true"]{
    transform: translateX(0);
  }
  .top-nav-inner{
    flex-direction: column;
    align-items: flex-start;
    height: auto;
    padding: .75rem 0;
  }
  .top-nav-links{
    width: 100%;
    gap: .75rem;
  }
}
