* {
  box-sizing: border-box;
  -webkit-box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: #f7f7f7;
  color: #111;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px;
  width: 100%;
  min-height: 100vh;
}

h1 {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
  margin-top: 42px;
  font-weight: 600;
}

h2 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  font-weight: 600;
  color: #111;
}

/* Form */
.timelog-form {
  background: white;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: #666;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input[type="text"],
.form-group input[type="datetime-local"] {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid #ddd;
  -webkit-appearance: none;
  appearance: none;
  background: #fff;
}

.form-group input:focus {
  outline: none;
  border-color: #3b82f6;
}

.form-row {
  display: flex;
  display: -webkit-flex;
  flex-direction: column;
  -webkit-flex-direction: column;
}

.form-row .form-group {
  margin-bottom: 16px;
}

.form-row .form-group:last-child {
  margin-bottom: 16px;
}

/* Utilized / Wasted toggle */
.utilized-toggle-wrap label {
  margin-bottom: 8px;
}

.utilized-toggle {
  display: flex;
  display: -webkit-flex;
  align-items: center;
  -webkit-align-items: center;
  justify-content: center;
  -webkit-justify-content: center;
  gap: 12px;
}

.toggle-option {
  font-size: 0.9rem;
  font-weight: 500;
  color: #666;
}

.toggle-option.active-utilized {
  color: #22c55e;
  font-weight: 600;
}

.toggle-option.active-wasted {
  color: #ef4444;
  font-weight: 600;
}

.toggle-switch {
  position: relative;
  width: 52px;
  height: 28px;
  display: inline-block;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ef4444;
  border-radius: 28px;
  transition: background-color 0.3s;
  -webkit-transition: background-color 0.3s;
}

.toggle-switch .slider::before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.3s;
  -webkit-transition: transform 0.3s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .slider {
  background-color: #22c55e;
}

.toggle-switch input:checked + .slider::before {
  transform: translateX(24px);
  -webkit-transform: translateX(24px);
}

/* Buttons */
.btn-primary {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 8px;
  border: none;
  background: #111;
  color: white;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  margin-top: 8px;
}

.btn-primary:active {
  background: #333;
}

/* List */
.timelog-list {
  background: white;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

li {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid #eee;
}

li:last-child {
  margin-bottom: 0;
}

.timelog-item-activity {
  font-size: 1rem;
  font-weight: 600;
  color: #111;
  margin-bottom: 6px;
}

.timelog-item-time {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 4px;
}

.timelog-item-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 6px;
  margin-top: 6px;
}

.timelog-item-badge.utilized {
  background: #dcfce7;
  color: #22c55e;
}

.timelog-item-badge.wasted {
  background: #fee2e2;
  color: #ef4444;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #999;
  font-size: 0.9rem;
}

@media (min-width: 768px) {
  .container {
    padding: 24px;
  }

  .form-row {
    flex-direction: row;
    -webkit-flex-direction: row;
  }

  .form-row .form-group {
    flex: 1;
    -webkit-flex: 1;
    margin-right: 12px;
  }

  .form-row .form-group:last-child {
    margin-right: 0;
  }
}
