body {
  font-family: Arial;
  background: linear-gradient(135deg, #fdf6ff, #e6f7ff);
  padding: 20px;
}

.card {
  background: #fff;
  padding: 20px;
  border-radius: 16px;
  max-width: 420px;
  margin: auto;
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

h2 {
  text-align: center;
  color: #6b5b95;
  font-size: 18px;
}

#status {
  text-align: center;
  margin-bottom: 10px;
  color: #777;
}

input, select, textarea {
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #ddd;
  font-size: 14px;
  box-sizing: border-box;
}

textarea {
  min-height: 80px;
}

.field {
  margin-top: 10px;
}

.field label {
  font-size: 12px;
  color: #888;
  display: block;
  margin-bottom: 5px;
}

button {
  width: 100%;
  margin-top: 15px;
  padding: 12px;
  background: linear-gradient(135deg, #a18cd1, #fbc2eb);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  cursor: pointer;
}

button:disabled {
  background: #ccc;
}

button:active {
  transform: scale(0.98);
}

/* Dashboard container */
.container {
  max-width: 800px;
  margin: auto;
  padding: 10px;
}

/* Back navigation */
.back-btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: #6b5b95;
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 15px;
  transition: transform 0.2s;
}

.back-btn:hover {
  transform: translateX(-3px);
}

/* Search bar styling */
.search-box {
  margin-top: 15px;
  margin-bottom: 5px;
  position: relative;
}

.search-box input {
  padding-left: 35px;
}

.search-box::before {
  content: "🔍";
  position: absolute;
  left: 12px;
  top: 22px;
  font-size: 14px;
  color: #888;
}

/* Appointment card list styling */
.appointment-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 15px;
}

.appointment-card {
  background: white;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.04);
  border-left: 6px solid #a18cd1;
  transition: transform 0.2s, box-shadow 0.2s;
  animation: fadeIn 0.4s ease-out;
}

.appointment-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.appointment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.patient-name {
  font-size: 16px;
  font-weight: bold;
  color: #333;
}

.appointment-time {
  font-size: 15px;
  color: #6b5b95;
  font-weight: bold;
  background: #f3efff;
  padding: 4px 10px;
  border-radius: 8px;
}

.appointment-details {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  font-size: 13.5px;
  color: #555;
}

@media(min-width: 600px) {
  .appointment-details {
    grid-template-columns: 1fr 1fr;
  }
}

.detail-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.detail-label {
  color: #999;
  min-width: 50px;
}

.detail-value {
  color: #333;
  font-weight: 500;
}

.phone-link {
  color: #2f80ed;
  text-decoration: none;
}

.phone-link:hover {
  text-decoration: underline;
}

.note-box {
  grid-column: 1 / -1;
  background: #fafafa;
  padding: 10px 12px;
  border-radius: 8px;
  border-left: 3px solid #ddd;
  font-size: 12.5px;
  color: #666;
  margin-top: 5px;
}

/* Badges styling */
.badge-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: bold;
}

/* Service colors */
.badge-service-mmt {
  background-color: #e8dff5;
  color: #6f2dbd;
}

.badge-service-gaow {
  background-color: #fce1e4;
  color: #c71585;
}

/* Team colors */
.badge-team-nurse {
  background-color: #e0f2fe;
  color: #0369a1;
}

.badge-team-social {
  background-color: #ffedd5;
  color: #c2410c;
}

.badge-team-psych {
  background-color: #dcfce7;
  color: #15803d;
}

.badge-team-staff {
  background-color: #f3f4f6;
  color: #4b5563;
}

/* Status colors */
.badge-status-sent {
  background-color: #d1fae5;
  color: #065f46;
}

.badge-status-unsent {
  background-color: #fee2e2;
  color: #991b1b;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #888;
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.empty-icon {
  font-size: 40px;
  margin-bottom: 10px;
}

/* Loading spinner */
.spinner-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 0;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(161, 140, 209, 0.2);
  border-top-color: #a18cd1;
  border-radius: 50%;
  animation: spin 1s infinite linear;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}