/* 🎨 Variables */
:root {
  --card-bg: #fff;
  --accent: #f4a261;
  --muted: #ecf0f1;
  --text-dark: #232323;
  --shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

/* ---------------- Layout ---------------- */
.page-wrap {
  max-width: 1300px;
  margin: 20px auto;
  display: flex;
  gap: 28px;
  justify-content: center;
  align-items: flex-start;
}

.col {
  width: 50%;
  min-width: 280px;
  background: var(--card-bg);
  padding: 24px;
  border-radius: 14px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.col-left  { width: calc(50% - 14px); }
.col-right { width: calc(50% - 14px); }

/* ---------------- Library Rules ---------------- */
.library-rules h2 {
  text-align: center;
  font-size: 22px;
  color: #2c3e50;
  margin-bottom: 8px;
}

.rules-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rules-item {
  background: var(--muted);
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 16px;
  transition: background 0.22s, transform 0.18s;
}

.rules-item:hover {
  background: #ff9736;
  color: #fff;
  transform: translateY(-2px);
}

/* ---------------- Borrow Section ---------------- */
.borrow-title {
  text-align: center;
  font-size: 22px;
  color: var(--accent);
  margin-bottom: 6px;
  padding-bottom: 6px;
}

.borrow-table {
  width: 100%;
  border-collapse: collapse;
  margin: 6px 0 12px;
  font-size: 16px;
}

.borrow-table th,
.borrow-table td {
  padding: 12px;
  text-align: center;
  border-bottom: 1px solid #e9e9e9;
}

.borrow-table th {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.borrow-table tr { transition: all 0.22s; }
.borrow-table tr:hover {
  background: #fff7ec;
  transform: translateY(-2px);
}

/* แยกสีแถวผู้ใช้ */
.row-student td:first-child { color: #fd9ad7; font-weight: 600; }
.row-staff   td:first-child { color: #f39c12; font-weight: 600; }
.row-general td:first-child { color: #2980b9; font-weight: 600; }
.row-teacher td:first-child { color: #27ae60; font-weight: 600; }

.borrow-fine {
  background: rgba(244, 114, 97, 0.06);
  padding: 12px;
  border-radius: 10px;
  font-size: 16px;
  line-height: 1.85;
}

.borrow-fine strong { font-weight: 700; }
.borrow-fine span   { color: #c0392b; font-weight: 700; }

/* ---------------- Responsive ---------------- */
@media (max-width: 980px) {
  .page-wrap { flex-direction: column; padding: 16px; }
  .col { width: 100%; }
  .library-rules h2, .borrow-title { font-size: 20px; }
}

@media (max-width: 480px) {
  .col { padding: 16px; border-radius: 10px; }
  .rules-item { font-size: 15px; padding: 10px; }
  .borrow-table th, .borrow-table td { font-size: 14px; padding: 10px; }
  .borrow-fine { font-size: 14px; padding: 10px; }
}

.table-wrap { overflow-x: auto; }
