/* ============================================
   ITX365 SharePoint Demo — sharepoint.css
   Nexus Corp Intranet Prototype
   ============================================ */

/* --- Fonts --- */
@font-face { font-family: 'Poppins'; src: url('../fonts/Poppins-Regular.ttf') format('truetype'); font-weight: 400; font-style: normal; }
@font-face { font-family: 'Poppins'; src: url('../fonts/Poppins-Medium.ttf') format('truetype'); font-weight: 500; font-style: normal; }
@font-face { font-family: 'Poppins'; src: url('../fonts/Poppins-SemiBold.ttf') format('truetype'); font-weight: 600; font-style: normal; }
@font-face { font-family: 'Poppins'; src: url('../fonts/Poppins-Bold.ttf') format('truetype'); font-weight: 700; font-style: normal; }

/* --- Tokens --- */
:root {
  /* SP theme */
  --sp-primary: #0078D4;
  --sp-primary-dark: #106EBE;
  --sp-primary-darker: #005A9E;
  --sp-primary-light: #C7E0F4;
  --sp-primary-lighter: #DEECF9;
  --sp-primary-lightest: #EFF6FC;

  /* Suite + App bar */
  --sp-suite-bg: #1B1A19;
  --sp-suite-text: #FFFFFF;
  --sp-suite-h: 48px;
  --sp-appbar-w: 48px;
  --sp-appbar-hover: #323130;

  /* Neutrals */
  --sp-n-dark: #201F1E;
  --sp-n-primary: #323130;
  --sp-n-secondary: #605E5C;
  --sp-n-tertiary: #A19F9D;
  --sp-n-quat: #D2D0CE;
  --sp-n-light: #EDEBE9;
  --sp-n-lighter: #F3F2F1;
  --sp-n-lightest: #FAF9F8;
  --sp-white: #FFFFFF;

  /* Semantic */
  --sp-success: #107C10;
  --sp-warning: #FFB900;
  --sp-error: #D13438;
  --sp-info: #0078D4;
  --sp-severe: #D83B01;

  /* Fonts */
  --font-sp: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-custom: 'Poppins', 'Segoe UI', sans-serif;
  --fs-xs: 10px;
  --fs-sm: 12px;
  --fs-base: 14px;
  --fs-md: 16px;
  --fs-lg: 18px;
  --fs-xl: 20px;
  --fs-xxl: 28px;
  --fs-mega: 42px;

  /* Spacing */
  --s-xs: 4px;
  --s-sm: 8px;
  --s-md: 16px;
  --s-lg: 24px;
  --s-xl: 32px;
  --s-xxl: 48px;

  /* Elevation */
  --depth-4: 0 1.6px 3.6px rgba(0,0,0,.132), 0 .3px .9px rgba(0,0,0,.108);
  --depth-8: 0 3.2px 7.2px rgba(0,0,0,.132), 0 .6px 1.8px rgba(0,0,0,.108);
  --depth-16: 0 6.4px 14.4px rgba(0,0,0,.132), 0 1.2px 3.6px rgba(0,0,0,.108);
  --depth-64: 0 25.6px 57.6px rgba(0,0,0,.22), 0 4.8px 14.4px rgba(0,0,0,.18);

  /* Radius */
  --r-sm: 2px;
  --r-md: 4px;
  --r-lg: 8px;

  /* Layout */
  --page-max: 1280px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-sp); color: var(--sp-n-primary); background: var(--sp-n-lightest); line-height: 1.5; overflow-x: hidden; }
a { color: var(--sp-primary); text-decoration: none; }
a:hover { color: var(--sp-primary-dark); text-decoration: underline; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: var(--fs-base); }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }

/* --- Suite Bar (top dark bar) --- */
.sp-suite-bar {
  display: flex;
  align-items: center;
  height: var(--sp-suite-h);
  background: var(--sp-suite-bg);
  color: var(--sp-suite-text);
  padding: 0 var(--s-md);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  font-size: var(--fs-base);
}
.sp-suite-bar__left { display: flex; align-items: center; gap: var(--s-md); }
.sp-suite-bar__waffle {
  width: 36px; height: 36px;
  display: grid; grid-template-columns: repeat(3, 6px); gap: 3px;
  place-content: center;
  border-radius: var(--r-md);
  cursor: pointer;
  padding: 8px;
}
.sp-suite-bar__waffle:hover { background: var(--sp-appbar-hover); }
.sp-suite-bar__waffle span {
  width: 6px; height: 6px; background: var(--sp-suite-text); border-radius: 1px;
}
.sp-suite-bar__label { font-weight: 600; font-size: var(--fs-base); opacity: .9; }
.sp-suite-bar__search {
  flex: 1;
  max-width: 468px;
  margin: 0 auto;
  position: relative;
}
.sp-suite-bar__search input {
  width: 100%;
  height: 32px;
  background: #3B3A39;
  border: 1px solid #3B3A39;
  border-radius: var(--r-md);
  color: var(--sp-suite-text);
  padding: 0 12px 0 36px;
  font-size: var(--fs-sm);
  transition: background .2s, border-color .2s;
}
.sp-suite-bar__search input::placeholder { color: #B3B0AD; }
.sp-suite-bar__search input:focus {
  outline: none;
  background: var(--sp-white);
  color: var(--sp-n-primary);
  border-color: var(--sp-primary);
}
.sp-suite-bar__search-icon {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  color: #B3B0AD; font-size: var(--fs-base); pointer-events: none;
}
.sp-suite-bar__right { display: flex; align-items: center; gap: var(--s-xs); margin-left: auto; }
.sp-suite-bar__btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-md);
  color: var(--sp-suite-text);
  font-size: var(--fs-md);
  position: relative;
}
.sp-suite-bar__btn:hover { background: var(--sp-appbar-hover); }
.sp-suite-bar__avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--sp-primary);
  color: var(--sp-white);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-sm); font-weight: 600;
  cursor: pointer;
}
.sp-suite-bar__notif-dot {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px; background: var(--sp-error);
  border-radius: 50%; border: 2px solid var(--sp-suite-bg);
}

/* --- App Bar (left vertical strip) --- */
.sp-app-bar {
  position: fixed;
  top: var(--sp-suite-h);
  left: 0;
  width: var(--sp-appbar-w);
  height: calc(100vh - var(--sp-suite-h));
  background: var(--sp-suite-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--s-sm) 0;
  z-index: 999;
  gap: var(--s-xs);
}
.sp-app-bar__icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-md);
  color: #B3B0AD;
  font-size: var(--fs-lg);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.sp-app-bar__icon:hover { background: var(--sp-appbar-hover); color: var(--sp-suite-text); }
.sp-app-bar__icon.active {
  color: var(--sp-suite-text);
  position: relative;
}
.sp-app-bar__icon.active::before {
  content: '';
  position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 3px; background: var(--sp-primary);
  border-radius: 0 2px 2px 0;
}
.sp-app-bar__spacer { flex: 1; }
.sp-app-bar__create {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-md);
  color: var(--sp-suite-text);
  font-size: var(--fs-xl);
  cursor: pointer;
}
.sp-app-bar__create:hover { background: var(--sp-appbar-hover); }

/* --- Site Header --- */
.sp-site-header {
  position: fixed;
  top: var(--sp-suite-h);
  left: var(--sp-appbar-w);
  right: 0;
  height: 50px;
  background: var(--sp-white);
  border-bottom: 1px solid var(--sp-n-light);
  display: flex;
  align-items: center;
  padding: 0 var(--s-lg);
  z-index: 998;
  gap: var(--s-md);
}
.sp-site-header__logo {
  width: 32px; height: 32px;
  background: var(--sp-primary);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--sp-white); font-weight: 700; font-size: var(--fs-sm);
  flex-shrink: 0;
}
.sp-site-header__title {
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--sp-n-dark);
  white-space: nowrap;
}
.sp-site-header__nav {
  display: flex; gap: var(--s-xs); margin-left: var(--s-lg);
}
.sp-site-header__nav a {
  padding: var(--s-sm) var(--s-md);
  font-size: var(--fs-base);
  color: var(--sp-n-secondary);
  border-radius: var(--r-md);
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.sp-site-header__nav a:hover { background: var(--sp-n-lighter); color: var(--sp-n-dark); text-decoration: none; }
.sp-site-header__nav a.active { color: var(--sp-primary); font-weight: 600; }
.sp-site-header__actions { margin-left: auto; display: flex; gap: var(--s-sm); align-items: center; }
.sp-site-header__btn {
  padding: 6px 12px;
  font-size: var(--fs-sm);
  color: var(--sp-n-secondary);
  border: 1px solid var(--sp-n-quat);
  border-radius: var(--r-sm);
  background: var(--sp-white);
  transition: background .15s;
}
.sp-site-header__btn:hover { background: var(--sp-n-lighter); }

/* --- Page Canvas --- */
.sp-page {
  margin-top: calc(var(--sp-suite-h) + 50px);
  margin-left: var(--sp-appbar-w);
  min-height: calc(100vh - var(--sp-suite-h) - 50px);
  background: var(--sp-n-lightest);
}
.sp-page__inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--s-lg);
}

/* --- Section Layouts --- */
.sp-section { margin-bottom: var(--s-xl); }
.sp-section--full { width: 100%; }
.sp-section--2col { display: grid; grid-template-columns: 2fr 1fr; gap: var(--s-lg); }
.sp-section--2col-even { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-lg); }
.sp-section--3col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--s-lg); }

/* --- Web Part Container --- */
.sp-webpart {
  background: var(--sp-white);
  border-radius: var(--r-md);
  box-shadow: var(--depth-4);
  padding: var(--s-lg);
}
.sp-webpart__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s-md);
}
.sp-webpart__title {
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--sp-n-dark);
}
.sp-webpart__see-all {
  font-size: var(--fs-sm);
  color: var(--sp-primary);
  cursor: pointer;
}

/* --- Custom Web Part (Poppins) --- */
.nx-webpart {
  background: var(--sp-white);
  border-radius: var(--r-lg);
  box-shadow: var(--depth-8);
  padding: var(--s-lg);
  font-family: var(--font-custom);
  position: relative;
}
.nx-webpart__badge {
  position: absolute;
  top: var(--s-sm);
  right: var(--s-sm);
  background: linear-gradient(135deg, #0078D4, #00BCF2);
  color: var(--sp-white);
  font-size: var(--fs-xs);
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.nx-webpart__title {
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--sp-n-dark);
  margin-bottom: var(--s-md);
  font-family: var(--font-custom);
}

/* --- Hero Banner --- */
.sp-hero {
  display: grid;
  grid-template-columns: 3fr 2fr;
  grid-template-rows: 200px 200px;
  gap: 4px;
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: var(--s-xl);
}
.sp-hero__tile {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.sp-hero__tile--main { grid-row: 1 / 3; }
.sp-hero__tile-bg {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.sp-hero__tile:hover .sp-hero__tile-bg { transform: scale(1.03); }
.sp-hero__tile-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(transparent 40%, rgba(0,0,0,.7));
  display: flex; flex-direction: column;
  justify-content: flex-end;
  padding: var(--s-lg);
}
.sp-hero__tile-title {
  color: var(--sp-white);
  font-size: var(--fs-xl);
  font-weight: 600;
  line-height: 1.3;
}
.sp-hero__tile--main .sp-hero__tile-title { font-size: var(--fs-xxl); }
.sp-hero__tile-sub {
  color: rgba(255,255,255,.85);
  font-size: var(--fs-sm);
  margin-top: var(--s-xs);
}

/* --- News Web Part --- */
.sp-news__top {
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: var(--s-md);
  cursor: pointer;
}
.sp-news__top-img {
  width: 100%; height: 180px;
  background: var(--sp-n-lighter);
  display: flex; align-items: center; justify-content: center;
  color: var(--sp-n-tertiary); font-size: var(--fs-sm);
}
.sp-news__top-body { padding: var(--s-md) 0; }
.sp-news__top-title { font-size: var(--fs-md); font-weight: 600; color: var(--sp-n-dark); }
.sp-news__top-meta { font-size: var(--fs-sm); color: var(--sp-n-secondary); margin-top: var(--s-xs); }
.sp-news__list { display: flex; flex-direction: column; gap: var(--s-sm); }
.sp-news__item {
  display: flex; gap: var(--s-md); align-items: center;
  padding: var(--s-sm); border-radius: var(--r-md);
  cursor: pointer; transition: background .15s;
}
.sp-news__item:hover { background: var(--sp-n-lighter); }
.sp-news__item-thumb {
  width: 80px; height: 56px; flex-shrink: 0;
  background: var(--sp-n-lighter); border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--sp-n-tertiary); font-size: var(--fs-xs);
}
.sp-news__item-title { font-size: var(--fs-base); font-weight: 600; color: var(--sp-n-dark); }
.sp-news__item-date { font-size: var(--fs-sm); color: var(--sp-n-secondary); }

/* --- Quick Links --- */
.sp-quicklinks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-sm);
}
.sp-quicklinks__item {
  display: flex; align-items: center; gap: var(--s-sm);
  padding: var(--s-sm) var(--s-md);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background .15s;
}
.sp-quicklinks__item:hover { background: var(--sp-n-lighter); }
.sp-quicklinks__icon {
  width: 32px; height: 32px;
  background: var(--sp-primary-lightest);
  color: var(--sp-primary);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-base);
  flex-shrink: 0;
}
.sp-quicklinks__label { font-size: var(--fs-base); color: var(--sp-n-dark); }

/* --- Events --- */
.sp-event {
  display: flex; gap: var(--s-md); align-items: flex-start;
  padding: var(--s-sm) 0;
  border-bottom: 1px solid var(--sp-n-light);
}
.sp-event:last-child { border-bottom: none; }
.sp-event__date {
  width: 48px; height: 52px;
  background: var(--sp-primary-lightest);
  border-radius: var(--r-md);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sp-event__month { font-size: var(--fs-xs); color: var(--sp-primary); text-transform: uppercase; font-weight: 600; }
.sp-event__day { font-size: var(--fs-xl); color: var(--sp-primary); font-weight: 700; line-height: 1; }
.sp-event__title { font-size: var(--fs-base); font-weight: 600; color: var(--sp-n-dark); }
.sp-event__location { font-size: var(--fs-sm); color: var(--sp-n-secondary); }

/* --- KPI Cards (Custom) --- */
.nx-kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-md); }
.nx-kpi-card {
  background: var(--sp-n-lightest);
  border-radius: var(--r-lg);
  padding: var(--s-md);
  text-align: center;
}
.nx-kpi-card__value {
  font-size: var(--fs-xxl);
  font-weight: 700;
  color: var(--sp-n-dark);
  font-family: var(--font-custom);
  line-height: 1.1;
}
.nx-kpi-card__label {
  font-size: var(--fs-sm);
  color: var(--sp-n-secondary);
  margin-top: var(--s-xs);
}
.nx-kpi-card__chart { height: 40px; margin-top: var(--s-sm); }
.nx-kpi-card--green .nx-kpi-card__value { color: var(--sp-success); }
.nx-kpi-card--amber .nx-kpi-card__value { color: var(--sp-warning); }
.nx-kpi-card--red .nx-kpi-card__value { color: var(--sp-error); }

/* --- Employee Spotlight (Custom) --- */
.nx-spotlight__card {
  display: flex; gap: var(--s-md); align-items: center;
  margin-bottom: var(--s-md);
}
.nx-spotlight__avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sp-primary), #00BCF2);
  color: var(--sp-white);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-xl); font-weight: 600;
  flex-shrink: 0;
}
.nx-spotlight__name { font-weight: 600; color: var(--sp-n-dark); }
.nx-spotlight__role { font-size: var(--fs-sm); color: var(--sp-n-secondary); }
.nx-spotlight__quote {
  font-size: var(--fs-sm); color: var(--sp-n-secondary);
  font-style: italic; margin-top: var(--s-xs);
}
.nx-birthday-strip {
  display: flex; gap: var(--s-md);
  padding-top: var(--s-md);
  border-top: 1px solid var(--sp-n-light);
}
.nx-birthday {
  display: flex; flex-direction: column; align-items: center; gap: var(--s-xs);
}
.nx-birthday__avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-xs); font-weight: 600; color: var(--sp-white);
}
.nx-birthday__name { font-size: var(--fs-xs); color: var(--sp-n-secondary); }
.nx-birthday__when { font-size: var(--fs-xs); color: var(--sp-primary); font-weight: 600; }

/* --- Weather Strip (Custom) --- */
.nx-weather-strip {
  display: flex; justify-content: space-around;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border-radius: var(--r-lg);
  padding: var(--s-md) var(--s-lg);
  color: var(--sp-white);
  font-family: var(--font-custom);
}
.nx-weather__city { text-align: center; }
.nx-weather__temp { font-size: var(--fs-xxl); font-weight: 700; line-height: 1.1; }
.nx-weather__name { font-size: var(--fs-sm); opacity: .8; margin-top: 2px; }
.nx-weather__time { font-size: var(--fs-xs); opacity: .6; }
.nx-weather__icon { font-size: 24px; margin-bottom: 4px; }

/* --- Hub Banner --- */
.sp-hub-banner {
  background: linear-gradient(135deg, var(--sp-primary), #005A9E);
  color: var(--sp-white);
  padding: var(--s-xxl) var(--s-lg);
  text-align: center;
  margin-bottom: var(--s-lg);
}
.sp-hub-banner__title { font-size: var(--fs-mega); font-weight: 700; }
.sp-hub-banner__sub { font-size: var(--fs-md); opacity: .85; margin-top: var(--s-sm); }
.sp-hub-banner--dark {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
}
.sp-hub-banner--teal {
  background: linear-gradient(135deg, #006D6F, #004E50);
}
.sp-hub-banner--purple {
  background: linear-gradient(135deg, #5B2D8E, #3B1D6E);
}
.sp-hub-banner--orange {
  background: linear-gradient(135deg, #CA5010, #8E3A08);
}

/* --- Tab Navigation --- */
.sp-tabs {
  display: flex;
  gap: var(--s-xs);
  border-bottom: 1px solid var(--sp-n-light);
  margin-bottom: var(--s-lg);
  padding: 0 var(--s-lg);
  flex-wrap: wrap;
}
.sp-tabs__tab {
  padding: var(--s-sm) var(--s-md);
  font-size: var(--fs-base);
  color: var(--sp-n-secondary);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}
.sp-tabs__tab:hover { color: var(--sp-n-dark); }
.sp-tabs__tab.active { color: var(--sp-primary); border-bottom-color: var(--sp-primary); font-weight: 600; }

/* --- Tab Content --- */
.sp-tab-content { display: none; }
.sp-tab-content.active { display: block; }

/* --- Quick Action Cards --- */
.nx-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-md);
  margin-bottom: var(--s-lg);
}
.nx-action-card {
  background: var(--sp-white);
  border-radius: var(--r-lg);
  padding: var(--s-lg);
  text-align: center;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  box-shadow: var(--depth-4);
  font-family: var(--font-custom);
}
.nx-action-card:hover { transform: translateY(-2px); box-shadow: var(--depth-8); }
.nx-action-card__icon {
  width: 48px; height: 48px;
  background: var(--sp-primary-lightest);
  color: var(--sp-primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-xl);
  margin: 0 auto var(--s-sm);
}
.nx-action-card__label { font-weight: 600; color: var(--sp-n-dark); }

/* --- Progress Bar --- */
.nx-progress {
  height: 8px;
  background: var(--sp-n-light);
  border-radius: 4px;
  overflow: hidden;
  margin: var(--s-sm) 0;
}
.nx-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--sp-primary), #00BCF2);
  border-radius: 4px;
  transition: width .5s ease;
}

/* --- Checklist --- */
.nx-checklist-group { margin-bottom: var(--s-lg); }
.nx-checklist-group__title {
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--sp-n-dark);
  margin-bottom: var(--s-sm);
  font-family: var(--font-custom);
  display: flex; align-items: center; gap: var(--s-sm);
}
.nx-checklist-group__count {
  font-size: var(--fs-xs);
  background: var(--sp-n-lighter);
  padding: 2px 8px;
  border-radius: 10px;
  color: var(--sp-n-secondary);
}
.nx-check-item {
  display: flex; align-items: center; gap: var(--s-md);
  padding: var(--s-sm) var(--s-md);
  border-radius: var(--r-md);
  transition: background .15s;
  cursor: pointer;
}
.nx-check-item:hover { background: var(--sp-n-lighter); }
.nx-check-item input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--sp-primary);
  cursor: pointer;
}
.nx-check-item.checked .nx-check-item__text { text-decoration: line-through; color: var(--sp-n-tertiary); }
.nx-check-item__text { font-size: var(--fs-base); color: var(--sp-n-dark); }
.nx-check-item__due { font-size: var(--fs-xs); color: var(--sp-n-tertiary); margin-left: auto; }

/* --- Org Chart --- */
.nx-org-chart { font-family: var(--font-custom); }
.nx-org-level {
  display: flex; justify-content: center; gap: var(--s-xl);
  margin-bottom: var(--s-lg);
  position: relative;
}
.nx-org-node {
  display: flex; flex-direction: column; align-items: center; gap: var(--s-xs);
  cursor: pointer;
}
.nx-org-node__avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; color: var(--sp-white);
  font-size: var(--fs-base);
  transition: transform .2s;
}
.nx-org-node:hover .nx-org-node__avatar { transform: scale(1.1); }
.nx-org-node__name { font-size: var(--fs-sm); font-weight: 600; color: var(--sp-n-dark); }
.nx-org-node__role { font-size: var(--fs-xs); color: var(--sp-n-secondary); }

/* --- Document Library (SP-style table) --- */
.sp-doclib { width: 100%; }
.sp-doclib__toolbar {
  display: flex; align-items: center; gap: var(--s-md);
  padding: var(--s-sm) 0;
  margin-bottom: var(--s-sm);
}
.sp-doclib__search {
  padding: 6px 12px;
  border: 1px solid var(--sp-n-quat);
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  width: 200px;
}
.sp-doclib table { font-size: var(--fs-sm); }
.sp-doclib th {
  text-align: left;
  padding: var(--s-sm) var(--s-md);
  color: var(--sp-n-secondary);
  font-weight: 600;
  border-bottom: 1px solid var(--sp-n-light);
  cursor: pointer;
  user-select: none;
}
.sp-doclib th:hover { color: var(--sp-n-dark); }
.sp-doclib td {
  padding: var(--s-sm) var(--s-md);
  border-bottom: 1px solid var(--sp-n-light);
  color: var(--sp-n-primary);
}
.sp-doclib tr:hover td { background: var(--sp-n-lighter); }
.sp-doclib__icon { margin-right: var(--s-sm); }

/* --- Project Cards --- */
.nx-project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-md);
}
.nx-project-card {
  background: var(--sp-white);
  border-radius: var(--r-lg);
  padding: var(--s-lg);
  box-shadow: var(--depth-4);
  transition: transform .2s, box-shadow .2s;
  font-family: var(--font-custom);
  cursor: pointer;
}
.nx-project-card:hover { transform: translateY(-2px); box-shadow: var(--depth-8); }
.nx-project-card__header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: var(--s-sm);
}
.nx-project-card__name { font-weight: 600; color: var(--sp-n-dark); font-size: var(--fs-md); }
.nx-project-card__pm { font-size: var(--fs-sm); color: var(--sp-n-secondary); display: flex; align-items: center; gap: var(--s-xs); }
.nx-project-card__pm-avatar {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: var(--fs-xs); font-weight: 600; color: var(--sp-white);
}

/* --- Status Badges --- */
.nx-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: var(--fs-xs);
  font-weight: 600;
  white-space: nowrap;
}
.nx-badge--on-track { background: #DFF6DD; color: var(--sp-success); }
.nx-badge--at-risk { background: #FFF4CE; color: #8A6900; }
.nx-badge--blocked { background: #FDE7E9; color: var(--sp-error); }
.nx-badge--pending { background: var(--sp-primary-lighter); color: var(--sp-primary); }
.nx-badge--approved { background: #DFF6DD; color: var(--sp-success); }
.nx-badge--rejected { background: #FDE7E9; color: var(--sp-error); }
.nx-badge--escalated { background: #FFF4CE; color: var(--sp-severe); }
.nx-badge--new { background: var(--sp-primary-lightest); color: var(--sp-primary); }
.nx-badge--important { background: #FDE7E9; color: var(--sp-error); }
.nx-badge--update { background: #FFF4CE; color: #8A6900; }
.nx-badge--available { background: #DFF6DD; color: var(--sp-success); }
.nx-badge--booked { background: var(--sp-primary-lighter); color: var(--sp-primary); }
.nx-badge--maintenance { background: #FFF4CE; color: #8A6900; }
.nx-badge--assigned { background: var(--sp-primary-lighter); color: var(--sp-primary); }
.nx-badge--in-repair { background: #FFF4CE; color: var(--sp-severe); }
.nx-badge--retired { background: var(--sp-n-lighter); color: var(--sp-n-secondary); }
.nx-badge--ordered { background: #E0D7EE; color: #5B2D8E; }
.nx-badge--received { background: #DFF6DD; color: var(--sp-success); }

/* --- KPI Strip --- */
.nx-kpi-strip {
  display: flex;
  gap: var(--s-md);
  margin-bottom: var(--s-lg);
}
.nx-kpi-strip__item {
  flex: 1;
  background: var(--sp-white);
  border-radius: var(--r-lg);
  padding: var(--s-md) var(--s-lg);
  text-align: center;
  box-shadow: var(--depth-4);
  font-family: var(--font-custom);
}
.nx-kpi-strip__value { font-size: var(--fs-xxl); font-weight: 700; color: var(--sp-n-dark); }
.nx-kpi-strip__label { font-size: var(--fs-sm); color: var(--sp-n-secondary); }

/* --- Kanban Board --- */
.nx-kanban {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-md);
  min-height: 400px;
  font-family: var(--font-custom);
}
.nx-kanban__col {
  background: var(--sp-n-lighter);
  border-radius: var(--r-lg);
  padding: var(--s-md);
  min-height: 300px;
}
.nx-kanban__col-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: var(--s-md);
  padding-bottom: var(--s-sm);
  border-bottom: 2px solid var(--sp-n-quat);
}
.nx-kanban__col-title { font-weight: 600; color: var(--sp-n-dark); }
.nx-kanban__col-count {
  background: var(--sp-white);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: var(--fs-xs);
  color: var(--sp-n-secondary);
}
.nx-kanban__card {
  background: var(--sp-white);
  border-radius: var(--r-md);
  padding: var(--s-md);
  margin-bottom: var(--s-sm);
  box-shadow: var(--depth-4);
  cursor: grab;
  transition: transform .15s, box-shadow .15s;
}
.nx-kanban__card:hover { transform: translateY(-1px); box-shadow: var(--depth-8); }
.nx-kanban__card.dragging { opacity: .5; transform: rotate(2deg); }
.nx-kanban__card-title { font-size: var(--fs-sm); font-weight: 600; color: var(--sp-n-dark); margin-bottom: var(--s-xs); }
.nx-kanban__card-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-size: var(--fs-xs); color: var(--sp-n-secondary);
}
.nx-kanban__card-avatar {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 600; color: var(--sp-white);
}
.nx-kanban__card-priority {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.nx-kanban__col.drag-over { background: var(--sp-primary-lightest); }

/* --- Activity Feed --- */
.nx-feed { font-family: var(--font-custom); }
.nx-feed__item {
  display: flex; gap: var(--s-md); align-items: flex-start;
  padding: var(--s-sm) 0;
  border-bottom: 1px solid var(--sp-n-light);
}
.nx-feed__item:last-child { border-bottom: none; }
.nx-feed__avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-xs); font-weight: 600; color: var(--sp-white);
  flex-shrink: 0;
}
.nx-feed__text { font-size: var(--fs-sm); color: var(--sp-n-primary); }
.nx-feed__text strong { color: var(--sp-n-dark); }
.nx-feed__time { font-size: var(--fs-xs); color: var(--sp-n-tertiary); margin-top: 2px; }
.nx-feed__item:first-child { animation: feedPulse 2s ease-in-out; }
@keyframes feedPulse {
  0%, 100% { background: transparent; }
  50% { background: var(--sp-primary-lightest); }
}

/* --- Gantt Timeline --- */
.nx-gantt {
  font-family: var(--font-custom);
  overflow-x: auto;
}
.nx-gantt__header {
  display: flex;
  border-bottom: 1px solid var(--sp-n-light);
  padding-bottom: var(--s-sm);
  margin-bottom: var(--s-md);
}
.nx-gantt__label-col { width: 200px; flex-shrink: 0; font-weight: 600; font-size: var(--fs-sm); }
.nx-gantt__timeline { flex: 1; display: flex; }
.nx-gantt__week {
  flex: 1; min-width: 100px;
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--sp-n-secondary);
  border-left: 1px solid var(--sp-n-light);
  padding: 0 var(--s-xs);
}
.nx-gantt__row {
  display: flex;
  align-items: center;
  height: 40px;
  margin-bottom: var(--s-xs);
}
.nx-gantt__row-label {
  width: 200px; flex-shrink: 0;
  font-size: var(--fs-sm); color: var(--sp-n-dark);
  padding-right: var(--s-md);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nx-gantt__row-bar-container { flex: 1; position: relative; height: 24px; }
.nx-gantt__bar {
  position: absolute;
  height: 24px;
  border-radius: 4px;
  top: 0;
}
.nx-gantt__today {
  position: absolute;
  top: 0; bottom: 0;
  width: 2px;
  background: var(--sp-error);
  z-index: 2;
}
.nx-gantt__today::before {
  content: 'Today';
  position: absolute; top: -20px; left: -16px;
  font-size: var(--fs-xs); color: var(--sp-error); font-weight: 600;
}

/* --- Forms --- */
.nx-form { font-family: var(--font-custom); }
.nx-form__group { margin-bottom: var(--s-md); }
.nx-form__label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--sp-n-dark);
  margin-bottom: var(--s-xs);
}
.nx-form__input, .nx-form__select, .nx-form__textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--sp-n-quat);
  border-radius: var(--r-md);
  font-size: var(--fs-base);
  color: var(--sp-n-primary);
  background: var(--sp-white);
  transition: border-color .15s;
}
.nx-form__input:focus, .nx-form__select:focus, .nx-form__textarea:focus {
  outline: none;
  border-color: var(--sp-primary);
  box-shadow: 0 0 0 1px var(--sp-primary);
}
.nx-form__textarea { min-height: 80px; resize: vertical; }
.nx-form__select { cursor: pointer; }
.nx-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-md); }
.nx-form__hint { font-size: var(--fs-xs); color: var(--sp-n-tertiary); margin-top: var(--s-xs); }

/* --- Buttons --- */
.nx-btn {
  display: inline-flex; align-items: center; gap: var(--s-sm);
  padding: 8px 20px;
  font-size: var(--fs-base);
  font-weight: 600;
  border-radius: var(--r-md);
  transition: background .15s, transform .1s;
  font-family: var(--font-custom);
}
.nx-btn:active { transform: scale(.98); }
.nx-btn--primary { background: var(--sp-primary); color: var(--sp-white); }
.nx-btn--primary:hover { background: var(--sp-primary-dark); }
.nx-btn--success { background: var(--sp-success); color: var(--sp-white); }
.nx-btn--success:hover { background: #0B6A0B; }
.nx-btn--danger { background: var(--sp-error); color: var(--sp-white); }
.nx-btn--danger:hover { background: #B42D31; }
.nx-btn--outline {
  background: var(--sp-white);
  color: var(--sp-primary);
  border: 1px solid var(--sp-primary);
}
.nx-btn--outline:hover { background: var(--sp-primary-lightest); }
.nx-btn--ghost { color: var(--sp-primary); }
.nx-btn--ghost:hover { background: var(--sp-primary-lightest); }
.nx-btn--sm { padding: 4px 12px; font-size: var(--fs-sm); }

/* --- Toast Notification --- */
.nx-toast {
  position: fixed;
  bottom: 24px; right: 24px;
  background: var(--sp-success);
  color: var(--sp-white);
  padding: var(--s-md) var(--s-lg);
  border-radius: var(--r-lg);
  font-family: var(--font-custom);
  font-weight: 600;
  box-shadow: var(--depth-16);
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: transform .3s ease, opacity .3s ease;
}
.nx-toast.show { transform: translateY(0); opacity: 1; }

/* --- Modal --- */
.nx-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.4);
  display: flex; align-items: center; justify-content: center;
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.nx-modal-overlay.show { opacity: 1; pointer-events: auto; }
.nx-modal {
  background: var(--sp-white);
  border-radius: var(--r-lg);
  padding: var(--s-lg);
  max-width: 500px;
  width: 90%;
  box-shadow: var(--depth-64);
  font-family: var(--font-custom);
  transform: scale(.95);
  transition: transform .2s;
}
.nx-modal-overlay.show .nx-modal { transform: scale(1); }
.nx-modal__title { font-size: var(--fs-lg); font-weight: 700; color: var(--sp-n-dark); margin-bottom: var(--s-md); }
.nx-modal__body { font-size: var(--fs-base); color: var(--sp-n-primary); margin-bottom: var(--s-lg); }
.nx-modal__actions { display: flex; gap: var(--s-sm); justify-content: flex-end; }

/* --- Approval Cards --- */
.nx-approval-cards { display: flex; flex-direction: column; gap: var(--s-md); }
.nx-approval-card {
  background: var(--sp-white);
  border-radius: var(--r-lg);
  padding: var(--s-lg);
  box-shadow: var(--depth-4);
  font-family: var(--font-custom);
  transition: transform .3s, opacity .3s;
}
.nx-approval-card.removing { transform: translateX(100%); opacity: 0; }
.nx-approval-card__header {
  display: flex; align-items: center; gap: var(--s-md);
  margin-bottom: var(--s-sm);
}
.nx-approval-card__requester { font-weight: 600; color: var(--sp-n-dark); }
.nx-approval-card__type { font-size: var(--fs-sm); color: var(--sp-n-secondary); }
.nx-approval-card__desc { font-size: var(--fs-sm); color: var(--sp-n-primary); margin-bottom: var(--s-md); }
.nx-approval-card__actions { display: flex; gap: var(--s-sm); }

/* --- Expense Line Items --- */
.nx-expense-lines { margin-bottom: var(--s-md); }
.nx-expense-line {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: var(--s-sm);
  align-items: end;
  padding: var(--s-sm) 0;
  border-bottom: 1px solid var(--sp-n-light);
}
.nx-expense-line:last-child { border-bottom: none; }
.nx-expense-total {
  display: flex; justify-content: space-between; align-items: center;
  padding: var(--s-md);
  background: var(--sp-n-lighter);
  border-radius: var(--r-md);
  font-family: var(--font-custom);
  font-weight: 600;
  font-size: var(--fs-md);
}

/* --- Receipt Upload Zone --- */
.nx-upload-zone {
  border: 2px dashed var(--sp-n-quat);
  border-radius: var(--r-lg);
  padding: var(--s-xl);
  text-align: center;
  color: var(--sp-n-secondary);
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.nx-upload-zone:hover { border-color: var(--sp-primary); background: var(--sp-primary-lightest); }
.nx-upload-zone__icon { font-size: 32px; margin-bottom: var(--s-sm); }
.nx-upload-zone__text { font-size: var(--fs-sm); }

/* --- Vehicle Grid --- */
.nx-vehicle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--s-md);
  font-family: var(--font-custom);
}
.nx-vehicle-card {
  background: var(--sp-white);
  border-radius: var(--r-lg);
  padding: var(--s-md);
  text-align: center;
  box-shadow: var(--depth-4);
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  position: relative;
}
.nx-vehicle-card:hover { transform: translateY(-2px); box-shadow: var(--depth-8); }
.nx-vehicle-card__icon { font-size: 36px; margin-bottom: var(--s-sm); }
.nx-vehicle-card__rego { font-weight: 700; color: var(--sp-n-dark); font-size: var(--fs-md); }
.nx-vehicle-card__model { font-size: var(--fs-xs); color: var(--sp-n-secondary); }
.nx-vehicle-card__status {
  position: absolute; top: var(--s-sm); right: var(--s-sm);
  width: 10px; height: 10px;
  border-radius: 50%;
}

/* --- Asset Categories --- */
.nx-asset-cats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--s-md);
  font-family: var(--font-custom);
}
.nx-asset-cat {
  background: var(--sp-white);
  border-radius: var(--r-lg);
  padding: var(--s-md);
  text-align: center;
  box-shadow: var(--depth-4);
  cursor: pointer;
  transition: transform .2s;
}
.nx-asset-cat:hover { transform: translateY(-2px); }
.nx-asset-cat__icon { font-size: 28px; margin-bottom: var(--s-xs); }
.nx-asset-cat__count { font-size: var(--fs-xxl); font-weight: 700; color: var(--sp-n-dark); }
.nx-asset-cat__label { font-size: var(--fs-xs); color: var(--sp-n-secondary); }

/* --- Scan Input --- */
.nx-scan {
  display: flex; gap: var(--s-md); align-items: flex-end;
  background: var(--sp-n-lighter);
  border-radius: var(--r-lg);
  padding: var(--s-lg);
  margin-bottom: var(--s-lg);
  font-family: var(--font-custom);
}
.nx-scan__input {
  flex: 1;
  padding: 10px 16px;
  border: 2px solid var(--sp-n-quat);
  border-radius: var(--r-md);
  font-size: var(--fs-md);
  font-family: monospace;
  letter-spacing: 1px;
}
.nx-scan__input:focus { border-color: var(--sp-primary); outline: none; }

/* --- Slide Panel --- */
.nx-panel {
  position: fixed;
  top: 0; right: -480px;
  width: 480px;
  height: 100vh;
  background: var(--sp-white);
  box-shadow: var(--depth-64);
  z-index: 1001;
  transition: right .3s ease;
  overflow-y: auto;
  padding: var(--s-lg);
}
.nx-panel.open { right: 0; }
.nx-panel__close {
  position: absolute;
  top: var(--s-md); right: var(--s-md);
  font-size: var(--fs-xl);
  color: var(--sp-n-secondary);
  cursor: pointer;
}
.nx-panel__title { font-size: var(--fs-xl); font-weight: 700; color: var(--sp-n-dark); margin-bottom: var(--s-lg); }

/* --- Notification Dropdown --- */
.sp-notif-dropdown {
  position: absolute;
  top: 44px; right: 0;
  width: 320px;
  background: var(--sp-white);
  border-radius: var(--r-md);
  box-shadow: var(--depth-16);
  z-index: 1002;
  display: none;
}
.sp-notif-dropdown.show { display: block; }
.sp-notif-dropdown__header {
  padding: var(--s-md);
  font-weight: 600;
  color: var(--sp-n-dark);
  border-bottom: 1px solid var(--sp-n-light);
}
.sp-notif-dropdown__item {
  display: flex; gap: var(--s-sm); align-items: flex-start;
  padding: var(--s-md);
  border-bottom: 1px solid var(--sp-n-light);
  cursor: pointer;
  transition: background .15s;
}
.sp-notif-dropdown__item:hover { background: var(--sp-n-lighter); }
.sp-notif-dropdown__item:last-child { border-bottom: none; }
.sp-notif-dropdown__dot {
  width: 8px; height: 8px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--sp-primary);
  margin-top: 4px;
}
.sp-notif-dropdown__text { font-size: var(--fs-sm); color: var(--sp-n-primary); }
.sp-notif-dropdown__time { font-size: var(--fs-xs); color: var(--sp-n-tertiary); }

/* --- Leave Balance Bars --- */
.nx-leave-bars { font-family: var(--font-custom); }
.nx-leave-bar { margin-bottom: var(--s-md); }
.nx-leave-bar__header {
  display: flex; justify-content: space-between;
  font-size: var(--fs-sm); color: var(--sp-n-dark);
  margin-bottom: var(--s-xs);
}
.nx-leave-bar__track {
  height: 12px;
  background: var(--sp-n-light);
  border-radius: 6px;
  overflow: hidden;
}
.nx-leave-bar__fill {
  height: 100%;
  border-radius: 6px;
  transition: width .6s ease;
}

/* --- Summary Stats --- */
.nx-stats {
  display: flex; gap: var(--s-lg);
  margin-bottom: var(--s-lg);
  font-family: var(--font-custom);
}
.nx-stat { text-align: center; }
.nx-stat__value { font-size: var(--fs-xl); font-weight: 700; color: var(--sp-n-dark); }
.nx-stat__label { font-size: var(--fs-xs); color: var(--sp-n-secondary); }

/* --- Policy Sidebar --- */
.nx-policy-sidebar {
  background: var(--sp-primary-lightest);
  border-radius: var(--r-lg);
  padding: var(--s-md);
  font-size: var(--fs-sm);
  color: var(--sp-n-dark);
  font-family: var(--font-custom);
}
.nx-policy-sidebar__title { font-weight: 600; margin-bottom: var(--s-sm); }
.nx-policy-sidebar li { margin-bottom: var(--s-xs); padding-left: var(--s-md); position: relative; }
.nx-policy-sidebar li::before {
  content: '\2022'; position: absolute; left: 0; color: var(--sp-primary);
}

/* --- Filter Bar --- */
.nx-filter-bar {
  display: flex; gap: var(--s-sm); align-items: center;
  padding: var(--s-sm) 0;
  margin-bottom: var(--s-md);
  flex-wrap: wrap;
}
.nx-filter-bar select, .nx-filter-bar input {
  padding: 6px 12px;
  border: 1px solid var(--sp-n-quat);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  background: var(--sp-white);
}

/* --- SP Footer --- */
.sp-footer {
  text-align: center;
  padding: var(--s-xl);
  color: var(--sp-n-secondary);
  font-size: var(--fs-sm);
  border-top: 1px solid var(--sp-n-light);
  margin-top: var(--s-xl);
}

/* --- Expandable Table Row --- */
.nx-expand-row { display: none; }
.nx-expand-row.show { display: table-row; }
.nx-expand-row td {
  background: var(--sp-n-lightest);
  padding: var(--s-md) var(--s-lg);
}

/* --- Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes countUp {
  from { opacity: 0; }
  to { opacity: 1; }
}
.animate-in { animation: fadeInUp .4s ease forwards; }

/* --- Chart Container --- */
.nx-chart-container { position: relative; height: 200px; }
.nx-chart-container--sm { height: 120px; }
.nx-chart-container--lg { height: 300px; }

/* --- Detail Page --- */
.nx-detail { font-family: var(--font-custom); }
.nx-breadcrumb {
  display: flex; align-items: center; gap: var(--s-sm);
  font-size: var(--fs-sm); color: var(--sp-n-secondary);
  margin-bottom: var(--s-lg);
}
.nx-breadcrumb a { color: var(--sp-primary); }
.nx-breadcrumb__sep { color: var(--sp-n-tertiary); }
.nx-detail__hero {
  position: relative;
  height: 280px;
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: var(--s-lg);
}
.nx-detail__hero-img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.nx-detail__hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(transparent 30%, rgba(0,0,0,.7));
  display: flex; flex-direction: column;
  justify-content: flex-end;
  padding: var(--s-lg);
}
.nx-detail__hero-title {
  font-size: var(--fs-mega);
  font-weight: 700;
  color: var(--sp-white);
  font-family: var(--font-custom);
  line-height: 1.2;
}
.nx-detail__hero-sub {
  font-size: var(--fs-md);
  color: rgba(255,255,255,.85);
  margin-top: var(--s-xs);
}
.nx-detail__actions {
  display: flex; gap: var(--s-sm);
  margin-bottom: var(--s-lg);
}
.nx-detail__grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--s-lg);
}
.nx-detail__sidebar { display: flex; flex-direction: column; gap: var(--s-md); }
.nx-detail__card {
  background: var(--sp-white);
  border-radius: var(--r-lg);
  padding: var(--s-lg);
  box-shadow: var(--depth-4);
}
.nx-detail__card-title {
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--sp-n-dark);
  margin-bottom: var(--s-md);
  font-family: var(--font-custom);
}
.nx-detail__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-md);
  font-size: var(--fs-sm);
}
.nx-detail__meta-label { color: var(--sp-n-secondary); font-weight: 600; }
.nx-detail__meta-value { color: var(--sp-n-dark); }
.nx-detail__section { margin-bottom: var(--s-lg); }
.nx-detail__section-title {
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--sp-n-dark);
  margin-bottom: var(--s-md);
  font-family: var(--font-custom);
  padding-bottom: var(--s-sm);
  border-bottom: 1px solid var(--sp-n-light);
}
.nx-detail__body {
  font-size: var(--fs-base);
  color: var(--sp-n-primary);
  line-height: 1.7;
}
.nx-detail__body p { margin-bottom: var(--s-md); }

/* timeline steps */
.nx-timeline { position: relative; padding-left: 28px; }
.nx-timeline__item {
  position: relative;
  padding-bottom: var(--s-lg);
  padding-left: var(--s-md);
}
.nx-timeline__item::before {
  content: '';
  position: absolute; left: -22px; top: 6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--sp-primary);
  border: 2px solid var(--sp-white);
  box-shadow: 0 0 0 2px var(--sp-primary);
  z-index: 1;
}
.nx-timeline__item::after {
  content: '';
  position: absolute; left: -17px; top: 20px;
  width: 2px; bottom: 0;
  background: var(--sp-n-light);
}
.nx-timeline__item:last-child::after { display: none; }
.nx-timeline__item--done::before { background: var(--sp-success); box-shadow: 0 0 0 2px var(--sp-success); }
.nx-timeline__item--pending::before { background: var(--sp-n-tertiary); box-shadow: 0 0 0 2px var(--sp-n-tertiary); }
.nx-timeline__date { font-size: var(--fs-xs); color: var(--sp-n-secondary); margin-bottom: 2px; }
.nx-timeline__title { font-size: var(--fs-base); font-weight: 600; color: var(--sp-n-dark); }
.nx-timeline__desc { font-size: var(--fs-sm); color: var(--sp-n-secondary); margin-top: 2px; }

/* comment thread */
.nx-comments { display: flex; flex-direction: column; gap: var(--s-md); }
.nx-comment {
  display: flex; gap: var(--s-md);
  padding: var(--s-md);
  background: var(--sp-n-lightest);
  border-radius: var(--r-lg);
}
.nx-comment__avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-xs); font-weight: 600; color: var(--sp-white);
  flex-shrink: 0;
}
.nx-comment__author { font-weight: 600; color: var(--sp-n-dark); font-size: var(--fs-sm); }
.nx-comment__time { font-size: var(--fs-xs); color: var(--sp-n-tertiary); }
.nx-comment__text { font-size: var(--fs-sm); color: var(--sp-n-primary); margin-top: var(--s-xs); }

/* approval chain */
.nx-approval-chain {
  display: flex; align-items: center; gap: var(--s-sm);
  flex-wrap: wrap;
}
.nx-approval-step {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  min-width: 80px;
}
.nx-approval-step__icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-sm); font-weight: 600; color: var(--sp-white);
  margin-bottom: var(--s-xs);
}
.nx-approval-step__name { font-size: var(--fs-xs); color: var(--sp-n-dark); font-weight: 600; }
.nx-approval-step__status { font-size: var(--fs-xs); color: var(--sp-n-secondary); }
.nx-approval-arrow {
  font-size: var(--fs-lg); color: var(--sp-n-tertiary);
  margin: 0 var(--s-xs);
}

/* photo cards for vehicles/assets */
.nx-photo-card {
  background: var(--sp-white);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--depth-4);
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  font-family: var(--font-custom);
}
.nx-photo-card:hover { transform: translateY(-2px); box-shadow: var(--depth-8); }
.nx-photo-card__img {
  width: 100%; height: 140px;
  object-fit: cover;
  background: var(--sp-n-lighter);
}
.nx-photo-card__body { padding: var(--s-md); }
.nx-photo-card__title { font-weight: 600; color: var(--sp-n-dark); font-size: var(--fs-base); }
.nx-photo-card__sub { font-size: var(--fs-xs); color: var(--sp-n-secondary); margin-top: 2px; }

/* employee card with photo */
.nx-emp-card {
  background: var(--sp-white);
  border-radius: var(--r-lg);
  padding: var(--s-md);
  text-align: center;
  box-shadow: var(--depth-4);
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  font-family: var(--font-custom);
}
.nx-emp-card:hover { transform: translateY(-2px); box-shadow: var(--depth-8); }
.nx-emp-card__photo {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto var(--s-sm);
  border: 3px solid var(--sp-n-light);
}
.nx-emp-card__name { font-weight: 600; color: var(--sp-n-dark); }
.nx-emp-card__role { font-size: var(--fs-xs); color: var(--sp-n-secondary); }
.nx-emp-card__dept { font-size: var(--fs-xs); color: var(--sp-primary); margin-top: 2px; }

/* avatar photo (for replacing initials) */
.nx-avatar-photo {
  border-radius: 50%;
  object-fit: cover;
}

@media (max-width: 1024px) {
  .nx-detail__grid { grid-template-columns: 1fr; }
  .nx-detail__hero { height: 200px; }
}

/* --- Polish: Focus States --- */
.nx-action-card:focus-visible,
.nx-project-card:focus-visible,
.nx-vehicle-card:focus-visible,
.nx-photo-card:focus-visible,
.nx-emp-card:focus-visible,
.nx-asset-cat:focus-visible,
.nx-kanban__card:focus-visible,
.nx-approval-card:focus-visible,
.sp-news__item:focus-visible,
.sp-quicklinks__item:focus-visible,
.sp-hero__tile:focus-visible,
.nx-btn:focus-visible,
.sp-tabs__tab:focus-visible,
.sp-site-header__nav a:focus-visible {
  outline: 2px solid var(--sp-primary);
  outline-offset: 2px;
}
.nx-form__input:focus-visible,
.nx-form__select:focus-visible,
.nx-form__textarea:focus-visible {
  outline: none;
  border-color: var(--sp-primary);
  box-shadow: 0 0 0 2px rgba(0, 120, 212, .2);
}

/* --- Polish: Card Refinement --- */
.nx-webpart,
.nx-detail__card {
  border: 1px solid rgba(0,0,0,.04);
}
.sp-webpart {
  border: 1px solid rgba(0,0,0,.04);
  transition: box-shadow .2s ease;
}
.sp-webpart:hover {
  box-shadow: var(--depth-8);
}
.nx-action-card {
  border: 1px solid rgba(0,0,0,.04);
}
.nx-action-card:hover {
  border-color: var(--sp-primary-light);
}
.nx-project-card {
  border: 1px solid rgba(0,0,0,.04);
}
.nx-project-card:hover {
  border-color: rgba(0,0,0,.08);
}
.nx-kpi-strip__item {
  border: 1px solid rgba(0,0,0,.04);
  transition: transform .2s ease, box-shadow .2s ease;
}
.nx-kpi-strip__item:hover {
  transform: translateY(-1px);
  box-shadow: var(--depth-8);
}

/* --- Polish: Better Badge Pills --- */
.nx-badge {
  letter-spacing: .3px;
  text-transform: capitalize;
  transition: transform .15s ease;
}

/* --- Polish: Form Inputs --- */
.nx-form__input,
.nx-form__select,
.nx-form__textarea {
  background: var(--sp-n-lightest);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.nx-form__input:focus,
.nx-form__select:focus,
.nx-form__textarea:focus {
  background: var(--sp-white);
}
.nx-form__input::placeholder {
  color: var(--sp-n-tertiary);
}

/* --- Polish: Table Rows --- */
.sp-doclib tr {
  transition: background .1s ease;
}
.sp-doclib td {
  transition: background .1s ease;
}

/* --- Polish: Entrance Animations --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.sp-webpart,
.nx-webpart,
.nx-kpi-strip__item,
.nx-action-card,
.nx-project-card,
.nx-photo-card,
.nx-emp-card,
.nx-vehicle-card,
.nx-asset-cat {
  animation: fadeIn .4s ease both;
}
.sp-webpart:nth-child(2),
.nx-kpi-strip__item:nth-child(2),
.nx-action-card:nth-child(2),
.nx-project-card:nth-child(2) { animation-delay: .05s; }
.sp-webpart:nth-child(3),
.nx-kpi-strip__item:nth-child(3),
.nx-action-card:nth-child(3),
.nx-project-card:nth-child(3) { animation-delay: .1s; }
.sp-webpart:nth-child(4),
.nx-kpi-strip__item:nth-child(4),
.nx-action-card:nth-child(4),
.nx-project-card:nth-child(4) { animation-delay: .15s; }

/* --- Polish: Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- Polish: Footer --- */
.sp-footer {
  background: var(--sp-white);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  box-shadow: 0 -1px 3px rgba(0,0,0,.04);
  display: flex;
  justify-content: center;
  gap: var(--s-lg);
  flex-wrap: wrap;
}

/* --- Polish: Hub Banner Enhancement --- */
.sp-hub-banner {
  position: relative;
  overflow: hidden;
}
.sp-hub-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(255,255,255,.08) 0%, transparent 70%);
  pointer-events: none;
}

/* --- Polish: Scrollbar --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--sp-n-quat); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--sp-n-tertiary); }

/* --- Polish: Selection Color --- */
::selection {
  background: var(--sp-primary-light);
  color: var(--sp-n-dark);
}

/* --- Polish: Hero Tile Active State --- */
.sp-hero__tile:active .sp-hero__tile-bg {
  transform: scale(1.01);
}

/* --- Polish: Tab Active Indicator Weight --- */
.sp-tabs__tab.active {
  border-bottom-width: 3px;
}

/* --- Polish: Progress Bar Shimmer --- */
.nx-progress__fill {
  position: relative;
  overflow: hidden;
}
.nx-progress__fill::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; bottom: 0;
  width: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.3), transparent);
  animation: shimmer 2s ease-in-out infinite;
}
@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* --- Polish: Toast Enhancement --- */
.nx-toast {
  display: flex;
  align-items: center;
  gap: var(--s-sm);
  min-width: 280px;
  backdrop-filter: blur(8px);
}

/* --- Polish: Notification Dropdown --- */
.sp-notif-dropdown {
  animation: dropIn .15s ease;
  transform-origin: top right;
}
@keyframes dropIn {
  from { opacity: 0; transform: scale(.95) translateY(-4px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* --- Mobile Power App Promo --- */
.nx-mobile-promo {
  margin-top: var(--s-xl);
  margin-bottom: var(--s-xl);
}
.nx-mobile-promo__content {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s-xxl);
  align-items: center;
  background: linear-gradient(135deg, #F3E8FF 0%, #EDE9FE 30%, #E0E7FF 100%);
  border-radius: var(--r-lg);
  padding: var(--s-xxl);
  font-family: var(--font-custom);
}
.nx-mobile-promo__title {
  font-size: 28px;
  font-weight: 700;
  color: var(--sp-n-dark);
  margin-bottom: var(--s-sm);
  line-height: 1.2;
}
.nx-mobile-promo__sub {
  font-size: var(--fs-md);
  color: var(--sp-n-secondary);
  line-height: 1.6;
  margin-bottom: var(--s-lg);
  max-width: 480px;
}
.nx-mobile-promo__features {
  display: flex;
  flex-direction: column;
  gap: var(--s-sm);
}
.nx-mobile-promo__features li {
  display: flex;
  align-items: center;
  gap: var(--s-sm);
  font-size: var(--fs-base);
  color: var(--sp-n-dark);
  font-weight: 500;
}

/* phone frame */
.nx-phone {
  width: 280px;
  height: 560px;
  background: #000;
  border-radius: 36px;
  border: 8px solid #1a1a1a;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.2), 0 4px 12px rgba(0,0,0,.1);
  display: flex;
  flex-direction: column;
}
.nx-phone__notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 28px;
  background: #000;
  border-radius: 0 0 18px 18px;
  z-index: 10;
}
.nx-phone__status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 20px 4px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: #742cac;
}
.nx-phone__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px 10px;
  background: #742cac;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}
.nx-phone__body {
  flex: 1;
  background: #f5f5f5;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nx-phone__camera-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px;
  background: #fff;
  border: 2px dashed #742cac;
  border-radius: 10px;
  color: #742cac;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.nx-phone__receipt {
  background: #fff;
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  transform: rotate(-1deg);
}
.nx-phone__receipt-inner {
  border: 1px solid #eee;
  border-radius: 4px;
  padding: 8px;
  background: #fafafa;
}
.nx-phone__field {
  background: #fff;
  border-radius: 8px;
  padding: 8px 10px;
}
.nx-phone__field label {
  display: block;
  font-size: 10px;
  color: #999;
  margin-bottom: 2px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.nx-phone__input {
  font-size: 13px;
  color: #333;
  font-weight: 500;
}
.nx-phone__toggle {
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: #ccc;
  position: relative;
  cursor: pointer;
  transition: background .2s;
}
.nx-phone__toggle--on {
  background: #742cac;
}
.nx-phone__toggle-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.nx-phone__toggle--on .nx-phone__toggle-dot {
  transform: translateX(18px);
}
.nx-phone__submit {
  width: 100%;
  padding: 12px;
  background: #742cac;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
}
.nx-phone__nav {
  display: flex;
  justify-content: space-around;
  padding: 6px 0 10px;
  background: #fff;
  border-top: 1px solid #eee;
}
.nx-phone__nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 9px;
  color: #999;
  font-weight: 500;
}
.nx-phone__nav-item--active {
  color: #742cac;
}
.nx-phone__nav-item--active svg {
  stroke: #742cac;
}

/* --- Power BI Laptop Mockup --- */
.nx-laptop {
  width: 420px;
  font-family: var(--font-custom);
}
.nx-laptop__screen {
  background: #1a1a2e;
  border-radius: 12px 12px 0 0;
  border: 6px solid #222;
  overflow: hidden;
}
.nx-laptop__toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: #252540;
  font-size: 11px;
  font-weight: 600;
  color: #ccc;
}
.nx-laptop__body {
  padding: 10px;
  background: #f8f8f8;
  min-height: 220px;
  display: flex;
  flex-direction: column;
}
.nx-laptop__base {
  width: 110%;
  margin-left: -5%;
  height: 14px;
  background: linear-gradient(180deg, #ccc, #aaa);
  border-radius: 0 0 8px 8px;
  position: relative;
}
.nx-laptop__base::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: #999;
  border-radius: 0 0 4px 4px;
}
.nx-bi-kpi {
  flex: 1;
  background: #fff;
  border-radius: 4px;
  padding: 6px 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.nx-bi-kpi__val {
  font-size: 13px;
  font-weight: 700;
  color: #333;
  line-height: 1.2;
}
.nx-bi-kpi__label {
  font-size: 7px;
  color: #999;
  margin-top: 1px;
}
.nx-bi-chart {
  flex: 1;
  background: #fff;
  border-radius: 4px;
  padding: 6px 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.nx-bi-chart__title {
  font-size: 8px;
  font-weight: 600;
  color: #666;
  margin-bottom: 4px;
}

/* --- Power Automate Flow Diagram --- */
.nx-flow-diagram {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 340px;
  font-family: var(--font-custom);
}
.nx-flow-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  border: 1px solid rgba(0,0,0,.04);
}
.nx-flow-step__icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nx-flow-step__title {
  font-size: 12px;
  font-weight: 600;
  color: #333;
}
.nx-flow-step__sub {
  font-size: 10px;
  color: #999;
  margin-top: 1px;
}
.nx-flow-connector {
  width: 2px;
  height: 16px;
  background: #ccc;
  margin-left: 31px;
}

/* --- Teams Mockup --- */
.nx-teams-mockup {
  width: 380px;
  height: 320px;
  display: flex;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,.15);
  font-family: var(--font-custom);
  border: 1px solid rgba(0,0,0,.08);
}
.nx-teams__sidebar {
  width: 140px;
  background: #292b40;
  padding: 10px 0;
  display: flex;
  flex-direction: column;
}
.nx-teams__sidebar-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 12px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 8px;
}
.nx-teams__channel {
  padding: 5px 12px;
  font-size: 11px;
  color: rgba(255,255,255,.6);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}
.nx-teams__channel--active {
  background: rgba(255,255,255,.1);
  color: #fff;
  border-left: 2px solid #6264A7;
}
.nx-teams__channel-hash {
  font-weight: 700;
  font-size: 13px;
  opacity: .5;
}
.nx-teams__main {
  flex: 1;
  background: #fff;
  display: flex;
  flex-direction: column;
}
.nx-teams__header {
  padding: 8px 12px;
  border-bottom: 1px solid #eee;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.nx-teams__messages {
  flex: 1;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}
.nx-teams__msg {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.nx-teams__msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.nx-teams__msg-name {
  font-size: 10px;
  font-weight: 600;
  color: #333;
}
.nx-teams__msg-time {
  font-weight: 400;
  color: #999;
  margin-left: 4px;
}
.nx-teams__msg-text {
  font-size: 10px;
  color: #555;
  line-height: 1.4;
  margin-top: 1px;
}

/* --- Microsoft Bookings Calendar Mockup --- */
.nx-bookings-mockup {
  width: 420px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,.15);
  font-family: var(--font-custom);
  border: 1px solid rgba(0,0,0,.08);
  background: #fff;
}
.nx-bookings__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #0B8043;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}
.nx-bookings__body {
  padding: 10px;
}
.nx-bookings__days {
  display: grid;
  grid-template-columns: 70px repeat(5, 1fr);
  gap: 3px;
  margin-bottom: 6px;
}
.nx-bookings__day {
  text-align: center;
  font-size: 9px;
  font-weight: 600;
  color: #666;
  padding: 4px;
}
.nx-bookings__day--today {
  background: #E8F5E9;
  border-radius: 4px;
  color: #0B8043;
}
.nx-bookings__vehicle-col {
  padding: 4px 6px;
}
.nx-bookings__vehicle-name {
  font-size: 10px;
  font-weight: 700;
  color: #333;
}
.nx-bookings__vehicle-type {
  font-size: 8px;
  color: #999;
}
.nx-bookings__row {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 3px;
  margin-bottom: 3px;
  align-items: center;
}
.nx-bookings__slots {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  min-height: 28px;
}
.nx-bookings__slot {
  border-radius: 4px;
  font-size: 8px;
  display: flex;
  align-items: center;
  padding: 0 4px;
  min-height: 24px;
}
.nx-bookings__slot--available {
  background: #E8F5E9;
  border: 1px dashed #A5D6A7;
}
.nx-bookings__slot--booked {
  background: #E3F2FD;
  border: 1px solid #90CAF9;
  color: #1565C0;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nx-bookings__slot--maintenance {
  background: #FFF8E1;
  border: 1px solid #FFE082;
  color: #F57F17;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nx-bookings__legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 8px;
  font-size: 9px;
  color: #666;
  border-top: 1px solid #eee;
}

/* --- Microsoft Shifts Roster Mockup --- */
.nx-shifts-mockup {
  width: 420px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,.15);
  font-family: var(--font-custom);
  border: 1px solid rgba(0,0,0,.08);
  background: #fff;
}
.nx-shifts__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #D13438;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}
.nx-shifts__body {
  padding: 8px;
}
.nx-shifts__days {
  display: grid;
  grid-template-columns: 80px repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
}
.nx-shifts__day {
  text-align: center;
  font-size: 9px;
  font-weight: 600;
  color: #666;
  padding: 4px 2px;
}
.nx-shifts__day--today {
  background: #FDE7E9;
  border-radius: 4px;
  color: #D13438;
}
.nx-shifts__name-col {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 4px;
}
.nx-shifts__avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.nx-shifts__name {
  font-size: 9px;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
}
.nx-shifts__row {
  display: grid;
  grid-template-columns: 80px repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 2px;
  align-items: center;
}
.nx-shifts__cell {
  height: 26px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 600;
}
.nx-shifts__cell--morning {
  background: #EBF5FF;
  color: #2563EB;
  border: 1px solid #BFDBFE;
}
.nx-shifts__cell--afternoon {
  background: #F3E8FF;
  color: #7C3AED;
  border: 1px solid #DDD6FE;
}
.nx-shifts__cell--off {
  background: #f8f8f8;
}
.nx-shifts__cell--gap {
  background: #FDE7E9;
  color: #D13438;
  border: 1px dashed #F5A3A7;
  font-size: 8px;
}
.nx-shifts__legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 8px;
  font-size: 9px;
  color: #666;
  border-top: 1px solid #eee;
}

/* --- Copilot Studio Chatbot --- */
.nx-chatbot-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0078D4, #005A9E);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,120,212,.4);
  z-index: 997;
  transition: transform .2s, box-shadow .2s;
  border: none;
}
.nx-chatbot-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(0,120,212,.5);
}
.nx-chatbot-fab__badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  background: #D13438;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}
.nx-chatbot {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 360px;
  height: 480px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 16px 60px rgba(0,0,0,.2);
  z-index: 998;
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--font-custom);
  animation: chatOpen .25s ease;
}
.nx-chatbot.open {
  display: flex;
}
@keyframes chatOpen {
  from { opacity: 0; transform: translateY(16px) scale(.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.nx-chatbot__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #0078D4, #005A9E);
  color: #fff;
}
.nx-chatbot__header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.nx-chatbot__header-name {
  font-weight: 600;
  font-size: 14px;
}
.nx-chatbot__header-status {
  font-size: 11px;
  opacity: .8;
}
.nx-chatbot__close {
  margin-left: auto;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 4px;
  opacity: .8;
}
.nx-chatbot__close:hover { opacity: 1; }
.nx-chatbot__messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f8f9fa;
}
.nx-chatbot__msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.5;
}
.nx-chatbot__msg--bot {
  background: #fff;
  color: #333;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.nx-chatbot__msg--user {
  background: #0078D4;
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.nx-chatbot__msg--typing {
  align-self: flex-start;
  background: #fff;
  padding: 12px 18px;
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.nx-chatbot__typing-dots {
  display: flex;
  gap: 4px;
}
.nx-chatbot__typing-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #999;
  animation: typingBounce 1.2s ease-in-out infinite;
}
.nx-chatbot__typing-dots span:nth-child(2) { animation-delay: .2s; }
.nx-chatbot__typing-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-4px); }
}
.nx-chatbot__suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.nx-chatbot__suggestion {
  padding: 6px 12px;
  border: 1px solid #0078D4;
  border-radius: 16px;
  font-size: 12px;
  color: #0078D4;
  background: #fff;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.nx-chatbot__suggestion:hover {
  background: #0078D4;
  color: #fff;
}
.nx-chatbot__input-area {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #eee;
  background: #fff;
}
.nx-chatbot__input {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 13px;
  font-family: var(--font-custom);
  outline: none;
  transition: border-color .15s;
}
.nx-chatbot__input:focus {
  border-color: #0078D4;
}
.nx-chatbot__input::placeholder {
  color: #aaa;
}
.nx-chatbot__send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #0078D4;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  flex-shrink: 0;
}
.nx-chatbot__send:hover { background: #005A9E; }
.nx-chatbot__powered {
  text-align: center;
  padding: 6px;
  font-size: 10px;
  color: #aaa;
  background: #fff;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .sp-section--2col, .sp-section--2col-even { grid-template-columns: 1fr; }
  .sp-section--3col { grid-template-columns: 1fr; }
  .nx-kanban { grid-template-columns: repeat(2, 1fr); }
  .nx-actions { grid-template-columns: repeat(2, 1fr); }
  .nx-kpi-strip { flex-wrap: wrap; }
  .nx-kpi-strip__item { min-width: calc(50% - var(--s-sm)); }
  .nx-project-grid { grid-template-columns: 1fr; }
  .sp-hero { grid-template-columns: 1fr; grid-template-rows: 250px 150px 150px; }
  .sp-hero__tile--main { grid-row: auto; }
  .sp-site-header__nav { display: none; }
  .nx-expense-line { grid-template-columns: 1fr 1fr; }
  .nx-form__row { grid-template-columns: 1fr; }
  .nx-mobile-promo__content { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .nx-mobile-promo__sub { max-width: 100%; }
  .nx-mobile-promo__features { align-items: center; }
  .nx-laptop { width: 100%; max-width: 420px; }
  .nx-flow-diagram { width: 100%; max-width: 340px; }
  .nx-teams-mockup { width: 100%; max-width: 380px; height: auto; }
  .nx-bookings-mockup { width: 100%; max-width: 420px; }
  .nx-shifts-mockup { width: 100%; max-width: 420px; }
}
@media (max-width: 768px) {
  .sp-app-bar { display: none; }
  .sp-page { margin-left: 0; }
  .sp-site-header { left: 0; }
  .nx-kanban { grid-template-columns: 1fr; }
  .nx-weather-strip { flex-wrap: wrap; gap: var(--s-md); }
  .nx-vehicle-grid { grid-template-columns: repeat(2, 1fr); }
  .nx-asset-cats { grid-template-columns: repeat(2, 1fr); }
  .sp-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .nx-panel { width: 100%; right: -100%; }
}
