/* Innovek account hub — small additions on top of /css/style.css.
   Reuses that file's CSS vars, .wrap, .site-header, .card-grid/.card,
   .contact-form/.form-row/.form-status, .hp-field, .btn/.btn-primary. */

/* Sticky footer: body is a flex column filling the viewport, .hub-main grows
   to absorb any leftover space so <footer> always sits at the bottom of the
   screen even when a page's content is short (e.g. the dashboard with just a
   couple of tiles) rather than floating up under it. */
body.hub-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.hub-main {
  flex: 1 0 auto;
  padding: 132px 24px 96px;  /* clears the fixed .site-header (92px) + breathing room */
}

.hub-wrap { max-width: 480px; }

/* .form-row label from css/style.css is styled for a block field label
   (bold, above the input) — override for an inline checkbox+text row. */
.hub-remember-row { margin-top: -8px; }
.hub-checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-weight: 400 !important;
  color: var(--ink) !important;
  font-size: 0.9rem !important;
  cursor: pointer;
}
.hub-checkbox-label input[type="checkbox"] {
  width: auto;
  margin: 0;
}

/* Dashboard needs more room for the tile grid than the auth-form pages do */
.hub-wrap.hub-wrap-wide { max-width: var(--max-width); }

/* Settings page: "Your details" and "Change password" sit side by side, and
   the user-access admin table spans both combined underneath. Width is
   viewport-relative (not a small fixed cap) so it actually uses the
   available screen space on a wide monitor instead of leaving a lot of dead
   space either side, capped at 1600px so line lengths stay sane on a 4K/
   ultrawide display. */
.hub-settings-grid {
  width: min(1600px, 94vw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.hub-settings-header, .hub-user-access {
  grid-column: 1 / -1;
}
@media (max-width: 760px) {
  .hub-settings-grid { grid-template-columns: 1fr; }
}

.hub-card {
  background: var(--paper);
  border: 1px solid rgba(20,40,61,0.1);
  border-radius: 6px;
  padding: 40px 36px;
  box-shadow: 0 18px 40px -24px rgba(20,40,61,0.35);
}

.hub-card h1 {
  color: var(--navy);
  font-size: 1.5rem;
  margin-bottom: 0.4em;
}

.hub-card .hub-subtitle {
  color: #5a564d;
  font-size: 0.95rem;
  margin: 0 0 28px;
}

.hub-links {
  margin-top: 20px;
  font-size: 0.9rem;
  text-align: center;
  color: #5a564d;
}

.hub-links a { color: var(--teal); font-weight: 600; text-decoration: none; }
.hub-links a:hover { text-decoration: underline; }

.alert {
  border-radius: 4px;
  padding: 12px 16px;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.alert-error   { background: #fbeceb; color: #a3352a; border: 1px solid #f3c9c5; }
.alert-success { background: #eaf4f2; color: #175a4c; border: 1px solid #c6e4dd; }

/* Dashboard tile grid — .card is a plain div on the marketing site; here it's
   also a link, so make the whole tile clickable without the marketing site's
   default link underline/color inheritance getting in the way. */
a.card { text-decoration: none; display: block; transition: box-shadow 0.2s ease, transform 0.2s ease; }
a.card:hover {
  box-shadow: 0 20px 36px -12px rgba(20,40,61,0.5);
  transform: translateY(-4px);
}

/* Dashboard background — the whole page (not a separate tall hero block) sits
   on the photo, same gradient-overlay treatment as the marketing homepage's
   .hero (css/style.css) so white text stays legible. Deliberately NOT a
   min-height:100vh section — that pushed the tiles below the fold, which
   isn't wanted here: everything (heading + tiles + footer) should fit in one
   screen with no scrolling, so the image is just the backdrop, not its own
   full-viewport block. */
body.hub-dashboard-page {
  background-image: linear-gradient(180deg, rgba(20,40,61,0.4) 0%, rgba(20,40,61,0.62) 100%),
                     url('/images/web/hero-taranaki.jpg');
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
}
.hub-dashboard-heading { color: #fff; }
.hub-dashboard-subtitle { color: rgba(255,255,255,0.92); margin-bottom: 28px; }

/* Dashboard app tiles — square, icon-led, no description (unlike the
   marketing site's .card, which is a wide text card — this only adds to it,
   never edits css/style.css's shared .card so the public service cards on
   the homepage are untouched). Fixed, deliberately compact size — flex
   (not the shared .card-grid, which stretches items to fill grid columns)
   so tiles stay this size regardless of viewport width. */
.app-tile-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.app-tile {
  width: 140px;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 16px;
  text-align: center;
}
.app-tile .app-icon {
  color: var(--teal);
  transition: color 0.15s ease;
}
.app-tile .app-icon svg {
  width: 42px;
  height: 42px;
  display: block;
}
a.card.app-tile:hover .app-icon { color: var(--navy); }

.app-tile-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: #5a564d;
}

.hub-empty-state {
  text-align: center;
  color: #5a564d;
  padding: 48px 24px;
}

/* Settings admin table — the actions cell (4 icon buttons) can be wider than
   a narrow viewport can fit next to Name/Email/Verified. Rather than let the
   row burst past the card's edge, contain any overflow to a horizontal
   scrollbar inside the card so the row never exceeds the box itself. */
.hub-table-scroll { overflow-x: auto; margin-top: 12px; }
.hub-admin-table { width: 100%; border-collapse: collapse; }
.hub-admin-table th, .hub-admin-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(20,40,61,0.1);
  font-size: 0.9rem;
  white-space: nowrap;
}
.hub-admin-table th { color: var(--navy); font-weight: 600; }
.hub-admin-table label { display: inline-flex; align-items: center; gap: 6px; margin-right: 16px; }

.hub-admin-table tr.is-deactivated { opacity: 0.55; }
.hub-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: #a3352a;
  background: #fbeceb;
  border-radius: 3px;
  padding: 1px 6px;
  margin-left: 6px;
  vertical-align: middle;
}

.hub-row-actions { display: flex; gap: 8px; }
.hub-row-actions form { display: contents; } /* forms can't be flex items directly */

.hub-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 5px;
  border: 1px solid rgba(20,40,61,0.18);
  background: var(--paper);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.hub-icon-btn svg { width: 17px; height: 17px; }

.hub-icon-btn.is-on {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}
.hub-icon-btn.is-on:hover { background: #185a61; }

.hub-icon-btn.is-off {
  color: #9a958a;
}
.hub-icon-btn.is-off:hover { border-color: var(--teal); color: var(--teal); }

.hub-icon-btn.is-delete {
  color: #9a958a;
  margin-left: 4px;
  border-left: 1px solid rgba(20,40,61,0.12);
}
.hub-icon-btn.is-delete:hover { border-color: #b3402a; color: #b3402a; background: #fbeceb; }

.hub-icon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: var(--paper);
  color: #9a958a;
  border-color: rgba(20,40,61,0.12);
}
.hub-icon-btn:disabled:hover { background: var(--paper); color: #9a958a; border-color: rgba(20,40,61,0.12); }

/* This app doesn't ship the marketing site's main.js (hero scroll/contact-form
   JS not relevant here), so the mobile nav drawer it drives isn't wired up —
   just hide the hamburger and let the (short) nav wrap instead. */
.nav-toggle { display: none !important; }
@media (max-width: 560px) {
  .site-header .wrap { height: auto; flex-wrap: wrap; padding: 12px 24px; }
  .nav-links { flex-wrap: wrap; gap: 16px; }
}
