:root {
  font-family: "Segoe UI", Inter, ui-sans-serif, system-ui, sans-serif;
  color: #16302c;
  --bg: #f3f7f6;
  --card: #fff;
  --ink: #16302c;
  --muted: #5b726e;
  --line: #d7e4e0;
  --accent: #0f6e62;
  --accent-dark: #0b4f46;
  --shadow: 0 14px 40px rgba(15, 61, 56, 0.08);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: #f3f7f6;
  min-height: 100vh;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { max-width: 1080px; margin: auto; padding: 20px; }
header { display: flex; justify-content: space-between; align-items: center; padding: 4px 0 20px; }
h1, h2 { margin: 0.1rem 0 0.5rem; letter-spacing: -0.03em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
h2 { font-size: 1.35rem; }
.eyebrow { margin: 0; color: var(--accent); font-size: 0.7rem; letter-spacing: 0.14em; font-weight: 800; }
.muted, .who { color: var(--muted); }
.who a { color: var(--accent); font-weight: 800; }
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.auth { max-width: 440px; margin: 8vh auto; }
.auth-error { color: #8a1f1f; background: #fdecec; border-radius: 10px; padding: 10px 12px; font-weight: 700; }
.auth details { margin-top: 16px; }
.tabs { display: flex; gap: 6px; overflow: auto; padding: 4px; margin-bottom: 18px; }
.tabs button { border: 0; background: transparent; padding: 10px 14px; border-radius: 999px; color: var(--muted); font-weight: 700; }
.tabs button.active { background: var(--accent-dark); color: #fff; }
.tab { display: none; }
.tab.active { display: block; }
.section-head { display: flex; justify-content: space-between; gap: 14px; align-items: end; margin-bottom: 14px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; min-width: min(420px, 100%); }
.filters input, .filters select { margin: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}
.card h3 { margin: 4px 0; }
.meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.pill { font-size: 0.74rem; border-radius: 999px; padding: 4px 9px; background: #e7f0ee; color: #355751; }
.pill.not_updated { background: #fff3d6; color: #7a5a00; }
.pill.updated { background: #dcefe6; color: #1d5c42; }
label { display: grid; gap: 6px; color: #3f5854; font-size: 0.86rem; font-weight: 700; margin: 10px 0; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 11px;
  padding: 10px 12px;
  color: var(--ink);
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(15, 110, 98, 0.12); }
textarea { min-height: 72px; resize: vertical; }
button { border: 0; border-radius: 11px; background: var(--accent); color: #fff; padding: 11px 16px; font-weight: 800; }
button.secondary { background: #e7eeec; color: #2b4541; }
button.danger { background: #b42318; }
button.mini { padding: 6px 10px; font-size: 0.8rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.drawer { position: fixed; inset: 0; background: rgba(12, 32, 29, 0.45); padding: 16px; z-index: 50; }
.drawer[hidden] { display: none !important; }
.drawer:not([hidden]) { display: grid; place-items: center; }
.drawer-card {
  position: relative;
  background: #fff;
  border-radius: 20px;
  max-width: 820px;
  width: 100%;
  max-height: 92vh;
  overflow: auto;
  padding: 24px;
}
.close { position: absolute; right: 14px; top: 12px; background: #e7eeec; color: #2b4541; border-radius: 50%; width: 44px; height: 44px; padding: 0; font-size: 1.5rem; z-index: 2; line-height: 1; }
.upload { border: 1.5px dashed #b7cdc7; border-radius: 16px; padding: 16px; text-align: center; background: #f7fbfa; }
.upload.hot { border-color: var(--accent); background: #eaf6f3; }
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-top: 12px; }
.file { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: #fff; }
.file a { color: var(--accent-dark); font-weight: 800; text-decoration: none; }
.file img { width: 100%; height: 110px; object-fit: cover; border-radius: 8px; background: #eef4f2; }
.toast {
  position: fixed; right: 16px; bottom: 16px; background: #16302c; color: white; border-radius: 10px; padding: 12px 16px;
  opacity: 0; transform: translateY(8px); transition: 0.2s; pointer-events: none;
}
.toast.show { opacity: 1; transform: none; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.hero { margin-bottom: 8px; }
@media (max-width: 760px) {
  .grid2 { grid-template-columns: 1fr; }
  .section-head, .filters { flex-direction: column; align-items: stretch; }
  .drawer { padding: 0; }
  .drawer-card { border-radius: 20px 20px 0 0; align-self: end; max-height: 94vh; }
}
