﻿:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #dbe2ef;
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --danger: #ef4444;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}
.page {
  max-width: 1320px;
  margin: 0 auto;
  padding: 18px;
}
.header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.header h1 {
  margin: 0;
  font-size: 36px;
  font-weight: 800;
}
.header p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 16px;
}
.toast {
  min-width: 150px;
  text-align: right;
  font-weight: 700;
  color: var(--muted);
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}
.toolbar { margin-bottom: 12px; }
.toolbar-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.toolbar-row label { font-weight: 700; }
.status { color: var(--muted); font-size: 13px; font-weight: 600; }
.address-row, .create-row, .totp-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.address-row { margin-bottom: 8px; }
input, select, .btn {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 12px;
  font: inherit;
}
input, select {
  background: #fff;
  color: var(--text);
}
#address {
  flex: 1;
  min-width: 260px;
  font-weight: 700;
}
#localPart { min-width: 180px; }
#createBtn { min-width: 140px; }
.btn {
  cursor: pointer;
  background: #e8eefc;
  color: #1e3a8a;
  font-weight: 700;
}
.btn:hover { filter: brightness(0.98); }
.btn.primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn.primary:hover { background: var(--primary-strong); }
.btn.giant {
  min-height: 72px;
  min-width: 190px;
  font-size: 18px;
  font-weight: 800;
}
.btn.danger {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fecaca;
}
.meta, .muted, .hint {
  color: var(--muted);
  font-size: 13px;
}
.create-row {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.top-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.card-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 10px;
}
.latest-code {
  width: 100%;
  min-height: 92px;
  border-radius: 12px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 44px;
  font-weight: 800;
  letter-spacing: .08em;
}
.latest-code.empty {
  color: #94a3b8;
  font-size: 28px;
  letter-spacing: 0;
  background: #f8fafc;
  border-color: var(--border);
}
#twofaSecretInput {
  width: 100%;
  margin-bottom: 8px;
}
.totp-code {
  flex: 1;
  min-width: 220px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 12px;
  padding: 12px;
  font-weight: 800;
  font-size: 42px;
  letter-spacing: .08em;
  text-align: center;
}
.totp-meta {
  margin-top: 8px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}
.content-grid {
  display: grid;
  grid-template-columns: 390px 1fr;
  gap: 12px;
}
.inbox-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.messages {
  margin-top: 10px;
  display: grid;
  gap: 8px;
  max-height: 65vh;
  overflow: auto;
  padding-right: 4px;
}
.message-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  background: #fff;
  cursor: pointer;
}
.message-item.active {
  border-color: #93c5fd;
  background: #eff6ff;
}
.message-item .subject {
  font-weight: 700;
  margin-bottom: 6px;
}
.message-item .small {
  color: var(--muted);
  font-size: 12px;
}
.message-item .otp {
  margin-top: 6px;
  font-size: 12px;
  color: #1d4ed8;
  font-weight: 700;
}
.empty {
  color: var(--muted);
  min-height: 120px;
  display: grid;
  place-items: center;
  text-align: center;
}
.detail-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0;
}
.big-codes {
  display: grid;
  gap: 8px;
  margin: 10px 0 12px;
}
.big-code-btn {
  width: 100%;
  min-height: 70px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 12px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: .08em;
  cursor: pointer;
}
pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
}
iframe {
  width: 100%;
  min-height: 360px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}
@media (max-width: 1060px) {
  .top-cards, .content-grid { grid-template-columns: 1fr; }
  .messages { max-height: 42vh; }
}
@media (max-width: 640px) {
  .header { flex-direction: column; }
  .header h1 { font-size: 30px; }
  .address-row, .create-row, .totp-row { flex-direction: column; align-items: stretch; }
  #address { min-width: 100%; }
  .totp-code, .latest-code { font-size: 30px; }
}
