:root {
  --bg: #eef2f6;
  --panel: #ffffff;
  --text: #16222e;
  --hint: #7a8a99;
  --line: #e7ecf1;
  --accent: #12a86b;
  --accent2: #7bd23f;
  --accent-soft: #e6f7ee;
  --ok: #12a86b;
  --warn: #e08a13;
  --err: #e0483d;
  --shadow: 0 4px 18px rgba(20, 40, 60, 0.08);
}
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
#app {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
#hdr {
  padding: 16px 18px;
  font-weight: 800;
  font-size: 19px;
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
  display: flex;
  align-items: center;
  gap: 12px;
}
#hdr .back {
  cursor: pointer;
  color: var(--accent);
  font-size: 26px;
  line-height: 1;
  font-weight: 700;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
#screen {
  padding: 6px 16px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.muted {
  color: var(--hint);
  font-size: 14px;
  padding: 2px 2px;
}
/* карточка */
.card {
  background: var(--panel);
  border-radius: 18px;
  padding: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow);
  transition: 0.14s;
}
.card:active {
  transform: scale(0.98);
}
.card .ic {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.card .ic svg {
  width: 24px;
  height: 24px;
}
.card .cc {
  flex: 1;
  min-width: 0;
}
.card .t {
  font-weight: 700;
  font-size: 16px;
}
.card .s {
  color: var(--hint);
  font-size: 13px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card .arr {
  color: #c2cdd8;
  font-size: 24px;
  font-weight: 600;
  flex: none;
}
/* кнопки */
button,
.btn {
  font: inherit;
  font-weight: 700;
  border: none;
  border-radius: 14px;
  padding: 16px;
  width: 100%;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(18, 168, 107, 0.28);
}
button:active {
  opacity: 0.9;
  transform: scale(0.99);
}
button.sec {
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
}
button:disabled {
  opacity: 0.5;
}
/* поля */
.field {
  margin-bottom: 14px;
}
label {
  font-size: 13px;
  color: var(--hint);
  margin: 0 0 7px 4px;
  display: block;
  font-weight: 600;
}
input {
  width: 100%;
  padding: 15px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  outline: none;
}
input:focus {
  border-color: var(--accent);
}
/* превью */
.preview img {
  width: 100%;
  border-radius: 14px;
  display: block;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}
/* прочее */
.spin {
  width: 34px;
  height: 34px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: r 1s linear infinite;
  margin: 36px auto;
}
@keyframes r {
  to {
    transform: rotate(360deg);
  }
}
.center {
  text-align: center;
}
.note {
  background: var(--panel);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 14px;
  color: var(--text);
  box-shadow: var(--shadow);
}
.note b {
  font-weight: 700;
}
.ok {
  color: var(--ok);
  font-weight: 700;
}
.warn {
  color: var(--warn);
}
.err {
  color: var(--err);
}
a {
  color: var(--accent);
  word-break: break-all;
  font-weight: 600;
}
.result {
  background: var(--panel);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  box-shadow: var(--shadow);
}
.result b {
  font-size: 17px;
}
.result .s {
  color: var(--hint);
  font-size: 14px;
}
.result .link {
  background: var(--bg);
  border-radius: 12px;
  padding: 13px;
  font-size: 14px;
}
.result .warn {
  background: #fff6e8;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13px;
}
#toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  background: #16222e;
  color: #fff;
  padding: 11px 20px;
  border-radius: 22px;
  font-size: 14px;
  opacity: 0;
  transition: 0.2s;
  pointer-events: none;
  max-width: 90%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
#toast.show {
  opacity: 1;
}
.step {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hint);
  font-size: 14px;
  padding: 8px;
}
/* админка доступа */
.urow {
  background: var(--panel);
  border-radius: 14px;
  padding: 11px 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow);
}
.urow .cc {
  flex: 1;
  min-width: 0;
}
.av {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  position: relative;
  overflow: hidden;
}
.av img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.uacts {
  display: flex;
  gap: 8px;
  flex: none;
}
button.mini {
  width: auto;
  padding: 10px 13px;
  border-radius: 11px;
  font-size: 16px;
  box-shadow: none;
}
