@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
  --bg-primary: #050907;
  --bg-secondary: #0d1811;
  --bg-glass: rgba(10, 23, 15, 0.82);
  --bg-elevated: rgba(17, 32, 22, 0.94);
  --text-primary: #f4f7ec;
  --text-secondary: #adc7a4;
  --accent-blue: #07b256;
  --accent-blue-hover: #059347;
  --accent-gold: #a8c73a;
  --border-color: rgba(168, 199, 58, 0.16);
  --danger: #ef5a5a;
  --success: #4cd98c;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  
  --shadow-glow: 0 0 22px rgba(7, 178, 86, 0.18);
  --shadow-card: 0 18px 44px rgba(0, 0, 0, 0.22);
  --border-radius: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Outfit', sans-serif;
}

html {
  width: 100%;
  overflow-x: hidden;
}

body {
  background:
    radial-gradient(circle at top, rgba(168, 199, 58, 0.18), transparent 32%),
    radial-gradient(circle at 20% 80%, rgba(7, 178, 86, 0.16), transparent 28%),
    linear-gradient(180deg, #040806 0%, #09130d 100%);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  scroll-behavior: smooth;
  overflow-x: hidden;
  touch-action: pan-y;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(168, 199, 58, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168, 199, 58, 0.03) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.45;
  transform: translateZ(0);
  will-change: transform;
}

/* Typography */
h1, h2, h3 {
  font-weight: 600;
  letter-spacing: 0.5px;
  line-height: 1.15;
}

.text-gold { color: var(--accent-gold); }
.text-blue { color: var(--accent-blue); }
.text-secondary { color: var(--text-secondary); }

/* Layouts */
.container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 80px 12px 118px; /* Added 70px top padding for fixed navbar */
  flex: 1;
}

.workspace-tab-source {
  display: none !important;
}

.hero-container {
  padding-top: 2px;
  padding-bottom: 0;
}

.workspace-nav-shell,
.overview-strip-shell,
.context-bar-shell {
  padding-top: 2px;
  padding-bottom: 0;
}

.overview-strip-shell {
  margin-top: -2px;
}

.context-bar-shell {
  margin-top: -4px;
}

.workspace-nav-container,
.overview-strip,
.context-bar-container {
  padding-top: 0;
  padding-bottom: 0;
}

.context-bar-card {
  position: sticky;
  top: 70px;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  margin-bottom: 4px;
  padding: 8px 12px;
  border: 1px solid rgba(168, 199, 58, 0.16);
  border-radius: 16px;
  background: rgba(8, 14, 10, 0.84);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
}

.context-bar-card-admin {
  border-color: rgba(7, 178, 86, 0.16);
  background: rgba(7, 15, 11, 0.86);
}

.context-pill {
  border-radius: 16px;
  padding: 9px;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
}

.context-bar-title {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.1;
  color: var(--text-primary);
}

.context-bar-meta {
  margin: 0;
  text-align: right;
  font-size: 0.95rem;
  line-height: 1.1;
  color: var(--text-primary);
}

.workspace-nav-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}

.workspace-switcher-trigger {
  min-width: 210px;
  padding: 8px;
  border: 1px solid rgba(168, 199, 58, 0.16);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
  color: var(--text-primary);
  display: inline-grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  cursor: pointer;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.16);
  transition: transform 0.24s var(--ease-out), border-color 0.24s var(--ease-out), box-shadow 0.24s var(--ease-out), background 0.24s var(--ease-out);
}

.workspace-switcher-trigger:hover {
  transform: translateY(-1px);
  border-color: rgba(168, 199, 58, 0.3);
}

.workspace-switcher-trigger[aria-expanded='true'] {
  border-color: rgba(168, 199, 58, 0.36);
  background: linear-gradient(180deg, rgba(168, 199, 58, 0.12), rgba(255, 255, 255, 0.03));
}

.workspace-switcher-meta {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.workspace-switcher-trigger strong {
  font-size: 0.92rem;
  line-height: 1.1;
}

.workspace-switcher-caret {
  font-size: 1rem;
  color: var(--accent-gold);
  transition: transform 0.24s var(--ease-out);
}

.workspace-switcher-trigger[aria-expanded='true'] .workspace-switcher-caret {
  transform: rotate(180deg);
}

.workspace-switcher-panel {
  display: none;
  margin-top: 14px;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid rgba(168, 199, 58, 0.14);
  background: linear-gradient(180deg, rgba(8, 14, 10, 0.92), rgba(8, 14, 10, 0.84));
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.2);
}

.workspace-switcher-panel.active {
  display: block;
}

.workspace-switcher-note {
  margin-bottom: 12px;
  font-size: 0.8rem;
  line-height: 1.45;
}

.lane-bar {
  display: flex;
  flex-direction: column;
  margin-bottom: 4px;
  padding: 6px;
  border-radius: 14px;
}

.subtabs {
  display: flex;
  gap: 8px;
  margin: 0;
  padding-bottom: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.subtabs::-webkit-scrollbar {
  display: none;
}

.subtab {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid rgba(168, 199, 58, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.22s var(--ease-out), background 0.22s var(--ease-out), color 0.22s var(--ease-out), transform 0.22s var(--ease-out);
}

.subtab:hover {
  transform: translateY(-1px);
  border-color: rgba(168, 199, 58, 0.26);
}

.subtab.active {
  background: linear-gradient(135deg, rgba(168, 199, 58, 0.22), rgba(255, 255, 255, 0.06));
  color: var(--text-primary);
  border-color: rgba(168, 199, 58, 0.32);
}

.subtab-panel {
  display: none;
}

.subtab-panel.active {
  display: block;
  animation: fade-rise 0.26s var(--ease-out);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fade-rise 0.3s var(--ease-out);
}

.floating-nav-shell {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  width: min(620px, calc(100% - 20px));
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px;
  border-radius: 24px;
  border: 1px solid rgba(168, 199, 58, 0.18);
  background: rgba(7, 12, 9, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.28);
  z-index: 180;
  scrollbar-width: none;
}

body[data-role='manager'] .floating-nav-shell {
  border-color: rgba(168, 199, 58, 0.22);
  background: linear-gradient(180deg, rgba(8, 14, 10, 0.94), rgba(9, 18, 13, 0.88));
}

body[data-role='admin'] .floating-nav-shell {
  border-color: rgba(7, 178, 86, 0.2);
  background: linear-gradient(180deg, rgba(6, 13, 10, 0.95), rgba(8, 17, 13, 0.88));
}

.floating-nav-shell::-webkit-scrollbar {
  height: 4px;
}
.floating-nav-shell::-webkit-scrollbar-track {
  background: transparent;
}
.floating-nav-shell::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.floating-nav-btn {
  flex: 0 0 auto;
  min-width: 92px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.22s var(--ease-out), background 0.22s var(--ease-out), color 0.22s var(--ease-out), border-color 0.22s var(--ease-out);
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
}

.floating-nav-icon {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-size: 0.9rem;
  flex: 0 0 auto;
}

.floating-nav-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.floating-nav-label {
  color: var(--text-primary);
  font-size: 0.78rem;
  line-height: 1.05;
}

.floating-nav-caption {
  color: var(--text-secondary);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1;
  margin-top: 2px;
}

.floating-nav-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(168, 199, 58, 0.24);
}

.floating-nav-btn.active {
  color: #041008;
}

body[data-role='manager'] .floating-nav-btn.active {
  background: linear-gradient(135deg, var(--accent-gold), #d6f06f);
  color: #041008;
  border-color: rgba(214, 240, 111, 0.42);
  box-shadow: 0 10px 22px rgba(168, 199, 58, 0.18);
}

body[data-role='admin'] .floating-nav-btn.active {
  background: linear-gradient(135deg, rgba(7, 178, 86, 0.98), rgba(78, 227, 146, 0.92));
  color: #041008;
  border-color: rgba(78, 227, 146, 0.38);
  box-shadow: 0 10px 22px rgba(7, 178, 86, 0.22);
}

.floating-nav-btn.active .floating-nav-icon {
  background: rgba(4, 16, 8, 0.16);
  color: #041008;
}

.floating-nav-btn.active .floating-nav-label,
.floating-nav-btn.active .floating-nav-caption {
  color: #041008;
}

/* Glassmorphic Cards */
.card {
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-card);
  transition: transform 0.28s var(--ease-out), box-shadow 0.28s var(--ease-out), border-color 0.28s var(--ease-out), background 0.28s var(--ease-out);
  animation: fade-rise 0.34s var(--ease-out);
}

.brand-shell {
  position: relative;
  z-index: 1;
}

.brand-logo {
  width: 96px;
  height: 96px;
  object-fit: contain;
  margin: 0 auto 18px;
  display: block;
  filter: drop-shadow(0 0 18px rgba(168, 199, 58, 0.22));
}

.brand-title {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

.card-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.notification-feed {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(168, 199, 58, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  min-height: 100px;
}

.notification-item {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(168, 199, 58, 0.12);
}

.notification-item-info {
  border-color: rgba(56, 189, 248, 0.18);
}

.notification-item-success {
  border-color: rgba(74, 222, 128, 0.18);
}

.notification-item-danger {
  border-color: rgba(239, 68, 68, 0.18);
}

.notification-meta {
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: 0.82rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 12px 20px;
  border-radius: var(--border-radius);
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.22s var(--ease-out), box-shadow 0.22s var(--ease-out), background 0.22s var(--ease-out), border-color 0.22s var(--ease-out), opacity 0.22s var(--ease-out);
  width: 100%;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.btn:active {
  transform: scale(0.98);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, #11c768 0%, #07b256 100%);
  color: #000;
  border: none;
  box-shadow: 0 8px 22px rgba(7, 178, 86, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #25d874 0%, #059347 100%);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-warning {
  background: linear-gradient(135deg, #b7d43e 0%, #d7ee72 100%);
  color: #000;
  border: none;
  box-shadow: 0 8px 22px rgba(168, 199, 58, 0.18);
}

.btn-success {
  background: linear-gradient(135deg, #53e49a 0%, #34c379 100%);
  color: #fff;
  border: none;
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.form-control {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px 13px;
  border-radius: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px rgba(0, 210, 255, 0.2);
}

select.form-control {
}

/* Navbar */
.navbar {
  background: rgba(13, 24, 17, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  padding: calc(14px + env(safe-area-inset-top, 0px)) 20px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  left: 0;
  right: 0;
  top: 0;
  z-index: 9999;
}

.nav-brand-block {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.nav-title {
  font-weight: 800;
  font-size: 1.22rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-title span {
  color: var(--accent-blue);
}

.nav-subtitle {
  color: var(--text-secondary);
  font-size: 0.78rem;
  max-width: 440px;
  line-height: 1.35;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.nav-icon-btn,
.nav-utility-btn {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.24s var(--ease-out), background 0.24s var(--ease-out), border-color 0.24s var(--ease-out), box-shadow 0.24s var(--ease-out);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav-icon-btn:hover,
.nav-utility-btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.05));
  border-color: rgba(168, 199, 58, 0.32);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.nav-utility-btn {
  width: auto;
  padding: 0 12px;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 600;
}

#workspaceNavBtn {
  border-color: rgba(168, 199, 58, 0.24);
  background: linear-gradient(180deg, rgba(168, 199, 58, 0.13), rgba(255, 255, 255, 0.04));
}

#workspaceNavBtn:hover,
#workspaceNavBtn[aria-expanded='true'] {
  border-color: rgba(168, 199, 58, 0.36);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.action-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: min(260px, 82vw);
  background: rgba(8, 14, 10, 0.98);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.32);
  padding: 10px;
  display: none;
  flex-direction: column;
  gap: 8px;
  z-index: 250;
}

.action-menu-panel.active {
  display: flex;
}

.action-menu-item {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  padding: 12px 14px;
  text-align: left;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), background 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}

.action-menu-item:hover {
  background: rgba(168, 199, 58, 0.1);
  border-color: rgba(168, 199, 58, 0.22);
  transform: translateX(2px);
}

.hero-shell {
  position: relative;
  z-index: 1;
  margin-bottom: -4px;
  transition: transform 0.28s var(--ease-out), opacity 0.28s var(--ease-out);
}

.hero-card {
  background:
    radial-gradient(circle at top right, rgba(168, 199, 58, 0.14), transparent 34%),
    linear-gradient(145deg, rgba(12, 24, 17, 0.94), rgba(6, 11, 8, 0.96));
  border: 1px solid rgba(168, 199, 58, 0.18);
  border-radius: 18px;
  padding: 11px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
  overflow: hidden;
  position: relative;
  animation: fade-rise 0.42s var(--ease-out);
  transition: padding 0.28s var(--ease-out), border-radius 0.28s var(--ease-out), gap 0.28s var(--ease-out), transform 0.28s var(--ease-out), box-shadow 0.28s var(--ease-out);
}

.hero-card::after {
  content: '';
  position: absolute;
  right: -18%;
  bottom: -38%;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(168, 199, 58, 0.18), rgba(168, 199, 58, 0));
  pointer-events: none;
  animation: glow-breath 5.8s ease-in-out infinite;
}

.hero-card-admin {
  background:
    radial-gradient(circle at top right, rgba(7, 178, 86, 0.18), transparent 34%),
    linear-gradient(145deg, rgba(11, 21, 15, 0.94), rgba(5, 9, 7, 0.98));
}

.hero-copy h1 {
  font-size: 1.16rem;
  line-height: 1.1;
  margin: 2px 0 2px;
  max-width: 14ch;
  transition: font-size 0.28s var(--ease-out), margin 0.28s var(--ease-out), max-width 0.28s var(--ease-out);
}

.hero-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  transition: gap 0.28s var(--ease-out), opacity 0.28s var(--ease-out), max-height 0.28s var(--ease-out);
}

.hero-stat {
  padding: 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  min-height: 52px;
  transition: min-height 0.28s var(--ease-out), padding 0.28s var(--ease-out), border-radius 0.28s var(--ease-out);
}

.hero-stat strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 2px;
}

.hero-stat span {
  color: var(--text-secondary);
  font-size: 0.7rem;
}

.mini-overview-card {
  background:
    radial-gradient(circle at top left, rgba(168, 199, 58, 0.14), transparent 36%),
    linear-gradient(145deg, rgba(12, 24, 17, 0.9), rgba(7, 12, 9, 0.96));
  border: 1px solid rgba(168, 199, 58, 0.16);
  border-radius: 14px;
  padding: 10px;
  box-shadow: var(--shadow-card);
}

.mini-overview-card-admin {
  background:
    radial-gradient(circle at top left, rgba(7, 178, 86, 0.14), transparent 36%),
    linear-gradient(145deg, rgba(9, 18, 13, 0.94), rgba(5, 10, 8, 0.98));
}

.mini-overview-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 2px;
}

.mini-metric {
  padding: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mini-metric strong {
  font-size: 1rem;
}

.mini-metric span {
  color: var(--text-secondary);
  font-size: 0.74rem;
}

.mini-overview-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.mini-overview-card .card-header {
  margin-bottom: 4px;
}

.mini-overview-card .card-header h3 {
  font-size: 0.98rem;
}

.context-bar-title {
  text-align: right;
  font-size: 0.88rem;
  line-height: 1.05;
  color: var(--text-primary);
}

.context-bar-meta {
  flex: 0 0 auto;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.nav-subtitle {
  font-size: 0.82rem;
  line-height: 1.25;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.permission-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.permission-option input {
  accent-color: var(--accent-color);
}

.image-preview-box {
  min-height: 120px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 0.78rem;
}

.image-preview-box img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.mini-overview-actions .btn {
  width: auto;
  min-width: 0;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  transition: opacity 0.24s var(--ease-out), max-height 0.24s var(--ease-out), transform 0.24s var(--ease-out), margin 0.24s var(--ease-out);
}

.hero-actions .btn {
  width: auto;
  min-width: 0;
}

body.hero-condensed .hero-container {
  padding-top: 0;
  padding-bottom: 0;
}

body.hero-condensed .hero-card {
  padding: 10px 11px;
  border-radius: 16px;
  gap: 6px;
}

body.hero-condensed .hero-copy h1 {
  font-size: 0.9rem;
  margin: 2px 0 0;
  max-width: none;
}

body.hero-condensed .hero-copy .section-note,
body.hero-condensed .hero-copy .pill {
  display: none;
}

body.hero-condensed .hero-stat-grid {
  gap: 5px;
}

body.hero-condensed .hero-stat {
  min-height: 46px;
  padding: 7px;
  border-radius: 12px;
}

body.hero-condensed .hero-stat strong {
  font-size: 1rem;
}

body.hero-condensed .hero-stat span {
  font-size: 0.7rem;
}

body.hero-condensed .hero-actions {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transform: translateY(-6px);
  margin-top: -6px;
  pointer-events: none;
}

.back-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: none;
}

/* Grids */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

/* Value displays */
.stat-box {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0.18));
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-blue);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.76);
  backdrop-filter: blur(5px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: linear-gradient(180deg, rgba(13,24,17,0.98), rgba(8,14,10,0.98));
  border: 1px solid var(--border-color);
  width: 90%;
  max-width: 500px;
  border-radius: 18px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 30px 80px rgba(0,0,0,0.42);
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: var(--bg-secondary);
  z-index: 10;
}

.modal-body {
  padding: 20px;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* List Items */
.list-item {
  padding: 16px 4px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  transition: transform 0.2s var(--ease-out), background 0.2s var(--ease-out);
}

.list-item:hover {
  transform: translateX(2px);
  background: rgba(255, 255, 255, 0.02);
}

.list-item:last-child {
  border-bottom: none;
}

/* Tabs */
.tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  max-width: none;
}
.tab {
  appearance: none;
  padding: 14px 16px;
  color: var(--text-secondary);
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
  text-align: center;
  font-weight: 600;
  min-width: 0;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.tab.active {
  color: #041008;
  background: linear-gradient(135deg, var(--accent-gold), #d6f06f);
  border-color: rgba(214, 240, 111, 0.45);
  box-shadow: 0 10px 22px rgba(168, 199, 58, 0.18);
}

.tab:hover {
  transform: translateY(-1px);
  border-color: rgba(168, 199, 58, 0.22);
}
.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}

.tab-content.active > :first-child,
.subtab-panel.active > :first-child {
  margin-top: 0;
}

.tab-content > h2.mb-1,
.tab-content > h3.mb-1,
.tab-content > p.text-secondary.mb-2 {
  margin-top: 0;
}

/* Utility */
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-1 { gap: 10px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.w-100 { width: 100%; }
.d-block { display: block; }
.flex-wrap { flex-wrap: wrap; }
.border-top { border-top: 1px solid var(--border-color); }
.pt-1 { padding-top: 10px; }
.ml-1 { margin-left: 10px; }
.mb-0 { margin-bottom: 0; }
.align-start { align-items: flex-start; }
.align-end { align-items: flex-end; }

.insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.insight-tile {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.22s var(--ease-out), border-color 0.22s var(--ease-out);
}

.insight-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(168, 199, 58, 0.24);
}

.pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 210, 255, 0.12);
  color: var(--accent-blue);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pill-warning {
  background: rgba(255, 183, 3, 0.14);
  color: var(--accent-gold);
}

.pill-danger {
  background: rgba(239, 35, 60, 0.16);
  color: #ff7582;
}

.section-note {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.focus-band {
  position: relative;
  overflow: hidden;
}

.focus-band::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent-gold), rgba(168, 199, 58, 0));
}

.meta-line {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  font-size: 0.75rem;
  color: var(--text-primary);
  backdrop-filter: blur(6px);
}

.lan-host-row {
  align-items: center;
  justify-content: space-between;
}

.lan-host-meta {
  flex: 1 1 180px;
  min-width: 0;
}

.lan-host-badge {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.lan-host-idle {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.1);
}

.lan-host-searching {
  background: rgba(243, 188, 46, 0.16);
  border-color: rgba(243, 188, 46, 0.28);
  color: #f3bc2e;
}

.lan-host-hosting {
  background: rgba(7, 178, 86, 0.18);
  border-color: rgba(7, 178, 86, 0.34);
  color: #7ff0a7;
}

.lan-host-remote {
  background: rgba(58, 134, 255, 0.18);
  border-color: rgba(58, 134, 255, 0.3);
  color: #9dc2ff;
}

.card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.card-actions .btn {
  width: auto;
  padding: 8px 12px;
  font-size: 0.8rem;
}

.media-thumb {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: transform 0.22s var(--ease-out), border-color 0.22s var(--ease-out), box-shadow 0.22s var(--ease-out);
}

.media-thumb:hover {
  transform: scale(1.04);
  border-color: rgba(168, 199, 58, 0.34);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.inventory-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.inventory-card-body {
  flex: 1;
  min-width: 0;
}

.inventory-qty {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-gold);
  margin-top: 4px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid transparent;
}

.status-planning {
  background: rgba(255, 183, 3, 0.12);
  color: var(--accent-gold);
  border-color: rgba(255, 183, 3, 0.22);
}

.status-in-progress {
  background: rgba(0, 210, 255, 0.12);
  color: var(--accent-blue);
  border-color: rgba(0, 210, 255, 0.22);
}

.status-testing {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.12);
}

/* QR Code Display */
#qrCodeContainer {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 14px;
  border: 1px solid var(--border-color);
  margin: 12px 0;
}

#qrCodeContainer canvas {
  border-radius: 12px;
  border: 2px solid var(--border-color);
  padding: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.qr-code-display {
  text-align: center;
  padding: 16px 0;
}

/* Dashboard Styles */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

@media (min-width: 640px) {
  .metrics-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.metric-card {
  background: linear-gradient(135deg, rgba(255,179,71,0.08) 0%, rgba(255,179,71,0.03) 100%);
  border: 1px solid rgba(255,179,71,0.15);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  transition: transform 0.22s var(--ease-out), border-color 0.22s var(--ease-out);
}

.metric-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,179,71,0.28);
}

.metric-value {
  font-size: 1.8rem;
  font-weight: 600;
  color: #ffb347;
  margin: 8px 0;
}

.metric-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-indicator {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}

.status-ok {
  background-color: #4caf50;
  box-shadow: 0 0 8px rgba(76, 175, 80, 0.4);
}

.status-warning {
  background-color: #ffb347;
  box-shadow: 0 0 8px rgba(255, 179, 71, 0.4);
}

.status-error {
  background-color: #ffb4a2;
  box-shadow: 0 0 8px rgba(255, 180, 162, 0.4);
}

.host-info-card {
  background: linear-gradient(135deg, rgba(255,179,71,0.1) 0%, rgba(255,179,71,0.04) 100%);
  border: 1px solid rgba(255,179,71,0.2);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,179,71,0.1);
  gap: 12px;
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  flex: 0 0 auto;
}

.info-value {
  color: var(--text-primary);
  font-size: 0.9rem;
  word-break: break-all;
  text-align: right;
  flex: 1;
  text-overflow: ellipsis;
}

.sync-queue-item {
  background: rgba(255, 179, 71, 0.08);
  border-left: 3px solid #ffb347;
  padding: 12px 16px;
  margin-bottom: 8px;
  border-radius: 6px;
  font-size: 0.85rem;
  line-height: 1.4;
}

.queue-empty {
  color: #4caf50;
  font-style: italic;
  padding: 16px;
  text-align: center;
}

.refresh-btn {
  display: inline-block;
  margin-top: 16px;
}

.text-gold {
  color: var(--accent-gold);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.status-completed {
  background: rgba(42, 157, 143, 0.16);
  color: #7ef0e1;
  border-color: rgba(42, 157, 143, 0.28);
}

.modal-preview {
  min-height: 20px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.modal-preview img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

.report-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.report-card {
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  transition: transform 0.22s var(--ease-out), border-color 0.22s var(--ease-out), background 0.22s var(--ease-out);
}

.report-card:hover {
  transform: translateY(-2px);
  border-color: rgba(168, 199, 58, 0.26);
  background: rgba(255, 255, 255, 0.05);
}

.history-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border-color);
}

.history-item:last-child {
  border-bottom: none;
}

.attention-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.attention-card {
  border-radius: 16px;
  padding: 15px;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  transition: transform 0.22s var(--ease-out), border-color 0.22s var(--ease-out), box-shadow 0.22s var(--ease-out);
}

.attention-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(0,0,0,0.18);
}

.attention-card strong {
  font-size: 0.98rem;
}

.attention-card-warning {
  background: rgba(168, 199, 58, 0.08);
  border-color: rgba(168, 199, 58, 0.22);
}

.attention-card-danger {
  background: rgba(239, 90, 90, 0.08);
  border-color: rgba(239, 90, 90, 0.22);
}

.attention-card-neutral {
  background: rgba(255, 255, 255, 0.03);
}

.attention-card .btn {
  width: auto;
  align-self: flex-start;
  padding: 8px 12px;
  font-size: 0.78rem;
}

.quick-find-results {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 50vh;
  overflow: auto;
}

.quick-find-item {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  padding: 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.22s var(--ease-out), background 0.22s var(--ease-out), border-color 0.22s var(--ease-out), box-shadow 0.22s var(--ease-out);
}

.quick-find-item:hover {
  transform: translateY(-2px);
  background: rgba(168, 199, 58, 0.08);
  border-color: rgba(168, 199, 58, 0.28);
  box-shadow: 0 12px 28px rgba(0,0,0,0.18);
}

.quick-find-title {
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
}

.quick-find-meta {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.quick-find-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(7, 178, 86, 0.14);
  color: var(--accent-blue);
  font-size: 0.72rem;
  white-space: nowrap;
}

.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 6, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 2000;
  overflow-y: auto;
}

.auth-card {
  width: min(100%, 420px);
  padding: 28px;
  border-radius: 22px;
  background: rgba(10, 23, 15, 0.96);
  border: 1px solid var(--border-color);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
}

.auth-card .brand-logo {
  width: 88px;
  height: 88px;
}

.auth-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.auth-row .btn {
  width: auto;
}

.form-textarea {
  min-height: 90px;
  resize: vertical;
}

.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.stack-gap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.progress-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border-color);
}

.checklist-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border-color);
}

.checklist-toggle {
  position: relative;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.checklist-toggle input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.checklist-toggle span {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 1px solid rgba(168, 199, 58, 0.3);
  background: rgba(255, 255, 255, 0.04);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.checklist-toggle input:checked + span {
  background: linear-gradient(135deg, var(--accent-gold), #d6f06f);
  border-color: transparent;
}

.checklist-toggle input:checked + span::after {
  content: '✓';
  color: #041008;
  font-weight: 800;
}

.checklist-remove-btn {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  cursor: pointer;
}

.scorecard,
.approval-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--border-color);
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.02));
}

.approval-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.approval-card-danger {
  border-color: rgba(239, 90, 90, 0.28);
  background: linear-gradient(180deg, rgba(239, 90, 90, 0.08), rgba(255,255,255,0.02));
}

.approval-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.scorecard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

/* Invetory Styles */
.inv-thumb {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    border: 1px solid var(--border-color);
}
.inv-thumb:hover {
    border-color: var(--accent-blue);
}
.inv-thumb-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    border: 1px dashed var(--border-color);
}

.table tbody tr {
  transition: background 0.18s var(--ease-out), transform 0.18s var(--ease-out);
}

.table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

@keyframes fade-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }

@keyframes glow-breath {
  0%,
  100% {
    transform: scale(0.96);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.04);
    opacity: 0.9;
  }
}
/* Print Styles */
@media print {
    body * { visibility: hidden; }
    #reportModal, #reportModal *, #reportContent, #reportContent * { visibility: visible; }
    #reportModal { position: absolute; left: 0; top: 0; display: block !important; width: 100%; height: auto; }
    #reportContent { width: 100%; border: none; padding: 0 !important; }
    .no-print { display: none !important; }
    .modal-overlay { background: none; backdrop-filter: none; position: static; }
    .modal-content { max-width: 100% !important; border: none !important; box-shadow: none !important; }
}

    @media (max-width: 640px) {
      .container {
        padding: 8px 10px 112px;
      }

      .hero-container,
      .overview-strip,
      .workspace-nav-container,
      .context-bar-container {
        padding-top: 0;
        padding-bottom: 0;
      }

      .grid-2,
      .insight-grid,
      .report-grid,
      .attention-grid {
        grid-template-columns: 1fr;
      }

      .hero-stat-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 4px;
      }

      .navbar {
        gap: 10px;
        align-items: center;
        flex-direction: row;
        padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 10px;
      }

      .nav-brand-block {
        gap: 2px;
      }

      .nav-title {
        font-size: 1.04rem;
      }

      .nav-subtitle {
        font-size: 0.68rem;
        line-height: 1.2;
      }

      .nav-actions {
        gap: 8px;
        flex-wrap: nowrap;
        width: auto;
        margin-left: auto;
      }

      .lane-bar {
        margin-bottom: 4px;
        padding: 0;
      }

      .hero-card {
        padding: 8px;
        border-radius: 14px;
        gap: 6px;
      }

      .hero-card::after {
        width: 160px;
        height: 160px;
        right: -20%;
        bottom: -48%;
      }

      .hero-copy .pill {
        display: none;
      }

      .hero-copy h1 {
        max-width: none;
        font-size: 0.82rem;
        margin: 0;
      }

      .hero-stat {
        min-height: 36px;
        padding: 6px;
        border-radius: 10px;
      }

      .hero-stat strong {
        font-size: 0.82rem;
        margin-bottom: 1px;
      }

      .hero-stat span {
        font-size: 0.54rem;
        line-height: 1.12;
      }

      .card {
        padding: 10px;
      }

      .hero-actions .btn {
        width: auto;
        flex: 1 1 0;
        padding: 10px 8px;
        font-size: 0.76rem;
      }

      .mini-overview-card .section-note {
        display: none;
      }

      .mini-overview-card {
        padding: 8px;
        border-radius: 12px;
      }

      .mini-overview-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 4px;
      }

      .mini-metric {
        padding: 6px;
        min-height: 0;
        gap: 2px;
      }

      .permission-grid {
        grid-template-columns: 1fr;
      }

      .permission-option {
        min-height: 42px;
        padding: 9px 10px;
      }

      .image-preview-box,
      .image-preview-box img {
        min-height: 96px;
        height: 96px;
      }

      .mini-metric strong {
        font-size: 0.78rem;
      }

      .mini-metric span {
        font-size: 0.54rem;
        line-height: 1.1;
      }

      .mini-overview-actions {
        gap: 4px;
        margin-top: 4px;
      }

      .mini-overview-actions .btn {
        min-width: 0;
        flex: 1 1 0;
        padding: 7px 6px;
        font-size: 0.64rem;
      }

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

      .tab {
        min-width: 0;
        min-height: 58px;
        padding: 12px;
      }

      .workspace-switcher-trigger {
        width: 100%;
        min-width: 0;
      }

      #workspaceNavBtn {
        order: -1;
      }

      .workspace-nav-copy .section-note {

      body[data-role='employee'] .card {
        margin-bottom: 10px;
      }

      body[data-role='employee'] .card-header {
        margin-bottom: 8px;
      }

      body[data-role='employee'] .card-header h2,
      body[data-role='employee'] .card-header h3 {
        font-size: 0.98rem;
      }

      body[data-role='employee'] .section-note {
        font-size: 0.68rem;
        line-height: 1.2;
      }


      .nav-subtitle {
        padding: 8px 10px;
      }

      .floating-nav-shell {
        font-size: 0.98rem;
        bottom: calc(8px + env(safe-area-inset-bottom, 0px));
        padding: 8px;
        border-radius: 18px;
      }

      .floating-nav-btn {
        min-width: 84px;
        padding: 9px 10px;
        width: 38px;
        height: 38px;
        border-radius: 12px;
        width: 24px;
        height: 24px;
        border-radius: 9px;
        font-size: 0.78rem;
        padding: 0 8px;

      .floating-nav-label {
      .hero-stat-grid {
        gap: 3px;

      .floating-nav-caption {
      .hero-stat strong {
        font-size: 0.76rem;

      .lane-bar {
      .hero-stat span,
      .mini-metric span {
        font-size: 0.5rem;
      }

      .mini-overview-card .card-header h3 {
        font-size: 0.9rem;
      }

      .mini-overview-actions .btn {
        font-size: 0.6rem;
      }

      .subtab {
        padding: 8px 12px;
        font-size: 0.74rem;
      }

      body.hero-condensed .hero-copy h1 {
        font-size: 0.84rem;
      }

      body.hero-condensed .hero-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    @media (max-width: 420px) {
      .navbar {
        padding: calc(12px + env(safe-area-inset-top, 0px)) 14px 12px;
      }

      .nav-title {
        font-size: 1.08rem;
      }

      .nav-subtitle {
        font-size: 0.72rem;
      }

      .nav-icon-btn,
      .nav-utility-btn {
        width: 40px;
        height: 40px;
        border-radius: 13px;
      }

      .nav-utility-btn {
        width: auto;
        padding: 0 10px;
      }

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

      .mini-overview-actions .btn {
        width: 100%;
      }

      .hero-actions {
        gap: 8px;
      }

      .progress-strip,
      .approval-card {
        flex-direction: column;
        align-items: flex-start;
      }

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

      .quick-find-item {
        padding: 13px 14px;
      }

      .section-header-row,
      .inventory-card {
        flex-direction: column;
      }
    }

@media (prefers-reduced-motion: reduce) {
    html:focus-within {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* --- AUTH SYSTEM --- */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: rgba(4, 7, 5, 0.92);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fade-in 0.4s var(--ease-out);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 32px;
  padding: 40px 30px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
  text-align: center;
  animation: fade-rise 0.5s var(--ease-out);
}

.auth-row {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.auth-overlay .brand-logo {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 20px rgba(168, 199, 58, 0.3));
}

/* --- TAB SYSTEM --- */
.tab-content {
  display: none !important;
}

.tab-content.active {
  display: block !important;
  animation: fade-rise 0.32s var(--ease-out);
}

.subtab-panel {
  display: none !important;
}

.subtab-panel.active {
  display: block !important;
  animation: fade-rise 0.28s var(--ease-out);
}

/* --- AI PREMIUM UI --- */
.v-bar {
    animation: v-bounce 0.5s ease-in-out infinite alternate;
}
.v-bar:nth-child(2) { animation-delay: 0.1s; }
.v-bar:nth-child(3) { animation-delay: 0.2s; }
@keyframes v-bounce {
    from { height: 10px; opacity: 0.5; }
    to { height: 40px; opacity: 1; }
}

.stage-icon-btn {
    transition: transform 0.2s, background 0.2s;
}
.stage-icon-btn:active {
    transform: scale(0.9);
}

#brainCenter .subtab.active {
    background: linear-gradient(135deg, #a8c73a, #8da62e);
    color: #050907;
    border-color: rgba(168, 199, 58, 0.4);
}

#factoryChat .card {
    box-shadow: inset 0 0 50px rgba(16, 185, 129, 0.05);
}

.rule-note {
    font-size: 0.8rem;
    padding: 8px 12px;
    background: rgba(168, 199, 58, 0.05);
    border-left: 3px solid var(--accent-gold);
    margin-bottom: 8px;
    color: var(--text-secondary);
}

/* Kanban Board Styles */
.kanban-board {
    display: flex;
    overflow-x: auto;
    gap: 16px;
    padding-bottom: 16px;
    align-items: flex-start;
}
.kanban-column {
    flex: 0 0 280px;
    background: #1a1d21;
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #333;
}
.kanban-column-header {
    font-weight: 600;
    color: var(--accent-gold);
    margin-bottom: 12px;
    text-transform: uppercase;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
}
.kanban-card {
    background: #22252a;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 10px;
    cursor: grab;
    transition: transform 0.2s, box-shadow 0.2s;
}
.kanban-card:active {
    cursor: grabbing;
}
.kanban-card.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}
.kanban-column.drag-over {
    background: #22252a;
    border: 1px dashed var(--accent-gold);
}