:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --border: #e4e6eb;
  --text: #111111;
  --text-muted: #6b7280;
  --primary: #111111;
  --primary-hover: #333333;
  --danger: #e30613;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.screen { min-height: 100vh; }

/* --------- Auth --------- */
.auth-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 28px;
  border: 1px solid var(--border);
}

.portal-title {
  margin: 0 0 4px;
  text-align: center;
  font-size: 28px;
  letter-spacing: 1px;
}

.auth-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin: 0 0 24px;
  font-size: 14px;
}

.auth-error {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}

.auth-form .form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text);
}

.form-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-hover); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: #f1f2f5; }

.btn-sm { padding: 6px 12px; font-size: 13px; }

.btn-block {
  width: 100%;
  margin-top: 4px;
}

.auth-switch {
  margin: 14px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.auth-switch a { color: var(--primary); text-decoration: none; font-weight: 500; }
.auth-switch a:hover { text-decoration: underline; }

/* --------- Launcher --------- */
.portal-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.portal-brand {
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.5px;
}

.nav-user {
  color: var(--text-muted);
  font-size: 14px;
  margin-right: 8px;
}

.launcher {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 24px;
}

.launcher h1 {
  margin: 0 0 4px;
  font-size: 28px;
}

.launcher-hint {
  color: var(--text-muted);
  margin: 0 0 28px;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.app-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow);
  transition: transform 0.12s, box-shadow 0.15s, border-color 0.15s;
  border-top: 3px solid var(--accent, var(--primary));
}

.app-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent, var(--primary));
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.app-card img {
  max-height: 48px;
  max-width: 140px;
  object-fit: contain;
  align-self: flex-start;
}

/* Trim the stray left edge on the Washlyfe logo */
.app-card img[src*="logo.webp"] {
  clip-path: inset(0 0 0 26.7%);
  margin-left: -23px;
}

.app-card h2 {
  margin: 0;
  font-size: 18px;
}

.app-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.empty-state {
  background: #fff;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  color: var(--text-muted);
}

.empty-state h2 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 20px;
}
