* { box-sizing: border-box; font-family: system-ui, sans-serif; }
body { margin: 0; background: #f5f6f8; color: #222; }
nav { display: flex; gap: 16px; align-items: center; padding: 12px 20px; background: #1e293b; color: #fff; }
nav a { color: #cbd5e1; text-decoration: none; }
nav a.active { color: #fff; font-weight: bold; }
main { padding: 20px; }
.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 20px; }
.col { background: #eef0f4; border-radius: 8px; padding: 8px; min-width: 240px; flex: 1; min-height: 100px; }
.col-head { font-weight: bold; padding: 6px 8px; border-left: 4px solid #888; margin-bottom: 8px; background: #fff; border-radius: 4px; }
.cnt { color: #64748b; font-weight: normal; font-size: 12px; }
.card { background: #fff; border-radius: 6px; padding: 8px; margin-bottom: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,.05); cursor: pointer; font-size: 14px; }
.card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.muted { color: #64748b; font-size: 12px; margin-top: 4px; }
button { background: #2563eb; color: #fff; border: 0; padding: 6px 12px; border-radius: 6px; cursor: pointer; margin-bottom: 12px; }
button:hover { background: #1d4ed8; }
button.secondary { background: #e2e8f0; color: #334155; }
button.secondary:hover { background: #cbd5e1; }
button.danger { background: #dc2626; }
button.danger:hover { background: #b91c1c; }
button.small { padding: 2px 8px; font-size: 12px; margin: 0; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 6px; overflow: hidden; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid #e2e8f0; }
th { background: #f1f5f9; }
input { padding: 4px 6px; border: 1px solid #cbd5e1; border-radius: 4px; width: 100%; }
.login { max-width: 300px; margin: 100px auto; background: #fff; padding: 24px; border-radius: 8px;
  display: flex; flex-direction: column; gap: 8px; }
.login input { padding: 8px; }
.err { color: #dc2626; font-size: 14px; }

/* ---------- МОДАЛКИ ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.5);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 20px; overflow-y: auto; z-index: 1000; }
.modal { background: #fff; border-radius: 8px; width: 100%; max-width: 560px;
  box-shadow: 0 10px 40px rgba(0,0,0,.25);
  display: flex; flex-direction: column; max-height: calc(100vh - 80px); }
.modal-head { display: flex; justify-content: space-between; align-items: center;
  padding: 14px 20px; border-bottom: 1px solid #e2e8f0; }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-head .x { background: none; border: 0; color: #64748b; font-size: 22px;
  cursor: pointer; padding: 0; margin: 0; line-height: 1; }
.modal-head .x:hover { color: #0f172a; }
.modal-body { padding: 16px 20px; overflow-y: auto; }
.modal-body label { display: block; margin-bottom: 10px; font-size: 13px; color: #334155; }
.modal-body label > input,
.modal-body label > select,
.modal-body label > textarea { display: block; width: 100%; margin-top: 4px;
  padding: 6px 8px; border: 1px solid #cbd5e1; border-radius: 4px; font: inherit; }
.modal-body textarea { resize: vertical; }
.modal-body details { margin: 8px 0 10px; }
.modal-body details summary { cursor: pointer; font-size: 13px; color: #475569; }
.modal-foot { padding: 12px 20px; border-top: 1px solid #e2e8f0;
  display: flex; gap: 8px; justify-content: flex-end; }
.modal-foot button { margin: 0; }
.client-box { background: #f8fafc; padding: 10px; border-radius: 6px;
  margin-bottom: 10px; font-size: 13px; line-height: 1.5; }
.client-box button { margin-top: 8px; }
.files { list-style: none; padding: 0; margin: 4px 0 10px; }
.files li { display: flex; gap: 8px; align-items: center;
  padding: 4px 0; border-bottom: 1px solid #f1f5f9; font-size: 13px; }
.files li a { color: #2563eb; text-decoration: none; flex: 1; }
.files li a:hover { text-decoration: underline; }