* {
  box-sizing: border-box;
}

:root {
  --brand-blue: #003da5;
  --brand-blue-2: #0055b8;
  --panel-bg: #ffffff;
  --text: #1f2430;
  --muted: #5b6270;
  --ok-bg: #e8f5e9;
  --ok-text: #1b5e20;
  --warn-bg: #fff3e0;
  --warn-text: #bf360c;
  --err-bg: #ffebee;
  --err-text: #b71c1c;
}

body {
  margin: 0;
  width: 100%;
  min-height: 100vh;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(145deg, #003da5 0%, #0d66c7 65%, #2b85de 100%);
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 14px;
  padding-top: 14px;
}

.bg-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(2px);
  pointer-events: none;
}

.orb-a {
  width: 180px;
  height: 180px;
  background: rgba(255, 255, 255, 0.16);
  top: -70px;
  right: -40px;
}

.orb-b {
  width: 140px;
  height: 140px;
  background: rgba(255, 255, 255, 0.12);
  bottom: -50px;
  left: -40px;
}

.app-shell {
  width: 100%;
  max-width: 410px;
  background: var(--panel-bg);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  opacity: 0;
  transform: translateY(10px) scale(0.985);
}

.app-shell.ready {
  animation: pop-in 220ms ease-out forwards;
}

@keyframes pop-in {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.app-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.logo {
  width: 36px;
  height: 36px;
}

.app-header h1 {
  margin: 0;
  font-size: 20px;
  color: var(--brand-blue);
}

.app-header p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid #dbe4f4;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 14px;
}

.tab {
  border: 0;
  background: #f3f7ff;
  color: #41526c;
  padding: 10px;
  font-weight: 600;
  cursor: pointer;
}

.tab.active {
  background: linear-gradient(145deg, var(--brand-blue), var(--brand-blue-2));
  color: white;
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

.form {
  display: grid;
  gap: 10px;
}

label {
  font-size: 12px;
  font-weight: 600;
  color: #364154;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #d5dfef;
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 13px;
  font-family: inherit;
}

textarea {
  min-height: 110px;
  resize: vertical;
  font-family: Consolas, "Courier New", monospace;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #2f70c9;
  box-shadow: 0 0 0 3px rgba(47, 112, 201, 0.15);
}

.primary-btn {
  margin-top: 4px;
  border: 0;
  border-radius: 9px;
  padding: 11px;
  font-weight: 700;
  color: white;
  cursor: pointer;
  background: linear-gradient(145deg, var(--brand-blue), var(--brand-blue-2));
}

.primary-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.result {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.alert {
  border-radius: 8px;
  padding: 10px;
  font-size: 12px;
  line-height: 1.45;
}

.alert.success {
  background: var(--ok-bg);
  color: var(--ok-text);
}

.alert.warning {
  background: var(--warn-bg);
  color: var(--warn-text);
}

.alert.error {
  background: var(--err-bg);
  color: var(--err-text);
}

.secret-block {
  border-radius: 8px;
  border: 1px dashed #90abd8;
  background: #f8fbff;
  padding: 9px;
  font-size: 12px;
  line-height: 1.4;
  word-break: break-all;
}

.secret-content {
  border-radius: 8px;
  border: 1px solid #b8d2b8;
  background: #f7fff7;
  padding: 9px;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.secondary-btn {
  border: 1px solid #c7d7ee;
  border-radius: 8px;
  padding: 9px;
  background: #f8fbff;
  color: #1f4e98;
  font-weight: 600;
  cursor: pointer;
}

.footer {
  margin-top: 12px;
  text-align: center;
}

.link-btn {
  border: 0;
  background: transparent;
  color: var(--brand-blue);
  font-size: 12px;
  cursor: pointer;
}
