:root {
  --navy: #091a2e;
  --navy-light: #162b43;
  --navy-accent: #1e3e62;
  --blue: #005299;
  --blue2: #0077cc;
  --green: #10b981;
  --green2: #059669;
  --orange: #f59e0b;
  --purple: #8b5cf6;
  --red: #ef4444;
  --teal: #14b8a6;
  --bg: #f3f6f9;
  --line: #e2e8f0;
  --ink: #0f172a;
  --muted: #64748b;
  --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius-card: 16px;
  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.04), 0 8px 10px -6px rgba(0, 0, 0, 0.02);
  --shadow-hover: 0 20px 30px -10px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: var(--font-family);
  background: var(--bg);
  color: var(--ink);
  font-size: 13.5px;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
}

.hidden {
  display: none !important;
}

/* ============ LOGIN ============ */
#login {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, #0a2e5c 0%, #001933 50%, #000c1a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  overflow: hidden;
}

#login::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(58, 160, 255, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
  top: -100px;
  left: -100px;
  border-radius: 50%;
  pointer-events: none;
  animation: floatBg 18s ease-in-out infinite alternate;
}

#login::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(39, 174, 96, 0.12) 0%, rgba(0, 0, 0, 0) 70%);
  bottom: -100px;
  right: -100px;
  border-radius: 50%;
  pointer-events: none;
  animation: floatBg2 15s ease-in-out infinite alternate;
}

@keyframes floatBg {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(80px, 60px) scale(1.1); }
}

@keyframes floatBg2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-60px, -50px) scale(1.08); }
}

.login-card {
  position: relative;
  background: #ffffff;
  width: 480px;
  max-width: 94vw;
  border-radius: 20px;
  padding: 38px 40px 32px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.2);
  animation: cardin 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  overflow: hidden;
  z-index: 10;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #003366 0%, #005299 35%, #27ae60 70%, #0077cc 100%);
}

@keyframes cardin {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.logo-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.logo-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 76px;
  transition: transform 0.25s ease;
}

.logo-item:hover {
  transform: translateY(-3px);
}

.logo-badge {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  letter-spacing: .5px;
  transition: box-shadow 0.25s ease;
}

.logo-item:hover .logo-badge {
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
}

.logo-item small {
  font-size: 8.5px;
  color: #55687d;
  line-height: 1.25;
  text-align: center;
  font-weight: 700;
  letter-spacing: .2px;
}

.login-card h1 {
  font-size: 21px;
  color: #002244;
  letter-spacing: 1px;
  font-weight: 800;
  margin-top: 4px;
}

.login-card .sub {
  font-size: 12px;
  color: #4a5a70;
  margin: 6px 0 12px;
  line-height: 1.6;
}

.login-card .sub b {
  color: #003366;
  font-size: 12.5px;
}

.wb-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0 22px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .8px;
  color: #15652e;
  background: #eaf7ed;
  border: 1px solid #bce6c7;
  border-radius: 20px;
  padding: 5px 16px;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(26, 122, 58, 0.08);
}

.wb-line::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  background-color: #27ae60;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.25);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.5); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(39, 174, 96, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(39, 174, 96, 0); }
}

.input-field-group {
  text-align: left;
  margin-bottom: 14px;
  position: relative;
}

.input-field-group label {
  font-size: 12px;
  font-weight: 700;
  color: #1a2a3a;
  display: block;
  margin-bottom: 6px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  font-size: 15px;
  color: #8898aa;
  pointer-events: none;
  transition: color 0.2s ease;
}

.login-card input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  border: 1px solid #cfdbe8;
  border-radius: 10px;
  font-size: 13.5px;
  background: #f8fafc;
  color: #1a2332;
  transition: all 0.2s ease;
}

.login-card input:focus {
  outline: none;
  background: #ffffff;
  border-color: #005299;
  box-shadow: 0 0 0 4px rgba(0, 82, 153, 0.12);
}

.login-card input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
  color: #005299;
}

.pw-toggle-btn {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 15px;
  color: #8898aa;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  line-height: 1;
}

.pw-toggle-btn:hover {
  color: #005299;
}

.login-card button.primary {
  width: 100%;
  margin-top: 14px;
  background: linear-gradient(135deg, #00284f 0%, #004a8a 100%);
  color: #fff;
  padding: 13px 20px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .3px;
  box-shadow: 0 6px 18px rgba(0, 40, 79, 0.25);
  transition: all 0.2s ease;
}

.login-card button.primary:hover {
  background: linear-gradient(135deg, #001f3f 0%, #003b70 100%);
  box-shadow: 0 8px 24px rgba(0, 40, 79, 0.35);
  transform: translateY(-1px);
}

.login-card button.primary:active {
  transform: translateY(0);
  box-shadow: 0 3px 10px rgba(0, 40, 79, 0.2);
}

.login-err {
  color: #c0392b;
  font-size: 12px;
  margin-top: 8px;
  min-height: 18px;
  font-weight: 600;
}

.login-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #e9f0f8;
  font-size: 12.5px;
}

.login-actions a {
  color: #005299;
  font-weight: 700;
  transition: color 0.2s ease;
  position: relative;
  text-decoration: none;
}

.login-actions a:hover {
  color: #00284f;
  text-decoration: underline;
}

.restricted-note {
  margin-top: 18px;
  padding: 12px 14px;
  background: #f4f8fc;
  border: 1px solid #e1ebf5;
  border-radius: 10px;
  font-size: 10.5px;
  color: #5b6e85;
  line-height: 1.55;
  text-align: left;
}

.restricted-note b {
  color: #003366;
  font-weight: 700;
}

.quick-accts {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.quick-accts p {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
}

.qa-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: #f3f7fc;
  border: 1px solid #e0e9f4;
  border-radius: 7px;
  padding: 8px 11px;
  margin-bottom: 6px;
  font-size: 12px;
}

.qa-btn:hover {
  background: #e8f1fb;
}

.qa-btn b {
  color: var(--navy);
}

/* ============ APP SHELL ============ */
#app {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

.sidebar {
  width: 68px;
  background: #071527;
  color: #94a3b8;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.08);
  z-index: 1000;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease;
  overflow-x: hidden;
}

/* Default Compact (Collapsed) View */
.sidebar:not(.expanded) .sb-brand-text,
.sidebar:not(.expanded) .nav-label,
.sidebar:not(.expanded) .nav-sec,
.sidebar:not(.expanded) .sb-user-info,
.sidebar:not(.expanded) .sb-user-arrow,
.sidebar:not(.expanded) .sb-foot {
  display: none !important;
  opacity: 0;
}

.sidebar:not(.expanded) .sb-brand {
  padding: 16px 8px;
  justify-content: center;
}

.sidebar:not(.expanded) .nav-item {
  justify-content: center;
  padding: 12px 0;
  margin: 4px 6px;
}

.sidebar:not(.expanded) .nav-item .ic {
  margin: 0;
  font-size: 20px;
}

.sidebar:not(.expanded) .sb-profile-wrapper {
  margin: 8px 4px;
}

.sidebar:not(.expanded) .sb-profile {
  justify-content: center;
  padding: 10px 0;
}

/* Expanded Flyout View */
.sidebar.expanded {
  position: fixed !important;
  left: 0;
  top: 0;
  height: 100vh;
  width: 245px !important;
  box-shadow: 8px 0 30px rgba(0, 0, 0, 0.4);
}

.sidebar.expanded .sb-brand-text,
.sidebar.expanded .nav-label,
.sidebar.expanded .nav-sec,
.sidebar.expanded .sb-user-info,
.sidebar.expanded .sb-user-arrow,
.sidebar.expanded .sb-foot {
  display: block !important;
  opacity: 1;
}

.sidebar.expanded .sb-brand {
  padding: 16px 18px;
  justify-content: space-between;
}

.sidebar.expanded .nav-item {
  justify-content: flex-start;
  padding: 10px 14px;
  margin: 2px 8px;
}

.sidebar.expanded .nav-item .ic {
  margin-right: 12px;
  font-size: 16px;
}

.sb-brand {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sb-collapse-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.sb-collapse-btn:hover {
  background: #003366;
  color: #ffffff;
}

.sb-brand h2 {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.sb-brand span {
  font-size: 10px;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.sb-profile-wrapper {
  display: none;
  position: relative;
  margin: 12px 12px 6px 12px;
}

.sb-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.sb-profile:hover, .sb-profile.active {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.06) 100%);
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-1px);
}

.sb-profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #0b1a2d;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  padding: 8px;
  z-index: 300;
  animation: dropdownIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.sb-pd-header {
  font-size: 11px;
  color: #94a3b8;
  padding: 8px 10px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 4px;
}

.sb-pd-header b {
  color: #38bdf8;
}

.sb-pd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sb-pd-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.sb-pd-item.logout {
  color: #f87171;
}

.sb-pd-item.logout:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

.sb-pd-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 4px 0;
}

.sb-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #005299 0%, #0077cc 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 4px 10px rgba(0, 82, 153, 0.35);
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.sb-user-info {
  flex: 1;
  min-width: 0;
}

.sb-user-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.sb-user-role {
  font-size: 10.5px;
  color: #38bdf8;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.sb-user-arrow {
  font-size: 10px;
  color: #64748b;
  transition: transform 0.25s ease, color 0.2s ease;
}

.sb-profile:hover .sb-user-arrow {
  color: #ffffff;
  transform: rotate(45deg);
}

.sb-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px 80px 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9.5px 14px;
  margin-bottom: 2px;
  font-size: 13px;
  font-weight: 500;
  color: #94a3b8;
  cursor: pointer;
  border-radius: 8px;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
}

.nav-item .ic {
  width: 20px;
  text-align: center;
  font-size: 15px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  transform: translateX(3px);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.18) 0%, rgba(0, 82, 153, 0.25) 100%);
  color: #ffffff;
  border-left-color: #38bdf8;
  font-weight: 700;
  box-shadow: inset 0 0 12px rgba(56, 189, 248, 0.08);
}

.nav-sec {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 800;
  color: #475569;
  padding: 16px 14px 6px;
}

.sb-foot {
  padding: 14px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  color: #64748b;
  background: rgba(0, 0, 0, 0.2);
}

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.topbar .search {
  flex: 1;
  max-width: 400px;
  position: relative;
}

.topbar .search input {
  width: 100%;
  padding: 9.5px 14px 9.5px 36px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font-size: 13px;
  background: #f8fafc;
  color: #0f172a;
  transition: all 0.2s ease;
}

.topbar .search input:focus {
  outline: none;
  background: #ffffff;
  border-color: #005299;
  box-shadow: 0 0 0 4px rgba(0, 82, 153, 0.12);
}

.topbar .search .mag {
  position: absolute;
  left: 12px;
  top: 10px;
  color: #94a3b8;
  font-size: 14px;
}

.search-results {
  position: absolute;
  top: 46px;
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.14);
  max-height: 340px;
  overflow-y: auto;
  z-index: 80;
}

.sr-item {
  padding: 10px 16px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 12.5px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.sr-item:hover {
  background: #f0f7ff;
}

.sr-item .tag {
  font-size: 10px;
  background: #e0f2fe;
  color: #0369a1;
  padding: 2px 7px;
  border-radius: 4px;
  margin-right: 8px;
  font-weight: 700;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.period-bar {
  display: flex;
  gap: 4px;
  align-items: center;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 4px 6px;
}

.period-bar select {
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  color: #003366;
  cursor: pointer;
  padding: 2px 4px;
  outline: none;
}

.pbtn {
  background: transparent;
  border-radius: 8px;
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  transition: all 0.2s ease;
}

.pbtn:hover {
  color: #0f172a;
}

.pbtn.on {
  background: #091a2e;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(9, 26, 46, 0.25);
}

@media(max-width:900px) {
  .period-bar select {
    font-size: 11px
  }

  .pbtn {
    padding: 3px 7px;
    font-size: 10px
  }
}

.bell {
  position: relative;
  font-size: 18px;
  color: #475569;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.bell:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.bell .dot {
  position: absolute;
  top: 2px;
  right: 2px;
  background: #ef4444;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  border-radius: 10px;
  padding: 1px 5px;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.4);
}

.usr {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 12px;
  transition: background 0.2s ease;
}

.usr:hover {
  background: #f1f5f9;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #005299 0%, #0077cc 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13.5px;
  box-shadow: 0 4px 10px rgba(0, 82, 153, 0.25);
}

.usr .nm {
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.2;
  color: #0f172a;
}

.usr .rl {
  font-size: 10.5px;
  color: #64748b;
  font-weight: 500;
}

.content {
  padding: 28px 32px;
  flex: 1;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-head h1 {
  font-size: 22px;
  font-weight: 800;
  color: #091a2e;
  letter-spacing: -0.02em;
}

.page-head p {
  font-size: 12.5px;
  color: #64748b;
  margin-top: 4px;
}

/* KPI CARDS */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.kpi {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: var(--shadow-card);
  border: 1px solid #e2e8f0;
  border-top: 4px solid var(--blue);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.kpi:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.kpi.green {
  border-top-color: var(--green);
}

.kpi.orange {
  border-top-color: var(--orange);
}

.kpi.purple {
  border-top-color: var(--purple);
}

.kpi.red {
  border-top-color: var(--red);
}

.kpi.teal {
  border-top-color: var(--teal);
}

.kpi .num {
  font-size: 30px;
  font-weight: 800;
  color: #091a2e;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.kpi.green .num {
  color: #059669;
}

.kpi.orange .num {
  color: #d97706;
}

.kpi.purple .num {
  color: #7c3aed;
}

.kpi.red .num {
  color: #dc2626;
}

.kpi.teal .num {
  color: #0d9488;
}

.kpi .lbl {
  font-size: 11px;
  color: #475569;
  margin-top: 6px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kpi .sub {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 4px;
  font-weight: 500;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.card {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-card);
  border: 1px solid #e2e8f0;
}

.card h3 {
  font-size: 13px;
  font-weight: 800;
  color: #091a2e;
  border-left: 4px solid #005299;
  padding-left: 12px;
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.chart-wrap {
  position: relative;
  height: 260px;
}

.chart-wrap.sm {
  height: 210px;
}

.note {
  font-size: 11.5px;
  color: #64748b;
  font-style: italic;
  margin-top: 10px;
}

/* progress bars */
.ind-row {
  margin-bottom: 16px;
}

.ind-h {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.ind-n {
  font-size: 12.5px;
  font-weight: 600;
  color: #1e293b;
  max-width: 76%;
  line-height: 1.35;
}

.ind-p {
  font-size: 13px;
  font-weight: 800;
  color: #091a2e;
}

.ind-p.high {
  color: #059669;
}

.ind-p.zero {
  color: #dc2626;
}

.track {
  background: #e2e8f0;
  border-radius: 8px;
  height: 10px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.fill {
  height: 100%;
  border-radius: 8px;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fill.blue {
  background: linear-gradient(90deg, #005299, #0077cc);
}

.fill.green {
  background: linear-gradient(90deg, #10b981, #059669);
}

.fill.orange {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.fill.red {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

.ind-d {
  font-size: 11px;
  color: #64748b;
  margin-top: 4px;
}

/* BANNERS */
.banner {
  background: #f0f7ff;
  border: 1px solid #cce3de;
  border-left: 4px solid #005299;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 12.5px;
  color: #1e3a8a;
  margin-bottom: 22px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  box-shadow: 0 2px 6px rgba(0, 82, 153, 0.05);
}

.banner .ic {
  font-size: 18px;
}

/* TABLES */
table.tbl {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.5px;
  border-radius: 12px;
  overflow: hidden;
}

table.tbl th {
  background: #091a2e;
  color: #ffffff;
  padding: 12px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: sticky;
  top: 0;
}

table.tbl td {
  padding: 11px 14px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  color: #334155;
}

table.tbl tr:nth-child(even) td {
  background: #f8fafc;
}

table.tbl tr:hover td {
  background: #f0f7ff;
}

.pill {
  padding: 3.5px 10px;
  border-radius: 12px;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
  display: inline-block;
  letter-spacing: 0.2px;
}

.comp-tag {
  font-size: 10px;
  color: #005299;
  background: #e0f2fe;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 700;
}

.btn {
  background: linear-gradient(135deg, #091a2e 0%, #1e3e62 100%);
  color: #fff;
  padding: 8.5px 16px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 2px 6px rgba(9, 26, 46, 0.15);
  transition: all 0.2s ease;
}

.btn:hover {
  background: linear-gradient(135deg, #05101f 0%, #152d48 100%);
  box-shadow: 0 4px 12px rgba(9, 26, 46, 0.25);
  transform: translateY(-1px);
}

.btn.sm {
  padding: 5.5px 12px;
  font-size: 11.5px;
  border-radius: 8px;
}

.btn.ghost {
  background: #f1f5f9;
  color: #0f172a;
  box-shadow: none;
  border: 1px solid #cbd5e1;
}

.btn.ghost:hover {
  background: #e2e8f0;
  color: #091a2e;
}

.btn.green {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.2);
}

.btn.green:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn.red {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.2);
}

.btn.red:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.btn:disabled {
  background: #cbd5e1;
  color: #94a3b8;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  background: #fff;
  padding: 13px 16px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
  align-items: center;
}

.filters select,
.filters input {
  padding: 7px 10px;
  border: 1px solid #d5deea;
  border-radius: 7px;
  font-size: 12px;
  background: #f8fafd;
}

.filters label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  margin-right: -4px;
}

/* modal */
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(10, 25, 45, .55);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 1300;
  padding: 40px 16px;
  overflow-y: auto;
}

.modal {
  background: #fff;
  border-radius: 13px;
  width: 760px;
  max-width: 96vw;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .4);
}

.modal-content {
  background: #ffffff !important;
  color: #0f172a !important;
  opacity: 1 !important;
  border-radius: 14px;
}

.modal-h {
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-h h2 {
  font-size: 16px;
  color: var(--navy);
}

.modal-h .x {
  font-size: 22px;
  color: #889;
  cursor: pointer;
  line-height: 1;
}

.modal-b {
  padding: 22px 24px;
}

.modal-f {
  padding: 15px 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: #f8fafd;
  border-radius: 0 0 13px 13px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.fld {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.fld input,
.fld select,
.fld textarea {
  max-width: 100%;
  box-sizing: border-box;
}

.fld.full {
  grid-column: 1/-1;
}

.fld label {
  font-size: 11.5px;
  font-weight: 600;
  color: #445;
  margin-bottom: 5px;
}

.fld input,
.fld select,
.fld textarea {
  padding: 9px 11px;
  border: 1px solid #d5deea;
  border-radius: 7px;
  font-size: 13px;
  font-family: inherit;
}

.fld textarea {
  resize: vertical;
  min-height: 60px;
}

/* Activity Form Indicator Dropdown — Layout & Appearance matching reference */
#af-ind {
  width: 100%;
  font-family: inherit;
  font-size: 13px;
  color: #0f172a;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 8px 12px;
  height: 38px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#af-ind:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

#af-ind optgroup,
.fld select optgroup {
  font-style: normal;
  font-weight: 700;
  color: #0f172a;
  padding: 6px 4px 4px;
}

#af-ind option,
.fld select option {
  font-weight: 400;
  color: #0f172a;
  padding: 4px 6px;
}

/* toast */
#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #1a2332;
  color: #fff;
  padding: 12px 18px;
  border-radius: 9px;
  font-size: 13px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, .3);
  border-left: 4px solid var(--green2);
  animation: slidein .3s;
}

.toast.err {
  border-left-color: var(--red);
}

@keyframes slidein {
  from {
    transform: translateX(40px);
    opacity: 0;
  }

  to {
    transform: none;
    opacity: 1;
  }
}

/* dropdown panels */
.panel {
  position: absolute;
  top: 52px;
  right: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, .2);
  width: 340px;
  z-index: 120;
}

.panel h4 {
  font-size: 12.5px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--navy);
}

.panel .ni {
  padding: 11px 16px;
  border-bottom: 1px solid #f0f4f8;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  gap: 10px;
}

.panel .ni:hover {
  background: #f6f9fc;
}

.panel .ni .dt {
  font-size: 16px;
}

.panel .ni small {
  color: var(--muted);
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
}

.banner {
  background: #fffbe6;
  border: 1px solid #ffe08a;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 12px;
  color: #7a5b00;
  margin-bottom: 18px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.banner .ic {
  font-size: 16px;
}

.lock-note {
  background: #eef6ff;
  border: 1px solid #cfe4fb;
  border-radius: 8px;
  padding: 9px 13px;
  font-size: 11.5px;
  color: #2a5580;
  margin-top: 10px;
}

/* permission manager */
.pm-group {
  margin-bottom: 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
}

.pm-group h4 {
  background: #f3f7fc;
  padding: 8px 14px;
  font-size: 12px;
  color: var(--navy);
}

.pm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
  padding: 8px 14px;
}

.sw {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  padding: 5px 0;
  cursor: pointer;
}

.sw input {
  appearance: none;
  -webkit-appearance: none;
  width: 34px;
  height: 19px;
  background: #cdd7e3;
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  transition: .2s;
  flex-shrink: 0;
  margin: 0;
}

.sw input:checked {
  background: var(--green2);
}

.sw input:before {
  content: '';
  position: absolute;
  width: 15px;
  height: 15px;
  background: #fff;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: .2s;
}

.sw input:checked:before {
  left: 17px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eef3f9;
  border: 1px solid #dbe6f2;
  border-radius: 14px;
  padding: 3px 10px;
  font-size: 11.5px;
  margin: 0 6px 6px 0;
}

.chip b {
  cursor: pointer;
  color: var(--red);
}

.avatar-big {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 28px;
  overflow: hidden;
}

.avatar-big img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--line);
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.tab {
  padding: 9px 16px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}

.tab.active {
  color: var(--navy);
  border-bottom-color: var(--blue);
}

#map {
  height: 520px;
  border-radius: 11px;
  z-index: 1;
}

.leaflet-popup-content {
  font-size: 12px;
}

/* presentation */
#present {
  position: fixed;
  inset: 0;
  background: #0a1626;
  z-index: 1100;
  display: none;
  flex-direction: column;
  color: #fff;
}

.slide {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 50px 70px;
  text-align: center;
}

.slide h1 {
  font-size: 40px;
  color: #fff;
  margin-bottom: 14px;
}

.slide h2 {
  font-size: 26px;
  color: #7fc0ff;
  margin-bottom: 26px;
}

.slide .big {
  font-size: 88px;
  font-weight: 800;
  color: #3aa0ff;
}

.slide ul {
  text-align: left;
  font-size: 20px;
  line-height: 2;
  list-style: none;
}

.slide ul li:before {
  content: "▸ ";
  color: #3aa0ff;
}

.slide table {
  color: #fff;
  font-size: 18px;
  border-collapse: collapse;
}

.slide table td,
.slide table th {
  padding: 8px 20px;
  border-bottom: 1px solid #2a466a;
}

.pres-ctrl {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 16px;
  align-items: center;
}

.pres-ctrl button {
  background: rgba(255, 255, 255, .14);
  color: #fff;
  padding: 10px 22px;
  border-radius: 30px;
  font-size: 14px;
}

.pres-ctrl button:hover {
  background: rgba(255, 255, 255, .26);
}

.pres-dots {
  position: absolute;
  top: 24px;
  right: 30px;
  font-size: 13px;
  color: #9fc4ea;
}

.pres-slide-charts {
  display: flex;
  gap: 30px;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
}

.pres-chart-box {
  width: 420px;
  height: 300px;
  background: #0f2036;
  border-radius: 12px;
  padding: 14px;
}

/* ==========================================================================
   ULTRA-RESPONSIVE ENTERPRISE SUITE (Desktop, Laptop, Tablet, Mobile)
   ========================================================================== */

.menu-btn {
  display: none;
  background: #f1f5f9;
  color: #091a2e;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 17px;
  line-height: 1;
  border: 1px solid #cbd5e1;
  transition: all 0.2s ease;
}

.menu-btn:hover {
  background: #e2e8f0;
}

/* Sidebar Backdrop Overlay for Mobile Drawer */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 26, 46, 0.65);
  backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* Table Responsive Wrapper */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  margin-bottom: 18px;
}

/* Tablet & Large Mobile (<= 1080px) */
@media (max-width: 1080px) {
  .content {
    padding: 22px 24px;
  }

  .kpi-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .grid2,
  .grid3 {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .chart-wrap {
    height: 240px;
  }
}

/* Mobile & Small Tablet (<= 768px) */
@media (max-width: 768px) {
  .topbar {
    padding: 10px 16px;
    gap: 10px;
    flex-wrap: wrap;
  }

  .menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
  }

  .topbar .search {
    order: 3;
    flex: 1 1 100%;
    max-width: 100%;
    margin-top: 4px;
  }

  .topbar .search input {
    padding: 9px 14px 9px 36px;
    font-size: 12.5px;
  }

  .sidebar {
    position: fixed;
    left: -260px;
    top: 0;
    bottom: 0;
    width: 250px;
    z-index: 999;
    height: 100vh;
    transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 10px 0 35px rgba(0, 0, 0, 0.35);
  }

  .sidebar.open {
    left: 0;
  }

  .period-bar {
    order: 2;
    overflow-x: auto;
    max-width: calc(100vw - 140px);
    white-space: nowrap;
    padding: 3px 4px;
  }

  .usr .nm,
  .usr .rl {
    display: none;
  }

  .topbar .usr {
    display: none !important;
  }

  .sb-profile-wrapper {
    display: block !important;
  }

  .page-head {
    margin-bottom: 16px;
  }

  .page-head h1 {
    font-size: 19px;
  }

  table.tbl {
    min-width: 580px;
  }

  /* Modals responsiveness */
  .modal-box {
    width: 94vw !important;
    max-width: 94vw !important;
    max-height: 90vh !important;
    margin: 16px auto !important;
    border-radius: 16px !important;
  }

  .modal-body {
    max-height: calc(90vh - 120px) !important;
    overflow-y: auto !important;
    padding: 16px !important;
  }

  .form-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .fld.full {
    grid-column: span 1 !important;
  }
}

/* Small Smartphones (<= 480px) */
@media (max-width: 480px) {
  .content {
    padding: 14px 12px;
  }

  .kpi-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .kpi {
    padding: 16px 18px;
  }

  .kpi .num {
    font-size: 25px;
  }

  .login-card {
    padding: 28px 20px 22px;
    border-radius: 16px;
  }

  .logo-row {
    gap: 10px;
    margin-bottom: 14px;
  }

  .logo-badge {
    width: 44px;
    height: 44px;
    font-size: 11px;
    border-radius: 10px;
  }

  .logo-item {
    width: 64px;
  }

  .login-card h1 {
    font-size: 18px;
  }

  .login-card .sub {
    font-size: 11px;
  }

  #fb-btn {
    bottom: 14px !important;
    left: 14px !important;
    padding: 9px 14px !important;
    font-size: 11px !important;
  }
}

/* ================= SOCIAL COLLABORATION & AI CHATBOT HUB ================= */
.social-hub-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Public Somizan welcome and sign-in screen */
#login {
  background:
    radial-gradient(ellipse at 18% 20%, rgba(14, 165, 233, .20), transparent 38%),
    radial-gradient(ellipse at 88% 82%, rgba(16, 185, 129, .16), transparent 34%),
    linear-gradient(135deg, #06172b 0%, #0b2742 52%, #071a2b 100%);
  display: block;
  padding: 0;
  overflow-y: auto;
}

/* Public SOMIZAN website and its dedicated sign-in page.  These rules own the
   public markup in index.html; the authenticated application styles remain
   below and are not used before a user signs in. */
#login.pub { color: #dbeafe; }
#login .pub-wrap { width: min(1160px, calc(100% - 48px)); margin: 0 auto; }
#login #pub-home, #login .pub-auth { position: relative; z-index: 1; min-height: 100%; }
#login .pub-nav, #login .pub-auth-nav {
  position: sticky; top: 0; z-index: 5;
  border-bottom: 1px solid rgba(191, 219, 254, .16);
  background: rgba(6, 23, 43, .88); backdrop-filter: blur(14px);
}
#login .pub-nav-in { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 26px; }
#login .pub-brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; letter-spacing: .08em; }
#login .lx-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #0ea5e9, #34d399); }
#login .lx-mark svg { width: 21px; height: 21px; fill: none; stroke: #fff; stroke-width: 1.8; }
#login .lx-mark svg rect { fill: rgba(255,255,255,.16); }
#login .lx-wordmark { font-size: 15px; }
#login .pub-links, #login .pub-nav-cta, #login .pub-hero-cta { display: flex; align-items: center; gap: 12px; }
#login .pub-links { gap: 22px; margin-left: auto; }
#login .pub-links a { color: #bfdbfe; font-size: 13px; font-weight: 600; }
#login .pub-links a:hover { color: #fff; }
#login .pub-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 39px; padding: 0 16px; border-radius: 9px; font-size: 13px; font-weight: 700; transition: transform .16s ease, background .16s ease; }
#login .pub-btn:hover { transform: translateY(-1px); }
#login .pub-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
#login .pub-btn-light { color: #06203a; background: #fff; }
#login .pub-btn-primary { color: #03253d; background: #6ee7b7; }
#login .pub-btn-outline, #login .pub-btn-ghost { color: #e0f2fe; border: 1px solid rgba(191, 219, 254, .4); background: transparent; }
#login .pub-hero { padding: clamp(64px, 10vw, 120px) 0 88px; }
#login .pub-hero-in, #login .pub-gov, #login .pub-cta-in { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(350px, .95fr); align-items: center; gap: clamp(38px, 7vw, 100px); }
#login .pub-eyebrow, #login .pub-kicker { color: #6ee7b7; font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
#login .pub-eyebrow { margin-bottom: 17px; }
#login .pub-hero h1, #login .pub-sec h2, #login .pub-cta-band h2 { margin: 0; color: #fff; font-weight: 800; letter-spacing: -.04em; }
#login .pub-hero h1 { max-width: 680px; font-size: clamp(37px, 5vw, 62px); line-height: 1.04; }
#login .pub-hero h1 em { color: #6ee7b7; font-style: normal; }
#login .pub-lead { max-width: 625px; margin: 21px 0 28px; color: #cbd5e1; font-size: 16px; line-height: 1.75; }
#login .pub-points { display: grid; gap: 9px; padding: 0; margin: 30px 0 0; list-style: none; color: #bfdbfe; font-size: 13px; }
#login .pub-points li::before { content: '✓'; color: #6ee7b7; font-weight: 800; margin-right: 9px; }
#login .pub-visual { padding: 14px; border: 1px solid rgba(186, 230, 253, .21); border-radius: 20px; background: linear-gradient(145deg, rgba(14, 165, 233, .13), rgba(16, 185, 129, .08)); box-shadow: 0 26px 70px rgba(0,0,0,.28); }
#login .pub-vis-card { padding: 24px; border-radius: 13px; background: #f8fafc; color: #172554; }
#login .pub-vis-head { display: flex; gap: 7px; padding-bottom: 18px; border-bottom: 1px solid #e2e8f0; }
#login .pub-vis-head span { width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; }
#login .pub-vis-head span:first-child { background: #fb7185; }
#login .pub-vis-chain { display: grid; gap: 13px; padding-top: 20px; }
#login .pub-vis-step { display: grid; grid-template-columns: 30px 1fr; column-gap: 11px; align-items: center; padding: 10px; border: 1px solid #e2e8f0; border-radius: 10px; }
#login .pub-vis-step i { width: 28px; height: 28px; border-radius: 8px; background: #dbeafe; }
#login .pub-vis-step .v2 { background: #d1fae5; } #login .pub-vis-step .v3 { background: #fef3c7; } #login .pub-vis-step .v4 { background: #ddd6fe; }
#login .pub-vis-step b { font-size: 12px; } #login .pub-vis-step small { grid-column: 2; color: #64748b; font-size: 10px; }
#login .pub-sec { padding: 82px 0; background: rgba(7, 26, 43, .4); }
#login .pub-sec-alt { background: rgba(2, 12, 27, .46); }
#login .pub-sec-head { max-width: 710px; margin-bottom: 34px; }
#login .pub-sec h2, #login .pub-cta-band h2 { font-size: clamp(28px, 3vw, 40px); line-height: 1.13; margin-top: 10px; }
#login .pub-sec-head p { margin: 15px 0 0; color: #cbd5e1; font-size: 15px; line-height: 1.7; }
#login .pub-flow, #login .pub-cap-grid, #login .pub-aud-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 0; margin: 0; list-style: none; }
#login .pub-flow li, #login .pub-cap, #login .pub-aud, #login .pub-hier div { padding: 20px; border: 1px solid rgba(191, 219, 254, .17); border-radius: 13px; background: rgba(15, 49, 75, .45); }
#login .pub-flow-n { display: block; margin-bottom: 12px; color: #6ee7b7; font-size: 20px; font-weight: 800; }
#login .pub-flow b, #login .pub-cap h3, #login .pub-aud b, #login .pub-hier b { display: block; color: #fff; font-size: 14px; }
#login .pub-flow small, #login .pub-cap p, #login .pub-aud small, #login .pub-hier small { display: block; margin-top: 7px; color: #bfdbfe; font-size: 12px; line-height: 1.55; }
#login .pub-cap-grid { grid-template-columns: repeat(4, 1fr); }
#login .pub-cap-wide { grid-column: span 2; }
#login .pub-cap-ic { display: grid; place-items: center; width: 37px; height: 37px; margin-bottom: 16px; border-radius: 10px; background: rgba(110, 231, 183, .14); color: #6ee7b7; }
#login .pub-cap-ic svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; }
#login .pub-cap h3 { margin: 0; } #login .pub-cap p { margin: 8px 0 0; }
#login .pub-aud-grid { grid-template-columns: repeat(4, 1fr); }
#login .pub-hier { display: grid; gap: 9px; }
#login .pub-hier div { position: relative; padding: 13px 16px 13px 31px; }
#login .pub-hier div::before { content: ''; position: absolute; left: 15px; top: 18px; width: 7px; height: 7px; border-radius: 50%; background: #6ee7b7; }
#login .pub-cta-band { position: relative; z-index: 1; padding: 58px 0; background: linear-gradient(100deg, #075985, #0f766e); }
#login .pub-cta-in { grid-template-columns: 1fr auto; }
#login .pub-cta-band p { margin: 11px 0 0; color: #dbeafe; }
#login .pub-foot { position: relative; z-index: 1; padding: 28px 0; background: #041323; color: #94a3b8; font-size: 12px; }
#login .pub-foot-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
#login .pub-brand-sm .lx-mark { width: 26px; height: 26px; border-radius: 8px; } #login .pub-brand-sm .lx-mark svg { width: 17px; height: 17px; }
#login .pub-auth { min-height: 100%; display: flex; flex-direction: column; }
#login .pub-auth-body { width: min(1160px, calc(100% - 48px)); flex: 1; display: grid; place-items: center; margin: 0 auto; padding: 58px 0 32px; }
#login .pub-auth-panel { width: min(460px, 100%); }
#login .pub-auth .login-card { width: auto; max-width: none; margin: 0; }
#login .pub-auth-foot { color: #94a3b8; font-size: 12px; text-align: center; }
@media (max-width: 900px) { #login .pub-links { display: none; } #login .pub-hero-in, #login .pub-gov { grid-template-columns: 1fr; } #login .pub-visual { max-width: 540px; } #login .pub-cap-grid { grid-template-columns: repeat(2, 1fr); } #login .pub-aud-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { #login .pub-wrap, #login .pub-auth-body { width: min(100% - 28px, 1160px); } #login .pub-nav-in { min-height: 62px; } #login .pub-nav-cta .pub-btn-light { display: none; } #login .pub-hero { padding: 52px 0 60px; } #login .pub-hero h1 { font-size: 36px; } #login .pub-lead { font-size: 14px; } #login .pub-hero-cta { flex-wrap: wrap; } #login .pub-sec { padding: 58px 0; } #login .pub-flow, #login .pub-cap-grid, #login .pub-aud-grid { grid-template-columns: 1fr; } #login .pub-cap-wide { grid-column: auto; } #login .pub-cta-in { grid-template-columns: 1fr; } #login .pub-foot-in { align-items: flex-start; flex-direction: column; } }

.login-shell {
  width: min(1160px, 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(36px, 7vw, 100px);
  position: relative;
  z-index: 1;
}

.login-welcome {
  color: #f8fafc;
  flex: 1 1 480px;
  max-width: 520px;
  animation: cardin .65s cubic-bezier(.16, 1, .3, 1);
}

.welcome-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #a8d8ff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .15em;
  margin-bottom: 22px;
}

.welcome-eyebrow span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 16px rgba(52, 211, 153, .7);
}

.login-welcome h1 {
  font-size: clamp(38px, 5vw, 60px);
  line-height: 1.04;
  letter-spacing: -.045em;
  font-weight: 800;
  margin-bottom: 18px;
}

.login-welcome h1 em {
  color: #64d7b4;
  font-style: normal;
}

.login-welcome > p {
  max-width: 445px;
  color: #c6d5e4;
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 28px;
}

.welcome-features {
  display: grid;
  gap: 15px;
}

.welcome-features > div {
  display: flex;
  align-items: center;
  gap: 14px;
}

.welcome-features > div > b {
  color: #76e0c0;
  font-size: 11px;
  letter-spacing: .08em;
}

.welcome-features span,
.welcome-program > span:last-child {
  display: grid;
  gap: 3px;
}

.welcome-features strong {
  color: #f8fafc;
  font-size: 13px;
}

.welcome-features small,
.welcome-program small {
  color: #9fb2c7;
  font-size: 11px;
}

.welcome-program {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(203, 213, 225, .19);
  display: flex;
  align-items: center;
  gap: 12px;
}

.welcome-program-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .09);
  font-size: 20px;
}

.welcome-program strong {
  color: #f1f5f9;
  font-size: 12px;
}

.login-shell .login-card {
  flex: 0 0 460px;
  width: 460px;
  max-width: min(460px, 100%);
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 22px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .32);
}

@media (max-width: 720px) {
  .org-onboarding-grid { grid-template-columns: 1fr !important; gap: 18px !important; }
}

@media (max-width: 900px) {
  #login { padding: 24px; overflow-y: auto; }
  .login-shell { flex-direction: column; gap: 26px; padding: 14px 0; }
  .login-welcome { flex: initial; max-width: 460px; text-align: center; }
  .login-welcome > p { margin-left: auto; margin-right: auto; }
  .welcome-features { text-align: left; max-width: 390px; margin: 0 auto; }
  .welcome-program { max-width: 390px; margin-left: auto; margin-right: auto; text-align: left; }
}

@media (max-width: 520px) {
  #login { padding: 14px; }
  .login-welcome h1 { font-size: 36px; }
  .login-welcome > p { font-size: 13px; }
  .welcome-features { gap: 12px; }
  .welcome-features small { line-height: 1.4; }
  .login-shell .login-card { flex-basis: auto; width: 100%; max-width: 460px; padding: 26px 20px 22px; }
}

.social-nav-tabs {
  display: flex;
  gap: 10px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.social-nav-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  color: #475569;
  transition: all 0.2s ease;
}

.social-nav-btn.active {
  background: #003366;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 51, 102, 0.15);
}

.social-chat-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
  height: 640px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.social-channels-sidebar {
  background: #0f172a;
  color: #f8fafc;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  border-right: 1px solid #1e293b;
}

.channel-group-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #94a3b8;
  margin-bottom: 6px;
}

.channel-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.15s ease;
}

.channel-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.channel-item.active {
  background: #005299;
  color: #ffffff;
  font-weight: 700;
}

.channel-item.ai-bot-item {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #ffffff;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.channel-item .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
}

.channel-item .status-dot.offline {
  background: #94a3b8;
}

.chat-main-window {
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  height: 100%;
}

.chat-header {
  padding: 14px 20px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header h3 {
  margin: 0;
  font-size: 15px;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-messages-container {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chat-msg-row {
  display: flex;
  gap: 12px;
  max-width: 80%;
}

.chat-msg-row.me {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #003366;
  color: #ffffff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.chat-msg-row.ai .chat-avatar {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

.chat-bubble {
  background: #ffffff;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

.chat-msg-row.me .chat-bubble {
  background: #003366;
  color: #ffffff;
  border-color: #003366;
}

.chat-meta {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 4px;
  display: flex;
  gap: 8px;
}

.chat-msg-row.me .chat-meta {
  color: rgba(255, 255, 255, 0.8);
  justify-content: flex-end;
}

.chat-text {
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.chat-input-container {
  padding: 14px 20px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quick-chips-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.quick-chip {
  padding: 4px 10px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.quick-chip:hover {
  background: #003366;
  color: #ffffff;
  border-color: #003366;
}

.chat-input-box {
  display: flex;
  gap: 10px;
  align-items: center;
}

.chat-input-box input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  font-size: 13.5px;
  outline: none;
}

.chat-input-box input:focus {
  border-color: #003366;
  box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

/* Custom Right-Click Social Context Menu & Bubble Hover Actions */
.social-context-menu {
  position: fixed;
  z-index: 100000;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18), 0 4px 10px rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  min-width: 195px;
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
  animation: socialMenuFadeIn 0.15s ease-out;
  user-select: none;
}

@keyframes socialMenuFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.social-context-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #1e293b;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.social-context-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.social-context-item.danger {
  color: #dc2626;
}

.social-context-item.danger:hover {
  background: #fef2f2;
  color: #b91c1c;
}

.social-context-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 4px 0;
}

.chat-bubble-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-msg-row.me .chat-bubble-wrapper {
  flex-direction: row-reverse;
}

.chat-bubble {
  position: relative;
  cursor: context-menu;
}

.chat-bubble-actions-trigger {
  opacity: 0;
  visibility: hidden;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  transition: all 0.15s ease;
  user-select: none;
  flex-shrink: 0;
}

.chat-bubble-wrapper:hover .chat-bubble-actions-trigger {
  opacity: 1;
  visibility: visible;
}

.chat-bubble-actions-trigger:hover {
  background: #cbd5e1;
  color: #0f172a;
}

/* ====================================================
   IMPACTSPHERE DEVELOPMENT SOCIAL NETWORK STYLING
==================================================== */
.soc-net-container {
  display: grid;
  grid-template-columns: 220px 1fr 250px;
  gap: 16px;
  max-width: 1480px;
  margin: 0 auto;
  align-items: start;
}

@media (max-width: 1200px) {
  .soc-net-container {
    grid-template-columns: 200px 1fr;
  }
  .soc-right-col {
    display: none;
  }
}

@media (max-width: 768px) {
  .soc-net-container {
    grid-template-columns: 1fr;
  }
  .soc-left-col {
    display: none;
  }
}

.soc-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  margin-bottom: 20px;
  overflow: hidden;
}

.soc-profile-card-mini {
  text-align: center;
  padding: 0 0 16px 0;
}

.soc-cover-mini {
  height: 75px;
  background: linear-gradient(135deg, #003366, #0055a5);
  background-size: cover;
  background-position: center;
}

.soc-avatar-mini {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid #ffffff;
  margin: -32px auto 10px auto;
  background: #003366;
  color: #ffffff;
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.soc-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  border-radius: 8px;
  margin: 2px 8px;
  transition: all 0.15s ease;
}

.soc-nav-item:hover, .soc-nav-item.active {
  background: #f1f5f9;
  color: #003366;
}

.soc-create-post-card {
  padding: 18px 20px;
}

.soc-post-types-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 12px;
}

.soc-post-type-chip {
  padding: 6px 12px;
  border-radius: 20px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.soc-post-type-chip:hover, .soc-post-type-chip.active {
  background: #003366;
  color: #ffffff;
}

.soc-post-card {
  padding: 20px;
  margin-bottom: 20px;
}

.soc-post-header {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.soc-post-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #003366;
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
}

.soc-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

.soc-post-actions {
  display: flex;
  gap: 20px;
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid #f1f5f9;
}

.soc-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: color 0.15s ease;
}

.soc-action-btn:hover {
  color: #003366;
}

@keyframes heartPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

.soc-action-btn.liked {
  color: #ef4444 !important;
  font-weight: 700;
}

.soc-action-btn.liked .soc-like-icon {
  display: inline-block;
  animation: heartPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.soc-action-delete {
  margin-left: auto;
  color: #dc2626 !important;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.soc-action-delete:hover {
  background: #fef2f2;
  color: #b91c1c !important;
}

.soc-delete-btn {
  background: #fee2e2;
  color: #dc2626 !important;
  border: 1px solid #fca5a5;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.soc-delete-btn:hover {
  background: #fecaca;
  color: #991b1b !important;
  transform: translateY(-1px);
}

.soc-comment-del-btn {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 2px 6px;
  font-size: 12px;
  border-radius: 4px;
  transition: all 0.15s ease;
  flex-shrink: 0;
  margin-left: 8px;
}

.soc-comment-del-btn:hover {
  color: #dc2626;
  background: #fee2e2;
}

.soc-comment-box {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed #e2e8f0;
}

.soc-comment-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.soc-comment-bubble {
  background: #f8fafc;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  flex: 1;
}

.soc-mention-pill {
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-block;
  transition: all 0.15s ease;
  text-decoration: none;
}

.soc-mention-pill:hover {
  background: #bae6fd;
  color: #0284c7;
  transform: translateY(-1px);
}

.soc-mention-dropdown {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  width: 280px;
  max-height: 220px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  padding: 4px;
}

.soc-mention-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s ease;
}

.soc-mention-item:hover, .soc-mention-item.active {
  background: #f1f5f9;
}

.soc-mention-item-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #003366;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.soc-reply-btn {
  background: none;
  border: none;
  color: #0284c7;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 4px;
  border-radius: 4px;
  margin-left: 6px;
  transition: all 0.15s ease;
}

.soc-reply-btn:hover {
  background: #e0f2fe;
  color: #0369a1;
}

.soc-profile-hero {
  position: relative;
  margin-bottom: 24px;
}

.soc-profile-cover {
  height: 200px;
  border-radius: 16px 16px 0 0;
  background-size: cover;
  background-position: center;
}

.soc-profile-details {
  padding: 0 24px 20px 24px;
  position: relative;
}

.soc-profile-avatar-main {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 4px solid #ffffff;
  margin-top: -50px;
  background: #003366;
  color: #ffffff;
  font-size: 40px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.soc-tabs-nav {
  display: flex;
  gap: 24px;
  border-bottom: 2px solid #e2e8f0;
  margin-top: 20px;
}

.soc-tab-item {
  padding: 10px 4px;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s ease;
}

.soc-tab-item.active, .soc-tab-item:hover {
  color: #003366;
  border-bottom-color: #003366;
}

/* ====================================================
   FACEBOOK-INSPIRED DASHBOARD DESIGN SYSTEM & ARCHITECTURE
==================================================== */
:root {
  --fb-bg: #f0f2f5;
  --fb-card-bg: #ffffff;
  --fb-blue: #1877f2;
  --fb-blue-hover: #166fe5;
  --fb-blue-light: #e7f3ff;
  --fb-text-primary: #050505;
  --fb-text-secondary: #65676b;
  --fb-border: #e4e6eb;
  --fb-divider: #ced0d4;
  --fb-green: #42b72a;
  --fb-red: #fa383e;
  --fb-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  --fb-shadow-hover: 0 4px 14px rgba(0, 0, 0, 0.12);
  --fb-radius: 12px;
}

/* 3-Column Compact Dashboard Container */
.fb-dashboard-container {
  display: grid;
  grid-template-columns: 220px 1fr 250px;
  gap: 16px;
  max-width: 1560px;
  margin: 0 auto;
  align-items: start;
}

@media (max-width: 1280px) {
  .fb-dashboard-container {
    grid-template-columns: 200px 1fr;
  }
  .fb-dash-right-col {
    display: none !important;
  }
}

@media (max-width: 860px) {
  .fb-dashboard-container {
    grid-template-columns: 1fr;
  }
  .fb-dash-left-col {
    display: none !important;
  }
}

/* Facebook Base Card */
.fb-card {
  background: var(--fb-card-bg);
  border: 1px solid var(--fb-border);
  border-radius: var(--fb-radius);
  box-shadow: var(--fb-shadow);
  padding: 16px 18px;
  margin-bottom: 16px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.fb-card:hover {
  box-shadow: var(--fb-shadow-hover);
}

.fb-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}

.fb-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--fb-text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Left Column Shortcuts & Profile */
.fb-left-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.fb-left-profile:hover {
  background: #e4e6eb;
}

.fb-left-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--fb-blue);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.fb-online-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background: var(--fb-green);
  border: 2px solid #fff;
  border-radius: 50%;
}

.fb-left-user-info {
  flex: 1;
  min-width: 0;
}

.fb-left-user-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--fb-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fb-left-user-role {
  font-size: 11px;
  color: var(--fb-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fb-shortcuts-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 6px;
}

.fb-shortcut-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}

.fb-shortcut-item:hover {
  background: #f0f2f5;
  color: var(--fb-blue);
  transform: translateX(2px);
}

.fb-shortcut-item.active {
  background: var(--fb-blue-light);
  color: var(--fb-blue);
  font-weight: 700;
}

.fb-squircle {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* Stories Carousel */
.fb-stories-carousel {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 16px;
  scrollbar-width: thin;
}

.fb-stories-carousel::-webkit-scrollbar {
  height: 4px;
}

.fb-stories-carousel::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.fb-story-card {
  width: 125px;
  height: 185px;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px;
  background-size: cover;
  background-position: center;
}

.fb-story-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.fb-story-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.75) 100%);
  pointer-events: none;
  z-index: 1;
}

.fb-story-avatar-ring {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid var(--fb-blue);
  background: #003366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.fb-story-title {
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.3;
  z-index: 2;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.fb-story-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(24, 119, 242, 0.9);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 10px;
  z-index: 2;
  text-transform: uppercase;
}

/* Quick Update Composer Card */
.fb-composer-card {
  background: var(--fb-card-bg);
  border: 1px solid var(--fb-border);
  border-radius: var(--fb-radius);
  box-shadow: var(--fb-shadow);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.fb-composer-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.fb-composer-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--fb-blue);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.fb-composer-fake-input {
  flex: 1;
  background: #f0f2f5;
  border-radius: 20px;
  padding: 9px 16px;
  font-size: 13px;
  color: var(--fb-text-secondary);
  cursor: pointer;
  transition: background 0.15s ease;
}

.fb-composer-fake-input:hover {
  background: #e4e6eb;
}

.fb-composer-actions {
  display: flex;
  justify-content: space-around;
  border-top: 1px solid #f1f5f9;
  padding-top: 10px;
}

.fb-composer-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: background 0.15s ease;
}

.fb-composer-btn:hover {
  background: #f0f2f5;
  color: var(--fb-text-primary);
}

/* KPI Feed Cards */
.fb-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

@media (max-width: 1024px) {
  .fb-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.fb-kpi-card {
  background: #fff;
  border: 1px solid var(--fb-border);
  border-radius: 10px;
  padding: 14px;
  box-shadow: var(--fb-shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fb-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--fb-shadow-hover);
}

.fb-kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--fb-blue);
}

.fb-kpi-card.green::before { background: var(--fb-green); }
.fb-kpi-card.purple::before { background: #8b5cf6; }
.fb-kpi-card.orange::before { background: #f59e0b; }
.fb-kpi-card.red::before { background: var(--fb-red); }

.fb-kpi-val {
  font-size: 20px;
  font-weight: 800;
  color: var(--fb-text-primary);
  margin: 4px 0 2px;
}

.fb-kpi-lbl {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--fb-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.fb-kpi-sub {
  font-size: 11px;
  color: #64748b;
  margin-top: 4px;
}

/* Activity Feed Post Cards */
.fb-post-card {
  background: #fff;
  border: 1px solid var(--fb-border);
  border-radius: var(--fb-radius);
  box-shadow: var(--fb-shadow);
  padding: 16px;
  margin-bottom: 16px;
}

.fb-post-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.fb-post-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #003366;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.fb-post-user {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--fb-text-primary);
}

.fb-post-time {
  font-size: 11px;
  color: var(--fb-text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.fb-post-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.fb-post-actions {
  display: flex;
  justify-content: space-around;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
  padding: 8px 0;
  margin-top: 12px;
}

.fb-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--fb-text-secondary);
  cursor: pointer;
  padding: 6px 14px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.fb-action-btn:hover {
  background: #f0f2f5;
  color: var(--fb-text-primary);
}

.fb-action-btn.liked {
  color: var(--fb-blue);
  font-weight: 700;
}

/* Right Rail Widgets */
.fb-event-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
}

.fb-event-date-box {
  width: 40px;
  height: 42px;
  background: var(--fb-blue-light);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--fb-blue);
  font-weight: 800;
  flex-shrink: 0;
}

.fb-event-date-box small {
  font-size: 9px;
  text-transform: uppercase;
}

.fb-event-date-box b {
  font-size: 14px;
  line-height: 1;
}

.fb-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.fb-contact-item:hover {
  background: #f0f2f5;
}

.fb-contact-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #003366;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.fb-media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 8px;
}

.fb-media-thumb {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: #0f172a;
  cursor: pointer;
  position: relative;
}

.fb-media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.fb-media-thumb:hover img {
  transform: scale(1.08);
}

/* Facebook Center Navigation Tabs */
.fb-center-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
  max-width: 540px;
}

.fb-tab {
  height: 48px;
  flex: 1;
  max-width: 90px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 8px;
  position: relative;
  transition: background 0.15s ease;
}

.fb-tab:hover {
  background: #f0f2f5;
}

.fb-tab.active {
  color: var(--fb-blue);
}

.fb-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--fb-blue);
  border-radius: 3px 3px 0 0;
}

.fb-tab-icon {
  font-size: 20px;
  line-height: 1;
}

.fb-circle-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e4e6eb;
  color: #050505;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  position: relative;
  transition: background 0.15s ease;
  flex-shrink: 0;
}

.fb-circle-btn:hover {
  background: #d8dadf;
}

/* ================= OFFLINE ↔ ONLINE SYNCHRONIZATION SYSTEM ================= */
.sync-widget-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 12px;
}

.sync-status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  border: 1px solid transparent;
}

.sync-status-pill.online {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

.sync-status-pill.online:hover {
  background: #d1fae5;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.sync-status-pill.offline {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.sync-status-pill.offline:hover {
  background: #fee2e2;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

.sync-status-pill.syncing {
  background: #eff6ff;
  color: #1e40af;
  border-color: #bfdbfe;
}

.sync-status-pill.error {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.sync-dot.online {
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
  animation: sync-pulse 2s infinite;
}

.sync-dot.offline {
  background: #ef4444;
}

.sync-dot.syncing {
  background: #3b82f6;
  animation: sync-spin-dot 1s infinite linear;
}

.sync-dot.error {
  background: #f59e0b;
}

@keyframes sync-pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes sync-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.sync-icon-spin {
  display: inline-block;
  animation: sync-spin 1s infinite linear;
}

.sync-pending-badge {
  background: #f59e0b;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  margin-left: 4px;
}

.sync-quick-btn {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 13px;
  color: #334155;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.sync-quick-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #005299;
}

.sync-quick-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ================= SYNC MODAL ================= */
.sync-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.sync-modal-box {
  background: #ffffff;
  border-radius: 16px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  animation: slideUp 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.sync-modal-head {
  padding: 20px 24px;
  background: linear-gradient(135deg, #003366, #005299);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sync-modal-head h3 {
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.sync-modal-head .close-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.sync-modal-head .close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.sync-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sync-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.sync-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
}

.sync-card-label {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.sync-card-val {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sync-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.sync-table th {
  background: #f1f5f9;
  color: #475569;
  font-weight: 600;
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid #e2e8f0;
}

.sync-table td {
  padding: 9px 12px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
}

.sync-log-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 12.5px;
}

.sync-log-ts {
  color: #94a3b8;
  font-size: 11px;
  min-width: 65px;
}

.sync-modal-foot {
  padding: 16px 24px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* ================= MULTI-PROJECT PMIS PLATFORM ENHANCEMENTS ================= */
.proj-scope-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.proj-scope-badge.global-mode {
  background: linear-gradient(135deg, #003366, #005299);
  color: #fff;
  border-color: #002244;
}

.proj-scope-badge.project-mode {
  background: #ffffff;
  color: #0f172a;
  border-color: #bae6fd;
}

.blueprint-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.blueprint-card:hover {
  border-color: #0284c7;
  background: #f8fafc;
  transform: translateY(-1px);
}

.blueprint-card.selected {
  border-color: #005299;
  background: #f0f9ff;
  box-shadow: 0 0 0 1px #005299;
}

.wizard-step-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.doc-vault-folder {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.doc-vault-folder:hover {
  border-color: #0284c7;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.08);
  transform: translateY(-1px);
}

.tier-hierarchy-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 11.5px;
  color: #475569;
}

/* ====================================================
   SERVER STATUS PILL & SYNC HUB STYLING
==================================================== */
.server-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  border: 1px solid transparent;
}

.server-status-pill.online,
.server-status-pill.local-updated,
.server-status-pill.updated {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

.server-status-pill.offline {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

.server-status-pill .last-update-tag {
  font-size: 10px;
  color: #059669;
  font-weight: 600;
  margin-left: 4px;
  background: rgba(16, 185, 129, 0.12);
  padding: 1px 6px;
  border-radius: 8px;
}

.server-status-pill.syncing {
  background: #eff6ff;
  color: #1e40af;
  border-color: #bfdbfe;
}

.server-status-pill.warning {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}

.server-status-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.server-status-pill .status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  animation: pulse-dot 2s infinite ease-in-out;
}

.server-status-pill .pending-badge {
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 10px;
  margin-left: 2px;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
}

.btn-server-preset {
  transition: all 0.15s ease;
}

.btn-server-preset:hover {
  border-color: #0284c7 !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.12);
}

/* ============ OWNER COORDINATOR & PROJECT MANAGEMENT SYSTEM ============ */
.coord-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.coord-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
  position: relative;
}

.coord-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 51, 102, 0.08);
  border-color: #cbd5e1;
}

.coord-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.coord-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #003366, #0284c7);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(0, 51, 102, 0.2);
  flex-shrink: 0;
}

.coord-avatar.inactive {
  background: linear-gradient(135deg, #64748b, #94a3b8);
}

.coord-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}

.coord-status-badge.active {
  background: #dcfce7;
  color: #15803d;
}

.coord-status-badge.inactive {
  background: #fee2e2;
  color: #b91c1c;
}

.perm-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
  max-height: 380px;
  overflow-y: auto;
  padding: 4px 4px 4px 0;
}

.perm-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.perm-item:hover {
  background: #f0f9ff;
  border-color: #bae6fd;
}

.perm-item.checked {
  background: #eff6ff;
  border-color: #3b82f6;
}

.perm-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: #005299;
  cursor: pointer;
}

.perm-item-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.perm-item-desc {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
  line-height: 1.35;
}

.assigned-proj-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  color: #1e293b;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid #e2e8f0;
  margin-right: 4px;
  margin-bottom: 4px;
}

.assigned-proj-pill .remove-btn {
  color: #94a3b8;
  cursor: pointer;
  font-size: 13px;
  padding: 0 2px;
  transition: color 0.15s;
}

.assigned-proj-pill .remove-btn:hover {
  color: #ef4444;
}

.system-mgmt-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.system-mgmt-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.system-mgmt-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  border-color: #0284c7;
}

/* Data Management Styles */
.dm-ribbon {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.dm-stat-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.dm-stat-label {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.dm-stat-val {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  margin: 4px 0 2px;
}
.dm-filter-bar {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.dm-select {
  padding: 8px 12px;
  font-size: 12.5px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #1e293b;
  outline: none;
}
.dm-select:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}
.dm-search-input {
  flex: 1;
  min-width: 220px;
  padding: 8px 12px;
  font-size: 12.5px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  outline: none;
}
.dm-search-input:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}
.dm-clean-modal-alert {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 10px;
  padding: 14px;
  color: #9f1239;
  font-size: 12.5px;
  line-height: 1.5;
  margin-bottom: 16px;
}
.dm-module-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.dm-module-box:hover {
  background: #f1f5f9;
}
.dm-module-box input[type="checkbox"] {
  width: 17px;
  height: 17px;
  cursor: pointer;
}
.dm-challenge-input {
  width: 100%;
  padding: 9px 12px;
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  font-family: monospace;
  outline: none;
  letter-spacing: 0.5px;
}
.dm-challenge-input:focus {
  border-color: #e11d48;
}

/* =====================================================================
   SYSTEM OWNER · GLOBAL PORTFOLIO (oz-*)
   Neutral, platform-level styling for the global administration layer.
   ===================================================================== */
.oz { --oz-ink: #0b1b2e; --oz-ink2: #334155; --oz-muted: #64748b; --oz-line: #e5e9f0; --oz-soft: #f6f8fb;
  --oz-brand: #0b3a6f; --oz-accent: #1d6fd8; --oz-ok: #16a34a; --oz-warn: #d97706; --oz-bad: #dc2626; --oz-info: #2563eb; --oz-mute: #94a3b8;
  max-width: 1480px; margin: 0 auto; color: var(--oz-ink); }
.oz-ic { display: inline-flex; width: 16px; height: 16px; flex: none; }
.oz-ic svg, .oz-nav-ic svg, .oz-scope-badge svg, .oz-empty-ic svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.oz-nav-ic { display: inline-flex; width: 18px; height: 18px; }

/* hero + page head */
.oz-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap;
  padding: 28px 32px; border-radius: 18px; color: #fff; margin-bottom: 22px;
  background: radial-gradient(1200px 300px at 100% 0%, rgba(56,132,255,.28), transparent 60%), linear-gradient(135deg, #0a1f3a 0%, #0b3a6f 100%);
  box-shadow: 0 18px 40px -22px rgba(11,58,111,.65); }
.oz-hero h1 { font-size: 28px; font-weight: 800; letter-spacing: -.02em; margin: 6px 0 6px; color: #fff; }
.oz-hero p { color: rgba(255,255,255,.72); font-size: 13.5px; }
.oz-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.6); }
.oz-eyebrow-dark { color: var(--oz-muted); }
.oz-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.oz-pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.oz-pagehead h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin: 4px 0; color: var(--oz-ink); }
.oz-pagehead p { color: var(--oz-muted); font-size: 13.5px; }

/* buttons */
.oz-btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 10px; font-size: 13px; font-weight: 600;
  border: 1px solid transparent; background: #fff; color: var(--oz-ink); cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s; }
.oz-btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }
.oz-btn .oz-ic { width: 15px; height: 15px; }
.oz-primary { background: var(--oz-brand); color: #fff; }
.oz-primary:hover { background: #0a4d93; box-shadow: 0 6px 16px -8px rgba(11,58,111,.7); }
.oz-white { background: #fff; color: var(--oz-brand); }
.oz-white:hover { background: #eef4fc; }
.oz-ghost-light { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.22); color: #fff; }
.oz-ghost-light:hover { background: rgba(255,255,255,.16); }
.oz-link { background: none; color: var(--oz-accent); font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; padding: 0; }
.oz-link:hover { text-decoration: underline; }
.oz-link .oz-ic { width: 14px; height: 14px; }
.oz-icon-btn { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--oz-line); background: #fff; color: var(--oz-muted); display: inline-flex; align-items: center; justify-content: center; }
.oz-icon-btn:hover { color: var(--oz-brand); border-color: #c7d3e3; background: var(--oz-soft); }

/* KPI strip */
.oz-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.oz-kpi { background: #fff; border: 1px solid var(--oz-line); border-radius: 14px; padding: 16px 18px; min-width: 0; }
.oz-kpi-label { font-size: 12px; font-weight: 600; color: var(--oz-muted); }
.oz-kpi-value { font-size: 30px; font-weight: 800; letter-spacing: -.03em; margin: 6px 0 2px; color: var(--oz-ink); line-height: 1.1; }
.oz-kpi-foot { font-size: 11.5px; color: var(--oz-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oz-kpi-warn { border-color: #f5d8a8; background: linear-gradient(180deg, #fffaf0, #fff); }
.oz-kpi-warn .oz-kpi-value { color: var(--oz-warn); }
.oz-skel { display: inline-block; width: 44px; height: 26px; border-radius: 6px; background: linear-gradient(90deg, #eef2f7, #f7f9fc, #eef2f7); }

/* layout */
.oz-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.oz-col-main, .oz-col-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.oz-card { background: #fff; border: 1px solid var(--oz-line); border-radius: 14px; padding: 18px 20px; min-width: 0; }
.oz-card-flush { padding: 0; overflow: hidden; }
.oz-pad { padding: 16px 20px; }
.oz-card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.oz-card-flush .oz-card-head { margin-bottom: 0; border-bottom: 1px solid var(--oz-line); }
.oz-card-head h3 { font-size: 14.5px; font-weight: 700; color: var(--oz-ink); letter-spacing: -.01em; border: 0; padding: 0; margin: 0; }
.oz-muted { color: var(--oz-muted); font-size: 12px; }
.oz-note { color: var(--oz-muted); font-size: 12.5px; padding: 6px 0; }

/* status pills + tones */
.oz-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.oz-pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.oz-ok { background: #e8f6ee; color: #15803d; } .oz-warn { background: #fdf3e2; color: #b45309; }
.oz-bad { background: #fdecec; color: #b91c1c; } .oz-info { background: #e9f0fd; color: #1d4ed8; } .oz-muted.oz-pill { background: #f1f4f8; color: #52607a; }
.oz-bg-ok { background: var(--oz-ok); } .oz-bg-warn { background: var(--oz-warn); } .oz-bg-bad { background: var(--oz-bad); }
.oz-bg-info { background: var(--oz-info); } .oz-bg-muted { background: var(--oz-mute); }

/* portfolio table */
.oz-table-wrap { overflow-x: auto; }
.oz-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.oz-table th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--oz-muted);
  padding: 11px 16px; background: var(--oz-soft); border-bottom: 1px solid var(--oz-line); white-space: nowrap; }
.oz-table td { padding: 13px 16px; border-bottom: 1px solid #eef1f6; vertical-align: middle; }
.oz-table tr:last-child td { border-bottom: 0; }
.oz-table tbody tr:hover { background: #fafcff; }
.oz-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.oz-table .nowrap { white-space: nowrap; }
.oz-actions { text-align: right; white-space: nowrap; }
.oz-actions > * { margin-left: 6px; vertical-align: middle; }
.oz-proj { display: flex; align-items: center; gap: 12px; min-width: 220px; max-width: 380px; }
.oz-proj-logo { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, #e8eef8, #f5f8fc); border: 1px solid var(--oz-line);
  display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; color: var(--oz-brand); flex: none; }
.oz-proj-txt { min-width: 0; }
.oz-proj-name { font-weight: 700; color: var(--oz-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oz-proj-meta { display: flex; gap: 8px; align-items: center; font-size: 11.5px; color: var(--oz-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; }
.oz-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; background: #eef2f8; color: #33476a; padding: 1px 6px; border-radius: 5px; }

/* distribution panels */
.oz-stack { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: #eef2f7; gap: 2px; }
.oz-stack span { display: block; height: 100%; }
.oz-legend { list-style: none; margin: 12px 0 0; display: grid; gap: 7px; }
.oz-legend li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--oz-ink2); }
.oz-legend li i { width: 9px; height: 9px; border-radius: 3px; }
.oz-legend li b { margin-left: auto; font-variant-numeric: tabular-nums; }
.oz-bars, .oz-gantt { display: grid; gap: 10px; }
.oz-bar-row, .oz-gantt-row { display: grid; grid-template-columns: 88px 1fr 40px; align-items: center; gap: 10px; font-size: 12px; }
.oz-gantt-row { grid-template-columns: 88px 1fr; }
.oz-bar-label { color: var(--oz-ink2); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oz-bar-track, .oz-gantt-track { position: relative; height: 8px; background: #eef2f7; border-radius: 999px; overflow: hidden; }
.oz-bar-track span { display: block; height: 100%; background: linear-gradient(90deg, #1d6fd8, #0b3a6f); border-radius: 999px; }
.oz-bar-row b { text-align: right; font-variant-numeric: tabular-nums; color: var(--oz-ink); }
.oz-gantt-track { overflow: visible; }
.oz-gantt-track span { position: absolute; top: 0; height: 100%; background: #1d6fd8; border-radius: 999px; }
.oz-now { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--oz-warn); z-index: 1; }

/* attention list */
.oz-attn { list-style: none; margin: 0; display: grid; gap: 10px; }
.oz-attn li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #f3e3c4; background: #fffbf3; border-radius: 10px; }
.oz-attn li div { min-width: 0; }
.oz-attn b { display: block; font-size: 12.5px; color: var(--oz-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oz-attn span { font-size: 11.5px; color: #92400e; }

/* recent activity feed */
.oz-feed { list-style: none; margin: 0; }
.oz-feed li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid #eef1f6; }
.oz-feed li:first-child { border-top: 0; padding-top: 2px; }
.oz-avatar { width: 32px; height: 32px; border-radius: 50%; background: #e8eef8; color: var(--oz-brand); font-size: 11.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; }
.oz-feed-main { flex: 1; min-width: 0; }
.oz-feed-title { font-weight: 600; font-size: 13px; color: var(--oz-ink); }
.oz-feed-meta { font-size: 11.5px; color: var(--oz-muted); margin-top: 2px; }
.oz-feed-detail { font-size: 12px; color: var(--oz-ink2); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oz-feed time { font-size: 11.5px; color: var(--oz-muted); white-space: nowrap; }

/* health */
.oz-health { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.oz-health-tile { display: flex; gap: 10px; padding: 11px 12px; border: 1px solid var(--oz-line); border-radius: 10px; background: var(--oz-soft); min-width: 0; }
.oz-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex: none; }
.oz-health-label { font-size: 11px; font-weight: 600; color: var(--oz-muted); }
.oz-health-value { font-size: 13px; font-weight: 700; color: var(--oz-ink); text-transform: none; }
.oz-health-sub { font-size: 11px; color: var(--oz-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.oz-health-foot { font-size: 11px; color: var(--oz-muted); margin-top: 10px; }

/* empty state */
.oz-empty { background: #fff; border: 1px dashed #cdd6e3; border-radius: 16px; padding: 56px 24px; text-align: center; }
.oz-empty-ic { width: 52px; height: 52px; margin: 0 auto 14px; padding: 12px; border-radius: 14px; background: #eef3fa; color: var(--oz-brand); }
.oz-empty h3 { font-size: 18px; font-weight: 700; border: 0; padding: 0; margin: 0 0 6px; justify-content: center; color: var(--oz-ink); }
.oz-empty p { color: var(--oz-muted); font-size: 13.5px; max-width: 440px; margin: 0 auto 18px; line-height: 1.6; }

/* projects page toolbar + cards */
.oz-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.oz-search { flex: 1; min-width: 240px; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; background: #fff; border: 1px solid var(--oz-line); border-radius: 10px; color: var(--oz-muted); }
.oz-search input { border: 0; outline: 0; flex: 1; font-size: 13px; background: transparent; color: var(--oz-ink); min-width: 0; }
.oz-select { height: 40px; border: 1px solid var(--oz-line); border-radius: 10px; padding: 0 12px; background: #fff; font-size: 13px; color: var(--oz-ink); }
.oz-seg { display: inline-flex; border: 1px solid var(--oz-line); border-radius: 10px; overflow: hidden; background: #fff; }
.oz-seg button { height: 38px; padding: 0 14px; font-size: 12.5px; font-weight: 600; background: #fff; color: var(--oz-muted); }
.oz-seg button.on { background: var(--oz-brand); color: #fff; }
.oz-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.oz-pcard { display: flex; flex-direction: column; gap: 14px; }
.oz-pcard header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.oz-pcard header .oz-proj { min-width: 0; }
.oz-pcard-desc { font-size: 12.5px; color: var(--oz-ink2); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 58px; }
.oz-pcard-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.oz-pcard-facts div { background: var(--oz-soft); border-radius: 10px; padding: 10px; text-align: center; }
.oz-pcard-facts dt { font-size: 11px; color: var(--oz-muted); font-weight: 600; }
.oz-pcard-facts dd { margin: 2px 0 0; font-size: 18px; font-weight: 800; color: var(--oz-ink); }
.oz-pcard-rows { display: grid; gap: 6px; font-size: 12px; }
.oz-pcard-rows div { display: flex; justify-content: space-between; gap: 10px; }
.oz-pcard-rows span { color: var(--oz-muted); }
.oz-pcard-rows b { font-weight: 600; color: var(--oz-ink); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oz-pcard footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px solid #eef1f6; }

/* header context (global vs project) */
.oz-scope { display: flex; align-items: center; gap: 10px; }
.oz-scope-badge { width: 34px; height: 34px; padding: 8px; border-radius: 10px; background: linear-gradient(135deg, #0a1f3a, #0b3a6f); color: #fff; flex: none; }
.oz-scope b { display: block; font-size: 13px; color: #0b1b2e; line-height: 1.2; }
.oz-scope small { display: block; font-size: 11px; color: #64748b; }
.oz-scope-proj { gap: 8px; }
.oz-crumb { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid #e5e9f0; background: #fff; color: #0b3a6f; font-size: 12.5px; font-weight: 600; }
.oz-crumb:hover { background: #f3f7fc; }
.oz-crumb .oz-ic { width: 14px; height: 14px; }
.oz-crumb-sep { color: #cbd5e1; }
.oz-scope-select { height: 32px; max-width: 260px; border: 1px solid #e5e9f0; border-radius: 8px; padding: 0 10px; font-size: 12.5px; font-weight: 600; color: #0b1b2e; background: #f8fafc; }

/* responsive */
@media (max-width: 1360px) { .oz-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1180px) { .oz-grid { grid-template-columns: minmax(0, 1fr); } .oz-col-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .oz-hero { padding: 22px 20px; } .oz-hero h1 { font-size: 23px; }
  .oz-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .oz-kpi-value { font-size: 24px; }
  .oz-col-side { grid-template-columns: minmax(0, 1fr); }
  .oz-health { grid-template-columns: 1fr; }
  .oz-scope small, .oz-crumb-sep { display: none; }
  .oz-scope-select { max-width: 160px; }
  .oz-cards { grid-template-columns: minmax(0, 1fr); }
}

/* keep the existing feedback button clear of the sidebar */
#fb-btn { left: auto !important; right: 22px; }

/* owner: audit + health pages */
.oz-mb { margin-bottom: 18px; }
.oz-kpis.oz-kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.oz-grid.oz-grid-even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.oz-hrow { display: grid; grid-template-columns: 14px 150px 1fr; align-items: baseline; gap: 8px; padding: 12px 0; border-top: 1px solid #eef1f6; font-size: 13px; }
.oz-hrow:first-of-type { border-top: 0; }
.oz-hrow .oz-dot { margin-top: 0; }
.oz-hrow-label { color: var(--oz-muted); font-weight: 600; }
.oz-hrow-value { font-weight: 700; color: var(--oz-ink); }
.oz-hrow-value small { display: block; font-weight: 400; font-size: 11.5px; color: var(--oz-muted); margin-top: 2px; }
.oz-audit-detail { font-size: 12.5px; color: var(--oz-ink2); min-width: 260px; }
.topbar .search { min-width: 160px; }
@media (max-width: 1180px) { .oz-grid.oz-grid-even { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .oz-kpis.oz-kpis-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .oz-hrow { grid-template-columns: 14px 110px 1fr; } }
.oz-select { max-width: 100%; min-width: 0; }
@media (max-width: 760px) { .oz-toolbar > * { flex: 1 1 100%; } .oz-seg { justify-content: stretch; } .oz-seg button { flex: 1; } }

/* ================= SOMIZAN NETWORK ================= */
.somizan-network-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #f8fafc;
}

.sn-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #fff;
  padding: 20px 24px;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.sn-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

.sn-branding h1 {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.sn-branding p {
  margin: 4px 0 0;
  font-size: 13px;
  color: #cbd5e1;
}

.sn-user-card {
  display: flex;
  gap: 12px;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.sn-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.sn-tab-nav {
  display: flex;
  gap: 4px;
  padding: 12px 24px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
}

.sn-tab-btn {
  padding: 8px 16px;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  color: #64748b;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.sn-tab-btn:hover {
  color: #0f172a;
  background: #f8fafc;
}

.sn-tab-btn.active {
  color: #0f172a;
  border-bottom-color: #0f172a;
}

.sn-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.sn-section {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.sn-section-header {
  margin-bottom: 24px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 16px;
}

.sn-section-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.sn-section-header p {
  margin: 4px 0 0;
  font-size: 13px;
  color: #64748b;
}

.sn-feed-container,
.sn-people-container,
.sn-connections-container {
  display: flex;
  flex-direction: column;
}

.sn-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
}

.sn-empty-state > div:first-child {
  font-size: 48px;
  margin-bottom: 16px;
}

.sn-empty-state > div:nth-child(2) {
  font-weight: 600;
  color: #0f172a;
  font-size: 15px;
  margin-bottom: 8px;
}

.sn-empty-state > div:nth-child(3) {
  font-size: 13px;
  color: #64748b;
  max-width: 320px;
}

/* Responsive */
@media (max-width: 768px) {
  .sn-header {
    padding: 16px;
  }
  
  .sn-header-content {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  
  .sn-tab-nav {
    padding: 12px 16px;
  }
  
  .sn-tab-btn {
    padding: 8px 12px;
    font-size: 13px;
  }
  
  .sn-content {
    padding: 16px;
  }
  
  .sn-section {
    padding: 16px;
  }
}

/* SOMIZAN NETWORK FEED */
.sn-create-post {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sn-post-input {
  width: 100%;
  min-height: 80px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  color: #0f172a;
  resize: vertical;
  box-sizing: border-box;
}

.sn-post-input:focus {
  outline: none;
  border-color: #0f172a;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.1);
}

.sn-post-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.sn-visibility-select {
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 13px;
  color: #0f172a;
  background: #fff;
  cursor: pointer;
  flex: 1;
  max-width: 140px;
}

.sn-post-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  transition: box-shadow 0.2s ease;
}

.sn-post-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.sn-post-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.sn-post-author-info {
  display: flex;
  gap: 10px;
  flex: 1;
  align-items: flex-start;
}

.sn-post-avatar {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.sn-post-author-name {
  font-weight: 600;
  color: #0f172a;
  font-size: 14px;
}

.sn-post-author-meta {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.sn-post-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: #94a3b8;
  white-space: nowrap;
}

.sn-post-content {
  margin-bottom: 12px;
}

.sn-post-title {
  font-weight: 600;
  color: #0f172a;
  font-size: 14px;
  margin-bottom: 6px;
}

.sn-post-text {
  color: #1e293b;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
}

.sn-post-footer {
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

.sn-post-stats {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: #64748b;
}

.sn-loading {
  text-align: center;
  padding: 40px 20px;
  color: #64748b;
  font-size: 14px;
}

@media (max-width: 768px) {
  .sn-create-post {
    padding: 12px;
  }
  
  .sn-post-input {
    min-height: 60px;
  }
  
  .sn-post-card {
    padding: 12px;
  }
  
  .sn-post-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .sn-visibility-select {
    max-width: 100%;
  }
}

/* SOMIZAN Network - Feed Composer */
.sn-composer {
  margin-bottom: 20px;
}

.sn-composer-box {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.sn-composer-textarea {
  width: 100%;
  min-height: 80px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  color: #0f172a;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.sn-composer-textarea:focus {
  outline: none;
  border-color: #0f172a;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.1);
}

.sn-post-media {
  margin: 12px 0;
  border-radius: 8px;
  overflow: hidden;
}

.sn-post-media img,
.sn-post-media video {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  max-height: 400px;
  object-fit: cover;
}

/* Mobile adjustments for composer */
@media (max-width: 768px) {
  .sn-composer-box {
    padding: 12px;
  }
  
  .sn-composer-textarea {
    min-height: 60px;
    padding: 10px;
  }
}
/* ============================================================================
   SOMIZAN SHELL UI FIXES
   Fixes for: Profile dropdown, header layout, theme toggle, sidebar, feedback
   ============================================================================ */

/* ========== USER MENU (PROFILE DROPDOWN) ========== */
.user-menu {
  position: fixed;
  top: 52px;
  right: 28px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.15);
  width: 320px;
  z-index: 150;
  min-width: 280px;
  max-width: 95%;
}

.user-menu.hidden {
  display: none;
}

/* Header section of user menu */
.user-menu-header {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  align-items: flex-start;
}

.user-menu-header .avatar-md {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0077cc, #00b4d8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
}

.user-menu-header div {
  flex: 1;
  min-width: 0;
}

.um-name {
  font-weight: 600;
  color: var(--ink);
  font-size: 14px;
  margin-bottom: 3px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.um-headline {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  margin-bottom: 2px;
}

.um-username {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

/* Menu dividers */
.um-divider {
  height: 1px;
  background: var(--line);
  margin: 0;
}

/* Menu items */
.um-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.um-item:hover {
  background: #f8fafc;
  color: #005299;
}

.um-item.um-signout {
  color: #ef4444;
}

.um-item.um-signout:hover {
  background: #fef2f2;
  color: #dc2626;
}

/* Appearance controls in menu */
.user-menu [style*="Appearance"] {
  padding: 8px 12px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: var(--muted) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px;
  display: block;
}

.user-menu .btn.ghost.sm {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 6px 8px !important;
  font-size: 11px !important;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.user-menu .btn.ghost.sm:hover {
  background: #f0f7ff;
  border-color: #0077cc;
  color: #005299;
}

/* ========== APPLICATION HEADER (single source of truth) ==========
   One compact row: workspace context · search · reporting period · actions.
   Replaces the earlier grid layouts that wrapped the action group onto a second row. */
.topbar {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 16px;
  height: 64px;
  min-height: 64px;
  padding: 0 20px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar > * { flex-shrink: 0; }

/* Left: project / workspace context */
#project-scope-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 auto;
  min-width: 0;
  margin: 0 !important;
  overflow: hidden;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
#project-scope-indicator .oz-scope-proj { gap: 6px; min-width: 0; }
#project-scope-indicator .oz-crumb { height: 34px; padding: 0 10px; font-size: 12.5px; flex-shrink: 0; }
#project-scope-indicator .oz-crumb-sep { color: #cbd5e1; }
#project-scope-indicator .oz-scope-select,
#project-scope-indicator .ws-scope-select {
  height: 34px;
  min-width: 90px;
  max-width: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 0 28px 0 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: #0f172a;
  text-overflow: ellipsis;
  cursor: pointer;
}
#project-scope-indicator .ws-scope-select { max-width: 170px; }
#project-scope-indicator .oz-scope-select:focus,
#project-scope-indicator .ws-scope-select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 82, 153, 0.12); }
.ws-scope { display: inline-flex; align-items: center; gap: 6px; min-width: 0; margin: 0; }
.ws-scope-k { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #94a3b8; }
.ws-scope b { font-size: 12.5px; color: #0f172a; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }

/* Center: global search trigger (opens the search dialog; "/" shortcut) */
.search-icon-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 240px;
  min-width: 36px;
  max-width: 380px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: #64748b;
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: text;
  transition: border-color .15s ease, background .15s ease;
}
.search-icon-btn:hover { background: #fff; border-color: #cbd5e1; }
.search-icon-btn:focus-visible { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 82, 153, 0.12); }
.search-icon-btn .tb-search-ic { font-size: 13px; line-height: 1; opacity: .7; }
.search-icon-btn .tb-search-ph { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-icon-btn kbd {
  font: 600 11px/1 var(--font-family);
  color: #64748b;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 3px 6px;
}

/* Right: reporting period as one segmented control */
.period-bar {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 36px;
  margin: 0 0 0 auto;
  padding: 3px;
  background: #f1f5f9;
  border: 1px solid var(--line);
  border-radius: 8px;
  white-space: nowrap;
}
.period-bar select {
  height: 28px;
  margin: 0 2px 0 0;
  padding: 0 6px;
  border: none;
  border-right: 1px solid #dbe2ea;
  border-radius: 6px 0 0 6px;
  background: transparent;
  font-size: 12.5px;
  font-weight: 700;
  color: #003366;
  cursor: pointer;
}
.period-bar .pbtn {
  height: 28px;
  padding: 0 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  line-height: 28px;
  box-shadow: none;
  cursor: pointer;
}
.period-bar .pbtn:hover { color: #0f172a; background: rgba(255, 255, 255, 0.7); }
.period-bar .pbtn.on { background: #0b2545; color: #fff; box-shadow: 0 1px 2px rgba(9, 26, 46, 0.25); }

/* Right: notification · theme · user, separated from the period control */
.top-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}
.top-actions .bell,
.theme-toggle-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #475569;
  font-size: 16px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.top-actions .bell:hover,
.theme-toggle-header:hover { background: #f1f5f9; border-color: var(--line); color: #0f172a; }
.top-actions .bell .dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  border: 2px solid #fff;
  font-size: 0;
}
.top-actions .bell .dot:empty { display: none; }
.usr-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-left: 2px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.usr-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(0, 82, 153, 0.2); }
.avatar-sm {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #003366;
  background-size: cover;
  background-position: center;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
}
.avatar-sm img { width: 100%; height: 100%; object-fit: cover; }
/* Dropdowns open just below the 64px header */
.topbar .panel { top: 60px; right: 16px; }
.user-menu { top: 60px; right: 16px; }

/* Laptop widths: keep one row by tightening, never wrapping */
@media (min-width: 1601px) {
  #project-scope-indicator .oz-scope-select { max-width: 320px; }
}
@media (max-width: 1600px) {
  #project-scope-indicator .oz-crumb { width: 34px; padding: 0; justify-content: center; }
  #project-scope-indicator .oz-crumb-txt { display: none; }
  .ws-scope-k { display: none; }
}
@media (max-width: 1440px) {
  #project-scope-indicator .oz-scope-select { max-width: 230px; }
  #project-scope-indicator .ws-scope-select { max-width: 140px; }
  .search-icon-btn { flex-basis: 180px; }
}
@media (max-width: 1280px) {
  .topbar { gap: 12px; padding: 0 16px; }
  .search-icon-btn { flex: 0 0 36px; width: 36px; max-width: 36px; padding: 0; justify-content: center; }
  .search-icon-btn .tb-search-ph, .search-icon-btn kbd { display: none; }
    .period-bar .pbtn { padding: 0 8px; }
}
@media (max-width: 1100px) {
  #project-scope-indicator .oz-scope-select { max-width: 150px; }
  #project-scope-indicator .ws-scope-select { max-width: 120px; }
}

/* ========== SIDEBAR OVERLAY BEHAVIOR ========== */
.sidebar {
  transition: width 0.3s ease;
  width: 250px;
  overflow-y: auto;
}

.sidebar.collapsed {
  width: 64px;
}

/* Sidebar expands on hover */
.sidebar:hover {
  width: 250px;
}

/* Sidebar collapse arrow toggle */
.sb-collapse-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--muted);
  padding: 4px 8px;
  transition: transform 0.3s ease, color 0.2s ease;
  border-radius: 6px;
}

.sb-collapse-btn:hover {
  color: var(--ink);
  background: #f0f4f8;
}

.sidebar.collapsed .sb-collapse-btn {
  transform: rotate(180deg);
}

/* ========== CONTENT LAYOUT ========== */
.main {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.content {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px;
  background: var(--bg);
}

/* Prevent horizontal scrollbar */
body,
html,
.main,
.content {
  overflow-x: hidden;
}

/* ========== FEEDBACK BUTTON ========== */
#fb-btn {
  padding: 8px 14px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  border-radius: 20px !important;
  background: #003366 !important;
  color: #fff !important;
  border: none !important;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 51, 102, 0.3);
  bottom: 20px !important;
  left: 20px !important;
  z-index: 800;
}

#fb-btn:hover {
  background: #00254d !important;
  box-shadow: 0 6px 20px rgba(0, 51, 102, 0.4);
  transform: translateY(-2px);
}

#fb-btn.hidden {
  display: none !important;
}

/* ============================================================================
   DARK MODE OVERRIDES
   ============================================================================ */
:root[data-theme="dark"] .user-menu {
  background: #1a1f28;
  border-color: #2a2f38;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.5);
}

:root[data-theme="dark"] .um-divider {
  background: #2a2f38;
}

:root[data-theme="dark"] .um-item {
  color: #f1f5f9;
}

:root[data-theme="dark"] .um-item:hover {
  background: #242b36;
  color: #60a5fa;
}

:root[data-theme="dark"] .um-item.um-signout:hover {
  background: #7f1d1d;
  color: #f87171;
}



:root[data-theme="dark"] .sb-collapse-btn:hover {
  background: #242b36;
  color: #f1f5f9;
}

/* ============================================================================
   RESPONSIVE FIXES
   ============================================================================ */
@media (max-width: 1024px) {
  #project-scope-indicator .oz-scope-select { max-width: 130px; }
  
  .period-bar {
    display: none;
  }
  
  .user-menu {
    width: 280px;
  }
}

@media (max-width: 768px) {
  .topbar {
    height: auto;
    min-height: 56px;
    padding: 8px 12px;
    gap: 10px;
  }
  .search-icon-btn { flex: 1 1 auto; max-width: none; width: auto; }
  .top-actions { margin-left: auto; padding-left: 0; border-left: none; }
  
  #project-scope-indicator {
    font-size: 12px;
    display: none;
  }
  
  .period-bar {
    display: none;
  }
  
  .user-menu {
    right: 16px;
    width: 260px;
  }
  
    /* Phones: the sidebar is an off-canvas drawer — closed by default, opened only by the menu
     button (.open). Desktop hover classes (.expanded / .collapsed) never show it here. */
  .sidebar,
  .sidebar.expanded,
  .sidebar.collapsed {
    position: fixed !important;
    left: -270px;
    top: 0;
    bottom: 0;
    width: 250px !important;
    height: 100vh;
    z-index: 999;
    transform: none;
  }
  .sidebar.open,
  .sidebar.open.expanded,
  .sidebar.open.collapsed {
    left: 0;
  }
}
