/* Portal additions — same neobrutalist language as style.css */
/* Site font: assets/AMSTRAD.woff (same family style.css declares). */
@font-face {
  font-family: "AMSTRAD";
  src: url("AMSTRAD.woff") format("woff");
}

/* stop layout jumping when toggling advanced mode */
#adv-hint { min-height: 3.2em; margin: 8px 0; font-size: 14px; }
#btn-advanced { min-width: 170px; text-align: center; }

.portal-wrap { padding: 20px; max-width: 1200px; margin: 0 auto; }

.card {
  background: #fff;
  border: 3px solid #515151;
  box-shadow: 1px 1px 0 0, 2px 2px 0 0, 3px 3px 0 0, 4px 4px 0 0, 5px 5px 0 0;
  padding: 16px;
  margin-bottom: 24px;
}
.card h2, .card h3 { margin-top: 0; text-transform: uppercase; }

.btn, button.btn {
  font-family: "AMSTRAD", monospace;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  color: #515151;
  background: #fff;
  border: 3px solid #515151;
  box-shadow: 1px 1px 0 0, 2px 2px 0 0, 3px 3px 0 0;
  padding: 8px 15px;
  cursor: pointer;
  position: relative;
  display: inline-block;
}
.btn:hover { background: #f0f0f0; color: #000; }
.btn:active { box-shadow: none; top: 3px; left: 3px; }
.btn-green { background: #00cf91; }
.btn-pink { background: #FFBAF9; }
.btn-yellow { background: #E7FF97; }
.btn-red { background: #ff5599; color: #fff; }

input[type=text], input[type=email], input[type=number], select, textarea {
  font-family: "AMSTRAD", monospace;
  font-size: 15px;
  border: 3px solid #515151;
  padding: 8px;
  background: #fff;
  box-sizing: border-box;
}
label { display: block; margin: 10px 0 4px; font-size: 14px; text-transform: uppercase; }

.flash {
  margin: 10px 20px;
  padding: 10px 14px;
  background: #E7FF97;
  border: 3px solid #515151;
  box-shadow: 3px 3px 0 0;
}

.badge {
  background: #ff5599;
  color: #fff;
  border-radius: 0;
  padding: 1px 6px;
  font-size: 11px;
  border: 2px solid #515151;
}

table.list { width: 100%; border-collapse: collapse; background: #fff; }
table.list th, table.list td { border: 2px solid #515151; padding: 8px; text-align: left; font-size: 14px; }
table.list th { background: #00cf91; text-transform: uppercase; }
table.list tr:nth-child(even) td { background: #f9f9f9; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

.stat { font-size: 32px; font-weight: bold; }
.status-open { background: #E7FF97; padding: 2px 8px; border: 2px solid #515151; }
.status-production { background: #FFBAF9; padding: 2px 8px; border: 2px solid #515151; }
.status-closed { background: #ccc; padding: 2px 8px; border: 2px solid #515151; }

/* login */
.login-box { max-width: 420px; margin: 8vh auto; }
.login-box input { width: 100%; margin-bottom: 12px; }
.login-box .btn { width: 100%; text-align: center; box-sizing: border-box; }

/* chat */
.chat-layout { display: flex; gap: 20px; height: calc(100vh - 180px); }
.chat-list { flex: 1; overflow-y: auto; }
.chat-main { flex: 2.5; display: flex; flex-direction: column; background: #fff; border: 3px solid #515151; box-shadow: 4px 4px 0 0; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 14px; }
.msg { margin-bottom: 10px; max-width: 75%; }
.msg .who { font-size: 11px; text-transform: uppercase; color: #666; }
.msg .bubble { border: 2px solid #515151; padding: 8px 10px; background: #f0f0f0; font-size: 15px; white-space: pre-wrap; word-break: break-word; }
.msg.mine { margin-left: auto; }
.msg.mine .bubble { background: #E7FF97; }
.msg.staff .bubble { background: #FFBAF9; }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 3px solid #515151; }
.chat-form textarea { flex: 1; resize: none; height: 48px; }
.chat-item { display: block; padding: 10px; border: 3px solid #515151; background: #fff; margin-bottom: 10px; text-decoration: none; color: #515151; box-shadow: 3px 3px 0 0; }
.chat-item:hover, .chat-item.active { background: #00cf91; }
.chat-att { display: block; max-width: 220px; max-height: 170px; margin-top: 6px; border: 2px solid #515151; background: #fff; }
.chat-att-file { display: inline-block; margin-top: 6px; font-size: 14px; color: #515151; }
.msg-link { display: block; text-decoration: none; color: inherit; }
.msg-link:hover .bubble { background: #00cf91; }

/* designer */
.designer-layout { display: flex; gap: 20px; }
.designer-layout > div:first-child { flex: 3; min-width: 0; }
.designer-canvas { background: #fff; border: 3px solid #515151; box-shadow: 4px 4px 0 0; position: relative; overflow: hidden; }
.designer-canvas .tpl-holder svg { width: 100%; height: auto; display: block; }
.designer-side { flex: 1; min-width: 260px; }
#design-img { position: absolute; cursor: move; user-select: none; -webkit-user-drag: none; }
#design-img.selected { outline: 3px dashed #ff5599; }
.anno-dot { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; background: #ff5599; border: 2px solid #515151; border-radius: 50%; z-index: 5; }
.anno-label { position: absolute; font-size: 12px; background: #E7FF97; border: 2px solid #515151; padding: 1px 5px; z-index: 6; white-space: nowrap; }
svg.anno-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 4; }
.mode-on { background: #ff5599 !important; color: #fff; }

/* annotation modal */
.sc-modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(81, 81, 81, 0.6);
  z-index: 100;
  align-items: center; justify-content: center;
}
.sc-modal {
  background: #fff;
  border: 3px solid #515151;
  box-shadow: 2px 2px 0 0, 4px 4px 0 0, 6px 6px 0 0;
  padding: 20px;
  width: min(380px, 90vw);
}
.sc-modal h3 { margin-top: 0; text-transform: uppercase; }
.sc-modal input { width: 100%; }
.sc-modal-hint { font-size: 13px; color: #666; }
.sc-modal-btns { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
