/* NUTRINOON* HUB — styles */

/* ── Brand tokens (from the Nutrinoon logo: indigo #191B48, teal #09A3B1) ── */
:root {
  --indigo: #191b48;
  --indigo-deep: #12133a;
  --teal: #09a3b1;
  --teal-deep: #0c5f6e;
  --band: linear-gradient(120deg, var(--indigo-deep) 0%, var(--indigo) 50%, var(--teal-deep) 100%);
  --on-band: #ffffff;
  --on-band-muted: #aab0cc;

  --bg: #f4f5f8;
  --surface: #ffffff;
  --surface-hover: #ffffff;
  --text: #161831;
  --muted: #666a80;
  --border: #e2e4ec;
  --accent: #08808b;          /* teal, darkened for readable text on white */
  --accent-soft: #e2f4f6;
  --error: #b3402f;
  --error-soft: #fbece9;
  --shadow: 0 1px 2px rgba(22,24,49,.05);
  --shadow-hover: 0 6px 16px rgba(22,24,49,.10);
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg); color: var(--text);
  min-height: 100vh; -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column;   /* lets the footer sit at the bottom of the screen */
}
button { font: inherit; }

/* ── Brand ── */
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: .08em; font-size: 14px; color: inherit; text-decoration: none; }
.brand img { height: 48px; width: auto; }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--teal); }
.brand span:not(.dot) {      /* the "HUB" badge next to the logo */
  display: inline-block; background: var(--teal); color: #fff;
  font-size: 24px; font-weight: 700; letter-spacing: .12em; line-height: 1;   /* about the height of the logo lettering */
  padding: 7px 10px 7px 13px; border-radius: 8px;
}

/* ── Top band (header, greeting, search) ── */
.band { background: var(--band); color: var(--on-band); flex: none; }
.band .brand { color: var(--on-band); }
.band .brand img { filter: brightness(0) invert(1); }   /* logo in white on the dark band */
.band .brand span:not(.dot) { position: relative; top: 5px; }   /* line up with the NUTRINOON lettering */
.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.band .wrap { padding-top: 32px; padding-bottom: 32px; }
main.wrap { width: 100%; flex: 1 0 auto; padding-top: 28px; padding-bottom: 40px; }

header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 48px; }
.clock { color: var(--on-band-muted); font-size: 14px; font-variant-numeric: tabular-nums; min-height: 1.2em; }
.meta { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }

.user { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.user .ident { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.user .fullname { font-weight: 600; color: var(--on-band); font-size: 13px; }
.user .email { color: var(--on-band-muted); font-size: 12px; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--teal); color: #fff;
  display: grid; place-items: center; font-weight: 600; font-size: 13px; overflow: hidden; flex: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.signout {
  font-weight: 500; font-size: 13px; color: #d5d8ea; background: transparent;
  border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: 4px 12px; cursor: pointer; white-space: nowrap;
}
.signout:hover { color: #fff; background: rgba(255,255,255,.1); }

.hero { margin-bottom: 24px; }
.hero h1 { font-weight: 600; font-size: clamp(26px, 4vw, 32px); line-height: 1.15; letter-spacing: -.02em; color: var(--on-band); }
.hero p { color: var(--on-band-muted); margin-top: 6px; }

.search {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 0; border-radius: 12px;
  padding: 0 14px; box-shadow: 0 8px 24px rgba(10,12,40,.18);
}
.search:focus-within { box-shadow: 0 0 0 3px rgba(9,163,177,.45), 0 8px 24px rgba(10,12,40,.18); }
.search svg { flex: none; color: var(--muted); }
.search input { flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; padding: 14px 0; }
.search kbd { font: 12px "Inter", sans-serif; color: var(--muted); border: 1px solid var(--border); border-radius: 6px; padding: 2px 6px; }

/* ── Tool cards ── */
section { margin-bottom: 32px; }
section h2 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }

.tile-wrap { position: relative; display: flex; min-width: 0; }
.tile-wrap .tile { flex: 1; min-width: 0; }   /* never wider than its column */
.tile {
  display: flex; flex-direction: column; gap: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 18px; text-decoration: none; color: inherit;
  box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  position: relative;
}
.tile:hover, .tile:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: #bfe6ea; outline: none; }
.tile:focus-visible { box-shadow: 0 0 0 3px rgba(9,163,177,.35), var(--shadow-hover); }
.icon {
  width: 44px; height: 44px; border-radius: 10px; background: var(--accent-soft);
  display: grid; place-items: center; overflow: hidden; font-weight: 600; color: var(--accent);
}
.icon img { width: 26px; height: 26px; }
.tile .name { font-weight: 600; font-size: 15px; }
.tile .desc { color: var(--muted); font-size: 13px; line-height: 1.4; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }   /* one line, so all cards are the same height */
.tile > div:last-child { min-width: 0; }
.tile .ext { position: absolute; top: 16px; right: 16px; color: var(--muted); opacity: 0; transition: opacity .15s; }
.tile:hover .ext { opacity: 1; }
.tile.todo { border-style: dashed; cursor: default; }
.tile.todo:hover { transform: none; box-shadow: var(--shadow); border-color: var(--border); }
.tile.todo .desc { color: #b8752f; }
.tile.soon .desc { color: var(--muted); }
.tile.soon .ext { display: none; }
.soon-tag {
  position: absolute; top: 14px; right: 14px;
  font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 3px 8px;
}

.empty { color: var(--muted); text-align: center; padding: 40px 0; display: none; }
footer { color: var(--muted); font-size: 13px; text-align: center; width: 100%; }
footer, footer.wrap { padding-top: 16px; padding-bottom: 40px; }   /* space under the footer text */

/* ── Login page ── */
.login-page {
  background: var(--band); background-attachment: fixed;
  align-items: center; padding: 32px 16px 0;
}
.login-page .card { margin: auto 0; }
.login-page footer { color: var(--on-band-muted); }
.card {
  width: 100%; max-width: 400px; background: var(--surface);
  border-radius: 20px; box-shadow: 0 20px 60px rgba(8,10,40,.35);
  padding: 40px 32px 32px; text-align: center;
}
.brand-stacked { flex-direction: column; margin-bottom: 28px; }
.brand-stacked img { height: 56px; }
.brand-stacked .dot { width: 14px; height: 14px; }

.card h1 { font-weight: 600; font-size: 26px; line-height: 1.2; letter-spacing: -.02em; color: var(--indigo); }
.card .sub { color: var(--muted); margin-top: 8px; font-size: 15px; line-height: 1.5; }
.gbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 280px; max-width: 100%; height: 44px; margin-top: 28px;
  border-radius: 999px; border: 1px solid #dadce0; background: #fff;
  font-weight: 500; font-size: 14px; color: #3c4043; text-decoration: none;
  transition: background .15s, box-shadow .15s;
}
.gbtn:hover { background: #f8faff; box-shadow: 0 1px 3px rgba(60,64,67,.15); }
.gbtn:focus-visible { outline: 3px solid rgba(9,163,177,.45); outline-offset: 2px; }
.msg { margin-top: 20px; padding: 12px 14px; border-radius: 10px; font-size: 14px; line-height: 1.45; text-align: left; }
.msg.error { background: var(--error-soft); color: var(--error); }
.msg.info { background: var(--accent-soft); color: var(--accent); }

/* ── Small screens ── */
@media (max-width: 600px) {
  .user .email { display: none; }
}
@media (max-width: 480px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tile { padding: 14px; }
  .search kbd { display: none; }
  header { margin-bottom: 28px; }
  .band .wrap { padding-top: 20px; padding-bottom: 24px; }
  .brand img { height: 36px; }
  .brand span:not(.dot) { font-size: 18px; padding: 6px 8px 6px 10px; }
  .band .brand span:not(.dot) { top: 4px; }
  .clock { display: none; }
  .card { padding: 32px 20px 24px; }
  .brand-stacked img { height: 44px; }
}
@media (max-width: 400px) {
  .user .ident { display: none; }
}

/* ® in the footer */
footer .reg { font-size: .7em; vertical-align: .45em; line-height: 0; margin-left: 1px; }
