/* «Плани та звіти зміни» (shift_plans.js). Усі класи мають префікс .sp-: власний файл, щоб не змішуватися з styles.css.
   Кольори — через змінні теми з запасними значеннями; світла тема — body.tg-light і body.light-theme. */

.sp-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }

.sp-card { display: flex; flex-direction: column; align-items: stretch; gap: 6px; width: 100%; padding: 14px 16px; text-align: left; cursor: pointer; color: var(--text-primary, inherit); border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.1)); }
.sp-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; }
.sp-who { font-weight: 600; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-card-line { font-size: 14px; }
.sp-card-sub { font-size: 13px; color: var(--text-secondary, #9ca3af); }

.sp-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 18px; white-space: nowrap; margin-left: auto; }
.sp-pill-draft { background: rgba(148, 163, 184, 0.18); color: var(--text-secondary, #94a3b8); }
.sp-pill-pending { background: rgba(245, 158, 11, 0.18); color: var(--accent-amber, #f59e0b); }
.sp-pill-approved { background: rgba(16, 185, 129, 0.18); color: var(--accent-emerald, #10b981); }
.sp-pill-returned { background: rgba(244, 63, 94, 0.18); color: var(--accent-rose, #f43f5e); }

.sp-scopes { margin-top: 8px; }
.sp-add-btn, .sp-add-client { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 12px; padding: 12px 14px; border-radius: 14px; font-size: 15px; font-weight: 600; cursor: pointer; color: var(--accent-purple, #a78bfa); background: transparent; border: 1px dashed var(--accent-purple, #a78bfa); }
.sp-add-btn .app-ic, .sp-add-client .app-ic { width: 18px; height: 18px; }
.sp-add-client { margin: 4px 0 12px; }

.sp-det-head { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 12px; }
.sp-det-head .sp-pill { margin-left: 0; }
.sp-det-line { font-size: 14px; color: var(--text-secondary, #9ca3af); }
.sp-det-line b { color: var(--text-primary, inherit); }

.sp-comment { margin: 0 0 12px; padding: 12px 14px; border-radius: 14px; background: rgba(148, 163, 184, 0.1); border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.1)); }
.sp-comment b { display: block; font-size: 13px; }
.sp-comment span { display: block; font-size: 12px; color: var(--text-muted, #9ca3af); margin-top: 2px; }
.sp-comment p { margin: 6px 0 0; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }

.sp-clients { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.sp-cl { border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.1)); border-radius: 14px; padding: 0 14px; }
.sp-cl > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; cursor: pointer; list-style: none; font-size: 14px; }
.sp-cl > summary::-webkit-details-marker { display: none; }
.sp-cl-nick { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-cl-sum { flex-shrink: 0; color: var(--text-secondary, #9ca3af); }
.sp-cl-body { padding: 0 0 12px; }
.sp-cl-body p { margin: 2px 0 8px; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.sp-k { font-size: 12px; color: var(--text-muted, #9ca3af); margin-top: 6px; }

.sp-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.sp-review { display: flex; flex-direction: column; gap: 10px; }
.sp-btn-row { display: flex; gap: 10px; }
.sp-btn-row > button { flex: 1; }
.sp-btn-sec, .sp-btn-danger { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 14px; border-radius: 14px; font-size: 15px; font-weight: 600; cursor: pointer; background: transparent; color: var(--text-primary, inherit); border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.18)); }
.sp-btn-danger { color: var(--accent-rose, #f43f5e); border-color: var(--accent-rose, #f43f5e); }
.sp-actions .app-ic, .sp-btn-row .app-ic { width: 18px; height: 18px; }

.sp-form-cl { position: relative; margin-bottom: 12px; padding: 14px; }
.sp-form-cl-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.sp-x { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 10px; border: 0; background: transparent; color: var(--text-secondary, #9ca3af); cursor: pointer; }
.sp-x .app-ic { width: 18px; height: 18px; }
.sp-tag { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: rgba(139, 92, 246, 0.18); color: var(--accent-purple, #a78bfa); }

.sp-hint { margin: 4px 0 12px; font-size: 13px; line-height: 1.4; color: var(--text-secondary, #9ca3af); }
.sp-total { margin: 6px 0 12px; font-size: 14px; font-weight: 600; }
.sp-period .form-group { margin-top: 8px; }

body.tg-light .sp-pill-draft, body.light-theme .sp-pill-draft { color: #475569; }
body.tg-light .sp-pill-pending, body.light-theme .sp-pill-pending { color: #b45309; }
body.tg-light .sp-pill-approved, body.light-theme .sp-pill-approved { color: #047857; }
body.tg-light .sp-pill-returned, body.light-theme .sp-pill-returned { color: #be123c; }
body.tg-light .sp-comment, body.light-theme .sp-comment { background: rgba(15, 23, 42, 0.04); }
body.tg-light .sp-card, body.light-theme .sp-card,
body.tg-light .sp-cl, body.light-theme .sp-cl { border-color: rgba(15, 23, 42, 0.12); }
body.tg-light .sp-btn-sec, body.light-theme .sp-btn-sec { border-color: rgba(15, 23, 42, 0.2); }
