/* ============================================================
   Matter Tech — Intranet (employee area) styles
   Loads AFTER styles.css. Scoped to body.intranet.
   Light, white-greenish identity that coordinates with the
   dark-green public site.
   ============================================================ */

body.intranet {
  color-scheme: light;
  --bg: #eef6f0;
  --bg-2: #e6f1ea;
  --surface: #ffffff;
  --surface-2: #f3f9f5;
  --surface-3: #e9f4ee;
  --line: rgba(15, 70, 50, 0.12);
  --line-strong: rgba(15, 70, 50, 0.22);
  --ink: #122019;
  --ink-soft: #2c4338;
  --muted: #5c7268;
  --accent: var(--green);
  --accent-ink: #ffffff;
  --glow: rgba(31, 143, 102, 0.22);
  --shadow: 0 20px 50px rgba(18, 50, 38, 0.10);
  --shadow-sm: 0 10px 26px rgba(18, 50, 38, 0.07);
  --grid-line: rgba(31, 143, 102, 0.06);

  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(39, 192, 138, 0.10), transparent 60%),
    linear-gradient(180deg, #eef6f0 0%, #e9f3ed 100%);
  min-height: 100vh;
}

/* keep the public ambient glow subtle here */
body.intranet .bg-grid { opacity: 0.5; }

/* ---------- Intranet header ---------- */
.in-header {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 18px;
  padding: 12px clamp(16px, 4vw, 36px);
  background: color-mix(in srgb, #ffffff 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.in-brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); font-weight: 800; letter-spacing: -0.02em; }
.in-brand img { height: 38px; width: 38px; border-radius: 9px; object-fit: contain; }
.in-brand .in-brand-sub { color: var(--muted); font-weight: 600; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em; display: block; line-height: 1; margin-top: 3px; }
.in-brand .in-brand-name { font-size: 1.05rem; line-height: 1; }

.in-header-spacer { flex: 1; }

.in-tabs { display: flex; gap: 4px; align-items: center; }
.in-tabs a {
  text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: 0.92rem;
  padding: 8px 13px; border-radius: 9px; transition: background var(--t-fast), color var(--t-fast);
}
.in-tabs a:hover { background: var(--surface-3); color: var(--ink); }
.in-tabs a.is-active { background: var(--accent); color: var(--accent-ink); }

.in-actions { display: flex; align-items: center; gap: 10px; }
.in-emp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px;
  padding: 9px 15px; border-radius: 999px; font-weight: 700; font-size: 0.9rem;
  line-height: 1.2; text-align: center; background: var(--accent); color: var(--accent-ink); text-decoration: none;
  border: 1px solid transparent; box-shadow: 0 8px 22px var(--glow);
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.in-emp-btn:hover { transform: translateY(-1px); }
.in-emp-btn svg { width: 18px; height: 18px; }

.in-avatar {
  width: 38px; height: 38px; border-radius: 999px; flex: 0 0 auto;
  display: inline-grid; place-items: center; font-weight: 800; font-size: 0.85rem;
  background: var(--surface-3); color: var(--green-deep); border: 1px solid var(--line-strong);
  cursor: pointer; text-decoration: none;
}
.in-iconbtn {
  width: 38px; height: 38px; border-radius: 10px; display: inline-grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-soft); cursor: pointer;
}
.in-iconbtn:hover { color: var(--ink); border-color: var(--accent); }
.in-iconbtn svg { width: 18px; height: 18px; }

/* mobile menu toggle for sidebar */
.in-menu-toggle { display: none; }

/* ---------- Page shell ---------- */
.in-shell { max-width: 1640px; margin: 0 auto; padding: clamp(16px, 3vw, 28px) clamp(16px, 3vw, 40px) 64px; }
.in-layout { display: grid; grid-template-columns: clamp(226px, 15.5vw, 262px) minmax(0, 1fr) clamp(264px, 17.5vw, 306px); gap: clamp(18px, 1.7vw, 28px); align-items: start; }

/* topic page has no right rail — use a 2-column grid on wide screens so there's no empty column */
@media (min-width: 1201px) {
  body[data-in-page="topic"] .in-layout { grid-template-columns: clamp(226px, 15.5vw, 262px) minmax(0, 1fr); }
}

/* ---------- Sidebar panels ---------- */
.in-sidebar { display: grid; gap: 16px; position: sticky; top: 86px; max-height: calc(100vh - 102px); overflow-y: auto; scrollbar-width: thin; padding-right: 2px; }
.in-panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.in-panel > h3 {
  margin: 0; padding: 13px 16px; font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); display: flex; align-items: center; gap: 9px; border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.in-panel > h3 .p-ico { width: 18px; height: 18px; color: var(--accent); }
.in-list { display: grid; }
.in-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 16px; text-decoration: none;
  color: var(--ink); border-top: 1px solid transparent; transition: background var(--t-fast);
}
.in-item + .in-item { border-top: 1px solid var(--line); }
.in-item:hover { background: var(--surface-3); }
.in-item .i-ico {
  width: 34px; height: 34px; flex: 0 0 auto; border-radius: 9px; display: grid; place-items: center;
  background: var(--surface-3); color: var(--green-deep);
}
.in-item .i-ico svg { width: 18px; height: 18px; }
.in-item .i-txt { min-width: 0; }
.in-item .i-title { font-weight: 650; font-size: 0.93rem; line-height: 1.25; }
.in-item .i-sub { color: var(--muted); font-size: 0.78rem; line-height: 1.3; }
.in-item .i-arrow { margin-left: auto; color: var(--muted); width: 16px; height: 16px; flex: 0 0 auto; }

/* ---------- Main content ---------- */
.in-main { min-width: 0; display: grid; gap: 22px; }

.in-hero {
  background: linear-gradient(120deg, var(--green-deep), var(--green));
  color: #eafff5; border-radius: 18px; padding: clamp(20px, 3vw, 30px);
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.in-hero h1 { margin: 0 0 6px; font-size: clamp(1.4rem, 2.4vw, 2rem); letter-spacing: -0.02em; }
.in-hero p { margin: 0; color: #cdeede; max-width: 60ch; }
.in-hero .in-hero-meta { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 10px; }
.in-chip {
  background: rgba(255,255,255,0.14); color: #eafff5; border: 1px solid rgba(255,255,255,0.22);
  padding: 5px 11px; border-radius: 999px; font-size: 0.82rem; font-weight: 600;
}

.in-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 2px; }
.in-section-head h2 { margin: 0; font-size: 1.15rem; letter-spacing: -0.01em; }
.in-section-head a { color: var(--accent); text-decoration: none; font-weight: 600; font-size: 0.88rem; }

.in-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.in-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px;
  box-shadow: var(--shadow-sm); text-decoration: none; color: var(--ink); display: grid; gap: 7px;
  transition: transform var(--t-fast), border-color var(--t-fast);
}
.in-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.in-card .c-tag { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.in-card h4 { margin: 0; font-size: 1rem; line-height: 1.3; }
.in-card p { margin: 0; color: var(--muted); font-size: 0.88rem; }
.in-card .c-meta { color: var(--muted); font-size: 0.78rem; margin-top: 2px; }

/* event row */
.in-rows { display: grid; gap: 10px; }
.in-row {
  display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; text-decoration: none; color: var(--ink);
}
.in-row:hover { border-color: var(--accent); }
.in-row .r-date {
  flex: 0 0 auto; width: 52px; text-align: center; border-radius: 9px; padding: 6px 0;
  background: var(--surface-3); color: var(--green-deep);
}
.in-row .r-date .d-day { font-weight: 800; font-size: 1.1rem; line-height: 1; }
.in-row .r-date .d-mon { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; }
.in-row .r-body { min-width: 0; }
.in-row .r-body h4 { margin: 0 0 2px; font-size: 0.96rem; }
.in-row .r-body p { margin: 0; color: var(--muted); font-size: 0.82rem; }

/* ---------- News carousel (auto-rotating gallery) ---------- */
.in-carousel {
  position: relative; border-radius: 18px; overflow: hidden; margin-bottom: 16px;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  aspect-ratio: 16 / 6.4; min-height: 232px;
}
.in-carousel .c-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity 0.6s var(--ease);
  background-size: cover; background-position: center; pointer-events: none;
}
.in-carousel .c-slide.is-active { opacity: 1; pointer-events: auto; }
.in-carousel .c-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: clamp(18px, 3vw, 30px); padding-right: 64px;
  background: linear-gradient(180deg, rgba(6, 36, 26, 0.05) 0%, rgba(6, 30, 22, 0.16) 42%, rgba(5, 26, 19, 0.72) 100%);
}
.in-carousel .c-tag { color: #c4f1de; font-weight: 700; font-size: 0.74rem; letter-spacing: 0.09em; text-transform: uppercase; }
.in-carousel h3 { margin: 7px 0 5px; color: #ffffff; font-size: clamp(1.2rem, 2.1vw, 1.7rem); letter-spacing: -0.01em; line-height: 1.18; }
.in-carousel p { margin: 0; color: #e2f3ea; max-width: 62ch; font-size: 0.95rem; }
.in-carousel .c-dots { position: absolute; bottom: 14px; right: 16px; display: flex; gap: 7px; z-index: 3; }
.in-carousel .c-dot { width: 9px; height: 9px; border-radius: 999px; background: rgba(255,255,255,0.45); border: none; cursor: pointer; padding: 0; transition: background var(--t-fast), transform var(--t-fast); }
.in-carousel .c-dot.is-active { background: #ffffff; transform: scale(1.15); }
.in-carousel .c-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 38px; height: 38px; border-radius: 999px; display: grid; place-items: center; cursor: pointer;
  background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.32); color: #fff;
  transition: background var(--t-fast);
}
.in-carousel .c-arrow:hover { background: rgba(255,255,255,0.3); }
.in-carousel .c-arrow svg { width: 18px; height: 18px; }
.in-carousel .c-arrow.prev { left: 14px; } .in-carousel .c-arrow.prev svg { transform: rotate(180deg); }
.in-carousel .c-arrow.next { right: 14px; }
@media (max-width: 600px) {
  .in-carousel { aspect-ratio: 16 / 11; }
  .in-carousel .c-arrow { display: none; }
}

/* ---------- News feed (with images) ---------- */
.in-news { display: grid; gap: 14px; }
.n-card {
  display: grid; grid-template-columns: 168px 1fr; align-items: stretch;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  box-shadow: var(--shadow-sm); text-decoration: none; color: var(--ink);
  transition: transform var(--t-fast), border-color var(--t-fast);
}
.n-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.n-card .n-img { background-size: cover; background-position: center; min-height: 132px; }
.n-card .n-body { padding: 15px 17px; display: grid; gap: 6px; align-content: center; }
.n-card .n-tag { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--accent); }
.n-card h4 { margin: 0; font-size: 1.06rem; line-height: 1.3; }
.n-card p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.n-card .n-meta { color: var(--muted); font-size: 0.78rem; margin-top: 2px; }

/* first/featured news card: taller image on top */
.n-card.feature { grid-template-columns: 1fr; }
.n-card.feature .n-img { min-height: 190px; }
.n-card.feature .n-body { padding: 17px 19px 19px; }
.n-card.feature h4 { font-size: 1.22rem; }

/* ---------- Tools (compact tiles, fixed icon size) ---------- */
.in-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.in-tool {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow-sm);
  transition: transform var(--t-fast), border-color var(--t-fast);
}
.in-tool:hover { transform: translateY(-2px); border-color: var(--accent); }
.in-tool .t-ico { width: 42px; height: 42px; flex: 0 0 auto; border-radius: 11px; display: grid; place-items: center; background: var(--surface-3); color: var(--green-deep); }
.in-tool .t-ico svg { width: 21px; height: 21px; }
.in-tool .t-txt { min-width: 0; }
.in-tool .t-title { font-weight: 700; font-size: 0.92rem; line-height: 1.2; }
.in-tool .t-sub { color: var(--muted); font-size: 0.78rem; }

/* ---------- Right rail widgets ---------- */
.in-rail { display: grid; gap: 16px; position: sticky; top: 86px; max-height: calc(100vh - 102px); overflow-y: auto; scrollbar-width: thin; padding-right: 2px; }
.in-widget { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); overflow: hidden; }
.in-widget > h3 {
  margin: 0; padding: 13px 16px; font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
  display: flex; align-items: center; gap: 9px; border-bottom: 1px solid var(--line); background: var(--surface-2);
}
.in-widget > h3 .p-ico { width: 18px; height: 18px; color: var(--accent); }
.in-widget .w-body { padding: 6px; display: grid; }
.w-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 11px; text-decoration: none; color: var(--ink); }
.w-item:hover { background: var(--surface-3); }
.w-item .w-date { flex: 0 0 auto; width: 46px; text-align: center; border-radius: 9px; padding: 6px 0; background: var(--surface-3); color: var(--green-deep); }
.w-item .w-date .d-day { font-weight: 800; font-size: 1.02rem; line-height: 1; }
.w-item .w-date .d-mon { font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.06em; }
.w-item .w-ico { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--green-deep); }
.w-item .w-ico svg { width: 19px; height: 19px; }
.w-item .w-txt { min-width: 0; }
.w-item .w-title { font-weight: 650; font-size: 0.9rem; line-height: 1.25; }
.w-item .w-sub { color: var(--muted); font-size: 0.78rem; line-height: 1.3; }
.in-widget .w-foot { padding: 10px 16px; border-top: 1px solid var(--line); }
.in-widget .w-foot a { color: var(--accent); text-decoration: none; font-weight: 600; font-size: 0.85rem; }

/* spotlight / kudos widget */
.w-spotlight { padding: 16px; display: grid; gap: 10px; }
.w-spotlight .s-quote { color: var(--ink-soft); font-size: 0.92rem; }
.w-spotlight .s-by { display: flex; align-items: center; gap: 10px; }
.w-spotlight .s-av { width: 34px; height: 34px; border-radius: 999px; display: grid; place-items: center; font-weight: 800; font-size: 0.8rem; background: linear-gradient(135deg, var(--green), var(--green-bright)); color: #fff; }

/* ---------- Topic page ---------- */
.in-doc { max-width: 960px; }
.in-breadcrumb { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 0.85rem; margin-bottom: 14px; }
.in-breadcrumb a { color: var(--muted); text-decoration: none; }
.in-breadcrumb a:hover { color: var(--accent); }
.in-doc h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0 0 8px; letter-spacing: -0.02em; }
.in-doc .doc-lede { color: var(--ink-soft); font-size: 1.05rem; margin: 0 0 22px; }
.in-doc h2 { font-size: 1.2rem; margin: 26px 0 8px; }
.in-doc h3 { font-size: 1.02rem; margin: 18px 0 6px; }
.in-doc p, .in-doc li { color: var(--ink-soft); }
.in-doc ul, .in-doc ol { padding-left: 20px; }
.in-doc li { margin: 5px 0; }
.in-callout {
  background: var(--surface-3); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 10px; padding: 14px 16px; margin: 18px 0; color: var(--ink-soft); font-size: 0.92rem;
}
.in-doc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

/* ---------- Employee self-service ---------- */
.in-emp-head {
  display: flex; align-items: center; gap: 18px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; padding: 18px 20px; box-shadow: var(--shadow-sm); flex-wrap: wrap;
}
.in-emp-head .e-avatar {
  width: 64px; height: 64px; border-radius: 999px; display: grid; place-items: center; font-weight: 800; font-size: 1.4rem;
  background: linear-gradient(135deg, var(--green), var(--green-bright)); color: #fff; flex: 0 0 auto;
}
.in-emp-head h1 { margin: 0; font-size: 1.4rem; }
.in-emp-head .e-meta { color: var(--muted); font-size: 0.9rem; }

.in-subnav { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.in-subnav button {
  border: none; background: transparent; cursor: pointer; font: inherit; font-weight: 600; font-size: 0.92rem;
  color: var(--ink-soft); padding: 9px 13px; border-radius: 9px 9px 0 0; border-bottom: 2px solid transparent;
}
.in-subnav button:hover { background: var(--surface-3); }
.in-subnav button.is-active { color: var(--green-deep); border-bottom-color: var(--accent); }

.in-tabpane { display: none; }
.in-tabpane.is-active { display: grid; gap: 18px; }

.in-stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.in-stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: var(--shadow-sm);
}
.in-stat .s-label { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }
.in-stat .s-value { font-size: 1.5rem; font-weight: 800; margin-top: 4px; }
.in-stat .s-sub { color: var(--muted); font-size: 0.82rem; }

.in-table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); overflow: auto; }
.in-table { width: 100%; border-collapse: collapse; min-width: 480px; }
.in-table th, .in-table td { text-align: left; padding: 12px 14px; font-size: 0.9rem; }
.in-table th { color: var(--muted); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 1px solid var(--line); }
.in-table tbody tr + tr td { border-top: 1px solid var(--line); }
.in-table .t-right { text-align: right; }
.in-badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 0.74rem; font-weight: 700; }
.in-badge.ok { background: rgba(31,143,102,0.14); color: var(--green-deep); }
.in-badge.warn { background: rgba(199,154,62,0.16); color: #8a6a1f; }
.in-badge.info { background: rgba(63,134,168,0.16); color: #2c5a72; }

.in-progress { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.in-progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--green-bright)); }

.in-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.in-block { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: var(--shadow-sm); }
.in-block h3 { margin: 0 0 12px; font-size: 1rem; }
.in-deflist { display: grid; gap: 10px; }
.in-deflist .d-row { display: flex; justify-content: space-between; gap: 14px; font-size: 0.92rem; }
.in-deflist .d-row span:first-child { color: var(--muted); }

/* ---------- Login ---------- */
.in-auth-wrap { min-height: calc(100vh - 64px); display: grid; place-items: center; padding: 40px 20px; }
.in-auth-card {
  width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; box-shadow: var(--shadow); padding: 30px 28px;
}
.in-auth-card h1 { margin: 0 0 4px; font-size: 1.4rem; }
.in-auth-card .sub { color: var(--muted); margin: 0 0 20px; font-size: 0.92rem; }
.in-field { display: grid; gap: 6px; margin-bottom: 14px; font-size: 0.9rem; font-weight: 600; }
.in-field input {
  font: inherit; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--surface-2); color: var(--ink);
}
.in-field select,
.in-field textarea {
  font: inherit; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--surface-2); color: var(--ink); resize: vertical;
}
.in-field input:focus,
.in-field select:focus,
.in-field textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
.in-auth-status { margin: 8px 0 0; font-size: 0.86rem; min-height: 1.2em; }
.in-auth-status.err { color: var(--rose); }
.in-auth-status.ok { color: var(--green-deep); }
.in-auth-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 0.8rem; margin: 16px 0; }
.in-auth-divider::before, .in-auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.in-demo-note { font-size: 0.8rem; color: var(--muted); margin-top: 14px; text-align: center; }

/* ---------- Public intranet landing (uses dark base, simple) ---------- */
.in-gate-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

/* ---------- Footer (intranet) ---------- */
.in-footer { border-top: 1px solid var(--line); margin-top: 40px; }
.in-footer .in-foot-inner { max-width: 1320px; margin: 0 auto; padding: 20px clamp(16px, 4vw, 36px); display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; color: var(--muted); font-size: 0.82rem; }

/* ============================================================
   Responsive — keep mobile simple and uncluttered
   ============================================================ */
/* tablet: drop the right rail below, widgets flow side by side */
@media (max-width: 1200px) {
  .in-layout { grid-template-columns: 260px minmax(0, 1fr); }
  .in-rail { grid-column: 1 / -1; position: static; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); align-items: start; max-height: none; overflow: visible; }
}

@media (max-width: 1000px) {
  .in-layout { grid-template-columns: 1fr; }
  .in-main { order: 1; }
  .in-rail { order: 2; }
  .in-sidebar { position: static; order: 3; max-height: none; overflow: visible; }
  .in-menu-toggle {
    display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
    background: var(--surface); border: 1px solid var(--line); color: var(--ink-soft); cursor: pointer;
  }
  .in-menu-toggle svg { width: 18px; height: 18px; }
}

@media (max-width: 760px) {
  /* collapse header tabs into a scrollable strip below the header */
  .in-tabs {
    order: 5; width: 100%; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch;
    border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px;
  }
  .in-header { flex-wrap: wrap; }
  .in-grid-2 { grid-template-columns: 1fr; }
  .in-brand .in-brand-sub { display: none; }
  .in-emp-btn .lbl { display: none; }
  .in-emp-btn { padding: 9px; }
  .in-stat-grid { grid-template-columns: 1fr 1fr; }
  .n-card { grid-template-columns: 1fr; }
  .n-card .n-img { min-height: 150px; }
}

@media (max-width: 440px) {
  .in-cards { grid-template-columns: 1fr; }
  .in-stat-grid { grid-template-columns: 1fr; }
}

/* ---------- T-Key review queue ---------- */
.in-admin-main { max-width: 1180px; margin: 0 auto; display: grid; gap: 18px; }
.in-empty {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px; display: grid; gap: 4px; color: var(--ink-soft);
}
.in-empty strong { color: var(--ink); }
.in-review-card {
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  padding: 16px; display: grid; gap: 13px; box-shadow: var(--shadow-sm);
}
.in-review-card + .in-review-card { margin-top: 14px; }
.in-review-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.in-review-head h3 { margin: 0 0 3px; font-size: 1rem; }
.in-review-head p { margin: 0; color: var(--muted); font-size: 0.86rem; }
.in-review-state { display: grid; gap: 5px; justify-items: end; color: var(--muted); font-size: 0.78rem; white-space: nowrap; }
.in-review-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.in-review-grid div {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 3px;
}
.in-review-grid strong { color: var(--muted); font-size: 0.72rem; letter-spacing: .06em; text-transform: uppercase; }
.in-review-grid span { color: var(--ink-soft); font-size: 0.9rem; }
.in-review-purpose { margin: 0; color: var(--ink-soft); font-size: 0.92rem; line-height: 1.55; }
.in-review-actions { display: grid; grid-template-columns: minmax(140px, 180px) minmax(220px, 1fr) auto; gap: 10px; align-items: center; }
.in-review-actions select,
.in-review-actions input {
  font: inherit; min-height: 40px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--surface-2); color: var(--ink); padding: 9px 11px;
}
.in-review-actions.compact { grid-template-columns: auto auto 1fr; }
.in-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.in-form-grid .full { grid-column: 1 / -1; }
.job-admin-tags { display: flex; flex-wrap: wrap; gap: 7px; }
@media (max-width: 760px) {
  .in-review-head { display: grid; }
  .in-review-state { justify-items: start; }
  .in-review-actions { grid-template-columns: 1fr; }
  .in-review-actions.compact { grid-template-columns: 1fr; }
  .in-form-grid { grid-template-columns: 1fr; }
}
