:root {
  --primary-color: #007bff;
  --primary-hover: #0056b3;
  --bg-color: #ffffff;
  --text-color: #333333;
  --border-color: #cccccc;
  --success-color: #28a745;
  --error-color: #dc3545;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

/* Layout */
body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.container {
  width: 90%;
  max-width: 500px;
  padding: 20px;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.back {
  font-size: 24px;
  cursor: pointer;
}

.user {
  background-color: #e6f0ff;
  padding: 5px 10px;
  border-radius: 15px;
}

/* Logo */
.logo {
  max-width: 180px;
  margin: 0 auto 30px;
  display: block;
}

/* Forms */
.form-group {
  margin-bottom: 15px;
  position: relative;
}

label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

input, textarea, select {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary-color);
}

input.error, textarea.error, select.error {
  border-color: var(--error-color);
}

.input-with-dropdown {
  flex: 1;
  position: relative;
  width: 100%;
}

datalist {
  max-height: 200px;
  overflow-y: auto;
}

.btn-add {
  position: absolute;
  right: 5px;
  top: 33px;
  width: auto !important;
  padding: 0 10px !important;
  border-radius: 4px !important;
}

/* Buttons */
button {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border: none;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.1s;
}

button:active {
  transform: scale(0.98);
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.photo-btn {
  background-color: #6c757d;
  color: white;
  font-size: 14px;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  overflow: auto;
}

.modal-content {
  background-color: var(--bg-color);
  margin: 10% auto;
  padding: 20px;
  width: 80%;
  max-width: 600px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover {
  color: black;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  z-index: 1000;
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Historial items */
.historial-item {
  background-color: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 10px;
}

.historial-item button {
  width: auto;
  padding: 8px 15px;
  margin: 0;
}

/* Media queries */
@media (max-width: 480px) {
  header h2 {
    font-size: 18px;
  }
}

@media (max-width: 768px) {
  button, input {
    font-size: 14px;
    padding: 10px;
  }
  .container {
    padding: 10px;
  }
}
