
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background: #f3f4f6;
  color: #111827;
  padding: 30px 15px;
}

/*  Layout */
.container {
  max-width: 1100px;
  margin: 0 auto;
}

h2 {
  text-align: center;
  margin-bottom: 25px;
  font-size: 28px;
  font-weight: 700;
  color: #1f2937;
}

/* Cards */
.card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0px 4px 10px rgba(0,0,0,0.05);
}

.card h3 {
  margin-bottom: 15px;
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}


/* Form Grid */
.form-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  align-items: end;
}

.field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #374151;
}

.field input {
  width: 100%;
  padding: 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  outline: none;
  font-size: 14px;
}

.field input:focus {
  border-color: #2563eb;
}

/*   Main Button */
.main-btn {
  grid-column: span 4;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: #2563eb;
  color: white;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
}

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

/*  Filter Bar */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 20px;
}

.filter-bar label {
  font-weight: 600;
  font-size: 14px;
  color: #374151;
}

.filter-bar select {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  outline: none;
}

/*   Table Styling */
table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 10px;
}

thead {
  background: #f9fafb;
}

th, td {
  text-align: left;
  padding: 14px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 14px;
}

th {
  font-weight: 700;
  color: #374151;
}

tbody tr:hover {
  background: #f3f4f6;
}

/* Status Styling */
td:nth-child(5) {
  font-weight: 700;
  text-transform: capitalize;
}

td:nth-child(5):contains("pending") {
  color: #ca8a04;
}

td:nth-child(5):contains("accepted") {
  color: #16a34a;
}

td:nth-child(5):contains("rejected") {
  color: #dc2626;
}

/*  Action Buttons */
.actions button {
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  margin-right: 6px;
  transition: 0.2s;
}

.actions button:nth-child(4) {
  background: #dc2626;
  color: white;
}

.actions button:nth-child(1) {
  background: #16a34a;
  color: white;
}

.actions button:nth-child(2) {
  background: #f59e0b;
  color: white;
}

.actions button:nth-child(3) {
  background: #2563eb;
  color: white;
}

.actions button:hover {
  opacity: 0.85;
}

.actions button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.status {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  text-transform: capitalize;
}

.status.pending {
  background: #fef3c7;
  color: #92400e;
}

.status.accepted {
  background: #dcfce7;
  color: #166534;
}

.status.rejected {
  background: #fee2e2;
  color: #991b1b;
}

/* RESPONSIVE DESIGN */
/* Tablet */
@media (max-width: 900px) {
  body {
    padding: 20px 12px;
  }

  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .main-btn {
    grid-column: span 2;
  }

  th, td {
    padding: 12px;
    font-size: 13px;
  }

  .actions button {
    padding: 7px 10px;
    font-size: 12px;
  }
}

/* Mobile */
@media (max-width: 600px) {
  h2 {
    font-size: 22px;
  }

  .card {
    padding: 15px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .main-btn {
    grid-column: span 1;
  }

  .filter-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  /* Make table scrollable */
  .card table {
    display: block;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
  }

  th, td {
    padding: 10px;
    font-size: 13px;
  }

  .actions button {
    margin-bottom: 6px;
    display: inline-block;
  }
}