/* GetASub — brand stylesheet
   Variables below are the GetASub default palette. Each tenant can
   override these with their own logo + primary colour. */

:root {
  /* GetASub default palette */
  --ashby-dark: #0F1B2D;        /* deep navy — used in headers/footers */
  --ashby-dark-soft: #1A2638;   /* lift for nav hovers */
  --ashby-dark-deep: #070D17;   /* deepest accent for footer / hero base */
  --ashby-green: #FF6B35;       /* primary action colour (orange) */
  --ashby-green-bright: #FF8456;/* hover/highlight tint */
  --ashby-green-deep: #E5562A;  /* pressed/deep accent */

  --ink: #0E1726;
  --ink-soft: #2B384C;
  --muted: #5C6B82;
  --line: #E2E7F0;
  --line-soft: #EEF2F8;
  --bg: #F7F9FC;
  --card: #FFFFFF;

  --green: #1E9F66;
  --green-bg: #E5F6EE;
  --red: #C8362E;
  --red-bg: #FBE7E5;
  --blue: #2A6CDB;
  --blue-bg: #E5EEFB;
  --purple: #6B3FB1;
  --purple-bg: #EFE8FA;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(15, 15, 15, 0.06);
  --shadow: 0 6px 24px rgba(15, 15, 15, 0.08);
  --shadow-lg: 0 24px 60px rgba(15, 15, 15, 0.16);
  --font-sans: "Inter", "Helvetica Neue", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
}

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

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; line-height: 1.1; }
h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); font-weight: 700; line-height: 1.15; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1em; color: var(--ink-soft); }
small { color: var(--muted); }

/* ========== Layout ========== */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow { max-width: 760px; margin: 0 auto; padding: 0 24px; }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 880px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.stack { display: grid; gap: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.spacer { flex: 1; }

/* ========== Top nav ========== */

.topbar {
  background: var(--ashby-dark);
  color: white;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.topbar { position: relative; }
.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 96px;
}
.topbar .hamburger {
  display: none;
  background: rgba(255,255,255,0.08);
  border: none;
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 9px;
  cursor: pointer;
  padding: 0;
}
.topbar .hamburger:hover { background: rgba(255,255,255,0.16); }
.topbar .hamburger svg { width: 22px; height: 22px; display: block; margin: 0 auto; }
.topbar .mobile-menu { display: none; }
.topbar .brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: white;
  letter-spacing: -0.005em;
}
.topbar .brand-logo {
  height: 64px;
  width: auto;
  display: block;
}
.topbar nav { display: flex; gap: 8px; align-items: center; }
.topbar nav a {
  color: rgba(255,255,255,0.78);
  font-weight: 500;
  font-size: 0.92rem;
  padding: 8px 14px;
  border-radius: 8px;
  transition: background 120ms ease, color 120ms ease;
}
.topbar nav a:hover { color: white; background: rgba(255,255,255,0.08); }
.topbar nav a.active {
  color: var(--ashby-dark);
  background: var(--ashby-green);
}
.topbar .user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.95);
}
.topbar .user-pill .avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--ashby-green);
  color: var(--ashby-dark);
  font-weight: 700;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
}

@media (max-width: 760px) {
  .topbar .container { height: 72px; }
  .topbar .brand-logo { height: 48px; }
  .topbar nav { display: none; }
  .topbar .brand span:not(.brand-mark) { font-size: 0.95rem; }
  /* Hide the desktop user pill + sign-out — they live in the mobile menu instead */
  .topbar > .container > .row,
  .topbar > .container > .user-pill { display: none !important; }
  .topbar .hamburger { display: block; }

  .topbar .mobile-menu.open {
    display: block;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--ashby-dark-soft);
    border-top: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 12px 40px rgba(0,0,0,0.35);
    z-index: 100;
    padding: 4px 0 8px;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
  }
  .topbar .mobile-menu a {
    display: block;
    padding: 16px 24px;
    color: rgba(255,255,255,0.85);
    font-size: 1rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    text-decoration: none;
  }
  .topbar .mobile-menu a:hover,
  .topbar .mobile-menu a:active {
    background: rgba(255,255,255,0.04);
    color: white;
  }
  .topbar .mobile-menu a.active {
    color: var(--ashby-green);
    background: rgba(255, 107, 53, 0.10);
    border-left: 3px solid var(--ashby-green);
    padding-left: 21px;
  }
  .topbar .mobile-menu .mobile-menu-user {
    padding: 16px 24px;
    background: var(--ashby-dark-deep);
    color: rgba(255,255,255,0.7);
    font-size: 0.92rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    border-bottom: none;
  }
  .topbar .mobile-menu .mobile-menu-user .who { display: flex; align-items: center; gap: 10px; }
  .topbar .mobile-menu .mobile-menu-user .avatar {
    width: 32px; height: 32px; border-radius: 999px;
    background: var(--ashby-green); color: var(--ashby-dark);
    font-weight: 700; display: grid; place-items: center; font-size: 0.85rem;
  }
  .topbar .mobile-menu .mobile-menu-signout {
    display: block;
    text-align: center;
    margin: 8px 16px 0;
    padding: 14px;
    background: rgba(255,255,255,0.06);
    border-radius: 10px;
    color: white !important;
    border-bottom: none;
    font-weight: 600;
  }

  .hero { padding: 64px 0 80px; }
  .features { padding: 64px 0; }
  .auth-side { padding: 32px; }
  .auth-form-wrap { padding: 32px 20px; }
  /* Inline two-column grids on the landing page collapse to one column */
  .features .how-detail { grid-template-columns: 1fr !important; gap: 32px !important; }
  .features .card-pad-lg[style*="grid-template-columns"] { grid-template-columns: 1fr !important; gap: 24px !important; text-align: left; }
}

/* ========== Buttons ========== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform 80ms ease, background 120ms ease, box-shadow 120ms ease;
  font-family: var(--font-sans);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--ashby-green);
  color: var(--ashby-dark);
  box-shadow: 0 6px 18px rgba(255, 107, 53, 0.32);
}
.btn-primary:hover { background: var(--ashby-green-bright); }
.btn-dark {
  background: var(--ashby-dark);
  color: white;
}
.btn-dark:hover { background: var(--ashby-dark-soft); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: white; border-color: var(--ink-soft); }
.btn-danger {
  background: var(--red-bg);
  color: var(--red);
}
.btn-danger:hover { background: #f5d5d2; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 0.85rem; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 1rem; }
.btn-block { width: 100%; }

/* ========== Cards ========== */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.card-pad-lg { padding: 32px; }
.card-flat { box-shadow: none; }
.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}
.card-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: #cdd5e3;
}

/* ========== Badges ========== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  background: var(--line-soft);
  color: var(--ink-soft);
}
.badge-works { background: var(--blue-bg); color: var(--blue); }
.badge-bid { background: var(--purple-bg); color: var(--purple); }
.badge-minor { background: #FFE9CC; color: #C2570A; }
.badge-open { background: var(--green-bg); color: var(--green); }
.badge-closed { background: var(--line-soft); color: var(--muted); }
.badge-urgent { background: var(--red-bg); color: var(--red); }
.badge-dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  display: inline-block;
}

/* Request type colour stripe */
.request-card {
  position: relative;
  overflow: hidden;
}
.request-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--blue);
}
.request-card.type-bid::before { background: var(--purple); }
.request-card.type-minor::before { background: #C2570A; }

/* ========== Forms ========== */

.field { display: grid; gap: 6px; }
.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}
.field .hint { font-size: 0.8rem; color: var(--muted); }
.input,
.select,
.textarea {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--ink);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.textarea { height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235C6B82' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--ashby-dark);
  box-shadow: 0 0 0 4px rgba(15, 15, 15, 0.08);
}

/* ========== Tables ========== */

.table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}
.table th, .table td {
  text-align: left;
  padding: 14px 18px;
  font-size: 0.92rem;
  border-bottom: 1px solid var(--line-soft);
}
.table th {
  background: var(--bg);
  font-weight: 600;
  color: var(--ink-soft);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--line-soft); }

/* ========== Empty / utility ========== */

.empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: white;
}

.kpi {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.kpi .label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
}
.kpi .value {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  margin-top: 8px;
  color: var(--ashby-dark);
}
.kpi .delta { font-size: 0.85rem; color: var(--muted); margin-top: 4px; }

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 32px 0 16px;
  gap: 12px;
}
.section-title h2 { margin: 0; font-size: 1.4rem; }
.section-title small { color: var(--muted); }

/* ========== Hero (landing) ========== */

.hero {
  background: radial-gradient(120% 100% at 90% 0%, #1a3360 0%, var(--ashby-dark) 60%, var(--ashby-dark-deep) 100%);
  color: white;
  padding: 96px 0 120px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(transparent 95%, rgba(255,255,255,0.06) 95%), linear-gradient(90deg, transparent 95%, rgba(255,255,255,0.06) 95%);
  background-size: 56px 56px;
  opacity: 0.4;
  pointer-events: none;
}
.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(255, 107, 53, 0.18);
  color: var(--ashby-green);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.hero h1 { color: white; max-width: 18ch; }
.hero h1 em { font-style: normal; color: var(--ashby-green); }
.hero p { color: rgba(255,255,255,0.78); font-size: 1.1rem; max-width: 56ch; }
.hero .cta-row { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; gap: 48px; } }
.hero-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(10px);
}
.hero-card .req {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
.hero-card .req:last-child { margin-bottom: 0; }
.hero-card .req-title { font-weight: 600; font-size: 0.95rem; }
.hero-card .req-meta { font-size: 0.82rem; color: rgba(255,255,255,0.6); margin-top: 4px; }
.hero-card .req .badge { background: rgba(255, 107, 53, 0.18); color: var(--ashby-green); }
.hero-card .req.type-bid .badge { background: rgba(167, 139, 250, 0.18); color: #c4b5fd; }

/* ========== Feature grid ========== */

.features {
  padding: 96px 0;
}
.feature {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}
.feature .icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: var(--ashby-dark);
  color: var(--ashby-green);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  font-size: 1.2rem;
  font-weight: 700;
}
.feature h3 { margin-bottom: 8px; }

/* ========== Footer ========== */

footer {
  background: var(--ashby-dark-deep);
  color: rgba(255,255,255,0.7);
  padding: 40px 0;
  font-size: 0.9rem;
  margin-top: 0;
}
footer .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
footer .brand { color: white; font-weight: 600; font-family: var(--font-display); }

/* ========== Page header ========== */

.page-head {
  background: white;
  border-bottom: 1px solid var(--line);
  padding: 28px 0;
}
.page-head h1 { font-size: 1.7rem; margin: 0; }
.page-head .sub { color: var(--muted); margin-top: 4px; font-size: 0.95rem; }

main.page { padding: 32px 0 64px; }

/* ========== Login layout ========== */

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 880px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-shell .auth-side { display: none; }
}
.auth-side {
  background: linear-gradient(160deg, var(--ashby-dark) 0%, var(--ashby-dark-deep) 100%);
  color: white;
  padding: 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.auth-side .quote {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.4;
  color: white;
  max-width: 32ch;
}
.auth-side .quote em { color: var(--ashby-green); font-style: normal; }
.auth-form-wrap {
  display: grid;
  place-items: center;
  padding: 48px 32px;
  background: white;
}
.auth-form { width: 100%; max-width: 380px; }

/* ========== Misc ========== */

.tag-list { display: flex; gap: 8px; flex-wrap: wrap; }
.divider { height: 1px; background: var(--line); margin: 24px 0; }
.muted { color: var(--muted); }
.text-right { text-align: right; }
.mb-0 { margin-bottom: 0 !important; }
.mt-0 { margin-top: 0 !important; }
.demo-note {
  background: #FFF8E1;
  border: 1px solid #F4D77B;
  color: #6B4F00;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.85rem;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.demo-note strong { color: #523900; }

.kbd {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  background: var(--line-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 0.82rem;
}

/* ========== Cookie banner ========== */

.cookie-banner {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  max-width: 620px;
  margin: 0 auto;
  background: var(--ashby-dark);
  color: white;
  padding: 18px 20px;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  z-index: 9000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: slideup 220ms ease;
}
.cookie-banner-inner {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}
.cookie-banner-text { flex: 1 1 280px; min-width: 0; }
.cookie-banner-text strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  margin-bottom: 4px;
}
.cookie-banner-text p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.85rem;
  line-height: 1.45;
}
.cookie-banner-text a {
  color: var(--ashby-green);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cookie-banner-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.cookie-banner .btn { font-size: 0.85rem; height: 38px; padding: 0 16px; }
.cookie-banner .btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  color: white;
}
.cookie-banner .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
}
@media (max-width: 640px) {
  .cookie-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 16px;
  }
  .cookie-banner-inner { flex-direction: column; align-items: stretch; gap: 12px; }
  .cookie-banner-actions { justify-content: stretch; }
  .cookie-banner-actions .btn { flex: 1; }
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--ashby-dark);
  color: white;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  z-index: 100;
  max-width: 320px;
  animation: slideup 200ms ease;
}
.toast.success { background: var(--green); }
.toast.error { background: var(--red); }
@keyframes slideup {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Response item */
.response-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  background: white;
  display: grid;
  gap: 8px;
}
.response-item .who {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}
.response-item .who .avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--ashby-dark);
  color: var(--ashby-green);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  background: var(--line-soft);
  padding: 18px;
  border-radius: var(--radius-sm);
}
.detail-meta .label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 600; }
.detail-meta .value { margin-top: 4px; font-weight: 600; color: var(--ink); }
