:root{
  --ink:#2f3835;
  --muted:#727b76;
  --paper:#f7f4ee;
  --paper-soft:#fbfaf7;
  --sage:#75836f;
  --sage-dark:#53614f;
  --sage-deep:#3f5042;
  --sage-wash:rgba(117,131,111,.11);
  --danger:#92534c;
  --line:rgba(47,56,53,.12);
  --shadow:0 8px 28px rgba(55,63,54,.07);
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;background:#f5f6f2;color:var(--ink);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
body:before{content:"";position:fixed;inset:0;pointer-events:none;background-image:radial-gradient(rgba(47,52,47,.03) .7px,transparent .7px);background-size:15px 15px;opacity:.18}
.admin-page{min-height:100vh;position:relative;z-index:1}
.studio-rail{
  min-height:104px;padding:20px 34px;border-bottom:1px solid var(--line);
  background:rgba(248,246,241,.98);display:flex;align-items:center;gap:24px;
}
.studio-brand{display:flex;align-items:center;gap:14px;text-decoration:none;color:var(--ink);min-width:0}
.studio-brand img{width:52px;height:52px;border-radius:16px;box-shadow:0 6px 18px rgba(55,63,54,.08)}
.studio-brand span{display:flex;flex-direction:column;line-height:1.06;min-width:0}
.studio-brand strong{font:500 clamp(24px,2.2vw,34px) Georgia,"Times New Roman",serif;color:#6a7480;white-space:nowrap}
.studio-brand small{margin-top:6px;color:#5f665f;font-size:13px;letter-spacing:.11em;text-transform:uppercase;white-space:nowrap}
.view-student{
  margin-left:auto;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;
  color:var(--sage-deep);font-weight:760;font-size:13px;padding:11px 14px;
  border:1px solid rgba(83,97,79,.16);border-radius:12px;background:#fff;
  box-shadow:0 4px 16px rgba(55,63,54,.04);transition:.16s ease;white-space:nowrap
}
.view-student:hover{transform:translateY(-1px);background:#fbfbf8}
.cms-workspace{min-width:0;min-height:calc(100vh - 104px)}
#nc-root{min-height:calc(100vh - 104px);background:#f7f8f5}

/* Decap keeps all functionality. We only restyle elements tagged by admin-polish.js. */
#nc-root *{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
#nc-root h1,#nc-root h2,#nc-root h3,#nc-root [class*="Heading"]{font-family:Georgia,"Times New Roman",serif!important;letter-spacing:-.025em;color:#2d3838}
#nc-root button,#nc-root [role="button"]{border-radius:11px!important}
#nc-root input,#nc-root textarea,#nc-root select{border-radius:11px!important}
#nc-root [class*="Sidebar"]{background:#faf8f3!important}
#nc-root [class*="Card"]{border-radius:16px!important}
#nc-root [class*="ControlPane"]{background:#fbfaf7!important}

/* One native Decap navigation bar, compact and in-family. */
#nc-root [data-gb-toolbar="library"],
#nc-root [data-gb-toolbar="editor"]{
  background:#fbfaf7!important;
  color:var(--ink)!important;
  border-bottom:1px solid var(--line)!important;
  box-shadow:0 4px 16px rgba(47,56,53,.05)!important;
  min-height:68px!important;
  height:auto!important;
  padding-top:8px!important;
  padding-bottom:8px!important;
}
#nc-root [data-gb-toolbar] *{text-shadow:none!important}

/* Native navigation controls. */
#nc-root [data-gb-nav="classes"],
#nc-root [data-gb-nav="media"],
#nc-root [data-gb-action="account"]{
  color:var(--sage-deep)!important;
  background:transparent!important;
  border:1px solid transparent!important;
  min-height:40px!important;
  padding:8px 12px!important;
  font-weight:760!important;
  box-shadow:none!important;
}
#nc-root [data-gb-nav="classes"]:hover,
#nc-root [data-gb-nav="media"]:hover,
#nc-root [data-gb-action="account"]:hover{
  background:var(--sage-wash)!important;
  border-color:rgba(83,97,79,.08)!important;
}
#nc-root [data-gb-nav="classes"][aria-current="page"],
#nc-root [data-gb-nav="classes"][aria-selected="true"],
#nc-root [data-gb-nav="media"][aria-current="page"],
#nc-root [data-gb-nav="media"][aria-selected="true"]{
  background:var(--sage-wash)!important;
}

/* Live status: use Decap's existing status element, just quiet it down. */
#nc-root [data-gb-status="live"]{
  color:#5e7963!important;
  font-size:12px!important;
  font-weight:820!important;
  letter-spacing:.04em!important;
  text-transform:uppercase!important;
}
#nc-root [data-gb-status="live"] *{color:#5e7963!important;fill:#5e7963!important}

/* We do not need Decap's raw domain label or Quick add: + Class already exists in the page. */
#nc-root [data-gb-hide="true"]{display:none!important}

/* Main create-class button in the collection screen. */
#nc-root [data-gb-action="create"]{
  background:var(--sage-deep)!important;
  border-color:var(--sage-deep)!important;
  color:#fff!important;
  box-shadow:0 4px 14px rgba(63,80,66,.16)!important;
  font-weight:820!important;
  min-height:44px!important;
  padding-inline:18px!important;
}
#nc-root [data-gb-action="create"] *,#nc-root [data-gb-action="create"] svg{color:#fff!important;fill:#fff!important}
#nc-root [data-gb-action="create"]:hover{background:#344438!important;transform:translateY(-1px)}

/* Editor toolbar. */
#nc-root [data-gb-title="editing"]{
  color:var(--ink)!important;
  font-family:Georgia,"Times New Roman",serif!important;
  font-size:18px!important;
  line-height:1.2!important;
  font-weight:600!important;
}
#nc-root [data-gb-action="published"]{
  color:var(--sage-deep)!important;
  background:var(--sage-wash)!important;
  border:1px solid rgba(83,97,79,.12)!important;
  padding:8px 13px!important;
  font-weight:760!important;
}
#nc-root [data-gb-action="published"] *{color:var(--sage-deep)!important;fill:var(--sage-deep)!important}
#nc-root [data-gb-action="delete"]{color:var(--danger)!important;font-weight:720!important;background:transparent!important}
#nc-root [data-gb-action="delete"] *{color:var(--danger)!important;fill:var(--danger)!important}
#nc-root [data-gb-status="saved"]{
  color:#5e7963!important;
  font-size:11px!important;
  font-weight:850!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
}

/* Collection page cleanup. */
#nc-root [data-gb-collection="classes"],#nc-root [data-gb-collection="classes"] *{color:var(--sage-deep)!important}
#nc-root [data-gb-class-row="true"]{border-radius:16px!important;box-shadow:0 4px 14px rgba(47,56,53,.05)!important}

@media(max-width:760px){
  .studio-rail{min-height:82px;padding:14px 16px}
  .studio-brand img{width:44px;height:44px;border-radius:14px}
  .studio-brand strong{font-size:21px}.studio-brand small{font-size:10px}
  .view-student{font-size:0;width:42px;height:42px;padding:0}.view-student:after{content:"↗";font-size:18px}
  #nc-root{min-height:calc(100vh - 82px)}
  #nc-root [data-gb-toolbar="library"],#nc-root [data-gb-toolbar="editor"]{min-height:58px!important;padding-top:5px!important;padding-bottom:5px!important}
  #nc-root [data-gb-nav="classes"],#nc-root [data-gb-nav="media"]{padding-inline:9px!important;font-size:13px!important}
  #nc-root [data-gb-status="live"]{display:none!important}
}
