:root{
  --bg:#fafaf8;
  --surface:#ffffff;
  --soft:#f3f3f0;
  --border:#e7e5df;
  --text:#171717;
  --muted:#6f6f68;
  --dark:#111111;
  --green:#16a34a;
  --radius:16px;
}

*{box-sizing:border-box}

body{
  margin:0;
  font-family:Inter, Arial, sans-serif;
  background:var(--bg);
  color:var(--text);
}

button,input,textarea{
  font:inherit;
}

.top-header{
  height:72px;
  border-bottom:1px solid var(--border);
  background:rgba(250,250,248,.9);
  backdrop-filter:blur(16px);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 28px;
  position:sticky;
  top:0;
  z-index:20;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
}

.brand span{
  display:block;
  font-size:12px;
  color:var(--muted);
  margin-top:2px;
}

.logo-box{
  width:38px;
  height:38px;
  border-radius:12px;
  background:var(--dark);
  color:white;
  display:grid;
  place-items:center;
  font-weight:700;
}

.header-actions{
  display:flex;
  align-items:center;
  gap:12px;
}

.mumu-btn,.user-btn,.primary-btn,.dark-btn{
  border:1px solid var(--border);
  background:white;
  border-radius:999px;
  height:40px;
  padding:0 16px;
  cursor:pointer;
}

.mumu-btn{
  background:#eef7ef;
  border-color:#cae8ce;
}

.user-btn{

    display:flex;
    align-items:center;
    justify-content:center;

    gap:10px;

    height:44px;

    padding:0 14px;

    background:#fff;

    border:1px solid var(--border);

    border-radius:999px;

    cursor:pointer;

}

.avatar{
  width:28px;
  height:28px;
  border-radius:50%;
  background:#111;
  color:#fff;
  display:grid;
  place-items:center;
  font-size:13px;
}

.dark-btn{
  background:#111;
  color:#fff;
  border-color:#111;
}

.primary-btn{
  background:white;
}

.user-menu-wrap{
  position:relative;
  display:flex;
  align-items:center;
}

.user-menu{
    position:absolute;
    top:100%;
    right:0;
    margin-top:8px;

    width:230px;

    background:#fff;
    border:1px solid var(--border);
    border-radius:16px;

    box-shadow:0 20px 50px rgba(0,0,0,.08);

    padding:8px;

    display:none;
    z-index:999;
}

.user-menu.open{
    display:block;
}

.user-menu.open{
  display:block;
}

.user-menu button{
  width:100%;
  border:0;
  background:transparent;
  padding:10px 12px;
  text-align:left;
  border-radius:10px;
  cursor:pointer;
}

.user-menu button:hover{
  background:var(--soft);
}

.layout{
  display:flex;
  min-height:calc(100vh - 72px);
}

.sidebar{
  width:240px;
  border-right:1px solid var(--border);
  padding:22px 14px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}

.nav-item{
  width:100%;
  border:0;
  background:transparent;
  text-align:left;
  padding:11px 14px;
  border-radius:12px;
  color:#333;
  cursor:pointer;
  margin-bottom:4px;
}

.nav-item:hover,.nav-item.active{
  background:var(--soft);
}

.sidebar-status{
  font-size:12px;
  color:var(--muted);
  display:flex;
  align-items:center;
  gap:8px;
  padding:12px;
}

.dot{
  width:8px;
  height:8px;
  background:var(--green);
  border-radius:50%;
}

.main-content{
  flex:1;
  padding:34px;
  max-width:1200px;
}

.page{
  display:none;
  animation:fade .2s ease;
}

.page.active{
  display:block;
}

@keyframes fade{
  from{opacity:0;transform:translateY(6px)}
  to{opacity:1;transform:none}
}

.page-header{
  display:flex;
  justify-content:space-between;
  gap:20px;
  margin-bottom:24px;
}

.page-header h1{
  margin:6px 0 6px;
  font-size:34px;
  letter-spacing:-.03em;
}

.page-header p{
  margin:0;
  color:var(--muted);
}

.eyebrow{
  text-transform:uppercase;
  font-size:12px;
  letter-spacing:.08em;
  color:var(--muted);
  margin:0;
}

.focus-card{
  background:white;
  border:1px solid var(--border);
  border-radius:24px;
  padding:28px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:20px;
}

.focus-card h2{
  margin:6px 0;
  font-size:26px;
  letter-spacing:-.03em;
}

.focus-card p{
  color:var(--muted);
  margin:0;
}

.grid-4{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:14px;
  margin-bottom:20px;
}

.metric-card,.panel{
  background:white;
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:20px;
}

.metric-card span{
  color:var(--muted);
  font-size:13px;
}

.metric-card strong{
  display:block;
  font-size:32px;
  margin:8px 0;
}

.metric-card p,.muted{
  color:var(--muted);
  margin:0;
  font-size:14px;
}

.section-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
  margin-bottom:20px;
}

.panel h3{
  margin-top:0;
}

.empty-state{
  color:var(--muted);
  background:#fafafa;
  border:1px dashed var(--border);
  padding:18px;
  border-radius:14px;
}

.form-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}

label{
  display:block;
  font-size:13px;
  color:#444;
  margin-bottom:14px;
}

input,textarea{
  width:100%;
  border:1px solid var(--border);
  border-radius:12px;
  padding:12px;
  margin-top:7px;
  background:white;
}

textarea{
  min-height:150px;
  resize:vertical;
}

.upload-box{
  border:1px dashed var(--border);
  border-radius:16px;
  padding:18px;
  background:#fafafa;
}

.upload-box span{
  display:block;
  color:var(--muted);
  font-size:13px;
  margin-top:6px;
}

.mumu-panel{
  position:fixed;
  top:0;
  right:-420px;
  width:400px;
  max-width:92vw;
  height:100vh;
  background:white;
  border-left:1px solid var(--border);
  box-shadow:-20px 0 60px rgba(0,0,0,.08);
  z-index:50;
  transition:.25s ease;
  display:flex;
  flex-direction:column;
}

.mumu-panel.open{
  right:0;
}

.mumu-header{
  height:72px;
  border-bottom:1px solid var(--border);
  display:flex;
  align-items:center;
  gap:16px;
  padding:0 18px;
}

.mumu-header button{
  border:0;
  background:transparent;
  cursor:pointer;
}

.mumu-header span{
  display:block;
  color:var(--muted);
  font-size:12px;
}

.mumu-body{
  flex:1;
  padding:18px;
  overflow:auto;
}

.mumu-message{
  background:var(--soft);
  border-radius:16px;
  padding:14px;
  color:#333;
}

.mumu-input{
  border-top:1px solid var(--border);
  padding:12px;
  display:flex;
  gap:8px;
}

.mumu-input input[type="text"]{
  margin:0;
}

.mumu-input button{
  border:1px solid var(--border);
  background:white;
  border-radius:10px;
  padding:0 12px;
  cursor:pointer;
}

@media(max-width:850px){
  .layout{display:block}
  .sidebar{
    width:100%;
    border-right:0;
    border-bottom:1px solid var(--border);
  }
  .sidebar nav{
    display:flex;
    gap:6px;
    overflow:auto;
  }
  .nav-item{
    white-space:nowrap;
  }
  .grid-4,.section-grid,.form-grid{
    grid-template-columns:1fr;
  }
  .main-content{
    padding:22px;
  }
}