/* ======= Base Styling ======= */
body {
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(to right, #74ebd5, #ACB6E5);
  margin: 0;
  padding: 0;
  color: #333;
}

.container {
  max-width: 900px;
  margin: 50px auto;
  background: white;
  padding: 25px 30px;
  border-radius: 16px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

h2 {
  text-align: center;
  color: #2c3e50;
  margin-bottom: 30px;
}

/* ======= Form Styling ======= */
form {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}

form input,
form button {
  padding: 12px;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  width: 100%;
  max-width: 400px;
  box-sizing: border-box;
}

form button {
  background-color: #007BFF;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s ease;
}

form button:hover {
  background-color: #0056b3;
}

/* ======= General Buttons ======= */
.button, .print-btn {
  display: inline-block;
  background: #28a745;
  color: white;
  padding: 10px 20px;
  margin: 10px 5px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s;
}

.button:hover {
  background: #218838;
}

.print-btn {
  background: #6c757d;
}

.print-btn:hover {
  background: #495057;
}

/* ======= Table Styling ======= */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 30px;
}

thead {
  background: #007BFF;
  color: white;
}

table th, table td {
  padding: 12px;
  text-align: center;
  border-bottom: 1px solid #ddd;
}

table td:last-child {
  min-width: 120px;
}

/* ======= Action Buttons (Edit/Delete) ======= */
.action-btn {
  display: inline-block;
  padding: 6px 10px;
  margin: 0 3px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: bold;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: 0.2s ease;
}

.action-btn.edit {
  background-color: #ffc107;
  color: #000;
}

.action-btn.edit:hover {
  background-color: #e0a800;
}

.action-btn.delete {
  background-color: #dc3545;
  color: #fff;
}

.action-btn.delete:hover {
  background-color: #c82333;
}

/* ======= Responsive Design ======= */
@media (max-width: 768px) {
  .container {
    margin: 20px;
    padding: 20px;
  }

  table thead {
    display: none;
  }

  table tr {
    display: block;
    margin-bottom: 15px;
    background: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }

  table td {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border: none;
    border-bottom: 1px solid #ddd;
  }

  table td::before {
    content: attr(data-label);
    font-weight: bold;
    color: #007BFF;
  }

  table td:last-child {
    justify-content: center;
  }
}

/* ======= Print Styling ======= */
@media print {
  .no-print,
  .print-btn,
  .button,
  a[href*="edit.html"],
  a[href="add.html"] {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
  }

  .container {
    box-shadow: none !important;
    padding: 10px;
    margin: 0;
  }

  table {
    page-break-inside: auto;
  }

  table tr {
    page-break-inside: avoid;
    page-break-after: auto;
  }
}
