:root {
  --mobile-bg: #f4f7fb;
  --mobile-card: #ffffff;
  --mobile-text: #172033;
  --mobile-muted: #667085;
  --mobile-purple: #5a46bd;
  --mobile-green: #14845f;
  --mobile-orange: #c76a17;
  --mobile-red: #b42318;
  --mobile-border: rgba(30, 41, 59, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--mobile-bg);
  color: var(--mobile-text);
  font-family: Arial, Helvetica, sans-serif;
}

.mobile-auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 82% 12%, rgba(90, 70, 189, 0.18), transparent 34%),
    var(--mobile-bg);
}

.mobile-auth-card {
  width: min(100%, 420px);
  padding: 28px 24px;
  border: 1px solid var(--mobile-border);
  border-radius: 18px;
  background: var(--mobile-card);
  box-shadow: 0 18px 48px rgba(30, 41, 59, 0.12);
}

.mobile-kicker {
  margin-bottom: 12px;
  color: var(--mobile-purple);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.mobile-auth-card h1 {
  margin: 0 0 10px;
  font-size: 32px;
  line-height: 1.08;
}

.mobile-auth-card p {
  margin: 0 0 22px;
  color: var(--mobile-muted);
  font-size: 16px;
  line-height: 1.5;
}

.mobile-auth-alert {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 12px;
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
}

.mobile-auth-alert.is-success {
  background: #14845f;
}

.mobile-auth-alert.is-error {
  background: #b42318;
}

.mobile-auth-form {
  display: grid;
  gap: 10px;
}

.mobile-auth-form label {
  color: var(--mobile-text);
  font-size: 13px;
  font-weight: 700;
}

.mobile-auth-form input,
.mobile-auth-form select {
  width: 100%;
  min-height: 48px;
  margin-bottom: 8px;
  padding: 10px 12px;
  border: 1px solid var(--mobile-border);
  border-radius: 12px;
  background: #fbfcff;
  color: var(--mobile-text);
  font: inherit;
}

.mobile-auth-form input:focus,
.mobile-auth-form select:focus {
  border-color: var(--mobile-purple);
  box-shadow: 0 0 0 4px rgba(90, 70, 189, 0.12);
  outline: none;
}

.mobile-auth-form button {
  min-height: 48px;
  margin-top: 4px;
  border: 0;
  border-radius: 999px;
  background: var(--mobile-purple);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.mobile-auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--mobile-border);
}

.mobile-auth-links a {
  color: var(--mobile-purple);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.mobile-app-shell {
  min-height: 100vh;
  width: min(100%, 520px);
  margin: 0 auto;
  padding-bottom: calc(104px + env(safe-area-inset-bottom));
  background: #f7f8fc;
}

.mobile-top-panel {
  min-height: 112px;
  padding: max(16px, env(safe-area-inset-top)) 18px 32px;
  color: #fff;
  background:
    radial-gradient(circle at 78% 0%, rgba(111, 88, 230, 0.6), transparent 30%),
    linear-gradient(160deg, #160d4d 0%, #31207c 52%, #4d35ba 100%);
  border-bottom-left-radius: 24px;
  border-bottom-right-radius: 24px;
}

.mobile-top-panel.has-card {
  min-height: 210px;
}

.mobile-top-panel.is-compact {
  padding-bottom: 18px;
}

.mobile-app-header {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 48px;
}

.mobile-brand,
.mobile-profile-link,
.mobile-bottom-nav a,
.mobile-more-grid a {
  text-decoration: none;
}

.mobile-brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: #fff;
}

.mobile-brand img {
  display: block;
  width: min(138px, 100%);
  height: auto;
}

.mobile-page-title {
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  text-align: center;
}

.mobile-profile-link {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  justify-self: end;
  border-radius: 16px;
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  font-size: 20px;
}

.mobile-page-body {
  padding: 18px 18px 0;
}

.mobile-page-body.has-top-card {
  margin-top: -18px;
}

.mobile-more-panel,
.mobile-simple-page {
  border: 1px solid rgba(30, 41, 59, 0.08);
  background: #fff;
  box-shadow: 0 14px 30px rgba(30, 41, 59, 0.08);
}

.mobile-more-panel {
  min-height: calc(100vh - 250px);
  padding: 20px 16px;
  border-radius: 20px;
}

.mobile-more-panel h1 {
  margin: 0 0 16px;
  font-size: 22px;
}

.mobile-more-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-more-grid a {
  display: grid;
  min-height: 86px;
  align-content: center;
  justify-items: center;
  gap: 8px;
  padding: 12px 8px;
  border: 1px solid rgba(90, 70, 189, 0.12);
  border-radius: 16px;
  color: var(--mobile-text);
  background: #fbfbff;
  text-align: center;
}

.mobile-more-grid i {
  color: var(--mobile-purple);
  font-size: 22px;
}

.mobile-more-grid span {
  font-size: 12px;
  font-weight: 800;
}

.mobile-more-grid .is-signout {
  color: #b42318;
}

.mobile-more-grid .is-signout i {
  color: #b42318;
}

.mobile-simple-page {
  display: flex;
  min-height: calc(100vh - 250px);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  border-radius: 22px;
  text-align: center;
}

.mobile-simple-page h1 {
  margin: 0;
  font-size: 26px;
}

.mobile-simple-icon {
  display: inline-flex;
  width: 58px;
  height: 58px;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  color: var(--mobile-purple);
  background: rgba(90, 70, 189, 0.1);
  font-size: 26px;
}

.mobile-bottom-nav {
  position: fixed;
  z-index: 20;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  width: min(100%, 520px);
  margin: 0 auto;
  padding: 8px 9px calc(9px + env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 54% 0%, rgba(118, 87, 241, 0.45), transparent 26%),
    linear-gradient(180deg, #2c1c79 0%, #160d4d 100%);
  box-shadow: 0 -12px 28px rgba(30, 20, 89, 0.32);
}

.mobile-bottom-nav a {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 18px;
}

.mobile-bottom-nav span {
  font-size: 10px;
  font-weight: 800;
}

.mobile-bottom-nav a.is-active {
  color: #fff;
  background: #6546ea;
}

.mobile-flash {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  padding: 13px 16px;
  border-radius: 12px;
  color: #fff;
  font-size: 14px;
  box-shadow: 0 12px 28px rgba(30, 41, 59, 0.2);
}

.mobile-flash.is-success {
  background: #14845f;
}

.mobile-flash.is-error {
  background: #b42318;
}
