/* === General Styles === */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #f4f4f4;
}

/* === Navigation Bar === */
nav {
  background-color: #2c3e50;
  color: white;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

nav ul li {
  margin-right: 20px;
}

nav ul li a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

/* === Avatar Dropdown Container === */
.user-dropdown {
  position: relative;
  display: inline-block;
}

/* Hide the checkbox */
.user-dropdown input[type="checkbox"] {
  display: none;
}

/* Avatar image */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid white;
  vertical-align: middle;
}

/* Menu that appears on avatar click */
.user-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 50px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 16px 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  min-width: 200px;
  transition: opacity 0.2s ease, transform 0.2s ease;
  opacity: 0;
  transform: translateY(-5px);
}

/* Show menu when checkbox is checked */
#menu-toggle:checked + .avatar-label + .user-menu {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.user-menu .username {
  font-weight: bold;
  color: #2c3e50;
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
}

.user-menu .fullname {
  font-size: 13px;
  color: #555;
  display: block;
  margin-bottom: 16px;
}

.user-menu button {
  width: 100%;
  padding: 10px;
  background: #e74c3c;
  color: white;
  font-size: 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.user-menu button:hover {
  background: #c0392b;
}

.user-menu::before {
    content: "";
    position: absolute;
    top: -8px;
    right: 16px;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
}

/* Toggle dropdown when checkbox is checked */
#menu-toggle:checked + .avatar-label + .user-menu {
  display: block;
}

/* === Form Styles === */
form {
  margin: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

input[type="text"],
select {
  padding: 6px;
  font-size: 14px;
}

button[type="submit"] {
  padding: 6px 12px;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

button[type="submit"]:hover {
  background: #2980b9;
}

/* === Table Styles === */
table {
  width: 95%;
  margin: 20px auto;
  border-collapse: collapse;
  background: white;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

thead {
  background: #3498db;
  color: white;
}

th, td {
  padding: 12px;
  border: 1px solid #ccc;
  text-align: left;
  vertical-align: middle;
}

tbody tr:nth-child(even) {
  background: #f9f9f9;
}

td img {
  border-radius: 4px;
}

main {
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 20px;
}

h1 {
  font-size: 28px;
  color: #2c3e50;
  margin-bottom: 10px;
}

h2 {
  font-size: 22px;
  color: #2c3e50;
  margin-top: 40px;
}

.detail-section {
  background-color: #ffffff;
  padding: 20px 25px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  margin-bottom: 40px;
  line-height: 1.6;
}

.detail-section p {
  margin: 6px 0;
  color: #34495e;
  font-size: 16px;
}

.page-title, .section-title {
  text-align: center;
  color: #2c3e50;
  margin-top: 40px;
}

.detail-section.full-width {
  width: 95%;
  margin: 20px auto;
  padding: 20px 25px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
  font-size: 16px;
  line-height: 1.6;
  color: #34495e;
}

/* === Login Form Styles === */
.login-container {
  max-width: 400px;
  margin: 80px auto;
  padding: 30px 25px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-label {
  margin-bottom: 6px;
  font-weight: bold;
  color: #2c3e50;
  font-size: 14px;
}

.form-select,
.form-input {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-select:focus,
.form-input:focus {
  border-color: #3498db;
  outline: none;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.login-button {
  padding: 12px;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

.login-button:hover {
  background: #2980b9;
}

.flash-messages {
  max-width: 600px;
  margin: 20px auto;
  padding: 0 20px;
}

.flash-message {
  padding: 16px 20px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 20px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* === Message Types === */
.flash-message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.flash-message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.flash-message.info {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.flash-message.warning {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
}

.status {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: bold;
  text-transform: uppercase;
}

.status-EX {
  background-color: #000000;
  color: #ff4c4c;
}

.status-EW {
  background-color: #000000;
  color: #ffffff;
}

.status-CR {
  background-color: #d73a3a;
  color: #ffffff;
}

.status-EN {
  background-color: #e88f47;
  color: #ffffff;
}

.status-VU {
  background-color: #e0c341;
  color: #000000;
}

.status-NT {
  background-color: #3e9486;
  color: #ffffff;
}

.status-LC {
  background-color: #3a908d;
  color: #ffffff;
}

.status-default {
  background-color: #cccccc;
  color: #000000;
}

/* === Pincode Change Page === */
.pincode-container {
  max-width: 400px;
  margin: 60px auto;
  padding: 30px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.pincode-container h1 {
  text-align: center;
  font-size: 24px;
  margin-bottom: 10px;
  color: #2c3e50;
}

.pincode-container .username-display {
  text-align: center;
  font-size: 14px;
  color: #888;
  margin-bottom: 20px;
}

.update-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.update-form input[type="password"] {
  padding: 12px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 8px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.update-form input[type="password"]:focus {
  border-color: #3498db;
  outline: none;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.update-button {
  padding: 12px;
  background: #27ae60;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

.update-button:hover {
  background: #1e8449;
}

.pincode-container {
  max-width: 400px;
  margin: 60px auto;
  padding: 30px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  text-align: center;
}

.profile-image {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #3498db;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

ul {
  padding-left: 20px;
}

ul li {
  margin-bottom: 8px;
  font-size: 16px;
  color: #2c3e50;
}

.profile-link {
  display: inline-block;
  margin-top: 8px;
  color: #3498db;
  text-decoration: none;
  font-weight: bold;
}

.profile-link:hover {
  text-decoration: underline;
}

h3 {
  font-size: 18px;
  margin: 0 0 6px;
  color: #2c3e50;
}