.we-v2-secure-workbench {
  grid-template-columns: minmax(330px, .88fr) minmax(0, 1.12fr);
}

.we-v2-secure-workbench .we-v2-workbench__input,
.we-v2-secure-workbench .we-v2-result {
  min-width: 0;
  min-height: 560px;
}

.we-v2-secure-editor {
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--we-v2-line-strong);
  border-radius: var(--we-v2-radius-md);
  background: var(--we-v2-surface);
}

.we-v2-secure-editor:focus-within {
  border-color: var(--we-v2-primary);
  box-shadow: 0 0 0 3px var(--we-v2-primary-ring);
}

.we-v2-secure-editor > label {
  min-height: 42px;
  padding: 10px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--we-v2-line);
  color: var(--we-v2-text-soft);
  font-size: 12px;
  font-weight: 700;
}

.we-v2-secure-editor > label span {
  color: var(--we-v2-muted);
  font-size: 10px;
  font-weight: 600;
}

.we-v2-secure-editor textarea,
.we-v2-secure-editor input {
  width: 100%;
  min-height: 54px;
  padding: 13px;
  resize: vertical;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--we-v2-text);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  line-height: 1.65;
}

.we-v2-secure-editor textarea {
  min-height: 160px;
}

.we-v2-secure-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}

.we-v2-secure-actions button {
  min-height: 42px;
  padding-inline: 13px;
  border: 1px solid var(--we-v2-line);
  border-radius: var(--we-v2-radius-sm);
  background: var(--we-v2-surface);
  color: var(--we-v2-text-soft);
  font-size: 12px;
  font-weight: 700;
}

.we-v2-secure-actions .is-primary {
  border-color: var(--we-v2-primary);
  background: var(--we-v2-primary);
  color: #fff;
}

.we-v2-secure-actions button:disabled,
.we-v2-result__top button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.we-v2-secure-status {
  min-height: 44px;
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: var(--we-v2-radius-sm);
  background: var(--we-v2-surface);
  color: var(--we-v2-muted);
  font-size: 12px;
}

.we-v2-secure-status[data-tone="success"] {
  background: var(--we-v2-success-soft);
  color: var(--we-v2-success);
}

.we-v2-secure-status[data-tone="warning"] {
  background: var(--we-v2-warning-soft);
  color: var(--we-v2-warning);
}

.we-v2-secure-status[data-tone="danger"] {
  background: var(--we-v2-danger-soft);
  color: var(--we-v2-danger);
}

.we-v2-secure-privacy {
  margin-top: 18px;
}

.we-v2-jwt-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.we-v2-jwt-panels .we-v2-secure-editor {
  min-width: 0;
}

.we-v2-jwt-panels textarea {
  min-height: 230px;
}

.we-v2-secure-data {
  margin-top: 10px;
  padding: 0 14px;
  border: 1px solid var(--we-v2-line);
  border-radius: var(--we-v2-radius-sm);
  background: var(--we-v2-surface);
}

.we-v2-secure-data > div {
  padding: 10px 0;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  border-top: 1px solid var(--we-v2-line);
}

.we-v2-secure-data > div:first-child { border-top: 0; }
.we-v2-secure-data dt { color: var(--we-v2-muted); font-size: 11px; }
.we-v2-secure-data dd { margin: 0; overflow-wrap: anywhere; color: var(--we-v2-text-soft); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; text-align: right; }

.we-v2-password-kinds {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.we-v2-password-kinds label {
  min-height: 50px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--we-v2-line);
  border-radius: var(--we-v2-radius-sm);
  background: var(--we-v2-surface-soft);
  color: var(--we-v2-text-soft);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.we-v2-password-kinds input { width: 17px; height: 17px; accent-color: var(--we-v2-primary); }

.we-v2-password-range {
  margin-top: 20px;
  padding: 14px;
  border: 1px solid var(--we-v2-line);
  border-radius: var(--we-v2-radius-sm);
  background: var(--we-v2-surface-soft);
}

.we-v2-password-range label { display: flex; justify-content: space-between; gap: 12px; color: var(--we-v2-text-soft); font-size: 12px; font-weight: 700; }
.we-v2-password-range input { width: 100%; margin-top: 10px; accent-color: var(--we-v2-primary); }

.we-v2-secure-presets { margin-top: 10px; }

.we-v2-password-output {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid var(--we-v2-primary-line);
  border-radius: var(--we-v2-radius-md);
  background: var(--we-v2-surface-blue);
}

.we-v2-password-output label { display: block; color: var(--we-v2-muted); font-size: 11px; font-weight: 700; }
.we-v2-password-output textarea { width: 100%; min-height: 130px; margin-top: 10px; padding: 14px; resize: vertical; border: 1px solid var(--we-v2-primary-line); border-radius: var(--we-v2-radius-sm); background: var(--we-v2-surface); color: var(--we-v2-primary); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 20px; font-weight: 800; line-height: 1.5; overflow-wrap: anywhere; }

.we-v2-strength-score {
  margin-top: 24px;
  padding: 22px;
  border: 1px solid var(--we-v2-line);
  border-radius: var(--we-v2-radius-md);
  background: var(--we-v2-surface);
  text-align: center;
}

.we-v2-strength-score strong { color: var(--we-v2-primary); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 54px; line-height: 1; }
.we-v2-strength-score span { display: block; margin-top: 5px; color: var(--we-v2-text-soft); font-weight: 800; }
.we-v2-strength-track { height: 10px; margin-top: 16px; overflow: hidden; border-radius: 999px; background: var(--we-v2-line); }
.we-v2-strength-track span { display: block; width: 0; height: 100%; margin: 0; background: var(--we-v2-danger); transition: width 160ms ease-out; }
.we-v2-strength-track span[data-level="양호"] { background: var(--we-v2-primary); }
.we-v2-strength-track span[data-level="강함"] { background: var(--we-v2-success); }

.we-v2-strength-tips { margin: 12px 0 0; padding: 14px 14px 14px 32px; border-radius: var(--we-v2-radius-sm); background: var(--we-v2-surface); color: var(--we-v2-text-soft); font-size: 12px; }
.we-v2-strength-tips li + li { margin-top: 5px; }

.we-v2-bcrypt-fields { margin-top: 20px; display: grid; gap: 14px; }
.we-v2-bcrypt-fields .we-v2-secure-editor { margin-top: 0; }

.we-v2-telegram-workbench,
.we-v2-notepad-workbench {
  grid-template-columns: minmax(330px, .78fr) minmax(0, 1.22fr);
}

.we-v2-storage-consent {
  margin-top: 12px;
  padding: 12px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  border: 1px solid var(--we-v2-warning-line);
  border-radius: var(--we-v2-radius-sm);
  background: var(--we-v2-warning-soft);
  color: var(--we-v2-warning);
  cursor: pointer;
}

.we-v2-storage-consent input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--we-v2-warning);
}

.we-v2-storage-consent span { display: grid; }
.we-v2-storage-consent b { font-size: 12px; }
.we-v2-storage-consent small { margin-top: 2px; font-size: 10px; line-height: 1.5; }

.we-v2-telegram-panel {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--we-v2-line);
  border-radius: var(--we-v2-radius-md);
  background: var(--we-v2-surface);
}

.we-v2-telegram-panel > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.we-v2-telegram-panel h3 { margin: 0; font-size: 15px; }
.we-v2-telegram-panel header p { margin: 2px 0 0; color: var(--we-v2-muted); font-size: 11px; }
.we-v2-telegram-panel .we-v2-secure-editor { margin-top: 10px; }
.we-v2-telegram-panel textarea { min-height: 100px; }

.we-v2-telegram-chats {
  margin-top: 10px;
  display: grid;
  gap: 7px;
}

.we-v2-telegram-chats article {
  padding: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--we-v2-line);
  border-radius: var(--we-v2-radius-sm);
  background: var(--we-v2-surface-soft);
}

.we-v2-telegram-chats article > div { min-width: 0; display: grid; }
.we-v2-telegram-chats b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.we-v2-telegram-chats span { color: var(--we-v2-muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; }
.we-v2-telegram-chats article > div:last-child { display: flex; grid-auto-flow: column; gap: 5px; }
.we-v2-telegram-chats button { min-height: 34px; padding-inline: 8px; border: 1px solid var(--we-v2-line); border-radius: 6px; background: var(--we-v2-surface); color: var(--we-v2-primary); font-size: 10px; font-weight: 700; }

.we-v2-telegram-raw { margin-top: 10px; }
.we-v2-telegram-raw summary { cursor: pointer; color: var(--we-v2-text-soft); font-size: 12px; font-weight: 700; }
.we-v2-telegram-raw textarea { width: 100%; min-height: 180px; margin-top: 8px; padding: 12px; resize: vertical; border: 1px solid var(--we-v2-line); border-radius: var(--we-v2-radius-sm); background: #fbfcfe; color: var(--we-v2-text-soft); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; }

.we-v2-notepad-sidebar {
  min-width: 0;
}

.we-v2-notepad-toolbar {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 7px;
}

.we-v2-notepad-toolbar input {
  min-width: 0;
  height: 42px;
  padding-inline: 11px;
  border: 1px solid var(--we-v2-line-strong);
  border-radius: var(--we-v2-radius-sm);
}

.we-v2-notepad-toolbar button {
  min-height: 42px;
  padding-inline: 10px;
  border: 1px solid var(--we-v2-line);
  border-radius: var(--we-v2-radius-sm);
  background: var(--we-v2-surface);
  color: var(--we-v2-text-soft);
  font-size: 11px;
  font-weight: 700;
}

.we-v2-notepad-list {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}

.we-v2-notepad-list > button {
  min-width: 0;
  padding: 11px;
  display: grid;
  gap: 2px;
  border: 1px solid var(--we-v2-line);
  border-radius: var(--we-v2-radius-sm);
  background: var(--we-v2-surface);
  color: var(--we-v2-text-soft);
  text-align: left;
}

.we-v2-notepad-list > button[aria-pressed="true"] { border-color: var(--we-v2-primary); background: var(--we-v2-primary-soft); }
.we-v2-notepad-list b,
.we-v2-notepad-list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.we-v2-notepad-list b { font-size: 12px; }
.we-v2-notepad-list span { color: var(--we-v2-muted); font-size: 10px; }
.we-v2-notepad-list small { color: var(--we-v2-faint); font-size: 9px; }

.we-v2-notepad-title {
  width: 100%;
  height: 48px;
  margin-top: 16px;
  padding-inline: 12px;
  border: 1px solid var(--we-v2-line-strong);
  border-radius: var(--we-v2-radius-sm);
  background: var(--we-v2-surface);
  color: var(--we-v2-text);
  font-size: 16px;
  font-weight: 800;
}

.we-v2-notepad-body {
  width: 100%;
  min-height: 430px;
  margin-top: 9px;
  padding: 14px;
  resize: vertical;
  border: 1px solid var(--we-v2-line-strong);
  border-radius: var(--we-v2-radius-sm);
  background: var(--we-v2-surface);
  color: var(--we-v2-text-soft);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
  line-height: 1.7;
}

@media (max-width: 920px) {
  .we-v2-secure-workbench { grid-template-columns: 1fr; }
  .we-v2-secure-workbench .we-v2-workbench__input { border-right: 0; border-bottom: 1px solid var(--we-v2-line); }
  .we-v2-secure-workbench .we-v2-workbench__input,
  .we-v2-secure-workbench .we-v2-result { min-height: auto; }
}

@media (max-width: 640px) {
  .we-v2-secure-workbench .we-v2-workbench__input,
  .we-v2-secure-workbench .we-v2-result { padding: 20px; }
  .we-v2-jwt-panels { grid-template-columns: 1fr; }
  .we-v2-password-kinds { grid-template-columns: 1fr; }
  .we-v2-password-output textarea { font-size: 16px; }
  .we-v2-secure-data > div { grid-template-columns: 1fr; gap: 2px; }
  .we-v2-secure-data dd { text-align: left; }
  .we-v2-notepad-toolbar { grid-template-columns: 1fr 1fr; }
  .we-v2-notepad-toolbar input { grid-column: 1 / -1; }
  .we-v2-telegram-chats article { align-items: flex-start; flex-direction: column; }
}
