body {
  font-family: Arial, sans-serif;
  background: #f4f6f8;
  margin: 0;
  padding: 20px;
}

.card {
  background: white;
  padding: 20px;
  max-width: none;
  margin: auto;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
  overflow-x: auto;
}

h1 {
  margin-top: 0;
}

.top-bar {
  display: flex;
  gap: 20px;
  align-items: end;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

label {
  font-weight: bold;
  display: block;
  margin-bottom: 6px;
}

input,
select,
textarea {
  padding: 6px;
  border: 1px solid #bbb;
  border-radius: 6px;
  font-size: 13px;
  box-sizing: border-box;
}

input[type="radio"],
input[type="checkbox"] {
  width: auto;
  height: auto;
  min-width: 13px;
  min-height: 13px;
  padding: 0;
  margin: 0 4px 0 0;
  border-radius: 0;
  appearance: auto;
  -webkit-appearance: auto;
}

table {
  width: 100%;
  min-width: 1450px;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 12px;
  table-layout: auto;
}

th,
td {
  border: 1px solid #ddd;
  padding: 5px;
  text-align: center;
  vertical-align: top;
}

th {
  background: #1f4e79;
  color: white;
  font-size: 12px;
}

.project-col {
  width: 190px;
}

.remove-col {
  width: 60px;
}

.project-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.project-select {
  width: 175px;
}

.project-description {
  min-height: 30px;
  padding: 4px 6px;
  font-size: 11px;
  color: #555;
  background: #f3f4f6;
  border: 1px solid #d5d5d5;
  border-radius: 4px;
  text-align: left;
  word-break: break-word;
}

.day-cell {
  min-width: 175px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow: visible;
}

.top-entry-row,
.hours-summary-row,
.checkbox-line,
.premium-line {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.top-entry-row label,
.hours-summary-row label {
  font-size: 11px;
  margin: 0;
  font-weight: bold;
}

.hours-input {
  width: 48px;
  padding: 4px;
  font-size: 12px;
}

.small-hours {
  width: 42px;
}

.total-hours-input {
  font-weight: 700;
}

.readonly-row input {
  background: #f1f5f9;
  color: #475569;
}

.activity-row {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.activity-row label {
  font-size: 11px;
  font-weight: bold;
  margin: 0;
  text-align: left;
}

.activity-row select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 4px;
  font-size: 11px;
}

.notes-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.notes-row label {
  text-align: left;
  font-size: 11px;
  font-weight: bold;
  margin: 0 0 2px 0;
}

.notes-input {
  width: 100%;
  box-sizing: border-box;
  min-height: 34px;
  font-size: 11px;
  padding: 4px;
  resize: vertical;
}

.checkbox-line {
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 8px;
}

.checkbox-line label,
.premium-line label {
  font-size: 11px;
  font-weight: normal;
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  white-space: nowrap;
}

.premium-line {
  flex-wrap: wrap;
}

.totals {
  display: flex;
  gap: 16px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.total-box {
  background: #eef3f8;
  padding: 12px;
  border-radius: 8px;
  min-width: 150px;
  font-weight: bold;
}

button {
  margin-top: 16px;
  padding: 10px 18px;
  background: #1f4e79;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
}

button:disabled {
  background: #999;
  cursor: not-allowed;
}

button.secondary {
  background: #555;
}

button.danger {
  background: #9b1c1c;
  padding: 6px 10px;
  margin-top: 0;
}

.message {
  margin-top: 20px;
  padding: 12px;
  border-radius: 8px;
  font-weight: bold;
  text-align: center;
  display: none;
}

#messageText {
  margin-bottom: 12px;
}

.acknowledge-message-button {
  display: inline-block;
  margin-top: 0;
  padding: 8px 18px;
  background: #1f4e79;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}

.acknowledge-message-button:hover {
  filter: brightness(0.9);
}

.acknowledge-message-button:focus {
  outline: 3px solid rgba(31, 78, 121, 0.3);
  outline-offset: 2px;
}
.small-card {
  max-width: 620px;
  margin-top: 40px;
}


.weekend-day,
.holiday-day {
  background: #f3f4f6;
}

th.weekend-day,
th.holiday-day {
  background: #5b6773;
  color: white;
}

.day-flag {
  display: inline-block;
  margin-top: 2px;
  font-size: 10px;
  font-weight: 700;
}

.app-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(0, 0, 0, 0.35);
}

.app-loading-overlay.hidden {
  display: none;
}

.app-loading-card {
  min-width: 280px;
  max-width: 420px;
  padding: 28px 32px;
  background: #ffffff;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.app-loading-spinner {
  width: 36px;
  height: 36px;
  margin: 0 auto 18px;
  border: 4px solid #dddddd;
  border-top-color: #333333;
  border-radius: 50%;
  animation: app-loading-spin 0.8s linear infinite;
}

.app-loading-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.app-loading-message {
  font-size: 14px;
  color: #666666;
}

@keyframes app-loading-spin {
  to {
    transform: rotate(360deg);
  }
}
