@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/variable/pretendardvariable.css");@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap");

:root {
  --font-mono: "JetBrains Mono", "D2Coding", Consolas, monospace;
  --shadow: 0 1px 2px #0A1A330A, 0 8px 22px #0A1A3309;
  color: #0A1A33;
  background: #F2F1EC;
  font-family:
    "Pretendard Variable", "Pretendard", "Malgun Gothic", -apple-system,
    BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 16px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
  line-height: 1.75;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  max-width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: #0E2750;
  color: #FFFFFF;
  padding: 0 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  white-space: normal;
  line-height: 1.25;
  text-align: center;
}
button:hover:not(:disabled) {
  background: #061328;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
button.primary {
  background: #0E2750;
  color: #FFFFFF;
}
button.primary:hover:not(:disabled) {
  background: #061328;
}
button.secondary {
  border: 1px solid #0E275033;
  background: #FFFFFF;
  color: #0A1A33;
}
button.secondary:hover:not(:disabled) {
  background: #FBFAF6;
}
button.danger {
  border: 1px solid #FDA29B;
  background: #FFFFFF;
  color: #B42318;
}
button.danger:hover:not(:disabled) {
  background: #FEE4E2;
}
.page {
  width: calc(100% - 32px);
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px 0 36px;
}
.app-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  margin-bottom: 12px;
  padding: 20px 22px;
  border: 1px solid #0E2750;
  border-radius: 8px;
  background: #0E2750;
  color: #F2F1EC;
  box-shadow: var(--shadow);
}
.app-header h1 {
  color: #F2F1EC;
}
.app-header .header-desc {
  margin: 4px 0 0;
  color: #F2F1EC;
  opacity: 0.85;
}
.app-header button {
  border: 1px solid #0E275033;
  background: #FFFFFF;
  color: #0A1A33;
}
.app-header button:hover:not(:disabled) {
  background: #FBFAF6;
  color: #0A1A33;
}
.app-header .badge.ok {
  background: #FBFAF61F;
  color: #F2F1EC;
}
.app-header .badge.warn {
  background: #FBFAF61F;
  color: #C9A86A;
}
.eyebrow {
  margin: 0 0 6px;
  color: #C9A86A;
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  margin-bottom: 0;
  font-size: 48px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0;
}
h2 {
  margin-bottom: 8px;
  font-size: 32px;
  font-weight: 600;
  line-height: 1.3;
}
h3 {
  margin-bottom: 8px;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
}
.header-actions,
.button-row,
.gmail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.badge,
.mini-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.25;
}
.badge.ok {
  background: #0E275014;
  color: #0E2750;
}
.badge.warn {
  background: #C9A86A33;
  color: #A8853F;
}
.mini-badge {
  margin-bottom: 8px;
  background: #0E275014;
  color: #0E2750;
}
.backend-notice,
.notice {
  display: grid;
  gap: 4px;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  line-height: 1.45;
}
.backend-notice {
  border: 1px solid #C9A86A;
  background: #C9A86A33;
}
.backend-notice small {
  color: #A8853F;
}
.notice {
  border: 1px solid #0E275021;
  background: #FBFAF6;
  color: #0A1A33;
}
.notice.success {
  border-color: #0E275033;
  background: #0E275014;
  color: #0E2750;
}
.notice.error {
  border-color: #FEE4E2;
  background: #FEE4E2;
  color: #B42318;
}
.settings-panel,
.status-monitor {
  margin-top: 16px;
  box-shadow: var(--shadow);
}
.settings-panel {
  padding: 16px;
  border: 1px solid #0E275033;
  border-radius: 8px;
  background: #FBFAF6;
  box-shadow: var(--shadow);
}
.settings-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  margin-bottom: 14px;
}
.settings-head p {
  margin-bottom: 0;
  color: #6E7A8F;
  line-height: 1.45;
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.settings-group {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #0E275021;
  border-radius: 8px;
  background: #FBFAF6;
}
.advanced-settings {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}
.status-monitor {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.monitor-item {
  min-height: 98px;
  padding: 12px;
  border: 1px solid #0E275033;
  border-radius: 8px;
  background: #FBFAF6;
}
.monitor-item.ok {
  border-color: #0E275033;
  background: #0E275014;
}
.monitor-item.warn {
  border-color: #C9A86A;
  background: #C9A86A33;
}
.monitor-item.focus {
  border-color: #0E275047;
  background: #0E275014;
}
.monitor-item.neutral {
  background: #FBFAF6;
}
.monitor-item span,
.monitor-item small {
  display: block;
}
.monitor-item span {
  color: #6E7A8F;
  font-size: 0.82rem;
  font-weight: 850;
}
.monitor-item strong {
  display: block;
  margin: 6px 0;
  font-size: 1.12rem;
}
.monitor-item small {
  color: #6E7A8F;
  line-height: 1.4;
}
.workflow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}
.workflow-card,
.work-panel,
.flow-step {
  border: 1px solid #0E275033;
  border-radius: 8px;
  background: #FBFAF6;
  box-shadow: var(--shadow);
}
.workflow-card {
  display: grid;
  gap: 10px;
  min-height: 205px;
  padding: 14px;
}
.workflow-card.next {
  border-color: #0E2750;
  box-shadow: 0 0 0 2px #0E27501A;
}
.workflow-card p {
  min-height: 42px;
  margin-bottom: 0;
  color: #6E7A8F;
  line-height: 1.45;
}
.workflow-card strong {
  min-height: 22px;
  color: #0E2750;
  font-size: 0.9rem;
}
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0E2750;
  color: #FBFAF6;
  font-size: 0.86rem;
  font-weight: 850;
}
.layout {
  display: block;
}
.work-panel {
  padding: 18px;
}
.field {
  display: grid;
  gap: 6px;
}
.field span {
  color: #6E7A8F;
  font-size: 0.86rem;
  font-weight: 800;
}
input,
select,
textarea {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border: 1px solid #0E275033;
  border-radius: 6px;
  background: #FFFFFF;
  color: #0A1A33;
}
input {
  min-height: 38px;
  padding: 0 10px;
}
select {
  min-height: 38px;
  padding: 0 34px 0 10px;
}
textarea {
  padding: 10px;
  line-height: 1.5;
  resize: vertical;
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}
.tab {
  flex: 0 1 auto;
  min-height: 40px;
  border: 1px solid transparent;
  background: transparent;
  padding: 8px 14px;
  color: #6E7A8F;
  font-size: 16px;
  font-weight: 700;
}
.tab:hover:not(:disabled) {
  background: #FBFAF6;
  color: #0A1A33;
}
.tab.active {
  border-color: #0E275033;
  background: #C9A86A33;
  color: #0E2750;
}
.tab.active:hover:not(:disabled) {
  background: #C9A86A33;
  color: #0E2750;
}
.tab-panel {
  padding-top: 18px;
}
.panel-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}
.panel-title p {
  margin-bottom: 0;
  color: #6E7A8F;
  line-height: 1.45;
}
.summary-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.inline-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid #0E275033;
  border-radius: 8px;
  background: #0E275014;
  color: #0E2750;
}
.inline-status span {
  color: #0E2750;
}
.contact-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid #0E275033;
  border-radius: 8px;
  background: #FBFAF6;
}
.contact-actions strong,
.contact-actions span {
  display: block;
}
.contact-actions span {
  margin-top: 4px;
  color: #6E7A8F;
  font-size: 0.9rem;
}
.import-review {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid #0E275033;
  border-radius: 8px;
  background: #FBFAF6;
}
.import-review-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}
.import-review h3 {
  margin-bottom: 4px;
  font-size: 1.08rem;
}
.import-review p {
  margin-bottom: 0;
  color: #6E7A8F;
  line-height: 1.45;
}
.import-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.import-stats div {
  min-height: 70px;
  padding: 10px 12px;
  border: 1px solid #0E275033;
  border-radius: 8px;
  background: #FBFAF6;
}
.import-stats span,
.import-stats strong,
.import-field small {
  display: block;
}
.import-stats span {
  margin-bottom: 4px;
  color: #6E7A8F;
  font-size: 0.84rem;
  font-weight: 800;
}
.import-stats strong {
  color: #0A1A33;
  font-size: 1.25rem;
}
.mapping-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.import-field small {
  min-height: 20px;
  color: #6E7A8F;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}
.import-help {
  padding: 10px 12px;
  border: 1px solid #0E275033;
  border-radius: 8px;
  background: #FBFAF6;
}
.import-preview table {
  min-width: 680px;
}
.summary-item {
  min-height: 78px;
  padding: 12px;
  border: 1px solid #0E275033;
  border-radius: 8px;
  background: #FBFAF6;
}
.summary-item span {
  display: block;
  margin-bottom: 6px;
  color: #6E7A8F;
  font-size: 0.86rem;
  font-weight: 800;
}
.summary-item strong {
  font-size: 1.55rem;
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid #0E275033;
  border-radius: 8px;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}
th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid #0E275014;
  text-align: left;
  vertical-align: top;
}
th {
  background: #F2F1EC;
  color: #6E7A8F;
  font-size: 0.84rem;
  font-weight: 850;
}
td {
  color: #0A1A33;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}
.select-col {
  width: 48px;
  text-align: center;
}
.select-col input {
  width: 18px;
  min-height: 18px;
  accent-color: #0E2750;
}
.selected-row td {
  background: #0E275014;
}
tbody tr:last-child td {
  border-bottom: 0;
}
.empty,
.table-note {
  margin: 0;
  padding: 16px;
  border: 1px dashed #0E275033;
  border-radius: 8px;
  color: #6E7A8F;
  line-height: 1.5;
}
.table-note {
  border: 0;
}
.flow-list {
  display: grid;
  gap: 14px;
}
.flow-help {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid #0E275033;
  border-radius: 8px;
  background: #FBFAF6;
  color: #6E7A8F;
  line-height: 1.45;
}
.flow-help strong {
  color: #0A1A33;
}
.flow-step {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #0E275033;
  border-radius: 8px;
  background: #FBFAF6;
}
.flow-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}
.flow-head p {
  margin-bottom: 0;
  color: #6E7A8F;
  line-height: 1.45;
}
.flow-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.schedule-grid {
  grid-template-columns: minmax(180px, 260px) minmax(180px, 1fr);
}
.file-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #0E275033;
  border-radius: 6px;
  background: #FBFAF6;
  font-weight: 750;
  cursor: pointer;
}
.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.gmail-actions {
  margin-bottom: 16px;
}
.checklist {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.checklist div {
  min-height: 96px;
  padding: 12px;
  border: 1px solid #C9A86A;
  border-radius: 8px;
  background: #C9A86A33;
}
.checklist div.done {
  border-color: #0E275033;
  background: #0E275014;
}
.checklist strong,
.checklist span {
  display: block;
}
.checklist strong {
  margin-bottom: 6px;
}
.checklist span {
  color: #6E7A8F;
  font-size: 0.9rem;
  line-height: 1.45;
}
@media (max-width: 1120px) {
  .status-monitor {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .workflow {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .page {
    width: min(100% - 24px, 1360px);
    padding-top: 18px;
  }

  .app-header,
  .panel-title,
  .settings-head,
  .import-review-head,
  .flow-head,
  .contact-actions {
    grid-template-columns: 1fr;
  }

  .workflow,
  .status-monitor,
  .summary-row,
  .import-stats,
  .mapping-grid,
  .checklist,
  .flow-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 1.75rem;
  }
}
