* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #f4f5f7;
  color: #20232b;
  font:
    14px system-ui,
    sans-serif;
}
aside {
  position: fixed;
  inset: 0 auto 0 0;
  width: 228px;
  background: #17191e;
  color: #fff;
  padding: 28px 16px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
aside h2 {
  letter-spacing: 3px;
  font-size: 20px;
}
aside small {
  color: #bba064;
  font-size: 10px;
  letter-spacing: 1.5px;
}
nav {
  margin-top: 34px;
}
nav button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  color: #b7bac3;
  padding: 13px;
  border: 0;
  border-radius: 7px;
  margin: 4px 0;
}
nav button.active {
  background: #353127;
  color: #e9c77c;
}
main {
  margin-left: 228px;
  padding: 30px;
  max-width: 1700px;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}
h1 {
  font-size: 27px;
}
small,
.muted {
  color: #777f8c;
}
.tag {
  padding: 5px 9px;
  border-radius: 5px;
  background: #e9edf1;
  color: #495260;
  font-size: 12px;
}
.warn {
  background: #fff5dd;
  color: #8b641c;
  padding: 11px 15px;
  border-radius: 8px;
  margin-bottom: 20px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}
.panel,
.metric {
  background: white;
  border: 1px solid #e2e4e8;
  border-radius: 12px;
  padding: 20px;
}
.metric b {
  display: block;
  font-size: 25px;
  margin-top: 12px;
}
.panel {
  margin-bottom: 18px;
}
.bar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.bar h3 {
  margin-right: auto;
}
button {
  cursor: pointer;
  font: inherit;
  border: 1px solid #d6d9df;
  background: white;
  padding: 9px 13px;
  border-radius: 6px;
}
button.primary {
  background: #23252a;
  color: #f4d38a;
  border-color: #23252a;
}
input,
select,
textarea {
  font: inherit;
  padding: 9px;
  border: 1px solid #d6d9df;
  border-radius: 6px;
  background: white;
  min-width: 0;
}
table {
  border-collapse: collapse;
  width: 100%;
  white-space: nowrap;
}
th,
td {
  text-align: left;
  padding: 13px 10px;
  border-bottom: 1px solid #edf0f2;
}
th {
  font-size: 12px;
  color: #68717f;
  background: #f7f8fa;
}
td button {
  padding: 5px 9px;
  font-size: 12px;
}
.scroll {
  overflow: auto;
}
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
dialog {
  border: 0;
  border-radius: 14px;
  padding: 24px;
  width: min(540px, 94vw);
  box-shadow: 0 12px 70px #0004;
}
dialog::backdrop {
  background: #0007;
}
form label {
  display: grid;
  gap: 5px;
  margin: 12px 0;
  color: #555;
}
form input,
form select,
form textarea {
  width: 100%;
}
.right {
  text-align: right;
}
.rank {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid #eee;
}
.rank strong {
  margin-left: auto;
}
.track {
  height: 7px;
  background: #eceef0;
  border-radius: 9px;
  overflow: hidden;
  margin-top: 5px;
}
.track i {
  display: block;
  background: #b69b61;
  height: 100%;
}
.logo {
  width: 48px;
  height: 48px;
  margin-bottom: 10px;
}
footer {
  position: absolute;
  bottom: 22px;
  font-size: 11px;
  color: #8d919b;
}
@media (max-width: 800px) {
  aside {
    position: static;
    width: auto;
    padding: 15px;
  }
  aside .logo,
  aside footer {
    display: none;
  }
  nav {
    display: flex;
    overflow: auto;
    margin-top: 12px;
  }
  nav button {
    white-space: nowrap;
    width: auto;
  }
  main {
    margin: 0;
    padding: 15px;
  }
  .cards {
    grid-template-columns: 1fr 1fr;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  header {
    gap: 10px;
  }
  .metric b {
    font-size: 20px;
  }
}
.cal {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid #e2e4e8;
  border-radius: 9px;
  overflow: hidden;
}
.calhead {
  text-align: center;
  background: #f7f8fa;
  padding: 10px;
  color: #68717f;
}
.day {
  min-height: 112px;
  border: 0;
  border-right: 1px solid #e2e4e8;
  border-top: 1px solid #e2e4e8;
  border-radius: 0;
  text-align: left;
  padding: 7px;
  background: white;
  overflow: hidden;
}
.day.selected {
  background: #fff7e5;
  box-shadow: inset 0 0 0 2px #b69b61;
}
.day.empty {
  background: #f7f8fa;
}
.daynum {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
}
.event {
  display: block;
  font-size: 11px;
  padding: 4px;
  margin: 3px 0;
  border-radius: 4px;
  background: #e9edf1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fpchips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}
.fpchips button.active {
  background: #23252a;
  color: #f4d38a;
}
.day.today .daynum {
  color: #a3874a;
}
.calwrap {
  overflow: auto;
}
.cal {
  min-width: 600px;
}
@media (max-width: 800px) {
  .day {
    min-height: 90px;
  }
}
.recbox {
  background: #faf8f2;
  border: 1px solid #dfd2b1;
  border-radius: 8px;
  padding: 12px;
}
.recrow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #e5dfd2;
}
.recrow small {
  display: block;
  margin-top: 5px;
}
.recrow button {
  white-space: nowrap;
}
.recrow button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
#recommendations {
  max-height: 300px;
  overflow: auto;
  margin-top: 10px;
}
dialog {
  width: min(680px, 94vw);
}
:root {
  --gold: #b69250;
  --ink: #171b24;
  --line: #e6e8ec;
  --paper: #fff;
}
body {
  background: #f3f5f8;
  color: var(--ink);
  font-family: Pretendard, 'Malgun Gothic', system-ui, sans-serif;
}
aside {
  width: 248px;
  background: linear-gradient(160deg, #20242e 0%, #10131b 85%);
  padding: 26px 18px;
  box-shadow: 8px 0 30px #1720330b;
}
.brand {
  padding: 12px 0 25px;
  text-align: center;
  border-bottom: 1px solid #ffffff15;
}
.brand .logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 10px;
  display: block;
}
.brand h2 {
  font-size: 23px;
  letter-spacing: 3px;
  font-weight: 750;
}
.brand small {
  font-size: 9px;
  letter-spacing: 1.8px;
}
.navlabel {
  font-size: 10px;
  color: #777f90;
  letter-spacing: 2px;
  margin: 25px 13px 10px;
}
nav {
  margin-top: 0;
}
nav button {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 12px;
  font-weight: 600;
  border-radius: 9px;
  transition: background 0.15s;
}
nav button:hover {
  background: #ffffff0d;
}
nav button.active {
  background: linear-gradient(90deg, #d7b77727, #d7b77710);
  color: #e5c484;
  box-shadow: inset 3px 0 #d7b777;
}
.navicon {
  width: 23px;
  font-size: 19px;
  text-align: center;
}
main {
  margin-left: 248px;
  padding: 32px 36px;
}
header {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
header h1 {
  font-size: 30px;
  letter-spacing: -1.2px;
  margin-top: 5px;
}
header small {
  font-size: 11px;
  letter-spacing: 0.5px;
}
.admin {
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin small {
  display: block;
  font-size: 9px;
  margin-top: 4px;
}
.avatar {
  background: #242934;
  color: #e9c982;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  font-weight: 800;
}
.warn {
  font-size: 12px;
  background: #fff9ed;
  border: 1px solid #efdfb9;
  color: #896c35;
}
.panel,
.metric {
  border: 1px solid #e6e9ee;
  border-radius: 16px;
  box-shadow: 0 4px 18px #24304706;
  padding: 22px;
}
.metric {
  position: relative;
  overflow: hidden;
  min-height: 112px;
}
.metric:before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #bda068;
}
.metric:nth-child(2):before {
  background: #667b9b;
}
.metric:nth-child(3):before {
  background: #b69250;
}
.metric:nth-child(4):before {
  background: #77958c;
}
.metric b {
  font-size: clamp(18px, 2vw, 29px);
  letter-spacing: -0.8px;
  font-variant-numeric: tabular-nums;
}
.metric small {
  font-weight: 650;
}
.panel h3,
.bar h3 {
  font-size: 16px;
  letter-spacing: -0.4px;
}
button,
input,
select,
textarea {
  border-radius: 8px;
}
button {
  font-weight: 600;
  transition:
    background 0.15s,
    border-color 0.15s;
}
button:hover:not(:disabled) {
  border-color: #b69250;
  background: #faf7ef;
}
button.primary {
  background: #202631;
  color: #f6d99d;
  border-color: #202631;
  box-shadow: 0 3px 7px #20263120;
}
button.primary:hover {
  background: #343b49;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #b69250;
  outline-offset: 2px;
}
th {
  background: #f3f5f8;
  color: #667085;
  font-weight: 700;
}
tbody tr:hover {
  background: #fcfaf5;
}
td {
  font-size: 13px;
}
.tag {
  border-radius: 20px;
  padding: 5px 10px;
  background: #edf0f5;
  font-weight: 600;
}
.rank {
  padding: 14px 0;
}
.track {
  height: 6px;
}
.track i {
  background: linear-gradient(90deg, #b08a46, #e0c68c);
}
dialog {
  max-height: 90vh;
  overflow: auto;
  border: 1px solid #e4e7ec;
  border-radius: 20px;
  padding: 28px;
}
dialog::backdrop {
  background: #10152299;
  backdrop-filter: blur(3px);
}
form label {
  font-size: 12px;
  font-weight: 650;
  color: #505969;
}
form input,
form select,
form textarea {
  padding: 11px;
}
.duration-fixed {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f0f3f8;
  border-radius: 9px;
  padding: 13px;
  margin: 12px 0;
  color: #44516a;
}
.duration-fixed strong {
  color: #202631;
}
.recbox {
  background: #faf7ef;
  border: 1px solid #e7d6b0;
  border-radius: 12px;
  padding: 15px;
}
.recommendBtn {
  width: 100%;
  padding: 12px;
}
.recrow {
  background: white;
  border: 1px solid #e8e3d8;
  border-radius: 10px;
  margin: 8px 0;
  padding: 12px;
}
.recrow.preferred {
  border-left: 4px solid #b69250;
}
.recrow.blocked {
  border-left: 4px solid #bd6c62;
}
.recrow.unknown {
  border-left: 4px solid #a1a8b2;
}
.recrow small {
  line-height: 1.5;
}
.recrow button {
  color: #755824;
}
#selectedRecommendation:not(:empty) {
  margin-top: 9px;
  font-weight: 700;
  color: #356b53;
}
.day {
  padding: 9px;
  min-height: 120px;
}
.day.selected {
  background: #fff8e8;
}
.event {
  background: #e9edf5;
  color: #43516a;
  border-left: 2px solid #8091ad;
  padding: 5px;
}
.calhead {
  font-weight: 650;
}
.fpchips button.active {
  background: #222936;
  color: #f1d396;
}
footer {
  letter-spacing: 1px;
  font-size: 10px;
}
@media (max-width: 800px) {
  aside {
    width: auto;
    padding: 12px 15px;
  }
  .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
    text-align: left;
    border: 0;
  }
  .brand .logo {
    display: block;
    width: 38px;
    height: 38px;
    margin: 0;
  }
  .brand h2 {
    font-size: 17px;
  }
  .brand small,
  .navlabel {
    display: none;
  }
  nav {
    margin-top: 12px;
  }
  nav button {
    width: auto;
    flex-shrink: 0;
  }
  .navicon {
    font-size: 15px;
    width: 16px;
  }
  main {
    margin: 0;
    padding: 18px;
  }
  .admin small {
    display: none;
  }
  .metric,
  .panel {
    padding: 15px;
  }
  .metric b {
    font-size: 20px;
  }
  header h1 {
    font-size: 23px;
  }
  .day {
    min-height: 90px;
  }
}
.customer-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  padding: 16px;
  background: #faf8f2;
  border: 1px solid #e7d6b0;
  border-radius: 12px;
  margin-bottom: 12px;
}
.customer-filters label {
  display: grid;
  gap: 7px;
  flex: 1;
  min-width: 150px;
  font-size: 12px;
  font-weight: 650;
  color: #505969;
}
.customer-filters select {
  width: 100%;
  padding: 10px;
}
.customer-filters button {
  min-height: 40px;
}
.customer-result {
  color: #68717f;
  font-size: 13px;
  margin: 14px 0;
}
.customer-result strong {
  color: #755824;
}
.customer-empty {
  padding: 14px 0;
  text-align: center;
}
@media (max-width: 600px) {
  .customer-filters label {
    min-width: 100%;
  }
  .customer-filters button {
    width: 100%;
  }
  .bar #search {
    width: 100%;
    order: 3;
  }
}

html:not([data-auth='yes']) aside,
html:not([data-auth='yes']) main {
  display: none;
}
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #10131b, #272d38);
}
html[data-auth='yes'] .login-screen {
  display: none;
}
.login-card {
  width: min(440px, 100%);
  background: #fff;
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 20px 60px #0004;
}
.login-brand {
  color: #987536;
  font-size: 12px;
  letter-spacing: 3px;
  margin-bottom: 12px;
}
.login-card h2 {
  margin-bottom: 12px;
}
.login-card p {
  line-height: 1.7;
}
.login-card .primary {
  width: 100%;
  margin-top: 8px;
}
.login-hint {
  font-size: 12px;
  background: #faf7ef;
  padding: 12px;
  border-radius: 8px;
  margin-top: 18px;
  color: #75613b;
}
.login-error {
  color: #a13838;
  font-size: 13px;
  min-height: 20px;
}
.account-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.account-actions button {
  font-size: 12px;
}
.scope-note {
  padding: 11px 14px;
  background: #f0f3f8;
  border-radius: 9px;
  color: #44516a;
  font-size: 13px;
  margin-bottom: 16px;
}
@media (max-width: 600px) {
  .admin {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .account-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .login-card {
    padding: 24px;
  }
}
.schedule-selector select {
  min-width: 220px;
  max-width: 100%;
}
.schedule-selector label {
  font-weight: 650;
  color: #505969;
}
.post-title {
  min-width: 180px;
  max-width: 520px;
  border: 0;
  background: none;
  text-align: left;
  color: #755824;
  white-space: normal;
  overflow-wrap: anywhere;
}
.post-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.8;
  margin-top: 20px;
}
#form textarea[name='postBody'] {
  resize: vertical;
}
@media (max-width: 600px) {
  .schedule-selector select {
    width: 100%;
  }
}
