* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #1976d2;
  --success: #4caf50;
  --danger: #f44336;
  --light-bg: #f5f5f5;
  --dark-text: #333;
  --border: #ddd;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--light-bg);
  color: var(--dark-text);
}

#app {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.container {
  width: 100%;
  max-width: 500px;
  position: relative;
}

.screen {
  display: none;
  animation: fadeIn 0.3s ease-in;
}

.screen.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Login Screen */
.login-box {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  text-align: center;
}

.login-box h1 {
  font-size: 32px;
  margin-bottom: 10px;
  color: var(--primary);
}

.subtitle {
  color: #666;
  margin-bottom: 30px;
  font-size: 14px;
}

#login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

input {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
}

input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(25,118,210,0.1);
}

.demo-text {
  font-size: 12px;
  color: #999;
  margin-top: 15px;
}

/* Main Screen */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 16px;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 0;
}

.header h1 {
  font-size: 20px;
}

.btn-logout {
  background: transparent;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 14px;
  padding: 6px 12px;
}

.main-content {
  background: white;
  padding: 24px;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Timer */
.timer-box {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px;
  background: linear-gradient(135deg, var(--primary), #1565c0);
  border-radius: 12px;
  color: white;
}

.timer {
  font-size: 48px;
  font-weight: 300;
  font-family: 'Courier New', monospace;
  margin-bottom: 8px;
  letter-spacing: 2px;
}

.timer-label {
  font-size: 13px;
  opacity: 0.9;
}

/* Location */
.location-box {
  background: #e3f2fd;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 13px;
  color: #1565c0;
}

/* Buttons */
.button-group {
  display: flex;
  gap: 12px;
  margin-bottom: 30px;
}

.btn {
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: #1565c0;
  box-shadow: 0 4px 8px rgba(25,118,210,0.3);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover:not(:disabled) {
  background: #45a049;
  box-shadow: 0 4px 8px rgba(76,175,80,0.3);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background: #da190b;
  box-shadow: 0 4px 8px rgba(244,67,54,0.3);
}

/* Jornadas List */
.jornadas-list h2 {
  font-size: 16px;
  margin-bottom: 12px;
}

#jornadas-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.jornada-item {
  background: #f9f9f9;
  padding: 12px;
  border-radius: 6px;
  border-left: 4px solid var(--success);
  font-size: 13px;
}

.jornada-item.active {
  border-left-color: var(--primary);
  background: #f0f7ff;
}

.jornada-time {
  font-weight: 600;
  color: var(--primary);
}

.empty-text {
  color: #999;
  text-align: center;
  padding: 20px;
  font-size: 13px;
}

/* Error Message */
.error-message {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--danger);
  color: white;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 13px;
  display: none;
  max-width: 90%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  z-index: 1000;
}

.error-message.show {
  display: block;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Responsive */
@media (max-width: 480px) {
  .timer {
    font-size: 36px;
  }

  .btn {
    padding: 12px;
    font-size: 13px;
  }
}
