* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: #f4f5f7;
  color: #1d1f24;
  margin: 0;
  padding: 24px 16px 64px;
}

.wrap {
  max-width: 560px;
  margin: 0 auto;
}

h1 {
  font-size: 1.4rem;
  margin-bottom: 20px;
}

h2 {
  font-size: 1.1rem;
  margin: 0;
}

form {
  background: #fff;
  border: 1px solid #e2e4e9;
  border-radius: 10px;
  padding: 20px;
}

.field {
  margin-bottom: 16px;
}

.field-row {
  display: flex;
  gap: 12px;
}

.field-row .field {
  flex: 1;
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: #444;
}

input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
}

textarea {
  resize: vertical;
}

button {
  width: 100%;
  padding: 12px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

button:disabled {
  background: #9db6e8;
  cursor: not-allowed;
}

.form-actions {
  display: flex;
  gap: 10px;
}

#cancel-edit-btn {
  background: #eee;
  color: #333;
}

.week-strip {
  display: flex;
  gap: 6px;
  margin: -6px 0 16px;
}

.week-day {
  flex: 1;
  text-align: center;
  padding: 8px 2px;
  border: 1px solid #dde1e8;
  border-radius: 6px;
  background: #f9fafb;
  cursor: pointer;
  font-size: 0.78rem;
  line-height: 1.3;
}

.week-day .dow {
  display: block;
  color: #888;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.68rem;
}

.week-day .num {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
}

.week-day.selected {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.week-day.selected .dow {
  color: #d8e4fd;
}

.week-day.has-entries:not(.selected)::after {
  content: '';
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #2563eb;
  margin: 3px auto 0;
}

.edit-btn {
  width: auto;
  padding: 4px 10px;
  background: #eaf1fd;
  color: #2563eb;
  font-size: 0.8rem;
  font-weight: 600;
}

.msg {
  margin: 10px 0 0;
  font-size: 0.9rem;
  min-height: 1.2em;
}

.msg.error { color: #c0392b; }
.msg.success { color: #1e8449; }

.entries {
  margin-top: 24px;
  background: #fff;
  border: 1px solid #e2e4e9;
  border-radius: 10px;
  padding: 20px;
}

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

.entries-header a {
  font-size: 0.85rem;
  color: #2563eb;
  text-decoration: none;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

th, td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}

th {
  color: #666;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.del-btn {
  width: auto;
  padding: 4px 10px;
  background: #fdecea;
  color: #c0392b;
  font-size: 0.8rem;
  font-weight: 600;
}

#total-hours {
  text-align: right;
  font-weight: 700;
  margin-top: 10px;
}
