:root {
  --ink: #17231f;
  --muted: #718079;
  --green: #0c805b;
  --green-dark: #123c2e;
  --lime: #c8f36a;
  --bg: #f4f7f5;
  --line: #e4ebe7;
  --white: #fff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.5 Inter, Arial, sans-serif;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 238px;
  background: #10251f;
  color: white;
  padding: 26px 18px;
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px 30px;
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 20px;
}

.sidebar-top .brand {
  padding: 0;
}

.mobile-close-btn {
  display: none;
  background: rgba(255, 255, 255, 0.12);
  border: 0;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.mobile-close-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 24, 20, 0.65);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.sidebar-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.brandmark {
  width: 38px;
  height: 38px;
  background: var(--lime);
  color: #163326;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 21px;
  font-weight: 900;
}

.brand b {
  display: block;
  font-size: 12px;
  letter-spacing: 1px;
}

.brand small {
  color: #9bb5a8;
  font-size: 9px;
  letter-spacing: 2px;
}

.workspace-switch {
  display: grid;
  gap: 7px;
  margin: 0 2px 22px;
}

.workspace-btn {
  border: 1px solid #355548;
  background: #18372c;
  color: #bcd0c5;
  border-radius: 8px;
  padding: 10px;
  text-align: left;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.workspace-btn:hover {
  background: #1f4738;
  color: #fff;
}

.workspace-btn.active {
  background: var(--lime);
  color: #173326;
  border-color: var(--lime);
}

.sidebar nav,
.sidebar-nav {
  display: grid;
  gap: 8px;
}

.nav {
  border: 0;
  background: transparent;
  color: #b7c9c1;
  text-align: left;
  padding: 13px 12px;
  border-radius: 9px;
  font: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
}

.nav.active,
.nav:hover {
  background: #24483a;
  color: white;
}

.sidefoot {
  margin-top: auto;
  color: #94afa2;
  font-size: 10px;
  line-height: 2;
  letter-spacing: 1px;
  padding: 12px 6px;
}

.sidefoot b {
  color: white;
  font-size: 13px;
}

main {
  margin-left: 238px;
  padding: 28px 36px;
  max-width: 1600px;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  gap: 16px;
}

.header-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
}

.header-left {
  flex: 1;
}

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

.mobile-menu-btn {
  display: none;
  background: #18372c;
  border: 1px solid #355548;
  color: white;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 0;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.mobile-menu-btn:hover,
.mobile-menu-btn:active {
  background: #244e3f;
  transform: scale(0.96);
}

.mobile-menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--lime);
  border-radius: 2px;
  transition: all 0.2s ease;
}

.eyebrow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--green);
}

h1 {
  font-size: 25px;
  margin: 4px 0 0;
}

h2 {
  font-size: 25px;
  margin: 5px 0;
}

h3 {
  font-size: 15px;
  margin: 0 0 4px;
}

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

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e1a33a;
  display: inline-block;
}

.live-dot.connected {
  background: #19a875;
}

.live-dot.local {
  background: #e1a33a;
}

.live-dot.error {
  background: #e04b4b;
}

.muted,
.panel-head p,
.section-intro p {
  color: var(--muted);
  font-size: 12px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.welcome {
  background: linear-gradient(110deg, #123c2e, #0c805b);
  border-radius: 15px;
  color: white;
  padding: 25px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.welcome h2 {
  font-size: 23px;
}

.welcome p {
  color: #d2e8dd;
  margin-bottom: 0;
}

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

.grid-welcome {
  background: linear-gradient(110deg, #123c2e, #0c805b);
  border-radius: 15px;
  color: white;
  padding: 25px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.gridloop-mark {
  font-size: 24px;
  font-weight: 900;
  color: var(--lime);
  background: rgba(200, 243, 106, 0.12);
  border: 1px solid rgba(200, 243, 106, 0.35);
  border-radius: 12px;
  padding: 8px 14px;
  letter-spacing: 1px;
  display: inline-block;
  text-align: center;
}

.pale {
  color: #c9ef9d;
}

.btn {
  border: 0;
  border-radius: 8px;
  padding: 10px 15px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}

.btn.primary {
  background: var(--green);
  color: white;
}

.btn.primary:hover {
  background: #096b4c;
}

.btn.light {
  background: #e9f0ec;
  color: #284638;
}

.btn.light:hover {
  background: #dbe7df;
}

.btn.white {
  background: white;
  color: #14563d;
}

.btn.white:hover {
  background: #f0f7f3;
}

.sheet-btn {
  background: #e5f5ed;
  color: #0c805b;
  font-weight: 700;
  border: 1px solid #c2e5d0;
}

.sheet-btn:hover {
  background: #d0edd9;
  color: #086144;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.stat,
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.stat strong {
  display: block;
  font-size: 28px;
  margin: 7px 0 0;
}

.stat strong i {
  font-size: 13px;
  color: #87958e;
  font-style: normal;
  font-weight: 500;
}

.stat small {
  color: #829088;
  font-size: 10px;
}

.grid {
  display: grid;
  gap: 15px;
}

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

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}

.panel-head p {
  margin: 3px 0 0;
}

.pill {
  background: #f0f8e4;
  color: #587c26;
  padding: 5px 9px;
  border-radius: 20px;
  font-size: 10px;
}

.chart-wrap {
  height: 250px;
  position: relative;
}

.lower {
  margin-top: 15px;
}

.score-row {
  display: grid;
  grid-template-columns: 1.5fr 2fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.score-row:last-child {
  border: 0;
}

.bar {
  height: 7px;
  border-radius: 10px;
  background: #edf2ef;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  background: #18a576;
  border-radius: 10px;
}

.score-val {
  font-weight: 800;
}

.activity-list {
  display: grid;
  gap: 0;
}

.activity-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

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

.activity-item small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}

.empty {
  padding: 25px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.section-intro {
  margin: 8px 0 17px;
}

.section-intro h2 {
  font-size: 22px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 16px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #53645b;
}

.wide {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #dce5df;
  border-radius: 7px;
  padding: 10px 11px;
  background: white;
  color: var(--ink);
  font: 13px Arial, sans-serif;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #3aa47e;
  box-shadow: 0 0 0 3px #e5f5ed;
}

textarea {
  resize: vertical;
}

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

.table-panel {
  margin-top: 16px;
}

.table-scroll {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 760px;
  text-align: left;
}

th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #87938d;
  background: #f7faf8;
}

td,
th {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}

td {
  color: #43544b;
}

.tag {
  padding: 4px 8px;
  border-radius: 20px;
  background: #edf7f1;
  color: #16724f;
  font-size: 10px;
}

.tag.pending {
  background: #fff5df;
  color: #9b6c12;
}

.tag.rejected {
  background: #fdecec;
  color: #a83d3d;
}

.search {
  max-width: 220px;
}

.review-summary {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 15px;
}

.review-summary strong {
  font-size: 30px;
  color: var(--green);
}

.review-summary p {
  font-size: 11px;
  color: var(--muted);
}

.settings-panel {
  margin-bottom: 15px;
}

.settings-panel > p {
  color: var(--muted);
  font-size: 12px;
  max-width: 850px;
}

.settings-panel label {
  margin: 15px 0 8px;
}

.notice {
  margin-top: 18px;
  padding: 14px;
  background: #f0f7f2;
  border-radius: 8px;
  color: #486255;
  font-size: 12px;
  line-height: 1.6;
}

.notice b {
  color: #1a4230;
}

.sheet-link-box {
  background: #edf7f1;
  border: 1px solid #c2e5d0;
  border-radius: 8px;
  padding: 12px 16px;
  margin: 14px 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.sheet-link-box .sheet-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.sheet-link-box .sheet-info b {
  color: #144933;
}

.sheet-link-box a {
  font-weight: 700;
  color: var(--green);
  text-decoration: underline;
}

.settings-actions-card {
  background: #f7faf8;
  border: 1px solid #dce8e1;
  border-radius: 12px;
  padding: 18px 20px;
  margin: 16px 0 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.settings-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e3ede7;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 13px;
  color: #173326;
}

.settings-buttons-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.settings-buttons-row .btn {
  padding: 11px 18px;
  font-size: 12px;
  border-radius: 8px;
}

.target-list p {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
  font-size: 12px;
}

.target-list span {
  color: var(--green);
  font-weight: 700;
}

.funnel-list {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.funnel-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
  font-size: 12px;
}

.funnel-row b {
  color: var(--green);
}

footer {
  text-align: center;
  color: #9aa69f;
  font-size: 10px;
  padding: 28px;
}

@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: 290px;
    max-width: 86vw;
    height: 100vh;
    padding: 22px 18px;
    background: #10251f;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.45);
    transform: translateX(105%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    display: block;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .mobile-close-btn {
    display: flex;
  }

  main {
    margin-left: 0;
    padding: 20px 16px;
    max-width: 100%;
  }

  header {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    margin-bottom: 20px;
  }

  .header-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .header-actions {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .stat {
    padding: 14px;
  }

  .stat strong {
    font-size: 24px;
  }

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

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

  .wide {
    grid-column: auto;
  }

  /* 16px font-size prevents mobile Safari/Chrome from zooming on input focus */
  input,
  select,
  textarea {
    font-size: 16px;
    padding: 11px 12px;
  }

  .welcome,
  .grid-welcome {
    align-items: flex-start;
    gap: 14px;
    flex-direction: column;
    padding: 20px 18px;
  }

  .welcome h2 {
    font-size: 20px;
  }

  .welcome-actions {
    width: 100%;
    justify-content: space-between;
  }

  .chart-wrap {
    height: 220px;
  }

  .score-row {
    grid-template-columns: 1fr auto;
    gap: 6px;
  }

  .score-row .bar {
    grid-column: 1 / -1;
    margin: 4px 0;
  }

  .table-scroll {
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    border: 1px solid var(--line);
  }

  .review-summary {
    flex-wrap: wrap;
    gap: 8px;
  }

  .review-summary p {
    width: 100%;
  }
}

@media (max-width: 500px) {
  main {
    padding: 16px 12px;
  }

  h1 {
    font-size: 20px;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .stat {
    padding: 12px 10px;
  }

  .stat strong {
    font-size: 20px;
  }

  .header-actions {
    gap: 6px;
  }

  .btn {
    padding: 8px 12px;
    font-size: 11px;
  }
}

/* ========================================================= */
/* LOGIN SCREEN & AUTHENTICATION                             */
/* ========================================================= */
body.locked > aside,
body.locked > main,
body.locked > #sidebarBackdrop {
  display: none !important;
}

body.locked {
  background: #081510;
  overflow: hidden;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(circle at 50% 25%, #153c2f 0%, #0d231b 50%, #07130e 100%);
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.login-screen.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: #0f241d;
  border: 1px solid rgba(200, 243, 106, 0.22);
  border-radius: 20px;
  padding: 38px 32px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), 0 0 50px rgba(12, 128, 91, 0.2);
  color: #fff;
  animation: loginCardPop 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes loginCardPop {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.login-card.shake {
  animation: loginShake 0.4s ease;
}

@keyframes loginShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.login-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.login-brandmark {
  width: 44px;
  height: 44px;
  background: var(--lime);
  color: #123c2e;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 900;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(200, 243, 106, 0.3);
}

.login-brand-text b {
  display: block;
  font-size: 15px;
  letter-spacing: 0.8px;
  color: #ffffff;
}

.login-brand-text small {
  display: block;
  font-size: 10px;
  letter-spacing: 1.2px;
  color: #8faea2;
}

.login-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(200, 243, 106, 0.08);
  border: 1px solid rgba(200, 243, 106, 0.22);
  color: var(--lime);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.login-badge .badge-dot {
  width: 7px;
  height: 7px;
  background: var(--lime);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--lime);
}

.login-intro h2 {
  font-size: 22px;
  margin: 0 0 6px;
  color: #ffffff;
  font-weight: 700;
}

.login-intro p {
  font-size: 13px;
  color: #9cb5aa;
  margin: 0 0 24px;
  line-height: 1.5;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-field label {
  font-size: 12px;
  font-weight: 600;
  color: #d1ded8;
  letter-spacing: 0.3px;
}

.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrapper .input-icon {
  position: absolute;
  left: 14px;
  font-size: 14px;
  pointer-events: none;
  opacity: 0.7;
}

.password-input-wrapper input {
  width: 100%;
  background: #081813;
  border: 1.5px solid #1f4234;
  border-radius: 10px;
  padding: 13px 46px 13px 40px;
  font-size: 15px;
  color: #ffffff;
  transition: all 0.2s ease;
  font-family: inherit;
}

.password-input-wrapper input:focus {
  outline: none;
  border-color: var(--lime);
  box-shadow: 0 0 0 3px rgba(200, 243, 106, 0.2);
  background: #091f18;
}

.password-input-wrapper input::placeholder {
  color: #587569;
}

.toggle-password-btn {
  position: absolute;
  right: 10px;
  background: transparent;
  border: 0;
  color: #8faea2;
  cursor: pointer;
  padding: 6px 8px;
  font-size: 16px;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}

.toggle-password-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.remember-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #b0c6bc;
  cursor: pointer;
  user-select: none;
}

.remember-label input[type="checkbox"] {
  accent-color: var(--lime);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.login-error {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.4;
}

.login-submit-btn {
  width: 100%;
  background: var(--lime);
  color: #0f271e;
  border: none;
  border-radius: 10px;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 4px;
  box-shadow: 0 4px 16px rgba(200, 243, 106, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.login-submit-btn:hover {
  background: #d4f785;
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(200, 243, 106, 0.35);
}

.login-submit-btn:active {
  transform: translateY(0);
}

.login-submit-btn.success {
  background: #10b981;
  color: #ffffff;
}

.login-footer {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.login-footer p {
  margin: 0;
  font-size: 11px;
  color: #6d897d;
  letter-spacing: 0.3px;
}

/* Sidebar lock button */
.sidebar-lock-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #c4d7ce;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 12px;
}

.sidebar-lock-btn:hover {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

@media (max-width: 480px) {
  .login-card {
    padding: 28px 20px;
    border-radius: 16px;
  }
  .login-intro h2 {
    font-size: 19px;
  }
  .password-input-wrapper input {
    font-size: 16px; /* prevent iOS auto-zoom */
  }
}

/* ========================================================= */
/* SECURITY CONTROLS & PRIVACY SHIELD                        */
/* ========================================================= */
.security-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.security-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8faf9;
  border: 1px solid var(--line);
  padding: 12px 14px;
  border-radius: 10px;
}

.security-item-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.security-item b {
  display: block;
  font-size: 13px;
  color: var(--ink);
}

.security-item small {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.security-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: #e6f4ea;
  color: #137333;
  flex-shrink: 0;
}

.security-toggle-btn {
  margin-left: auto;
  font-size: 11px;
  padding: 6px 11px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.security-toggle-btn.active {
  background: #0c805b !important;
  color: #ffffff !important;
  border-color: #0c805b !important;
  font-weight: 700;
}

.masked-pii {
  letter-spacing: 0.5px;
  font-family: monospace;
  color: #556b62;
  background: rgba(12, 128, 91, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
}

@media (max-width: 768px) {
  .security-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================================= */
/* WORKSPACE BRAND LOGOS & TAGS                              */
/* ========================================================= */

/* Login workspace tags */
.login-workspace-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(200, 243, 106, 0.2);
  padding: 8px 16px;
  border-radius: 12px;
  margin-bottom: 22px;
}

.login-tag {
  display: flex;
  align-items: center;
  gap: 8px;
}

.login-tag.trigga img {
  height: 20px;
  width: auto;
  max-width: 90px;
  object-fit: contain;
}

.login-tag.gridloop {
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.login-tag.gridloop img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.login-tag-divider {
  color: rgba(200, 243, 106, 0.4);
  font-size: 10px;
}

/* Sidebar Brand Boxes */
.sidebar-brand-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-brand-logo.trigga {
  height: 32px;
  width: auto;
  max-width: 145px;
  object-fit: contain;
}

.sidebar-brand-logo.gridloop {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.sidebar-brand-box b {
  display: block;
  font-size: 13px;
  letter-spacing: 1px;
  color: #fff;
}

.sidebar-brand-box small {
  color: #9bb5a8;
  font-size: 9px;
  letter-spacing: 1.5px;
}

/* Workspace Switcher Button Logos */
.workspace-btn {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ws-btn-logo.trigga {
  height: 15px;
  width: auto;
  max-width: 46px;
  object-fit: contain;
  transition: filter 0.15s ease;
}

.ws-btn-logo.gridloop {
  width: 15px;
  height: 15px;
  object-fit: contain;
  transition: filter 0.15s ease;
}

.workspace-btn.active .ws-btn-logo {
  filter: brightness(0);
}

/* Header Brand Badge */
.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-brand-badge {
  background: #10251f;
  border: 1px solid rgba(200, 243, 106, 0.25);
  border-radius: 10px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-badge-img.trigga {
  height: 22px;
  width: auto;
  max-width: 85px;
  object-fit: contain;
}

.header-badge-img.gridloop {
  height: 20px;
  width: 20px;
  object-fit: contain;
}

.header-badge-gridloop {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--lime);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.8px;
}

/* View Tag Pill on Page Section Intros */
.view-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #10251f;
  color: #ffffff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  border: 1px solid rgba(200, 243, 106, 0.25);
  margin-bottom: 8px;
}

.view-tag-pill .pill-logo.trigga {
  height: 14px;
  width: auto;
  max-width: 60px;
  object-fit: contain;
}

.view-tag-pill .pill-logo.gridloop {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

/* Welcome Hero Cards Logo Badges */
.welcome-logo-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(16, 37, 31, 0.45);
  border: 1px solid rgba(200, 243, 106, 0.3);
  border-radius: 12px;
  padding: 8px 16px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.hero-trigga-img {
  height: 34px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
}

.hero-gridloop-img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.gridloop-hero-badge span {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--lime);
}

@media (max-width: 640px) {
  .header-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
