﻿:root {
  --green: #1F5E3B;
  --green2: #7BA33C;
  --dark: #232323;
  --bg: #F3F5F4;
  --card: #FFFFFF;
  --line: #E1E7E3;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--dark);
}

.top {
  background: var(--green);
  color: white;
  padding: 22px 18px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.logo {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  border: 2px solid rgba(255,255,255,.45);
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 20px;
}

h1 {
  margin: 0;
  font-size: 22px;
}

.top p {
  margin: 4px 0 0;
  opacity: .85;
  font-size: 13px;
}

main {
  padding: 14px;
  max-width: 650px;
  margin: 0 auto;
}

.card {
  background: var(--card);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
}

label {
  display: block;
  font-size: 13px;
  font-weight: 900;
  margin: 10px 0 6px;
  color: var(--green);
}

select,
input {
  width: 100%;
  border: 1px solid #D7DDD9;
  background: #FAFAFA;
  border-radius: 13px;
  padding: 13px;
  font-size: 16px;
  outline: none;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mode button {
  border: 1px solid var(--line);
  background: #F3F7F4;
  color: var(--green);
  border-radius: 13px;
  padding: 12px;
  font-weight: 900;
  font-size: 14px;
}

.mode button.active {
  background: var(--green);
  color: white;
  border-color: var(--green);
}

.hint {
  font-size: 12px;
  color: #666;
  margin: 12px 0 0;
  line-height: 1.35;
}

.card-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.card-title button,
.secondary {
  border: 0;
  background: #EDF3EF;
  color: var(--green);
  font-weight: 900;
  border-radius: 12px;
  padding: 10px 13px;
}

.search {
  margin-bottom: 12px;
}

.worker {
  padding: 13px 4px;
  border-bottom: 1px solid #EEF0EE;
}

.worker:last-child {
  border-bottom: 0;
}

.worker-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.worker-info {
  flex: 1;
}

.worker-name {
  font-weight: 900;
  font-size: 15px;
}

.worker-dni {
  color: #777;
  font-size: 12px;
  margin-top: 3px;
}

.tick {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 2px solid #B9C8BE;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: white;
  background: white;
  flex: 0 0 auto;
}

.worker.active .tick {
  background: var(--green);
  border-color: var(--green);
}

.worker.active .tick::after {
  content: "✓";
}

.worker-hours {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: #F4F8F5;
  border-radius: 14px;
  padding: 10px;
  margin-top: 10px;
}

.worker-hours label {
  margin-top: 0;
  font-size: 11px;
}

.worker-hours input {
  padding: 11px;
  font-size: 15px;
  background: white;
}

.summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 8px 0 14px;
}

.summary div {
  background: #F4F8F5;
  border-radius: 14px;
  padding: 14px;
  text-align: center;
}

.summary b {
  display: block;
  font-size: 22px;
  color: var(--green);
}

.summary span {
  font-size: 12px;
  color: #666;
  font-weight: 700;
}

.primary {
  width: 100%;
  border: 0;
  background: var(--green);
  color: white;
  font-size: 16px;
  font-weight: 900;
  padding: 15px;
  border-radius: 15px;
  margin: 8px 0;
}

.secondary {
  width: 100%;
  margin-top: 4px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 20;
}

.hidden {
  display: none;
}

.modal-box {
  width: 100%;
  max-width: 450px;
  background: white;
  border-radius: 18px;
  padding: 18px;
}

#toast {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 20px;
  background: var(--dark);
  color: white;
  padding: 14px;
  border-radius: 14px;
  text-align: center;
  font-weight: 800;
  transform: translateY(120px);
  transition: .25s;
  z-index: 30;
}

#toast.show {
  transform: translateY(0);
}
