:root {
  --cs-bg: #f9fafb;
  --cs-card: #ffffff;
  --cs-accent: #2563eb;
  --cs-muted: #6b7280;
  --status-text: rgb(238, 238, 10);
  --cs-radius: 14px;
  --cs-gap: 16px;
  --cs-transition: 200ms ease;
}

.main-container {
  display: flex;
}

.div-m {
  border-left: 2px solid #ddd;
  padding: 15px;
}

.div-m img {
  width: 100%;
}

.div-m:last-child {
  border: none;
}

@media (max-width: 768px) {
  .main-container {
    flex-direction: column;
  }

  .div-m {
    border-bottom: 2px solid #ddd;
    border-left: none;
    padding: 15px;
  }

  .div-m:last-child {
    border: none;
  }
}

.div-m {
  cursor: pointer;
}

.cs-responsive {
  height: 100%;
  width: 100%;
}



#order_status {
  color: var(--status-text);
}

.inja {
  color: var(--status-text);
}

#button-container img {
  cursor: pointer;
}

.cs-wrap {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
}

.cs-header {
  background: var(--cs-card);
  padding: 20px;
  border-radius: var(--cs-radius);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.cs-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.cs-sub {
  color: var(--cs-muted);
  font-size: 14px;
}

.cs-ticket-view {
  background: var(--cs-card);
  border-radius: var(--cs-radius);
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cs-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.cs-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cs-ticket-title {
  font-size: 18px;
  font-weight: 700;
}

.cs-ticket-info {
  font-size: 14px;
  color: var(--cs-muted);
}

.cs-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cs-badge {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.cs-badge-open {
  background: #dbeafe;
  color: #1e40af;
}

.cs-badge-closed {
  background: #dcfce7;
  color: #166534;
}

.cs-badge-priority {
  background: #fee2e2;
  color: #b91c1c;
}

.cs-badge-status {
  color: #fff;
  background: #038619;
}

.cs-content {
  line-height: 1.8;
  font-size: 15px;
  color: #374151;
}

.cs-replies {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cs-reply {
  background: #f3f4f6;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  gap: 12px;
}

.cs-reply-author {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
}

.cs-reply-time {
  font-size: 12px;
  color: var(--cs-muted);
}

.cs-reply-text {
  font-size: 14px;
  color: #374151;
}

.cs-reply-form {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cs-textarea {
  width: 100%;
  min-height: 120px;
  padding: 10px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  font-family: inherit;
  resize: vertical;
  margin: 20px 0;
}

.cs-btn {
  align-self: flex-start;
  background: var(--cs-accent);
  color: #fff;
  padding: 10px 16px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: background var(--cs-transition);
}

.cs-btn:hover {
  background: #1d4ed8;
}

.admin-ticket {
  background: #e9e9ff;
  margin-right: 30px;
}

#newticket {
  margin-top: 15px;
}

.not-found {
  background: #f44336;
  padding: 15px;
  text-align: center;
  color: #fff;
  font-size: 16px;
  border-radius: 15px;
}

.success {
  background: #43a047;
  padding: 15px;
  text-align: center;
  color: #fff;
  font-size: 16px;
  border-radius: 15px;
}

.cs-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30, 26, 26, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: 8px;
}

#link_post {
  background: #29b6f6;
  padding: 15px;
  text-align: center;
  color: #fff;
  font-size: 16px;
  border-radius: 15px;
  margin-top: 10px;
}

.cs-overlay.active {
  display: flex;
}

.cs-spinner {
  border: 4px solid #f3f3f3;
  border-top-width: 4px;
  border-top-style: solid;
  border-top-color: rgb(243, 243, 243);
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  text-align: center;
  margin: 0 auto;
  top: 10%;
  position: relative;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}


@media (max-width: 768px) {
  .cs-responsive {
    display: flex;
    flex-direction: column;
  }

  .cs-responsive>* {
    width: 100%;
  }

  .br {
    border-left: none;
    border-bottom: 3px solid #f9f4f4;
  }

  #button-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  #button-container img {
    width: 100%;
    max-width: 250px;
  }
}