@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --ink: #111;
  --ink-light: #555;
  --ink-faint: #999;
  --surface: #fff;
  --wash: #fafafa;
  --line: #eaeaea;
  --line-hard: #ddd;
  --accent: #000;
  --accent-soft: #f5f5f5;
  --red: #e5484d;
  --red-soft: #fff0f0;
  --green: #30a46c;
  --green-soft: #e9f9ee;
  --blue: #3b82f6;
  --blue-soft: #eff6ff;
  --yellow: #f5a623;
}

html { font-size: 14px; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--wash);
  -webkit-font-smoothing: antialiased;
}

/* ===================== LAYOUT ===================== */
.app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ===================== SIDEBAR ===================== */
.sidebar {
  width: 180px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  user-select: none;
}

.sidebar-brand {
  padding: 20px 16px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-mark {
  width: 26px;
  height: 26px;
  background: var(--ink);
  color: #fff;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.5px;
}

.brand-text {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.3px;
}

.sidebar-nav {
  padding: 4px 8px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--ink-light);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.1s;
}

.nav-item svg {
  flex-shrink: 0;
  opacity: 0.5;
}

.nav-item:hover {
  background: var(--wash);
  color: var(--ink);
}

.nav-item:hover svg { opacity: 0.8; }

.nav-item.active {
  background: var(--accent-soft);
  color: var(--ink);
}

.nav-item.active svg { opacity: 1; }

.sidebar-footer {
  margin-top: auto;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.sidebar-nav {
  flex: 1;
}

.sidebar-version {
  padding: 0 16px 8px;
}

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.sidebar-credit {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink-faint);
  transition: color 0.15s;
}

.sidebar-credit:hover {
  color: var(--ink);
}

.credit-icon {
  flex-shrink: 0;
}

.credit-text-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.credit-name {
  font-family: 'NoonnuBasicGothic', sans-serif;
  font-size: 13px;
  color: var(--ink-light);
  -webkit-text-stroke: 0.3px currentColor;
}

.sidebar-credit:hover .credit-name {
  color: var(--ink);
}

.credit-to {
  color: var(--ink-faint);
}

.credit-sub {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.version {
  font-size: 11px;
  color: var(--ink-faint);
}

/* ===================== MAIN ===================== */
.main {
  flex: 1;
  overflow-y: auto;
  padding: 28px 36px 60px;
  min-width: 0;
}

.page-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}

.page-desc {
  font-size: 13px;
  color: var(--ink-faint);
  margin-bottom: 28px;
}

/* ===================== SECTIONS ===================== */
.section {
  margin-bottom: 24px;
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ink-faint);
  margin-bottom: 10px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 16px;
}

/* ===================== FORMS ===================== */
.field {
  margin-bottom: 14px;
}

.field:last-child { margin-bottom: 0; }

.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-light);
  margin-bottom: 5px;
}

.input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  background: var(--surface);
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s;
}

.input:focus {
  border-color: var(--ink);
}

.input::placeholder { color: var(--ink-faint); }

select.input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23999' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
  cursor: pointer;
}

.input-lg {
  font-size: 15px;
  font-weight: 500;
  padding: 10px 12px;
}

.row {
  display: flex;
  gap: 10px;
}

.row > .field { flex: 1; }

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  background: var(--surface);
  color: var(--ink);
  transition: all 0.1s;
  white-space: nowrap;
}

.btn:hover {
  background: var(--wash);
  border-color: var(--line-hard);
}

.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; pointer-events: none; }

.btn.dark {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.btn.dark:hover { background: #333; }

.btn.danger {
  color: var(--red);
  border-color: transparent;
  background: var(--red-soft);
}

.btn.danger:hover { background: #ffe0e0; }

.btn.ghost {
  border-color: transparent;
  background: transparent;
}

.btn.ghost:hover { background: var(--wash); }

.btn.sm { padding: 4px 10px; font-size: 12px; }

.btn-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.icon-btn {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: none;
  background: none;
  border-radius: 6px;
  cursor: pointer;
  color: var(--ink-faint);
  font-size: 18px;
}

.icon-btn:hover { background: var(--wash); color: var(--ink); }

/* ===================== TABLE ===================== */
.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: auto;
}

th, td {
  white-space: nowrap;
}

th {
  text-align: left;
  padding: 6px 10px;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--line);
}

td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  min-width: 80px;
}

tbody tr:last-child td { border-bottom: none; }

tbody tr:hover { background: var(--wash); }

/* ===================== EDITOR ===================== */
.editor-bar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  background: var(--wash);
}

.editor-bar button {
  padding: 4px 8px;
  border: none;
  border-radius: 4px;
  background: none;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  color: var(--ink-light);
  line-height: 1;
}

.editor-bar button:hover { background: var(--line); color: var(--ink); }

.editor-bar .divider {
  width: 1px;
  height: 16px;
  background: var(--line);
  margin: 0 4px;
}

.editor-bar select {
  padding: 3px 6px;
  border: none;
  background: none;
  font-size: 12px;
  font-family: inherit;
  color: var(--ink-light);
  cursor: pointer;
  outline: none;
}

.editor-body {
  min-height: 220px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  outline: none;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
}

.editor-body:focus { border-color: var(--ink); }

.editor-body:empty::before {
  content: attr(data-placeholder);
  color: var(--ink-faint);
  pointer-events: none;
}

/* ===================== RECIPIENTS ===================== */
.recipient-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.recipient-bar .count {
  margin-left: auto;
  font-size: 12px;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

.inline-add {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  align-items: center;
}

.inline-add .input {
  font-size: 12px;
  padding: 6px 8px;
}

.add-row td {
  border-bottom: none;
  padding-top: 6px;
  padding-bottom: 6px;
}

.inline-input {
  width: 100%;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 12px;
  font-family: inherit;
  outline: none;
  background: var(--wash);
  color: var(--ink);
}

.inline-input:focus {
  border-color: var(--ink);
  background: var(--surface);
}

.inline-input::placeholder {
  color: var(--ink-faint);
}

.th-field {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1;
}

.field-del {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border: none;
  background: none;
  color: var(--ink-faint);
  cursor: pointer;
  padding: 0;
  border-radius: 3px;
  flex-shrink: 0;
  position: relative;
  top: 0px;
}

.field-del svg {
  display: block;
  width: 8px;
  height: 8px;
}

.field-del:hover {
  color: var(--red);
  background: var(--red-soft);
}

/* ===================== FILE UPLOAD ===================== */
.drop-area {
  border: 1.5px dashed var(--line-hard);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  color: var(--ink-faint);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

.drop-area:hover,
.drop-area.over {
  border-color: var(--ink);
  color: var(--ink-light);
  background: var(--accent-soft);
}

.attached-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  background: var(--wash);
  border-radius: 6px;
  margin-top: 6px;
  font-size: 12px;
}

.attached-file .meta { color: var(--ink-faint); margin-left: 6px; }

.upload-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-light);
  background: var(--wash);
  border-radius: 6px;
  animation: upload-pulse 1.2s ease-in-out infinite;
}
.upload-status::before {
  content: '';
  width: 14px;
  height: 14px;
  border: 2px solid var(--ink-faint);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: upload-spin 0.6s linear infinite;
}
@keyframes upload-spin { to { transform: rotate(360deg); } }
@keyframes upload-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.7; } }

/* ===================== MODAL ===================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.25);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: var(--surface);
  border-radius: 12px;
  width: 500px;
  max-height: 75vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 48px rgba(0,0,0,0.12);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.modal-header h3 {
  font-size: 15px;
  font-weight: 600;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-actions {
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

/* ===================== PROGRESS ===================== */
.progress-track {
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--ink);
  transition: width 0.3s ease;
  border-radius: 2px;
}

.progress-label {
  text-align: center;
  font-size: 12px;
  color: var(--ink-faint);
  margin-bottom: 14px;
  font-variant-numeric: tabular-nums;
}

.result-list {
  max-height: 260px;
  overflow-y: auto;
}

.result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 12px;
  border-bottom: 1px solid var(--line);
}

.result-row:last-child { border-bottom: none; }

.tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.tag.ok { background: var(--green-soft); color: var(--green); }
.tag.fail { background: var(--red-soft); color: var(--red); }
.tag.wait { background: var(--blue-soft); color: var(--blue); }
.tag.idle { background: var(--accent-soft); color: var(--ink-faint); }

/* ===================== PROVIDER / TEMPLATE CARDS ===================== */
.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.account-row:last-child { border-bottom: none; }

.account-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.account-name { font-weight: 600; font-size: 13px; }
.account-email { font-size: 12px; color: var(--ink-faint); }

.account-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.type-label {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--ink-light);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.type-label.naver { background: #e8f5e9; color: #2e7d32; }
.type-label.gmail { background: var(--red-soft); color: var(--red); }
.type-label.custom { background: var(--blue-soft); color: var(--blue); }

.tmpl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.tmpl-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  transition: border-color 0.15s;
  cursor: default;
  display: flex;
  flex-direction: column;
}

.tmpl-card:hover { border-color: var(--line-hard); }

.tmpl-card h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.tmpl-card .subject { font-size: 12px; color: var(--ink-light); margin-bottom: 10px; }
.tmpl-card .date { font-size: 11px; color: var(--ink-faint); margin-bottom: 10px; }
.tmpl-card .btn-row { margin-top: auto; padding-top: 4px; }

/* ===================== SEND BAR ===================== */
.send-bar {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.send-btn {
  padding: 10px 28px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.toggle-advanced {
  font-size: 11px !important;
  color: var(--ink-faint) !important;
}

.advanced-options {
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--wash);
  border-radius: 6px;
}

.delay-control {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-faint);
}

.delay-control input[type="range"] {
  width: 100px;
  accent-color: var(--ink);
}

.delay-hint {
  font-size: 11px;
  color: var(--ink-faint);
  margin-top: 6px;
}

/* ===================== PROVIDER SELECT ===================== */
.provider-select {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  min-width: 180px;
  appearance: none;
  background: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23999' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
  cursor: pointer;
}

.provider-select:focus { border-color: var(--ink); }

/* ===================== HELP TEXT ===================== */
.hint {
  font-size: 12px;
  color: var(--ink-faint);
  margin-top: -6px;
  margin-bottom: 14px;
  line-height: 1.5;
}

/* ===================== EMPTY ===================== */
.empty {
  text-align: center;
  padding: 36px 20px;
  color: var(--ink-faint);
  font-size: 13px;
  line-height: 1.6;
}

/* ===================== TOAST ===================== */
.toast-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.toast {
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  animation: toastIn 0.25s ease;
}

.toast.success { background: var(--green); }
.toast.error { background: var(--red); }
.toast.info { background: var(--ink); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(8px); }
}

.toast.toast-out {
  animation: toastOut 0.2s ease forwards;
}

/* confirm / prompt / select toast */
.confirm-toast,
.prompt-toast,
.select-toast {
  background: var(--surface) !important;
  color: var(--ink) !important;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 18px !important;
  min-width: 260px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.confirm-msg {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}

.confirm-btns {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.confirm-yes {
  padding: 5px 14px;
  border: none;
  border-radius: 5px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.confirm-yes:hover { background: #333; }

.confirm-no {
  padding: 5px 14px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink-light);
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
}

.confirm-no:hover { background: var(--wash); }

.prompt-input {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
}

.prompt-input:focus { border-color: var(--ink); }

.select-options {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.select-opt {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--wash);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  color: var(--ink);
}

.select-opt:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* ===================== SENT PAGE ===================== */
.sent-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sent-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: border-color 0.15s;
}

.sent-row:hover { border-color: var(--line-hard); }

.sent-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sent-subject {
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sent-meta {
  font-size: 11px;
  color: var(--ink-faint);
}

.sent-stats {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.sent-total {
  font-size: 12px;
  color: var(--ink-faint);
}

.sent-body-preview {
  font-size: 13px;
  line-height: 1.7;
  max-height: 300px;
  overflow-y: auto;
}

/* ===================== TRASH PAGE ===================== */
.trash-list {
  display: flex;
  flex-direction: column;
}

.trash-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 6px;
}

.trash-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.trash-name {
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trash-date {
  font-size: 11px;
  color: var(--ink-faint);
  flex-shrink: 0;
}

.trash-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* ===================== HELP PAGE ===================== */

/* Tabs */
.help-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.help-tab {
  padding: 8px 16px;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  color: var(--ink-faint);
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s;
}

.help-tab:hover { color: var(--ink-light); }
.help-tab.active { color: var(--ink); border-bottom-color: var(--ink); }

/* Panels */
.help-panel { display: none; }
.help-panel.active { display: block; }

.help-panel a { color: var(--ink); font-weight: 600; }
.help-panel p { font-size: 13px; line-height: 1.7; color: var(--ink-light); }
.help-panel code { background: var(--accent-soft); padding: 1px 6px; border-radius: 4px; font-size: 12px; }

/* Hero */
.help-hero {
  margin-bottom: 20px;
}

.help-hero h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

/* Flow (시작하기) */
.help-flow {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.flow-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.flow-num {
  width: 28px;
  height: 28px;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.flow-body h3 { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.flow-body p { font-size: 12px; color: var(--ink-light); line-height: 1.5; margin: 0; }

.flow-arrow {
  width: 2px;
  height: 12px;
  background: var(--line-hard);
  margin-left: 29px;
}

/* Compare (변수) */
.help-compare {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin-bottom: 16px;
}

.compare-col { flex: 1; }

.compare-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--ink-faint);
  margin-bottom: 6px;
}

.compare-box {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-light);
  font-family: 'Consolas', monospace;
  height: 100%;
}

.compare-box.result {
  background: var(--green-soft);
  color: var(--green);
  border-color: transparent;
}

.compare-arrow {
  display: flex;
  align-items: center;
  font-size: 18px;
  color: var(--ink-faint);
  flex-shrink: 0;
}

/* Tip */
.help-tip {
  padding: 12px 14px;
  background: var(--accent-soft);
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-light);
}

.help-tip strong {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ink);
  margin-bottom: 4px;
}

/* Table wrap */
.help-table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}

.help-table-wrap table { margin: 0; }
.help-table-wrap th { background: var(--wash); }

/* Mini cards row */
.help-cards-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.help-mini-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.help-mini-card strong {
  font-size: 13px;
  display: block;
  margin-bottom: 4px;
}

.help-mini-card p {
  font-size: 12px;
  color: var(--ink-faint);
  line-height: 1.5;
  margin: 0;
}

/* Two col (템플릿) */
.help-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.help-col-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.help-col-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}

.help-col-card ol {
  padding-left: 18px;
  font-size: 12px;
  color: var(--ink-light);
  line-height: 1.9;
}

.help-col-card li b, .help-col-card li strong { display: inline; font-weight: 600; }

/* Account cards */
.help-account-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.help-account-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.help-account-card .type-label {
  margin-bottom: 10px;
}

.help-account-card ol {
  padding-left: 16px;
  font-size: 12px;
  color: var(--ink-light);
  line-height: 1.9;
}

.help-account-card li b { display: inline; font-weight: 600; }

/* FAQ */
.help-faq {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.help-faq details {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.help-faq summary {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.help-faq summary::after {
  content: '+';
  font-size: 16px;
  color: var(--ink-faint);
  font-weight: 300;
  flex-shrink: 0;
}

.help-faq details[open] summary::after { content: '−'; }
.help-faq summary::-webkit-details-marker { display: none; }

.help-faq summary:hover { background: var(--wash); }

.help-faq details[open] summary {
  border-bottom: 1px solid var(--line);
}

.help-faq details p {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--ink-light);
  line-height: 1.7;
}

/* ===================== MEMO ===================== */
.memo-resizer {
  width: 4px;
  cursor: col-resize;
  background: transparent;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

.memo-resizer:hover,
.memo-resizer.dragging {
  background: var(--line-hard);
}

.memo-resizer.hidden { display: none; }

.memo-panel {
  width: 280px;
  background: var(--surface);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.memo-panel.hidden {
  display: none;
}

.memo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.memo-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.memo-tabs {
  display: flex;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.memo-tab {
  padding: 6px 12px;
  font-size: 11px;
  font-family: inherit;
  border: none;
  background: none;
  color: var(--ink-faint);
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.memo-tab:hover { color: var(--ink-light); }
.memo-tab.active { color: var(--ink); border-bottom-color: var(--ink); }

.memo-title-input {
  padding: 10px 14px;
  border: none;
  border-bottom: 1px solid var(--line);
  outline: none;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface);
}

.memo-title-input::placeholder { color: var(--ink-faint); font-weight: 400; }

.memo-body {
  flex: 1;
  padding: 12px 14px;
  border: none;
  outline: none;
  resize: none;
  font-size: 13px;
  font-family: inherit;
  line-height: 1.7;
  color: var(--ink);
  background: var(--surface);
}

.memo-body::placeholder {
  color: var(--ink-faint);
}

.memo-fab {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-light);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all 0.15s;
  z-index: 100;
}

.memo-fab:hover {
  background: var(--wash);
  color: var(--ink);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* ===================== SCROLLBAR ===================== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-hard); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-faint); }

/* ===================== LOGIN ===================== */
.login-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  width: 100%;
}

.login-card {
  width: 360px;
  padding: 40px 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.login-desc {
  color: var(--ink-faint);
  margin-bottom: 24px;
  font-size: 13px;
}

.login-error {
  color: var(--red);
  font-size: 12px;
  margin-top: 12px;
  text-align: center;
}

.btn.full { width: 100%; }

.login-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.login-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 10px 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-faint);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
}
.login-tab.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.login-success {
  color: var(--green);
  font-size: 12px;
  margin-top: 12px;
  text-align: center;
}

/* ===================== ADMIN ===================== */
.admin-list { display: flex; flex-direction: column; gap: 1px; }
.admin-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 6px;
}
.admin-info { display: flex; flex-direction: column; gap: 4px; }
.admin-email { font-weight: 500; font-size: 14px; }
.admin-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.admin-date { color: var(--ink-faint); }
.admin-actions { display: flex; gap: 6px; }
.tag.accent { background: var(--accent); color: white; }

/* 로그아웃 */
.sidebar-logout {
  padding: 0 12px;
  margin-bottom: 4px;
}
.sidebar-logout .nav-item {
  color: var(--ink-faint);
  font-size: 12px;
  transition: color 0.15s;
}
.sidebar-logout .nav-item:hover {
  color: var(--red);
}

/* 개인정보처리방침 */
.login-privacy {
  text-align: center;
  margin-top: 16px;
  font-size: 12px;
}
.login-privacy a {
  color: var(--ink-faint);
  text-decoration: underline;
}
.login-privacy a:hover {
  color: var(--ink);
}

.privacy-content {
  line-height: 1.8;
  font-size: 13px;
}
.privacy-content h3 {
  margin-top: 24px;
  margin-bottom: 8px;
  font-size: 14px;
}
.privacy-content ul {
  padding-left: 20px;
  margin: 8px 0;
}
.privacy-content li {
  margin-bottom: 4px;
}
.privacy-date {
  margin-top: 24px;
  color: var(--ink-faint);
  font-size: 12px;
}
