
:root{
  --green-950:#08251b;
  --green-900:#0b3b2b;
  --green-800:#0f513b;
  --green-700:#176b4c;
  --green-600:#21865f;
  --green-500:#2f9a70;
  --green-100:#e8f5ef;
  --green-50:#f1faf6;
  --ink:#17231e;
  --muted:#708078;
  --bg:#f4f7f5;
  --card:#ffffff;
  --line:#e4ebe7;
  --danger:#c74655;
  --warning:#a86d00;
  --info:#2865b5;
  --shadow:0 8px 26px rgba(8,37,27,.055);
  --shadow-lg:0 18px 42px rgba(8,37,27,.10);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  font-size:14px;
  line-height:1.55;
}
a{text-decoration:none;color:inherit}
button,input,select,textarea{font:inherit}
button{cursor:pointer}

/* Shell */
.app-shell{min-height:100vh;display:flex}
.sidebar{
  position:fixed;inset:0 auto 0 0;z-index:50;
  width:258px;
  padding:18px 13px;
  display:flex;flex-direction:column;
  color:#fff;
  background:
    radial-gradient(circle at 10% 0%,rgba(47,154,112,.20),transparent 27%),
    linear-gradient(180deg,#09291f 0%,#061e17 100%);
  box-shadow:8px 0 28px rgba(8,37,27,.10);
}
.brand{display:flex;align-items:center;gap:11px;padding:7px 10px 25px}
.brand-mark{
  width:43px;height:43px;border-radius:13px;
  display:grid;place-items:center;
  background:linear-gradient(135deg,#35a879,#176b4c);
  font-weight:900;font-size:21px;
  box-shadow:0 10px 24px rgba(47,154,112,.28)
}
.brand strong{font-size:16px;letter-spacing:-.02em}
.brand small{display:block;color:#9db5aa;font-size:10.5px}
.sidebar nav{display:grid;gap:4px}
.sidebar nav a,.sidebar-bottom a{
  display:flex;align-items:center;min-height:43px;
  padding:10px 12px;border-radius:10px;
  color:#b7ccc2;font-size:13.5px;font-weight:650;
  transition:.18s ease;
}
.sidebar nav a:hover,.sidebar-bottom a:hover{
  color:#fff;background:rgba(255,255,255,.075);transform:translateX(2px)
}
.sidebar-bottom{margin-top:auto;border-top:1px solid rgba(255,255,255,.09);padding-top:12px}
.main{width:calc(100% - 258px);margin-left:258px;padding:28px 32px 50px}
.topbar{
  min-height:63px;margin-bottom:25px;
  display:flex;align-items:center;justify-content:space-between;gap:20px
}
.eyebrow{font-size:10px;font-weight:900;letter-spacing:.18em;color:var(--green-700)}
.topbar h1{margin:4px 0 0;font-size:28px;line-height:1.1;letter-spacing:-.04em}
.user-pill{
  padding:9px 14px;border:1px solid var(--line);border-radius:999px;
  background:#fff;box-shadow:0 4px 14px rgba(8,37,27,.035);
  color:#52635b;font-size:12px;font-weight:750
}

/* Layout */
.grid{display:grid;gap:18px}
.grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.section{margin-top:22px}
.section-head{
  display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:14px
}
.section-head h2,.card h2{margin:0;font-size:16px;letter-spacing:-.02em}
.card{
  background:var(--card);border:1px solid var(--line);border-radius:17px;
  padding:21px;box-shadow:var(--shadow)
}
.card:hover{box-shadow:var(--shadow-lg)}
.metric{
  min-height:128px;position:relative;overflow:hidden
}
.metric:before{
  content:"";position:absolute;right:-35px;bottom:-45px;width:125px;height:125px;
  border-radius:50%;background:var(--green-100)
}
.metric .label{
  position:relative;z-index:1;color:#78867f;font-size:10.5px;
  font-weight:900;text-transform:uppercase;letter-spacing:.075em
}
.metric .value{
  position:relative;z-index:1;margin-top:8px;font-size:32px;
  font-weight:900;line-height:1;letter-spacing:-.05em;color:var(--green-900)
}
.metric .value:after{
  content:"";display:block;width:26px;height:3px;border-radius:9px;
  background:var(--green-600);margin-top:13px
}

/* Page toolbar */
.page-toolbar{
  display:flex;align-items:center;justify-content:space-between;gap:14px;
  padding:15px 17px;margin-bottom:17px;background:#fff;
  border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow)
}
.page-toolbar .toolbar-left{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.page-toolbar .toolbar-title{font-weight:850;color:var(--ink)}
.toolbar-search{min-width:240px}

/* Buttons */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:7px;
  min-height:40px;padding:9px 15px;border:1px solid transparent;border-radius:9px;
  background:linear-gradient(135deg,var(--green-700),var(--green-600));
  color:#fff!important;font-size:12.5px;font-weight:850;line-height:1;
  box-shadow:0 6px 15px rgba(23,107,76,.18);transition:.18s ease
}
.btn:hover{transform:translateY(-1px);box-shadow:0 9px 20px rgba(23,107,76,.24)}
.btn.secondary{background:#fff;color:#34443c!important;border-color:#d9e2dd;box-shadow:none}
.btn.secondary:hover{background:var(--green-50);border-color:#c4d3cc}
.btn.danger{background:linear-gradient(135deg,#c74655,#da5968)}
.btn.success{background:linear-gradient(135deg,#16845b,#27a371)}
.btn.small{min-height:32px;padding:7px 10px;font-size:11.5px;border-radius:8px}
.actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}

/* Forms */
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px}
.field{display:grid;gap:7px}
.field.full{grid-column:1/-1}
.field label{
  color:#46564e;font-size:11.5px;font-weight:850
}
.field input,.field select,.field textarea{
  width:100%;border:1px solid #d9e2dd;border-radius:10px;
  outline:0;padding:11px 12px;background:#fff;color:var(--ink);
  font-size:13px;box-shadow:0 1px 2px rgba(8,37,27,.025);transition:.16s ease
}
.field input:hover,.field select:hover,.field textarea:hover{border-color:#bfd0c7}
.field input:focus,.field select:focus,.field textarea:focus{
  border-color:var(--green-600);box-shadow:0 0 0 4px rgba(47,154,112,.11)
}
.field textarea{min-height:125px;resize:vertical;line-height:1.55}
.field input[type="file"]{padding:9px;background:#fafcfb}
.form-actions{display:flex;gap:9px;align-items:center;margin-top:21px}
::placeholder{color:#9aa7a1}

/* Tables */
.table-wrap{width:100%;overflow:auto;border:1px solid var(--line);border-radius:13px}
.table{width:100%;min-width:700px;border-collapse:separate;border-spacing:0;background:#fff}
.table th{
  padding:12px 14px;text-align:left;background:#f8faf9;color:#718078;
  border-bottom:1px solid var(--line);font-size:10px;font-weight:900;
  text-transform:uppercase;letter-spacing:.08em;white-space:nowrap
}
.table td{
  padding:14px;border-bottom:1px solid #edf1ef;color:#34453d;
  font-size:13px;vertical-align:middle
}
.table tr:last-child td{border-bottom:0}
.table tr:hover td{background:#fbfdfc}
.table td strong{color:#17231e}
.table a:not(.btn){color:var(--green-700);font-weight:750}
.table a:not(.btn):hover{text-decoration:underline}

/* Status and pills */
.status{
  display:inline-flex;align-items:center;gap:5px;padding:5px 9px;border-radius:999px;
  font-size:10.5px;font-weight:850;white-space:nowrap
}
.status:before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
.status-draft{background:#eef1f0;color:#687871}
.status-pending{background:#fff5dc;color:#9a6b00}
.status-approved{background:#e5f6ed;color:#16845b}
.status-published{background:#e8f2ff;color:#2865b5}
.status-canceled{background:#fdebed;color:#c74655}
.pill{
  display:inline-flex;padding:4px 8px;border-radius:999px;background:#f5f8f6;
  border:1px solid #e0e8e3;color:#617168;font-size:10.5px;font-weight:800
}
.muted{color:#7c8983;font-size:11.5px}
.priority-high{color:#c74655;font-weight:850}
.priority-medium{color:#9b6b00;font-weight:800}
.priority-low{color:#66756e;font-weight:700}
.empty{display:grid;place-items:center;min-height:120px;padding:24px;color:#87938d;text-align:center}

/* Progress */
.bar{height:8px;background:#e8eeeb;border-radius:99px;overflow:hidden}
.bar span{height:100%;display:block;border-radius:99px;background:linear-gradient(90deg,var(--green-800),var(--green-500))}
.target-progress{display:flex;align-items:center;gap:10px}
.target-progress .bar{flex:1}
.target-progress strong{min-width:42px;text-align:right;font-size:11px;color:#59675f}

/* Kanban */
.kanban{display:grid;grid-template-columns:repeat(5,minmax(205px,1fr));gap:14px;overflow-x:auto;padding-bottom:5px}
.kanban-col{min-height:500px;padding:11px;border:1px solid #dfe8e3;border-radius:14px;background:#edf2ef}
.kanban-col h3{display:flex;align-items:center;justify-content:space-between;font-size:12px;margin:3px 3px 12px}
.kanban-card{
  background:#fff;border:1px solid #e1e8e4;border-radius:11px;padding:13px;margin-bottom:9px;
  cursor:grab;box-shadow:0 3px 10px rgba(8,37,27,.035);transition:.16s ease
}
.kanban-card:hover{transform:translateY(-2px);box-shadow:0 9px 18px rgba(8,37,27,.08)}
.kanban-card h4{font-size:12.5px;margin:0 0 7px;line-height:1.35}

/* Calendar */
.calendar{display:grid;grid-template-columns:repeat(7,minmax(110px,1fr));gap:7px;overflow:auto}
.day{min-height:125px;background:#fff;border:1px solid #e2e9e5;border-radius:10px;padding:9px}
.day .num{font-weight:900;font-size:11px;color:#59685f}
.event{display:block;margin-top:6px;padding:6px 7px;border:1px solid #d8ebe1;border-radius:7px;background:#eff9f4;color:var(--green-800)!important;font-size:9.5px;font-weight:750}
.event:hover{background:#e3f4eb}

/* Flash */
.flash{padding:12px 14px;margin-bottom:16px;border:1px solid #c7e6d5;border-radius:10px;background:#edf9f3;color:#126743;font-size:12.5px;font-weight:650}
.flash.fade{opacity:.35;transition:.6s}

/* Login */
.login{
  min-height:100vh;display:grid;place-items:center;padding:24px;
  background:
    radial-gradient(circle at 12% 10%,rgba(47,154,112,.22),transparent 28%),
    radial-gradient(circle at 88% 85%,rgba(33,134,95,.18),transparent 27%),
    linear-gradient(135deg,#061d16,#09291f 55%,#061b15)
}
.login-box{
  width:min(450px,94vw);padding:34px;border-radius:21px;
  background:rgba(255,255,255,.98);border:1px solid rgba(255,255,255,.2);
  box-shadow:0 30px 70px rgba(0,0,0,.32)
}
.login-box:before{
  content:"C";width:47px;height:47px;display:grid;place-items:center;margin-bottom:17px;
  border-radius:14px;background:linear-gradient(135deg,#35a879,#176b4c);
  color:#fff;font-size:23px;font-weight:900;box-shadow:0 10px 25px rgba(23,107,76,.28)
}
.login-box h1{margin:0 0 4px;font-size:27px;letter-spacing:-.04em}
.login-box p{margin:0 0 24px;color:#7b8982;font-size:12.5px}
.login-box .btn{width:100%;min-height:44px;margin-top:4px}

/* Responsive */
@media(max-width:1200px){
  .grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}
  .kanban{grid-template-columns:repeat(3,minmax(210px,1fr))}
}
@media(max-width:850px){
  .sidebar{position:static;width:100%;min-height:auto}
  .app-shell{display:block}
  .main{width:100%;margin-left:0;padding:20px}
  .sidebar nav{grid-template-columns:repeat(2,minmax(0,1fr))}
  .grid-3,.grid-2,.form-grid{grid-template-columns:1fr}
  .topbar{align-items:flex-start;flex-direction:column}
  .user-pill{align-self:flex-start}
  .page-toolbar{align-items:flex-start;flex-direction:column}
  .toolbar-search{width:100%;min-width:0}
}
@media(max-width:560px){
  .main{padding:15px}
  .grid-4{grid-template-columns:1fr}
  .sidebar nav{grid-template-columns:1fr 1fr}
  .card{padding:15px}
  .topbar h1{font-size:23px}
  .calendar{grid-template-columns:repeat(2,minmax(130px,1fr))}
}

/* Multi-platform picker */
.platform-picker{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:9px;
  padding:2px 0;
}
.platform-option{
  position:relative;
  display:flex;
  align-items:center;
  gap:9px;
  min-height:45px;
  padding:9px 11px;
  border:1px solid #d9e2dd;
  border-radius:10px;
  background:#fff;
  color:#34443c;
  font-size:12px;
  font-weight:750;
  cursor:pointer;
  transition:.16s ease;
}
.platform-option:hover{border-color:#9fc4b3;background:#f5faf7}
.platform-option:has(input:checked){
  border-color:var(--green-600);
  background:var(--green-50);
  color:var(--green-800);
  box-shadow:0 0 0 2px rgba(47,154,112,.08);
}
.platform-option input{
  width:17px!important;
  height:17px;
  margin:0;
  accent-color:var(--green-700);
}
.field-help{margin-top:6px;color:#87938d;font-size:10.5px}
@media(max-width:700px){
  .platform-picker{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* Rich text editor */
.rte-wrap{width:100%}
.rte-toolbar{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:5px;
  padding:8px;
  background:#f7faf8;
  border:1px solid #d8e3dd;
  border-bottom:0;
  border-radius:11px 11px 0 0;
}
.rte-group{
  display:flex;
  align-items:center;
  gap:3px;
  padding-right:6px;
  margin-right:2px;
  border-right:1px solid #dbe5e0;
}
.rte-group:last-child{border-right:0}
.rte-btn{
  width:31px;
  height:30px;
  padding:0;
  border:1px solid transparent;
  border-radius:7px;
  background:transparent;
  color:#244138;
  font-weight:800;
  font-size:12px;
  cursor:pointer;
}
.rte-btn:hover{
  background:#e7f3ed;
  border-color:#c7ded3;
  color:#0b5a3c;
}
.rte-link{font-size:14px}
.rte-color{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  width:31px;
  height:30px;
  border-radius:7px;
  cursor:pointer;
  font-weight:900;
  color:#0b3b2b;
}
.rte-color:hover{background:#e7f3ed}
.rte-color input{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  opacity:0;
  cursor:pointer;
}
.rich-editor{
  min-height:180px;
  width:100%;
  padding:14px 16px;
  border:1px solid #d8e3dd;
  border-radius:0 0 11px 11px;
  background:#fff;
  color:#263a32;
  font-size:13px;
  line-height:1.65;
  outline:none;
  overflow:auto;
}
.rich-editor:focus{
  border-color:#2f9a70;
  box-shadow:0 0 0 3px rgba(47,154,112,.10);
}
.rich-editor[contenteditable="true"]:empty:before{
  content:attr(data-placeholder);
  color:#9aa6a0;
}
.rich-editor h3{font-size:18px;margin:8px 0 5px}
.rich-editor p{margin:0 0 9px}
.rich-editor ul,.rich-editor ol{padding-left:24px}
.rich-editor a{color:#137a55;text-decoration:underline}
.rich-editor.small{min-height:105px}

/* v12 platform selector fix */
.field .platform-picker{
  display:flex;
  flex-wrap:wrap;
  align-items:stretch;
  gap:10px;
  width:100%;
}
.field .platform-option{
  display:inline-flex;
  align-items:center;
  justify-content:flex-start;
  flex:0 0 auto;
  width:auto;
  min-width:135px;
  min-height:42px;
  margin:0;
  padding:8px 13px;
  border:1px solid #d8e4de;
  border-radius:11px;
  background:#fff;
  color:#30453b;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
  box-sizing:border-box;
}
.field .platform-option:hover{
  border-color:#7eb79f;
  background:#f3faf6;
  transform:translateY(-1px);
}
.field .platform-option:has(input:checked){
  border-color:#258a62;
  background:linear-gradient(135deg,#e8f7ef,#f5fbf8);
  color:#0b5a3c;
  box-shadow:0 3px 10px rgba(23,107,76,.08);
}
.field .platform-option input{
  display:block;
  flex:0 0 17px;
  width:17px!important;
  height:17px!important;
  min-width:17px;
  margin:0;
  padding:0;
  accent-color:#176b4c;
}
@media(max-width:700px){
  .field .platform-option{min-width:120px}
}

/* v12 rich editor visibility */
.rte-wrap{display:block!important;width:100%;min-width:0}
.rte-toolbar{min-height:46px;box-sizing:border-box}
.rich-editor{
  display:block!important;
  visibility:visible!important;
  min-height:190px!important;
  box-sizing:border-box;
  background:#fff!important;
  color:#263a32!important;
}
.rich-editor.small{min-height:110px!important}
