:root {
  --bg: #f4f5ef;
  --surface: #ffffff;
  --ink: #162227;
  --muted: #55636a;
  --accent: #da5a2a;
  --accent-2: #2f6f7d;
  --line: #dce4e0;
  --shadow: 0 12px 28px rgba(22, 34, 39, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 20% 10%, #fff5dc 0%, transparent 30%),
    radial-gradient(circle at 95% 30%, #d9eef2 0%, transparent 40%), var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

.bg-shape {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  opacity: 0.22;
  filter: blur(2px);
}

.bg-shape-one {
  width: 380px;
  height: 380px;
  background: #f2a66f;
  top: -130px;
  right: -120px;
}

.bg-shape-two {
  width: 280px;
  height: 280px;
  background: #8dc2cf;
  bottom: -80px;
  left: -90px;
}

.container {
  width: min(1080px, 94%);
  margin: 28px auto 40px;
  display: grid;
  gap: 18px;
}

.card {
  background: color-mix(in srgb, var(--surface) 85%, #f8fff9);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 18px;
  animation: rise 0.6s ease both;
}

.hero {
  background: linear-gradient(135deg, #f6fce7 0%, #fff8f2 55%, #edf7fa 100%);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.eyebrow {
  margin: 0;
  color: var(--accent-2);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

h1,
h2,
h3 {
  font-family: "Space Grotesk", sans-serif;
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  max-width: 70ch;
}

.grid-top {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.stack-form,
.employee-form {
  display: grid;
  gap: 10px;
}

.employee-form {
  grid-template-columns: 1fr 1fr 1fr auto;
}

.user-panel {
  display: grid;
  gap: 4px;
  justify-items: end;
  text-align: right;
}

.user-panel span,
.form-help {
  color: var(--muted);
  margin: 0;
}

.user-panel button {
  margin-top: 6px;
  padding: 7px 10px;
}

#appPanel {
  display: grid;
  gap: 18px;
}

.inline-form,
.entry-form {
  display: grid;
  gap: 10px;
}

.inline-form {
  grid-template-columns: 1fr auto;
}

.entry-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.entry-form .full {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

input,
select,
button {
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 10px 12px;
  font: inherit;
}

input:focus,
select:focus {
  outline: 2px solid color-mix(in srgb, var(--accent-2) 65%, white);
  border-color: var(--accent-2);
}

button {
  background: linear-gradient(135deg, #87c24f, #4caf50);
  color: #fff;
  border: 0;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.chips {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips li {
  display: flex;
  gap: 8px;
  align-items: center;
  background: #f0f5f6;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px 4px 10px;
}

.chips button {
  border-radius: 999px;
  width: 22px;
  height: 22px;
  line-height: 1;
  padding: 0;
  font-size: 12px;
  background: var(--accent-2);
}

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

.section-head p {
  margin: 0;
  color: var(--muted);
}

.week-head label {
  min-width: 240px;
}

.filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
  align-items: end;
}

.filters button {
  width: 100%;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.kpis div {
  background: #f8f3ea;
  border: 1px solid #e8ded0;
  border-radius: 12px;
  padding: 12px;
}

.kpis p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.kpis strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.5rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 8px 6px;
}

th {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.93rem;
}

.remove-entry {
  background: #8b2f23;
  padding: 6px 8px;
}

.empty {
  color: var(--muted);
  font-style: italic;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 920px) {
  .grid-top,
  .auth-grid,
  .summary-grid,
  .kpis,
  .filters,
  .employee-form,
  .entry-form {
    grid-template-columns: 1fr;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero {
    flex-direction: column;
  }

  .user-panel {
    justify-items: start;
    text-align: left;
  }

  .week-head label {
    width: 100%;
    min-width: 0;
  }
}
