/* AC-Space — временное оформление до сдачи дизайна (по мотивам «Тёплого Марса») */
:root { --green: #3F8D49; --sage: #CFE6CF; --ink: #1f2a22; --muted: #6b746d; --line: #e4e8e4; --bg: #f7f6f3; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: Tahoma, "Segoe UI", Arial, sans-serif; color: var(--ink); background: var(--bg);
  min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden;
  background-image: linear-gradient(to top, rgba(222, 170, 130, .28), rgba(247, 246, 243, 0) 160px); }
header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 20px; background: #fff; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-size: 20px; }
.brand img { height: 32px; width: auto; }
.who { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.who form { margin: 0; }
main { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 20px; }
h1 { font-size: 26px; margin: 4px 0 16px; }
h2 { font-size: 18px; margin: 22px 0 10px; color: var(--ink); }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.tile { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px; min-height: 112px;
  background: #fff; border: 1px solid var(--line); border-radius: 16px; color: inherit; text-decoration: none;
  box-shadow: 0 1px 2px rgba(0,0,0,.04); transition: transform .08s, box-shadow .15s, background .15s;
  overflow-wrap: anywhere; -webkit-tap-highlight-color: transparent; }
a.tile:hover { box-shadow: 0 4px 14px rgba(63,141,73,.15); border-color: #b9d8bc; }
a.tile:active, a.tile.pressed { transform: scale(.98); background: var(--sage); }
.tile b { font-size: 16px; }
.tile small { color: var(--muted); font-size: 13px; line-height: 1.35; }
.tile em { position: absolute; top: 12px; right: 12px; font-style: normal; font-size: 11px; color: var(--muted);
  background: #f0f1ef; border-radius: 10px; padding: 2px 8px; }
.tile.off { opacity: .6; }
.ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: bold;
  color: var(--green); background: radial-gradient(circle at 35% 30%, #ffffff, var(--sage)); border: 1px solid #b9d8bc; }
.btn { font: inherit; font-size: 16px; padding: 12px 18px; border-radius: 12px; border: 1px solid #b9d8bc;
  background: var(--sage); color: #1e4d25; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.btn:active, .btn.pressed { transform: scale(.98); background: #bcdcbc; }
.btn.ghost { background: #fff; padding: 8px 14px; font-size: 14px; }
.btn.wait { pointer-events: none; opacity: .8; }
.btn.wait::after { content: ""; display: inline-block; width: 14px; height: 14px; margin-left: 8px; vertical-align: -2px;
  border: 2px solid var(--green); border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.login { display: grid; place-items: center; }
.card { width: 100%; max-width: 380px; background: #fff; border: 1px solid var(--line); border-radius: 18px;
  padding: 24px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 6px 24px rgba(0,0,0,.06); }
.card .brand { justify-content: center; }
.card h1 { text-align: center; margin: 0; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
input { font: inherit; font-size: 16px; padding: 12px; border: 1px solid #cfd6d0; border-radius: 10px; color: var(--ink); }
input:focus { outline: 2px solid #b9d8bc; border-color: var(--green); }
.err { margin: 0; padding: 10px 12px; border-radius: 10px; background: #fdecec; color: #8a1f1f; font-size: 14px; }
footer { text-align: center; color: var(--muted); font-size: 12px; padding: 14px; }
@media (max-width: 520px) {
  main { padding: 14px; }
  .grid { grid-template-columns: 1fr; }
  .tile { min-height: 0; flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 12px; }
  .tile small { flex-basis: 100%; }
  .who span { display: none; }
}
