:root {
  font-family:
    -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR",
    sans-serif;
  color: #18352e;
  background: #f4f6f3;
  font-synthesis: none;
  --green: #235c49;
  --muted: #65776d;
  --line: #dde5df;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  border: 0;
  border-radius: 9px;
  padding: 12px 18px;
  background: var(--green);
  color: #fff;
  font-weight: 650;
}
button:hover {
  filter: brightness(1.08);
}
button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}
button.secondary {
  background: #edf2ed;
  color: #27533f;
  border: 1px solid #d7e0d9;
}
button.small {
  padding: 8px 12px;
  font-size: 13px;
}
button.link {
  background: none;
  color: var(--green);
  padding: 8px 0;
  text-align: left;
}
input,
select,
textarea {
  width: 100%;
  background: white;
  border: 1px solid #cdd8cf;
  border-radius: 8px;
  padding: 11px;
  color: #173b2c;
  margin-top: 7px;
}
textarea {
  min-height: 80px;
  resize: vertical;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #4d6457;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 30px;
  letter-spacing: -1px;
  margin-bottom: 12px;
}
h2 {
  font-size: 19px;
}
h3 {
  font-size: 16px;
}
p {
  line-height: 1.65;
}
small,
.muted {
  color: var(--muted);
}
small {
  font-size: 12px;
}
.layout {
  display: grid;
  grid-template-columns: 228px 1fr;
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 32px 22px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.brand {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -1px;
}
.brand span {
  display: inline-grid;
  place-items: center;
  background: var(--green);
  color: #fff;
  border-radius: 9px;
  width: 33px;
  height: 33px;
  margin-right: 9px;
  font-size: 20px;
}
.brand-sub {
  margin: 8px 0 22px 44px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 1px;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav button {
  background: transparent;
  color: #5e7466;
  text-align: left;
  font-weight: 500;
  padding: 9px 15px;
}
.nav button.active {
  background: #e8f0e9;
  color: #164e38;
  font-weight: 700;
}
.nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-group + .nav-group {
  margin-top: 14px;
}
.nav-group-title {
  font-size: 11px;
  font-weight: 700;
  color: #93a39a;
  letter-spacing: 0.5px;
  padding: 0 15px 4px;
}
.sidebar-foot {
  margin-top: auto;
  padding-top: 30px;
}
.sidebar-foot p {
  font-size: 12px;
  margin: 12px 0;
}
.main {
  max-width: 1440px;
  width: 100%;
  margin: auto;
  padding: 0 42px 50px;
  align-self: start;
}
.topbar {
  height: 90px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
  color: var(--muted);
  font-size: 13px;
}
.topbar strong {
  color: #294b3b;
}
.pill {
  display: inline-block;
  border-radius: 30px;
  font-size: 11px;
  font-weight: 650;
  padding: 6px 10px;
  background: #e8f0e9;
  color: #366745;
  white-space: nowrap;
}
.pill.amber {
  background: #fff1d6;
  color: #966223;
}
.pill.gray {
  background: #edf0ed;
  color: #65776d;
}
.heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 26px;
  gap: 16px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  color: #6e8875;
  font-weight: 700;
  margin-bottom: 12px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 24px 0;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 23px;
}
.stat span {
  font-size: 12px;
  color: var(--muted);
}
.stat strong {
  display: block;
  font-size: 31px;
  margin-top: 16px;
  font-weight: 650;
}
.stat small {
  margin-left: 7px;
  font-size: 13px;
}
.grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 22px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 25px;
  margin-bottom: 22px;
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 19px;
}
.card-header h2 {
  margin: 0;
}
.hero {
  background: #234f40;
  color: #fff;
  border-radius: 17px;
  padding: 32px;
  position: relative;
  overflow: hidden;
}
.hero:after {
  content: "↻";
  position: absolute;
  right: 24px;
  bottom: -36px;
  font-size: 210px;
  line-height: 1;
  color: #436a57;
  pointer-events: none;
}
.hero p {
  color: #cfddcf;
  max-width: 75%;
  font-size: 14px;
}
.hero h2 {
  font-size: 25px;
  line-height: 1.4;
  max-width: 75%;
}
.hero .eyebrow {
  color: #b6c9b8;
}
.hero button {
  background: #e3eddb;
  color: #264b38;
  position: relative;
  z-index: 1;
}
.alert {
  background: #fff7e9;
  border: 1px solid #ecddbc;
  color: #7d6031;
  border-radius: 10px;
  padding: 15px 19px;
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 22px;
}
.empty {
  padding: 32px 15px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  background: #f8faf7;
  border-radius: 10px;
}
.empty strong {
  display: block;
  color: #3d5a47;
  margin-bottom: 8px;
}
.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid #edf0eb;
}
.row:last-child {
  border-bottom: 0;
}
.row p {
  margin: 5px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.row strong {
  font-size: 14px;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.wide {
  grid-column: 1/-1;
}
.field-note {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin: 15px 0;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}
th {
  color: var(--muted);
  font-weight: 500;
  background: #f5f8f4;
}
th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td small {
  display: block;
  margin-top: 5px;
}
.login {
  max-width: 950px;
  margin: 9vh auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding: 20px;
}
.login-intro {
  padding: 36px;
  background: #234f40;
  color: #fff;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 500px;
}
.login-intro h1 {
  font-size: 40px;
  line-height: 1.35;
}
.login-intro p {
  color: #cbdbc9;
}
.login .card {
  padding: 32px;
  margin: 0;
}
.login form {
  display: grid;
  gap: 18px;
}
.divider {
  border-top: 1px solid var(--line);
  margin: 25px 0;
}
.demo-roles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.loading {
  padding: 40px;
  color: var(--muted);
}
#notice {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #193e30;
  color: white;
  border-radius: 10px;
  padding: 15px 22px;
  box-shadow: 0 8px 40px #193e3033;
  z-index: 10;
  max-width: 90vw;
  display: none;
}
#notice.visible {
  display: block;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 17px;
  max-width: 650px;
  width: calc(100% - 32px);
  padding: 28px;
  max-height: 90vh;
  overflow: auto;
}
dialog::backdrop {
  background: #143b3066;
}
dialog form {
  display: grid;
  gap: 18px;
}
dialog .actions {
  margin-top: 10px;
}
.photos {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.photos img {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
}
.check input {
  width: auto;
  margin: 0;
}
.steps {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #53705d;
  margin: 20px 0;
}
.steps span {
  background: #edf3eb;
  padding: 9px 12px;
  border-radius: 6px;
}
.timeline .row {
  align-items: flex-start;
}
.catalog-editor {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 15px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 12px 0;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
}
.quote {
  padding: 20px;
  background: #f0f5ed;
  border-radius: 12px;
}
.quote strong {
  font-size: 23px;
}
.quote p {
  margin: 8px 0;
  font-size: 13px;
}
@media (max-width: 1000px) {
  .main {
    padding: 0 22px 30px;
  }
  .layout {
    grid-template-columns: 190px 1fr;
  }
  .sidebar {
    padding: 25px 14px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .brand {
    font-size: 20px;
  }
}
@media (max-width: 650px) {
  .layout {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    padding: 18px;
  }
  .brand-sub,
  .sidebar-foot {
    display: none;
  }
  .nav {
    flex-direction: row;
    overflow: auto;
    margin-top: 18px;
  }
  .nav button {
    white-space: nowrap;
    font-size: 12px;
    padding: 10px;
  }
  .nav-group {
    flex-direction: row;
  }
  .nav-group + .nav-group {
    margin-top: 0;
  }
  .nav-group-title {
    display: none;
  }
  .main {
    padding: 0 16px 35px;
  }
  .topbar {
    height: 62px;
    margin-bottom: 22px;
  }
  .heading {
    display: block;
  }
  h1 {
    font-size: 26px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 18px;
  }
  .card {
    padding: 19px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .login {
    grid-template-columns: 1fr;
    margin: 0;
    padding: 16px;
    gap: 18px;
  }
  .login-intro {
    min-height: 230px;
    padding: 26px;
  }
  .login-intro h1 {
    font-size: 29px;
  }
  .login-intro .brand {
    margin-bottom: 24px;
  }
  .login-intro p {
    margin-bottom: 0;
  }
  .login .card {
    padding: 23px;
  }
  .row {
    flex-wrap: wrap;
  }
  .hero {
    padding: 25px;
  }
  .hero h2 {
    font-size: 22px;
  }
  .catalog-editor {
    grid-template-columns: 1fr;
  }
  .topbar .pill {
    font-size: 10px;
  }
}

.hero h2,
.hero p,
.hero .eyebrow {
  position: relative;
  z-index: 1;
}
.hero:after {
  opacity: 0.4;
}

.login-title {
  margin-top: 24px;
}
.sidebar {
  overflow-y: auto;
}
.nav,
.sidebar-foot {
  flex-shrink: 0;
}
.visit-line {
  padding: 15px;
  background: #f4f7f1;
  border-radius: 10px;
}
.visit-line strong {
  display: block;
  margin-bottom: 12px;
}
@media (max-width: 650px) {
  .topbar {
    height: auto;
    min-height: 62px;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 0;
  }
  .topbar .actions {
    gap: 5px;
  }
  button.small,
  .nav button {
    min-height: 44px;
  }
  .card,
  .row > div {
    min-width: 0;
  }
  select,
  input,
  textarea {
    max-width: 100%;
  }
  .row p,
  .field-note {
    overflow-wrap: anywhere;
  }
  .form-error {
    margin: 0;
  }
  .actions > button {
    white-space: normal;
  }
}

/* Owner experience: a phone-width app with persistent bottom navigation. */
.owner-mode {
  background: #e8eee9;
}
.owner-app {
  max-width: 480px;
  min-height: 100dvh;
  margin: 0 auto;
  background: #f6f8f5;
  box-shadow: 0 0 60px #18352e0a;
}
.owner-header.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 0;
  padding: calc(12px + env(safe-area-inset-top)) 20px 12px;
  height: auto;
  min-height: 68px;
  background: #ffffffed;
  backdrop-filter: blur(16px);
  border: 0;
  flex-wrap: nowrap;
}
.owner-header .brand {
  display: flex;
  align-items: center;
  white-space: nowrap;
  font-size: 20px;
}
.owner-header .brand small {
  font-size: 11px;
  margin-left: 9px;
  font-weight: 500;
  letter-spacing: 0;
}
.owner-header .brand span {
  margin-right: 8px;
  width: 30px;
  height: 30px;
}
.owner-header .actions {
  gap: 2px;
}
.owner-icon {
  min-width: 44px;
  min-height: 44px;
  padding: 8px;
  background: transparent;
  color: var(--green);
  font-size: 23px;
}
.owner-dev {
  padding: 8px 20px;
  font-size: 11px;
  color: #746039;
  background: #f3eedf;
  text-align: center;
}
.owner-main {
  padding: 26px 20px calc(110px + env(safe-area-inset-bottom));
}
.owner-main .heading {
  display: block;
  margin-bottom: 24px;
}
.owner-main .heading > .pill {
  display: inline-block;
  margin-top: 12px;
  font-size: 11px;
}
.owner-main h1 {
  font-size: 27px;
  line-height: 1.35;
  letter-spacing: -1px;
  text-wrap: balance;
}
.owner-main .eyebrow {
  font-size: 10px;
  letter-spacing: 1.5px;
}
.owner-main .heading p {
  font-size: 13px;
  margin-bottom: 0;
}
.owner-main .stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.owner-main .stat {
  padding: 18px;
  border-radius: 16px;
}
.owner-main .stat strong {
  font-size: 28px;
}
.owner-main .grid,
.owner-main .form-grid {
  grid-template-columns: minmax(0, 1fr);
}
.owner-main .card {
  min-width: 0;
  padding: 20px;
  border-radius: 18px;
}
.owner-main .row {
  flex-wrap: wrap;
  gap: 14px;
}
.owner-main .row > div {
  min-width: 0;
}
.owner-main .row p,
.owner-main .field-note {
  overflow-wrap: anywhere;
}
.owner-main .hero {
  padding: 24px;
  border-radius: 20px;
}
.owner-main .hero h2 {
  font-size: 23px;
}
.owner-main .actions {
  flex-wrap: wrap;
}
.owner-main button {
  min-height: 44px;
}
.owner-bottom-nav {
  position: fixed;
  z-index: 6;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  padding: 8px 8px calc(10px + env(safe-area-inset-bottom));
  background: #fffffff5;
  backdrop-filter: blur(18px);
  border-top: 1px solid #dce5df;
  box-shadow: 0 -5px 25px #18352e06;
}
.owner-bottom-nav button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 0;
  min-height: 56px;
  min-width: 0;
  border-radius: 12px;
  color: #78877d;
  background: transparent;
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
}
.owner-bottom-nav svg {
  width: 22px;
  height: 22px;
}
.owner-bottom-nav button.active {
  color: #20583f;
  background: #eaf2eb;
  font-weight: 750;
}
.owner-bottom-nav button:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: -2px;
}
.owner-mode #notice {
  bottom: calc(96px + env(safe-area-inset-bottom));
}
.owner-mode dialog {
  max-width: 448px;
  border-radius: 22px;
  padding: 22px;
  max-height: calc(100dvh - 32px);
}
.owner-mode dialog input,
.owner-mode dialog select,
.owner-mode dialog textarea {
  font-size: 16px;
}
.owner-mode dialog .form-grid {
  grid-template-columns: minmax(0, 1fr);
}
@media (max-width: 359px) {
  .owner-header.topbar {
    padding-left: 12px;
    padding-right: 12px;
  }
  .owner-main {
    padding-left: 16px;
    padding-right: 16px;
  }
  .owner-main h1 {
    font-size: 25px;
  }
  .owner-main .card {
    padding: 17px;
  }
}

[hidden] {
  display: none !important;
}
.list-controls {
  flex-wrap: wrap;
  margin: 12px 0;
}
.list-controls input {
  max-width: 100%;
}
