/* Global brand styling */
body {
  font-family: 'Poppins', sans-serif;
  background-color: #fdfaf7;
  color: #333;
  margin: 0;
  padding: 20px;
  text-align: center;
  line-height: 1.6;
}

/* Logo */
.logo {
  max-width: 180px;
  height: auto;
  margin: 0 auto 20px auto;
}

/* Headings */
h1, h2 {
  color: #2c2c2c;
  margin-bottom: 10px;
}

/* Paragraphs */
p {
  font-size: 1.1rem;
  color: #555;
  max-width: 600px;
  margin: 0 auto 20px auto;
}

/* Forms */
form {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  text-align: left;
}

input, textarea, select {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
}

/* Buttons */
button, .btn {
  display: inline-block;
  padding: 12px 20px;
  background-color: #2c2c2c;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
}

form button {
  width: 100%;
  display: block;
}

/* Footer */
footer {
  margin-top: 40px;
  font-size: 0.9rem;
  color: #888;
}

/* Spinner */
.spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #2c2c2c;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  animation: spin 0.8s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ----------------------------- */
/* DASHBOARD STYLING             */
/* ----------------------------- */

/* Hide header until logged in */
header {
  background: #2c2c2c;
  color: white;
  padding: 15px 20px;
  font-size: 1.4rem;
  font-weight: 600;
  display: none; /* JS will show it */
}

/* Login box */
#loginBox {
  max-width: 400px;
  margin: 60px auto;
  background: white;
  padding: 30px;
  border-radius: 12px;
  border: 1px solid #ddd;
  text-align: center;
  display: block; /* default */
}

#loginBox input {
  width: 100%;
  padding: 12px;
  margin-top: 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 1rem;
}

#loginBox button {
  width: 100%;
  padding: 12px;
  margin-top: 20px;
  background: #2c2c2c;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
}

/* Dashboard container */
#dashboard {
  display: none; /* JS will show it */
  padding: 20px;
}

/* Dashboard table */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background: white;
  border-radius: 12px;
  overflow: hidden;
}

th, td {
  padding: 12px;
  border-bottom: 1px solid #eee;
  text-align: left;
}

th {
  background: #f3f3f3;
  font-weight: 600;
}

/* Delete button */
.delete-btn {
  background: #c62828;
  color: white;
  padding: 6px 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.delete-btn:hover {
  background: #b71c1c;
}

/* Logout button */
#logoutBtn {
  background: #444;
  color: white;
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  float: right;
  margin-top: -45px;
  margin-right: 20px;
}

/* Fix form submit button alignment */
form button {
  width: 100% !important;
  display: block !important;
  text-align: center;
}
