* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  background: #f4f7f9;
  color: #222;
}

.login-page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: linear-gradient(135deg, #087f5b, #0b7285);
}

.login-box {
  width: 100%;
  max-width: 420px;
  background: white;
  padding: 35px;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.login-box h1 {
  color: #087f5b;
  text-align: center;
  margin-bottom: 8px;
}

.login-box h2 {
  text-align: center;
  margin-bottom: 25px;
  color: #444;
}

label {
  display: block;
  margin: 14px 0 6px;
  font-weight: bold;
}

input {
  width: 100%;
  padding: 13px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 15px;
}

button {
  border: none;
  border-radius: 6px;
  padding: 12px 18px;
  background: #087f5b;
  color: white;
  cursor: pointer;
  font-size: 15px;
  font-weight: bold;
}

button:hover {
  background: #065f46;
}

.login-box button {
  width: 100%;
  margin-top: 20px;
}

.error-message {
  min-height: 20px;
  margin-top: 12px;
  color: #d00000;
  text-align: center;
}

.success-message {
  margin-top: 15px;
  color: #087f5b;
  font-weight: bold;
}

.admin-header {
  background: #087f5b;
  color: white;
  padding: 20px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.admin-header h1 {
  margin-bottom: 6px;
}

.logout-button {
  background: #d00000;
}

.logout-button:hover,
.danger-button:hover {
  background: #a00000;
}

.dashboard-container {
  width: 90%;
  max-width: 1200px;
  margin: 30px auto;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 25px;
}

.stat-card,
.admin-section {
  background: white;
  padding: 24px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.stat-card h3 {
  color: #555;
  margin-bottom: 10px;
}

.stat-card p {
  font-size: 28px;
  font-weight: bold;
  color: #087f5b;
}

.stat-card .online {
  color: #087f5b;
  font-size: 20px;
}

.admin-section {
  margin-bottom: 25px;
}

.admin-section h2 {
  margin-bottom: 18px;
  color: #087f5b;
}

.medicine-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.medicine-form button {
  width: fit-content;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 18px;
}

.danger-button {
  background: #d00000;
}

.medicine-list {
  display: grid;
  gap: 12px;
}

.medicine-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fafafa;
}

.medicine-item h3 {
  color: #087f5b;
  margin-bottom: 6px;
}

.medicine-item p {
  color: #555;
  margin: 3px 0;
}

.delete-button {
  background: #d00000;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .admin-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .stats-grid,
  .medicine-form {
    grid-template-columns: 1fr;
  }

  .medicine-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .delete-button {
    width: 100%;
  }
}

.admin-record-list {
  display: grid;
  gap: 15px;
}

.record-card {
  border: 1px solid #ddd;
  border-left: 5px solid #087f5b;
  padding: 16px;
  border-radius: 8px;
  background: #fafafa;
}

.record-card h3 {
  color: #087f5b;
  margin-bottom: 8px;
}

.record-card p {
  margin: 5px 0;
  color: #444;
}

.empty-records {
  color: #666;
  padding: 10px 0;
}

.record-card select {
  display: block;
  width: 100%;
  max-width: 220px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: white;
  font-size: 14px;
}

.medicine-form select {
  width: 100%;
  padding: 13px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: white;
  font-size: 15px;
}

.stock-label {
  font-weight: bold;
  color: #555;
}

.available-label {
  color: #087f5b;
  font-weight: bold;
}

.out-of-stock-label {
  color: #d00000;
  font-weight: bold;
}