/* Web cabinet — mobile-first; reuses site tokens */

.app-body {
  min-height: 100vh;
}

.app-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 13, 24, 0.88);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 30;
}

.app-top .nav-brand {
  font-size: 1.2rem;
  letter-spacing: 0.01em;
}

.app-top-actions {
  display: flex;
  gap: 0.65rem;
  align-items: center;
}

.app-top-actions a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  padding: 0.3rem 0.55rem;
  border-radius: 0.35rem;
}

.app-top-actions a.active,
.app-top-actions a:hover {
  color: var(--accent);
  background: var(--accent-dim);
}

/* —— Login / signup —— */
.app-login-page {
  min-height: calc(100vh - 3.6rem);
  display: grid;
  place-items: center;
  padding: 1.5rem 1rem 2.5rem;
}

.app-login-card {
  width: 100%;
  max-width: 26.5rem;
  padding: 1.75rem 1.5rem 1.6rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 0.15rem);
  background: linear-gradient(180deg, rgba(22, 36, 56, 0.92), rgba(12, 22, 38, 0.94));
  box-shadow: var(--shadow);
  animation: rise 0.45s ease both;
}

.app-login-card .plain-lead {
  margin: 0 0 1.15rem;
  padding: 0.9rem 1rem;
  font-size: 0.95rem;
  line-height: 1.45;
}

.app-login-card h1 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2rem);
  margin: 0 0 0.35rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.app-login-sub {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.98rem;
}

.app-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  margin: 0 0 1.2rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.22);
}

.app-auth-tab {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.65rem 0.4rem;
  border-radius: 0.4rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.app-auth-tab:hover {
  color: var(--ink);
}

.app-auth-tab.active {
  color: #06201c;
  background: var(--accent);
}

.app-auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  margin: 0 0 1.15rem;
  width: 100%;
}

.app-auth-form .field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
  margin: 0;
}

.app-auth-form .field > span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.app-auth-form input[type="email"],
.app-auth-form input[type="password"] {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 0.8rem 0.9rem;
  font: inherit;
  font-size: 1rem;
  border-radius: var(--radius-sm);
  outline: none;
}

.app-auth-form input:focus {
  border-color: var(--accent);
  background: rgba(61, 214, 198, 0.08);
  box-shadow: 0 0 0 3px rgba(61, 214, 198, 0.16);
}

.app-auth-form input:-webkit-autofill,
.app-auth-form input:-webkit-autofill:hover,
.app-auth-form input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  caret-color: var(--ink);
  box-shadow: 0 0 0 1000px #152338 inset;
  border: 1px solid var(--line);
}

.app-auth-hint {
  margin: -0.35rem 0 0;
  font-size: 0.85rem;
}

.app-auth-form .cta {
  width: 100%;
  margin-top: 0.15rem;
  padding: 0.9rem 1.25rem;
}

.app-social-label {
  margin: 0 0 0.55rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.app-social-row {
  display: grid;
  gap: 0.55rem;
  margin: 0 0 0.35rem;
}

.app-oauth {
  width: 100%;
}

.app-auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.15rem 0 1rem;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.app-auth-divider::before,
.app-auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.app-login-card .cta.secondary {
  width: 100%;
}

#login-status {
  min-height: 1.35rem;
  margin: 0.85rem 0 0;
  font-size: 0.9rem;
}

.app-alt {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  text-align: center;
}

.app-alt a {
  color: var(--accent);
  text-decoration: none;
}

.app-alt a:hover {
  text-decoration: underline;
}

/* —— Cabinet shell —— */
.app-shell {
  display: grid;
  grid-template-columns: 1fr;
  min-height: calc(100vh - 3.5rem);
}

.app-nav {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 13, 24, 0.75);
  -webkit-overflow-scrolling: touch;
}

.app-nav button {
  flex: 0 0 auto;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.88rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
}

.app-nav button:hover {
  color: var(--ink);
}

.app-nav button.active {
  color: var(--ink);
  border-color: var(--line);
  background: var(--accent-dim);
}

.app-main {
  padding: 1.1rem 1.1rem 3rem;
  max-width: 52rem;
  width: 100%;
  margin: 0 auto;
}

.app-card-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0 0 0.5rem;
  font-weight: 500;
}

.app-stat-row {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr 1fr;
  margin: 1rem 0;
}

.app-stat {
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.app-stat b {
  display: block;
  font-size: 1.15rem;
  margin-top: 0.25rem;
}

.app-checklist {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.app-checklist li {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.app-checklist li.done {
  color: var(--accent);
}

.app-checklist li span.num {
  display: inline-block;
  width: 1.4rem;
  color: var(--ink);
}

@media (min-width: 860px) {
  .app-login-card {
    padding: 2rem 1.85rem 1.75rem;
  }
  .app-shell {
    grid-template-columns: 13.5rem 1fr;
  }
  .app-nav {
    flex-direction: column;
    overflow-x: visible;
    border-bottom: none;
    border-right: 1px solid var(--line);
    padding: 1.1rem 0.8rem;
  }
  .app-nav button {
    width: 100%;
    text-align: left;
  }
  .app-stat-row {
    grid-template-columns: repeat(3, 1fr);
  }
}
