:root {
  color-scheme: light;
  --font-body: 'Source Sans 3', 'Trebuchet MS', 'Lucida Grande', sans-serif;
  --font-heading: 'Barlow Condensed', 'Franklin Gothic Medium', 'Arial Narrow', sans-serif;
  --teal: #00827d;
  --teal-accent: #31c4b5;
  --teal-50: #edf8f7;
  --red: #b22f00;
  --red-light: #faeae7;
  --text: #1a2632;
  --muted: #5a6a78;
  --border: rgba(0, 0, 0, 0.07);
  --card-shadow: 0 1px 4px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);
  --card-shadow-hover: 0 4px 8px rgba(0, 130, 125, 0.06), 0 12px 32px rgba(0, 130, 125, 0.11);
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  background: radial-gradient(ellipse 80% 40% at 50% -10%, rgba(49, 196, 181, 0.1) 0%, transparent 70%), #f5f9f8;
  color: var(--text);
  min-height: 100vh;
}

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

button, input {
  font: inherit;
}

/* ——— Topbar ——— */

.topbar {
  height: 118px;
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar__inner {
  max-width: 1020px;
  height: 100%;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar__logo {
  width: 260px;
  max-width: 42vw;
  height: auto;
  display: block;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
}

.user-chip__identity {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
}

.user-chip__name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.user-chip__email {
  font-size: 0.75rem;
  line-height: 1.15;
  color: var(--muted);
  white-space: nowrap;
}

/* ——— Main layout ——— */

.main {
  max-width: 1020px;
  margin: 0 auto;
  padding: 52px 28px 72px;
}

@media (max-width: 640px) {
  .topbar {
    height: 84px;
  }

  .topbar__inner {
    padding: 0 18px;
  }

  .topbar__logo {
    width: 180px;
    max-width: 48vw;
  }

  .user-chip {
    padding-right: 10px;
  }

  .user-chip__email {
    display: none;
  }
}

/* ——— Welcome ——— */

.welcome {
  margin-bottom: 40px;
}

.welcome__greeting {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 300;
  line-height: 1.15;
  color: var(--text);
  letter-spacing: -0.01em;
}

.welcome__date {
  margin: 8px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  letter-spacing: 0.01em;
}

/* ——— Search ——— */

.search-wrap {
  position: relative;
  margin-bottom: 36px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  opacity: 0.65;
}

.search {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 42px;
  border-radius: 14px;
  border: 1.5px solid rgba(0, 130, 125, 0.15);
  background: #fff;
  font-size: 0.95rem;
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  transition: border-color 0.18s, box-shadow 0.18s;
}

.search::placeholder {
  color: #9ab2ae;
}

.search:focus {
  outline: none;
  border-color: var(--teal-accent);
  box-shadow: 0 0 0 3px rgba(49, 196, 181, 0.13);
}

/* ——— App grid ——— */

.apps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ——— App card ——— */

.app-card {
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.07);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

a.app-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(0, 130, 125, 0.18);
}

.app-card__accent {
  height: 4px;
  background: linear-gradient(90deg, var(--teal), var(--teal-accent));
  flex-shrink: 0;
}

.app-card--disabled .app-card__accent {
  background: #dde6e4;
}

.app-card__body {
  padding: 24px 24px 14px;
  flex: 1;
}

.app-card__category {
  margin: 0 0 10px;
  font-size: 0.71rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--teal);
}

.app-card--disabled .app-card__category {
  color: #96aaa8;
}

.app-card__name {
  margin: 0 0 12px;
  font-family: var(--font-heading);
  font-size: 1.65rem;
  line-height: 1.05;
  letter-spacing: 0.01em;
  color: var(--text);
}

.app-card--disabled .app-card__name {
  color: #8a9ea0;
}

.app-card__summary {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--muted);
}

.app-card__footer {
  padding: 14px 24px 22px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.app-card__open {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--teal);
  display: flex;
  align-items: center;
  gap: 5px;
  transition: gap 0.15s ease;
}

a.app-card:hover .app-card__open {
  gap: 9px;
}

.app-card__soon {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #96aaa8;
}

/* ——— Empty state ——— */

.empty-state {
  padding: 56px 0;
  text-align: center;
  color: var(--muted);
  font-size: 1rem;
}

/* ——— Breakpoints ——— */

@media (max-width: 800px) {
  .apps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 540px) {
  .topbar__inner {
    padding: 0 16px;
  }

  .main {
    padding: 36px 16px 56px;
  }

  .apps-grid {
    grid-template-columns: 1fr;
  }

  .welcome__greeting {
    font-size: 1.6rem;
  }
}
