@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;700&display=swap');

:root{
  --bg:#edf1f5;
  --card:rgba(255,255,255,.94);
  --card-strong:#ffffff;
  --text:#0c1412;
  --muted:rgba(12,20,18,.72);
  --border:rgba(15,23,32,.08);
  --shadow:0 18px 48px rgba(15,23,32,.08);
  --shadow-soft:0 10px 24px rgba(15,23,32,.05);
  --radius:24px;
  --green:#1f7a57;
  --green-strong:#0f5a3d;
  --gold:#c88c3a;
  --surface:#f7f8fb;
  --danger:#c44732;
  --danger-strong:#9f3525;
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
[hidden]{ display:none !important; }
body{
  margin:0;
  min-height:100vh;
  font-family:'IBM Plex Sans', sans-serif;
  color:var(--text);
  background:
    radial-gradient(circle at top left, rgba(31,122,87,.08), transparent 34%),
    radial-gradient(circle at top right, rgba(200,140,58,.1), transparent 28%),
    linear-gradient(180deg, #eef3f8 0%, #f5f3ed 100%);
}

a{ color:inherit; text-decoration:none; }
button, input, select, textarea{ font:inherit; }

input, select, textarea, button{
  -webkit-appearance:none;
}

.bg-orb{
  position:fixed;
  border-radius:999px;
  filter:blur(36px);
  opacity:.55;
  pointer-events:none;
  z-index:0;
}

.bg-orb--one{
  width:260px;
  height:260px;
  background:rgba(31,122,87,.12);
  top:12px;
  left:-90px;
}

.bg-orb--two{
  width:220px;
  height:220px;
  background:rgba(200,140,58,.14);
  top:100px;
  right:-70px;
}

.app-shell{
  position:relative;
  z-index:1;
  width:min(1240px, calc(100vw - 24px));
  margin:0 auto;
  padding:18px 0 28px;
}

.top-strip{
  position:sticky;
  top:14px;
  z-index:8;
  display:grid;
  grid-template-columns:auto minmax(0, 1fr) auto;
  align-items:center;
  gap:12px;
  padding:10px 12px;
  margin:0 0 16px;
  border-radius:26px;
  background:rgba(255,255,255,.76);
  backdrop-filter:blur(18px);
  border:1px solid rgba(15,23,32,.08);
  box-shadow:var(--shadow-soft);
}

.brand-link{
  display:flex;
  align-items:center;
}

.brand-mark{
  width:56px;
  height:56px;
  border-radius:18px;
  display:grid;
  place-items:center;
  font:700 .95rem/1 'Space Grotesk', sans-serif;
  letter-spacing:.14em;
  color:#fff;
  background:linear-gradient(145deg, #10231f, #28443d);
  border:1px solid rgba(16,35,31,.08);
  box-shadow:0 14px 32px rgba(16,35,31,.16);
}

.brand-mark--compact{
  width:52px;
  height:52px;
  border-radius:16px;
  flex:none;
}

.header-copy{
  min-width:0;
}

.eyebrow,
.panel-kicker{
  margin:2px 0 4px;
  color:rgba(12,20,18,.58);
  text-transform:uppercase;
  letter-spacing:.14em;
  font-size:.72rem;
  font-weight:700;
}

.title{
  font:700 1.15rem/1.1 'Space Grotesk', sans-serif;
}

.panel-copy,
.muted{
  color:var(--muted);
  font-size:.92rem;
}

.quick-actions{
  display:flex;
  align-items:center;
  gap:8px;
}

.icon-btn{
  width:46px;
  height:46px;
  border:none;
  border-radius:16px;
  display:grid;
  place-items:center;
  cursor:pointer;
  color:#173128;
  background:rgba(16,35,31,.06);
  border:1px solid rgba(15,23,32,.08);
  box-shadow:var(--shadow-soft);
  transition:transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}

.icon-btn:hover{
  transform:translateY(-1px);
  background:rgba(16,35,31,.1);
}

.icon-btn--login{
  background:linear-gradient(145deg, rgba(255,255,255,.95), rgba(244,247,249,.92));
}

.icon-btn--soft{
  width:40px;
  height:40px;
  border-radius:14px;
  box-shadow:none;
}

.icon-btn__glyph{
  position:relative;
  display:block;
  width:18px;
  height:18px;
  color:currentColor;
}

.icon-btn--login .icon-btn__glyph::before{
  content:"";
  position:absolute;
  left:50%;
  top:1px;
  width:8px;
  height:8px;
  border-radius:999px;
  background:currentColor;
  transform:translateX(-50%);
}

.icon-btn--login .icon-btn__glyph::after{
  content:"";
  position:absolute;
  left:50%;
  bottom:1px;
  width:15px;
  height:9px;
  border-radius:10px 10px 7px 7px;
  border:2px solid currentColor;
  border-top:none;
  transform:translateX(-50%);
}

.icon-btn--menu .icon-btn__glyph,
.icon-btn__glyph--menu{
  width:18px;
  height:14px;
}

.icon-btn__glyph--menu::before,
.icon-btn__glyph--menu::after{
  content:"";
  position:absolute;
  left:0;
  width:18px;
  height:2px;
  border-radius:999px;
  background:currentColor;
  box-shadow:0 6px 0 currentColor;
}

.icon-btn__glyph--menu::before{
  top:0;
}

.icon-btn__glyph--menu::after{
  top:12px;
  width:11px;
  box-shadow:none;
}

.workspace{
  display:grid;
  gap:18px;
}

.content{
  display:flex;
  flex-direction:column;
  gap:16px;
}

.btn2,
.btn,
.btnPrimary,
.btnDanger{
  appearance:none;
  border:1px solid rgba(15,23,32,.08);
  border-radius:999px;
  padding:11px 14px;
  font:700 .95rem/1 'IBM Plex Sans', sans-serif;
  cursor:pointer;
  background:#fff;
  color:var(--text);
  transition:transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.btn2:hover,
.btn:hover,
.btnPrimary:hover,
.btnDanger:hover{
  transform:translateY(-1px);
}

.btn{
  background:#fff;
  box-shadow:0 8px 22px rgba(15,23,32,.06);
}

.btn2{
  background:var(--surface);
}

.btnPrimary{
  background:linear-gradient(135deg, var(--green), var(--green-strong));
  border-color:rgba(255,255,255,.12);
  color:#fff;
  box-shadow:0 14px 28px rgba(31,122,87,.2);
}

.btnDanger{
  background:linear-gradient(135deg, var(--danger), var(--danger-strong));
  color:#fff;
  border-color:rgba(159,53,37,.22);
  box-shadow:0 14px 28px rgba(196,71,50,.18);
}

.btn--ghost{
  background:#fff;
  border:1px solid rgba(15,23,32,.08);
  color:var(--text);
  box-shadow:var(--shadow-soft);
}

.btn--wide{
  width:100%;
  text-align:center;
}

.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:28px;
  box-shadow:var(--shadow);
  padding:22px;
}

.h1{
  font:700 clamp(1.4rem, 3vw, 2rem)/1.05 'Space Grotesk', sans-serif;
  margin:0 0 6px;
}

.h2{
  font:700 1rem/1.1 'Space Grotesk', sans-serif;
  margin:14px 0 8px;
}

label{
  display:block;
  margin-top:10px;
  margin-bottom:6px;
  color:var(--muted);
  font-size:.82rem;
  font-weight:700;
}

input,
select,
textarea{
  width:100%;
  border-radius:16px;
  border:1px solid var(--border);
  background:#fff;
  color:var(--text);
  font-size:16px;
  padding:13px 14px;
}

.row{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
}

.rowRight{
  display:flex;
  gap:10px;
  align-items:center;
}

.grid2{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:14px;
  margin-top:10px;
}

.toggleRow{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin:10px 0 8px;
  padding:10px 12px;
  border:1px solid rgba(16,35,31,.08);
  border-radius:18px;
  background:rgba(16,35,31,.03);
}

label.check{
  margin:0;
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--text);
  font-size:.9rem;
  font-weight:700;
}

label.check input{
  width:20px;
  height:20px;
  flex:none;
  margin:0;
  appearance:none;
  border:1.5px solid rgba(16,35,31,.24);
  border-radius:6px;
  background:#fff;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.22);
  transition:border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
  cursor:pointer;
}

label.check input:hover{
  border-color:rgba(31,122,87,.42);
}

label.check input:checked{
  background:var(--green);
  border-color:var(--green);
  box-shadow:0 0 0 3px rgba(31,122,87,.14);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath fill='none' stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.2' d='M3 7.4 5.6 10 11 4.6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:center;
  background-size:13px 13px;
}

label.check input:disabled{
  cursor:not-allowed;
  opacity:.6;
}

.list{
  display:grid;
  gap:12px;
  margin-top:10px;
}

.item{
  padding:14px 16px;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  border:1px solid var(--border);
  border-radius:18px;
  background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(245,242,235,.96));
}

.item:hover{ background:#fff; }
.item .main{ font-weight:700; }
.item .sub{ font-size:.88rem; color:var(--muted); margin-top:3px; }

.selectableItem{
  cursor:pointer;
}

.itemCheck{
  flex:0 0 auto;
  margin-top:2px !important;
}

.itemBody{
  flex:1 1 auto;
  min-width:0;
}

.bulkBar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:12px 0;
  padding:10px 12px;
  border:1px solid rgba(15,23,32,.08);
  border-radius:18px;
  background:rgba(255,255,255,.72);
}

.bulkPanel{
  margin:0 0 12px;
  padding:14px;
  border:1px solid rgba(15,23,32,.08);
  border-radius:20px;
  background:rgba(247,248,251,.84);
}

.emptyList{
  padding:16px;
  border:1px dashed rgba(15,23,32,.16);
  border-radius:18px;
  color:var(--muted);
  background:rgba(255,255,255,.66);
}

.config-tabs{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  padding:8px;
  margin:18px 0;
  border-radius:22px;
  background:rgba(244,246,249,.92);
  border:1px solid rgba(15,23,32,.06);
}

.config-tab{
  border:none;
  border-radius:999px;
  padding:12px 16px;
  background:transparent;
  color:rgba(12,20,18,.74);
  font:700 .92rem/1 'IBM Plex Sans', sans-serif;
  cursor:pointer;
}

.config-tab.active{
  background:#fff;
  color:var(--text);
  box-shadow:0 10px 22px rgba(15,23,32,.07);
}

.config-view{
  display:none;
  gap:16px;
}

.config-view.active{
  display:grid;
}

.config-hero{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding:4px 2px 2px;
}

.config-form-card,
.config-list-card{
  padding:18px;
  border-radius:24px;
  background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,247,243,.96));
  border:1px solid rgba(15,23,32,.06);
  box-shadow:0 10px 26px rgba(15,23,32,.05);
}

.impactCard{
  margin-top:16px;
  padding-top:16px;
  border-top:1px solid rgba(15,23,32,.08);
}

.impactList{
  max-height:280px;
  overflow:auto;
  margin-top:10px;
}

.stack{
  display:flex;
  flex-direction:column;
  gap:4px;
}

.pillRow{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:6px;
}

.pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  font-size:.78rem;
  font-weight:700;
  background:rgba(16,35,31,.07);
  color:#10231f;
}

.pill.ok{
  background:rgba(31,122,87,.14);
  color:var(--green-strong);
}

.pill.warn{
  background:rgba(200,140,58,.16);
  color:#8f5d1d;
}

.pill.muted{
  background:rgba(16,35,31,.06);
  color:var(--muted);
}

.groupTitle{
  margin:10px 8px 4px;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.14em;
  font-size:.72rem;
  font-weight:700;
}

.menu-group + .menu-group{
  margin-top:8px;
}

.drawer-backdrop{
  position:fixed;
  inset:0;
  background:rgba(12,20,18,.18);
  backdrop-filter:blur(3px);
  z-index:30;
  opacity:0;
  pointer-events:none;
  transition:opacity .22s ease;
}

.summary-drawer{
  position:fixed;
  top:14px;
  right:14px;
  z-index:31;
  width:min(360px, calc(100vw - 28px));
  max-height:calc(100vh - 28px);
  overflow:auto;
  padding:18px;
  background:rgba(255,255,255,.96);
  border:1px solid var(--border);
  border-radius:28px;
  box-shadow:-24px 20px 60px rgba(15,23,32,.14);
  transform:translateX(calc(100% + 26px));
  opacity:0;
  pointer-events:none;
  transition:transform .24s ease, opacity .2s ease;
}

.summary-drawer__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:12px;
}

.summary-drawer__head h2{
  margin:0;
  font:700 1.35rem/1.1 'Space Grotesk', sans-serif;
}

.menu-link{
  display:flex;
  align-items:center;
  width:100%;
  border:none;
  border-radius:18px;
  padding:13px 15px;
  background:rgba(16,35,31,.045);
  border:1px solid rgba(15,23,32,.06);
  color:#173128;
  font-weight:700;
  cursor:pointer;
  transition:background .18s ease, transform .18s ease;
}

.menu-link:hover{
  background:rgba(16,35,31,.08);
  transform:translateY(-1px);
}

.nav.active{
  background:#10231f;
  color:#fff;
  box-shadow:0 10px 24px rgba(16,35,31,.15);
}

.summary-drawer__footer{
  display:grid;
  gap:10px;
  margin-top:18px;
  padding-top:16px;
  border-top:1px solid rgba(15,23,32,.08);
}

.toast{
  position:fixed;
  bottom:18px;
  left:50%;
  transform:translateX(-50%);
  background:#10231f;
  color:#fff;
  padding:14px 16px;
  border-radius:999px;
  display:none;
  box-shadow:0 18px 40px rgba(4,12,10,.22);
  z-index:40;
}

body.admin-menu-open{
  overflow:hidden;
}

body.admin-menu-open .drawer-backdrop{
  opacity:1;
  pointer-events:auto;
}

body.admin-menu-open .summary-drawer{
  transform:translateX(0);
  opacity:1;
  pointer-events:auto;
}

@media (max-width: 980px){
  .grid2{
    grid-template-columns:1fr;
  }

  .row{
    flex-direction:column;
    align-items:stretch;
  }

  .rowRight{
    width:100%;
    justify-content:flex-start;
    flex-wrap:wrap;
  }
}

@media (max-width: 640px){
  .app-shell{
    width:min(100vw - 16px, 1240px);
    padding:8px 0 20px;
  }

  .top-strip{
    top:8px;
    grid-template-columns:auto 1fr auto;
    padding:8px 10px;
    border-radius:22px;
  }

  .brand-mark--compact{
    width:44px;
    height:44px;
    border-radius:14px;
    font-size:.78rem;
  }

  .title{
    font-size:1rem;
  }

  .panel-copy,
  .muted{
    font-size:.86rem;
  }

  .icon-btn{
    width:42px;
    height:42px;
    border-radius:14px;
  }

  .card{
    padding:18px;
    border-radius:24px;
  }

  .summary-drawer{
    top:8px;
    right:8px;
    width:calc(100vw - 16px);
    max-height:calc(100vh - 16px);
    border-radius:24px;
    padding:16px;
  }
}

body[data-device="mobile"] .app-shell{
  width:min(100vw - 16px, 1240px);
  padding:8px 0 20px;
}

body[data-device="mobile"] .top-strip{
  top:8px;
  grid-template-columns:auto minmax(0, 1fr) auto;
  gap:10px;
  padding:8px 10px;
}

body[data-device="mobile"] .brand-mark--compact{
  width:44px;
  height:44px;
  border-radius:14px;
  font-size:.78rem;
}

body[data-device="mobile"] .quick-actions{
  gap:6px;
}

body[data-device="mobile"] .grid2{
  grid-template-columns:1fr;
}

body[data-device="mobile"] .row{
  flex-direction:column;
  align-items:stretch;
  gap:10px;
}

body[data-device="mobile"] .rowRight{
  width:100%;
  justify-content:flex-start;
  flex-wrap:wrap;
}

body[data-device="mobile"] .btn2,
body[data-device="mobile"] .btn,
body[data-device="mobile"] .btnPrimary,
body[data-device="mobile"] .btnDanger{
  width:100%;
  justify-content:center;
}

body[data-device="mobile"] .card{
  padding:16px;
  border-radius:22px;
}

body[data-device="mobile"] .item{
  flex-direction:column;
  align-items:flex-start;
}

body[data-device="mobile"] .selectableItem{
  display:grid;
  grid-template-columns:auto minmax(0, 1fr);
}

body[data-device="mobile"] .selectableItem > .sub{
  grid-column:2;
}

body[data-device="mobile"] .bulkBar{
  flex-direction:column;
  align-items:flex-start;
}

body[data-device="mobile"] .config-tabs{
  flex-wrap:nowrap;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
  padding:6px;
  margin:14px 0;
}

body[data-device="mobile"] .config-tabs::-webkit-scrollbar{
  display:none;
}

body[data-device="mobile"] .config-tab{
  flex:0 0 auto;
  min-width:max-content;
  padding:11px 14px;
}

body[data-device="mobile"] .config-hero{
  flex-direction:column;
  gap:10px;
}

body[data-device="mobile"] .config-form-card,
body[data-device="mobile"] .config-list-card{
  padding:16px;
}

body[data-device="mobile"] .pillRow{
  gap:6px;
}

body[data-device="mobile"] .summary-drawer{
  top:8px;
  right:8px;
  width:calc(100vw - 16px);
  max-height:calc(100vh - 16px);
  border-radius:24px;
  padding:16px;
}
