/* ===============================
   APP LAYOUT
================================ */
body{
  display:flex;
  background: var(--bg);
  color: var(--text);
}

.main-content{
  flex:1;
  display:flex;
  flex-direction:column;
  min-width:0;
}

/* HEADER */
header{
  background: var(--surface);
  padding:15px 20px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  z-index:997;
  border-bottom:1px solid var(--border);
  gap:12px;
}

header .user-info{
  margin-right:1rem;
  font-weight:700;
}

header .header-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

header .header-actions > button,
header .header-actions > a{
  display:inline-flex;
  max-width:max-content !important;
}

header .header-toggle{
  display:none;
}

/* MAIN */
main{
  margin-left: clamp(260px, 18vw, 340px);
  padding:20px;
  flex:1;
  min-width:0;
}

.main-container{
  width:100%;
  max-width:1200px;
  display:flex;
  flex-direction:column;
  gap:24px;
}

.main-row{
  display:flex;
  flex-wrap:wrap;
  gap:20px;
  min-width:0;
}

/* generic page wrapper */
.page{
  display:flex;
  flex-direction:column;
  gap:14px;
  min-width:0;
}

/* section head */
.section-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.section-head h2{
  margin:0;
}

.section-head-sub{
  font-size:.92rem;
  color: var(--muted);
}

/* header shortcuts / notifications */
.header-support-link,
.header-msg-link{
  position:relative;
}

.header-msg-link{
  padding:10px 12px;
  border-radius:12px;
}

.header-msg-link i{
  font-size:16px;
}

.hdr-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:22px;
  height:22px;
  padding:0 7px;
  border-radius:999px;
  font-weight:800;
  font-size:12px;
  border:1px solid var(--border);
  background: color-mix(in srgb, var(--warning) 22%, var(--surface) 78%);
  color: var(--text);
}

.header-msg-link .hdr-badge{
  position:absolute;
  top:-6px;
  right:-6px;
  min-width:22px;
  height:22px;
}

@media (max-width:920px){
  header .header-toggle{
    display:inline-flex;
  }
  
  header .user-info {
  	display: none;
  }

  main{
    margin-left:0;
  }
}

@media (min-width:2000px){
  main{
    margin:auto;
  }

  .main-page{
    width:1400px !important;
  }
}