:root {
  --brand-red: #cb252b;
  --brand-red-dark: #9f171c;
  --brand-red-bright: #f04a50;
  --brand-red-soft: #fbeaec;
  color: #172033;
  background: #eef1f6;
  font-family:
    Inter, "SF Pro Display", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    linear-gradient(rgba(30, 42, 68, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 42, 68, 0.035) 1px, transparent 1px),
    #eef1f6;
  background-size: 32px 32px;
}

button,
input,
select {
  font: inherit;
}

.shell {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.topbar {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  overflow: hidden;
  min-height: 270px;
  padding: 44px 48px 70px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  color: #fff;
  background:
    radial-gradient(circle at 87% 12%, rgba(203, 37, 43, 0.24), transparent 23rem),
    linear-gradient(128deg, #0c1426 0%, #151b2d 55%, #32181f 100%);
  box-shadow: 0 24px 70px rgba(15, 27, 48, 0.2);
}

.topbar::after {
  position: absolute;
  right: -70px;
  bottom: -155px;
  width: 390px;
  height: 390px;
  border: 1px solid rgba(240, 74, 80, 0.2);
  border-radius: 50%;
  box-shadow:
    0 0 0 45px rgba(240, 74, 80, 0.045),
    0 0 0 90px rgba(240, 74, 80, 0.03);
  content: "";
  pointer-events: none;
}

.brand-block,
.header-actions {
  position: relative;
  z-index: 1;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 20px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.22);
}

.eyebrow,
.section-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.eyebrow {
  color: #90a8b8;
}

h1 {
  max-width: 750px;
  margin: 0;
  font-size: clamp(2.7rem, 5vw, 5.25rem);
  font-weight: 760;
  letter-spacing: -0.065em;
  line-height: 0.92;
}

.subtitle {
  max-width: 650px;
  margin: 20px 0 0;
  color: #aab8c8;
  font-size: 1rem;
  line-height: 1.65;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.screen-nav {
  display: inline-flex;
  flex-shrink: 0;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.055);
}

.screen-nav a {
  padding: 7px 10px;
  border-radius: 6px;
  color: #9eacbc;
  font-size: 0.7rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.screen-nav a:hover {
  color: #fff;
}

.screen-nav a.active {
  color: #fff;
  background: var(--brand-red);
}

.auth-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  color: #9eacbc;
  background: rgba(255, 255, 255, 0.055);
  font-size: 0.66rem;
  font-weight: 700;
  flex-shrink: 0;
}

.auth-user > span {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-user form {
  margin: 0;
}

.auth-user button {
  padding: 5px 7px;
  border: 0;
  border-radius: 5px;
  color: #cbd4dd;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  font-size: 0.62rem;
  font-weight: 800;
}

.auth-user button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.live-indicator,
.read-only-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.025em;
}

.live-indicator {
  padding: 11px 14px;
  color: #c6d1db;
  background: rgba(255, 255, 255, 0.075);
  backdrop-filter: blur(10px);
}

.live-indicator i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4cf2b2;
  box-shadow: 0 0 0 5px rgba(76, 242, 178, 0.1);
}

.refresh-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 17px;
  border: 1px solid var(--brand-red);
  border-radius: 10px;
  color: #fff;
  background: var(--brand-red);
  box-shadow: 0 10px 26px rgba(203, 37, 43, 0.2);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 850;
  flex-shrink: 0;
  white-space: nowrap;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    opacity 140ms ease;
}

.refresh-button:hover {
  background: #b71f25;
  box-shadow: 0 14px 32px rgba(203, 37, 43, 0.3);
  transform: translateY(-2px);
}

.refresh-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.refresh-button.loading span {
  animation: spin 800ms linear infinite;
}

.summary {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: -36px 24px 22px;
}

.metric {
  display: flex;
  min-width: 0;
  min-height: 150px;
  padding: 22px 24px;
  border: 1px solid #dce2eb;
  border-radius: 17px;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 15px 36px rgba(26, 40, 67, 0.08);
}

.metric-featured {
  grid-column: span 2;
  border-color: #1e3451;
  color: #fff;
  background:
    linear-gradient(120deg, rgba(203, 37, 43, 0.28), transparent 58%),
    #14233a;
}

.metric span {
  display: block;
  color: #5d6878;
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.metric small {
  display: block;
  margin-top: 6px;
  color: #98a2b0;
  font-size: 0.72rem;
  font-weight: 600;
}

.metric strong {
  display: block;
  max-width: 100%;
  margin-top: 20px;
  overflow: hidden;
  color: #172033;
  font-size: clamp(1.85rem, 2.8vw, 2.85rem);
  font-weight: 780;
  letter-spacing: -0.055em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-featured span {
  color: #8b9aad;
}

.metric-featured small {
  color: #9c8b90;
}

.metric-featured strong {
  color: #ff6b70;
  font-size: clamp(2.05rem, 4vw, 3.7rem);
}

.metric-accent {
  border-top: 3px solid var(--brand-red);
}

.metric-warning {
  border-top: 3px solid #efb449;
}

.metric-danger {
  border-top: 3px solid #ed756c;
}

.vendor-panel {
  overflow: hidden;
  margin-bottom: 22px;
  border: 1px solid #1f3551;
  border-radius: 20px;
  color: #dce5ed;
  background:
    radial-gradient(circle at 90% 0, rgba(203, 37, 43, 0.15), transparent 22rem),
    #14233a;
  box-shadow: 0 16px 42px rgba(22, 35, 59, 0.11);
}

.vendor-panel-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 23px 28px 18px;
}

.vendor-panel-heading h2 {
  color: #fff;
}

.vendor-panel-heading > p {
  margin: 0;
  color: #8494a7;
  font-size: 0.72rem;
}

.vendor-summary-wrap {
  overflow-x: auto;
}

.vendor-summary-table {
  width: 100%;
  min-width: 640px;
  table-layout: fixed;
}

.vendor-summary-table th {
  color: #8392a5;
  background: rgba(255, 255, 255, 0.035);
}

.vendor-summary-table td {
  color: #dce5ed;
  border-color: rgba(255, 255, 255, 0.075);
}

.vendor-summary-table tbody tr:hover {
  background: rgba(203, 37, 43, 0.07);
}

.vendor-summary-table th:nth-child(1),
.vendor-summary-table td:nth-child(1) {
  width: 40%;
}

.vendor-summary-table th:nth-child(2),
.vendor-summary-table td:nth-child(2) {
  width: 15%;
}

.vendor-summary-table th:nth-child(3),
.vendor-summary-table td:nth-child(3) {
  width: 20%;
}

.vendor-summary-table th:nth-child(4),
.vendor-summary-table td:nth-child(4) {
  width: 25%;
}

.vendor-avatar {
  display: inline-grid;
  width: 27px;
  height: 27px;
  margin-right: 10px;
  border: 1px solid rgba(240, 74, 80, 0.32);
  border-radius: 7px;
  color: #ff8589;
  background: rgba(203, 37, 43, 0.14);
  font-size: 0.68rem;
  font-weight: 900;
  place-items: center;
  vertical-align: middle;
}

.vendor-name {
  color: #f5f8fa;
  font-size: 0.82rem;
}

.vendor-identity {
  display: inline-flex;
  vertical-align: middle;
  flex-direction: column;
}

.vendor-type {
  margin-top: 3px;
  font-size: 0.62rem;
  font-weight: 750;
}

.vendor-type.inventory {
  color: #ff8589;
}

.vendor-type.third-party {
  color: #8cb9da;
}

.vendor-link-value {
  color: #ff8589 !important;
  font-weight: 820;
}

.inventory-panel {
  overflow: hidden;
  border: 1px solid #dbe1e9;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 50px rgba(22, 35, 59, 0.08);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 28px 18px;
}

.section-kicker {
  margin-bottom: 7px;
  color: var(--brand-red);
}

h2 {
  margin: 0;
  color: #172033;
  font-size: 1.45rem;
  letter-spacing: -0.035em;
}

.read-only-chip {
  padding: 8px 11px;
  color: #667284;
  background: #eef1f5;
}

.toolbar,
.status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.toolbar {
  padding: 16px 28px;
  border-top: 1px solid #edf0f4;
  border-bottom: 1px solid #e5e9ef;
  background: #f9fafc;
}

.search {
  position: relative;
  flex: 1;
}

.search::before {
  position: absolute;
  top: 50%;
  left: 15px;
  width: 13px;
  height: 13px;
  border: 2px solid #8993a2;
  border-radius: 50%;
  content: "";
  transform: translateY(-58%);
}

.search::after {
  position: absolute;
  top: calc(50% + 5px);
  left: 27px;
  width: 6px;
  height: 2px;
  border-radius: 2px;
  background: #8993a2;
  content: "";
  transform: rotate(45deg);
}

.search input,
.filter select {
  min-height: 44px;
  border: 1px solid #d5dbe5;
  border-radius: 9px;
  color: #202a3c;
  background: #fff;
  outline: none;
}

.search input {
  width: min(100%, 480px);
  padding: 0 15px 0 43px;
}

.search input:focus,
.filter select:focus {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(203, 37, 43, 0.12);
}

.filter {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #697486;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.filter select {
  padding: 0 36px 0 12px;
  text-transform: none;
}

.status-line {
  padding: 12px 28px;
  color: #7c8594;
  background: #fff;
  font-size: 0.75rem;
}

.status-line p {
  margin: 0;
}

.table-wrap {
  max-height: min(68vh, 680px);
  overflow: auto;
  border-top: 1px solid #eef1f5;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

.table-frame {
  position: relative;
  min-height: 180px;
}

.table-loading {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: flex;
  min-height: 180px;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  padding-top: min(14vh, 110px);
  color: #344154;
  background: rgba(248, 250, 252, 0.82);
  backdrop-filter: blur(2px);
}

.table-loading[hidden] {
  display: none;
}

.table-loading strong {
  font-size: 0.78rem;
  font-weight: 800;
}

.loading-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #cbd8d3;
  border-top-color: var(--brand-red);
  border-radius: 50%;
  animation: spin 650ms linear infinite;
}

.table-frame.is-loading .table-wrap {
  pointer-events: none;
}

.table-frame.is-loading table,
.table-frame.is-loading .empty-state {
  opacity: 0.48;
}

table {
  width: 100%;
  min-width: 1010px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid #edf0f4;
  text-align: left;
  white-space: nowrap;
}

th:nth-child(1),
td:nth-child(1) {
  width: 18%;
}

th:nth-child(2),
td:nth-child(2) {
  width: 10%;
}

th:nth-child(3),
td:nth-child(3) {
  width: 17%;
}

th:nth-child(4),
td:nth-child(4) {
  width: 9%;
}

th:nth-child(5),
td:nth-child(5) {
  width: 8%;
}

th:nth-child(6),
td:nth-child(6) {
  width: 10%;
}

th:nth-child(7),
td:nth-child(7) {
  width: 8%;
}

th:nth-child(8),
td:nth-child(8) {
  width: 8%;
}

th:nth-child(9),
td:nth-child(9) {
  width: 12%;
}

th {
  position: sticky;
  top: 0;
  z-index: 3;
  color: #7e8795;
  background: #f7f9fb;
  box-shadow: inset 0 -1px #e1e6ed;
  font-size: 0.67rem;
  font-weight: 850;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

td {
  color: #3c4657;
  font-size: 0.82rem;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr {
  transition: background 120ms ease;
}

tbody tr:hover {
  background: #fff7f7;
}

.product-name,
.display-name {
  display: block;
}

.product-name {
  color: #182235;
  font-size: 0.84rem;
  font-weight: 780;
}

.display-name {
  margin-top: 4px;
  color: #929aa7;
  font-size: 0.7rem;
}

code {
  padding: 5px 7px;
  border: 1px solid #efd5d7;
  border-radius: 5px;
  color: var(--brand-red-dark);
  background: #fff5f5;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.72rem;
}

.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.unused-count.stock-low,
.unused-count.stock-critical {
  color: var(--brand-red-dark);
  background: #fff4f4;
  box-shadow: inset 3px 0 #df6b70;
  font-weight: 850;
}

.unused-count.stock-critical {
  color: #861016;
  background: #fbdfe1;
  box-shadow: inset 3px 0 var(--brand-red);
}

.badge,
.source-badge {
  display: inline-block;
  padding: 6px 9px;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 850;
  letter-spacing: 0.015em;
}

.source-badge {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.source-badge.inventory,
.badge.success {
  color: #14704e;
  background: #dff5ec;
}

.source-badge.third-party,
.badge.info {
  color: #225d8d;
  background: #e0eef9;
}

.badge.warning {
  color: #875911;
  background: #fff0cf;
}

.badge.danger {
  color: #973b38;
  background: #fce3e2;
}

.badge.neutral {
  color: #5c6675;
  background: #e9edf2;
}

.empty-state {
  padding: 64px 20px;
  color: #7c8594;
  text-align: center;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 18px 24px;
  border-top: 1px solid #e8ecf1;
  color: #667284;
  background: #f9fafc;
  font-size: 0.78rem;
  font-weight: 750;
}

.pagination button {
  padding: 9px 13px;
  border: 1px solid #d4dae4;
  border-radius: 8px;
  color: #354054;
  background: #fff;
  cursor: pointer;
  font-weight: 750;
}

.pagination button:hover:not(:disabled) {
  border-color: var(--brand-red);
  color: var(--brand-red-dark);
}

.pagination button:disabled {
  cursor: default;
  opacity: 0.38;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1050px) {
  .topbar {
    align-items: flex-start;
    padding: 38px 36px 68px;
    flex-direction: column;
  }

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

  .metric-featured {
    grid-column: span 2;
  }
}

@media (max-width: 680px) {
  .shell {
    width: min(100% - 20px, 1280px);
    padding-top: 10px;
  }

  .topbar {
    min-height: 0;
    padding: 30px 24px 60px;
    border-radius: 20px;
  }

  .header-actions,
  .toolbar,
  .status-line {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .live-indicator,
  .refresh-button {
    justify-content: center;
  }

  .summary {
    grid-template-columns: 1fr;
    margin: -34px 12px 18px;
  }

  .metric-featured {
    grid-column: span 1;
  }

  .metric {
    min-height: 128px;
  }

  .metric-featured strong {
    font-size: clamp(1.8rem, 10vw, 2.8rem);
  }

  .panel-heading,
  .vendor-panel-heading,
  .toolbar,
  .status-line {
    padding-right: 18px;
    padding-left: 18px;
  }

  .search input {
    width: 100%;
  }

  .filter {
    justify-content: space-between;
  }

  .table-wrap {
    max-height: 64vh;
  }

  .vendor-panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .vendor-summary-table,
  .vendor-summary-table tbody {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .vendor-summary-table thead {
    display: none;
  }

  .vendor-summary-table tr {
    display: grid;
    padding: 13px 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .vendor-summary-table td,
  .vendor-summary-table td:nth-child(n) {
    display: block;
    width: auto;
    padding: 7px 0;
    border: 0;
    text-align: left;
  }

  .vendor-summary-table td:first-child {
    grid-column: 1 / -1;
    padding-bottom: 11px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.075);
  }

  .vendor-summary-table td::before {
    display: block;
    margin-bottom: 5px;
    color: #77889d;
    font-size: 0.58rem;
    font-weight: 850;
    letter-spacing: 0.07em;
    text-transform: uppercase;
  }

  .vendor-summary-table td:nth-child(2)::before {
    content: "Products";
  }

  .vendor-summary-table td:nth-child(3)::before {
    content: "Active links";
  }

  .vendor-summary-table td:nth-child(4)::before {
    content: "Link value";
  }
}

/* Compact operations-console layout */
:root {
  background: #f3f5f8;
}

body {
  background: #f3f5f8;
}

.shell {
  width: min(1480px, calc(100% - 40px));
  padding: 20px 0 40px;
}

.topbar {
  min-height: 124px;
  padding: 24px 28px;
  align-items: center;
  gap: 24px;
  border-color: #1b2c45;
  border-radius: 16px;
  background:
    radial-gradient(circle at 92% 0, rgba(203, 37, 43, 0.2), transparent 22rem),
    #111d31;
  box-shadow: 0 10px 30px rgba(15, 27, 48, 0.12);
}

.topbar::after {
  right: -80px;
  bottom: -220px;
  width: 340px;
  height: 340px;
}

.brand-row {
  margin-bottom: 9px;
}

.brand-mark {
  width: 76px;
  height: 24px;
  border: 0;
  border-radius: 0;
  object-fit: contain;
  object-position: left center;
  box-shadow: none;
}

h1 {
  font-size: clamp(1.75rem, 3vw, 2.45rem);
  font-weight: 750;
  letter-spacing: -0.045em;
  line-height: 1;
}

.subtitle {
  margin-top: 9px;
  font-size: 0.82rem;
  line-height: 1.4;
}

.summary {
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 16px;
}

.metric {
  min-height: 106px;
  padding: 15px 16px;
  border-color: #dde3eb;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(26, 40, 67, 0.045);
}

.metric-featured {
  border-color: #243a58;
}

.metric span {
  font-size: 0.65rem;
}

.metric small {
  margin-top: 3px;
  font-size: 0.63rem;
}

.metric strong {
  margin-top: 12px;
  font-size: clamp(1.35rem, 2vw, 1.9rem);
}

.metric-featured strong {
  font-size: clamp(1.45rem, 2.6vw, 2.25rem);
}

.metric-accent,
.metric-warning,
.metric-danger {
  border-top-width: 2px;
}

.vendor-panel,
.inventory-panel {
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(22, 35, 59, 0.07);
}

.vendor-panel {
  margin-bottom: 16px;
}

.vendor-panel-heading,
.panel-heading {
  padding: 16px 20px 13px;
}

.vendor-summary-wrap {
  max-height: 330px;
  overflow: auto;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

.vendor-summary-table thead {
  position: static;
}

.vendor-summary-table thead th {
  position: sticky;
  top: 0;
  z-index: 7;
  background: #1c2e47;
  box-shadow:
    inset 0 -1px rgba(255, 255, 255, 0.13),
    0 4px 10px rgba(5, 12, 23, 0.16);
}

h2 {
  font-size: 1.15rem;
}

.toolbar {
  padding: 11px 20px;
}

.search input,
.filter select {
  min-height: 38px;
}

.status-line {
  padding: 8px 20px;
}

th,
td {
  padding: 9px 11px;
}

td {
  font-size: 0.78rem;
}

.product-name {
  font-size: 0.79rem;
}

.display-name {
  margin-top: 2px;
}

.badge,
.source-badge {
  padding: 5px 8px;
}

.pagination {
  padding: 12px 20px;
}

.expiry-summary {
  display: grid;
  margin: 14px 0 16px;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.company-summary {
  display: grid;
  margin: 14px 0 16px;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.login-summary {
  display: grid;
  margin: 14px 0 16px;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.expiry-metric {
  display: flex;
  min-height: 112px;
  padding: 16px 18px;
  border: 1px solid #dde3eb;
  border-radius: 12px;
  flex-direction: column;
  justify-content: space-between;
  background: #fff;
  box-shadow: 0 5px 15px rgba(26, 40, 67, 0.045);
}

.expiry-metric span {
  color: #5d6878;
  font-size: 0.67rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.expiry-metric small {
  display: block;
  margin-top: 4px;
  color: #98a2b0;
  font-size: 0.64rem;
  font-weight: 600;
}

.expiry-metric strong {
  margin-top: 14px;
  color: #172033;
  font-size: clamp(1.5rem, 2.4vw, 2.15rem);
  letter-spacing: -0.045em;
}

.expiry-metric.urgent {
  border-top: 3px solid #ed756c;
}

.expiry-metric.urgent strong {
  color: #b8403c;
}

.expiry-metric.watch {
  border-top: 3px solid #efb449;
}

.expiry-metric.planning {
  border-top: 3px solid #4a9ad4;
}

.expiry-metric.total {
  border-color: #243a58;
  color: #fff;
  background: #14233a;
}

.expiry-metric.total span {
  color: #91a0b2;
}

.expiry-metric.total small {
  color: #74869a;
}

.expiry-metric.total strong {
  color: #ff6b70;
}

.expiry-metric.unassigned {
  border-top: 3px solid #8a94a4;
}

.company-summary .expiry-metric.total strong {
  overflow: hidden;
  font-size: clamp(1.35rem, 1.8vw, 1.8rem);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-summary .latest-login-value {
  overflow: hidden;
  font-size: clamp(1.15rem, 1.8vw, 1.65rem);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expiry-table th:nth-child(1),
.expiry-table td:nth-child(1) {
  width: 22%;
}

.expiry-scope {
  margin: 0;
  color: #7c8594;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.expiry-table th:nth-child(2),
.expiry-table td:nth-child(2) {
  width: 12%;
}

.expiry-table th:nth-child(3),
.expiry-table td:nth-child(3) {
  width: 17%;
}

.expiry-table th:nth-child(4),
.expiry-table td:nth-child(4) {
  width: 15%;
}

.expiry-table th:nth-child(5),
.expiry-table td:nth-child(5),
.expiry-table th:nth-child(6),
.expiry-table td:nth-child(6),
.expiry-table th:nth-child(7),
.expiry-table td:nth-child(7),
.expiry-table th:nth-child(8),
.expiry-table td:nth-child(8) {
  width: 8.5%;
}

.expiry-vendor,
.expiry-source {
  display: block;
}

.expiry-vendor {
  color: #253044;
  font-size: 0.78rem;
}

.expiry-source {
  margin-top: 2px;
  color: #929aa7;
  font-size: 0.66rem;
}

.next-expiry {
  color: #667284;
  font-variant-numeric: tabular-nums;
}

.expiry-30 {
  color: #b8403c;
  font-weight: 800;
}

.expiry-60 {
  color: #9a6a14;
  font-weight: 750;
}

.expiry-total {
  color: #172033;
  font-weight: 850;
}

.company-table th:nth-child(1),
.company-table td:nth-child(1) {
  width: 22%;
}

.company-table th:nth-child(2),
.company-table td:nth-child(2),
.company-table th:nth-child(3),
.company-table td:nth-child(3) {
  width: 8%;
}

.company-table th:nth-child(4),
.company-table td:nth-child(4) {
  width: 11%;
}

.company-table th:nth-child(5),
.company-table td:nth-child(5) {
  width: 8%;
}

.company-table th:nth-child(6),
.company-table td:nth-child(6) {
  width: 11%;
}

.company-table th:nth-child(7),
.company-table td:nth-child(7) {
  width: 17%;
}

.company-table th:nth-child(8),
.company-table td:nth-child(8) {
  width: 15%;
}

.company-avatar {
  display: inline-grid;
  width: 28px;
  height: 28px;
  margin-right: 9px;
  border: 1px solid #f0d0d2;
  border-radius: 7px;
  color: var(--brand-red-dark);
  background: var(--brand-red-soft);
  font-size: 0.7rem;
  font-weight: 900;
  place-items: center;
  vertical-align: middle;
}

.company-avatar.unassigned {
  border-color: #e5d6bc;
  color: #8b621d;
  background: #fff3dc;
}

.company-identity {
  display: inline-flex;
  max-width: calc(100% - 42px);
  vertical-align: middle;
  flex-direction: column;
}

.company-name {
  overflow: hidden;
  color: #182235;
  font-size: 0.8rem;
  text-overflow: ellipsis;
}

.company-alias {
  margin-top: 2px;
  overflow: hidden;
  color: #929aa7;
  font-size: 0.66rem;
  text-overflow: ellipsis;
}

.company-link-count,
.company-link-value {
  color: var(--brand-red-dark);
  font-weight: 820;
}

.company-expiring {
  color: #b8403c;
  font-weight: 780;
}

.company-share,
.company-next-expiry {
  color: #667284;
  font-variant-numeric: tabular-nums;
}

.unassigned-row {
  background: #fffaf1;
}

.login-history-table {
  min-width: 760px;
}

.login-history-table th:nth-child(1),
.login-history-table td:nth-child(1) {
  width: 24%;
}

.login-history-table th:nth-child(2),
.login-history-table td:nth-child(2) {
  width: 26%;
}

.login-history-table th:nth-child(3),
.login-history-table td:nth-child(3) {
  width: 30%;
}

.login-history-table th:nth-child(4),
.login-history-table td:nth-child(4) {
  width: 20%;
}

.login-time,
.login-email {
  color: #667284;
  font-variant-numeric: tabular-nums;
}

.login-avatar {
  width: 25px;
  height: 25px;
}

.login-name {
  color: #182235;
  font-size: 0.79rem;
}

.workspace-badge {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 6px;
  color: var(--brand-red-dark);
  background: var(--brand-red-soft);
  font-size: 0.66rem;
  font-weight: 800;
}

.login-page {
  display: grid;
  min-height: 100vh;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 20%, rgba(203, 37, 43, 0.18), transparent 28rem),
    #101a2c;
  place-items: center;
}

.login-shell {
  width: min(100%, 440px);
}

.login-card {
  padding: 38px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  color: #fff;
  background: #15243a;
  box-shadow: 0 24px 70px rgba(2, 8, 18, 0.35);
}

.login-mark {
  width: 104px;
  height: 32px;
  margin-bottom: 24px;
  object-fit: contain;
  object-position: left center;
}

.login-card h1 {
  margin-top: 9px;
  font-size: 2rem;
}

.login-card > p:not(.section-kicker):not(.login-error) {
  margin: 14px 0 24px;
  color: #9eacbc;
  font-size: 0.86rem;
  line-height: 1.55;
}

.login-error {
  padding: 11px 12px;
  border: 1px solid rgba(237, 117, 108, 0.28);
  border-radius: 8px;
  color: #ffc2bd;
  background: rgba(237, 117, 108, 0.09);
  font-size: 0.76rem;
  line-height: 1.45;
}

.google-login-button {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 9px;
  color: #fff;
  background: var(--brand-red);
  font-size: 0.82rem;
  font-weight: 850;
  text-decoration: none;
}

.google-login-button span {
  display: grid;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: var(--brand-red-dark);
  background: rgba(255, 255, 255, 0.65);
  font-weight: 900;
  place-items: center;
}

.allowed-domains {
  display: flex;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.allowed-domains span {
  width: 100%;
  margin-bottom: 2px;
  color: #74869a;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.allowed-domains strong {
  padding: 5px 7px;
  border-radius: 5px;
  color: #a6b4c4;
  background: rgba(255, 255, 255, 0.055);
  font-size: 0.66rem;
}

@media (max-width: 1200px) {
  .summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .header-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .company-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .login-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1380px) {
  .live-indicator {
    display: none;
  }
}

@media (max-width: 680px) {
  .shell {
    width: min(100% - 16px, 1480px);
    padding-top: 8px;
  }

  .topbar {
    min-height: 0;
    padding: 20px;
  }

  .summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 10px 0 14px;
  }

  .metric-featured {
    grid-column: 1 / -1;
  }

  .metric {
    min-height: 96px;
  }

  .screen-nav {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    text-align: center;
  }

  .auth-user {
    width: 100%;
    justify-content: space-between;
  }

  .expiry-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 10px 0 14px;
  }

  .company-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 10px 0 14px;
  }

  .login-summary {
    grid-template-columns: 1fr;
    margin: 10px 0 14px;
  }

  .expiry-metric {
    min-height: 100px;
    padding: 14px;
  }

  .expiry-scope {
    text-align: center;
    white-space: normal;
  }

  .panel-heading,
  .vendor-panel-heading,
  .toolbar,
  .status-line {
    padding-right: 15px;
    padding-left: 15px;
  }
}
