.sp-open-btn { border-radius: 10px; padding: .75rem 1.4rem; font-weight: 600; border-color: rgba(255,255,255,.55); }
.sp-open-btn:hover { background: #fff; color: #8a1214; }

.sp-modal .modal-content { border: 0; border-radius: 16px; overflow: hidden; }
.sp-modal .modal-header { background: linear-gradient(135deg, #a8121b, #6e0f11); color: #fff; border: 0; align-items: flex-start; }
.sp-modal .modal-title { font-weight: 700; color: #fff; }
.sp-modal .btn-close { filter: invert(1) grayscale(1) brightness(2); }
.sp-modal-sub { font-size: .85rem; opacity: .85; }
.sp-modal .modal-body .sp-modal-sub { opacity: 1; color: #5b6270; }
.sp-modal .form-label { font-size: .84rem; font-weight: 600; margin-bottom: .3rem; }
.sp-modal .form-control { border-radius: 10px; font-size: .92rem; }
.sp-modal .form-control:focus { border-color: #b11217; box-shadow: 0 0 0 3px rgba(177,18,23,.14); }
.sp-req { color: #b11217; }
.sp-opt { color: #8a909c; font-weight: 400; }
.sp-count { color: #8a909c; font-size: .75rem; white-space: nowrap; margin-top: .25rem; }
.sp-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.sp-form-err { color: #b42318; font-size: .85rem; margin-top: .75rem; min-height: 1px; }
.sp-btn-primary { background: #b11217; color: #fff; border: 0; border-radius: 10px; font-weight: 600; padding: .55rem 1.2rem; }
.sp-btn-primary:hover, .sp-btn-primary:focus { background: #8a1214; color: #fff; }
.sp-btn-primary:disabled { background: #c9ccd3; color: #fff; }
.sp-link { color: #b11217; font-size: .88rem; text-decoration: none; padding-left: 0; }
.sp-link:hover { color: #8a1214; text-decoration: underline; }

.sp-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 1040;
  width: 58px; height: 58px; border: 0; border-radius: 50%;
  background: #e6a817; color: #4a3300; font-size: 1.5rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(0,0,0,.28); cursor: pointer; transition: transform .15s ease;
}
.sp-fab:hover { transform: translateY(-2px); }
.sp-fab:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.sp-badge {
  position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 11px; background: #b11217; color: #fff; font-size: .72rem; font-weight: 700;
  line-height: 18px; text-align: center; border: 2px solid #fff;
}

.sp-panel {
  position: fixed; right: 22px; bottom: 92px; z-index: 1040;
  width: 370px; max-width: calc(100vw - 24px); height: min(540px, calc(100vh - 120px));
  background: #fff; border-radius: 16px; box-shadow: 0 16px 44px rgba(0,0,0,.3);
  display: none; flex-direction: column; overflow: hidden; color: #1f2329;
}
.sp-panel.open { display: flex; }
.sp-head { background: linear-gradient(135deg, #a8121b, #6e0f11); color: #fff; padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.sp-head-ic { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.15); display: grid; place-items: center; font-size: 1.1rem; flex: 0 0 38px; }
.sp-title { flex: 1; min-width: 0; line-height: 1.2; }
.sp-title strong { display: block; font-size: .96rem; }
.sp-title span { font-size: .74rem; opacity: .85; }
.sp-head button { background: transparent; border: 0; color: #fff; font-size: 1.05rem; padding: 4px 7px; border-radius: 6px; cursor: pointer; }
.sp-head button:hover { background: rgba(255,255,255,.15); }
.sp-status { display: inline-block; font-size: .66rem; font-weight: 700; letter-spacing: .03em; padding: 1px 7px; border-radius: 10px; margin-left: 4px; background: rgba(255,255,255,.2); }
.sp-body { flex: 1 1 auto; overflow-y: auto; background: #f6f4f1; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.sp-day { align-self: center; font-size: .7rem; color: #8a909c; margin: 6px 0 2px; }
.sp-msg { max-width: 84%; padding: 8px 12px; border-radius: 14px; font-size: .88rem; line-height: 1.38; white-space: pre-wrap; overflow-wrap: anywhere; }
.sp-msg.staff { align-self: flex-start; background: #fff; border: 1px solid #e6e8ec; border-bottom-left-radius: 4px; }
.sp-msg.mine { align-self: flex-end; background: #b11217; color: #fff; border-bottom-right-radius: 4px; }
.sp-msg .sp-who { display: block; font-size: .7rem; font-weight: 700; color: #b11217; margin-bottom: 2px; }
.sp-msg .sp-ts { display: block; font-size: .66rem; opacity: .7; margin-top: 3px; text-align: right; }
.sp-note { font-size: .78rem; color: #5b6270; background: #fff7e0; border-top: 1px solid #f1e2b3; padding: 8px 12px; }
.sp-err { font-size: .76rem; color: #b42318; padding: 4px 12px 0; background: #fff; }
.sp-compose { display: flex; gap: 8px; align-items: flex-end; padding: 10px; border-top: 1px solid #e6e8ec; background: #fff; }
.sp-compose textarea { flex: 1; resize: none; border: 1px solid #e6e8ec; border-radius: 10px; padding: 8px 10px; font-size: .88rem; max-height: 100px; font-family: inherit; }
.sp-compose textarea:focus { outline: none; border-color: #b11217; box-shadow: 0 0 0 3px rgba(177,18,23,.14); }
.sp-compose button { flex: 0 0 38px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #b11217; color: #fff; cursor: pointer; }
.sp-compose button:disabled { background: #c9ccd3; cursor: not-allowed; }
.sp-empty { margin: auto; text-align: center; color: #5b6270; font-size: .88rem; padding: 20px; }
.sp-empty i { font-size: 2rem; color: #e6a817; display: block; margin-bottom: 6px; }

@media (max-width: 576px) {
  .sp-fab { right: 14px; bottom: 14px; }
  .sp-panel { right: 12px; bottom: 82px; width: calc(100vw - 24px); height: min(72vh, calc(100vh - 100px)); }
}
