@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@500&display=swap');

:root {
  --ink: #000000;
  --panel: #121212;
  --panel-raised: #181818;
  --line: #2A2A2A;
  --green: #BADC21;
  --green-dim: #8FA81C;
  --white: #F4F5F1;
  --text: #E8E9E4;
  --text-dim: #9A9C93;
  --amber: #E0932E;
  --red: #E0563B;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green); }

/* ---------- Auth pages ---------- */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: 380px;
  max-width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 36px 32px;
}

.auth-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 22px;
}
.auth-logo img { height: 46px; width: auto; }

.auth-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 22px;
  text-align: center;
  color: var(--white);
  margin: 0 0 6px;
}

.auth-sub {
  text-align: center;
  color: var(--text-dim);
  font-size: 13.5px;
  margin: 0 0 26px;
}

.field-label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin: 14px 0 6px;
}

input[type=text], input[type=email], input[type=password], textarea, select {
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 9px;
  padding: 11px 13px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--green); }

.btn-primary {
  width: 100%;
  margin-top: 20px;
  padding: 12px 14px;
  border: none;
  border-radius: 9px;
  background: var(--green);
  color: #0A0A0A;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary:hover { background: var(--white); }

.auth-switch {
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 18px;
}
.auth-switch a { font-weight: 600; text-decoration: none; }

.error-box {
  background: rgba(224,86,59,0.12);
  border: 1px solid var(--red);
  color: #FF8F7C;
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 14px;
}

/* ---------- App shell ---------- */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 224px;
  flex-shrink: 0;
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand { display: flex; align-items: center; gap: 9px; padding: 0 4px 26px; }
.brand img { height: 26px; width: auto; }
.brand span { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 15.5px; color: var(--white); }

.nav-link {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 12px; border-radius: 8px;
  color: var(--text-dim); text-decoration: none;
  font-size: 13.5px; font-weight: 500; margin-bottom: 3px;
}
.nav-link.active { background: rgba(186,220,33,0.12); color: var(--green); font-weight: 600; }
.nav-link:hover:not(.active) { background: var(--panel-raised); }

.member-block { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.member-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; color: #6B6D63; font-weight: 600; margin-bottom: 10px; }
.member-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 4px; color: var(--text-dim); }
.member-row.me { color: var(--white); font-weight: 600; }
.member-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); flex-shrink: 0; }

.signout { font-size: 12px; color: #6B6D63; text-decoration: none; margin-top: 12px; display: block; }
.signout:hover { color: var(--red); }

.main { flex: 1; padding: 30px 34px; max-width: 100%; }

.page-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.page-head h1 { font-family: 'Space Grotesk', sans-serif; font-size: 24px; font-weight: 700; color: var(--white); margin: 0; }
.page-head p { color: var(--text-dim); font-size: 13.5px; margin: 4px 0 0; }

.head-actions { display: flex; gap: 8px; align-items: center; }
.btn-ghost {
  padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text-dim); font-size: 13px; font-weight: 500; cursor: pointer; font-family: inherit;
}
.btn-ghost.active { background: var(--green); color: #0A0A0A; border-color: var(--green); font-weight: 700; }
.btn-accent {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 8px; border: none;
  background: var(--green); color: #0A0A0A; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.btn-accent:hover { background: var(--white); }

/* Flow indicator */
.flow-line { display: flex; align-items: center; margin-bottom: 20px; flex-wrap: wrap; row-gap: 8px; }
.flow-seg { display: flex; align-items: center; }
.flow-dot { width: 8px; height: 8px; border-radius: 50%; }
.flow-label { font-size: 11px; color: var(--text-dim); font-weight: 600; margin: 0 8px 0 6px; text-transform: uppercase; letter-spacing: .4px; }
.flow-connector { width: 30px; height: 1px; background: var(--line); margin-right: 8px; }

/* Board */
.board { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
@media (max-width: 900px) { .board { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .board { grid-template-columns: 1fr; } }

.column { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; min-height: 260px; }
.col-head { display: flex; align-items: center; gap: 7px; padding: 13px 14px; border-bottom: 1px solid var(--line); }
.col-dot { width: 7px; height: 7px; border-radius: 50%; }
.col-title { font-size: 12.5px; font-weight: 600; color: var(--white); }
.col-count { margin-left: auto; font-size: 11px; color: var(--text-dim); background: var(--panel-raised); border-radius: 20px; padding: 1px 7px; }
.col-body { padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.empty-note { font-size: 12px; color: #565850; text-align: center; padding: 16px 6px; }

.card { background: var(--panel-raised); border: 1px solid var(--line); border-left: 3px solid; border-radius: 9px; padding: 10px 11px; }
.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.ticket { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: #6B6D63; }
.owner-tag { font-size: 10.5px; background: rgba(186,220,33,0.14); color: var(--green); border-radius: 20px; padding: 2px 8px; font-weight: 600; }
.claim-btn { font-size: 10.5px; background: var(--panel); color: var(--text-dim); border: 1px solid var(--line); border-radius: 20px; padding: 2px 9px; cursor: pointer; font-weight: 600; font-family: inherit; }
.card-title { font-size: 13px; font-weight: 600; color: var(--white); margin-bottom: 3px; line-height: 1.35; }
.card-desc { font-size: 12px; color: var(--text-dim); line-height: 1.4; margin-bottom: 6px; }
.card-file { display: flex; align-items: center; gap: 4px; font-size: 11.5px; text-decoration: none; margin-bottom: 6px; word-break: break-all; }
.card-moves { display: flex; gap: 6px; margin-top: 4px; }
.move-btn { border: 1px solid var(--line); background: var(--panel); border-radius: 6px; padding: 3px 7px; cursor: pointer; color: var(--text-dim); }
.move-btn:disabled { opacity: .3; cursor: default; }

/* Chat */
.chat-wrap { display: flex; flex-direction: column; height: calc(100vh - 130px); }
.chat-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; padding: 6px 4px 16px; }
.msg-row { display: flex; gap: 10px; }
.msg-avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--panel-raised); border: 1px solid var(--line); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--green); }
.msg-meta { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.msg-author { font-weight: 600; color: var(--white); font-size: 13px; }
.msg-time { font-size: 11px; color: #6B6D63; }
.msg-text { font-size: 13.5px; line-height: 1.5; color: var(--text); }
.msg-file { display: flex; align-items: center; gap: 4px; font-size: 11.5px; text-decoration: none; margin-top: 4px; }

.chat-input-bar { display: flex; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); align-items: center; flex-wrap: wrap; }
.chat-input-bar input[type=text] { flex: 1; min-width: 180px; }
.file-btn { border: 1px solid var(--line); background: var(--panel); color: var(--text-dim); border-radius: 9px; padding: 10px 12px; cursor: pointer; font-size: 13px; font-family: inherit; }
.send-btn { width: 42px; height: 42px; border-radius: 9px; border: none; background: var(--green); color: #0A0A0A; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.file-chip { font-size: 11.5px; color: var(--green); background: rgba(186,220,33,0.1); padding: 5px 10px; border-radius: 20px; display: none; align-items: center; gap: 6px; }
.file-chip.show { display: inline-flex; }
.file-chip button { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 13px; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: none; align-items: center; justify-content: center; z-index: 20; padding: 20px; }
.modal-overlay.show { display: flex; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px; width: 380px; max-width: 100%; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.modal-title { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 16px; color: var(--white); }
.icon-btn { border: none; background: var(--panel-raised); border-radius: 7px; padding: 5px; cursor: pointer; color: var(--text-dim); }

.svg-icon { display: inline-block; vertical-align: middle; }
