@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600&family=Golos+Text:wght@400;500;600&display=swap');

:root {
  --navy: #16234a;
  --navy-dark: #0e1830;
  --ink: #1c1f26;
  --muted: #6b7280;
  --border: #e2e5ea;
  --bg: #fafbfc;
  --bg-card: #ffffff;
  --danger-bg: #f2f2f2;
  --danger-ink: #6b7280;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Golos Text', 'Inter Tight', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}

a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 {
  font-family: 'Inter Tight', 'Golos Text', system-ui, sans-serif;
  font-weight: 500;
  margin: 0 0 0.5em 0;
  letter-spacing: -0.01em;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.nav-primary { display: flex; gap: 24px; align-items: center; }

.nav-primary a {
  color: var(--ink);
  font-weight: 600;
  font-family: 'Inter Tight', sans-serif;
  padding: 6px 4px;
  border-bottom: 2px solid transparent;
}

.nav-primary a.active { color: var(--navy); border-bottom-color: var(--navy); }

.topbar .user { color: var(--muted); font-size: 13px; display: flex; gap: 12px; align-items: center; }

.subbar {
  display: flex;
  gap: 20px;
  padding: 10px 28px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.subbar a {
  color: var(--muted);
  font-size: 14px;
  padding: 4px 2px;
  border-bottom: 2px solid transparent;
}

.subbar a.active { color: var(--navy); border-bottom-color: var(--navy); font-weight: 500; }

.kanban {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
}

.kanban-column {
  min-width: 240px;
  flex: 0 0 240px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
}

.kanban-column h3 {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.kanban-column.stage-blue h3 { color: #1d4ed8; border-bottom-color: #c3d7f7; }
.kanban-column.stage-yellow h3 { color: #92720b; border-bottom-color: #f0e3ab; }
.kanban-column.stage-green h3 { color: #15803d; border-bottom-color: #bfe3cc; }
.kanban-column.stage-red h3 { color: #b91c1c; border-bottom-color: #f3c9c9; }

.pill.stage-blue { border-color: #c3d7f7; color: #1d4ed8; }
.pill.stage-yellow { border-color: #f0e3ab; color: #92720b; }
.pill.stage-green { border-color: #bfe3cc; color: #15803d; }
.pill.stage-red { border-color: #f3c9c9; color: #b91c1c; }
.pill.stage-blue.active { background: #1d4ed8; color: #fff; }
.pill.stage-yellow.active { background: #92720b; color: #fff; }
.pill.stage-green.active { background: #15803d; color: #fff; }
.pill.stage-red.active { background: #b91c1c; color: #fff; }

.kanban-card {
  display: block;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--ink);
  cursor: grab;
}
.kanban-card:hover { border-color: var(--navy); text-decoration: none; }
.kanban-card:active { cursor: grabbing; }
.kanban-card.dragging { opacity: 0.4; }
.kanban-card .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }

.kanban-cards { min-height: 40px; }

.kanban-column.drag-over { outline: 2px dashed var(--navy); outline-offset: -4px; background: #f5f7fb; }

.kanban-empty { color: var(--muted); font-size: 12px; padding: 8px 0; }

.container { max-width: 980px; margin: 0 auto; padding: 28px; }

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.btn {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.btn:hover { background: var(--navy-dark); text-decoration: none; }

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: #f0f1f3; }

.stage-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }

.pill {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  border: 1px solid var(--border);
  color: var(--muted);
}
.pill.active { background: var(--navy); color: #fff; border-color: var(--navy); }

table { width: 100%; border-collapse: collapse; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
th { color: var(--muted); font-weight: 500; font-size: 13px; }
tr:last-child td { border-bottom: none; }
tr:hover { background: #f5f6f8; }

.empty { color: var(--muted); padding: 40px; text-align: center; }

form.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px;
  max-width: 720px;
}

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: #fff;
}
.field textarea { min-height: 80px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--navy);
}

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form-actions { margin-top: 24px; display: flex; gap: 12px; }

.attachments-card {
  margin-top: 20px;
  max-width: 720px;
}
.attachments-card h3 { font-size: 15px; margin-bottom: 12px; }

.attachment-list { list-style: none; margin: 0 0 16px 0; padding: 0; }
.attachment-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.attachment-list li:last-child { border-bottom: none; }
.attachment-list .sub { color: var(--muted); font-size: 12px; margin-left: auto; }
.attachment-list form { margin: 0; }

.attachment-delete {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  padding: 0 4px;
}
.attachment-delete:hover { color: #b91c1c; }

.attachment-upload { display: flex; gap: 10px; align-items: center; }
.attachment-upload input[type="file"] { font-size: 13px; }

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 36px;
  width: 320px;
}

.error {
  background: #fbeaea;
  color: #93211f;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 16px;
}

.logout-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
}
.logout-btn:hover { color: var(--ink); text-decoration: underline; }
