:root {
  font-family: "Malgun Gothic", "Noto Sans KR", sans-serif;
  color: #17211b;
  background: #f4f6f5;
  letter-spacing: 0;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; }
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #eef2ef;
}
.login-card {
  width: min(420px, 100%);
  display: grid;
  gap: 18px;
  padding: 38px;
  border: 1px solid #d7ddd9;
  border-radius: 8px;
  background: white;
  box-shadow: 0 18px 50px #18231d18;
}
.login-brand { display: flex; align-items: baseline; gap: 10px; }
.login-brand h1 { font-size: 28px; }
.login-brand span { color: #16794b; font-size: 13px; font-weight: 700; }
.login-card > p { color: #647168; font-size: 13px; }
.login-card button { min-height: 46px; margin-top: 4px; font-weight: 700; }
.login-notice { min-height: 20px; color: #b42318 !important; }
.topbar {
  min-height: 86px; padding: 18px 28px; background: #18231d; color: white;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
}
h1, h2, p { margin: 0; }
h1 { font-size: 24px; }
.topbar p { margin-top: 5px; color: #b7c2bc; font-size: 13px; }
.top-actions { display: flex; gap: 8px; }
button {
  min-height: 38px; border: 1px solid #abb5af; border-radius: 6px; padding: 0 14px;
  background: white; color: #17211b; cursor: pointer; font: inherit;
}
button:hover { border-color: #2d6a4f; }
button.primary { background: #16794b; border-color: #16794b; color: white; }
button.danger { border-color: #b42318; color: #b42318; }
main { max-width: 1320px; margin: 0 auto; padding: 22px 28px 50px; }
.connection-band {
  display: grid; grid-template-columns: minmax(260px, 1fr) minmax(180px, .7fr) auto;
  align-items: end; gap: 12px; padding-bottom: 20px; border-bottom: 1px solid #d7ddd9;
}
label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
input {
  height: 38px; min-width: 0; border: 1px solid #abb5af; border-radius: 5px;
  padding: 0 10px; background: white; font: inherit;
}
.summary-band {
  display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid #d7ddd9;
  margin-bottom: 18px;
}
.summary-band div { padding: 18px 12px; border-right: 1px solid #d7ddd9; }
.summary-band div:last-child { border-right: 0; }
.summary-band span { display: block; font-size: 12px; color: #647168; }
.summary-band strong { display: block; margin-top: 5px; font-size: 23px; }
.table-section { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: white; }
th, td { padding: 13px 12px; text-align: left; border-bottom: 1px solid #e2e6e3; white-space: nowrap; }
th { background: #edf1ee; font-size: 12px; color: #526058; }
td { font-size: 13px; }
.status { display: inline-flex; align-items: center; gap: 7px; }
.lamp { width: 10px; height: 10px; border-radius: 50%; background: #8b948e; }
.lamp.running { background: #14a05a; }
.lamp.stopped { background: #d92d20; }
.lamp.warning { background: #e3a008; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.row-actions button { min-height: 31px; padding: 0 9px; font-size: 12px; }
.empty { padding: 42px; text-align: center; color: #69756e; }
#notice { min-height: 20px; margin-top: 14px; color: #8b251b; }
dialog { width: min(520px, calc(100vw - 32px)); border: 0; border-radius: 8px; padding: 24px; box-shadow: 0 18px 60px #0003; }
dialog::backdrop { background: #10171388; }
dialog h2 { margin-bottom: 20px; font-size: 19px; }
dialog form { display: grid; gap: 15px; }
fieldset { border: 1px solid #d7ddd9; padding: 14px; }
fieldset label { grid-template-columns: 22px 1fr 150px; align-items: center; margin: 10px 0; }
.toggle-line { grid-template-columns: 22px 1fr; align-items: center; }
.toggle-line input, .strategy-enabled { width: 17px; height: 17px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.settlement-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: #d7ddd9; border: 1px solid #d7ddd9; }
.settlement-grid div { min-height: 88px; padding: 14px; background: white; }
.settlement-grid span { display: block; color: #647168; font-size: 12px; }
.settlement-grid strong { display: block; margin-top: 8px; font-size: 18px; }
.settlement-grid .settlement-fee { grid-column: 1 / -1; background: #eef8f2; }
.settlement-grid .settlement-fee strong { color: #16794b; font-size: 22px; }
.settlement-note { color: #647168; font-size: 12px; line-height: 1.6; }
@media (max-width: 720px) {
  .topbar { align-items: flex-start; padding: 16px; }
  .top-actions { flex-direction: column; }
  main { padding: 16px; }
  .connection-band { grid-template-columns: 1fr; }
  .summary-band { grid-template-columns: repeat(2, 1fr); }
  .summary-band div:nth-child(2) { border-right: 0; }
}
