:root{
  --bg:#f4f7f2;
  --text:#14241d;
  --muted:#5b6b63;
  --card: rgba(255,255,255,0.72);
  --border: rgba(20,36,29,0.12);
  --shadow: 0 18px 55px rgba(20,36,29,0.10);
  --shadow2: 0 10px 30px rgba(20,36,29,0.08);

  --primary:#2c8c6a;
  --primary-soft: rgba(44,140,106,0.15);

  --danger:#d94a4a;
  --danger-soft: rgba(217,74,74,0.12);

  --warn:#c79a21;
  --warn-soft: rgba(199,154,33,0.14);

  --radius: 20px;
  --radius2: 14px;
}

/* ===== Reset ===== */
*{
  margin:0;
  padding:0;
  box-sizing:border-box;
  font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif
}

/* ===== Sticky Footer Layout Fix ===== */
html, body { height:100%; }

body{
  display:flex;
  flex-direction:column;
  color:var(--text);
  background:
    radial-gradient(circle at top left, rgba(44, 140, 106, 0.10), transparent 55%),
    radial-gradient(circle at top right, rgba(47, 111, 145, 0.08), transparent 55%),
    var(--bg);
  overflow-x:hidden;
}

main{ flex:1; }

/* ===== Watermark ===== */
.watermark{
  position:fixed; inset:0;
  background:url("/internal/template/images/CBC-Logo-wo-bg.png") center/28% no-repeat;
  opacity:0.06;
  filter:saturate(.7) contrast(.95);
  pointer-events:none;
  z-index:-1;
}

/* ===== Navbar ===== */
.navbar{
  display:flex; justify-content:space-between; align-items:center;
  padding:16px 26px;
  background: rgba(244,247,242,0.82);
  border-bottom:1px solid var(--border);
  backdrop-filter: blur(12px);
  position:sticky; top:0; z-index:50;
}

.brand{display:flex; align-items:center; gap:12px;}
.logo{width:42px;height:auto}
.brand-name{font-weight:950;letter-spacing:.2px}

.nav-actions{display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end}

.nav-btn{
  display:inline-flex; align-items:center; gap:8px;
  border:1px solid var(--border);
  background: rgba(255,255,255,0.68);
  color:var(--text);
  padding:10px 14px;
  border-radius:12px;
  cursor:pointer;
  text-decoration:none;
  font-weight:900;
  font-size:14px;
  transition:.2s;
}

.nav-btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.92);
  border-color: rgba(44,140,106,0.25);
  box-shadow: var(--shadow2);
}
.nav-btn.danger:hover{border-color: rgba(217,74,74,0.25); background: var(--danger-soft);}
.nav-btn.warn:hover{border-color: rgba(199,154,33,0.28); background: var(--warn-soft);}

/* ===== Layout Containers ===== */
.container{ padding:26px; display:grid; gap:18px; }

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

.panel h2{ font-size:20px; font-weight:950; margin-bottom:14px; }
.muted{ color:var(--muted); }

/* ===== Dashboard Layout ===== */
.layout{
  display:grid;
  grid-template-columns:1fr 340px;
  gap:22px;
  padding:26px;
}

.main-area{
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:rgba(255,255,255,0.50);
  box-shadow:var(--shadow);
  padding:26px;
}

.hero{ display:flex; flex-direction:column; gap:14px; padding-bottom:16px; }
.title{ font-size:34px; font-weight:950; letter-spacing:-0.4px }
.subtitle{ color:var(--muted); line-height:1.5 }

/* ===== Action Buttons ===== */
.action-box{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin-top:10px;
}

.action-btn{
  display:flex; align-items:center; justify-content:space-between;
  border:1px solid var(--border);
  background:rgba(255,255,255,0.75);
  padding:14px 16px;
  border-radius:16px;
  cursor:pointer;
  font-weight:950;
  transition:.2s;
}
.action-btn:hover{transform:translateY(-2px); box-shadow:var(--shadow2); background:rgba(255,255,255,0.92);}
.action-btn.primary{border-color: rgba(44,140,106,0.35); background:var(--primary-soft);}
.action-btn.danger{border-color: rgba(217,74,74,0.30); background:var(--danger-soft);}
.action-btn.warn{border-color: rgba(199,154,33,0.28); background:var(--warn-soft);}

/* ===== Status Card ===== */
.status-card{
  margin-top:18px;
  padding:16px;
  border-radius:18px;
  border:1px solid var(--border);
  background:rgba(255,255,255,0.80);
}

/* ===== Side Panel ===== */
.side-panel{
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  background:rgba(255,255,255,0.60);
  padding:18px;
  height:fit-content;
}

.stat{
  border:1px solid var(--border);
  border-radius:16px;
  padding:14px;
  background:rgba(255,255,255,0.75);
  margin-bottom:12px;
}

.stat-label{font-size:13px;color:var(--muted);font-weight:800}
.stat-value{font-size:30px;font-weight:950;margin-top:6px}
.stat-value.small{font-size:14px;font-weight:900}

.divider{height:1px;background:var(--border); margin:14px 0;}

.refresh-btn{
  width:100%;
  padding:12px;
  border-radius:14px;
  cursor:pointer;
  border:1px solid rgba(44,140,106,0.35);
  background:var(--primary-soft);
  font-weight:950;
}

/* ===== Forms ===== */
.grid{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.grid textarea{ grid-column:1/-1; min-height:90px; }

input, textarea{
  border:1px solid var(--border);
  background:rgba(255,255,255,0.85);
  padding:12px;
  border-radius:14px;
  outline:none;
}
input:focus, textarea:focus{
  border-color: rgba(44,140,106,0.35);
  box-shadow:0 0 0 4px rgba(44,140,106,0.10);
}
.preview-area {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.preview-card {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.7);
}

.preview-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0,0,0,0.65);
  color: white;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  cursor: pointer;
  font-size: 14px;
  line-height: 22px;
  text-align: center;
}


/* ===== Buttons ===== */
.btn{
  border:1px solid var(--border);
  background:rgba(255,255,255,0.78);
  padding:10px 14px;
  border-radius:14px;
  cursor:pointer;
  font-weight:950;
  transition:.2s;
}
.btn:hover{transform:translateY(-1px); box-shadow:var(--shadow2); background:rgba(255,255,255,0.92);}
.btn.primary{border-color: rgba(44,140,106,0.35); background:var(--primary-soft);}
.btn.danger{border-color: rgba(217,74,74,0.30); background:var(--danger-soft);}
.btn.warn{border-color: rgba(199,154,33,0.28); background:var(--warn-soft);}
.btn.small{padding:6px 10px; border-radius:12px; font-size:12px;}

/* ===== Cards ===== */
.card{
  border:1px solid var(--border);
  background:rgba(255,255,255,0.78);
  border-radius:var(--radius);
  padding:14px;
  margin-top:12px;
}

.row{display:flex; gap:12px; justify-content:space-between; align-items:flex-start}
.left{flex:1}
.common{font-size:18px; font-weight:950}
.sci{font-size:13px; font-weight:900; color:var(--muted); margin-top:2px}

.img-item .img-actions{ display:flex; gap:10px; padding:10px 0; }
.img-item.primary{ padding:20px 0; }

/* ===== Footer ===== */
.app-footer{
  text-align:center;
  padding:14px 10px;
  font-size:13px;
  color:var(--muted);
  border-top:1px solid var(--border);
  background:rgba(255,255,255,0.6);
  backdrop-filter:blur(6px);
}

.app-footer .footer-sub{
  display:block;
  font-size:11px;
  margin-top:4px;
  opacity:0.75;
}

/* ===== Responsive ===== */
@media(max-width:900px){
  .layout{grid-template-columns:1fr}
  .action-box{grid-template-columns:1fr}
  .grid{grid-template-columns:1fr}
  .row{flex-direction:column}
  .watermark{background-size:60%}
}
