:root {
  --bg: #f4f6fa;
  --card: #ffffff;
  --ink: #1c2733;
  --muted: #6b7a8f;
  --line: #e3e8ef;
  --brand: #0f766e;
  --brand-dark: #0b5c56;
  --accent: #d9a520;
  --danger: #b4342f;
  --ok: #1a7f4b;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 8px 24px rgba(16, 24, 40, .06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

button {
  font: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: .55rem 1rem;
  background: var(--brand);
  color: #fff;
  transition: background .15s, opacity .15s;
}
button:hover { background: var(--brand-dark); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.ghost { background: transparent; color: var(--brand); border-color: var(--brand); }
button.ghost:hover { background: rgba(15, 118, 110, .08); }
button.danger { background: var(--danger); }
button.danger:hover { background: #8f2a26; }
button.warn { background: var(--accent); color: #3c2f05; }
button.warn:hover { background: #c1920f; }
button.small { padding: .3rem .7rem; font-size: .85rem; }

input, select, textarea {
  font: inherit;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .6rem .75rem;
  background: #fff;
  color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(15, 118, 110, .35);
  border-color: var(--brand);
}
label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .3rem; }

.muted { color: var(--muted); }
.small, small { font-size: .8rem; }
.center { text-align: center; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}

table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; }
tr:last-child td { border-bottom: none; }

.badge {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  padding: .15rem .5rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .03em;
  background: #eef2f7;
  color: var(--muted);
}
.badge.ok { background: #e2f3e8; color: var(--ok); }
.badge.warn { background: #fdf3d7; color: #8a6d00; }
.badge.danger { background: #fbe7e6; color: var(--danger); }
.badge.brand { background: #e0f2f0; color: var(--brand-dark); }

.alert { border-radius: 8px; padding: .7rem .9rem; margin: .75rem 0; font-size: .85rem; }
.alert.err { background: #fbe7e6; color: var(--danger); }
.alert.ok { background: #e2f3e8; color: var(--ok); }

.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .75rem; }
.stat-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem; display: flex; flex-direction: column; gap: .15rem; }
.stat-card span { font-size: .75rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.stat-card strong { font-size: 1.35rem; color: var(--heading, #0f172a); }

label.chk { display: flex; align-items: center; gap: .5rem; font-weight: 500; cursor: pointer; }
label.chk input { margin: 0; }

.stack > * + * { margin-top: .9rem; }

.infograph { max-width: 980px; margin: 1.25rem auto 0; }
.infograph svg { width: 100%; height: auto; display: block; }
@media (max-width: 720px) { .infograph { overflow-x: auto; } }
.alert.info { background: #e7f0fb; color: #1d4ed8; }

/* Topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: .8rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { font-weight: 800; font-size: 1.1rem; color: var(--brand); display: flex; gap: .5rem; align-items: center; }
.userchip { display: flex; gap: .6rem; align-items: center; font-size: .85rem; }

/* Layout */
.layout { max-width: 1100px; margin: 0 auto; padding: 1.5rem; }
.page-title { font-size: 1.35rem; font-weight: 700; margin: 0 0 .25rem; }
.stack { display: grid; gap: 1rem; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .9rem; }
.field { margin-bottom: .9rem; }

/* Auth */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.auth-card { width: 100%; max-width: 420px; }
.auth-tabs { display: flex; gap: .5rem; margin-bottom: 1.25rem; }
.auth-tabs button { flex: 1; background: transparent; color: var(--muted); border: 1px solid var(--line); }
.auth-tabs button.active { background: var(--brand); color: #fff; border-color: var(--brand); }

.hero-hint { text-align: center; margin-bottom: 1.25rem; }
.hero-hint h1 { margin: 0; font-size: 1.5rem; }
.hero-hint p { margin: .25rem 0 0; color: var(--muted); font-size: .9rem; }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(10, 18, 28, .45);
  display: grid; place-items: center;
  padding: 1rem; z-index: 50;
}
.modal { background: #fff; border-radius: var(--radius); padding: 1.4rem; width: 100%; max-width: 520px; max-height: 88vh; overflow: auto; }
.modal h3 { margin: 0 0 1rem; }

.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; flex-wrap: wrap; }
.tabs button { background: none; color: var(--muted); border: none; border-bottom: 2px solid transparent; border-radius: 0; padding: .5rem .9rem; }
.tabs button.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 700; background: none; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; }

.status-line { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }

@media (max-width: 640px) {
  .layout { padding: 1rem; }
  th, td { padding: .4rem; }
}

/* ---------------- Landing ---------------- */
.land { min-height: 100vh; background: linear-gradient(180deg,#f3f9f8 0%,#ffffff 40%); }
.land-nav { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.land-nav-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 1.5rem; flex-wrap: wrap; }
.land-links { display: flex; gap: .15rem; flex-wrap: wrap; }
button.lnk { background: none; color: var(--ink); border: none; border-radius: 8px; padding: .45rem .7rem; font-weight: 600; }
button.lnk:hover { background: rgba(15,118,110,.08); color: var(--brand); }
.land-cta { display: flex; gap: .5rem; align-items: center; }

.land-hero { border-bottom: 1px solid var(--line); }
.land-hero-inner { max-width: 1100px; margin: 0 auto; padding: 4rem 1.5rem 2rem; display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
.hero-badge { display: inline-block; background: #e0f2f0; color: var(--brand-dark); font-weight: 700; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; padding: .3rem .7rem; border-radius: 999px; margin-bottom: 1rem; }
.hero-title { font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.15; margin: 0 0 .75rem; }
.hero-em { color: var(--brand); }
.hero-sub { color: var(--muted); font-size: 1.05rem; max-width: 32rem; margin: 0 0 1.5rem; }
.hero-cta { background: var(--brand); color: #fff; font-weight: 700; padding: .7rem 1.4rem; font-size: .95rem; }
.hero-cta:hover { background: var(--brand-dark); }
.hero-mini { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.25rem; font-size: .82rem; color: var(--muted); }
.hero-card { box-shadow: var(--shadow); }
.hc-top { font-size: 1.15rem; color: var(--brand-dark); margin-bottom: .75rem; }
.hc-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: .75rem; margin-top: 1rem; border-top: 1px solid var(--line); padding-top: 1rem; text-align: center; }
.hc-stats strong { display: block; font-size: 1.3rem; color: var(--brand); }
.hc-stats span { font-size: .75rem; color: var(--muted); }

.land-sec { padding: 3.5rem 0; }
.land-sec.alt { background: #f6f8fb; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.land-wrap { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.land-wrap.narrow { max-width: 800px; }
.sec-title { text-align: center; font-size: 1.7rem; margin: 0 0 .25rem; }
.sec-sub { text-align: center; margin: 0 0 2rem; }

.land-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 1.25rem; }
.pcard { display: flex; flex-direction: column; gap: .4rem; }
.pcard h3 { margin: 0; }
.pcard ul { margin: .4rem 0 1rem; padding-left: 1.1rem; color: var(--muted); font-size: .88rem; }
.pcard button { align-self: flex-start; }
.picon { font-size: 1.7rem; }

.land-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 1.25rem; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; }
.feature span { font-size: 1.4rem; }
.feature h3 { margin: .4rem 0 .2rem; font-size: 1rem; }

.step-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 1.25rem; }
.step { text-align: center; padding: 1rem; }
.step-no { display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; margin-bottom: .6rem; }
.step h3 { margin: .3rem 0 .2rem; font-size: 1rem; }

.tcard { display: flex; flex-direction: column; gap: .6rem; }
.tcard p { margin: 0; font-size: .92rem; }

.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; margin-bottom: .75rem; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { color: var(--muted); font-size: .9rem; margin: .6rem 0 0; }

.land-cta-final { padding: 4rem 0; text-align: center; background: linear-gradient(180deg,#0b5c56,#0f766e); color: #fff; }
.land-cta-final h2 { margin: 0 0 .5rem; }
.land-cta-final .muted { color: #cfe8e5; }
.land-cta-final .hero-cta { background: #fff; color: var(--brand-dark); }
.land-cta-final .hero-cta:hover { background: #eef6f5; }
.land-cta-final .ghost { border-color: #fff; color: #fff; }
.land-cta-final .ghost:hover { background: rgba(255,255,255,.12); }

.land-foot { padding: 2rem 0; text-align: center; }
.land-foot p { margin: .4rem 0 0; }

@media (max-width: 860px) {
  .land-hero-inner { grid-template-columns: 1fr; padding-top: 2.5rem; }
  .land-hero-inner .hero-card { max-width: 480px; }
  .land-nav-inner { justify-content: center; }
}
/* tabel: sort + filter */
.tbl-tools { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin: .7rem 0; }
.tbl-tools input.tbl-search { flex: 1 1 180px; max-width: 320px; }
.tbl-tools select.tbl-filter { min-width: 130px; }
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable:hover { color: var(--brand, #0a7); }
.sort-arrow { color: var(--brand, #0a7); font-size: .7em; }
.tbl-empty { padding: .6rem 0; }
