/* Global Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f4f7fa;
  color: #333;
  line-height: 1.4;
}

/* Login Page */
.login-container {
  max-width: 400px;
  margin: 80px auto;
  padding: 40px 30px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.login-container h1 {
  margin-bottom: 24px;
  font-size: 1.6rem;
  color: #052c59;
}

#login-form input {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 18px;
  border: 1px solid #ccc;
  border-radius: 4px;
  transition: border-color 0.3s;
}

#login-form input:focus {
  border-color: #0563bb;
  outline: none;
}

#login-form button {
  width: 100%;
  padding: 12px;
  background-color: #0563bb;
  border: none;
  border-radius: 4px;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
}

#login-form button:hover {
  background-color: #084f97;
}

.error {
  color: red;
  margin-top: 10px;
  font-size: 0.9rem;
}

/* Dashboard */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background-color: #052c59;
  color: #fff;
}

.navbar h2 {
  font-size: 1.5rem;
}

.navbar button {
  padding: 8px 16px;
  background-color: #f04438;
  border: none;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}

.navbar button:hover {
  background-color: #d2362e;
}

.container {
  padding: 24px;
}

/* Filter Section */
.filters {
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  margin-bottom: 30px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.filters .field-group {
  display: flex;
  flex-direction: column;
}

.filters label {
  margin-bottom: 8px;
  font-weight: 600;
  color: #052c59;
}

.filters input[type="text"],
.filters input[type="date"],
.filters select {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.status-filter {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-filter label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.status-filter input[type="checkbox"] {
  margin-right: 4px;
  transform: scale(1.2);
}

.filter-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 20px;
  margin-top: 10px;
}

.filter-actions button {
  padding: 10px 20px;
  background-color: #0563bb;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.filter-actions button:hover {
  background-color: #084f97;
}

/* Add Forms */
.form-section {
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  margin-bottom: 30px;
}

.form-section h3 {
  margin-bottom: 16px;
  color: #052c59;
}

.form-section form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.form-section input,
.form-section select,
.form-section textarea {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.form-section button {
  grid-column: span 2;
  padding: 12px;
  background-color: #0563bb;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.form-section button:hover {
  background-color: #084f97;
}

/* Appointment/Invoice Cards */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.card {
  background-color: #0c2344;
  color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  padding: 16px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 180px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.card-number {
  font-size: 0.9rem;
  font-weight: bold;
  color: #56a0d3;
}

.card-date {
  font-size: 0.8rem;
  color: #a8b8d0;
}

.card-body {
  flex-grow: 1;
}

.card-body .client-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.card-body .horse-name {
  font-size: 0.9rem;
  color: #a8b8d0;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.amount {
  font-size: 1rem;
  font-weight: bold;
}

.status {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  color: #0c2344;
}

.status.unpaid {
  background-color: #ffd4d6;
  color: #b3232e;
}

.status.paid {
  background-color: #d4f5e9;
  color: #237d54;
}

.card .email-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background-color: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: #56a0d3;
  transition: color 0.2s;
}

.card .email-btn:hover {
  color: #fff;
}

.no-data {
  text-align: center;
  padding: 20px;
  color: #777;
  font-style: italic;
}

@media (max-width: 600px) {
  .filters {
    grid-template-columns: 1fr;
  }
  .form-section form {
    grid-template-columns: 1fr;
  }
  .form-section button {
    grid-column: span 1;
  }
}