/* Elmer Together — Design Tokens & Base Styles */

:root {
  --together-primary: #2563eb;
  --together-primary-hover: #1d4ed8;
  --together-bg: #f8fafc;
  --together-surface: #ffffff;
  --together-text: #1e293b;
  --together-muted: #64748b;
  --together-border: #e2e8f0;
  --together-success: #16a34a;
  --together-warning: #d97706;
  --together-danger: #dc2626;
  --together-radius: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--together-bg);
  color: var(--together-text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Nav */
.together-nav {
  background: var(--together-surface);
  border-bottom: 1px solid var(--together-border);
  padding: 0 20px;
  height: 56px;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.nav-brand {
  font-size: 18px;
  text-decoration: none;
  color: var(--together-text);
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
}
.nav-workspace { color: var(--together-muted); }
.nav-user { font-weight: 500; }
.nav-link { color: var(--together-primary); text-decoration: none; }
.nav-link:hover { text-decoration: underline; }

/* Main */
.together-main { flex: 1; }

/* Footer */
.together-footer {
  text-align: center;
  padding: 24px;
  color: var(--together-muted);
  font-size: 13px;
}
.together-footer a { color: var(--together-muted); }

/* Auth Card */
.auth-card {
  max-width: 400px;
  margin: 60px auto;
  padding: 32px;
  background: var(--together-surface);
  border: 1px solid var(--together-border);
  border-radius: 12px;
}
.auth-card h1 { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.auth-subtitle { color: var(--together-muted); margin-bottom: 20px; font-size: 14px; }
.auth-links {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--together-muted);
}
.auth-links a { color: var(--together-primary); text-decoration: none; }

/* Forms */
.form-group {
  margin-bottom: 14px;
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 4px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--together-border);
  border-radius: var(--together-radius);
  font-size: 14px;
  font-family: inherit;
}
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--together-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.form-group small {
  display: block;
  color: var(--together-muted);
  font-size: 12px;
  margin-top: 2px;
}
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid var(--together-border);
  border-radius: var(--together-radius);
  background: var(--together-surface);
  color: var(--together-text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}
.btn:hover { background: #f1f5f9; }
.btn-primary {
  background: var(--together-primary);
  color: white;
  border-color: var(--together-primary);
}
.btn-primary:hover { background: var(--together-primary-hover); }
.btn-danger { background: var(--together-danger); color: white; border-color: var(--together-danger); }
.btn-full { display: block; width: 100%; text-align: center; }
.btn-sm { padding: 4px 10px; font-size: 13px; }

/* Alerts */
.alert {
  padding: 10px 14px;
  border-radius: var(--together-radius);
  font-size: 14px;
  margin-bottom: 16px;
}
.alert-danger { background: #fef2f2; color: var(--together-danger); border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: var(--together-success); border: 1px solid #bbf7d0; }

/* Badges */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  background: #f1f5f9;
  color: var(--together-muted);
}
.badge-sm { font-size: 11px; padding: 1px 6px; }
.badge-success { background: #f0fdf4; color: var(--together-success); }
.badge-warning { background: #fffbeb; color: var(--together-warning); }
.badge-danger { background: #fef2f2; color: var(--together-danger); }
.badge-info { background: #eff6ff; color: var(--together-primary); }

/* Panels */
.panel {
  background: var(--together-surface);
  border: 1px solid var(--together-border);
  border-radius: var(--together-radius);
  padding: 16px;
}

/* Role cards */
.role-options { display: flex; flex-direction: column; gap: 8px; }
.role-card {
  display: block;
  padding: 14px 16px;
  border: 2px solid var(--together-border);
  border-radius: var(--together-radius);
  cursor: pointer;
  transition: border-color 0.15s;
}
.role-card input[type="radio"] { display: none; }
.role-card strong { display: block; font-size: 15px; }
.role-card span { display: block; font-size: 13px; color: var(--together-muted); margin-top: 2px; }
.role-card.active { border-color: var(--together-primary); background: #eff6ff; }

/* Workspace card */
.workspace-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: var(--together-surface);
  border: 1px solid var(--together-border);
  border-radius: var(--together-radius);
  text-decoration: none;
  color: var(--together-text);
  transition: border-color 0.15s;
}
.workspace-card:hover { border-color: var(--together-primary); }

/* Nav cards (dashboard) */
.nav-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--together-surface);
  border: 1px solid var(--together-border);
  border-radius: var(--together-radius);
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  color: var(--together-muted);
  cursor: pointer;
  transition: border-color 0.15s;
}
.nav-card:hover { border-color: var(--together-primary); color: var(--together-text); }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--together-muted);
}

/* Alpine cloak */
[x-cloak] { display: none !important; }
