/* ====== Base Layout ====== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Hack', monospace;
}

body {
  background-color: #f2f3f5;
  color: #333;
}

.container {
  display: flex;
  min-height: 100vh;
}

.flash {
  display: flex;
  margin-bottom: 1.5rem;
  color: #fffefe;
  background: #707070;
  padding: 1.5rem;
  border-radius: 5px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ======= Login ======= */
.login {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 350px;
  transform: translate(-50%, -50%);
  background: #333;
  padding: 1.5rem;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.login label {
  color: #f2f3f5;
}

.login h2 {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
  text-align: center;
  color: #f2f3f5;
}

/* ====== Sidebar ====== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  height: 100vh; /* full viewport height */
  background-color: #222;
  color: white;
  padding: 1.5rem;
  overflow-y: auto; /* optional: makes sidebar scrollable if it has a lot of content */
}

.sidebar h2 {
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
  text-align: center;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar ul li {
  margin-bottom: 1rem;
}

.sidebar ul li a {
  color: white;
  text-decoration: none;
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 5px;
  transition: background 0.2s;
}

.sidebar ul li a:hover,
.sidebar ul li a.active {
  background-color: #444;
}

/* --- Logout Button --- */
.sidebar-logout-btn {
  position: absolute;
  bottom: 20px;
  left: 1.5rem; /* same as sidebar padding */
  right: 1.5rem;
  display: block;
  text-align: center;
  background-color: #333;
  color: white;
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 5px;
  transition: background 0.2s;
}

.sidebar-logout-btn:hover {
  background-color: #444;
}

/* ====== Main Content ====== */
.main-content {
  margin-left: 240px;
  flex: 1;
  padding: 2rem;
}

header h1 {
  margin-bottom: 1.5rem;
}

/* ====== Dashboard Cards ====== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(5, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.card {
  background: white;
  padding: 1.5rem;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Example: make one card span two rows like your .div2 */
.card.tall {
  grid-row: span 2 / span 2;
}

/* Optional responsive layout: one per row on small screens */
@media (max-width: 700px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

/* ====== Data Table ====== */
.data-table {
  margin-top: 2rem;
  background: white;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 2rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  overflow: auto;
}

th, td {
  padding: 0.75rem;
  border-bottom: 1px solid #ddd;
  text-align: left;
}

th {
  background-color: #eee;
}

/* ====== Form Section ====== */
.form-section {
  background: white;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-group {
  margin-bottom: 1rem;
}

label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: bold;
}

input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 5px;
}

button {
  background-color: #0077cc;
  color: white;
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.2s;
}

button:hover {
  background-color: #005fa3;
}

a {
  font-size: small;
  background-color: #0077cc;
  color: white;
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.2s;
}
a:hover {
  background-color: #005fa3;  
}