* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: #f6f7fb;
  color: #323338;
}
a { color: #0073ea; text-decoration: none; }
a:hover { text-decoration: underline; }
main { max-width: 1400px; margin: 0 auto; padding: 20px 24px 60px; }
h1 { font-size: 26px; margin: 12px 0 16px; }
h2 { font-size: 18px; margin: 20px 0 10px; }

.topnav {
  display: flex; justify-content: space-between; align-items: center;
  background: #fff; border-bottom: 1px solid #e6e9ef;
  padding: 10px 24px; position: sticky; top: 0; z-index: 50;
}
.topnav .brand { font-weight: 700; font-size: 18px; color: #323338; }
.topnav nav { display: flex; align-items: center; gap: 16px; }
.topnav .me { color: #676879; }
.bell { position: relative; font-size: 18px; }
.badge {
  position: absolute; top: -6px; right: -10px;
  background: #e2445c; color: #fff; border-radius: 10px;
  font-size: 11px; padding: 1px 5px; font-weight: 700;
}
.inline { display: inline; }
.linklike { background: none; border: none; color: #0073ea; cursor: pointer; font-size: 14px; padding: 0; }

.btn {
  display: inline-block; background: #e6e9ef; color: #323338; border: none;
  padding: 7px 14px; border-radius: 6px; font-size: 14px; cursor: pointer;
}
.btn:hover { background: #d0d4dd; text-decoration: none; }
.btn.primary { background: #0073ea; color: #fff; }
.btn.primary:hover { background: #005bb8; }
.btn.ghost { background: transparent; border: 1px solid #c3c6d4; }
.btn.danger { background: #e2445c; color: #fff; }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn.wide { width: 100%; }

.login-page { display: grid; place-items: center; min-height: 100vh; background: linear-gradient(135deg, #0073ea22, #00c87522); }
.login-card {
  background: #fff; padding: 36px 40px; border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0,0,0,.12); width: 360px;
}
.login-card h1 { margin: 0; text-align: center; }
.login-card .muted { text-align: center; margin-top: 4px; }
.login-card label { display: block; margin: 14px 0 4px; font-size: 14px; color: #676879; }
.login-card input {
  width: 100%; padding: 9px 10px; border: 1px solid #c3c6d4; border-radius: 6px; font-size: 15px;
}
.login-card button { margin-top: 18px; }
.alert { background: #fde8ec; color: #b21e37; padding: 9px 12px; border-radius: 6px; margin: 12px 0; font-size: 14px; }
.alert.ok { background: #e5f4ee; color: #007a5a; }

.muted { color: #676879; }
.small { font-size: 12px; }
.center { text-align: center; }

.workspace h2 { border-bottom: 1px solid #e6e9ef; padding-bottom: 6px; }
.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.board-card {
  background: #fff; border: 1px solid #e6e9ef; border-radius: 10px; padding: 14px 16px;
  transition: box-shadow .15s, transform .15s; color: #323338;
}
.board-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); transform: translateY(-1px); text-decoration: none; }
.board-name { font-weight: 600; }
.board-meta { color: #676879; font-size: 13px; margin-top: 4px; }

.board-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.board-actions { display: flex; gap: 8px; align-items: center; }

.group { margin-top: 22px; }
.group-title { margin: 0 0 6px; font-size: 16px; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid #e6e9ef; border-radius: 10px; }
table.items { border-collapse: collapse; width: 100%; font-size: 14px; }
table.items th, table.items td { border-bottom: 1px solid #eceff5; padding: 8px 10px; text-align: left; white-space: nowrap; }
table.items thead th { background: #f8f9fd; font-weight: 600; color: #676879; font-size: 13px; }
table.items tr:last-child td { border-bottom: none; }
.col-name { min-width: 260px; white-space: normal !important; }
.cell[data-editable] { cursor: pointer; }
.new-item input {
  border: none; width: 100%; padding: 6px; font-size: 14px; background: transparent; outline: none;
}

.chip {
  display: inline-block; color: #fff; border-radius: 4px; padding: 3px 10px;
  font-size: 13px; font-weight: 500; min-width: 70px; text-align: center;
}
.chip-empty { background: #f0f1f5; }
.avatar {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: #0073ea; color: #fff; font-size: 11px; font-weight: 700; margin-right: -6px;
  border: 2px solid #fff;
}
.filecount { color: #676879; }
.tag { border-radius: 4px; padding: 2px 8px; font-size: 12px; font-weight: 600; }
.cell-date { color: #676879; }

.kanban { display: flex; gap: 12px; overflow-x: auto; align-items: flex-start; padding-bottom: 20px; }
.lane { background: #eceff5; border-radius: 10px; min-width: 270px; width: 270px; flex-shrink: 0; }
.lane-title {
  font-weight: 600; padding: 10px 12px; border-top: 4px solid #c4c4c4;
  border-radius: 10px 10px 0 0; background: #fff; font-size: 14px;
}
.lane-cards { padding: 10px; min-height: 60px; display: flex; flex-direction: column; gap: 8px; }
.card {
  background: #fff; border-radius: 8px; padding: 10px 12px; box-shadow: 0 1px 3px rgba(0,0,0,.08);
  cursor: grab;
}
.card-title { color: #323338; font-weight: 500; display: block; }
.card-meta { display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.sortable-ghost { opacity: .4; }

.crumbs { margin: 8px 0; color: #676879; }
.item-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
#item-name { outline: none; border-radius: 6px; padding: 2px 6px; }
#item-name:focus { background: #fff; box-shadow: 0 0 0 2px #0073ea55; }
.item-layout { display: grid; grid-template-columns: 1fr 380px; gap: 28px; }
@media (max-width: 900px) { .item-layout { grid-template-columns: 1fr; } }

.comment { background: #fff; border: 1px solid #e6e9ef; border-radius: 10px; padding: 12px 14px; margin: 10px 0; }
.comment.reply { background: #f8f9fd; margin: 8px 0; }
.comment-head { display: flex; justify-content: space-between; }
.comment-body { margin-top: 6px; overflow-wrap: anywhere; }
.comment-body img { max-width: 100%; }
.comment-form textarea {
  width: 100%; border: 1px solid #c3c6d4; border-radius: 8px; padding: 9px; font-size: 14px;
  font-family: inherit; resize: vertical;
}
.comment-form button { margin-top: 6px; }
.reply-box summary { cursor: pointer; }

.props { width: 100%; font-size: 14px; border-collapse: collapse; }
.props th { text-align: left; color: #676879; font-weight: 500; padding: 6px 8px 6px 0; width: 40%; vertical-align: top; }
.props td { padding: 4px 0; }
.props input[type="text"], .props input[type="url"], .props input[type="number"], .props input[type="date"], .props select {
  width: 100%; padding: 6px 8px; border: 1px solid #c3c6d4; border-radius: 6px; font-size: 13px; background: #fff;
}
.files { list-style: none; padding: 0; }
.files li { padding: 5px 0; border-bottom: 1px solid #eceff5; }
.upload-form { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.subitems { padding-left: 18px; }

.notif-list { list-style: none; padding: 0; }
.notif-list li { background: #fff; border: 1px solid #e6e9ef; border-radius: 8px; padding: 10px 14px; margin: 8px 0; display: flex; justify-content: space-between; gap: 10px; }
.notif-list li.unread { border-left: 4px solid #0073ea; }

.admin-table input[type="text"], .admin-table input[type="email"], .admin-table input[type="password"], .admin-table input:not([type]) {
  padding: 6px 8px; border: 1px solid #c3c6d4; border-radius: 6px; font-size: 13px; width: 100%;
}

.status-popup {
  position: absolute; background: #fff; border: 1px solid #e6e9ef; border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0,0,0,.15); padding: 6px; z-index: 100;
  display: flex; flex-direction: column; gap: 4px; min-width: 160px;
}
.status-popup .chip { cursor: pointer; }
