/* Base reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Body + layout */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #eef2f5, #dfe7f1);
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  overflow-x: hidden; /* allow vertical scroll if needed */
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #4a90e2;
  padding: 14px 40px;
  color: #fff;
  width: 100%;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar .logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: bold;
  font-size: 1.3em;
}

.navbar .logo img {
  height: 45px;
}

.navbar a {
  color: #fff;
  margin-left: 20px;
  text-decoration: none;
  transition: opacity 0.3s;
}

.navbar a:hover {
  opacity: 0.8;
}

/* Main container */
.container {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  width: 100%;
  padding: 20px;
}

/* Card */
.card {
  background: #fff;
  border-radius: 16px;
  padding: 40px;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 15px 40px rgba(0,0,0,0.12);
  margin-bottom: 30px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.card h2 {
  text-align: center;
  color: #4a90e2;
  margin-bottom: 30px;
  font-size: 1.7em;
}

/* Input wrapper for icons */
.input-wrapper {
  display: block;
  margin-bottom: 20px;
  font-weight: 600;
  color: #555;
  position: relative;
}

.input-wrapper input[type=text] {
  width: 100%;
  padding: 14px 45px 14px 14px;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-size: 1em;
  line-height: 1.2em;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.input-wrapper input[type=text]:focus {
  border-color: #4a90e2;
  box-shadow: 0 0 6px rgba(74,144,226,0.3);
  outline: none;
}

.input-wrapper .icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: #aaa;
  pointer-events: none;
}

/* Button */
button {
  padding: 16px;
  width: 100%;
  background: #4a90e2;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1.1em;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.3s, box-shadow 0.3s;
}

button:hover {
  background: #357ab7;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

/* Alerts */
.error {
  background: #fdecea;
  color: #d93025;
  padding: 15px;
  border-radius: 10px;
  margin-top: 25px;
}

.success {
  background: #e6f4ea;
  color: #137333;
  padding: 15px;
  border-radius: 10px;
  margin-top: 25px;
}

.success a {
  color: #137333;
  text-decoration: underline;
}

/* Table (admin only) */
.records {
  width: 100%;
  border-collapse: collapse;
  margin-top: 25px;
}

.records th, .records td {
  padding: 12px 10px;
  border-bottom: 1px solid #eee;
  text-align: left;
}

.records th {
  background: #f5f7fa;
  font-weight: 600;
}

.records tr:hover {
  background: #f0f4f8;
}

/* Footer */
footer {
  text-align: center;
  padding: 20px;
  color: #888;
  font-size: 0.9em;
  width: 100%;
  background: transparent;
}

/* Responsive */
@media (max-width: 600px) {
  .navbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .navbar a {
    margin-left: 0;
    margin-top: 8px;
  }

  .card {
    padding: 30px 20px;
  }

  .records th, .records td {
    padding: 10px 6px;
  }
}
