:root {
  --ink: #172b27;
  --ink-2: #35534b;
  --paper: #f7f7f5;
  --white: #fff;
  --line: #dddfd9;
  --muted: #6c7774;
  --accent: #b8ef5e;
  --accent-dark: #207253;
  --coral: #d8664e;
  --sand: #f3efe4;
  --shadow: 0 24px 70px rgba(25, 53, 39, 0.1);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    14px/1.55 "DM Sans",
    "Noto Sans KR",
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
a {
  color: inherit;
  text-decoration: none;
}
.hidden {
  display: none !important;
}
.site-header {
  background: var(--ink);
  color: #fff;
}
.header-inner {
  max-width: 1500px;
  margin: auto;
  height: 80px;
  padding: 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}
.brand-emblem {
  width: 36px;
  height: 36px;
  display: grid;
  grid-template-columns: repeat(3, 5px);
  justify-content: center;
  align-items: center;
  gap: 3px;
  transform: skew(-10deg);
  background: var(--accent);
  border-radius: 3px;
}
.brand-emblem span {
  display: block;
  background: var(--ink);
  height: 10px;
}
.brand-emblem span:nth-child(2) {
  height: 17px;
}
.brand-emblem span:nth-child(3) {
  height: 24px;
}
.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.04;
  gap: 3px;
}
.brand-copy strong {
  font-size: 19px;
  font-weight: 800;
}
.brand-copy small {
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--accent);
  font-weight: 700;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.auth-label {
  color: #b7c9bd;
  font-size: 12px;
}
.google-slot {
  min-width: 0;
}
.icon-button,
.icon-text {
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #5d7169;
  color: #eaf5e7;
  background: transparent;
  border-radius: 4px;
}
.icon-button {
  width: 38px;
}
.icon-text {
  padding: 0 12px;
}
.icon-button svg,
.icon-text svg {
  width: 17px;
  height: 17px;
}
.shell {
  max-width: 1500px;
  margin: auto;
  padding: 0 36px 96px;
}
.overview {
  padding: 48px 0 44px;
  border-bottom: 1px solid var(--line);
}
.overview-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 32px;
}
.eyebrow {
  font-size: 11px;
  color: var(--accent-dark);
  font-weight: 700;
  letter-spacing: 0.12em;
  margin: 0 0 10px;
}
.overview h1 {
  font-size: clamp(31px, 3.5vw, 52px);
  line-height: 1.12;
  letter-spacing: 0;
  font-weight: 800;
  margin: 0;
}
.overview h1 em {
  font-style: normal;
  color: var(--accent-dark);
}
.overview-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  padding-bottom: 5px;
  text-align: right;
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-dark);
  flex: none;
}
.overview-grid {
  display: grid;
  grid-template-columns: minmax(330px, 1.65fr) repeat(3, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  background: var(--white);
}
.focus-panel {
  min-height: 190px;
  background: var(--ink);
  color: #fff;
  padding: 26px 30px;
  position: relative;
  overflow: hidden;
}
.focus-panel:after {
  content: "";
  position: absolute;
  right: -25px;
  bottom: -64px;
  width: 180px;
  height: 180px;
  border: 1px solid #456a5d;
  border-radius: 50%;
  box-shadow:
    0 0 0 25px var(--ink),
    0 0 0 26px #456a5d,
    0 0 0 50px var(--ink),
    0 0 0 51px #456a5d;
  pointer-events: none;
}
.focus-panel .label {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 19px;
}
.focus-panel .name {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.25;
  position: relative;
  z-index: 1;
}
.focus-panel .sub {
  color: #c0d2c7;
  margin-top: 8px;
  position: relative;
  z-index: 1;
}
.focus-panel button {
  border: 0;
  background: var(--accent);
  color: var(--ink);
  font-weight: 800;
  padding: 7px 12px;
  margin-top: 18px;
  border-radius: 3px;
  position: relative;
  z-index: 1;
}
.metric {
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
  min-width: 0;
}
.metric > span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}
.metric strong {
  font-size: clamp(22px, 2.2vw, 34px);
  line-height: 1.15;
  margin: 23px 0 8px;
  overflow-wrap: anywhere;
}
.metric strong.negative {
  color: var(--coral);
}
.metric strong.positive {
  color: var(--accent-dark);
}
.metric small {
  font-size: 11px;
  color: var(--muted);
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 48px;
  padding-top: 38px;
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 23px;
}
.section-heading .eyebrow {
  margin-bottom: 5px;
}
.section-heading h2 {
  font-size: 26px;
  line-height: 1.2;
  margin: 0;
  letter-spacing: 0;
}
.result-count {
  color: var(--muted);
  font-size: 12px;
}
.tab-list {
  display: flex;
  gap: 27px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.tab-list::-webkit-scrollbar {
  display: none;
}
.tab {
  white-space: nowrap;
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  padding: 10px 2px 15px;
  color: var(--muted);
  font-weight: 700;
}
.tab:hover {
  color: var(--ink);
}
.tab.active {
  color: var(--ink);
  border-color: var(--accent-dark);
}
.tab span {
  font-size: 11px;
  color: var(--muted);
  margin-left: 3px;
}
.tab.active span {
  color: var(--accent-dark);
}
.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
}
.search {
  height: 42px;
  width: min(100%, 360px);
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0 13px;
}
.search svg {
  width: 17px;
  color: var(--muted);
}
.search input {
  border: 0;
  outline: 0;
  width: 100%;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
}
.search input::placeholder {
  color: #87978e;
}
.select-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  position: relative;
}
.select-wrap select {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 0;
  padding: 10px 32px 10px 11px;
  min-width: 110px;
  outline: 0;
}
.select-wrap svg {
  width: 15px;
  position: absolute;
  right: 10px;
  pointer-events: none;
  color: var(--muted);
}
.stock-list {
  background: #fff;
  border-top: 1px solid var(--line);
}
.stock-row {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  display: grid;
  grid-template-columns: minmax(170px, 1.55fr) minmax(110px, 0.8fr) minmax(
      120px,
      0.8fr
    ) minmax(105px, 0.7fr) 18px;
  gap: 16px;
  align-items: center;
  text-align: left;
  padding: 23px 20px;
  color: var(--ink);
  transition: background 0.16s;
}
.stock-row:hover,
.stock-row:focus-visible {
  background: #f1f8e8;
  outline: 0;
}
.stock-row .name {
  display: block;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.stock-row .market {
  color: var(--muted);
  font-size: 11px;
  margin-top: 5px;
  display: block;
}
.stock-row .datum {
  min-width: 0;
}
.stock-row .datum small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 4px;
}
.stock-row .datum strong {
  font-size: 14px;
  font-weight: 700;
  display: block;
  overflow-wrap: anywhere;
}
.stock-row .datum strong.positive {
  color: var(--accent-dark);
}
.stock-row .datum strong.negative {
  color: var(--coral);
}
.stock-row svg {
  width: 17px;
  color: var(--muted);
}
.empty {
  padding: 55px 24px;
  text-align: center;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.side {
  padding-top: 13px;
}
.side section {
  padding: 0 0 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}
.aside-title {
  display: flex;
  gap: 10px;
  align-items: center;
}
.aside-title h2 {
  font-size: 16px;
  margin: 0;
}
.aside-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--ink);
  border-radius: 3px;
}
.aside-icon.muted {
  background: #d8e8df;
}
.aside-icon svg {
  width: 17px;
  height: 17px;
}
.aside-status {
  font-size: 13px;
  font-weight: 700;
  margin: 21px 0 6px;
}
.aside-copy {
  color: var(--muted);
  font-size: 12px;
  margin: 8px 0 17px;
  line-height: 1.75;
}
.calendar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.secondary-button,
.primary-button {
  border: 1px solid var(--ink);
  border-radius: 3px;
  padding: 10px 13px;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  font-size: 12px;
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
}
.primary-button {
  background: var(--ink);
  color: #fff;
}
.primary-button svg,
.secondary-button svg {
  width: 15px;
  height: 15px;
}
.calendar-settings {
  margin-top: 16px;
  display: grid;
  gap: 11px;
  font-size: 12px;
}
.calendar-settings label {
  display: flex;
  align-items: center;
  gap: 9px;
}
.calendar-settings input {
  accent-color: var(--accent-dark);
}
.text-button {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  gap: 4px;
  align-items: center;
  justify-content: flex-start;
}
.text-button svg {
  width: 14px;
  height: 14px;
}
.text-button.danger {
  color: var(--coral);
}
.inline-message {
  padding: 10px;
  background: #e8f2e6;
  color: var(--ink-2);
  font-size: 12px;
}
.inline-message.error {
  background: #fff0eb;
  color: #a4432f;
}
.data-breakdown {
  display: grid;
  gap: 10px;
}
.data-breakdown div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}
.data-breakdown span {
  color: var(--muted);
}
.data-breakdown strong {
  font-size: 12px;
}
.data-breakdown strong.warn {
  color: var(--coral);
}
.side-footnote {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.75;
  margin: 17px 0 0;
}
.detail-dialog,
.record-dialog {
  border: 0;
  padding: 0;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
  max-height: min(90vh, 900px);
  overflow: auto;
}
.detail-dialog {
  width: min(760px, calc(100vw - 30px));
}
.record-dialog {
  width: min(610px, calc(100vw - 30px));
}
.detail-dialog::backdrop,
.record-dialog::backdrop {
  background: rgba(13, 29, 25, 0.52);
}
.detail-body,
.record-dialog form {
  padding: 32px;
}
.dialog-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}
.dialog-top h2 {
  font-size: 27px;
  line-height: 1.28;
  margin: 0;
}
.dialog-top .eyebrow {
  margin-bottom: 5px;
}
.close-button {
  border: 1px solid var(--line);
  background: #fff;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: none;
}
.close-button svg {
  width: 17px;
}
.detail-sub {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 24px;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.detail-grid div {
  padding: 15px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.detail-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.detail-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 15px;
  overflow-wrap: anywhere;
}
.detail-section {
  margin-top: 29px;
}
.detail-section h3 {
  font-size: 15px;
  margin: 0 0 13px;
}
.broker-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.broker-table th {
  background: #edf2ec;
  color: var(--muted);
  text-align: left;
  font-weight: 700;
}
.broker-table th,
.broker-table td {
  padding: 11px 9px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.broker-table td {
  overflow-wrap: anywhere;
}
.detail-actions {
  border-top: 1px solid var(--line);
  margin-top: 27px;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.source-link {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.source-link svg {
  width: 13px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 27px 0 16px;
}
.form-grid label,
.memo-label {
  font-size: 12px;
  font-weight: 700;
  display: block;
}
.form-grid label span {
  color: var(--muted);
  font-weight: 400;
}
.form-grid input,
.memo-label textarea {
  margin-top: 7px;
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  padding: 10px 11px;
  outline-color: var(--accent-dark);
}
.memo-label textarea {
  resize: vertical;
}
.form-error {
  color: var(--coral);
  font-size: 12px;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
  margin-top: 25px;
}
.form-actions .danger {
  margin-right: auto;
}
.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  background: var(--ink);
  color: #fff;
  padding: 12px 17px;
  z-index: 30;
  box-shadow: var(--shadow);
  border-left: 3px solid var(--accent);
  max-width: min(420px, calc(100vw - 44px));
  display: none;
}
.toast.show {
  display: block;
}
.toast.error {
  border-left-color: var(--coral);
}
.skeleton {
  height: 100%;
  background: linear-gradient(90deg, #234138, #385848, #234138);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}
.list-context {
  margin: 0;
  padding: 11px 15px;
  background: #edf3ec;
  color: var(--ink-2);
  font-size: 12px;
  border-left: 2px solid var(--accent-dark);
}
.record-mark {
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-dark);
  background: #e3f2d6;
  padding: 2px 5px;
}
.quality-alert {
  display: flex;
  align-items: start;
  gap: 9px;
  background: #fff1e6;
  border-left: 3px solid var(--coral);
  color: #8d4b3a;
  padding: 11px 13px;
  font-size: 12px;
  margin: 0 0 22px;
  line-height: 1.6;
}
.quality-alert svg {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 1px;
}
.admin-link {
  margin-top: 18px;
}
.mobile-date {
  display: none;
}
@media (max-width: 1100px) {
  .overview-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .focus-panel {
    grid-column: 1/-1;
    min-height: 170px;
  }
  .metric:first-of-type {
    border-left: 0;
  }
  .workspace {
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 26px;
  }
  .stock-row {
    grid-template-columns: minmax(150px, 1.4fr) minmax(100px, 0.8fr) minmax(
        100px,
        0.8fr
      ) 16px;
  }
  .stock-row .datum.optional {
    display: none;
  }
}
@media (max-width: 760px) {
  .header-inner {
    height: 66px;
    padding: 0 17px;
  }
  .brand-emblem {
    width: 31px;
    height: 31px;
  }
  .brand-copy strong {
    font-size: 16px;
  }
  .brand-copy small {
    font-size: 8px;
  }
  .auth-label {
    display: none;
  }
  .header-actions {
    gap: 8px;
  }
  .icon-text span {
    display: none;
  }
  .icon-text {
    width: 38px;
    padding: 0;
  }
  .shell {
    padding: 0 16px 70px;
  }
  .overview {
    padding: 31px 0 29px;
  }
  .overview-heading {
    align-items: start;
    margin-bottom: 22px;
  }
  .overview h1 {
    font-size: 30px;
  }
  .overview-meta {
    font-size: 10px;
    max-width: 116px;
  }
  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .focus-panel {
    grid-column: 1/-1;
    min-height: 172px;
    padding: 22px;
  }
  .focus-panel .name {
    font-size: 24px;
  }
  .metric {
    min-height: 142px;
    padding: 18px;
    border-top: 1px solid var(--line);
  }
  .metric:nth-of-type(2) {
    border-left: 0;
  }
  .metric:nth-of-type(4) {
    grid-column: 1/-1;
  }
  .metric strong {
    font-size: 23px;
    margin: 17px 0 4px;
  }
  .workspace {
    display: block;
    padding-top: 30px;
  }
  .section-heading h2 {
    font-size: 23px;
  }
  .tab-list {
    gap: 22px;
  }
  .tab {
    font-size: 12px;
  }
  .toolbar {
    gap: 9px;
  }
  .search {
    min-width: 0;
  }
  .select-wrap span {
    display: none;
  }
  .select-wrap select {
    min-width: 100px;
  }
  .stock-row {
    grid-template-columns: minmax(0, 1fr) minmax(92px, 0.7fr) 16px;
    gap: 8px;
    padding: 18px 11px;
  }
  .stock-row .name {
    font-size: 15px;
  }
  .stock-row .datum:nth-of-type(3) {
    display: none;
  }
  .stock-row .datum strong {
    font-size: 12px;
  }
  .mobile-date {
    display: inline;
    color: var(--accent-dark);
    font-weight: 700;
  }
  .side {
    margin-top: 34px;
    border-top: 2px solid var(--ink);
    padding-top: 24px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 19px;
  }
  .side section {
    padding: 0;
    margin: 0;
    border: 0;
  }
  .detail-body,
  .record-dialog form {
    padding: 22px;
  }
  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .broker-table {
    font-size: 11px;
  }
  .broker-table th,
  .broker-table td {
    padding: 8px 5px;
  }
}
@media (max-width: 460px) {
  .google-slot > div {
    transform: scale(0.8);
    transform-origin: right center;
    width: 150px !important;
  }
  .overview h1 {
    font-size: 27px;
  }
  .metric strong {
    font-size: 21px;
  }
  .side {
    display: block;
  }
  .side section {
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--line);
  }
  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .form-grid {
    gap: 12px;
  }
  .dialog-top h2 {
    font-size: 21px;
  }
}
.aside-icon {
  background: #a9dbe8;
}
.aside-icon.muted {
  background: #f1e1d3;
}
