:root {
  --bg-top: #f6efe2;
  --bg-bottom: #dcefe3;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-strong: #ffffff;
  --ink: #18322b;
  --muted: #5f776e;
  --line: rgba(24, 50, 43, 0.12);
  --accent: #2f7a67;
  --accent-soft: rgba(47, 122, 103, 0.12);
  --warn: #b46a38;
  --neutral: #7b8791;
  --shadow: 0 24px 70px rgba(50, 80, 68, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.75), transparent 28%),
    linear-gradient(160deg, var(--bg-top), var(--bg-bottom));
}

.page-shell {
  width: min(1380px, calc(100% - 32px));
  margin: 32px auto 48px;
  display: grid;
  gap: 18px;
}

.hero-card,
.upload-card,
.control-card,
.table-card,
.team-section {
  background: var(--surface);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 28px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

h1,
h3 {
  margin: 0;
}

h1 {
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.05;
  max-width: 760px;
}

.hero-copy,
.hint,
.message,
.error-list p,
.user-cell span,
.section-head p,
.muted-inline {
  color: var(--muted);
}

.hero-copy {
  max-width: 760px;
  margin: 12px 0 0;
  line-height: 1.6;
}

.hero-stats {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-actions {
  display: flex;
  align-items: center;
}

.stat {
  min-width: 132px;
  padding: 16px 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(237, 248, 242, 0.92));
  border: 1px solid var(--line);
}

.stat-label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 6px;
}

.stat strong {
  font-size: 34px;
}

.upload-card,
.control-card,
.team-section,
.table-card {
  padding: 22px;
}

.upload-form,
.filter-grid,
.team-create {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.menu-tabs,
.period-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.menu-tab,
.ghost-button {
  background: rgba(24, 50, 43, 0.08);
  color: var(--ink);
}

.menu-tab.active {
  background: linear-gradient(135deg, #256d5c, #3f8d77);
  color: white;
}

.period-control {
  display: grid;
  gap: 8px;
  min-width: 320px;
  flex: 1;
}

.period-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.period-picker {
  min-width: 280px;
  flex: 1;
}

.period-picker select {
  width: 100%;
}

.upload-box,
.control-field {
  display: grid;
  gap: 8px;
}

.upload-box {
  min-width: 280px;
  flex: 1;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px dashed rgba(47, 122, 103, 0.4);
  background: var(--accent-soft);
}

.upload-box input,
.control-field input,
.control-field select,
.team-select {
  width: 100%;
}

.control-field {
  min-width: 220px;
}

.control-field span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

input,
select,
button {
  border-radius: 14px;
  font: inherit;
}

.login-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 14px 22px;
  background: rgba(24, 50, 43, 0.08);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

input,
select {
  border: 1px solid var(--line);
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
}

button {
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  background: linear-gradient(135deg, #256d5c, #3f8d77);
  color: white;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

button:disabled {
  opacity: 0.7;
  cursor: progress;
}

.message {
  margin: 12px 0 0;
}

.error-list {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(180, 106, 56, 0.08);
  border: 1px solid rgba(180, 106, 56, 0.18);
}

.error-list p,
.section-head p {
  margin: 4px 0 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-badges,
.project-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mini-pill,
.tag,
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
}

.mini-pill {
  padding: 7px 12px;
  background: rgba(41, 142, 114, 0.12);
  color: #1b7059;
}

.mini-pill.neutral {
  background: rgba(123, 135, 145, 0.12);
  color: #58646d;
}

.tag {
  padding: 6px 10px;
  background: rgba(24, 50, 43, 0.08);
  color: var(--ink);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1220px;
}

th,
td {
  text-align: left;
  padding: 14px 12px;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}

th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.55);
}

.user-cell {
  display: grid;
  gap: 4px;
}

.pill {
  min-width: 74px;
  padding: 8px 12px;
}

.pill.ok {
  background: rgba(41, 142, 114, 0.14);
  color: #1b7059;
}

.pill.warn {
  background: rgba(180, 106, 56, 0.14);
  color: var(--warn);
}

.day-cell {
  min-width: 92px;
  position: relative;
  overflow: hidden;
}

.day-off {
  border-radius: 16px;
}

.day-missing {
  background: rgba(189, 88, 88, 0.12);
  border-radius: 16px;
}

.day-off-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: rgba(123, 135, 145, 0.18);
  pointer-events: none;
}

.day-value {
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.day-note {
  margin-top: 4px;
  font-size: 12px;
  color: var(--neutral);
  position: relative;
  z-index: 1;
}

.team-select {
  min-width: 140px;
}

.danger-button {
  background: rgba(162, 48, 48, 0.12);
  color: #8f1f1f;
  border: 1px solid rgba(162, 48, 48, 0.24);
}

.danger-button:hover {
  background: rgba(162, 48, 48, 0.18);
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 34px 12px;
}

@media (max-width: 900px) {
  .page-shell {
    width: min(100% - 20px, 1380px);
    margin-top: 20px;
  }

  .hero-card {
    padding: 22px;
    flex-direction: column;
    align-items: stretch;
  }

  .hero-stats {
    width: 100%;
  }

  .stat {
    flex: 1;
  }

  .upload-card,
  .control-card,
  .team-section,
  .table-card {
    padding: 18px;
  }

  .team-create {
    width: 100%;
  }
}
