body {
  font-family: Arial, sans-serif;
  background-color: #f8f9fb;
  color: #2c2c2c;
}

h2, h3 {
  color: #2d004d;
}

form {
  background: #fff;
  padding: 1rem;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  max-width: 400px;
  margin-bottom: 2rem;
}

input, select, button {
  width: 100%;
  margin: 0.5rem 0;
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}

button {
  background-color: #2d004d;
  color: white;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

button:hover {
  background-color: #49017c;
}

/* Limit table styling to pages with this wrapper */
.page-content table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  margin-top: 1rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.page-content table th,
.page-content table td {
  padding: 0.8rem;
  border: 1px solid #ccc;
  text-align: left;
}


ul {
  list-style: none;
  padding-left: 0;
}

ul li {
  margin: 0.5rem 0;
}

a {
  text-decoration: none;
  color: #2d004d;
}

a:hover {
  text-decoration: underline;
  color: #4a0080;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 220px;
  height: 100vh;
  background-color: #2d004d;
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 30px 20px;
  font-family: 'Inter', sans-serif;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
  z-index: 1000;
}

/* Logo block */
.sidebar-logo {
  text-align: center;
  margin-bottom: 12px;
}

.sidebar-logo img {
  max-width: 100%;
  height: auto;
}

/* Title */
.sidebar-title {
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 10px;
  line-height: 1.4;
  color: #fff;
}

/* Divider line */
.sidebar hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin: 15px 0;
}

/* Logged-in user section */
.sidebar-section {
  font-size: 14px;
  color: #ccc;
  text-align: center;
  margin-bottom: 10px;
}

.sidebar-label {
  font-weight: 500;
  margin-bottom: 4px;
  color: #ddd;
}

.sidebar-username {
  font-weight: bold;
  color: #fff;
}

/* Navigation links */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.sidebar-nav a {
  color: #f8e9ff;
  font-size: 15px;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s;
  display: block;
}

.sidebar-nav a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.sidebar-nav a.logout-link {
  margin-top: auto;
  background-color: rgba(255, 255, 255, 0.05);
}

.sidebar-nav a.logout-link:hover {
  background-color: rgba(255, 255, 255, 0.15);
}



.main-content {
  margin-left: 240px;
  padding: 40px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.card {
  background: #fff;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card h3 {
  margin-bottom: 10px;
  color: #2d004d;
}

.card a {
  color: #2d004d;
  text-decoration: none;
  font-weight: 600;
  margin-top: 10px;
  transition: color 0.2s;
}

.card a:hover {
  color: #53008f;
}

.user-info {
  margin-bottom: 30px;
  font-size: 15px;
  color: #888;
}

.booking-table-wrapper {
  overflow-x: auto;
  margin-top: 20px;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.booking-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  color: #2c2c2c;
}

.booking-table thead {
  background-color: #f3ebf7;
  font-weight: 600;
}

.booking-table th,
.booking-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e0e0e0;
  text-align: left;
}

.booking-table tr:hover {
  background-color: #faf5fb;
}

.btn-view,
.btn-delete {
  display: inline-block;
  padding: 6px 10px;
  font-size: 14px;
  border-radius: 4px;
  text-decoration: none;
  color: white;
  margin-right: 6px;
}

.btn-view {
  background-color: #2d004d;
}

.btn-view:hover {
  background-color: #4b0081;
}

.btn-delete {
  background-color: #dc3545;
}

.btn-delete:hover {
  background-color: #c82333;
}

.btn-back {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 16px;
  background-color: #2d004d;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s;
}

.btn-back:hover {
  background-color: #2d004d;
}

.lane-form {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  margin-bottom: 30px;
  display: flex;
  gap: 10px;
  align-items: center;
  max-width: 500px;
}

.lane-form input {
  flex: 1;
  padding: 10px;
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.lane-form button {
  padding: 10px 18px;
  background-color: #2d004d;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.lane-form button:hover {
  background-color: #590099;
}

.lane-list-wrapper {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  max-width: 500px;
}

.lane-list {
  list-style: none;
  padding-left: 0;
  margin-top: 10px;
}

.lane-list li {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  font-size: 15px;
  color: #2c2c2c;
}

.lane-list li:last-child {
  border-bottom: none;
}

.lane-id {
  font-weight: bold;
  color: #888;
  margin-right: 8px;
}

.user-form {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  margin-bottom: 30px;
  max-width: 500px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.user-form input,
.user-form select {
  flex: 1 1 100%;
  padding: 10px;
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #fafbfc;
}

.user-form input:focus,
.user-form select:focus {
  border-color: #2d004d;
  outline: none;
  box-shadow: 0 0 0 2px rgba(128, 0, 128, 0.2);
}

.user-form button {
  padding: 10px 16px;
  background-color: #2d004d;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.user-form button:hover {
  background-color: #2d004d;
}

.user-table-wrapper {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  max-width: 900px;
}

.user-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  color: #2c2c2c;
}

.user-table th,
.user-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e0e0e0;
  text-align: left;
}

.user-table thead {
  background-color: #f3ebf7;
  color: #2d004d;
  font-weight: 600;
}

.user-table tr:hover {
  background-color: #faf5fb;
}

/* Mobile responsive adjustments */
@media (max-width: 1024px) {
  .main-content {
    margin-left: 200px; /* narrower sidebar space */
    padding: 20px;
  }
}

@media (max-width: 768px) {
  /* Sidebar hidden by default (see sidebar.css for open state) */
  .main-content {
    margin-left: 0;
    padding: 20px 15px;
  }

  /* Forms */
  form,
  .lane-form,
  .user-form {
    max-width: 100%;
    padding: 15px;
  }

  input, select, button {
    font-size: 16px; /* larger tap-friendly inputs */
  }

  /* Tables */
  .page-content table,
  .booking-table,
  .user-table {
    font-size: 13px;
  }
  .booking-table th,
  .booking-table td,
  .user-table th,
  .user-table td {
    padding: 8px 10px;
  }

  /* Cards stack neatly */
  .card-grid {
    grid-template-columns: 1fr; /* single column */
  }

  /* Footer adjustments */
  .sidebar-footer {
    font-size: 11px;
    padding: 10px 5px;
  }
}

@media (max-width: 480px) {
  /* Very small screens */
  .main-content {
    padding: 15px 10px;
  }

  h2, h3 {
    font-size: 1.1rem;
  }

  .btn-view,
  .btn-delete,
  .btn-back {
    font-size: 13px;
    padding: 6px 10px;
  }

  .lane-form,
  .user-form {
    flex-direction: column;
    gap: 8px;
  }

  .lane-form button,
  .user-form button {
    width: 100%;
  }
}
