/* base.css - GLOBALT ONLY. Modern AERO / Meta AI-look. */
:root {
  --bg: #f4f1ff;
  --bg2: #fff;
  --card: #ffffff;
  --ink: #151525;
  --muted: #6b7280;
  --purple: #7c3aed;
  --purple-dark: #4c1d95;
  --purple-light: #ede9fe;
  --pink: #fdf2f8;
  --yellow: #fffbeb;
  --border: #eef0f6;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(124, 58, 237, 0.08);
  --shadow2: 0 4px 14px rgba(0, 0, 0, 0.05);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    sans-serif;
  background: linear-gradient(180deg, #f4f1ff 0%, #ffffff 60%);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.view {
  display: none;
  padding: 20px 16px 40px;
  max-width: 980px;
  margin: 0 auto;
}
.view.active {
  display: block;
}
h1 {
  font-size: 44px;
  line-height: 1.05;
  margin: 10px 0 6px;
  letter-spacing: -0.03em;
  font-weight: 800;
}
h2 {
  font-size: 30px;
  letter-spacing: -0.02em;
  margin: 18px 0 8px;
}
h3 {
  margin: 0 0 10px;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.muted,
.small {
  color: var(--muted);
}
.small {
  font-size: 13px;
}
.error {
  color: #dc2626;
  background: #fef2f2;
  padding: 10px;
  border-radius: 10px;
}
label {
  display: block;
  margin: 12px 0;
  font-weight: 600;
  font-size: 14px;
}
input,
select,
textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-top: 6px;
  background: #fff;
  font: inherit;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--purple);
  border-color: var(--purple);
}
textarea {
  min-height: 76px;
  resize: vertical;
}
button {
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  background: #ede9fe;
  color: #4c1d95;
  cursor: pointer;
  margin: 5px 3px;
  font-weight: 700;
  font-size: 14px;
  transition: 0.15s;
}
button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow2);
}
button.primary {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #fff;
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.25);
}
.tabs {
  display: flex;
  gap: 8px;
  margin: 14px 0;
  background: #fff;
  padding: 6px;
  border-radius: 999px;
  box-shadow: var(--shadow2);
  width: fit-content;
}
.tab {
  padding: 10px 18px;
  background: transparent;
  color: var(--muted);
}
.tab.active {
  background: var(--purple);
  color: #fff;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin: 16px 0;
  box-shadow: var(--shadow);
}
.bar {
  background: #f1eaff;
  height: 20px;
  border-radius: 999px;
  overflow: hidden;
}
.fill {
  background: linear-gradient(90deg, #7c3aed, #a855f7);
  height: 100%;
  width: 30%;
  transition: width 0.4s;
  border-radius: 999px;
}
.pep {
  background: #fffbeb;
  border: 1px solid #fde68a;
  padding: 14px 16px;
  border-radius: 14px;
  font-weight: 600;
}
.pill {
  background: #fdf2f8;
  color: #9d174d;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  padding: 14px 16px;
  border-radius: 16px;
  box-shadow: var(--shadow2);
  border: 1px solid var(--border);
  position: sticky;
  top: 10px;
  z-index: 10;
}
.main-tabs {
  display: flex;
  gap: 8px;
  margin: 16px 0;
}
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.avatar-card {
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  text-align: center;
  cursor: pointer;
  transition: 0.15s;
}
.avatar-card:hover {
  border-color: var(--purple);
  transform: translateY(-2px);
}
.avatar-card.selected {
  border-color: var(--purple);
  background: #f5f3ff;
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.15);
}
.avatar-emoji {
  font-size: 38px;
}
.small-clock {
  background: #151525;
  color: #fff;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}
.clock-big {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.award {
  background: #fffbeb;
  border: 1px solid #fde68a;
  padding: 14px;
  border-radius: 14px;
  margin-top: 12px;
}
@media (max-width: 640px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
  h1 {
    font-size: 34px;
  }
  .topbar {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
}

/* Gemensam klass för att dölja inaktiva gränssnittselement. */
.hidden {
  display: none !important;
}
