/* MFL Hub — Mortgages For Less brand skin.
   The launcher (front door) for all internal tools. Shares the brand system with
   the Meeting Automation app (public/meetings/app.css): navy/orange/gold palette,
   Poppins + Inter, gradient top strip, logo + wordmark, avatar dropdown. The
   token block below is copied verbatim from that app on purpose (Phase 1 keeps the
   two stylesheets independent; a shared stylesheet can be factored out later). */
:root {
  --navy: #093c44;
  --navy-700: #0c4b55;
  --navy-800: #072e34;
  --orange: #f58f47;
  --gold: #f8b600;
  --grad: linear-gradient(310deg, #f8b600, #f58f47 55%, #f8b600);
  --cream: #fef0e7;
  --cream-2: #fdf6f0;
  --ink: #12232a;
  --muted: #6b7a80;
  --line: #e7ecee;
  --white: #fff;
  --ok: #1f9d6b;
  --shadow: 0 1px 2px rgba(9, 60, 68, .06), 0 8px 30px rgba(9, 60, 68, .08);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  font: 15px/1.5 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--cream-2);
}
h1, h2, h3, h4, .pop { font-family: 'Poppins', 'Inter', sans-serif; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ===== Brand chrome (identical to the meetings app) ===== */
.topbar { background: var(--grad); height: 6px; }
.appbar { background: var(--white); border-bottom: 1px solid var(--line); }
.appbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { display: flex; align-items: center; gap: 14px; }
.logo-mark { width: 42px; height: 42px; flex: 0 0 auto; border-radius: 10px; background: #eceff1; padding: 2px; object-fit: contain; box-shadow: var(--shadow); }
.brand-txt strong { font-family: 'Poppins'; font-weight: 800; letter-spacing: .5px; color: var(--navy); font-size: 19px; line-height: 1; display: block; }
.brand-txt span { font-size: 10.5px; letter-spacing: 1.5px; color: var(--orange); font-weight: 600; text-transform: uppercase; }
.appbar .right { display: flex; align-items: center; gap: 14px; }
.pageflag { font-family: 'Poppins'; font-weight: 600; color: var(--navy); font-size: 14px; background: var(--cream); padding: 7px 14px; border-radius: 999px; }

/* Avatar + dropdown menu */
.usermenu { position: relative; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; border: none; cursor: pointer; font-family: 'Poppins'; padding: 0; }
.avatar:hover { filter: brightness(1.08); }
.avatar.sm { width: 38px; height: 38px; font-size: 14px; }
.menu { position: absolute; right: 0; top: 46px; width: 238px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px rgba(9, 60, 68, .18); padding: 8px; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: .15s; z-index: 60; }
.menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.menu-head { display: flex; gap: 11px; align-items: center; padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-head strong { font-family: 'Poppins'; font-size: 13.5px; color: var(--navy); display: block; }
.menu-head span { font-size: 11.5px; color: var(--muted); word-break: break-all; }
.menu-item { display: flex; width: 100%; align-items: center; padding: 10px 12px; border: none; background: none; border-radius: 9px; text-align: left; text-decoration: none; color: var(--navy); font-size: 13.5px; font-weight: 600; font-family: 'Poppins'; cursor: pointer; }
.menu-item:hover { background: var(--cream-2); }
.menu-item.danger { color: #c0492e; }
.menu-item.danger:hover { background: #fdeee9; }

/* ===== Page frame ===== */
section { max-width: 1180px; margin: 24px auto; padding: 0 24px; }
.muted { color: var(--muted); font-size: 13px; }
.link { border: none; background: none; color: var(--orange); cursor: pointer; padding: 0; font: inherit; }
.link:hover { text-decoration: underline; }

/* ===== Signed-out gate ===== */
.gate { text-align: center; padding-top: 72px; max-width: 560px; }
.gate-h { font-size: 26px; color: var(--navy); margin: 0 0 8px; }
.gate p { color: var(--muted); }
.gate #gsiButton { display: inline-block; margin: 20px 0 8px; }

/* ===== Signed-in launcher ===== */
.hero { margin: 30px 0 22px; }
.hero h1 { font-size: 25px; color: var(--navy); margin: 0 0 4px; }
.hero p { margin: 0; }

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

/* Each tool = a card. Anchor so the whole card is a link. */
.card {
  display: flex; flex-direction: column; gap: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 20px; text-decoration: none; color: inherit; box-shadow: var(--shadow);
  transition: .15s; position: relative; min-height: 148px;
}
.card:hover { transform: translateY(-2px); border-color: #d5dcde; box-shadow: 0 6px 16px rgba(9, 60, 68, .12), 0 18px 44px rgba(9, 60, 68, .10); }
.card.disabled { opacity: .62; pointer-events: none; }

.card-icon {
  width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center;
  justify-content: center; font-size: 23px; background: var(--cream); flex: 0 0 auto;
}
.card-title { font-family: 'Poppins'; font-weight: 700; font-size: 16px; color: var(--navy); }
.card-desc { font-size: 13px; color: var(--muted); line-height: 1.45; }

/* Corner badge: internal vs external, plus a "soon" state. */
.card-tag {
  position: absolute; top: 16px; right: 16px; font-family: 'Poppins'; font-weight: 700;
  font-size: 10px; letter-spacing: .4px; text-transform: uppercase; padding: 3px 9px;
  border-radius: 999px; background: var(--cream); color: var(--orange);
}
.card-tag.ext { background: #eef4f5; color: var(--navy-700); }
.card-tag.soon { background: #fff4dc; color: #8a6400; border: 1px solid #f4dfa0; }
.card-tag.admin { background: #e9eef7; color: #3a4d7a; }

@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
}
