* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #fff;
}

/* ================= TOP ACTION BAR ================= */
.cg-top {
  height: 64px;
  background: #7ea35c;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255,255,255,0.45); /* white separator */
}

.cg-quote {
  color: rgba(255,255,255,0.95);
  font-size: 26px;
  white-space: nowrap;
}

/* ================= ACTION BUTTON TILES ================= */
.cg-actions {
  display: flex;
}

.cg-action {
  width: 80px;
  height: 64px;
  background: rgba(0,0,0,0.12);
  border: none;
  border-left: 1px solid rgba(255,255,255,0.55);  /* 🔑 white dividers */
  border-right: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  cursor: pointer;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  transition: background 0.15s, box-shadow 0.15s;
}

.cg-action:first-child {
  border-left: 1px solid rgba(255,255,255,0.55);
}

.cg-action:hover {
  background: rgba(255,255,255,0.22);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35); /* hover outline */
}

.cg-action.active {
  background: rgba(0,0,0,0.28);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.65); /* active outline */
}

.cg-ico {
  font-size: 20px;
  line-height: 1;
}

.cg-lbl {
  font-size: 11px;
  margin-top: 6px;
}

/* ================= WORKFLOW TABS ================= */
.cg-tabs {
  height: 56px;
  background: #6e8f4f;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border-top: 1px solid rgba(255,255,255,0.55);   /* white top line */
  border-bottom: 1px solid rgba(255,255,255,0.35);
}

.cg-tab {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 26px;
  color: #fff;
  cursor: pointer;

  border-left: 1px solid rgba(255,255,255,0.65); /* 🔑 strong white dividers */
  transition: background 0.15s, box-shadow 0.15s;
}

.cg-tab:first-child {
  border-left: none;
}

.cg-tab:hover {
  background: rgba(255,255,255,0.18);
  box-shadow: inset 0 -2px 0 rgba(255,255,255,0.55); /* bottom highlight */
}

.cg-tab.active {
  background: #4f6f34;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.75), /* white outline */
    inset 0 -3px 0 rgba(255,255,255,0.85); /* active underline */
}

.cg-num {
  font-size: 36px;
  font-weight: 700;
  width: 30px;
}

.cg-text {
  font-size: 14px;
  line-height: 1.15;
}

/* ================= MAIN ================= */
.main {
  display: grid;
  grid-template-columns: 1fr 220px;
  height: calc(100vh - 64px - 56px);
}

.canvas-area {
  padding: 12px;
  background: #fff;
}

canvas {
  width: 100%;
  height: 100%;
  background: #fff;
  border: 1px solid #ddd;
}

/* ================= TOOLS ================= */
.tools {
  background: #eef2ea;
  padding: 10px;
  border-left: 1px solid #cfd9c8;
}

.tools button {
  width: 100%;
  padding: 12px;
  margin-bottom: 10px;
  background: #7ea35c;
  border: 1px solid rgba(255,255,255,0.65); /* white outline */
  border-radius: 6px;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
}

.tools button:hover {
  background: #6e8f4f;
}

/* ================= EDGE POPUP ================= */
.edge-popup {
  position: fixed;
  right: 240px;
  top: 140px;
  width: 360px;
  background: #eef2ea;
  border: 1px solid rgba(255,255,255,0.85); /* white outline */
  box-shadow: 0 6px 20px rgba(0,0,0,0.22);
  z-index: 1000;
}

.hidden { display: none; }

.edge-header {
  background: #7ea35c;
  color: #fff;
  padding: 12px 14px;
  cursor: move;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.65);
}

.edge-body {
  padding: 18px 16px;
}

.edge-body input {
  width: 140px;
  padding: 6px;
  font-size: 16px;
}

.edge-actions {
  display: flex;
  justify-content: space-between;
  padding: 14px 16px 16px;
}

.edge-actions button {
  padding: 10px 14px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.65);
}

.edge-actions button:first-child {
  background: #dfe6d8;
}

.edge-actions button:last-child {
  background: #7ea35c;
  color: #fff;
}
