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

body {
  font-family: Arial, Helvetica, sans-serif;
  background: #f2f3f5;
  color: #1c1e21;
}

.content {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 2rem;
}

.container {
  max-width: 720px;
  margin: 40px auto;
  padding: 24px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.login-page {
  max-width: 420px;
  margin-top: 80px;
}

h1 {
  text-align: center;
  font-size: 1.4rem;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.subtitle {
  text-align: center;
  color: #555555;
  margin-bottom: 16px;
}

.topbar {
  max-width: 720px;
  margin: 24px auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar strong {
  font-size: 1rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.label {
  display: block;
  font-weight: bold;
  margin: 16px 0 6px;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 10px;
  font-size: 0.95rem;
  border: 1px solid #ccced2;
  border-radius: 4px;
}

textarea {
  width: 100%;
  min-height: 160px;
  padding: 10px;
  font-size: 0.95rem;
  font-family: Consolas, monospace;
  border: 1px solid #ccced2;
  border-radius: 4px;
  resize: vertical;
}

#result-text {
  min-height: 240px;
  background: #fafbfc;
}

button {
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  font-size: 1rem;
  font-weight: bold;
  letter-spacing: 1px;
  color: #ffffff;
  background: #128c7e;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

button:hover:not(:disabled) {
  background: #0f7468;
}

button:disabled {
  background: #9aa0a6;
  cursor: not-allowed;
}

button.small {
  width: auto;
  margin: 0;
  padding: 8px 16px;
  font-size: 0.85rem;
}

button.link-btn {
  width: auto;
  margin: 0;
  padding: 6px 4px;
  font-size: 0.8rem;
  font-weight: normal;
  letter-spacing: 0.3px;
  color: #555555;
  background: transparent;
  text-decoration: underline;
}

button.link-btn:hover:not(:disabled) {
  color: #128c7e;
  background: transparent;
}

button.ghost {
  background: transparent;
  color: #555555;
  border: 1px solid #ccced2;
}

button.ghost:hover:not(:disabled) {
  background: #f2f3f5;
  color: #1c1e21;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  z-index: 100;
  padding: 1rem;
}

.modal-box {
  width: 100%;
  max-width: 380px;
  padding: 24px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.modal-title {
  text-align: center;
  font-size: 1.1rem;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.success {
  margin-top: 12px;
  padding: 10px;
  color: #0a6b33;
  background: #e8f7ee;
  border: 1px solid #b5e3c7;
  border-radius: 4px;
}

.error {
  margin-top: 12px;
  padding: 10px;
  color: #a10a0a;
  background: #fdecea;
  border: 1px solid #f5c6c2;
  border-radius: 4px;
  white-space: pre-wrap;
}

.hidden {
  display: none;
}