:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #fbfbfb;
  --surface-3: #eef1f4;
  --ink: #0d2746;
  --ink-2: #1f344d;
  --muted: #6e7f92;
  --muted-2: #93a1b1;
  --line: #dfe4e9;
  --line-strong: #c8d1dc;
  --brand: #5abd32;
  --brand-dark: #3d9822;
  --brand-soft: #eef9e9;
  --brand-glow: rgba(90, 189, 50, .16);
  --accent: #3747ff;
  --accent-soft: #eef1ff;
  --danger: #b42318;
  --danger-soft: #fee4e2;
  --ok: #15b85f;
  --ok-soft: #e7f8ed;
  --warn-soft: #fff7d6;
  --shadow: 0 2px 9px rgba(13, 39, 70, .08);
  --shadow-lg: 0 14px 36px rgba(13, 39, 70, .16);
  --radius: 4px;
}

/* Figma design application: shared logged-in Cardbook workspace. */
:root {
  --bg: #f9fafb;
  --brand: #7ac943;
  --brand-dark: #6bb839;
  --brand-soft: rgba(122, 201, 67, .1);
  --ink: #1f2937;
  --ink-2: #374151;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --shadow: 2px 2px 4px rgba(0, 0, 0, .08);
  --shadow-lg: 0 18px 42px rgba(31, 41, 55, .14);
  --radius: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
}

button,
input,
select,
textarea,
.panel,
.card,
.modal,
.signup-card,
.sample-card,
.empty {
  border-radius: 0;
}

.auth {
  background: #f9fafb;
}

.auth-header {
  min-height: 74px;
  padding: 12px 42px;
  border-bottom-color: var(--line);
}

.login-strip input,
.login-strip button {
  min-height: 38px;
}

.login-strip button {
  min-width: 118px;
}

.home-grid {
  max-width: 1400px;
  width: calc(100% - 48px);
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 34px;
  padding-top: 34px;
}

.home-hero h1 {
  max-width: 560px;
  font-size: clamp(31px, 3.2vw, 43px);
  line-height: 1.18;
  margin-bottom: 30px;
}

.sample-card {
  min-height: 140px;
  border-top-width: 0;
  box-shadow: var(--shadow);
}

.sample-card::after {
  opacity: .35;
}

.signup-card {
  top: 92px;
  border-top-width: 0;
  padding: 24px;
  box-shadow: var(--shadow);
}

.signup-card h2 {
  font-size: 18px;
}

.signup-card ul {
  grid-template-columns: 1fr;
  gap: 7px;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  grid-template-rows: 74px minmax(0, 1fr);
  background: #f9fafb;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  grid-column: 1 / -1;
  min-height: 74px;
  padding: 12px 32px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.app-header .brand-mark {
  width: 48px;
  height: 48px;
}

.app-header .brand h1 {
  font-size: 28px;
}

.app-header .brand p {
  color: var(--brand);
  font-size: 16px;
}

.user-strip {
  display: flex;
  align-items: center;
  gap: 20px;
}

.user-meta {
  display: grid;
  gap: 2px;
  text-align: right;
}

.user-meta strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.2;
}

.user-meta span {
  color: var(--muted);
  font-size: 12px;
}

.user-meta em {
  color: var(--brand);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.sidebar {
  position: sticky;
  top: 74px;
  align-self: start;
  height: calc(100vh - 74px);
  padding: 16px;
  background: #fff;
  border-right: 1px solid var(--line);
  border-bottom: 0;
  overflow: auto;
}

.nav {
  display: grid;
  gap: 4px;
}

.nav button {
  justify-content: flex-start;
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  background: transparent;
  color: var(--ink-2);
  border: 0;
  border-left: 3px solid transparent;
  box-shadow: none;
  font-size: 14px;
  font-weight: 700;
}

.nav button.active {
  background: var(--brand);
  color: #fff;
  border-left-color: var(--brand);
}

.nav button:hover {
  background: #f3f4f6;
  color: var(--brand-dark);
  border-left-color: var(--brand);
  box-shadow: none;
}

.nav button.active:hover {
  background: var(--brand-dark);
  color: #fff;
}

.main {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px 32px 52px;
}

.topbar {
  padding: 0;
  margin-bottom: 26px;
  border-bottom: 0;
}

.topbar h2 {
  font-size: clamp(28px, 3vw, 40px);
}

.topbar p {
  color: var(--muted);
  font-size: 15px;
}

.toolbar {
  min-width: min(500px, 100%);
}

.panel,
.card {
  border-color: var(--line);
  box-shadow: var(--shadow);
}

.panel::before,
.card::before {
  display: none;
}

.panel {
  padding: 24px;
}

.card {
  padding: 18px;
}

.metric {
  min-height: 128px;
  background: #fff;
}

.metric strong {
  color: var(--ink);
  font-size: 40px;
}

.pill {
  border-radius: 0;
}

.card h3,
.panel h3,
.modal h3 {
  color: var(--ink);
}

.card-head {
  align-items: flex-start;
}

.card-logo {
  width: 52px;
  height: 52px;
}

.divider {
  background: var(--line);
}

.empty {
  background: #fff;
  border-color: var(--line-strong);
}

.modal-backdrop {
  background: rgba(17, 24, 39, .5);
}

.modal {
  box-shadow: var(--shadow-lg);
}

.table th {
  background: #fff;
}

@media (max-width: 960px) {
  .shell {
    display: block;
  }

  .app-header {
    position: static;
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    padding: 14px 18px;
  }

  .user-strip {
    justify-content: space-between;
  }

  .user-meta {
    text-align: left;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 10px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: visible;
  }

  .nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .nav button {
    flex: 0 0 auto;
    width: auto;
    border-left: 0;
    border-bottom: 3px solid transparent;
  }

  .nav button.active {
    border-bottom-color: var(--brand);
  }

  .main {
    width: 100%;
    padding: 22px 16px 44px;
  }

  .home-grid {
    width: min(760px, calc(100% - 32px));
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .auth-header {
    padding: 14px 16px;
  }

  .brand h1,
  .app-header .brand h1 {
    font-size: 24px;
  }

  .brand p,
  .app-header .brand p {
    font-size: 15px;
  }

  .home-grid {
    width: calc(100% - 28px);
  }

  .home-hero h1 {
    font-size: 30px;
  }

  .sample-card {
    min-height: 140px;
  }

  .user-strip {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .user-strip button {
    width: 100%;
  }

  .panel,
  .card,
  .modal {
    padding: 16px;
  }
}

/* Final responsive correction: keep the internal app sidebar until phone widths. */
@media (min-width: 761px) {
  .shell {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    grid-template-rows: 74px minmax(0, 1fr);
  }

  .app-header {
    align-items: center;
    flex-direction: row;
    padding: 12px 32px;
  }

  .app-user {
    margin-left: auto;
  }

  .sidebar {
    position: sticky;
    top: 74px;
    height: calc(100vh - 74px);
    padding: 16px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    overflow: auto;
  }

  .nav {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .nav button {
    width: 100%;
    justify-content: flex-start;
    border-left: 3px solid transparent;
    border-bottom: 0;
  }

  .nav button.active,
  .nav button:hover {
    border-left-color: var(--primary);
    border-bottom-color: transparent;
  }

  .main {
    width: 100%;
    padding: 30px 32px 52px;
  }

  .cols-3,
  .cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1181px) {
  .cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .shell {
    display: block;
  }

  .app-header {
    align-items: stretch;
    flex-direction: column;
    padding: 16px;
  }

  .app-user {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 0 16px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .nav button {
    flex: 0 0 auto;
    width: auto;
    min-height: 42px;
    border-left: 0;
    border-bottom: 3px solid transparent;
  }

  .nav button.active,
  .nav button:hover {
    border-left-color: transparent;
    border-bottom-color: var(--primary);
  }

  .main {
    width: calc(100% - 32px);
    padding: 20px 0 36px;
  }

  .cols-2,
  .cols-3,
  .cols-4 {
    grid-template-columns: 1fr;
  }
}

/* Absolute final Figma layer. Keep this as the last block. */
:root {
  --bg: #f9fafb;
  --surface: #fff;
  --ink: #1f2937;
  --ink-2: #374151;
  --muted: #6b7280;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --brand: #7ac943;
  --primary: #7ac943;
  --brand-dark: #6bb839;
  --brand-soft: rgba(122, 201, 67, .1);
  --shadow: 2px 2px 4px rgba(0, 0, 0, .1);
  --radius: 0;
}

html,
body,
.auth,
.shell {
  background: #f9fafb !important;
}

body {
  color: var(--ink) !important;
  font-family: Arial, Helvetica, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

button,
input,
select,
textarea,
.panel,
.card,
.modal,
.signup-card,
.sample-card,
.empty,
.pill,
.card-logo,
.sample-photo,
.notice {
  border-radius: 0 !important;
}

button {
  background: var(--brand) !important;
  border-color: var(--brand) !important;
  color: #fff !important;
  box-shadow: none !important;
}

button:hover {
  background: var(--brand-dark) !important;
  border-color: var(--brand-dark) !important;
  box-shadow: none !important;
}

button.secondary,
button.ghost {
  background: #fff !important;
  color: var(--ink-2) !important;
  border-color: var(--line-strong) !important;
}

button.secondary:hover,
button.ghost:hover {
  background: #f9fafb !important;
  color: var(--ink) !important;
}

input,
select,
textarea {
  border-color: var(--line-strong) !important;
  background: #fff !important;
  box-shadow: none !important;
}

.auth-header,
.app-header {
  min-height: 74px !important;
  padding: 12px 24px !important;
  background: #fff !important;
  border-bottom: 1px solid var(--line) !important;
  box-shadow: none !important;
}

.brand-mark {
  width: 48px !important;
  height: 48px !important;
  border-radius: 0 !important;
  background:
    radial-gradient(circle at 50% 50%, #1f2937 0 22%, transparent 23%),
    repeating-conic-gradient(from 0deg, #1f2937 0 8deg, transparent 8deg 18deg) !important;
}

.brand-mark::after {
  display: none !important;
}

.brand h1 {
  color: var(--ink) !important;
  font-size: 28px !important;
}

.brand p {
  color: var(--brand) !important;
  font-size: 16px !important;
}

.home-grid {
  width: calc(100% - 48px) !important;
  max-width: 1400px !important;
  grid-template-columns: minmax(0, 1fr) 320px !important;
  gap: 34px !important;
  padding: 34px 0 56px !important;
}

.home-hero h1 {
  max-width: 560px !important;
  margin-bottom: 30px !important;
  color: var(--ink) !important;
  font-size: clamp(31px, 3.2vw, 43px) !important;
  line-height: 1.18 !important;
}

.sample-grid {
  width: min(780px, 100%) !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

.sample-card {
  min-height: 140px !important;
  aspect-ratio: auto !important;
  grid-template-columns: 68px minmax(0, 1fr) !important;
  background: #fff !important;
  border: 1px solid var(--line) !important;
  border-top: 0 !important;
  box-shadow: var(--shadow) !important;
  transform: none !important;
}

.signup-card {
  width: 320px !important;
  max-width: 100% !important;
  top: 92px !important;
  padding: 24px !important;
  background: #fff !important;
  border: 1px solid var(--line) !important;
  border-top: 0 !important;
  box-shadow: var(--shadow) !important;
}

.signup-card h2 {
  color: var(--ink) !important;
  font-size: 18px !important;
}

.signup-card ul {
  grid-template-columns: 1fr !important;
}

.shell {
  display: grid !important;
  grid-template-columns: 256px minmax(0, 1fr) !important;
  grid-template-rows: 74px minmax(0, 1fr) !important;
}

.app-header {
  grid-column: 1 / -1 !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 30 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.sidebar {
  grid-row: 2 !important;
  grid-column: 1 !important;
  position: sticky !important;
  top: 74px !important;
  height: calc(100vh - 74px) !important;
  padding: 16px !important;
  background: #fff !important;
  border-right: 1px solid var(--line) !important;
  border-bottom: 0 !important;
}

.nav {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 4px !important;
}

.nav button {
  width: 100% !important;
  justify-content: flex-start !important;
  background: transparent !important;
  color: var(--ink-2) !important;
  border: 0 !important;
  border-left: 3px solid transparent !important;
  box-shadow: none !important;
}

.nav button::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  opacity: .72;
}

.nav button.active {
  background: var(--brand) !important;
  color: #fff !important;
  border-left-color: var(--brand) !important;
}

.nav button:hover {
  background: #f3f4f6 !important;
  color: var(--brand-dark) !important;
  border-left-color: var(--brand) !important;
}

.main {
  grid-row: 2 !important;
  grid-column: 2 !important;
  width: 100% !important;
  max-width: 1180px !important;
  margin: 0 auto !important;
  padding: 30px 32px 52px !important;
}

.topbar {
  display: block !important;
  padding: 0 !important;
  margin-bottom: 26px !important;
  border-bottom: 0 !important;
}

.topbar h2 {
  color: var(--ink) !important;
  font-size: clamp(28px, 3vw, 40px) !important;
}

.topbar p {
  color: var(--muted) !important;
  font-size: 15px !important;
}

.grid {
  gap: 24px !important;
}

.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.panel,
.card {
  background: #fff !important;
  border: 1px solid var(--line) !important;
  box-shadow: var(--shadow) !important;
}

.panel::before,
.card::before {
  display: none !important;
}

.panel {
  padding: 24px !important;
}

.card {
  padding: 18px !important;
}

.metric {
  min-height: 128px !important;
  display: block !important;
  background: #fff !important;
}

.metric strong {
  margin-top: 8px !important;
  color: var(--brand) !important;
  font-size: 40px !important;
}

.recent-panel {
  margin-top: 24px !important;
}

.modal-backdrop {
  background: rgba(17, 24, 39, .5) !important;
}

@media (max-width: 1024px) {
  .shell {
    display: block !important;
  }

  .sidebar {
    position: static !important;
    height: auto !important;
    padding: 10px 14px !important;
    border-right: 0 !important;
    border-bottom: 1px solid var(--line) !important;
  }

  .nav {
    display: flex !important;
    gap: 8px !important;
    overflow-x: auto !important;
  }

  .nav button {
    flex: 0 0 auto !important;
    width: auto !important;
    border-left: 0 !important;
    border-bottom: 3px solid transparent !important;
  }

  .main {
    max-width: none !important;
    padding: 22px 16px 44px !important;
  }

  .home-grid {
    width: min(760px, calc(100% - 32px)) !important;
    grid-template-columns: 1fr !important;
  }

  .signup-card {
    width: 100% !important;
  }

  .cols-4,
  .cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 620px) {
  .auth-header,
  .app-header,
  .user-strip {
    align-items: stretch !important;
    flex-direction: column !important;
  }

  .login-strip,
  .signup-card .form,
  .sample-grid,
  .cols-4,
  .cols-3,
  .cols-2 {
    grid-template-columns: 1fr !important;
  }

  .user-strip button {
    width: 100% !important;
  }
}

/* True final Figma Make parity layer. This must stay at EOF. */
:root {
  --bg: #f9fafb;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --surface-3: #f3f4f6;
  --ink: #1f2937;
  --ink-2: #374151;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --brand: #7ac943;
  --primary: #7ac943;
  --brand-dark: #6bb839;
  --brand-soft: rgba(122, 201, 67, .1);
  --shadow: 2px 2px 4px rgba(0, 0, 0, .1);
  --shadow-lg: 0 18px 42px rgba(31, 41, 55, .14);
  --radius: 0;
}

html,
body {
  background: var(--bg) !important;
}

body {
  color: var(--ink) !important;
  font-family: Arial, Helvetica, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 15px;
}

button,
input,
select,
textarea,
.panel,
.card,
.modal,
.signup-card,
.sample-card,
.empty,
.pill {
  border-radius: 0 !important;
}

button {
  min-height: 40px;
  border-color: var(--brand) !important;
  background: var(--brand) !important;
  color: #fff !important;
  box-shadow: none !important;
  font-weight: 700;
}

button:hover {
  background: var(--brand-dark) !important;
  border-color: var(--brand-dark) !important;
  box-shadow: none !important;
}

button.secondary,
button.ghost {
  background: #fff !important;
  color: var(--ink-2) !important;
  border-color: var(--line-strong) !important;
}

button.secondary:hover,
button.ghost:hover {
  background: #f9fafb !important;
  color: var(--ink) !important;
}

input,
select,
textarea {
  border-color: var(--line-strong) !important;
  background: #fff !important;
  box-shadow: none !important;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 3px rgba(122, 201, 67, .14) !important;
}

.brand {
  gap: 12px !important;
}

.brand-mark {
  width: 48px !important;
  height: 48px !important;
  border-radius: 0 !important;
  background:
    radial-gradient(circle at 50% 50%, #1f2937 0 22%, transparent 23%),
    conic-gradient(from 0deg, #1f2937 0 8deg, transparent 8deg 18deg, #1f2937 18deg 26deg, transparent 26deg 36deg, #1f2937 36deg 44deg, transparent 44deg 54deg, #1f2937 54deg 62deg, transparent 62deg 72deg, #1f2937 72deg 80deg, transparent 80deg 90deg, #1f2937 90deg 98deg, transparent 98deg 108deg, #1f2937 108deg 116deg, transparent 116deg 126deg, #1f2937 126deg 134deg, transparent 134deg 144deg, #1f2937 144deg 152deg, transparent 152deg 162deg, #1f2937 162deg 170deg, transparent 170deg 180deg, #1f2937 180deg 188deg, transparent 188deg 198deg, #1f2937 198deg 206deg, transparent 206deg 216deg, #1f2937 216deg 224deg, transparent 224deg 234deg, #1f2937 234deg 242deg, transparent 242deg 252deg, #1f2937 252deg 260deg, transparent 260deg 270deg, #1f2937 270deg 278deg, transparent 278deg 288deg, #1f2937 288deg 296deg, transparent 296deg 306deg, #1f2937 306deg 314deg, transparent 314deg 324deg, #1f2937 324deg 332deg, transparent 332deg 342deg, #1f2937 342deg 350deg, transparent 350deg 360deg) !important;
}

.brand-mark::after {
  display: none !important;
}

.brand h1 {
  color: var(--ink) !important;
  font-size: 28px !important;
  line-height: 1 !important;
}

.brand p {
  color: var(--brand) !important;
  font-size: 16px !important;
}

.auth {
  min-height: 100vh;
  background: var(--bg) !important;
}

.auth-header,
.app-header {
  min-height: 74px !important;
  padding: 12px 24px !important;
  background: #fff !important;
  border-bottom: 1px solid var(--line) !important;
  box-shadow: none !important;
}

.auth-header {
  justify-content: space-between !important;
}

.login-strip {
  grid-template-columns: minmax(180px, 200px) minmax(180px, 200px) auto !important;
  gap: 8px !important;
}

.login-strip input,
.login-strip button {
  min-height: 38px !important;
}

.home-grid {
  width: calc(100% - 48px) !important;
  max-width: 1400px !important;
  grid-template-columns: minmax(0, 1fr) 320px !important;
  gap: 34px !important;
  padding: 34px 0 56px !important;
}

.home-hero h1 {
  max-width: 560px !important;
  margin-bottom: 30px !important;
  color: var(--ink) !important;
  font-size: clamp(31px, 3.2vw, 43px) !important;
  line-height: 1.18 !important;
}

.sample-grid {
  width: min(780px, 100%) !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

.sample-card {
  min-height: 140px !important;
  aspect-ratio: auto !important;
  grid-template-columns: 68px minmax(0, 1fr) !important;
  background: #fff !important;
  border: 1px solid var(--line) !important;
  border-top: 0 !important;
  box-shadow: var(--shadow) !important;
  transform: none !important;
}

.sample-card:hover {
  transform: none !important;
  box-shadow: var(--shadow) !important;
}

.sample-photo {
  width: 58px !important;
  height: 58px !important;
  border-radius: 0 !important;
}

.signup-card {
  width: 320px !important;
  max-width: 100% !important;
  top: 92px !important;
  padding: 24px !important;
  background: #fff !important;
  border: 1px solid var(--line) !important;
  border-top: 0 !important;
  box-shadow: var(--shadow) !important;
}

.signup-card h2 {
  margin-bottom: 22px !important;
  color: var(--ink) !important;
  font-size: 18px !important;
}

.signup-card ul {
  grid-template-columns: 1fr !important;
  gap: 7px !important;
}

.signup-card .form {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.shell {
  min-height: 100vh !important;
  display: grid !important;
  grid-template-columns: 256px minmax(0, 1fr) !important;
  grid-template-rows: 74px minmax(0, 1fr) !important;
  background: var(--bg) !important;
}

.app-header {
  grid-column: 1 / -1 !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 30 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.user-strip {
  display: flex !important;
  align-items: center !important;
  gap: 24px !important;
}

.user-meta {
  text-align: right !important;
}

.user-meta strong {
  color: var(--ink) !important;
  font-size: 14px !important;
}

.user-meta span {
  color: var(--muted) !important;
  font-size: 12px !important;
}

.user-meta em {
  color: var(--brand) !important;
  font-size: 12px !important;
  font-style: normal !important;
  font-weight: 700 !important;
}

.sidebar {
  grid-row: 2 !important;
  grid-column: 1 !important;
  position: sticky !important;
  top: 74px !important;
  align-self: start !important;
  height: calc(100vh - 74px) !important;
  padding: 16px !important;
  background: #fff !important;
  border-right: 1px solid var(--line) !important;
  border-bottom: 0 !important;
  overflow: auto !important;
}

.nav {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 4px !important;
}

.nav button {
  width: 100% !important;
  min-height: 46px !important;
  justify-content: flex-start !important;
  padding: 12px 14px !important;
  background: transparent !important;
  color: var(--ink-2) !important;
  border: 0 !important;
  border-left: 3px solid transparent !important;
  font-size: 14px !important;
  box-shadow: none !important;
}

.nav button::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  opacity: .72;
}

.nav button.active {
  background: var(--brand) !important;
  color: #fff !important;
  border-left-color: var(--brand) !important;
}

.nav button:hover {
  background: #f3f4f6 !important;
  color: var(--brand-dark) !important;
  border-left-color: var(--brand) !important;
}

.nav button.active:hover {
  background: var(--brand-dark) !important;
  color: #fff !important;
}

.main {
  grid-row: 2 !important;
  grid-column: 2 !important;
  width: 100% !important;
  max-width: 1180px !important;
  margin: 0 auto !important;
  padding: 30px 32px 52px !important;
}

.topbar {
  display: block !important;
  padding: 0 !important;
  margin-bottom: 26px !important;
  border-bottom: 0 !important;
}

.topbar h2 {
  color: var(--ink) !important;
  font-size: clamp(28px, 3vw, 40px) !important;
}

.topbar p {
  color: var(--muted) !important;
  font-size: 15px !important;
}

.grid {
  gap: 24px !important;
}

.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.panel,
.card {
  background: #fff !important;
  border: 1px solid var(--line) !important;
  box-shadow: var(--shadow) !important;
}

.panel::before,
.card::before {
  display: none !important;
}

.panel {
  padding: 24px !important;
}

.card {
  padding: 18px !important;
}

.metric {
  min-height: 128px !important;
  display: block !important;
  background: #fff !important;
}

.metric strong {
  margin-top: 8px !important;
  color: var(--brand) !important;
  font-size: 40px !important;
}

.metric > .pill {
  margin-top: 14px !important;
}

.panel h3,
.card h3,
.modal h3 {
  color: var(--ink) !important;
}

.recent-panel {
  margin-top: 24px !important;
}

.card-logo,
.sample-photo,
.empty,
.notice {
  border-radius: 0 !important;
}

.modal-backdrop {
  background: rgba(17, 24, 39, .5) !important;
}

.table th {
  background: #fff !important;
}

@media (max-width: 1024px) {
  .shell {
    display: block !important;
  }

  .app-header {
    position: sticky !important;
  }

  .sidebar {
    position: static !important;
    height: auto !important;
    padding: 10px 14px !important;
    border-right: 0 !important;
    border-bottom: 1px solid var(--line) !important;
    overflow: visible !important;
  }

  .nav {
    display: flex !important;
    gap: 8px !important;
    overflow-x: auto !important;
    padding-bottom: 3px !important;
  }

  .nav button {
    flex: 0 0 auto !important;
    width: auto !important;
    border-left: 0 !important;
    border-bottom: 3px solid transparent !important;
  }

  .main {
    width: 100% !important;
    max-width: none !important;
    padding: 22px 16px 44px !important;
  }

  .home-grid {
    width: min(760px, calc(100% - 32px)) !important;
    grid-template-columns: 1fr !important;
  }

  .signup-card {
    width: 100% !important;
  }

  .cols-4,
  .cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 620px) {
  .auth-header,
  .app-header {
    align-items: stretch !important;
    flex-direction: column !important;
    padding: 14px 16px !important;
  }

  .brand h1,
  .app-header .brand h1 {
    font-size: 24px !important;
  }

  .brand p,
  .app-header .brand p {
    font-size: 15px !important;
  }

  .login-strip,
  .signup-card .form {
    grid-template-columns: 1fr !important;
  }

  .sample-grid,
  .cols-4,
  .cols-3,
  .cols-2 {
    grid-template-columns: 1fr !important;
  }

  .user-strip {
    align-items: stretch !important;
    flex-direction: column !important;
    gap: 10px !important;
  }

  .user-strip button {
    width: 100% !important;
  }

  .panel,
  .card,
  .modal {
    padding: 16px !important;
  }
}

/* Final cascade layer for the applied Figma design. Kept at EOF so it wins over legacy MVP CSS. */
:root {
  --bg: #f9fafb;
  --brand: #7ac943;
  --brand-dark: #6bb839;
  --brand-soft: rgba(122, 201, 67, .1);
  --ink: #1f2937;
  --ink-2: #374151;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --shadow: 2px 2px 4px rgba(0, 0, 0, .08);
  --shadow-lg: 0 18px 42px rgba(31, 41, 55, .14);
  --radius: 0;
}

body { background: var(--bg); color: var(--ink); }
button, input, select, textarea, .panel, .card, .modal, .signup-card, .sample-card, .empty, .pill { border-radius: 0; }

.auth { background: #f9fafb; }
.auth-header { min-height: 74px; padding: 12px 42px; border-bottom-color: var(--line); }
.login-strip input, .login-strip button { min-height: 38px; }
.home-grid { max-width: 1400px; width: calc(100% - 48px); grid-template-columns: minmax(0, 1fr) 320px; gap: 34px; padding-top: 34px; }
.home-hero h1 { max-width: 560px; font-size: clamp(31px, 3.2vw, 43px); line-height: 1.18; margin-bottom: 30px; }
.sample-card { min-height: 140px; border-top-width: 0; box-shadow: var(--shadow); }
.signup-card { top: 92px; border-top-width: 0; padding: 24px; box-shadow: var(--shadow); }
.signup-card h2 { font-size: 18px; }
.signup-card ul { grid-template-columns: 1fr; gap: 7px; }

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  grid-template-rows: 74px minmax(0, 1fr);
  background: #f9fafb;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  grid-column: 1 / -1;
  min-height: 74px;
  padding: 12px 32px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.app-header .brand-mark { width: 48px; height: 48px; }
.app-header .brand h1 { font-size: 28px; }
.app-header .brand p { color: var(--brand); font-size: 16px; }

.user-strip { display: flex; align-items: center; gap: 20px; }
.user-meta { display: grid; gap: 2px; text-align: right; }
.user-meta strong { color: var(--ink); font-size: 14px; line-height: 1.2; }
.user-meta span { color: var(--muted); font-size: 12px; }
.user-meta em { color: var(--brand); font-size: 12px; font-style: normal; font-weight: 800; }

.sidebar {
  position: sticky;
  top: 74px;
  align-self: start;
  height: calc(100vh - 74px);
  padding: 16px;
  background: #fff;
  border-right: 1px solid var(--line);
  border-bottom: 0;
  overflow: auto;
}

.nav { display: grid; gap: 4px; }
.nav button {
  justify-content: flex-start;
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  background: transparent;
  color: var(--ink-2);
  border: 0;
  border-left: 3px solid transparent;
  box-shadow: none;
  font-size: 14px;
  font-weight: 700;
}
.nav button.active { background: var(--brand); color: #fff; border-left-color: var(--brand); }
.nav button:hover { background: #f3f4f6; color: var(--brand-dark); border-left-color: var(--brand); box-shadow: none; }
.nav button.active:hover { background: var(--brand-dark); color: #fff; }

.main { width: 100%; max-width: 1180px; margin: 0 auto; padding: 30px 32px 52px; }
.topbar { padding: 0; margin-bottom: 26px; border-bottom: 0; }
.topbar h2 { font-size: clamp(28px, 3vw, 40px); }
.topbar p { color: var(--muted); font-size: 15px; }
.toolbar { min-width: min(500px, 100%); }

.panel, .card { border-color: var(--line); box-shadow: var(--shadow); }
.panel::before, .card::before { display: none; }
.panel { padding: 24px; }
.card { padding: 18px; }
.metric { min-height: 128px; background: #fff; }
.metric strong { color: var(--ink); font-size: 40px; }
.card h3, .panel h3, .modal h3 { color: var(--ink); }
.card-logo { width: 52px; height: 52px; }
.empty { background: #fff; border-color: var(--line-strong); }
.modal-backdrop { background: rgba(17, 24, 39, .5); }
.modal { box-shadow: var(--shadow-lg); }
.table th { background: #fff; }

@media (max-width: 960px) {
  .shell { display: block; }
  .app-header { position: static; align-items: stretch; flex-direction: column; gap: 14px; padding: 14px 18px; }
  .user-strip { justify-content: space-between; }
  .user-meta { text-align: left; }
  .sidebar { position: static; height: auto; padding: 10px 14px; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .nav { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 3px; }
  .nav button { flex: 0 0 auto; width: auto; border-left: 0; border-bottom: 3px solid transparent; }
  .nav button.active { border-bottom-color: var(--brand); }
  .main { width: 100%; padding: 22px 16px 44px; }
  .home-grid { width: min(760px, calc(100% - 32px)); grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .auth-header { padding: 14px 16px; }
  .brand h1, .app-header .brand h1 { font-size: 24px; }
  .brand p, .app-header .brand p { font-size: 15px; }
  .home-grid { width: calc(100% - 28px); }
  .home-hero h1 { font-size: 30px; }
  .sample-card { min-height: 140px; }
  .user-strip { align-items: stretch; flex-direction: column; gap: 10px; }
  .user-strip button { width: 100%; }
  .panel, .card, .modal { padding: 16px; }
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,.88), rgba(244,246,248,0) 260px),
    var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

button, input, select, textarea { font: inherit; }

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 9px 16px;
  border: 1px solid var(--brand);
  border-radius: 4px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

button:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  box-shadow: 0 6px 14px rgba(90, 189, 50, .2);
}

button:active { transform: translateY(1px); }

button.secondary {
  background: #fff;
  color: var(--ink-2);
  border-color: var(--line-strong);
}

button.secondary:hover {
  background: #f4f6f8;
  border-color: #aeb9c8;
  box-shadow: none;
}

button.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

button.ghost:hover {
  background: var(--brand-soft);
  border-color: #b7dda9;
  box-shadow: none;
}

button.danger { background: var(--danger); border-color: var(--danger); }

button.small {
  min-height: 30px;
  padding: 6px 10px;
  font-size: 13px;
}

button:disabled {
  opacity: .48;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(90, 189, 50, .24);
  outline-offset: 2px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  padding: 9px 12px;
  background: #fff;
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(13, 39, 70, .02);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

input::placeholder,
textarea::placeholder { color: #8795a8; }

input:hover,
select:hover,
textarea:hover { border-color: #aeb9c8; }

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(90, 189, 50, .12);
}

textarea {
  min-height: 96px;
  resize: vertical;
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.brand-mark {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border-radius: 50%;
  background:
    repeating-conic-gradient(from -8deg, var(--ink) 0deg 10deg, transparent 10deg 18deg);
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: var(--surface);
}

.brand h1 {
  margin: 0;
  font-size: 31px;
  line-height: 1;
  letter-spacing: 0;
}

.brand p {
  margin: 4px 0 0;
  color: var(--brand);
  font-size: 19px;
  line-height: 1;
}

.auth {
  min-height: 100vh;
  background:
    radial-gradient(circle at 22% 18%, rgba(90, 189, 50, .1), transparent 28%),
    linear-gradient(180deg, #fff 0, #f4f6f8 84px, #f4f6f8 100%);
}

.auth-header,
.app-header {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 42px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.auth-header .brand,
.app-header .brand { flex: 0 0 auto; }

.login-strip {
  display: grid;
  grid-template-columns: minmax(190px, 270px) minmax(190px, 270px) auto;
  gap: 10px;
  align-items: start;
  margin-left: auto;
}

.login-strip a {
  display: block;
  margin-top: 9px;
  color: #8997ad;
  font-size: 14px;
  text-align: center;
  text-decoration: none;
}

.login-strip a:hover { color: var(--brand-dark); }

.home-grid {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: 44px 0 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 54px;
  align-items: start;
}

.home-hero {
  position: relative;
  min-width: 0;
}

.home-hero h1 {
  max-width: 620px;
  margin: 0 0 34px;
  color: var(--ink);
  font-size: clamp(38px, 4.2vw, 54px);
  line-height: 1.12;
  letter-spacing: 0;
}

.sample-grid {
  width: min(760px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.sample-card {
  position: relative;
  min-height: 112px;
  aspect-ratio: 2 / 1;
  padding: 14px;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  column-gap: 10px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand);
  border-radius: 4px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.sample-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: #cfd8e3;
}

.sample-card::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 14px;
  width: 34px;
  height: 22px;
  border-radius: 3px;
  background:
    linear-gradient(90deg, var(--line) 35%, transparent 35% 48%, var(--line) 48% 100%);
  opacity: .5;
}

.sample-photo {
  display: grid;
  place-items: center;
  width: 62px;
  height: 42px;
  margin: 0;
  grid-row: 1 / 3;
  background: #101318;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.sample-card.portrait .sample-photo,
.sample-card.portrait.alt .sample-photo {
  width: 58px;
  height: 58px;
  border-radius: 2px;
  background: linear-gradient(135deg, #f3c7a0, #1b3557);
}

.sample-card.portrait.alt .sample-photo {
  background: linear-gradient(135deg, #21304c, #e6b6a9);
}

.sample-card strong,
.sample-card span,
.sample-card small,
.sample-card em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sample-card strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
}

.sample-card span,
.sample-card small {
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.35;
}

.sample-card em {
  margin-top: 8px;
  color: var(--ink-2);
  font-size: 12px;
  font-style: normal;
  text-align: right;
}

.sample-card i {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--ok);
}

.home-stats {
  width: min(720px, 100%);
  margin: 34px 0 0;
  color: #000;
  font-size: 26px;
  line-height: 1.4;
  text-align: left;
}

.home-stats strong { color: var(--brand); }

.signup-card {
  position: sticky;
  top: 106px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand);
  border-radius: 4px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.signup-card h2 {
  margin: 0 0 24px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.32;
  letter-spacing: 0;
}

.signup-card ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin: 0 0 24px;
  padding: 0;
  color: var(--ink-2);
  list-style: none;
}

.signup-card li {
  position: relative;
  padding-left: 24px;
  font-size: 14px;
  line-height: 1.4;
}

.signup-card li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--brand);
  font-size: 18px;
  line-height: 1;
}

.signup-card .form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.signup-card .form > .grid,
.signup-card .form > button,
.signup-card .signup-social-label,
.signup-card .social-row,
.signup-card .fine {
  grid-column: 1 / -1;
}

.signup-card .field {
  gap: 4px;
}

.signup-card .field label {
  font-size: 11px;
}

.signup-social-label {
  margin: 10px 0 8px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.social-row {
  display: flex;
  justify-content: center;
  gap: 9px;
}

.social-button {
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  border-color: var(--line-strong);
  font-weight: 800;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto auto 1fr;
  background:
    linear-gradient(180deg, #fff 0, #fff 74px, #f4f6f8 74px),
    var(--bg);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding-block: 14px;
}

.app-header .brand-mark {
  width: 44px;
  height: 44px;
}

.app-header .brand h1 { font-size: 26px; }
.app-header .brand p { font-size: 15px; }

.sidebar {
  position: sticky;
  top: 73px;
  z-index: 19;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 0 42px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.nav button {
  justify-content: center;
  min-height: 48px;
  padding: 12px 15px;
  background: transparent;
  color: var(--ink-2);
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  box-shadow: none;
}

.nav button.active,
.nav button:hover {
  background: #f8fafb;
  color: var(--ink);
  border-bottom-color: var(--brand);
  box-shadow: none;
}

.main {
  min-width: 0;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  padding: 22px 0 17px;
  border-bottom: 1px solid var(--line);
}

.topbar h2 {
  margin: 0;
  color: var(--ink);
  font-size: 34px;
  line-height: 1.12;
  letter-spacing: 0;
}

.topbar p {
  margin: 7px 0 0;
  max-width: 760px;
  color: var(--muted);
}

.toolbar,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.toolbar {
  justify-content: flex-end;
  min-width: min(420px, 100%);
}

.toolbar input,
.toolbar select { width: min(380px, 100%); }

.grid {
  display: grid;
  gap: 16px;
}

.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.panel,
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.panel {
  position: relative;
  padding: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel:has(.table) { overflow-x: auto; }

.card {
  position: relative;
  padding: 16px;
  box-shadow: var(--shadow);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.panel::before,
.card::before {
  content: "";
  position: absolute;
  left: -1px;
  right: -1px;
  top: -1px;
  height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--brand);
  opacity: .88;
}

.card:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lg);
}

.panel h3,
.modal h3 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
}

.metric {
  min-height: 112px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  border-left: 0;
  background:
    linear-gradient(135deg, #fff, #fff 62%, var(--brand-soft));
}

.metric strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 34px;
  line-height: 1;
  letter-spacing: 0;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
}

.metric > .pill { align-self: flex-start; }

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-3);
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.pill.ok { background: var(--ok-soft); color: #166534; }
.pill.warn { background: var(--warn-soft); color: #8a5a00; }
.pill.bad { background: var(--danger-soft); color: #9f1d16; }

.form {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 12px;
  color: #5b6c80;
  font-weight: 800;
}

.list {
  display: grid;
  gap: 10px;
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
}

.card-head > div { min-width: 0; }

.card-person,
.post-author {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.card-person > div,
.post-author > div {
  min-width: 0;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 4px;
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.card-logo,
.avatar,
.profile-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--brand-dark);
  font-weight: 900;
  object-fit: cover;
}

.card-logo {
  width: 48px;
  height: 48px;
  border-radius: 3px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.profile-avatar {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  font-size: 22px;
}

img.card-logo,
img.avatar,
img.profile-avatar {
  display: block;
  object-fit: cover;
  object-position: center;
}

.logo-fallback,
.avatar-fallback { background: var(--brand-soft); }

.profile-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.compact-form {
  margin-top: 14px;
  max-width: 520px;
}

.card h3 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.25;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.45;
}

.activity-list {
  gap: 12px;
}

.activity-item h3,
.request-card h3,
.contact-card h3,
.feed-post h3,
.directory-card h3 {
  margin-bottom: 6px;
}

.activity-item p,
.request-card p,
.contact-card p,
.feed-post p,
.directory-card p {
  max-width: 100%;
}

.feed-post .post-author {
  margin-bottom: 10px;
}

.post-author strong,
.post-author span {
  display: block;
}

.post-author span {
  color: var(--muted);
  font-size: 12px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  border: 1px solid rgba(122, 201, 67, .2);
  font-size: 12px;
  font-weight: 700;
}

.ledger-item p {
  margin-top: 4px;
  font-size: 12px;
}

.card strong { color: var(--ink); }

.muted { color: var(--muted); }

.fine {
  font-size: 12px;
  color: var(--muted);
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 12px 0;
}

.notice {
  border-left: 4px solid var(--brand);
  background: var(--brand-soft);
  padding: 12px;
  border-radius: 3px;
}

.empty {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  color: var(--muted);
  background: rgba(255,255,255,.72);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(13, 39, 70, .46);
}

.modal {
  width: min(760px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-lg);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  max-width: min(420px, calc(100vw - 36px));
  background: var(--ink);
  color: #fff;
  padding: 12px 14px;
  border-radius: 4px;
  box-shadow: var(--shadow-lg);
}

.table {
  width: 100%;
  min-width: 660px;
  border-collapse: collapse;
  font-size: 14px;
}

.table th,
.table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.table tr:last-child td { border-bottom: 0; }
.table td:last-child { white-space: nowrap; }

@media (max-width: 1180px) {
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-grid {
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 32px;
  }
  .sample-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .auth-header,
  .app-header {
    align-items: stretch;
    flex-direction: column;
    padding: 16px 20px;
  }

  .login-strip {
    width: 100%;
    grid-template-columns: 1fr 1fr auto;
    margin-left: 0;
  }

  .home-grid {
    width: min(720px, calc(100% - 32px));
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 28px;
  }

  .signup-card {
    max-width: 520px;
    position: static;
  }

  .signup-card ul,
  .signup-card .form {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    padding: 0 16px;
  }

  .nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav button {
    min-height: 44px;
  }

  .main {
    width: calc(100% - 32px);
    padding-top: 20px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar {
    justify-content: flex-start;
    min-width: 0;
  }

  .cols-2,
  .cols-3,
  .cols-4 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  body { font-size: 14px; }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .brand h1 { font-size: 25px; }
  .brand p { font-size: 16px; }

  .login-strip {
    grid-template-columns: 1fr;
  }

  .home-hero h1 {
    font-size: 34px;
    margin-bottom: 22px;
  }

  .sample-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .sample-card {
    aspect-ratio: auto;
    min-height: 132px;
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .home-stats {
    font-size: 20px;
    text-align: left;
  }

  .signup-card,
  .panel,
  .card,
  .modal {
    padding: 14px;
  }

  .topbar h2 { font-size: 26px; }

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

  .card-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .actions,
  .toolbar {
    width: 100%;
  }

  .actions button,
  .toolbar button,
  .toolbar input,
  .toolbar select {
    width: 100%;
  }

  .metric { min-height: 96px; }

  .toast {
    right: 12px;
    bottom: 12px;
    max-width: calc(100vw - 24px);
  }
}

/* EOF responsive correction: final app layout rules must win over legacy breakpoints. */
@media (min-width: 761px) {
  .shell {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    grid-template-rows: 74px minmax(0, 1fr);
  }

  .app-header {
    align-items: center;
    flex-direction: row;
    padding: 12px 32px;
  }

  .app-user {
    margin-left: auto;
  }

  .sidebar {
    position: sticky;
    top: 74px;
    height: calc(100vh - 74px);
    padding: 16px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    overflow: auto;
  }

  .nav {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .nav button {
    width: 100%;
    justify-content: flex-start;
    border-left: 3px solid transparent;
    border-bottom: 0;
  }

  .nav button.active,
  .nav button:hover {
    border-left-color: var(--primary);
    border-bottom-color: transparent;
  }

  .main {
    width: 100%;
    padding: 30px 32px 52px;
  }

  .cols-3,
  .cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1181px) {
  .cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .shell {
    display: block;
  }

  .app-header {
    align-items: stretch;
    flex-direction: column;
    padding: 16px;
  }

  .app-user {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 0 16px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .nav button {
    flex: 0 0 auto;
    width: auto;
    min-height: 42px;
    border-left: 0;
    border-bottom: 3px solid transparent;
  }

  .nav button.active,
  .nav button:hover {
    border-left-color: transparent;
    border-bottom-color: var(--primary);
  }

  .main {
    width: calc(100% - 32px);
    padding: 20px 0 36px;
  }

  .cols-2,
  .cols-3,
  .cols-4 {
    grid-template-columns: 1fr;
  }
}

/* ABSOLUTE FINAL FIGMA MAKE LAYER - appended after all legacy rules. */
:root {
  --bg: #f9fafb;
  --surface: #fff;
  --ink: #1f2937;
  --ink-2: #374151;
  --muted: #6b7280;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --brand: #7ac943;
  --primary: #7ac943;
  --brand-dark: #6bb839;
  --brand-soft: rgba(122, 201, 67, .1);
  --shadow: 2px 2px 4px rgba(0, 0, 0, .1);
  --radius: 0;
}
html, body, .auth, .shell { background: #f9fafb !important; }
body { color: var(--ink) !important; font-family: Arial, Helvetica, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important; }
button, input, select, textarea, .panel, .card, .modal, .signup-card, .sample-card, .empty, .pill, .card-logo, .sample-photo, .notice { border-radius: 0 !important; }
button { background: var(--brand) !important; border-color: var(--brand) !important; color: #fff !important; box-shadow: none !important; }
button:hover { background: var(--brand-dark) !important; border-color: var(--brand-dark) !important; box-shadow: none !important; }
button.secondary, button.ghost { background: #fff !important; color: var(--ink-2) !important; border-color: var(--line-strong) !important; }
button.secondary:hover, button.ghost:hover { background: #f9fafb !important; color: var(--ink) !important; }
input, select, textarea { border-color: var(--line-strong) !important; background: #fff !important; box-shadow: none !important; }
.auth-header, .app-header { min-height: 74px !important; padding: 12px 24px !important; background: #fff !important; border-bottom: 1px solid var(--line) !important; box-shadow: none !important; }
.brand-mark { width: 48px !important; height: 48px !important; border-radius: 0 !important; background: radial-gradient(circle at 50% 50%, #1f2937 0 22%, transparent 23%), repeating-conic-gradient(from 0deg, #1f2937 0 8deg, transparent 8deg 18deg) !important; }
.brand-mark::after { display: none !important; }
.brand h1 { color: var(--ink) !important; font-size: 28px !important; }
.brand p { color: var(--brand) !important; font-size: 16px !important; }
.home-grid { width: calc(100% - 48px) !important; max-width: 1400px !important; grid-template-columns: minmax(0, 1fr) 320px !important; gap: 34px !important; padding: 34px 0 56px !important; }
.home-hero h1 { max-width: 560px !important; margin-bottom: 30px !important; color: var(--ink) !important; font-size: clamp(31px, 3.2vw, 43px) !important; line-height: 1.18 !important; }
.sample-grid { width: min(780px, 100%) !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 14px !important; }
.sample-card { min-height: 140px !important; aspect-ratio: auto !important; grid-template-columns: 68px minmax(0, 1fr) !important; background: #fff !important; border: 1px solid var(--line) !important; border-top: 0 !important; box-shadow: var(--shadow) !important; transform: none !important; }
.signup-card { width: 320px !important; max-width: 100% !important; top: 92px !important; padding: 24px !important; background: #fff !important; border: 1px solid var(--line) !important; border-top: 0 !important; box-shadow: var(--shadow) !important; }
.signup-card h2 { color: var(--ink) !important; font-size: 18px !important; }
.signup-card ul { grid-template-columns: 1fr !important; }
.shell { display: grid !important; grid-template-columns: 256px minmax(0, 1fr) !important; grid-template-rows: 74px minmax(0, 1fr) !important; }
.app-header { grid-column: 1 / -1 !important; position: sticky !important; top: 0 !important; z-index: 30 !important; display: flex !important; align-items: center !important; justify-content: space-between !important; }
.sidebar { grid-row: 2 !important; grid-column: 1 !important; position: sticky !important; top: 74px !important; height: calc(100vh - 74px) !important; padding: 16px !important; background: #fff !important; border-right: 1px solid var(--line) !important; border-bottom: 0 !important; }
.nav { display: grid !important; grid-template-columns: 1fr !important; gap: 4px !important; }
.nav button { width: 100% !important; justify-content: flex-start !important; background: transparent !important; color: var(--ink-2) !important; border: 0 !important; border-left: 3px solid transparent !important; box-shadow: none !important; }
.nav button::before { content: ""; width: 18px; height: 18px; border: 2px solid currentColor; opacity: .72; }
.nav button.active { background: var(--brand) !important; color: #fff !important; border-left-color: var(--brand) !important; }
.nav button:hover { background: #f3f4f6 !important; color: var(--brand-dark) !important; border-left-color: var(--brand) !important; }
.main { grid-row: 2 !important; grid-column: 2 !important; width: 100% !important; max-width: 1180px !important; margin: 0 auto !important; padding: 30px 32px 52px !important; }
.topbar { display: block !important; padding: 0 !important; margin-bottom: 26px !important; border-bottom: 0 !important; }
.topbar h2 { color: var(--ink) !important; font-size: clamp(28px, 3vw, 40px) !important; }
.topbar p { color: var(--muted) !important; font-size: 15px !important; }
.grid { gap: 24px !important; }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.panel, .card { background: #fff !important; border: 1px solid var(--line) !important; box-shadow: var(--shadow) !important; }
.panel::before, .card::before { display: none !important; }
.panel { padding: 24px !important; }
.card { padding: 18px !important; }
.metric { min-height: 128px !important; display: block !important; background: #fff !important; }
.metric strong { margin-top: 8px !important; color: var(--brand) !important; font-size: 40px !important; }
.recent-panel { margin-top: 24px !important; }
.modal-backdrop { background: rgba(17, 24, 39, .5) !important; }
@media (max-width: 1024px) {
  .shell { display: block !important; }
  .sidebar { position: static !important; height: auto !important; padding: 10px 14px !important; border-right: 0 !important; border-bottom: 1px solid var(--line) !important; }
  .nav { display: flex !important; gap: 8px !important; overflow-x: auto !important; }
  .nav button { flex: 0 0 auto !important; width: auto !important; border-left: 0 !important; border-bottom: 3px solid transparent !important; }
  .main { max-width: none !important; padding: 22px 16px 44px !important; }
  .home-grid { width: min(760px, calc(100% - 32px)) !important; grid-template-columns: 1fr !important; }
  .signup-card { width: 100% !important; }
  .cols-4, .cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 620px) {
  .auth-header, .app-header, .user-strip { align-items: stretch !important; flex-direction: column !important; }
  .login-strip, .signup-card .form, .sample-grid, .cols-4, .cols-3, .cols-2 { grid-template-columns: 1fr !important; }
  .user-strip button { width: 100% !important; }
}

@media (max-width: 760px) {
  .auth-header {
    align-items: center !important;
    flex-direction: row !important;
    gap: 12px !important;
  }
  .login-strip {
    display: flex !important;
    justify-content: flex-end !important;
    width: auto !important;
    margin-left: auto !important;
  }
  .login-strip > input,
  .login-strip > div {
    display: none !important;
  }
  .login-strip button {
    min-width: 76px !important;
    width: auto !important;
    padding: 10px 18px !important;
  }
  .login-strip.expanded {
    position: absolute !important;
    left: 16px !important;
    right: 16px !important;
    top: 74px !important;
    z-index: 50 !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: 14px !important;
    background: #fff !important;
    border: 1px solid var(--line) !important;
    box-shadow: var(--shadow-lg) !important;
  }
  .login-strip.expanded > input,
  .login-strip.expanded > div {
    display: block !important;
  }
  .login-strip.expanded button {
    width: 100% !important;
  }
}

/* Figma asset parity fixes. */
img.brand-mark {
  display: block !important;
  width: 48px !important;
  height: 48px !important;
  object-fit: contain !important;
  border: 0 !important;
  background: transparent !important;
}
img.brand-mark::after { display: none !important; }
img.sample-photo {
  display: block !important;
  width: 58px !important;
  height: 58px !important;
  object-fit: cover !important;
  object-position: center !important;
  border-radius: 0 !important;
  background: #f3f4f6 !important;
}
.social-row {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
}
.social-button {
  width: auto !important;
  height: auto !important;
  min-height: 36px !important;
  padding: 8px 18px !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-transform: none !important;
}
.social-button.linkedin { background: #0a66c2 !important; }
.social-button.linkedin:hover { background: #004182 !important; }
.social-button.facebook { background: #3b5998 !important; }
.social-button.facebook:hover { background: #2d4373 !important; }
.social-button.google { background: #db4437 !important; }
.social-button.google:hover { background: #c23321 !important; }

/* Figma lucide-style sidebar icons. */
.nav button::before { display: none !important; }
.nav-icon {
  width: 20px !important;
  height: 20px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 20px !important;
}
.nav-icon svg {
  width: 20px !important;
  height: 20px !important;
  display: block !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.mobile-nav-toggle,
.nav-scrim {
  display: none !important;
}

@media (max-width: 1024px) {
  .mobile-nav-toggle {
    display: inline-flex !important;
    margin-left: auto !important;
    min-height: 40px !important;
    padding: 9px 14px !important;
  }
  .app-header {
    position: sticky !important;
    align-items: center !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
  }
  .app-header .brand {
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }
  .user-strip {
    order: 3 !important;
    width: 100% !important;
  }
  .shell .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 80 !important;
    width: min(310px, calc(100vw - 44px)) !important;
    height: 100vh !important;
    padding: 18px !important;
    border-right: 1px solid var(--line) !important;
    border-bottom: 0 !important;
    transform: translateX(-105%) !important;
    transition: transform .18s ease !important;
    overflow: auto !important;
  }
  body.nav-open .shell .sidebar {
    transform: translateX(0) !important;
  }
  .shell .nav {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 6px !important;
    overflow: visible !important;
  }
  .shell .nav button {
    width: 100% !important;
    border-left: 3px solid transparent !important;
    border-bottom: 0 !important;
  }
  .nav-scrim {
    position: fixed !important;
    inset: 0 !important;
    z-index: 70 !important;
    background: rgba(17, 24, 39, .42) !important;
  }
  body.nav-open .nav-scrim {
    display: block !important;
  }
}

/* Figma state components: empty, loading, error, success. */
.state-card {
  display: grid !important;
  justify-items: center !important;
  align-content: center !important;
  gap: 10px !important;
  min-height: 142px !important;
  padding: 28px 22px !important;
  background: #fff !important;
  border: 1px solid var(--line) !important;
  box-shadow: var(--shadow) !important;
  color: var(--ink) !important;
  text-align: center !important;
}
.state-card strong {
  display: block !important;
  color: var(--ink) !important;
  font-size: 18px !important;
  line-height: 1.25 !important;
}
.state-card p {
  max-width: 420px !important;
  margin: 0 !important;
  color: var(--muted) !important;
  font-size: 14px !important;
}
.state-icon {
  width: 34px !important;
  height: 34px !important;
  display: inline-grid !important;
  place-items: center !important;
  border: 2px solid var(--brand) !important;
  color: var(--brand) !important;
  background: var(--brand-soft) !important;
}
.state-icon::before {
  content: "" !important;
  width: 12px !important;
  height: 12px !important;
  border: 2px solid currentColor !important;
  border-top-color: transparent !important;
  display: block !important;
}
.state-empty .state-icon::before {
  width: 14px !important;
  height: 2px !important;
  border: 0 !important;
  background: currentColor !important;
}
.state-loading .state-icon::before {
  border-radius: 50% !important;
  animation: state-spin .8s linear infinite !important;
}
.state-error .state-icon {
  border-color: #dc2626 !important;
  color: #dc2626 !important;
  background: #fee2e2 !important;
}
.state-error .state-icon::before {
  content: "!" !important;
  width: auto !important;
  height: auto !important;
  border: 0 !important;
  font-weight: 800 !important;
}
.state-warning .state-icon {
  border-color: #d97706 !important;
  color: #d97706 !important;
  background: #fef3c7 !important;
}
.state-info .state-icon {
  border-color: #2563eb !important;
  color: #2563eb !important;
  background: #dbeafe !important;
}
.state-actions {
  display: flex !important;
  justify-content: center !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin-top: 4px !important;
}
@keyframes state-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 620px) {
  .table,
  .table thead,
  .table tbody,
  .table tr,
  .table th,
  .table td {
    display: block !important;
    width: 100% !important;
  }
  .table thead {
    display: none !important;
  }
  .table tbody {
    display: grid !important;
    gap: 12px !important;
  }
  .table tr {
    padding: 14px !important;
    background: #fff !important;
    border: 1px solid var(--line) !important;
    box-shadow: var(--shadow) !important;
  }
  .table td {
    min-height: 0 !important;
    padding: 6px 0 !important;
    border: 0 !important;
    color: var(--ink) !important;
    word-break: break-word !important;
  }
  .table td::before {
    display: block !important;
    margin-bottom: 2px !important;
    color: var(--muted) !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
  }
  .reports-table td:nth-child(1)::before { content: "Target"; }
  .reports-table td:nth-child(2)::before { content: "Reason"; }
  .reports-table td:nth-child(3)::before { content: "Status"; }
  .reports-table td:nth-child(4)::before { content: "Actions"; }
  .verification-table td:nth-child(1)::before { content: "Card"; }
  .verification-table td:nth-child(2)::before { content: "User"; }
  .verification-table td:nth-child(3)::before { content: "Status"; }
  .verification-table td:nth-child(4)::before { content: "Actions"; }
  .users-table td:nth-child(1)::before { content: "Name"; }
  .users-table td:nth-child(2)::before { content: "Email"; }
  .users-table td:nth-child(3)::before { content: "Status"; }
  .users-table td:nth-child(4)::before { content: "Credits"; }
  .users-table td:nth-child(5)::before { content: "Actions"; }
}

/* Cardbook design-system adapter: maps the existing MVP class names to the
   Figma Make design-system tokens without changing application behavior. */
:root {
  --bg: var(--cb-gray-50);
  --surface: var(--cb-white);
  --surface-2: var(--cb-gray-50);
  --surface-3: var(--cb-gray-100);
  --ink: var(--cb-gray-800);
  --ink-2: var(--cb-gray-700);
  --muted: var(--cb-gray-500);
  --muted-2: var(--cb-gray-400);
  --line: var(--cb-gray-200);
  --line-strong: var(--cb-gray-300);
  --brand: var(--cb-green);
  --brand-dark: var(--cb-green-dark);
  --brand-soft: var(--cb-green-light);
  --brand-glow: rgba(122, 201, 67, .15);
  --accent: var(--cb-blue);
  --accent-soft: var(--cb-blue-light);
  --danger: var(--cb-red);
  --danger-soft: var(--cb-red-light);
  --ok: var(--cb-green);
  --ok-soft: var(--cb-green-light);
  --warn-soft: var(--cb-orange-light);
  --shadow: var(--cb-shadow-sm);
  --shadow-lg: var(--cb-shadow-xl);
  --radius: var(--cb-radius-lg);
}

body {
  font-family: var(--cb-font-family) !important;
  font-size: var(--cb-font-size-base) !important;
  line-height: var(--cb-line-height-normal) !important;
}

button,
.button,
input,
select,
textarea {
  border-radius: var(--cb-radius-md) !important;
  font-size: var(--cb-font-size-sm) !important;
}

button,
.button {
  font-weight: var(--cb-font-weight-medium) !important;
}

.panel,
.card,
.modal,
.signup-card,
.sample-card,
.empty,
.notice,
.state-card {
  border-radius: var(--cb-radius-lg) !important;
  border-color: var(--cb-gray-200) !important;
  box-shadow: var(--cb-shadow-sm) !important;
}

.sidebar {
  width: var(--cb-sidebar-width) !important;
  background: var(--cb-white) !important;
  border-right-color: var(--cb-gray-200) !important;
}

.app-header,
.auth-header {
  min-height: var(--cb-header-height) !important;
  background: var(--cb-white) !important;
  border-bottom-color: var(--cb-gray-200) !important;
}

.main {
  max-width: var(--cb-content-max-width) !important;
}

.nav button {
  border-radius: var(--cb-radius-md) !important;
  color: var(--cb-gray-600) !important;
}

.nav button:hover {
  background: var(--cb-gray-100) !important;
  color: var(--cb-green) !important;
}

.nav button.active,
.nav button.active:hover {
  background: var(--cb-green-light) !important;
  color: var(--cb-green-dark) !important;
}

.metric strong,
.home-stats strong,
.brand p {
  color: var(--cb-green) !important;
}

.pill,
.tag,
.cb-badge {
  border-radius: var(--cb-radius-full) !important;
  font-size: var(--cb-font-size-xs) !important;
  font-weight: var(--cb-font-weight-medium) !important;
}

.pill.ok {
  background: var(--cb-green-light) !important;
  color: var(--cb-green-dark) !important;
}

.pill.warn {
  background: var(--cb-orange-light) !important;
  color: #c2410c !important;
}

.pill.bad {
  background: var(--cb-red-light) !important;
  color: #dc2626 !important;
}

.field label,
.cb-label {
  color: var(--cb-gray-700) !important;
  font-size: var(--cb-font-size-sm) !important;
  font-weight: var(--cb-font-weight-medium) !important;
}

.field input,
.field textarea,
.field select,
.toolbar input,
.toolbar select,
.login-strip input {
  background: var(--cb-gray-100) !important;
  border-color: var(--cb-gray-200) !important;
  color: var(--cb-gray-800) !important;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.toolbar input:focus,
.toolbar select:focus,
.login-strip input:focus {
  background: var(--cb-white) !important;
  border-color: var(--cb-green) !important;
  box-shadow: 0 0 0 3px rgba(122, 201, 67, .15) !important;
}

.card-logo,
.avatar,
.profile-avatar,
.sample-photo {
  border-radius: var(--cb-radius-full) !important;
}

.card-logo {
  border-radius: var(--cb-radius-sm) !important;
}

.modal-backdrop {
  background: rgba(0, 0, 0, .5) !important;
}

.toast {
  z-index: var(--cb-z-toast) !important;
}

.login-area {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.reset-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(420px, 100%);
}

.reset-strip[hidden] {
  display: none !important;
}

.reset-strip input,
.reset-strip button {
  min-height: 38px;
}

.reset-strip input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
}

.reset-strip button {
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
}

@media (max-width: 760px) {
  .login-area,
  .reset-strip {
    align-items: stretch;
    width: 100%;
  }

  .reset-strip {
    flex-direction: column;
  }
}

/* Cardbook auth UX update: reset page, verified gate, wider signup, footer. */
.auth .home-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(420px, 520px);
  gap: 36px;
  align-items: start;
}

.auth .signup-card {
  width: 100%;
  max-width: 520px;
}

.auth .signup-card .form {
  gap: 12px;
}

.auth .signup-card .field input {
  min-height: 42px;
}

.password-strength {
  display: grid;
  gap: 6px;
  margin: -4px 0 4px;
}

.password-strength span {
  display: block;
  height: 7px;
  background: #e5e7eb;
  overflow: hidden;
}

.password-strength span i {
  display: block;
  height: 100%;
  width: 18%;
  background: #d1d5db;
  transition: width .18s ease, background .18s ease;
}

.password-strength em {
  font-size: 12px;
  font-style: normal;
  color: #6b7280;
}

.password-strength[data-level="weak"] span i { width: 33%; background: #ef4444; }
.password-strength[data-level="medium"] span i { width: 66%; background: #f59e0b; }
.password-strength[data-level="strong"] span i { width: 100%; background: #22c55e; }

.auth-page-main,
.verify-gate-main {
  min-height: 58vh;
  display: grid;
  place-items: center;
  padding: 52px 20px;
}

.auth-page-card {
  width: min(560px, 100%);
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 18px 45px rgba(15, 79, 74, .08);
  padding: 34px;
}

.auth-page-card h2 {
  margin: 0 0 12px;
  color: #111827;
  font-size: 28px;
}

.auth-page-card p {
  margin: 0 0 22px;
  color: #4b5563;
  line-height: 1.65;
}

.verify-card {
  text-align: center;
  border-top: 5px solid #7AC943;
}

.verify-icon {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 18px;
  background: #ecfdf5;
  color: #0f766e;
  font-size: 32px;
}

.verify-email-line {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  padding: 12px;
}

.auth-notice {
  max-width: 980px;
  margin: 18px auto 0;
  padding: 13px 18px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  font-weight: 600;
}

.home-footer {
  margin-top: 40px;
}

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

  .auth .signup-card {
    max-width: none;
  }
}

@media (max-width: 760px) {
  .auth-page-card {
    padding: 24px 18px;
  }
}
