.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: 100%; max-width: 440px; padding: 36px; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: 0 12px 40px #2832440a; }
.login-card h1 { margin: 24px 0 12px; font-size: 28px; }
.login-card p { color: #718096; line-height: 1.6; }
.login-card form { display: grid; gap: 20px; margin-top: 24px; }
.member-list { margin-bottom: 20px; }
.member-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.member-row small { display: block; margin-top: 5px; }
.member-row button { margin: 3px; font-size: 12px; padding: 8px 10px; }
.actor > span { font-size: 13px; }
#invite-link { font-family: monospace; font-size: 12px; }
@media (max-width: 620px) { .member-row { flex-wrap: wrap; } .login-card { padding: 24px; } .actor { gap: 8px; flex-wrap: wrap; } .actor button { padding: 8px; } }
/* Keep portal modules reachable when the production sidebar collapses on mobile. */
@media (max-width: 820px) {
  .sidebar { flex-wrap: wrap; }
  .sidebar .module-navigation { display: block; flex-basis: 100%; }
  .module-navigation .section-label { display: none; }
  .module-navigation .nav-item { padding: 8px 10px; background: #f0edf7; border-radius: 8px; }
}
.product-space { min-width: 0; }
.product-space select { text-overflow: ellipsis; }
@media (max-width: 820px) {
  .sidebar .product-space { max-width: 220px; flex: 1 1 150px; }
  .product-space label[for="product-filter"] { display: block; padding: 6px 5px 0; font-size: 9px; }
}
.task-type-field { border: 0; padding: 0; margin: 0; min-width: 0; }
.task-type-field legend { font-size: 12px; font-weight: 600; color: #7f899c; margin-bottom: 10px; }
.task-type-field small { display: block; margin-top: 8px; color: #8993a5; }
.task-type-switch { display: flex; padding: 4px; gap: 4px; border: 1px solid #e0e4ec; background: #f3f1f8; border-radius: 12px; width: min(100%, 440px); }
.task-type-option { position: relative; flex: 1; min-width: 0; cursor: pointer; margin: 0 !important; }
.task-type-option input { position: absolute; opacity: 0; width: 1px; height: 1px; padding: 0; }
.task-type-option span { display: block; text-align: center; padding: 12px 10px; border-radius: 8px; color: #7f899c; font-size: 13px; transition: background .15s, color .15s; }
.task-type-option input:checked + span { background: white; color: #6c58a2; font-weight: 600; box-shadow: 0 2px 7px #28324412; }
.task-type-option input:focus-visible + span { outline: 3px solid #b9b0ea; outline-offset: 1px; }
.iteration-field[hidden] { display: none; }
.iteration-field select { width: 100%; max-width: 100%; }
.task-type-summary { display: grid; gap: 7px; padding: 13px 15px; margin-bottom: 18px; border-radius: 9px; background: #f3f1f8; }
.task-type-summary span { font-size: 10px; color: #8993a5; }
.task-type-summary strong { font-size: 13px; color: #6c58a2; font-weight: 600; overflow-wrap: anywhere; }
.form-field input.has-duplicate { border-color: #c33f45; background: #fff8f7; }
.form-field input.has-duplicate:focus { border-color: #c33f45; box-shadow: 0 0 0 3px #c33f451a; }
.duplicate-feedback { color: #7f899c; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.duplicate-feedback:empty { display: none; }
.duplicate-feedback.has-matches { padding: 12px 14px; background: #fff2f1; border: 1px solid #f0cdca; border-radius: 10px; color: #a62d35; }
.duplicate-feedback ul { margin: 6px 0 8px; padding-left: 20px; max-height: 220px; overflow-y: auto; }
.duplicate-feedback li { margin-bottom: 7px; }
.duplicate-feedback a { color: #a62d35; text-decoration: underline; font-weight: 600; }
.duplicate-feedback li span { display: block; font-size: 11px; }
.trash-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 18px 20px; margin-bottom: 18px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.trash-tools strong { font-size: 14px; }
.trash-tools small { display: block; margin-top: 6px; color: #7f899c; }
.trash-tools p { width: 100%; margin: 0; color: #a62d35; font-size: 12px; }
.trash-tool-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-left: auto; }
.trash-tool-actions button { color: #a62d35; border-color: #f0cdca; }
.trash-select-cell { width: 48px; text-align: center; padding: 16px !important; }
td.trash-select-cell { min-width: 48px; }
td.trash-select-cell + td { min-width: 235px; }
.trash-select-cell input { width: 19px; height: 19px; accent-color: #8871bd; cursor: pointer; }
.purge-warning { color: #a62d35; background: #fff2f1; border: 1px solid #f0cdca; border-radius: 10px; padding: 14px 18px; font-size: 13px; line-height: 1.6; }
.purge-warning ul { max-height: 220px; overflow: auto; padding-left: 20px; overflow-wrap: anywhere; }
.purge-warning li { margin-bottom: 6px; }
.text-toolbar { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; padding: 6px; border: 1px solid #e0e4ec; border-radius: 9px 9px 0 0; background: #f8f9fc; margin-bottom: -1px; }
.text-toolbar button { min-width: 34px; padding: 5px 9px; min-height: 32px; font-size: 13px; border-color: transparent; background: transparent; }
.text-toolbar button:hover { background: #eeeaf8; color: #6c58a2; }
.form-field textarea[data-rich-text] { border-radius: 0 0 9px 9px; }
.text-preview { margin-top: 7px; border: 1px solid #e4e1ee; border-radius: 9px; overflow: hidden; }
.text-preview summary { cursor: pointer; padding: 9px 12px; font-size: 12px; color: #76639e; background: #faf9fd; }
.text-preview > .rich-text { padding: 12px; border-top: 1px solid #e4e1ee; }
.rich-text { font-size: 13px; line-height: 1.7; color: #536077; overflow-wrap: anywhere; }
.rich-text.muted { color: #98a1af; }
.rich-text strong { font-weight: 750; }
.rich-text em { font-style: italic; }
.rich-paragraph { white-space: pre-wrap; }
.rich-text blockquote { white-space: pre-wrap; margin: 10px 0; padding: 10px 14px; border-left: 3px solid #9b86c6; background: #f5f2fb; border-radius: 0 7px 7px 0; }
.rich-text > :first-child { margin-top: 0; }
.rich-text > :last-child { margin-bottom: 0; }
