:root {
  color-scheme: light;
  --ink: #17231e;
  --muted: #6d7772;
  --line: #dfe6e2;
  --surface: #ffffff;
  --canvas: #eef3f0;
  --green: #177a4a;
  --green-dark: #105d38;
  --green-soft: #e3f3ea;
  --amber: #d99518;
  --blue: #3572ba;
  --red: #a44040;
  --shadow: 0 14px 35px rgba(28, 58, 43, 0.11);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 0%, rgba(65, 139, 99, 0.16), transparent 32rem),
    var(--canvas);
}

button { font: inherit; }

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(238, 243, 240, .98);
}

.auth-screen[hidden] { display: none; }

.auth-card {
  width: min(100%, 410px);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 25px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-logo { margin-bottom: 22px; }
.auth-card h1 { margin-bottom: 8px; font-size: 25px; }
.auth-description { margin-bottom: 24px; color: var(--muted); line-height: 1.45; }
.auth-card label { display: grid; gap: 7px; margin-top: 15px; color: #3e4944; font-size: 14px; font-weight: 700; }

.auth-card input {
  width: 100%;
  height: 48px;
  padding: 0 13px;
  border: 1px solid #cbd7d0;
  border-radius: 12px;
  color: var(--ink);
  background: white;
  outline: none;
}

.auth-card input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(23, 122, 74, .12); }
.auth-submit { width: 100%; margin-top: 22px; }
.auth-error { min-height: 20px; margin: 12px 0 0; color: var(--red); font-size: 13px; }

.app-shell {
  width: min(100%, 560px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px 18px calc(30px + env(safe-area-inset-bottom));
}

.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  color: white;
  font-weight: 800;
  letter-spacing: .02em;
  background: linear-gradient(145deg, #1c8d57, #115d39);
  box-shadow: 0 8px 18px rgba(23, 122, 74, .24);
}

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

h1, h2, h3, p { margin-top: 0; }
.topbar h1 { margin-bottom: 0; font-size: 22px; }

.icon-button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.85);
  cursor: pointer;
}

.welcome-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px;
  border-radius: 24px;
  color: white;
  background: linear-gradient(145deg, #17372a, #10251d);
  box-shadow: var(--shadow);
}

.welcome-card h2 { margin-bottom: 7px; font-size: 22px; }
.welcome-card p:last-child { margin: 0; color: #c7d8cf; line-height: 1.45; font-size: 14px; }
.welcome-card .eyebrow { color: #99b9a8; }

.online-badge {
  align-self: flex-start;
  white-space: nowrap;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(255,255,255,.1);
}

.online-badge i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border-radius: 50%;
  background: #5ee897;
}

.filters {
  display: flex;
  gap: 8px;
  margin: 22px 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter {
  flex: 0 0 auto;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,.7);
  cursor: pointer;
}

.filter.is-active { color: white; border-color: var(--green); background: var(--green); }

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

.section-heading h2 { margin: 0; font-size: 19px; }
.heading-actions { display: flex; gap: 10px; }
.text-button { border: 0; color: var(--green); background: none; font-weight: 700; cursor: pointer; }
.logout-button { color: var(--muted); }
.feed { display: grid; gap: 12px; }

.notification-card {
  padding: 17px;
  border: 1px solid rgba(211, 222, 216, .9);
  border-radius: 20px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 7px 24px rgba(29, 57, 44, .07);
}

.notification-card.approval { border-left: 4px solid var(--amber); }
.notification-card.report { border-left: 4px solid var(--blue); }
.notification-card.attendance { border-left: 4px solid var(--green); }
.card-line { display: flex; gap: 13px; }

.card-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--green-soft);
}

.card-copy { min-width: 0; flex: 1; }
.card-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.card-title-row h3 { margin-bottom: 6px; font-size: 16px; }
.card-title-row time { flex: 0 0 auto; color: var(--muted); font-size: 12px; }
.shop { margin-bottom: 5px; font-weight: 700; }
.document { margin-bottom: 5px; color: #3e4944; }
.details { margin-bottom: 0; color: var(--muted); line-height: 1.4; font-size: 14px; }

.card-actions { display: grid; grid-template-columns: 1fr 1.35fr; gap: 9px; margin-top: 16px; }
.button { min-height: 44px; border-radius: 13px; border: 0; font-weight: 750; cursor: pointer; }
.button:disabled { cursor: default; opacity: .55; }
.button-primary { color: white; background: var(--green); }
.button-primary:hover { background: var(--green-dark); }
.button-secondary { color: var(--red); border: 1px solid #edd4d4; background: #fff7f7; }

.decision {
  margin: 14px 0 0;
  padding: 11px 12px;
  border-radius: 12px;
  color: var(--green-dark);
  background: var(--green-soft);
  font-weight: 700;
}

.decision.rejected { color: var(--red); background: #fff0f0; }
.empty { padding: 28px; text-align: center; color: var(--muted); }
.prototype-note { margin: 24px 0 0; color: var(--muted); text-align: center; font-size: 12px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 5;
  max-width: calc(100% - 36px);
  padding: 12px 16px;
  border-radius: 13px;
  color: white;
  background: #18231e;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: .2s ease;
}

.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 620px) {
  .app-shell { padding-top: 38px; }
}
