:root {
  --ink: #132c45;
  --ink-soft: #35526d;
  --bg-main: #f5f8fb;
  --bg-card: #ffffff;
  --brand-dark: #0f3758;
  --brand-mid: #156fa8;
  --accent-main: #f28b00;
  --accent-strong: #005f9e;
  --line: #cad9e4;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 8% 6%, #e4f2ff, transparent 30%),
    radial-gradient(circle at 95% 85%, #ffeccc, transparent 28%),
    var(--bg-main);
  color: var(--ink);
  font-family: "Sarabun", "Noto Sans Thai", Tahoma, sans-serif;
  font-size: 19px;
  line-height: 1.65;
}

.container {
  width: min(1140px, 94vw);
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: 64vh;
  display: flex;
  align-items: center;
  color: #f8fcff;
  background:
    linear-gradient(135deg, rgba(242, 139, 0, 0.24), rgba(10, 46, 74, 0.95)),
    linear-gradient(110deg, #0c2941, #1b6fa5);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.05) 0 9px,
    rgba(255, 255, 255, 0.015) 9px 18px
  );
}

.hero__content {
  position: relative;
  z-index: 1;
  padding: 3rem 0;
}

.eyebrow {
  font-size: 1rem;
  letter-spacing: 0.08em;
  margin: 0;
  color: #ffd89a;
}

h1 {
  margin: 0.45rem 0 1rem;
  line-height: 1.25;
  font-size: clamp(2rem, 4vw, 3.1rem);
}

.action-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.1rem;
}

.landing-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin: 1.4rem auto 2.6rem;
}

.map-section {
  margin: 0 auto 2.6rem;
}

.map-frame {
  width: 100%;
  height: 380px;
  border: 0;
  border-radius: 12px;
  margin-top: 0.8rem;
}

.card,
.panel {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 8px 18px rgba(16, 56, 88, 0.08);
}

.panel--soft {
  background: #fffefb;
}

.topbar {
  background: linear-gradient(90deg, var(--brand-dark), var(--brand-mid));
  color: #f2f9ff;
}

.topbar__inner {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
}

.brand {
  color: #fff;
  text-decoration: none;
  font-weight: 800;
}

.subtitle {
  margin: 0;
  font-size: 1rem;
  color: #ddf0ff;
}

.admin-top-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.page-title {
  margin: 0;
  font-size: 1.7rem;
}

.assistive-text {
  margin: 0.35rem 0 0.85rem;
  color: var(--ink-soft);
}

.board {
  display: grid;
  gap: 1rem;
  margin: 1rem auto 2rem;
}

.form-grid {
  display: grid;
  gap: 0.85rem;
}

label {
  display: grid;
  gap: 0.28rem;
  font-size: 1rem;
  font-weight: 700;
}

input,
textarea,
select,
button {
  font: inherit;
}

input,
textarea,
select {
  border: 2px solid #a8bece;
  border-radius: 10px;
  padding: 0.58rem 0.72rem;
  background: #fff;
}

input:focus,
textarea:focus,
select:focus,
button:focus {
  outline: 3px solid #ffcc5b;
  outline-offset: 1px;
}

.filter-row {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: 1fr 180px 170px;
  margin-bottom: 0.8rem;
}

.filter-row--public {
  grid-template-columns: 1fr 220px;
}

.btn-primary,
.btn-secondary {
  border: 0;
  border-radius: 10px;
  padding: 0.6rem 1rem;
  cursor: pointer;
  text-decoration: none;
  font-weight: 800;
  line-height: 1.2;
}

.btn-small {
  padding: 0.4rem 0.8rem;
  font-size: 0.92rem;
}

.btn-primary {
  background: var(--accent-main);
  color: #10273c;
}

.btn-secondary {
  background: var(--accent-strong);
  color: #fff;
}

.table-wrap {
  overflow: auto;
}

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

th,
td {
  border-bottom: 1px solid #d4e0e9;
  padding: 0.64rem;
  text-align: left;
  vertical-align: top;
}

th {
  background: #eff6fb;
}

.status-chip {
  display: inline-block;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.status-chip--todo {
  background: #f2f4f8;
  color: #2a3d4f;
}

.status-chip--in_progress {
  background: #fff1d8;
  color: #7c4800;
}

.status-chip--done {
  background: #dbf4df;
  color: #0f5a28;
}

td .inline-actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.muted {
  color: #5e7488;
  font-size: 0.92rem;
}

.login-panel {
  max-width: 620px;
}

.error-text {
  color: #8e1b00;
  background: #ffe8e2;
  border: 1px solid #f3b3a5;
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
}

@media (max-width: 900px) {
  body {
    font-size: 18px;
  }

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

  .filter-row {
    grid-template-columns: 1fr;
  }

  .map-frame {
    height: 300px;
  }
}
