:root {
  --bg: #f6f8f7;
  --ink: #172d29;
  --muted: #80908a;
  --line: #e5ebe7;
  --green: #237459;
  --red: #c56962;
}
/* Keep the example's clean dashboard with NO WAY LOSS emerald and gold. */
.back-site{color:#cfc49f;text-decoration:none;font-size:12px;margin-top:18px}
.filters select{width:auto}.filters button{white-space:nowrap}
.toolbar{justify-content:flex-end}.sidebar-data-switch{display:grid;gap:6px;margin:18px 0 24px;padding-top:16px;border-top:1px solid #52644766}.sidebar-data-switch button{background:transparent;border:1px solid transparent;border-radius:7px;color:#c2d2c3;text-align:left;padding:10px 14px;font-size:12px}.sidebar-data-switch button.selected{background:#294a38;color:#f4dfac;border-color:#8c805b}.trade-preview{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:16px;border:1px solid #d4dfd0;border-radius:10px;background:#f2f6ef;margin:10px 0}.trade-preview div{display:grid;gap:5px}.trade-preview small{font-size:11px;color:#576d5b}.trade-preview strong{font-size:19px}.contract-help{font-size:11px!important;color:#6c785d!important}#calculation-error{color:#a13b2c;font-size:12px;min-height:1em}dialog#dialog{width:680px;max-height:90svh;overflow-y:auto}.form-grid input,.form-grid select{margin-bottom:0}#dialog .form-grid{gap:12px}#dialog form{gap:10px}.sidebar-data-switch button:focus-visible{outline:2px solid #d9c38b;outline-offset:2px}
@media(max-width:780px){.sidebar-data-switch{display:flex;width:100%;margin:0;padding-top:8px;gap:8px}.sidebar-data-switch button{flex:1;text-align:center;font-size:11px;padding:8px}.trade-preview{padding:12px}.trade-preview strong{font-size:17px}.form-grid{grid-template-columns:1fr 1fr}#dialog{padding:20px}}
body>aside{background:linear-gradient(160deg,#112d22,#071710);border-color:#274134;color:#f4efdf}
body>aside .brand{color:#f4efdf;font-size:18px;letter-spacing:0}
body>aside .brand img{border-radius:50%}
body>aside .workspace,body>aside .workspace span{color:#c6ccbc}
body>aside nav button{color:#bacabe}
body>aside nav button.active{background:#d9c38b;color:#182c22}
body>aside .aside-tip{background:#173529;border-color:#40533b}
body>aside .aside-tip p,body>aside .aside-tip>span{color:#d3c595}
body>aside .profile{border-color:#37513d}
body>aside .profile small{color:#bbc8bd}
.stats article{border-top:3px solid #d0b572}
@media(max-width:780px){body>aside{flex-wrap:wrap;gap:10px}.back-site{margin:0;font-size:11px}body>aside nav{width:100%;justify-content:space-between}body>aside nav button span{display:inline;font-size:11px;margin-left:4px}body>aside nav button{padding:8px;font-size:15px}.calendar-panel{overflow-x:auto}.weekdays,.calendar{min-width:440px}.header-right{max-width:50%}h1{line-height:1.4}}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    14px "IBM Plex Sans Thai",
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
select {
  cursor: pointer;
}
button {
  transition: 0.18s;
}
button:hover {
  filter: brightness(0.95);
}
aside {
  width: 238px;
  position: fixed;
  inset: 0 auto 0 0;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 34px 23px;
  display: flex;
  flex-direction: column;
}
.brand {
  font-size: 25px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -1px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.logo {
  display: grid;
  place-items: center;
  background: #163f34;
  color: #e1f7a7;
  width: 34px;
  height: 36px;
  border-radius: 9px;
  font-size: 30px;
}
.dot {
  color: #70a47c;
  margin-left: -8px;
}
.workspace {
  font-weight: 500;
  font-size: 12px;
  margin: 43px 12px 22px;
  color: #5b6f66;
}
.workspace span {
  display: block;
  font-size: 9px;
  letter-spacing: 1.6px;
  color: #a0aca5;
  margin-top: 5px;
}
nav button {
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  color: #76877e;
  padding: 13px 15px;
  border-radius: 7px;
  margin-bottom: 7px;
  font-size: 19px;
}
nav button span {
  font-size: 14px;
  margin-left: 10px;
}
nav button.active {
  background: #eaf2ec;
  color: #226247;
  font-weight: 600;
}
.aside-tip {
  background: #f5f7ee;
  border: 1px solid #e6ecdb;
  border-radius: 10px;
  padding: 18px;
  margin-top: auto;
}
.aside-tip > span {
  font-size: 24px;
  color: #6a854d;
}
.aside-tip h3 {
  font-size: 13px;
  margin: 7px 0;
}
.aside-tip p {
  font-size: 11px;
  color: #7e8b71;
  line-height: 1.9;
  margin: 0;
}
.profile {
  border-top: 1px solid var(--line);
  padding-top: 23px;
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
}
.profile b,
.avatar {
  display: grid;
  place-items: center;
  background: #e9ede5;
  color: #607850;
  border-radius: 50%;
  width: 32px;
  height: 32px;
}
.profile small {
  display: block;
  color: var(--muted);
  font-size: 9px;
  margin-top: 3px;
}
main {
  margin-left: 238px;
}
header {
  height: 77px;
  padding: 0 39px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: #8b9892;
  letter-spacing: 1px;
}
header i {
  padding: 0 15px;
  font-style: normal;
  color: #c9d2cc;
}
header b {
  font-weight: 400;
  color: #52665c;
  letter-spacing: 0;
  font-size: 12px;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0;
  font-size: 11px;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7d9e65;
}
.avatar {
  margin-left: 19px;
  font-size: 12px;
}
.content {
  max-width: 1500px;
  margin: auto;
  padding: 37px 39px 22px;
}
.title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 2px;
  color: #738c7d;
  font-weight: 600;
}
h1 {
  font-size: 27px;
  letter-spacing: -0.7px;
  font-weight: 600;
  margin: 8px 0;
}
p {
  color: var(--muted);
  font-size: 12px;
  margin: 5px 0;
  line-height: 1.8;
}
.primary {
  border: 1px solid #183e32;
  background: #183e32;
  color: white;
  border-radius: 7px;
  padding: 11px 20px;
  white-space: nowrap;
  font-size: 12px;
}
.secondary {
  padding: 9px 14px;
  border: 1px solid #dfe6e1;
  background: #fff;
  border-radius: 6px;
  font-size: 11px;
  color: #586c60;
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 28px 0 13px;
  gap: 12px;
}
.segments {
  padding: 4px;
  background: #eaf0eb;
  border-radius: 7px;
  display: flex;
  gap: 4px;
}
.segments button {
  border: 0;
  background: none;
  color: #809086;
  border-radius: 5px;
  padding: 7px 17px;
  font-size: 11px;
}
.segments .selected {
  background: white;
  color: #254d39;
  box-shadow: 0 1px 4px #183e3212;
}
.filters {
  display: flex;
  gap: 10px;
}
select {
  border: 1px solid #dfe6e1;
  background: white;
  border-radius: 6px;
  padding: 8px 12px;
  color: #52685c;
  font-size: 11px;
}
.demo-banner {
  background: #eff3e9;
  border: 1px solid #e4eadc;
  border-radius: 6px;
  padding: 9px 13px;
  color: #788763;
  font-size: 10px;
  margin-bottom: 18px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 21px;
}
.stats article {
  padding: 19px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.stats article > span {
  display: block;
  color: #6e8075;
  font-size: 11px;
}
.stats i {
  float: right;
  font-style: normal;
  color: #8c9c90;
}
.stats strong {
  display: block;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -1px;
  margin: 12px 0 8px;
}
.stats small {
  font-size: 9px;
  color: #98a59c;
}
.positive {
  color: var(--green);
}
.negative {
  color: var(--red);
}
.charts {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 20px;
  margin-bottom: 21px;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px;
  margin-bottom: 21px;
  overflow: hidden;
}
.charts .panel {
  margin-bottom: 0;
}
h2 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}
.panel p {
  font-size: 10px;
  margin-top: 3px;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.legend {
  font-size: 9px;
  color: #6c907c;
}
.equity svg {
  width: 100%;
  height: 217px;
  display: block;
}
.equity svg text {
  font-family: inherit;
  font-size: 10px;
  fill: #97a59c;
}
.distribution {
  text-align: left;
}
#donut {
  display: grid;
  place-items: center;
  padding: 17px 0 12px;
}
.donut-ring {
  width: 137px;
  height: 137px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.donut-hole {
  width: 110px;
  height: 110px;
  background: white;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.donut-hole strong {
  font-size: 26px;
  font-weight: 500;
}
.donut-hole small {
  color: #93a197;
  font-size: 9px;
}
.result-legend {
  display: flex;
  justify-content: center;
  gap: 21px;
  font-size: 10px;
  color: #85958b;
}
.result-legend b {
  display: block;
  font-size: 14px;
  color: #435d4e;
  margin-top: 3px;
}
.calendar-panel {
  padding-bottom: 16px;
}
.calendar-key {
  display: flex;
  gap: 16px;
  font-size: 11px;
  color: #596d63;
}
.calendar-key span:first-child {
  color: #226748;
}
.calendar-key span:nth-child(2) {
  color: #aa4038;
}
.weekdays,
.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.weekdays {
  text-align: center;
  font-size: 10px;
  color: #596d63;
  margin-bottom: 10px;
}
.calendar {
  gap: 6px;
}
.day {
  background: #edf2ee;
  min-height: 65px;
  border: 1px solid #d5dfd8;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 11px;
  color: #596d63;
  text-align: left;
}
.day.profit {
  background: #226748;
  color: #fff;
  border-color: #195137;
}
.day.loss {
  background: #aa4038;
  color: #fff;
  border-color: #8c302a;
}
.day strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-top: 3px;
}
.day small {
  font-size: 10px;
  opacity: 1;
}
.day.blank {
  background: transparent;
  border: 0;
}
.day.today {
  outline: 2px solid #226748;
  outline-offset: 1px;
}
.day:focus-visible { outline: 3px solid #9a752d; outline-offset: 2px; }
.search {
  font-size: 10px;
  background: #fafbf9;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 12px;
  min-width: 185px;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  text-align: left;
  white-space: nowrap;
}
th {
  color: #8b9a90;
  font-weight: 400;
  font-size: 10px;
  background: #f8faf8;
  padding: 11px 13px;
}
td {
  padding: 14px 13px;
  border-bottom: 1px solid #edf1ed;
}
tr:last-child td {
  border: 0;
}
.symbol {
  font-weight: 600;
  letter-spacing: 0.3px;
}
.side {
  font-size: 9px;
  padding: 3px 8px;
  border-radius: 4px;
  background: #edf5ee;
  color: #5c8064;
}
.side.short {
  background: #f8f0ec;
  color: #a87c68;
}
.note {
  max-width: 270px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #87948b;
}
.edit {
  background: transparent;
  border: 0;
  color: #718475;
  font-size: 11px;
}
.count-chip {
  background: #eef3ed;
  color: #82917c;
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 5px;
}
#empty {
  text-align: center;
  padding: 35px;
  color: #819486;
  font-size: 12px;
}
footer {
  display: flex;
  gap: 17px;
  color: #97a59b;
  font-size: 9px;
  align-items: center;
}
footer > span:last-child {
  margin-left: auto;
  font-size: 8px;
}
dialog {
  width: 570px;
  max-width: 94vw;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 27px;
  color: var(--ink);
  box-shadow: 0 20px 80px #132d2933;
}
dialog::backdrop {
  background: #102a2666;
  backdrop-filter: blur(3px);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-head h2 {
  font-size: 22px;
  margin-top: 7px;
}
.modal-head button {
  border: 0;
  background: none;
  font-size: 27px;
  color: #819086;
}
.modal-desc {
  margin: 10px 0 20px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
label {
  display: block;
  font-size: 11px;
  color: #536d5c;
}
label input,
label select,
textarea {
  width: 100%;
  border: 1px solid #dce4dd;
  border-radius: 6px;
  padding: 10px;
  background: white;
  color: var(--ink);
  margin: 6px 0 12px;
  font-size: 12px;
}
textarea {
  resize: vertical;
}
input:focus,
textarea:focus,
select:focus,
button:focus-visible {
  outline: 2px solid #8faa83;
  outline-offset: 2px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #193e32;
  color: #fff;
  border-radius: 8px;
  padding: 12px 22px;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
}
.toast.show {
  opacity: 1;
}
@media (min-width: 1500px) {
  .content {
    padding-top: 45px;
  }
  .day {
    min-height: 75px;
  }
}
@media (max-width: 1100px) {
  aside {
    width: 190px;
    padding: 30px 16px;
  }
  main {
    margin-left: 190px;
  }
  .content {
    padding: 28px 23px;
  }
  .brand {
    font-size: 22px;
  }
  .stats {
    gap: 10px;
  }
  .stats article {
    padding: 15px;
  }
  .stats strong {
    font-size: 24px;
  }
  .charts {
    grid-template-columns: 1.8fr 1fr;
  }
  h1 {
    font-size: 24px;
  }
  .day {
    padding: 6px;
  }
  .calendar-key {
    gap: 9px;
  }
}
@media (max-width: 780px) {
  aside {
    position: static;
    width: 100%;
    padding: 16px 20px;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--line);
  }
  aside .workspace,
  .aside-tip,
  .profile {
    display: none;
  }
  .brand {
    font-size: 21px;
  }
  nav {
    display: flex;
  }
  nav button {
    width: auto;
    margin: 0;
    padding: 8px;
    font-size: 19px;
  }
  nav button span {
    display: none;
  }
  main {
    margin: 0;
  }
  header {
    height: 49px;
    padding: 0 20px;
  }
  .content {
    padding: 25px 17px;
  }
  .header-right {
    font-size: 9px;
  }
  .avatar {
    width: 25px;
    height: 25px;
    margin-left: 4px;
  }
  .title-row {
    align-items: flex-start;
  }
  h1 {
    font-size: 22px;
  }
  .title-row p {
    font-size: 10px;
  }
  .eyebrow {
    font-size: 8px;
    letter-spacing: 1px;
  }
  .title-row .primary {
    padding: 9px 11px;
    font-size: 10px;
    margin-top: 22px;
  }
  .toolbar {
    flex-wrap: wrap;
  }
  .filters {
    margin-left: auto;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .charts {
    grid-template-columns: 1fr;
  }
  .distribution {
    display: none;
  }
  .panel {
    padding: 17px;
  }
  .calendar-key {
    font-size: 8px;
    gap: 7px;
  }
  .day {
    min-height: 60px;
    padding: 5px 4px;
  }
  .day strong {
    font-size: 10px;
  }
  .day small {
    font-size: 9px;
  }
  .calendar {
    gap: 3px;
  }
  .panel-head {
    flex-wrap: wrap;
  }
  .search {
    width: 100%;
  }
  .form-grid {
    gap: 10px;
  }
  footer {
    flex-wrap: wrap;
    font-size: 8px;
    gap: 5px;
  }
  footer > span:last-child {
    width: 100%;
    margin-left: 0;
  }
  .stats strong {
    font-size: 26px;
  }
  .legend {
    font-size: 8px;
  }
  .demo-banner {
    font-size: 9px;
  }
}

.tools-panel[hidden],#add[hidden],.title-row p[hidden],.sidebar-data-switch[hidden],.toolbar[hidden]{display:none!important}.tools-placeholder{min-height:350px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;border:1px solid #dce6df;border-radius:16px;background:radial-gradient(ellipse at top,#eaf2e8,white 65%);padding:40px 24px}.tools-icon{display:grid;place-items:center;width:68px;height:68px;border:1px solid #c5d7c8;border-radius:18px;background:#f6f9ef;color:#426b50;font-size:38px;margin-bottom:20px}.tools-tag{color:#92722f;font-size:11px;border:1px solid #dfd1a6;border-radius:20px;padding:5px 12px;background:#faf5e5}.tools-placeholder h2{font-size:25px;color:#254c36;margin:18px 0 8px}.tools-placeholder p{font-size:13px;color:#768675;line-height:1.8}

@media(max-width:780px){body>aside nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}body>aside nav button{min-width:0;text-align:center;padding:8px 4px}}
