/* Board team modal, role-based board mode */

/* ---------- Role-based visibility ---------- */
body[data-board-role="guest"] .nav-btn[data-view="analytics"],
body[data-board-role="guest"] #global-new-btn,
body[data-board-role="guest"] #nav-archive-btn,
body[data-board-role="guest"] #archive-task-btn,
body[data-board-role="guest"] #delete-reel-btn,
body[data-board-role="guest"] #detail-metrics,
body[data-board-role="guest"] #detail-utm,
body[data-board-role="guest"] #detail-assignees-group,
body[data-board-role="client"] #detail-assignees-group { display: none !important; }
body[data-board-role="guest"] .kanban-card { cursor: pointer; }
body[data-board-role="guest"] .vc-team, body[data-board-role="guest"] .vc-hint,
body[data-board-role="client"] .vc-team { display: none !important; }
body:not([data-board-role="owner"]):not([data-board-role="manager"]) .tm-lead-only { display: none !important; }
#details-modal [readonly]:not(#modal-utm-link), #details-modal select:disabled { opacity: .72; cursor: default; }

/* ---------- Modal shell ---------- */
#team-modal.tm-modal {
    width: min(980px, calc(100vw - 32px));
    max-width: 980px;
    max-height: calc(100vh - 48px);
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    background: #FFFFFF;
    border: 1px solid #E1E1E5;
    border-radius: 18px;
    box-shadow: 0 1px 2px rgba(18, 18, 20,.06), 0 24px 60px -18px rgba(18, 18, 20,.28);
    color: #19191C;
}
#team-modal .tm-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    padding: 22px 26px 16px; margin: 0;
    border-bottom: 1px solid #E9E9EB;
}
#team-modal .tm-header h2 { margin: 0; font-size: 19px; font-weight: 700; color: #19191C; }
#team-modal .tm-sub { margin: 4px 0 0; font-size: 13px; color: #7C7C8B; }
#team-modal .close-btn { color: #7C7C8B; }

#team-modal .tm-body {
    display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
    padding: 20px 26px; overflow-y: auto; flex: 1; min-height: 0;
    background: linear-gradient(180deg, #F2F2F4 0%, #F6F6F7 100%);
}
#team-modal .tm-foot {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 14px 26px; border-top: 1px solid #E9E9EB;
    font-size: 12.5px; line-height: 1.5; color: #646470; background: #FFFFFF;
}
#team-modal .tm-foot i { font-size: 17px; color: #1A1A1D; margin-top: 1px; }

/* ---------- Columns ---------- */
.tm-col {
    background: #FFFFFF; border: 1px solid #E5E5E8; border-radius: 14px;
    padding: 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0;
    box-shadow: 0 1px 2px rgba(18, 18, 20,.05), 0 10px 24px -14px rgba(18, 18, 20,.18);
}
.tm-col-head { display: flex; align-items: center; gap: 8px; }
.tm-col-head h3 { margin: 0; font-size: 15px; font-weight: 700; color: #19191C; }
.tm-count { font-size: 11px; font-weight: 700; color: #121214; background: #EDEDEF; border-radius: 999px; padding: 2px 8px; }
.tm-info {
    margin: 0; font-size: 12.5px; line-height: 1.55; color: #575762;
    background: #F4F4F6; border: 1px solid #E9E9EB; border-radius: 10px; padding: 10px 12px;
}
.tm-note { margin: 0; font-size: 12.5px; color: #7C7C8B; }

/* ---------- Form ---------- */
.tm-form { display: flex; flex-direction: column; gap: 8px; }
.tm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tm-input {
    width: 100%; box-sizing: border-box; min-width: 0;
    height: 38px; padding: 0 12px;
    background: #FFFFFF !important; color: #19191C !important;
    border: 1px solid #D8D8DD !important; border-radius: 9px;
    font: inherit; font-size: 13px; outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.tm-input::placeholder { color: #9B9BA7; }
.tm-input:focus { border-color: #1A1A1D !important; box-shadow: 0 0 0 3px rgba(26, 26, 29,.14); }
.tm-input.is-bad { border-color: #D2694B !important; box-shadow: 0 0 0 3px rgba(210,105,75,.12); }
select.tm-input { padding-right: 28px; cursor: pointer; }
.tm-btn {
    height: 38px; border: 0; border-radius: 9px; cursor: pointer;
    background: #1A1A1D; color: #FFFFFF; font: inherit; font-size: 13px; font-weight: 600;
    box-shadow: 0 6px 16px -8px rgba(26, 26, 29,.7);
    transition: background .15s;
}
.tm-btn:hover { background: #121214; }
.tm-btn:disabled { opacity: .6; cursor: default; }
.tm-btn-ghost {
    height: 34px; padding: 0 12px; border-radius: 8px; cursor: pointer; flex: none;
    background: #FFFFFF; color: #121214; border: 1px solid #D8D8DD; font: inherit; font-size: 12px; font-weight: 600;
}
.tm-btn-ghost:disabled { color: #ACACB6; cursor: default; }
.tm-msg { font-size: 12px; min-height: 0; }
.tm-msg.is-err { color: #C0563A; }
.tm-msg.is-ok { color: #2F8A5E; }

/* ---------- People ---------- */
.tm-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.tm-empty { font-size: 13px; color: #7C7C8B; padding: 14px; text-align: center; border: 1px dashed #D8D8DD; border-radius: 10px; }
.tm-person { border: 1px solid #E9E9EB; border-radius: 12px; padding: 10px 12px; background: #FCFBFE; display: flex; flex-direction: column; gap: 8px; }
.tm-person-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tm-avatar {
    width: 32px; height: 32px; flex: none; border-radius: 50%;
    display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #FFFFFF;
    background: var(--a, #1A1A1D);
}
.tm-person-main { min-width: 0; flex: 1; }
.tm-name { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: #19191C; flex-wrap: wrap; }
.tm-email { font-size: 12px; color: #7C7C8B; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-badge {
    display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .02em;
    color: #121214; background: #EBEBED; border-radius: 999px; padding: 2px 8px;
}
.tm-badge.is-manager { color: #8A5A12; background: #FBF1DE; }
.tm-icon {
    width: 28px; height: 28px; flex: none; border-radius: 8px; border: 0; cursor: pointer;
    background: transparent; color: #8F8F9C; display: grid; place-items: center; font-size: 15px;
}
.tm-icon:hover { background: #F6E9E5; color: #C0563A; }
.tm-person-edit { display: flex; gap: 6px; align-items: center; }
.tm-person-edit select.tm-input { width: 150px; flex: none; height: 34px; font-size: 12px; }
.tm-person-edit .tm-hook { flex: 1; height: 34px; font-size: 12px; }

/* ---------- My boards ---------- */
.tm-muted { color: var(--text-muted); font-size: 14px; }
#freelancer-dashboard .tm-badge { font-size: 11px; }

@media (max-width: 820px) {
    #team-modal .tm-body { grid-template-columns: 1fr; }
    .tm-row { grid-template-columns: 1fr; }
    .tm-person-edit { flex-wrap: wrap; }
    .tm-person-edit select.tm-input { width: 100%; }
}

/* ---------- Loading screen (until Firebase knows who is logged in) ---------- */
body.booting #login-overlay .login-box { visibility: hidden; }
body.booting #login-overlay::after {
    content: ''; position: absolute; top: 50%; left: 50%;
    width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%;
    border: 3px solid #E0E0E4; border-top-color: #1A1A1D;
    animation: tm-spin .8s linear infinite;
}
@keyframes tm-spin { to { transform: rotate(360deg); } }

/* ---------- Backups modal (owners) ---------- */
#backup-modal.bk-modal {
    width: min(760px, calc(100vw - 32px)); max-width: 760px; max-height: calc(100vh - 48px);
    flex-direction: column; padding: 0; overflow: hidden;
    background: #FFFFFF; border: 1px solid #E1E1E5; border-radius: 18px;
    box-shadow: 0 1px 2px rgba(18, 18, 20,.06), 0 24px 60px -18px rgba(18, 18, 20,.28); color: #19191C;
}
#backup-modal .bk-header { display: flex; align-items: flex-start; justify-content: space-between; padding: 22px 26px 16px; margin: 0; border-bottom: 1px solid #E9E9EB; }
#backup-modal .bk-header h2 { margin: 0; font-size: 19px; font-weight: 700; color: #19191C; }
#backup-modal .bk-sub { margin: 4px 0 0; font-size: 13px; color: #7C7C8B; }
#backup-modal .close-btn { color: #7C7C8B; }
#backup-modal .bk-body { padding: 18px 26px; overflow-y: auto; flex: 1; min-height: 0; background: linear-gradient(180deg, #F2F2F4 0%, #F6F6F7 100%); display: flex; flex-direction: column; gap: 14px; }
#backup-modal .bk-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
#backup-modal .bk-actions .tm-btn, #backup-modal .bk-file { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
#backup-modal .bk-msg { font-size: 12.5px; color: #121214; }
#backup-modal .bk-msg.err { color: #C0504D; }
#backup-modal .bk-scope { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: #646470; }
#backup-modal .bk-scope select { width: auto; min-width: 220px; }
#backup-modal .bk-list { display: flex; flex-direction: column; gap: 8px; }
#backup-modal .bk-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #FFFFFF; border: 1px solid #E9E9EB; border-radius: 12px; box-shadow: 0 1px 2px rgba(18, 18, 20,.04); }
#backup-modal .bk-row-main { flex: 1; min-width: 0; }
#backup-modal .bk-row-main b { display: block; font-size: 13.5px; color: #19191C; }
#backup-modal .bk-row-main span { display: block; margin-top: 2px; font-size: 12px; color: #7C7C8B; }
#backup-modal .bk-row-main em { font-style: normal; color: #B5762E; }
#backup-modal .bk-row-act { display: flex; gap: 6px; }
#backup-modal .bk-row-act .tm-btn-ghost { padding: 6px 10px; font-size: 12.5px; }
#backup-modal .bk-danger { color: #B04A47; }
#backup-modal .bk-foot { display: flex; gap: 10px; align-items: flex-start; padding: 14px 26px; border-top: 1px solid #E9E9EB; font-size: 12.5px; line-height: 1.5; color: #646470; background: #FFFFFF; }
#backup-modal .bk-foot i { font-size: 17px; color: #1A1A1D; margin-top: 1px; }
#backup-modal .bk-actions .tm-btn { padding: 0 16px; }

/* Assignee checkboxes: don't inherit the full-width text input look */
#details-modal #detail-assignees-list .assignee-checkbox {
    width: 16px !important; height: 16px; min-width: 16px; flex: 0 0 auto; margin: 0; padding: 0;
    background: none !important; border: none !important; box-shadow: none !important; accent-color: #1A1A1D;
}

/* Freelancers: Avatar & Content Bank and Brand Intake are read-only */
body[data-board-role="guest"] #manage-kb-categories-btn,
body[data-board-role="guest"] #kb-sections-container button[onclick^="deleteKB"],
body[data-board-role="guest"] #save-kb-btn,
body[data-board-role="guest"] #delete-kb-btn,
body[data-board-role="guest"] #profile-save-status { display: none !important; }
body[data-board-role="guest"] #view-profile input[readonly] { cursor: default; }
/* A card that isn't assigned to this freelancer opens read-only */
#details-modal.guest-readonly #detail-review-status { pointer-events: none; }
/* Freelancers: their own cards stand out */
body[data-board-role="guest"] .kanban-card.is-mine { box-shadow: 0 0 0 2px #19191C; position: relative; }
body[data-board-role="guest"] .kanban-card.is-mine::after { content: 'Yours'; position: absolute; top: -9px; right: 10px; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; color: #FFFFFF; background: #19191C; border-radius: 99px; padding: 2px 8px; }


/* Add-to-board popups: Discord webhook, then the Google Drive reminder */
.tm-pop { max-width: 480px; width: calc(100% - 32px); }
.tm-pop .sl-modal-title { display: flex; gap: 8px; align-items: center; }
.tm-pop-text { margin: 4px 0 12px; font-size: 14px; line-height: 1.5; color: #4A4A55; }
.tm-pop .tm-input { width: 100%; box-sizing: border-box; margin: 0; }
.tm-pop-err { color: #B42318; font-size: 13px; min-height: 18px; margin-top: 8px; }
.tm-pop-note { font-size: 13px; line-height: 1.45; padding: 9px 12px; border-radius: 10px; margin-bottom: 14px; background: #F4F4F7; color: #55555F; }
.tm-pop-note.ok { background: #EAF8F0; color: #17663D; }
.tm-pop-note.warn { background: #FFF6E6; color: #8A5A00; }
.tm-pop-mail { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid #E2E2E5; border-radius: 12px; background: #FAFAFC; font-size: 15px; margin-bottom: 12px; word-break: break-all; }
.tm-pop-steps { margin: 0; padding-left: 20px; font-size: 13.5px; line-height: 1.6; color: #55555F; }


/* ---------- Client owners: one clean block ---------- */
#team-modal .tm-owners { grid-column: 1 / -1; gap: 14px; margin-bottom: 2px; }
.tm-owners-head { display: flex; align-items: center; gap: 14px; }
.tm-owners-ico { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 20px; color: #8A5A12; background: linear-gradient(135deg, #FFF3DC, #FBE6BC); box-shadow: inset 0 0 0 1px rgba(138, 90, 18, .12); }
.tm-owners-title { min-width: 0; }
.tm-owners-title p { margin: 3px 0 0; font-size: 12.5px; line-height: 1.45; color: #7C7C8B; }
.tm-form.tm-owner-add { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px; background: #F6F6F8; border: 1px solid #E9E9EB; border-radius: 12px; }
.tm-owner-field { flex: 1 1 280px; min-width: 0; position: relative; display: block; margin: 0; }
.tm-owner-field i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 16px; color: #9B9BA7; pointer-events: none; }
.tm-owner-field .tm-input { height: 42px; padding-left: 38px; font-size: 13.5px; }
.tm-owner-btn { flex: none; height: 42px; padding: 0 18px; display: inline-flex; align-items: center; gap: 8px; width: auto; margin: 0; }
.tm-owner-btn i { font-size: 16px; }
.tm-owner-msg { width: 100%; }
.tm-owner-msg:empty { display: none; }
.tm-owner-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.tm-owner-card { flex-direction: row; align-items: center; gap: 12px; padding: 12px 14px; background: #FFFFFF; transition: border-color .15s, box-shadow .15s; }
.tm-owner-card:hover { border-color: #D2D2D8; box-shadow: 0 6px 16px -10px rgba(18, 18, 20, .25); }
.tm-owner-card.is-primary { background: linear-gradient(135deg, #FFFCF4, #FFFFFF 60%); border-color: #F0E2C0; }
.tm-owner-card .tm-avatar { width: 38px; height: 38px; font-size: 13px; }
.tm-owner-mail { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.tm-owner-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; font-size: 12px; color: #7C7C8B; }
.tm-owner-ok { display: inline-flex; align-items: center; gap: 6px; color: #2F8A5E; font-weight: 600; }
.tm-owner-ok i { width: 7px; height: 7px; border-radius: 50%; background: #3FA57A; box-shadow: 0 0 0 3px rgba(63, 165, 122, .18); }

/* ---------- Assignees as roles: Script / Thumbnail / Host / Edit (app.js: renderAssigneeRoles) ---------- */
#details-modal #detail-assignee-roles {
    display: flex; flex-direction: column; gap: 10px; padding: 12px;
    background: #F5F5F6; border: 1px solid #E6E6E9; border-radius: 14px;
}
#details-modal #detail-assignee-roles .ar-row {
    --c: #6B7280; --bg: #EEEFF2; --bd: #DADCE2; --ink: #3A3D47;
    display: grid; grid-template-columns: 74px minmax(0, 1fr); align-items: center; column-gap: 6px; row-gap: 8px;
    padding: 9px 9px 9px 11px; border-radius: 12px;
    background: var(--bg); border: 1px solid var(--bd); border-left: 4px solid var(--c);
}
#details-modal #detail-assignee-roles .ar-script { --c: #3B6FD4; --bg: #E8F0FE; --bd: #C9DAF8; --ink: #27489C; }
#details-modal #detail-assignee-roles .ar-thumb  { --c: #D6455F; --bg: #FDE9EE; --bd: #F5C9D3; --ink: #9C2A44; }
#details-modal #detail-assignee-roles .ar-host   { --c: #7C55D8; --bg: #EFE9FC; --bd: #D9CEF5; --ink: #52329C; }
#details-modal #detail-assignee-roles .ar-edit   { --c: #2E9462; --bg: #E4F4EB; --bd: #BFE3CE; --ink: #1B6B43; }
#details-modal #detail-assignee-roles .ar-label { font-size: 13px; font-weight: 800; color: var(--ink); line-height: 1.2; }
#details-modal #detail-assignee-roles .ar-main { display: flex; align-items: center; gap: 6px; min-width: 0; }
#details-modal #detail-assignee-roles .ar-select {
    flex: 1 1 auto; min-width: 0; width: auto; height: 36px; margin: 0; padding: 0 4px 0 8px;
    border-radius: 10px; font: 600 13px/1 inherit; cursor: pointer; text-overflow: ellipsis;
    box-shadow: 0 1px 2px rgba(25, 25, 28, .06);
}
#details-modal #detail-assignee-roles .ar-select:focus { outline: none; border-color: var(--c) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent) !important; }
#details-modal #detail-assignee-roles .ar-sub { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
#details-modal #detail-assignee-roles .ar-sub > span { font-size: 11.5px; font-weight: 700; color: var(--ink); opacity: .85; white-space: nowrap; }
#details-modal #detail-assignee-roles .ar-min {
    width: 104px; height: 32px; margin: 0; padding: 0 10px; border-radius: 9px; font: 700 13.5px/1 inherit; text-align: center;
}
#details-modal #detail-assignee-roles .ar-min:focus { outline: none; border-color: var(--c) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent) !important; }
#details-modal #detail-assignee-roles .ar-suggest, #details-modal #detail-assignee-roles .ar-add {
    display: inline-flex; align-items: center; gap: 6px; font: 650 12.5px/1 inherit; cursor: pointer;
    border-radius: 9px; padding: 7px 11px; background: #fff; color: #2A2A31; border: 1px dashed #BEBEC6;
}
#details-modal #detail-assignee-roles .ar-suggest { color: var(--ink); border-color: var(--c); border-style: solid; background: rgba(255, 255, 255, .7); }
#details-modal #detail-assignee-roles .ar-suggest:hover { background: #fff; }
#details-modal #detail-assignee-roles .ar-add { align-self: flex-start; border-style: solid; border-color: #D5D5DB; font-weight: 700; padding: 9px 14px; box-shadow: 0 1px 2px rgba(25, 25, 28, .06); }
#details-modal #detail-assignee-roles .ar-add:hover { background: #FAFAFB; border-color: #A9A9B3; }
#details-modal #detail-assignee-roles .ar-x {
    flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px; border: 1px solid #DADADF; background: #fff; color: #7A7A86;
    font-size: 18px; line-height: 1; cursor: pointer; padding: 0;
}
#details-modal #detail-assignee-roles .ar-x:hover { color: #B04848; border-color: #F0CACA; background: #FFF6F6; }

/* ---------- Production numbers inside the role rows (admins + managers) ---------- */
#details-modal #detail-assignee-roles .ar-note { display: flex; align-items: center; gap: 6px; padding: 0 2px 2px; font-size: 11.5px; font-weight: 600; color: #8A8A96; }
#details-modal #detail-assignee-roles .ar-note i { font-size: 13px; }
#details-modal #detail-assignee-roles .ar-minwrap { display: inline-flex; align-items: center; gap: 6px; }
#details-modal #detail-assignee-roles .ar-more {
    flex: 0 0 auto; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; padding: 0;
    border-radius: 9px; border: 1px solid rgba(0, 0, 0, .08); background: rgba(255, 255, 255, .75); color: var(--ink); font-size: 16px; cursor: pointer;
    transition: background .15s, box-shadow .15s;
}
#details-modal #detail-assignee-roles .ar-more:hover { background: #fff; box-shadow: 0 1px 3px rgba(25, 25, 28, .12); }
#details-modal #detail-assignee-roles .ar-badge {
    font-style: normal; font-size: 9.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 2px 6px; border-radius: 999px; margin-left: 4px;
    background: #fff; color: #8A6A1E; border: 1px solid #EBD9A8; vertical-align: middle;
}
#details-modal #detail-assignee-roles .ar-badge.checked { color: #1B6B43; border-color: #BFE3CE; }

/* ---------- Role rows: same colours and finish as the delivery cards (board-cards.css) ---------- */
#details-modal #detail-assignee-roles { background: #F1F0ED; border-color: #DAD9D4; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6); }
#details-modal #detail-assignee-roles .ar-script { --c: #3C64AE; }
#details-modal #detail-assignee-roles .ar-thumb  { --c: #AC4468; }
#details-modal #detail-assignee-roles .ar-host   { --c: #6A4FB8; }
#details-modal #detail-assignee-roles .ar-edit   { --c: #3B8663; }
#details-modal #detail-assignee-roles .ar-row {
    --ink: color-mix(in srgb, var(--c) 82%, #16161C);
    background: linear-gradient(160deg, color-mix(in srgb, var(--c) 7%, #F5F4F2) 0%, color-mix(in srgb, var(--c) 15%, #E8E7E4) 100%);
    border: 1px solid color-mix(in srgb, var(--c) 30%, #D3D2CE); border-left: 4px solid var(--c);
    box-shadow: 0 1px 2px rgba(24, 24, 32, .10), 0 8px 18px -10px rgba(24, 24, 32, .30), inset 0 1px 0 rgba(255, 255, 255, .55);
}
#details-modal #detail-assignee-roles .ar-select, #details-modal #detail-assignee-roles .ar-min {
    background-color: #FDFCFB; border: 1px solid #D5D4D0; box-shadow: 0 1px 2px rgba(24, 24, 32, .08), inset 0 1px 2px rgba(24, 24, 32, .03);
}
#details-modal #detail-assignee-roles .ar-select:focus, #details-modal #detail-assignee-roles .ar-min:focus {
    border-color: color-mix(in srgb, var(--c) 70%, #55555F) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 16%, transparent) !important;
}
#details-modal #detail-assignee-roles .ar-more { background: #FDFCFB; border: 1px solid #D5D4D0; color: var(--ink); box-shadow: 0 1px 2px rgba(24, 24, 32, .08); }
#details-modal #detail-assignee-roles .ar-more:hover { background: #fff; box-shadow: 0 4px 10px -6px rgba(24, 24, 32, .38); }
#details-modal #detail-assignee-roles .ar-x { background: #FDFCFB; border-color: #D5D4D0; }
#details-modal #detail-assignee-roles .ar-suggest { background: rgba(255, 255, 255, .6); border-color: color-mix(in srgb, var(--c) 45%, #CFCEC9); }
#details-modal #detail-assignee-roles .ar-badge { background: rgba(255, 255, 255, .7); }
#details-modal #detail-assignee-roles .ar-add { background: #FDFCFB; border-color: #D5D4D0; }

/* Agency edit manager: no inviting clients, no deleting clients/activities, no backups (also enforced by the database rules) */
body.edit-manager #admin-side-col,
body.edit-manager #admin-invite-card,
body.edit-manager #backup-btn,
body.edit-manager button[onclick="SC_inviteClient()"],
body.edit-manager button[onclick="SC_delete()"],
body.edit-manager button[onclick^="SC_delActivity"] { display: none !important; }

/* Amount row never pushes the ... button outside the box */
#details-modal #detail-assignee-roles .ar-minwrap { min-width: 0; flex: 0 1 auto; }
#details-modal #detail-assignee-roles .ar-min { min-width: 0; }
#details-modal #detail-assignee-roles .ar-more { flex-shrink: 0; }
