/**
 * TOBO Support Desk - Portal Styles
 */

.tobo-sd-portal {
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.tobo-sd-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.tobo-sd-header h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 950;
  color: #111827;
}

.tobo-sd-btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 12px 20px;
  background: #e60000;
  color: #fff;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 950;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.tobo-sd-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(230, 0, 0, 0.22);
}

.tobo-sd-back {
  color: #6b7280;
  text-decoration: none;
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 12px;
  display: inline-block;
}

.tobo-sd-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 2px solid rgba(17, 24, 39, 0.1);
}

.tobo-sd-tab {
  padding: 12px 20px;
  text-decoration: none;
  color: #6b7280;
  font-weight: 950;
  font-size: 14px;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.12s ease;
}

.tobo-sd-tab:hover {
  color: #111827;
}

.tobo-sd-tab.active {
  color: #e60000;
  border-bottom-color: #e60000;
}

.tobo-sd-tickets {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tobo-sd-ticket-card {
  background: #fff;
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.tobo-sd-ticket-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.tobo-sd-ticket-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.tobo-sd-ticket-number {
  font-weight: 950;
  font-size: 13px;
  color: #111827;
  font-family: monospace;
}
.tobo-sd-badge-new{
  display:inline-flex;
  align-items:center;
  margin-left:8px;
  padding:2px 7px;
  border-radius:999px;
  background:#e60000;
  color:#fff;
  font-size:10px;
  font-weight:800;
  letter-spacing:.02em;
  vertical-align:middle;
}

.tobo-sd-status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tobo-sd-status-badge.status-new {
  background: rgba(59, 130, 246, 0.1);
  color: #1e40af;
}

.tobo-sd-status-badge.status-in_progress {
  background: rgba(245, 158, 11, 0.1);
  color: #92400e;
}

.tobo-sd-status-badge.status-waiting_customer {
  background: rgba(139, 92, 246, 0.1);
  color: #6b21a8;
}

.tobo-sd-status-badge.status-appointment_planned {
  background: rgba(16, 185, 129, 0.1);
  color: #065f46;
}

.tobo-sd-status-badge.status-resolved {
  background: rgba(34, 197, 94, 0.1);
  color: #166534;
}

.tobo-sd-status-badge.status-closed {
  background: rgba(107, 114, 128, 0.1);
  color: #374151;
}

.tobo-sd-ticket-card h3 {
  margin: 8px 0;
  font-size: 16px;
  font-weight: 950;
}

.tobo-sd-ticket-card h3 a {
  color: #111827;
  text-decoration: none;
}

.tobo-sd-ticket-card h3 a:hover {
  color: #e60000;
}

.tobo-sd-ticket-meta {
  font-size: 12px;
  color: #6b7280;
  font-weight: 800;
}

.tobo-sd-detail {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
}

.tobo-sd-detail-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(17, 24, 39, 0.1);
}

.tobo-sd-detail-header h2 {
  margin: 12px 0;
  font-size: 20px;
  font-weight: 950;
  color: #111827;
}

.tobo-sd-detail-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.tobo-sd-messages {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.tobo-sd-message {
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(17, 24, 39, 0.1);
}

.tobo-sd-msg-customer {
  background: rgba(59, 130, 246, 0.05);
  border-color: rgba(59, 130, 246, 0.2);
  border-left: 4px solid #3b82f6;
}

.tobo-sd-msg-staff {
  background: rgba(16, 185, 129, 0.05);
  border-color: rgba(16, 185, 129, 0.2);
  border-left: 4px solid #10b981;
}

.tobo-sd-msg-system {
  background: rgba(107, 114, 128, 0.05);
  border-color: rgba(107, 114, 128, 0.2);
  border-left: 4px solid #6b7280;
  font-style: italic;
}

.tobo-sd-msg-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.tobo-sd-msg-header strong {
  font-weight: 950;
  color: #111827;
}

.tobo-sd-msg-date {
  font-size: 12px;
  color: #6b7280;
  font-weight: 800;
}

.tobo-sd-msg-content {
  color: #374151;
  line-height: 1.6;
}

.tobo-sd-reply-form {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(17, 24, 39, 0.1);
}

.tobo-sd-reply-form h3 {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 950;
  color: #111827;
}

.tobo-sd-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tobo-sd-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tobo-sd-field label {
  font-size: 13px;
  font-weight: 950;
  color: #111827;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tobo-sd-field input,
.tobo-sd-field select,
.tobo-sd-field textarea {
  padding: 12px;
  border: 1px solid rgba(17, 24, 39, 0.14);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  background: #fff;
  outline: none;
  transition: border-color 0.12s ease;
}

.tobo-sd-field input:focus,
.tobo-sd-field select:focus,
.tobo-sd-field textarea:focus {
  border-color: #e60000;
  box-shadow: 0 0 0 3px rgba(230, 0, 0, 0.1);
}

.tobo-sd-field textarea {
  resize: vertical;
  min-height: 120px;
}

.tobo-sd-create {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
}

.tobo-sd-not-approved {
  background: #fff3cd;
  border: 2px solid #ffc107;
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
  text-align: center;
}

.tobo-sd-not-approved h3 {
  margin: 0 0 12px;
  color: #856404;
  font-size: 18px;
  font-weight: 950;
}

.tobo-sd-not-approved p {
  margin: 0 0 16px;
  color: #856404;
  font-size: 14px;
  line-height: 1.5;
}

.tobo-sd-mail-btn {
  display: inline-block;
  padding: 12px 24px;
  background: #e60000;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 950;
  font-size: 14px;
  transition: transform 0.12s ease;
}

.tobo-sd-mail-btn:hover {
  transform: translateY(-1px);
}

/* Error Messages */
.tobo-sd-error {
  padding: 20px;
  background: #fff3cd;
  border: 2px solid #ffc107;
  border-radius: 12px;
  color: #856404;
}

.tobo-sd-error h3 {
  margin: 0 0 12px;
}

.tobo-sd-error p {
  margin: 0;
}

/* Empty States */
.tobo-sd-empty {
  padding: 40px;
  text-align: center;
  color: #6b7280;
}

.tobo-sd-empty p {
  font-size: 16px;
  margin: 0;
}

.tobo-sd-empty-state {
  padding: 40px;
  text-align: center;
  background: #f9fafb;
  border-radius: 12px;
  margin: 20px 0;
}

.tobo-sd-empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.tobo-sd-empty-state h3 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 18px;
  font-weight: 950;
}

.tobo-sd-empty-state p {
  margin: 0 0 20px;
  color: #6b7280;
  font-size: 14px;
}

/* List Styles */
.tobo-sd-list {
  width: 100%;
}

.tobo-sd-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 950;
  color: #111827;
}

.tobo-sd-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid #e5e7eb;
}

.tobo-sd-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 1px solid #e5e7eb;
}

.tobo-sd-tab {
  padding: 10px 16px;
  text-decoration: none;
  color: #6b7280;
  font-weight: 850;
  font-size: 14px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

/* Ticket Card Overrides */
.tobo-sd-ticket-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tobo-sd-ticket-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.tobo-sd-ticket-number {
  font-weight: 950;
  color: #111827;
  font-size: 14px;
}

.tobo-sd-status-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 850;
}

.tobo-sd-ticket-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 950;
}

.tobo-sd-ticket-card h3 a {
  color: #111827;
  text-decoration: none;
}

.tobo-sd-ticket-meta {
  color: #6b7280;
  font-size: 13px;
}

/* Appointment Box */
.tobo-sd-appointment-box {
  background: #f0f9ff;
  border: 2px solid #3b82f6;
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
}

.tobo-sd-appointment-box h3 {
  margin: 0 0 12px;
  color: #1e40af;
}

.tobo-sd-appointment-info {
  margin-bottom: 12px;
}

.tobo-sd-appointment-actions {
  display: inline-block;
  margin-right: 8px;
}

.tobo-sd-appointment-status {
  margin-bottom: 8px;
  font-weight: bold;
}

.tobo-sd-appointment-status.confirmed {
  color: #10b981;
}

.tobo-sd-appointment-status.cancelled {
  color: #ef4444;
}

.tobo-sd-btn-secondary {
  background: #ef4444;
  border: none;
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 950;
  font-size: 14px;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.tobo-sd-btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.tobo-sd-btn-success {
  background: #10b981;
  border: none;
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 950;
  font-size: 14px;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.tobo-sd-btn-success:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.tobo-sd-appointment-actions-wrap {
  margin-top: 12px;
}

/* Message Styles */
.tobo-sd-msg-header-icon {
  font-size: 18px;
}

.tobo-sd-msg-header-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tobo-sd-msg-staff-badge {
  background: #10b981;
  color: #fff;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
}

/* Attachments */
.tobo-sd-attachments {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}

.tobo-sd-attachments-label {
  font-size: 12px;
  color: #6b7280;
  display: block;
  margin-bottom: 8px;
  font-weight: 950;
}

.tobo-sd-attachments-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tobo-sd-attachment-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  text-decoration: none;
  color: #111827;
  font-size: 13px;
  transition: background 0.2s;
}

.tobo-sd-attachment-link:hover {
  background: #e5e7eb;
}

.tobo-sd-attachment-name {
  font-weight: 600;
}

.tobo-sd-attachment-size {
  color: #6b7280;
  font-size: 11px;
}

/* Form Field Hints */
.tobo-sd-field small {
  color: #6b7280;
  font-size: 12px;
}

.tobo-sd-field-attachments {
  margin-top: 12px;
}

.tobo-sd-empty-message {
  color: #6b7280;
  font-style: italic;
}

.tobo-sd-appointment-card {
  border-left: 4px solid #3b82f6;
}

.tobo-sd-appointment-date {
  background: #3b82f6;
  color: #fff;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
}

.tobo-sd-appointment-status-badge {
  margin-left: 12px;
}

.tobo-sd-appointment-status-badge.confirmed {
  color: #10b981;
}

.tobo-sd-appointment-status-badge.cancelled {
  color: #ef4444;
}

/* Kalender-Ansicht für Termine */
.tobo-sd-appointments-calendar {
  width: 100%;
}

.tobo-sd-calendar-view {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tobo-sd-calendar-month-header {
  margin: 24px 0 12px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e5e7eb;
}

.tobo-sd-calendar-month-header:first-child {
  margin-top: 0;
}

.tobo-sd-calendar-month-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 950;
  color: #111827;
  text-transform: capitalize;
}

.tobo-sd-calendar-event {
  display: flex;
  gap: 16px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.tobo-sd-calendar-event:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.tobo-sd-calendar-event-date {
  flex: 0 0 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e60000 0%, #dc2626 100%);
  color: #fff;
  border-radius: 12px;
  padding: 12px 8px;
  min-height: 80px;
}

.tobo-sd-calendar-day {
  font-size: 28px;
  font-weight: 950;
  line-height: 1;
}

.tobo-sd-calendar-weekday {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
  opacity: 0.9;
}

.tobo-sd-calendar-event-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tobo-sd-calendar-event-header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  font-size: 13px;
  color: #6b7280;
  font-weight: 800;
}

.tobo-sd-calendar-time,
.tobo-sd-calendar-duration,
.tobo-sd-calendar-type {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(17, 24, 39, 0.04);
  border-radius: 8px;
}

.tobo-sd-calendar-event-title {
  margin: 0;
  font-size: 18px;
  font-weight: 950;
  color: #111827;
}

.tobo-sd-calendar-event-title a {
  color: #111827;
  text-decoration: none;
  transition: color 0.12s ease;
}

.tobo-sd-calendar-event-title a:hover {
  color: #e60000;
}

.tobo-sd-calendar-event-meta {
  font-size: 13px;
  color: #6b7280;
  font-weight: 800;
}

.tobo-sd-calendar-event-note {
  margin-top: 8px;
  padding: 12px;
  background: #f9fafb;
  border-left: 3px solid #3b82f6;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.6;
  color: #374151;
}

.tobo-sd-calendar-event-note strong {
  color: #111827;
  font-weight: 950;
}

.tobo-sd-calendar-event-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.tobo-sd-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: #3b82f6;
  color: #fff;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 950;
  font-size: 13px;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  border: none;
  cursor: pointer;
}

.tobo-sd-btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  background: #2563eb;
}

/* Plugin-Glocke ausblenden (Wrapper übernimmt UI) */
#tobo-sd-notification-bell,
#tobo-sd-notification-popup {
  display: none !important;
}

/* Mobile */
@media (max-width: 680px) {
  .tobo-sd-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .tobo-sd-tabs {
    width: 100%;
    overflow-x: auto;
  }
  
  .tobo-sd-ticket-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .tobo-sd-calendar-event {
    flex-direction: column;
  }
  
  .tobo-sd-calendar-event-date {
    width: 100%;
    flex-direction: row;
    justify-content: space-around;
    min-height: auto;
    padding: 12px;
  }
  
  .tobo-sd-calendar-day {
    font-size: 24px;
  }
  
  .tobo-sd-calendar-event-actions {
    flex-direction: column;
  }
  
  .tobo-sd-calendar-event-actions a,
  .tobo-sd-calendar-event-actions button {
    width: 100%;
    justify-content: center;
  }
}

/* ============================================
   CHAT UI (Kunde ↔ Mitarbeiter)
   ============================================ */
.tobo-sd-chat-messages {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
  padding: 20px;
  background: #f9fafb;
  border-radius: 14px;
}

.tobo-chat-message {
  display: flex;
  margin-bottom: 12px;
}

.tobo-chat-message--customer {
  justify-content: flex-end;
}

.tobo-chat-message--staff {
  justify-content: flex-start;
}

.tobo-chat-bubble {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 18px;
  position: relative;
}

.tobo-chat-message--customer .tobo-chat-bubble {
  background: #e60000;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.tobo-chat-message--staff .tobo-chat-bubble {
  background: #fff;
  color: #111827;
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.tobo-chat-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12px;
}

.tobo-chat-message--customer .tobo-chat-header {
  justify-content: flex-end;
}

.tobo-chat-author {
  font-weight: 950;
  font-size: 13px;
}

.tobo-chat-message--customer .tobo-chat-author {
  color: rgba(255, 255, 255, 0.9);
}

.tobo-chat-message--staff .tobo-chat-author {
  color: #111827;
}

.tobo-chat-badge {
  display: inline-block;
  padding: 2px 8px;
  background: #e60000;
  color: #fff;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tobo-chat-time {
  color: rgba(0, 0, 0, 0.5);
  font-size: 11px;
  font-weight: 800;
}

.tobo-chat-message--customer .tobo-chat-time {
  color: rgba(255, 255, 255, 0.7);
}

.tobo-chat-content {
  line-height: 1.5;
  word-wrap: break-word;
}

.tobo-chat-message--customer .tobo-chat-content {
  color: #fff;
}

.tobo-chat-message--staff .tobo-chat-content {
  color: #374151;
}

.tobo-chat-content p {
  margin: 0 0 8px;
}

.tobo-chat-content p:last-child {
  margin-bottom: 0;
}

.tobo-chat-attachments {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.tobo-chat-message--staff .tobo-chat-attachments {
  border-top-color: rgba(17, 24, 39, 0.1);
}

.tobo-chat-attachment {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  font-size: 12px;
  margin-right: 8px;
  margin-bottom: 6px;
}

.tobo-chat-message--staff .tobo-chat-attachment {
  background: #f3f4f6;
  color: #111827;
}

.tobo-chat-attachment:hover {
  opacity: 0.8;
}

/* Mobile Chat */
@media (max-width: 680px) {
  .tobo-chat-bubble {
    max-width: 85%;
  }
  
  .tobo-sd-chat-messages {
    padding: 12px;
  }
}

/* ============================================
   SYSTEM MESSAGES DROPDOWN
   ============================================ */
.tobo-sd-system-messages {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

.tobo-sd-system-dropdown {
  width: min(100%, 520px);
  background: transparent;
  border: 0;
  border-radius: 12px;
  overflow: visible;
}

.tobo-sd-system-popup {
  position: relative;
}

.tobo-sd-system-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
  font-weight: 800;
  font-size: 12px;
  color: #111827;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(17,24,39,.14);
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(15,23,42,.10);
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
  user-select: none;
  position: relative;
}

.tobo-sd-system-summary::-webkit-details-marker {
  display: none;
}

.tobo-sd-system-summary:hover {
  background: #ffffff;
  border-color: rgba(17,24,39,.24);
  transform: translateY(-1px);
}
.tobo-sd-system-summary::after{
  content:"";
  position:absolute;
  right: 18px;
  bottom: -7px;
  width: 12px;
  height: 12px;
  background: #fff;
  border-right: 1px solid rgba(17,24,39,.14);
  border-bottom: 1px solid rgba(17,24,39,.14);
  transform: rotate(45deg);
}

.tobo-sd-system-title {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tobo-sd-system-badge-new {
  display: inline-block;
  padding: 2px 8px;
  background: #e60000;
  color: #fff;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 800;
  margin-left: 6px;
}

.tobo-sd-system-toggle {
  color: #6b7280;
  font-size: 11px;
  transition: transform 0.2s ease;
}

.tobo-sd-system-dropdown[open] .tobo-sd-system-toggle {
  transform: rotate(180deg);
}

.tobo-sd-system-content {
  margin-top: 6px;
  padding: 10px;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 12px 24px rgba(15,23,42,.12);
}
@media (max-width: 680px){
  .tobo-sd-system-messages{
    justify-content: stretch;
  }
  .tobo-sd-system-dropdown{
    width: 100%;
  }
}

.tobo-system-message {
  padding: 10px;
  background: rgba(107, 114, 128, 0.06);
  border-left: 3px solid #6b7280;
  border-radius: 10px;
}

.tobo-system-bubble {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tobo-system-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}

.tobo-system-icon {
  font-size: 16px;
}

.tobo-system-author {
  font-weight: 800;
  color: #111827;
  font-size: 12px;
}

.tobo-system-time {
  color: #6b7280;
  font-size: 10px;
  font-weight: 700;
  margin-left: auto;
}

.tobo-system-content {
  color: #374151;
  line-height: 1.5;
  font-size: 12px;
}

.tobo-system-content p {
  margin: 0 0 8px;
}

.tobo-system-content p:last-child {
  margin-bottom: 0;
}

/* ============================================
   CUSTOMER TICKET ACTIONS + FEEDBACK
   ============================================ */
.tobo-sd-detail-actions{
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.tobo-sd-detail-actions form{
  margin: 0;
}
.tobo-sd-btn-danger{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(220,38,38,.35);
  background: #fff;
  color: #b91c1c;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.tobo-sd-btn-danger:hover{
  transform: translateY(-1px);
  background: #fff5f5;
  box-shadow: 0 8px 18px rgba(220,38,38,.18);
}
.tobo-sd-notice-success,
.tobo-sd-notice-error{
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
}
.tobo-sd-notice-success{
  border: 1px solid rgba(22,163,74,.34);
  background: rgba(22,163,74,.10);
  color: #166534;
}
.tobo-sd-notice-error{
  border: 1px solid rgba(220,38,38,.30);
  background: rgba(220,38,38,.10);
  color: #991b1b;
}
@media (max-width: 680px){
  .tobo-sd-detail-actions{
    flex-direction: column;
  }
  .tobo-sd-detail-actions .tobo-sd-btn-success,
  .tobo-sd-detail-actions .tobo-sd-btn-danger{
    width: 100%;
  }
}
