body {
  font-family: "Inter", sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
  min-height: 100vh;
  /* Include padding within min-height to prevent unnecessary scrolling */
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  color: #333;
  margin: 0;
  padding: 20px;
}

/* Buttons */
button {
  padding: 0.7rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    transform 0.1s,
    box-shadow 0.2s;
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  color: white;
  box-shadow: 0 2px 4px rgba(52, 152, 219, 0.3);
}
button:active {
  transform: scale(0.9);
}
button:hover {
  box-shadow: 0 6px 16px rgba(52, 152, 219, 0.5);
}

/* Typography */
h1 {
  color: #2c3e50;
}
h2 {
  color: #34495e;
  border-bottom: 2px solid #3498db;
  padding-bottom: 0.5rem;
  margin-top: 0;
}

/* Links */
a {
  text-decoration: none;
  color: #2980b9;
}
a:hover {
  text-decoration: underline;
}

/* Forms */
form {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
  margin: 1rem 0;
}
label {
  display: block;
  font-weight: 500;
  color: #555;
  margin-bottom: 0.3rem;
  margin-top: 0.8rem;
}
input {
  width: 100%;
  max-width: 240px;
  padding: 0.4rem 0.6rem;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
input:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}
form button {
  display: block;
  margin-top: 1.5rem;
}
form a {
  display: block;
  margin-top: 1.5rem;
}
form + a {
  display: inline-block;
  margin-top: 1rem;
}
.password-wrapper {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.delete-button,
.toggle-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-left: 0.5rem;
  margin-top: 0;
}
.delete-button {
  display: none;
  margin-left: 0.5rem;
}

/* Admin header */
.admin-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  display: inline-block;
  font-size: 0.9rem;
  letter-spacing: 2px;
  margin-bottom: 1rem;
}

/* Subscription status */
.subscription-active,
.subscription-inactive {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 2px;
  margin-left: 0.5rem;
}
.subscription-active {
  background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
  color: white;
}
.subscription-inactive {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: white;
}

/* Sections */
.section {
  margin-bottom: 3rem;
}
.section:first-of-type {
  margin-top: 1rem;
}

/* User info section */
.section > p {
  color: #7f8c8d;
  font-size: 0.9rem;
  margin: 0.3rem 0;
}

/* Ride items */
.ride-item-form {
  display: inline;
  background: none;
  padding: 0;
  box-shadow: none;
  margin: 0;
  border-radius: 0;
}
.ride-item-form input[type="checkbox"] {
  width: auto;
}
.ride-item-form input[type="datetime-local"] {
  max-width: 190px;
}

/* Radio buttons for subscription */
form[action="/subscription/generate-qr"] label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  margin: 0.5rem 0;
  cursor: pointer;
  transition: background 0.2s;
}
form[action="/subscription/generate-qr"] label:hover {
  background: #e9ecef;
}
input[type="radio"] {
  accent-color: #3498db;
  width: 18px;
  height: 18px;
}

/* Login error */
.login-error {
  color: #e74c3c;
  font-size: 0.85rem;
  margin: 0.5rem 0 0;
}

/* Modals */
.frontend-modal {
  display: none;
}
.frontend-modal,
.backend-modal {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  color: white;
  padding: 1rem 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  font-weight: 500;
  animation: slideDown 0.3s ease;
}
.modal-success {
  background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
}
.modal-error {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Dialog */
.delete-dialog {
  border: none;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}
.ride-delete-form {
  display: flex;
  justify-content: center;
  align-items: center;
  background: none;
  padding: 0;
  box-shadow: none;
  margin: 0;
  border-radius: 0;
}
.delete-dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
}
.delete-dialog h3 {
  margin-top: 0;
  color: #e74c3c;
}
.delete-dialog button {
  margin: 0.5rem;
}
.delete-dialog button[value="cancel"] {
  background: #ecf0f1;
  color: #7f8c8d;
}
.delete-dialog button[value="confirm"] {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: white;
}

/* Cookie notice */
.cookie-notice {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #2c3e50;
  color: white;
  padding: 1rem 2rem;
  text-align: center;
  z-index: 100;
  font-size: 0.9rem;
}
.cookie-notice p {
  margin: 0 0 0.5rem;
}
.cookie-dismiss {
  padding: 0.4rem 1.2rem;
  font-size: 0.85rem;
}

/* Footer */
footer {
  margin-top: auto;
  text-align: center;
  color: #7f8c8d;
  font-size: 0.85rem;
}
