.support-fab {
  position: fixed;
  bottom: 72px;
  right: 24px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(24, 95, 165, 0.35);
  z-index: 800;
  transition: transform var(--transition), background var(--transition);
}

.support-fab:hover {
  background: var(--accent2);
  transform: scale(1.05);
}

.support-fab i { font-size: 26px; }

.support-fab-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 20px;
  height: 20px;
  background: #c0392b;
  color: #fff;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border: 2px solid var(--bg);
}

.support-chat {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 380px;
  max-height: 600px;
  background: var(--card-bg);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 60px var(--shadow2);
  z-index: 800;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.support-chat.open { display: flex; }

.support-chat-head {
  background: var(--accent);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.support-chat-head-info {
  display: flex;
  align-items: center;
  gap: 11px;
}

.support-chat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.support-chat-avatar i { font-size: 18px; color: #fff; }

.support-chat-title {
  font-size: 14px;
  font-weight: 500;
  color: #fff;
}

.support-chat-status {
  font-size: 11px;
  color: rgba(255,255,255,0.75);
  margin-top: 1px;
}

.support-chat-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.support-chat-close:hover { background: rgba(255,255,255,0.15); }
.support-chat-close i { font-size: 18px; }

.support-start-form {
  padding: 18px;
  overflow-y: auto;
}

.support-start-text {
  font-size: 13px;
  color: var(--txt2);
  line-height: 1.6;
  margin-bottom: 16px;
}

.support-field {
  margin-bottom: 12px;
}

.support-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.support-field label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--txt2);
  margin-bottom: 5px;
}

.support-field input,
.support-field textarea {
  width: 100%;
  background: var(--input-bg);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 13px;
  color: var(--txt);
  font-family: inherit;
  outline: none;
  resize: none;
  transition: border-color var(--transition);
}

.support-field input:focus,
.support-field textarea:focus { border-color: var(--accent); }

.support-start-error {
  background: rgba(192, 57, 43, 0.08);
  border: 0.5px solid rgba(192, 57, 43, 0.25);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 12px;
  color: #c0392b;
  margin-bottom: 12px;
}

.support-start-btn {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition);
}
.support-start-btn:hover { background: var(--accent2); }
.support-start-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.support-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 280px;
  max-height: 400px;
}

.support-msg {
  max-width: 80%;
  padding: 9px 13px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.5;
  word-wrap: break-word;
}

.support-msg-user {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.support-msg-admin {
  align-self: flex-start;
  background: var(--bg3);
  color: var(--txt);
  border-bottom-left-radius: 4px;
}

.support-msg-time {
  font-size: 10px;
  opacity: 0.65;
  margin-top: 3px;
  display: block;
}

.support-msg-system {
  align-self: center;
  background: none;
  color: var(--txt2);
  font-size: 11px;
  text-align: center;
  padding: 4px;
}

.support-chat-input {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 14px;
  border-top: 0.5px solid var(--border);
  flex-shrink: 0;
}

.support-chat-input textarea {
  flex: 1;
  background: var(--input-bg);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 13px;
  color: var(--txt);
  font-family: inherit;
  outline: none;
  resize: none;
  max-height: 90px;
  transition: border-color var(--transition);
}
.support-chat-input textarea:focus { border-color: var(--accent); }

.support-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition);
}
.support-send-btn:hover { background: var(--accent2); }
.support-send-btn i { font-size: 16px; }

@media (max-width: 480px) {
  .support-chat {
    width: calc(100vw - 24px);
    right: 12px;
    bottom: 84px;
    max-height: 70vh;
  }
  .support-fab { bottom: 16px; right: 16px; }
  .support-field-row { grid-template-columns: 1fr; }
}
