/* ============================================================
   TMS · Free Agent Hub — product surface styles
   Built on the cool-slate product mode of the TMS design system.
   Reuses the email-templates / poster-print visual language:
   slate bg, white rounded cards, vivid teal + brand red,
   outlined status pills, rounded-rectangle buttons (no pop-shadow).
   ============================================================ */

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--product-bg);
  color: var(--product-fg);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
#app { min-height: 100vh; }

/* ============================================================
   Shared buttons
   ============================================================ */
.btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.005em;
  padding: 11px 18px;
  border-radius: 10px;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
  white-space: nowrap;
  transition: background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}
.btn svg { width: 16px; height: 16px; stroke-width: 2; }
.btn--primary { background: var(--tms-teal-500); color: #fff; }
.btn--primary:hover { background: var(--tms-teal-600); }
.btn--outline { background: #fff; color: var(--product-fg); border: 1px solid var(--product-border); }
.btn--outline:hover { background: var(--slate-50); border-color: var(--slate-300); }
.btn--ghost { background: transparent; color: var(--product-fg-muted); }
.btn--ghost:hover { background: var(--slate-100); color: var(--product-fg); }
.btn--block { width: 100%; justify-content: center; }
.btn--lg { padding: 14px 22px; font-size: 15px; border-radius: 12px; }

/* The gold "Upgrade" accent — used sparingly to mark the paid path */
.btn--upgrade {
  background: var(--tms-sun-500);
  color: #3a2c05;
}
.btn--upgrade:hover { background: #d9ab12; }

/* ============================================================
   LOGIN SCREEN
   ============================================================ */
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  background: var(--product-bg);
}

/* Left brand panel — deep teal */
.login-brand {
  position: relative;
  background: var(--tms-teal-800);
  color: #EAF7F8;
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.login-brand::after {
  /* soft decorative globe-dot echo, not a gradient wash */
  content: "";
  position: absolute;
  right: -120px; bottom: -140px;
  width: 420px; height: 420px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 0 0 60px rgba(255,255,255,0.03);
}
.login-logo-chip {
  align-self: flex-start;
  background: #fff;
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: var(--shadow-md);
}
.login-logo-chip img { height: 26px; display: block; }

.login-brand-mid { margin-top: auto; position: relative; z-index: 1; }
.login-eyebrow {
  font: 700 12px/1 var(--font-display);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tms-teal-200);
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 20px;
}
.login-eyebrow::before {
  content: ""; width: 26px; height: 1px; background: var(--tms-teal-300);
}
.login-brand h1 {
  font: 700 40px/1.08 var(--font-display);
  letter-spacing: -0.025em;
  margin: 0 0 18px;
  color: #fff;
  max-width: 14ch;
}
.login-brand h1 em { font-style: normal; color: var(--tms-sun-300); }
.login-brand-lead {
  font-size: 16px;
  line-height: 1.6;
  color: rgba(234,247,248,0.78);
  max-width: 42ch;
  margin: 0 0 28px;
}
.login-ticks { display: flex; flex-direction: column; gap: 12px; }
.login-tick { display: flex; align-items: center; gap: 12px; font-size: 14px; color: rgba(234,247,248,0.92); }
.login-tick i {
  width: 24px; height: 24px; flex-shrink: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--tms-teal-200);
}
.login-tick svg { width: 14px; height: 14px; }

.login-cobrand {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,0.14);
  display: flex; align-items: center; gap: 12px;
  position: relative; z-index: 1;
}
.login-cobrand span { font-size: 12px; letter-spacing: 0.06em; color: rgba(234,247,248,0.6); }
.login-cobrand b {
  font: 300 18px/1 var(--font-display);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #fff;
}

/* Right sign-in panel */
.login-form-wrap {
  display: flex; align-items: center; justify-content: center;
  padding: 48px;
}
.login-card { width: 100%; max-width: 392px; }
.login-card-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--tms-teal-50);
  color: var(--tms-teal-700);
  font: 700 11px/1 var(--font-display);
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 7px 12px; border-radius: 999px;
  margin-bottom: 18px;
}
.login-card-kicker svg { width: 13px; height: 13px; }
.login-card h2 {
  font: 700 28px/1.15 var(--font-display);
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  color: var(--product-fg);
}
.login-card > p.login-sub { margin: 0 0 28px; color: var(--product-fg-muted); font-size: 14.5px; }

.login-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.login-field label { font: 600 12.5px/1 var(--font-display); color: var(--product-fg); }
.login-input-wrap {
  display: flex; align-items: center; gap: 10px;
  background: #fff;
  border: 1px solid var(--product-border);
  border-radius: 11px;
  padding: 0 14px; height: 48px;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.login-input-wrap:focus-within {
  border-color: var(--tms-teal-500);
  box-shadow: 0 0 0 3px rgba(14,138,153,0.18);
}
.login-input-wrap svg { width: 17px; height: 17px; color: var(--product-fg-soft); flex-shrink: 0; }
.login-input-wrap input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font: 400 15px/1 var(--font-body); color: var(--product-fg); height: 100%;
}
.login-input-wrap input::placeholder { color: var(--product-fg-soft); }
.login-input-wrap button {
  border: 0; background: transparent; cursor: pointer; color: var(--product-fg-soft);
  display: inline-flex; padding: 4px;
}
.login-input-wrap button:hover { color: var(--product-fg-muted); }

.login-row {
  display: flex; align-items: center; justify-content: space-between;
  margin: 4px 0 24px;
}
.login-remember { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--product-fg-muted); cursor: pointer; }
.login-remember input { width: 16px; height: 16px; accent-color: var(--tms-teal-500); }
.login-forgot { font-size: 13px; color: var(--tms-teal-600); font-weight: 600; text-decoration: none; }
.login-forgot:hover { text-decoration: underline; text-underline-offset: 3px; }

.login-foot {
  margin-top: 26px;
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--product-fg-muted);
}
.login-foot .login-free-tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: #E5F4EC; color: var(--tms-success);
  font: 700 11px/1 var(--font-display); letter-spacing: 0.06em;
  padding: 5px 10px; border-radius: 999px;
}
.login-foot a { color: var(--tms-teal-600); font-weight: 600; text-decoration: none; }
.login-foot a:hover { text-decoration: underline; }

@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; }
  .login-brand { display: none; }
}

/* ============================================================
   TOP NAV
   ============================================================ */
.topnav {
  height: 64px;
  background: #fff;
  border-bottom: 1px solid var(--product-border);
  display: flex; align-items: center; gap: 14px;
  padding: 0 22px;
  position: sticky; top: 0; z-index: 40;
}
.topnav-menu {
  width: 40px; height: 40px;
  border-radius: 10px; border: 1px solid var(--product-border);
  background: #fff; color: var(--product-fg); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.topnav-menu:hover { background: var(--slate-50); }
.topnav-menu svg { width: 18px; height: 18px; }
.topnav-brand img { height: 26px; display: block; }
.topnav-divider { width: 1px; height: 26px; background: var(--product-border); margin: 0 2px; }
.topnav-title { margin: 0; font: 700 16px/1 var(--font-display); letter-spacing: -0.015em; color: var(--product-fg); }
.topnav-spacer { flex: 1; }

.topnav-free {
  display: inline-flex; align-items: center; gap: 7px;
  background: #E5F4EC; color: var(--tms-success);
  font: 700 11px/1 var(--font-display); letter-spacing: 0.1em;
  padding: 7px 12px; border-radius: 999px;
}
.topnav-free .dot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; }

.topnav-user { display: flex; align-items: center; gap: 10px; padding-left: 4px; }
.topnav-avatar {
  width: 38px; height: 38px; border-radius: 999px;
  background: var(--tms-teal-500); color: #fff;
  font: 700 13px/1 var(--font-display);
  display: inline-flex; align-items: center; justify-content: center;
}
.topnav-user-meta { display: flex; flex-direction: column; line-height: 1.2; }
.topnav-user-meta b { font: 600 13.5px/1.2 var(--font-display); color: var(--product-fg); }
.topnav-user-meta span { font-size: 11.5px; color: var(--product-fg-muted); }
.topnav-signout {
  width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--product-border); background: #fff;
  color: var(--product-fg-muted); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.topnav-signout:hover { background: var(--slate-50); color: var(--tms-red-500); border-color: var(--tms-red-200); }
.topnav-signout svg { width: 17px; height: 17px; }

/* ============================================================
   PAGE + HEADER CARD
   ============================================================ */
.page { max-width: 1200px; margin: 26px auto 64px; padding: 0 24px; display: flex; flex-direction: column; gap: 18px; }

.hubhead {
  background: var(--tms-teal-800);
  border-radius: 22px;
  padding: 30px 34px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  position: relative; overflow: hidden;
  color: #fff;
}
.hubhead::after {
  content: ""; position: absolute; right: 200px; top: -160px;
  width: 320px; height: 320px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
}
.hubhead-left { position: relative; z-index: 1; }
.hubhead-eyebrow {
  font: 700 11px/1 var(--font-display); letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--tms-teal-200); margin-bottom: 12px; display: block;
}
.hubhead-left h2 { margin: 0 0 8px; font: 700 30px/1.1 var(--font-display); letter-spacing: -0.02em; color: #fff; }
.hubhead-left p { margin: 0; font-size: 15px; color: rgba(234,247,248,0.78); max-width: 60ch; }
.hubhead-cobrand { position: relative; z-index: 1; text-align: right; flex-shrink: 0; }
.hubhead-cobrand small { display: block; font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(234,247,248,0.55); margin-bottom: 6px; }
.hubhead-cobrand b { font: 300 26px/1 var(--font-display); letter-spacing: 0.3em; text-transform: uppercase; color: #fff; }
.hubhead-cobrand span { display: block; font-size: 9px; letter-spacing: 0.34em; text-transform: uppercase; color: var(--tms-teal-200); margin-top: 5px; }

/* ============================================================
   TABS
   ============================================================ */
.tabs {
  display: flex; gap: 6px;
  background: #fff;
  border: 1px solid var(--product-border);
  border-radius: 16px;
  padding: 7px;
}
.tab {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 14px;
  border: 0; border-radius: 11px;
  background: transparent; cursor: pointer;
  font: 600 14.5px/1 var(--font-display); letter-spacing: -0.01em;
  color: var(--product-fg-muted);
  transition: background var(--dur-fast), color var(--dur-fast);
}
.tab svg { width: 18px; height: 18px; stroke-width: 1.9; }
.tab:hover { background: var(--slate-50); color: var(--product-fg); }
.tab.is-on { background: var(--tms-teal-500); color: #fff; }
.tab .tab-count {
  font-size: 12px; font-weight: 700;
  background: rgba(255,255,255,0.22); color: inherit;
  padding: 2px 8px; border-radius: 999px;
}
.tab:not(.is-on) .tab-count { background: var(--slate-100); color: var(--product-fg-muted); }

/* ============================================================
   SECTION HEADER + FILTER CHIPS
   ============================================================ */
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 6px; }
.sec-head h3 { margin: 0 0 4px; font: 700 19px/1.15 var(--font-display); letter-spacing: -0.015em; color: var(--product-fg); }
.sec-head p { margin: 0; font-size: 13.5px; color: var(--product-fg-muted); max-width: 70ch; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 8px 15px; border-radius: 999px;
  border: 1px solid var(--product-border); background: #fff;
  font: 600 13px/1 var(--font-display); color: var(--product-fg-muted);
  cursor: pointer; transition: all var(--dur-fast);
}
.chip:hover { border-color: var(--slate-300); color: var(--product-fg); }
.chip.is-on { background: var(--slate-900); color: #fff; border-color: var(--slate-900); }

/* ============================================================
   ASSET ROW (the screenshot-faithful card)
   ============================================================ */
.asset-list { display: flex; flex-direction: column; gap: 14px; }
.asset {
  background: #fff;
  border: 1px solid var(--product-border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out), border-color var(--dur-med);
}
.asset:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--slate-300); }

.asset-top { display: flex; gap: 18px; }
.asset-thumb {
  width: 132px; height: 104px; flex-shrink: 0;
  border-radius: 12px; overflow: hidden;
  position: relative;
  background: var(--tms-teal-800);
}
.asset-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.asset-thumb-tag {
  position: absolute; left: 8px; top: 8px;
  background: rgba(15,28,49,0.72); color: #fff;
  font: 700 9.5px/1 var(--font-display); letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 6px;
  backdrop-filter: blur(2px);
}

.asset-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.asset-title { margin: 0 0 3px; font: 700 17px/1.2 var(--font-display); letter-spacing: -0.015em; color: var(--product-fg); }
.asset-sub { margin: 0 0 10px; font-size: 13px; color: var(--product-fg-muted); }

.asset-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px 5px 9px; border-radius: 999px;
  background: #fff; border: 1px solid var(--product-border);
  font: 600 12px/1 var(--font-body); color: var(--product-fg-muted);
}
.pill .pdot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.pill--ready { color: var(--tms-teal-600); border-color: var(--tms-teal-200); background: var(--tms-teal-50); }
.pill--cat { color: var(--slate-600); }
.pill--deal { color: var(--tms-red-600); border-color: var(--tms-red-200); background: var(--tms-red-50); }
.pill svg { width: 13px; height: 13px; }

.asset-price { font: 700 15px/1 var(--font-display); color: var(--tms-teal-700); margin-left: 2px; }
.asset-price small { font-weight: 500; font-size: 11.5px; color: var(--product-fg-soft); }

.asset-caption {
  margin: 12px 0 0; font-size: 13px; line-height: 1.55; color: var(--slate-600);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  max-width: 78ch;
}

/* meta chips row for emails (dates/ship) */
.asset-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 11px; }
.metatag {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--slate-50); border: 1px solid var(--slate-100);
  color: var(--slate-600); font: 500 12px/1 var(--font-body);
  padding: 5px 10px; border-radius: 7px;
}
.metatag svg { width: 12px; height: 12px; color: var(--product-fg-soft); }

/* action bar */
.asset-actions {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 16px; padding-top: 15px;
  border-top: 1px solid var(--slate-100);
}
.act {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 14px; border-radius: 9px;
  border: 1px solid var(--product-border); background: #fff;
  font: 600 13px/1 var(--font-display); color: var(--product-fg);
  cursor: pointer; transition: all var(--dur-fast);
}
.act svg { width: 15px; height: 15px; stroke-width: 2; }
.act:hover { background: var(--slate-50); border-color: var(--slate-300); }
.act--primary { background: var(--tms-teal-500); color: #fff; border-color: var(--tms-teal-500); }
.act--primary:hover { background: var(--tms-teal-600); border-color: var(--tms-teal-600); }
.act--teal { color: var(--tms-teal-700); border-color: var(--tms-teal-200); }
.act--teal:hover { background: var(--tms-teal-50); }
.act--ok { background: #E5F4EC !important; color: var(--tms-success) !important; border-color: #B4DDC4 !important; }
.act-spacer { flex: 1; }

/* locked (free-tier) action */
.act--lock {
  background: repeating-linear-gradient(135deg, #FFF9E8, #FFF9E8 8px, #FFF4D6 8px, #FFF4D6 16px);
  color: #8a6d12; border-color: #F0DCA0;
}
.act--lock:hover { border-color: var(--tms-sun-500); color: #6b540c; }
.act--lock svg { color: var(--tms-sun-500); }

/* ============================================================
   UPGRADE NUDGE
   ============================================================ */
.nudge {
  display: flex; align-items: center; gap: 18px;
  background: #fff; border: 1px solid #F0DCA0;
  border-radius: 16px; padding: 18px 22px;
  margin-top: 4px;
}
.nudge-ico {
  width: 46px; height: 46px; flex-shrink: 0; border-radius: 12px;
  background: var(--tms-sun-100); color: var(--tms-sun-500);
  display: inline-flex; align-items: center; justify-content: center;
}
.nudge-ico svg { width: 22px; height: 22px; }
.nudge-text { flex: 1; }
.nudge-text h4 { margin: 0 0 3px; font: 700 15px/1.2 var(--font-display); letter-spacing: -0.01em; color: var(--product-fg); }
.nudge-text p { margin: 0; font-size: 13px; color: var(--product-fg-muted); }

/* ============================================================
   UPGRADE MODAL
   ============================================================ */
.modal-bg {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(15,28,49,0.5); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  animation: fade-in 160ms var(--ease-out);
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #fff; border-radius: 20px; width: 100%; max-width: 480px;
  box-shadow: var(--shadow-lg); overflow: hidden;
  animation: modal-in 240ms var(--ease-out);
}
@keyframes modal-in { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-head {
  background: var(--tms-teal-800); color: #fff;
  padding: 26px 26px 22px; position: relative;
}
.modal-head .badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--tms-sun-500); color: #3a2c05;
  font: 700 10.5px/1 var(--font-display); letter-spacing: 0.1em; text-transform: uppercase;
  padding: 6px 11px; border-radius: 999px; margin-bottom: 14px;
}
.modal-head .badge svg { width: 13px; height: 13px; }
.modal-head h3 { margin: 0 0 6px; font: 700 23px/1.18 var(--font-display); letter-spacing: -0.02em; }
.modal-head p { margin: 0; font-size: 14px; color: rgba(234,247,248,0.8); }
.modal-close {
  position: absolute; top: 18px; right: 18px;
  width: 32px; height: 32px; border-radius: 9px; border: 0; cursor: pointer;
  background: rgba(255,255,255,0.14); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: rgba(255,255,255,0.24); }
.modal-close svg { width: 16px; height: 16px; }
.modal-body { padding: 24px 26px; }
.modal-feat { display: flex; align-items: flex-start; gap: 13px; padding: 11px 0; }
.modal-feat:not(:last-child) { border-bottom: 1px solid var(--slate-100); }
.modal-feat i {
  width: 30px; height: 30px; flex-shrink: 0; border-radius: 8px;
  background: var(--tms-teal-50); color: var(--tms-teal-600);
  display: inline-flex; align-items: center; justify-content: center; margin-top: 1px;
}
.modal-feat svg { width: 16px; height: 16px; }
.modal-feat b { display: block; font: 600 14px/1.3 var(--font-display); color: var(--product-fg); }
.modal-feat span { font-size: 12.5px; color: var(--product-fg-muted); }
.modal-foot { padding: 18px 26px 24px; display: flex; flex-direction: column; gap: 10px; }
.modal-foot .fineprint { text-align: center; font-size: 12px; color: var(--product-fg-soft); }

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: var(--slate-900); color: #fff;
  padding: 12px 18px; border-radius: 999px;
  font: 500 13.5px/1 var(--font-body);
  box-shadow: var(--shadow-lg); z-index: 200;
  display: inline-flex; align-items: center; gap: 10px;
  animation: toast-in 220ms var(--ease-out);
}
@keyframes toast-in { from { transform: translate(-50%, 14px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.toast svg { width: 16px; height: 16px; color: var(--tms-teal-300); }
.toast.is-locked svg { color: var(--tms-sun-300); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 760px) {
  .topnav-title, .topnav-divider { display: none; }
  .topnav-user-meta { display: none; }
  .hubhead { flex-direction: column; align-items: flex-start; }
  .hubhead-cobrand { text-align: left; }
  .tabs { flex-direction: column; }
  .tab { justify-content: flex-start; }
  .asset-top { flex-direction: column; }
  .asset-thumb { width: 100%; height: 150px; }
  .sec-head { flex-direction: column; align-items: flex-start; }
}
