
*{ box-sizing:border-box; }

html,body{ margin:0; min-height:100%; }

body{
  font-family:Tahoma,Arial,sans-serif;
  background:#bcbcbc;
  overflow:auto;
  color:#111;
}

.paynt-shell{
  min-height:100vh;
  background:#c8c8c8;
}

.paynt-topbar{
  background:linear-gradient(to right,#002c63,#005ab5,#69bbff);
  padding:8px;
  border-bottom:2px solid #676767;
  box-shadow:0 3px 10px rgba(0,0,0,0.22), inset 0 1px rgba(255,255,255,.4);
  position:sticky;
  top:0;
  z-index:10;
}

.brand{
  color:#fff;
  font-weight:900;
  font-size:17px;
  margin-bottom:8px;
  text-shadow:1px 1px 2px #000;
}

.toolbar{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  align-items:center;
}

.tool,.save-btn,.file-btn{
  background:linear-gradient(#f8f8f8,#d7d7d7);
  border:2px solid #747474;
  border-radius:8px;
  padding:7px 10px;
  font-weight:bold;
  font-size:13px;
  cursor:pointer;
  box-shadow:
    inset 1px 1px rgba(255,255,255,0.9),
    inset -1px -1px rgba(0,0,0,0.18),
    0 1px 2px rgba(0,0,0,0.2);
  white-space:nowrap;
}

.tool:hover,.save-btn:hover,.file-btn:hover{
  background:linear-gradient(#ffffff,#e5e5e5);
}

.tool.active{
  background:linear-gradient(#ffe7a0,#ffc24c);
  border-color:#6d4300;
}

.file-btn input{ display:none; }

.divider{
  width:2px;
  height:34px;
  background:#7d7d7d;
  border-right:1px solid rgba(255,255,255,.45);
}

.toolbar-label{
  display:flex;
  flex-direction:column;
  font-size:11px;
  font-weight:bold;
  color:#fff;
  gap:2px;
  text-shadow:1px 1px 1px #00305f;
}

.toolbar-label input{ width:110px; }

.main-layout{
  display:grid;
  grid-template-columns:92px 1fr;
}

.leftbar{
  background:linear-gradient(#e4e4e4,#cfcfcf);
  padding:10px 8px;
  border-right:2px solid #7d7d7d;
  min-height:calc(100vh - 96px);
  box-shadow:inset -1px 0 rgba(255,255,255,.7);
  position:sticky;
  top:96px;
}

.left-title{
  font-size:12px;
  font-weight:bold;
  margin-bottom:8px;
  text-align:center;
  color:#123c68;
}

.palette{
  display:grid;
  grid-template-columns:1fr;
  gap:7px;
}

.color{
  height:31px;
  border:2px solid #6d6d6d;
  border-radius:8px;
  cursor:pointer;
  box-shadow:inset 1px 1px rgba(255,255,255,.55), inset -1px -1px rgba(0,0,0,.25);
}

.color.active{
  outline:3px solid #fff1a8;
  border-color:#18395f;
}

.custom-color{
  margin-top:14px;
  display:flex;
  flex-direction:column;
  gap:4px;
  font-size:11px;
  font-weight:bold;
  color:#123c68;
  text-align:center;
}

#customColor{
  width:100%;
  height:38px;
  border:2px solid #777;
  border-radius:8px;
  background:#eee;
}

.status-box{
  margin-top:14px;
  padding:7px;
  font-size:11px;
  border:1px solid #999;
  background:#eeeeee;
  border-radius:8px;
  text-align:center;
  box-shadow:inset 1px 1px #fff;
}

.status-box span{
  display:block;
  margin-top:3px;
  color:#004080;
  font-weight:bold;
}

.canvas-wrap{
  padding:12px;
  overflow:auto;
}

.canvas-stage{
  position:relative;
  display:inline-block;
  line-height:0;
}

#selectionBox{
  display:none;
  position:absolute;
  border:2px dashed #000;
  outline:1px dashed #fff;
  pointer-events:none;
  z-index:3;
  animation:selectionBlink .8s steps(2,end) infinite;
}

@keyframes selectionBlink{
  50%{ border-color:#fff; outline-color:#000; }
}

canvas{
  background:#fff;
  border:2px solid #6f6f6f;
  box-shadow:0 0 14px rgba(0,0,0,0.18);
  max-width:none;
  display:block;
  cursor:crosshair;
  touch-action:none;
}

@media(max-width:768px){
  .toolbar{
    overflow-x:auto;
    flex-wrap:nowrap;
    padding-bottom:4px;
  }

  .tool,.save-btn,.file-btn{
    min-height:38px;
    font-size:12px;
  }

  .toolbar-label{
    min-width:112px;
  }

  .main-layout{
    grid-template-columns:72px 1fr;
  }

  .leftbar{
    top:112px;
    min-height:calc(100vh - 112px);
    padding:8px 6px;
  }

  .color{
    height:28px;
  }

  .canvas-wrap{
    padding:8px;
  }
}
