/* ========== RESET ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ========== BASE BODY STYLES ========== */
body {
  height: 100vh;
  background: linear-gradient(135deg, #1d2b64, #d3d3d3);
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Poppins', sans-serif;
  color: white;
  padding: 20px;
}

/* ========== CONTAINERS ========== */
.card,
.card-wide {
  background: rgba(44, 51, 56, 0.95);
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 90%;
  margin: auto;
}

.card {
  max-width: 400px;
}

.card-wide {
  max-width: 1200px;
  gap: 30px;
}

/* ========== TYPOGRAPHY ========== */
h1 {
  font-size: 2em;
  color: lightgrey;
  text-align: center;
  margin-bottom: 20px;
}

/* ========== FORM STRUCTURE ========== */
form {
  width: 100%;
}

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

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

label {
  margin-bottom: 8px;
  font-weight: 500;
}

/* ========== FORM ELEMENTS ========== */
select,
input[type="date"],
input[type="text"] {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: none;
  background: lightgrey;
  color: #2c3338;
  font-size: 16px;
}

select:focus,
input:focus {
  outline: none;
  box-shadow: 0 0 5px lightgrey;
}

/* ========== BUTTONS ========== */
.btn,
button.btn {
  background-color: #4CAF50;
  color: white;
  padding: 12px 24px;
  font-size: 18px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.3s;
  min-width: 150px;
  text-align: center;
  text-decoration: none;
}

.btn:hover,
button.btn:hover {
  background-color: #45a049;
  transform: scale(1.05);
}

.btn:active,
button.btn:active {
  transform: scale(0.98);
}

.button-container {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 30px;
}

/* ========== BUTTON COLOR VARIANTS ========== */
.btn-primary {
  background-color: #a41cc1;
}

.btn-primary:hover {
  background-color: #8b13a3;
}

.btn-secondary {
  background-color: #555;
}

.btn-secondary:hover {
  background-color: #777;
}

.btn-danger {
  background-color: red;
}

.btn-danger:hover {
  background-color: darkred;
}

.download-btn {
  background-color: dodgerblue;
}

.download-btn:hover {
  background-color: #1e90ff;
}

/* ========== CHECKBOXES ========== */
.checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-container input[type="checkbox"] {
  transform: scale(1.2);
}

/* ========== GRID STYLES ========== */
.grid-container-desktop {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  width: 100%;
}

.grid-item-desktop {
  background-color: lightgrey;
  color: #2c3338;
  border-radius: 12px;
  padding: 20px;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.grid-item-desktop hr {
  border: none;
  height: 1px;
  background-color: #bbb;
  margin: 10px 0;
}

/* ========== TABLES ========== */
.table-container {
  width: 100%;
  overflow-x: auto;
}

.styled-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 18px;
  background-color: #d3d3d3;
  color: #2c3338;
  border-radius: 8px;
  overflow: hidden;
}

.styled-table thead {
  background-color: grey;
  color: white;
}

.styled-table th,
.styled-table td {
  padding: 12px 15px;
  text-align: center;
  border-bottom: 1px solid #bbb;
}

.styled-table tr:hover {
  background-color: #ccc;
}

/* Table Action Buttons */
.btn-table-action {
  background-color: #4CAF50;
  color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.2s ease;
  margin: 0 5px;
}

.btn-table-action:hover {
  background-color: #45a049;
  transform: scale(1.05);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .grid-container-desktop {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .grid-container-desktop {
    grid-template-columns: 1fr;
  }

  .card-wide {
    padding: 30px 20px;
  }
}


/* Simple modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}
.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 20px;
    width: 300px;
    border-radius: 8px;
}
.close {
    float: right;
    cursor: pointer;
    font-size: 20px;
}

.subheader {
    background-color: #dfefff;
    font-weight: bold;
    text-align: center;
}

/* Home page animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadein {
  animation: fadeIn 0.8s ease-out;
}

/* Homepage title style */
.homepage-title {
  font-size: 2.2em;
  color: #f1f1f1;
  text-align: center;
  margin-bottom: 30px;
}

/* Button panel container */
.button-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

@media (min-width: 600px) {
  .button-panel {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .button-panel form {
    flex: 1 1 200px;
    max-width: 240px;
  }
}
