/* Cases module (rd92) */
.cs-panel { padding: 18px; }
.cs-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cs-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cs-chip { border: 1px solid #D8E2EE; background: #fff; color: #33506E; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.cs-chip.on { background: #0B65AD; border-color: #0B65AD; color: #fff; }
.cs-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cs-tools input[type="search"] { min-height: 38px; }
.cs-mine { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 600; color: #33506E; }
.cs-list { display: flex; flex-direction: column; gap: 8px; }
.cs-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: #fff; border: 1px solid #E2EAF3; border-radius: 12px; padding: 12px 14px; cursor: pointer; }
.cs-row:hover { border-color: #B9CFE6; }
.cs-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cs-row-main b { font-size: 15px; color: #14273F; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-row-main small { font-size: 12px; color: #7A8DA3; }
.cs-prio { flex: none; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; border-radius: 999px; padding: 4px 9px; }
.cs-prio.high { background: #FDE8E8; color: #B42318; }
.cs-prio.normal { background: #E3EEFB; color: #0B65AD; }
.cs-prio.low { background: #EEF2F6; color: #64798E; }
.cs-status { flex: none; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 4px 9px; background: #EEF2F6; color: #33506E; }
.cs-status.open { background: #E7F6EC; color: #157347; }
.cs-status.in_progress { background: #FFF3D6; color: #8A6100; }
.cs-status.pending { background: #F1E9FD; color: #6633B8; }
.cs-status.closed { background: #E8ECEF; color: #5B6B7B; }
.cs-dots { display: inline-flex; }
.cs-dot { width: 26px; height: 26px; border-radius: 50%; color: #fff; font-size: 10px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; border: 2px solid #fff; margin-left: -6px; flex: none; }
.cs-dot:first-child { margin-left: 0; }
.cs-dot.more { background: #94A9BE; }
.cs-none { color: #8CA0B5; font-size: 13px; }
.cs-empty { color: #7A8DA3; text-align: center; padding: 26px 10px; }
.cs-card { max-width: 640px; }
.cs-close { background: none; border: 0; font-size: 26px; line-height: 1; color: #64798E; cursor: pointer; padding: 4px 8px; }
.cs-body label { display: block; font-size: 13px; font-weight: 600; color: #33506E; margin-bottom: 12px; }
.cs-body input[type="text"], .cs-body input:not([type]), .cs-body textarea, .cs-body select { width: 100%; margin-top: 5px; }
.cs-meta { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.cs-meta label { flex: 1; min-width: 130px; margin-bottom: 0; }
.cs-byline { font-size: 12px; color: #7A8DA3; margin: 10px 0 4px; }
.cs-sec-head { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 8px; }
.cs-sec-head h3 { font-size: 14px; color: #14273F; margin: 0; }
.cs-assignees { display: flex; flex-wrap: wrap; gap: 8px; }
.cs-person { display: inline-flex; align-items: center; gap: 7px; background: #F2F6FB; border-radius: 999px; padding: 4px 12px 4px 4px; font-size: 13px; font-weight: 600; color: #24405C; }
.cs-person .cs-dot { margin-left: 0; border: 0; }
.cs-desc { font-size: 14px; color: #24405C; line-height: 1.55; margin: 0; }
.cs-inline-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }
.cs-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; max-height: 320px; overflow-y: auto; }
.cs-ev { display: flex; gap: 10px; align-items: flex-start; }
.cs-ev .cs-dot { margin-left: 0; border: 0; margin-top: 1px; }
.cs-ev-main { flex: 1; min-width: 0; }
.cs-ev-head { display: flex; gap: 8px; align-items: baseline; }
.cs-ev-head b { font-size: 13px; color: #14273F; }
.cs-menu-wrap { position: relative; margin-left: auto; }
.cs-menu-btn { width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: #8CA0B5; display: grid; place-items: center; cursor: pointer; }
.cs-menu-btn:active { background: #EEF3F9; }
.cs-menu { position: absolute; right: 0; top: calc(100% + 2px); z-index: 40; background: #fff; border: 1px solid #E3EBF4; border-radius: 12px; box-shadow: 0 12px 32px rgba(20,39,63,.16); padding: 6px; min-width: 158px; }
.cs-menu-main { display: flex; flex-direction: column; }
.cs-menu-main button { border: 0; background: none; text-align: left; font: inherit; font-size: 13.5px; font-weight: 600; color: #14273F; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.cs-menu-main button:active { background: #F2F6FB; }
.cs-menu-main .cs-menu-del { color: #D64545; }
.cs-confirm { position: fixed; inset: 0; z-index: 90; background: rgba(13,22,38,.45); display: flex; align-items: center; justify-content: center; padding: 22px; animation: pvFade .15s ease-out; }
.cs-confirm-card { background: #fff; border-radius: 18px; padding: 22px 20px 18px; width: min(320px, 100%); box-shadow: 0 24px 60px rgba(13,22,38,.35); text-align: center; animation: pvIn .18s ease-out; }
.cs-confirm-card h3 { margin: 0 0 6px; font-size: 17px; color: #14273F; }
.cs-confirm-card p { margin: 0 0 18px; font-size: 13.5px; color: #68788E; line-height: 1.5; }
.cs-confirm-row { display: flex; gap: 10px; }
.cs-confirm-row .btn { flex: 1; min-height: 44px; border-radius: 12px; font-size: 14px; }
.btn.danger-solid { background: #D64545; border-color: #D64545; color: #fff; }
.cs-edit-box { margin-top: 8px; }
.cs-edit-text { width: 100%; box-sizing: border-box; border: 1.5px solid #D8E2EE; border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 14px; color: #14273F; resize: vertical; }
.cs-edit-box .cs-photos { margin-top: 8px; }
.cs-edit-box .cs-inline-actions { margin-top: 10px; }
.cs-ev-head time, .cs-ev time { font-size: 11px; color: #8CA0B5; }
.cs-ev p { margin: 2px 0 0; font-size: 14px; color: #24405C; line-height: 1.5; }
.cs-ev.system { color: #8CA0B5; font-size: 12.5px; font-style: italic; gap: 6px; align-items: baseline; padding-left: 36px; }
.cs-comment-form { display: flex; gap: 8px; margin-top: 16px; align-items: flex-end; }
.cs-comment-form textarea { flex: 1; margin: 0; }
.cs-danger { margin-top: 20px; border-top: 1px solid #EDF1F6; padding-top: 14px; }
.team-cases-btn { margin-top: 6px; }
.member-cases-list { display: flex; flex-direction: column; gap: 8px; }


/* Cases landing (rd93): cases first, add button, compact team list */
.cs-row2 { display: flex; flex-direction: column; gap: 8px; width: 100%; text-align: left; background: #fff; border: 1px solid #E2EAF3; border-radius: 12px; padding: 13px 14px; cursor: pointer; }
.cs-row2:hover { border-color: #B9CFE6; }
.cs-row2-top { display: flex; align-items: flex-start; gap: 10px; }
.cs-row2-top b { flex: 1; min-width: 0; font-size: 16px; line-height: 1.3; color: #14273F; }
.cs-row2-top .cs-prio { margin-top: 2px; }
.cs-row2-meta { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.cs-row2-info { font-size: 12px; color: #7A8DA3; }
.cs-closed-head { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #8CA0B5; margin: 16px 2px 2px; }
.cs-add { width: 100%; min-height: 48px; margin: 16px 0 6px; font-size: 15px; }
.cs-team-head { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #8CA0B5; margin: 14px 2px 8px; }
.cs-team { display: flex; flex-direction: column; }
.cs-member { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid #EDF1F6; padding: 9px 4px; cursor: pointer; }
.cs-member:last-child { border-bottom: 0; }
.cs-avatar { position: relative; width: 36px; height: 36px; border-radius: 50%; color: #fff; font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.cs-avail { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid #fff; }
.cs-avail.free { background: #22C55E; }
.cs-avail.busy { background: #F59E0B; }
.cs-member-name { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 600; color: #14273F; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-member-state { font-size: 12.5px; font-weight: 700; }
.cs-member-state.free { color: #16A34A; }
.cs-member-state.busy { color: #D97706; }
.cs-chev { color: #B6C2D2; font-size: 18px; line-height: 1; }

/* rd119 pin style */
.cs-list { gap: 14px; padding-top: 8px; }
.cs-row2 { position: relative; overflow: visible; box-shadow: 0 2px 6px rgba(20,39,63,.05); transition: transform .18s ease, border-color .15s ease, box-shadow .18s ease; }
.cs-list .cs-row2:nth-of-type(odd) { transform: rotate(-.7deg); }
.cs-list .cs-row2:nth-of-type(even) { transform: rotate(.7deg); }
.cs-list .cs-row2:hover, .cs-list .cs-row2:active, .cs-list .cs-row2:focus-visible { transform: rotate(0); }
.cs-row2.prio-high { --pin: #E5484D; background: #FFF7F5; }
.cs-row2.prio-normal { --pin: #4268F5; background: #F5F8FF; }
.cs-row2.prio-low { --pin: #94A3B8; background: #F8FAFC; }
.cs-pin { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); width: 17px; height: 17px; border-radius: 50%; background: radial-gradient(circle at 34% 30%, rgba(255,255,255,.75), rgba(255,255,255,0) 46%), var(--pin, #4268F5); box-shadow: 0 2px 3px rgba(15,23,42,.35), inset 0 -2px 3px rgba(0,0,0,.22); z-index: 2; pointer-events: none; }
.cs-pin::after { content: ''; position: absolute; left: 50%; bottom: -4px; transform: translateX(-50%); width: 5px; height: 6px; background: linear-gradient(#A8B2BF, #7C8798); clip-path: polygon(0 0, 100% 0, 50% 100%); }

/* rd120 paper-note design */
.cs-panel { background: repeating-linear-gradient(#FDFEFF 0 27px, #E6EDF6 27px 28px); border-color: #E3EAF3; }
.cs-list { gap: 20px; padding-top: 12px; }
.cs-row2 { background: #fff; border: 1px solid #EDF1F6; border-radius: 16px; padding: 9px; box-shadow: 0 12px 24px rgba(20,39,63,.10), 0 2px 5px rgba(20,39,63,.05); }
.cs-list .cs-row2:nth-of-type(odd) { transform: rotate(-1.2deg); }
.cs-list .cs-row2:nth-of-type(even) { transform: rotate(1.1deg); }
.cs-row2.prio-high { --pin: #EE5B25; --note: #FFE9DC; background: #fff; }
.cs-row2.prio-normal { --pin: #3E6BE0; --note: #DFE8FF; background: #fff; }
.cs-row2.prio-low { --pin: #8B7FD9; --note: #EDE7FF; background: #fff; }
.cs-note-in { display: flex; flex-direction: column; gap: 8px; border-radius: 11px; padding: 12px 13px; background: var(--note, #DFE8FF); }
.cs-pin { width: 22px; height: 22px; top: -11px; }
.cs-pin::before { content: ''; position: absolute; left: 50%; bottom: -4px; transform: translateX(-50%); width: 26px; height: 9px; border-radius: 50%; background: var(--pin, #3E6BE0); opacity: .38; }
.cs-pin::after { bottom: -6px; }

/* rd121 board scope */
.cs-board { background: repeating-linear-gradient(#FDFEFF 0 27px, #E6EDF6 27px 28px); border: 1px solid #E3EAF3; border-radius: 12px; padding: 18px; box-shadow: 0 3px 12px rgba(28,48,84,.04); }
.cs-add-wrap { display: flex; justify-content: center; margin-top: 20px; }
.cs-add { width: auto; min-width: 210px; margin: 0; }
.cs-team-panel { margin-top: 16px; padding: 6px 18px 12px; }

/* rd123 day off state */
.cs-avail.off { background: #B6C2D2; }
.cs-member-state.off { color: #8494AB; }

/* rd139 activities inside a case */
.cs-acts { display: flex; flex-direction: column; gap: 6px; margin: 2px 0 6px; }
.cs-act-row { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: #fff; border: 1px solid #E3EAF3; border-radius: 10px; padding: 8px 10px; cursor: pointer; font: inherit; }
.cs-act-row:active { transform: scale(.99); }
.cs-act-main { flex: 1; min-width: 0; }
.cs-act-main b { display: block; font-size: 13px; color: var(--ink, #22314A); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-act-main small { display: block; font-size: 11px; color: var(--muted, #68788E); margin-top: 1px; }

.cs-title-btn { display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.cs-title-btn svg { color: #9AA5B5; flex: none; }
.cs-title-input { width: 100%; font: inherit; padding: 6px 9px; border: 1.5px solid #4268F5; border-radius: 8px; outline: 0; }

.cs-act-row { display: flex; align-items: center; }
.cs-act-chev { margin-left: auto; color: #B3BECB; flex: none; display: grid; place-items: center; padding-left: 8px; }

.cs-comment-form { flex-direction: column; align-items: stretch; }
.cs-comment-row { display: flex; gap: 8px; align-items: flex-end; }
.cs-comment-row textarea { flex: 1; margin: 0; }
.cs-photo-btn { width: 42px; height: 42px; flex: none; border: 1px solid #DFE5EE; border-radius: 10px; background: #F4F7FB; color: #54657C; display: grid; place-items: center; cursor: pointer; padding: 0; }
.cs-photo-strip { display: flex; gap: 8px; flex-wrap: wrap; }
.cs-photos { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }

/* rd161 premium case sheet */
.cs-card .cs-body { background: #F5F8FB; }
.cs-card .modal-head { border-bottom: 1px solid #EDF1F6; }
.cs-card .modal-head h2 { font-size: 19px; letter-spacing: -.01em; }
.cs-sec { background: #fff; border: 1px solid #E6EDF4; border-radius: 16px; padding: 14px 16px 16px; margin-top: 0; box-shadow: 0 1px 2px rgba(20,39,63,.04); }
.cs-sec-meta { margin-top: 0; }
.cs-sec .cs-sec-head { margin: 0 0 10px; }
.cs-sec .cs-sec-head h3 { font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: #8494AB; }
.cs-card .cs-body .cs-meta { gap: 10px; }
.cs-card .cs-body .cs-meta label { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #8494AB; }
.cs-card .cs-body .cs-meta select { background: #F2F6FB; border: 1px solid #E1EAF3; border-radius: 10px; height: 42px; min-height: 42px; padding: 0 10px; font-size: 14px; font-weight: 600; letter-spacing: 0; text-transform: none; color: #14273F; margin-top: 6px; }
.cs-prio-field { position: relative; }
.cs-prio-field::after { content: ''; position: absolute; left: 11px; bottom: 17px; width: 8px; height: 8px; border-radius: 50%; background: #94A3B8; }
.cs-prio-field.high::after { background: #E5484D; }
.cs-prio-field.normal::after { background: #3E6BE0; }
.cs-prio-field.low::after { background: #94A3B8; }
.cs-card .cs-body .cs-prio-field select { padding-left: 26px; }
.cs-byline { margin: 12px 0 0; padding-top: 11px; border-top: 1px solid #EDF1F6; font-size: 12px; }
.cs-timeline { position: relative; }
.cs-timeline::before { content: ''; position: absolute; left: 12px; top: 10px; bottom: 10px; width: 2px; border-radius: 2px; background: #E7EEF5; }
.cs-ev { position: relative; }
.cs-ev .cs-dot { border: 2px solid #fff; box-shadow: 0 1px 3px rgba(20,39,63,.18); z-index: 1; }
.cs-ev.system { position: relative; }
.cs-ev.system::before { content: ''; position: absolute; left: 9px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: #C9D6E4; border: 2px solid #fff; box-shadow: 0 0 0 1px #E7EEF5; }
.cs-acts .cs-act-row { background: #F8FAFC; border-color: #E6EDF4; border-radius: 12px; }
.cs-sec .cs-comment-form { border-top: 1px solid #EDF1F6; padding-top: 12px; margin-top: 14px; }
.cs-danger { text-align: center; border-top: 0; margin-top: 6px; padding-top: 0; }
.cs-desc { font-size: 14.5px; }
.cs-photo { width: 72px; height: 72px; border: 0; border-radius: 10px; overflow: hidden; padding: 0; background: #EEF1F5; cursor: pointer; }
.cs-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
