/* Webservices.org — minimal launcher */
:root {
  --bg: #070b14;
  --text: #e8eef9;
  --text-muted: #8b9bb8;
  --text-faint: #5c6d8a;
  --accent: #2ec5ff;
  --accent-3: #5ef0c8;
  --border: rgba(120, 150, 200, 0.14);
  --border-strong: rgba(120, 160, 220, 0.28);
  --card: rgba(16, 24, 42, 0.82);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 18px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(700px 420px at 50% 20%, rgba(79, 107, 255, 0.22), transparent 60%),
    radial-gradient(560px 360px at 70% 80%, rgba(46, 197, 255, 0.1), transparent 55%),
    var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.dot {
  color: var(--text-faint);
  font-weight: 500;
}

/* Top bar */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  pointer-events: none;
}

.topbar > * {
  pointer-events: auto;
}

.auth-slot {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.auth-user {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.launcher-signin.is-signed-in {
  opacity: 0.85;
  pointer-events: none;
  cursor: default;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: -0.02em;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.72rem 1.3rem;
  cursor: pointer;
  transition: box-shadow 0.15s, background 0.15s, border-color 0.15s, opacity 0.15s;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-sm {
  padding: 0.48rem 1rem;
  font-size: 0.88rem;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  color: #061018;
  background: linear-gradient(135deg, #5ef0c8 0%, #2ec5ff 55%, #4f6bff 100%);
  box-shadow: 0 10px 28px rgba(46, 197, 255, 0.25);
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 14px 34px rgba(46, 197, 255, 0.35);
}

.btn-ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-strong);
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
}

/* Home launcher — centered */
.page-home {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.launcher {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 5.5rem 1.25rem 3rem;
}

.launcher-inner {
  width: min(100%, 420px);
  text-align: center;
}

.launcher-logo {
  margin: 0 auto 1.1rem;
  width: 72px;
  height: 72px;
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.launcher h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.75rem, 4vw, 2.1rem);
  letter-spacing: -0.03em;
  font-weight: 700;
}

.launcher-tagline {
  margin: 0 0 2rem;
  color: var(--text-muted);
  font-size: 1.02rem;
}

.app-icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

.app-icon {
  width: 148px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem;
  border: none;
  background: none;
  color: inherit;
  font: inherit;
  cursor: default;
  border-radius: 16px;
  transition: transform 0.15s;
}

a.app-icon {
  cursor: pointer;
}

a.app-icon:hover {
  transform: translateY(-3px);
}

a.app-icon:hover .app-icon-tile {
  box-shadow: 0 12px 28px color-mix(in srgb, var(--accent) 30%, transparent);
}

.app-icon.is-soon {
  opacity: 0.92;
}

.app-icon-tile {
  width: 88px;
  height: 88px;
  border-radius: 24px;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}

.app-icon-tile svg {
  width: 40px;
  height: 40px;
}

.app-icon-tile img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: block;
}

.app-icon-name {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.app-icon-meta {
  font-size: 0.78rem;
  color: var(--text-faint);
  margin-top: -0.25rem;
}

.app-icon-open {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent, #2ec5ff);
  opacity: 0.9;
}

.app-icon-open.is-soon {
  color: var(--text-faint);
  font-weight: 500;
}

a.app-icon {
  text-decoration: none;
}

a.app-icon:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent, #2ec5ff) 70%, white);
  outline-offset: 4px;
}

.launcher-signin {
  min-width: 180px;
}

.launcher-note {
  margin: 1rem 0 0;
  font-size: 0.82rem;
  color: var(--text-faint);
}

.launcher-error {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.foot {
  padding: 1.25rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-faint);
}

/* Login */
.page-login {
  min-height: 100vh;
}

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 5.5rem 1.25rem 2rem;
}

.auth-card {
  width: min(100%, 400px);
  padding: 2rem 1.75rem 1.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--card);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  text-align: center;
}

.auth-logo {
  margin: 0 auto 1rem;
  border-radius: 14px;
}

.auth-card h1 {
  margin: 0 0 0.45rem;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.auth-sub {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.auth-sub strong {
  color: var(--text);
  font-weight: 600;
}

.auth-form {
  text-align: left;
  display: grid;
  gap: 0.9rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field span {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
}

.field input {
  width: 100%;
  font: inherit;
  font-size: 0.98rem;
  color: var(--text);
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input::placeholder {
  color: var(--text-faint);
}

.field input:focus {
  border-color: rgba(46, 197, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(46, 197, 255, 0.12);
}

.auth-error {
  margin: 0;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  font-size: 0.85rem;
  color: #ffb4b0;
  background: rgba(255, 80, 70, 0.1);
  border: 1px solid rgba(255, 100, 90, 0.25);
  text-align: left;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  margin: 1.15rem 0;
  color: var(--text-faint);
  font-size: 0.78rem;
}

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

.auth-foot {
  margin: 1.15rem 0 0;
  font-size: 0.82rem;
  color: var(--text-faint);
}

.auth-foot a {
  color: var(--accent);
  font-weight: 500;
}

.auth-foot a:hover {
  text-decoration: underline;
}

@media (max-width: 420px) {
  .app-icon {
    width: 130px;
  }

  .app-icon-tile {
    width: 76px;
    height: 76px;
    border-radius: 20px;
  }

  .app-icon-tile svg {
    width: 34px;
    height: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-icon,
  .btn {
    transition: none;
  }
}

/* Portal maintenance kill-switch (public home) */
.maint-banner {
  max-width: 28rem;
  margin: 1.5rem auto 0;
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid rgba(248, 180, 80, 0.35);
  background: rgba(120, 80, 20, 0.28);
  text-align: center;
  color: var(--text);
}

.maint-banner strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  color: #fbbf24;
}

.maint-banner p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

body.is-maintenance .app-icons {
  justify-content: center;
}
