:root {
  --navy-900: #0f1f33;
  --navy-800: #16294a;
  --navy-700: #1e355e;
  --gold-500: #c9a227;
  --gold-400: #d9b94a;
  --gold-300: #e8d599;
  --cream-50: #faf7ee;
  --cream-100: #f1e9d4;
  --ink: #1b2430;
  --ink-soft: #55606f;
  --white: #ffffff;
  --ring: rgba(201, 162, 39, 0.45);
  --shadow: 0 1px 2px rgba(15, 31, 51, 0.06), 0 8px 24px rgba(15, 31, 51, 0.08);
  --shadow-hover: 0 4px 10px rgba(15, 31, 51, 0.1), 0 16px 32px rgba(15, 31, 51, 0.14);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--cream-50);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- Header ---------- */

.header {
  background: linear-gradient(180deg, var(--navy-800), var(--navy-900));
  border-bottom: 3px solid var(--gold-500);
  color: var(--white);
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand img {
  width: 40px;
  height: 40px;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text .name {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.brand-text .sub {
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--gold-300);
  font-weight: 600;
}

.header-search {
  flex: 1;
  max-width: 420px;
  margin: 0 auto;
  position: relative;
}

.header-search input {
  width: 100%;
  padding: 9px 14px 9px 38px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  font-size: 14px;
  outline: none;
  transition: background 0.15s, border-color 0.15s;
}

.header-search input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.header-search input:focus {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--gold-400);
}

.header-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  opacity: 0.6;
}

.header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gold-500);
  color: var(--navy-900);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

/* ---------- Main ---------- */

.main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 24px 64px;
}

.greeting h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 28px;
  margin: 0 0 4px;
  color: var(--navy-900);
}

.greeting p {
  margin: 0 0 28px;
  color: var(--ink-soft);
  font-size: 15px;
}

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.filter-chip {
  border: 1px solid #e2d9c2;
  background: var(--white);
  color: var(--ink-soft);
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.filter-chip:hover {
  border-color: var(--gold-400);
  color: var(--navy-800);
}

.filter-chip.active {
  background: var(--navy-800);
  border-color: var(--navy-800);
  color: var(--white);
}

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

.app-tile {
  background: var(--white);
  border: 1px solid #eee3c8;
  border-radius: var(--radius);
  padding: 22px 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
}

.app-tile:hover,
.app-tile:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--gold-400);
  outline: none;
}

.app-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(155deg, var(--navy-700), var(--navy-900));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-400);
  flex-shrink: 0;
}

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

.app-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.app-desc {
  font-size: 11.5px;
  color: var(--ink-soft);
  line-height: 1.3;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-soft);
  display: none;
}

.empty-state.visible {
  display: block;
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid #e9e0c8;
  padding: 22px 24px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-soft);
}

.footer strong {
  color: var(--navy-800);
}

@media (max-width: 640px) {
  .header-inner {
    flex-wrap: wrap;
  }
  .header-search {
    order: 3;
    flex: 1 1 100%;
    max-width: none;
  }
  .brand-text .sub {
    display: none;
  }
}
