/*
 * ============================================================
 * BRILL VAULT DESKTOP OS V4
 * SECURITY CENTER
 * Desktop-only production workspace
 * ============================================================
 */

#bvSecurityCenter {
  --sc-panel: rgba(12, 19, 31, .92);
  --sc-panel-2: rgba(15, 24, 39, .96);

  --sc-line: rgba(132, 154, 190, .105);
  --sc-line-blue: rgba(73, 132, 226, .28);

  --sc-text: #eff3f8;
  --sc-muted: #718097;
  --sc-dim: #526178;

  --sc-blue: #4b87e8;
  --sc-green: #55d5a6;
  --sc-gold: #d5ad60;
  --sc-red: #dd737e;

  display: grid;

  gap: 17px;

  color: var(--sc-text);
}


/* ============================================================
   HEADER
   ============================================================ */

.bvsc-header {
  display: flex;

  align-items: flex-end;

  justify-content: space-between;

  min-height: 82px;

  gap: 24px;
}

.bvsc-heading {
  display: grid;

  gap: 4px;
}

.bvsc-kicker {
  margin: 0;

  color: #6f92c6;

  font-size: 8px;

  font-weight: 850;

  letter-spacing: .19em;

  text-transform: uppercase;
}

.bvsc-heading h1 {
  margin: 0;

  color: #f3f6fa;

  font-size: 31px;

  font-weight: 780;

  letter-spacing: -.035em;
}

.bvsc-heading p:last-child {
  margin: 2px 0 0;

  color: var(--sc-muted);

  font-size: 11px;
}

.bvsc-header-actions {
  display: flex;

  align-items: center;

  gap: 8px;
}

.bvsc-chip {
  display: inline-flex;

  align-items: center;

  gap: 7px;

  min-height: 34px;

  padding: 0 11px;

  border: 1px solid var(--sc-line);

  border-radius: 9px;

  background: rgba(13, 21, 34, .68);

  color: #78879d;

  font-size: 8px;

  font-weight: 800;

  letter-spacing: .07em;
}

.bvsc-chip.protected {
  border-color: rgba(74, 191, 147, .16);

  background: rgba(49, 124, 95, .055);

  color: #8dc5ae;
}

.bvsc-chip.protected::before {
  content: "";

  width: 6px;

  height: 6px;

  border-radius: 50%;

  background: var(--sc-green);

  box-shadow:
    0 0 11px
    rgba(85, 213, 166, .5);
}

.bvsc-refresh {
  min-height: 34px !important;

  padding: 0 13px !important;

  border-radius: 9px !important;

  font-size: 9px !important;
}


/* ============================================================
   SUMMARY
   ============================================================ */

.bvsc-summary {
  display: grid;

  grid-template-columns:
    repeat(4, minmax(0, 1fr));

  overflow: hidden;

  border: 1px solid var(--sc-line);

  border-radius: 15px;

  background:
    linear-gradient(
      145deg,
      rgba(13, 21, 34, .91),
      rgba(8, 14, 23, .92)
    );
}

.bvsc-stat {
  display: grid;

  align-content: center;

  min-height: 85px;

  gap: 5px;

  padding: 15px 18px;

  border-right:
    1px solid var(--sc-line);
}

.bvsc-stat:last-child {
  border-right: 0;
}

.bvsc-stat span {
  color: #606f86;

  font-size: 8px;

  font-weight: 750;

  letter-spacing: .08em;

  text-transform: uppercase;
}

.bvsc-stat strong {
  overflow: hidden;

  color: #edf1f7;

  font-size: 20px;

  font-weight: 760;

  text-overflow: ellipsis;

  white-space: nowrap;
}

.bvsc-stat.safe strong {
  color: #8bc8ae;
}

.bvsc-stat.tfa strong.enabled {
  color: #8bc8ae;
}

.bvsc-stat.tfa strong.disabled {
  color: #d4a768;
}


/* ============================================================
   MAIN SECURITY WORKSPACE
   ============================================================ */

.bvsc-workspace {
  display: grid;

  grid-template-columns:
    minmax(560px, 1fr)
    365px;

  align-items: start;

  gap: 14px;
}


/* ============================================================
   SESSION MONITOR
   ============================================================ */

.bvsc-session-panel {
  min-height: 520px;

  overflow: hidden;

  border: 1px solid var(--sc-line);

  border-radius: 17px;

  background:
    linear-gradient(
      145deg,
      rgba(12, 19, 31, .91),
      rgba(8, 14, 23, .93)
    );
}

.bvsc-panel-head {
  display: flex;

  align-items: center;

  justify-content: space-between;

  min-height: 55px;

  gap: 16px;

  padding: 0 17px;

  border-bottom:
    1px solid var(--sc-line);
}

.bvsc-panel-title {
  display: grid;

  gap: 2px;
}

.bvsc-panel-title strong {
  color: #e4eaf2;

  font-size: 10px;

  font-weight: 780;
}

.bvsc-panel-title span {
  color: #59687f;

  font-size: 8px;
}

.bvsc-session-list {
  display: grid;

  gap: 6px;

  padding: 10px;
}

.bvsc-session {
  display: grid;

  grid-template-columns:
    43px
    minmax(0, 1fr)
    auto;

  align-items: center;

  min-height: 82px;

  gap: 12px;

  padding: 11px 12px;

  border: 1px solid transparent;

  border-radius: 12px;

  background:
    rgba(22, 33, 51, .24);

  transition: .15s ease;
}

.bvsc-session:hover {
  border-color:
    rgba(126, 150, 188, .10);

  background:
    rgba(36, 54, 83, .12);
}

.bvsc-session.current {
  border-color:
    rgba(71, 130, 223, .24);

  background:
    linear-gradient(
      90deg,
      rgba(43, 84, 151, .17),
      rgba(27, 43, 68, .055)
    );

  box-shadow:
    inset 3px 0 0
    var(--sc-blue);
}

.bvsc-device-icon {
  display: grid;

  width: 40px;

  height: 40px;

  place-items: center;

  border:
    1px solid
    rgba(79, 127, 202, .16);

  border-radius: 11px;

  background:
    rgba(44, 83, 145, .085);

  color: #7da5e2;

  font-size: 14px;

  font-weight: 800;
}

.bvsc-session-copy {
  display: grid;

  min-width: 0;

  gap: 4px;
}

.bvsc-session-copy strong {
  overflow: hidden;

  color: #e6ebf3;

  font-size: 11px;

  font-weight: 760;

  text-overflow: ellipsis;

  white-space: nowrap;
}

.bvsc-session-copy small {
  overflow: hidden;

  color: #647289;

  font-size: 8px;

  text-overflow: ellipsis;

  white-space: nowrap;
}

.bvsc-session-meta {
  display: grid;

  justify-items: end;

  gap: 5px;
}

.bvsc-session-badge {
  display: inline-flex;

  align-items: center;

  min-height: 23px;

  padding: 0 8px;

  border:
    1px solid
    rgba(129, 151, 185, .11);

  border-radius: 999px;

  color: #68768c;

  font-size: 7px;

  font-weight: 800;

  letter-spacing: .05em;
}

.bvsc-session.current
.bvsc-session-badge {
  border-color:
    rgba(79, 191, 148, .16);

  color: #8bc4ad;
}

.bvsc-session-meta small {
  color: #536178;

  font-size: 7px;
}


/* ============================================================
   SECURITY POSTURE
   ============================================================ */

.bvsc-posture {
  position: sticky;

  top: 83px;

  min-height: 520px;

  overflow: hidden;

  border: 1px solid var(--sc-line);

  border-radius: 17px;

  background:
    linear-gradient(
      150deg,
      rgba(15, 24, 39, .96),
      rgba(8, 14, 23, .98)
    );

  box-shadow:
    0 22px 55px
    rgba(0, 0, 0, .15);
}

.bvsc-posture-head {
  display: grid;

  gap: 6px;

  padding: 19px;

  border-bottom:
    1px solid var(--sc-line);
}

.bvsc-posture-head small {
  color: #6889ba;

  font-size: 8px;

  font-weight: 850;

  letter-spacing: .15em;

  text-transform: uppercase;
}

.bvsc-posture-head h2 {
  margin: 0;

  color: #f1f4f9;

  font-size: 20px;

  font-weight: 770;

  letter-spacing: -.025em;
}

.bvsc-posture-section {
  display: grid;

  gap: 11px;

  padding: 17px 19px;

  border-bottom:
    1px solid var(--sc-line);
}

.bvsc-section-label {
  color: #53647d;

  font-size: 8px;

  font-weight: 850;

  letter-spacing: .15em;

  text-transform: uppercase;
}

.bvsc-posture-row {
  display: flex;

  align-items: center;

  justify-content: space-between;

  min-height: 27px;

  gap: 18px;
}

.bvsc-posture-row span {
  color: #68768c;

  font-size: 9px;
}

.bvsc-posture-row strong {
  color: #dce3ed;

  font-size: 9px;

  font-weight: 720;

  text-align: right;
}

.bvsc-positive {
  color: #8bc7ae !important;
}

.bvsc-warning {
  color: #d6ad65 !important;
}


/* Score */

.bvsc-score {
  display: grid;

  gap: 10px;
}

.bvsc-score-line {
  display: flex;

  align-items: flex-end;

  justify-content: space-between;
}

.bvsc-score-line strong {
  color: #edf2f8;

  font-size: 27px;

  font-weight: 650;

  letter-spacing: -.04em;
}

.bvsc-score-line span {
  color: #607086;

  font-size: 8px;
}

.bvsc-score-track {
  height: 6px;

  overflow: hidden;

  border-radius: 999px;

  background:
    rgba(115, 137, 169, .10);
}

.bvsc-score-fill {
  width:
    calc(var(--score) * 1%);

  height: 100%;

  border-radius: inherit;

  background:
    linear-gradient(
      90deg,
      #3b7bd9,
      #68a3f3
    );
}


/* Actions */

.bvsc-posture-actions {
  display: grid;

  gap: 8px;

  padding: 17px 19px;
}

.bvsc-action {
  min-height: 39px;

  border:
    1px solid
    rgba(77, 132, 223, .21);

  border-radius: 10px;

  background:
    rgba(44, 83, 147, .10);

  color: #a7c3ef;

  cursor: pointer;

  font: inherit;

  font-size: 9px;

  font-weight: 760;

  transition: .15s ease;
}

.bvsc-action:hover {
  border-color:
    rgba(77, 132, 223, .36);

  background:
    rgba(48, 91, 161, .17);

  color: #dceaff;
}


/* ============================================================
   ADVANCED / EXISTING PRODUCTION CONTROLS
   ============================================================ */

.bvsc-advanced {
  overflow: hidden;

  border:
    1px solid var(--sc-line);

  border-radius: 17px;

  background:
    rgba(10, 16, 26, .82);
}

.bvsc-advanced > summary {
  display: flex;

  align-items: center;

  justify-content: space-between;

  min-height: 58px;

  padding: 0 17px;

  color: #cbd5e2;

  cursor: pointer;

  font-size: 10px;

  font-weight: 760;

  list-style: none;

  user-select: none;
}

.bvsc-advanced > summary::-webkit-details-marker {
  display: none;
}

.bvsc-advanced > summary::after {
  content: "+";

  color: #6f91c4;

  font-size: 17px;

  font-weight: 400;
}

.bvsc-advanced[open]
> summary::after {
  content: "−";
}

.bvsc-advanced[open]
> summary {
  border-bottom:
    1px solid var(--sc-line);
}

.bvsc-advanced-copy {
  display: grid;

  gap: 2px;
}

.bvsc-advanced-copy small {
  color: #56657b;

  font-size: 8px;

  font-weight: 500;
}

.bvsc-legacy {
  display: grid;

  gap: 14px;

  padding: 14px;
}


/*
 * Keep existing production security controls functional.
 * Only harmonize them with Desktop OS.
 */

.bvsc-legacy .panel,
.bvsc-legacy article,
.bvsc-legacy [class*="security-card"],
.bvsc-legacy [class*="two-factor"],
.bvsc-legacy [class*="session"] {
  border-color:
    rgba(128, 151, 186, .10) !important;

  box-shadow:
    none !important;
}


/* ============================================================
   EMPTY / ERROR
   ============================================================ */

.bvsc-empty {
  display: grid;

  min-height: 230px;

  place-items: center;

  padding: 30px;

  color: #66758b;

  font-size: 10px;

  text-align: center;
}

.bvsc-error {
  color: #cf8088;
}


/* ============================================================
   FOOTER
   ============================================================ */

.bvsc-footer {
  display: flex;

  align-items: center;

  justify-content: space-between;

  min-height: 35px;

  padding: 0 3px;

  color: #4f5e73;

  font-size: 8px;
}

.bvsc-footer-left,
.bvsc-footer-right {
  display: flex;

  align-items: center;

  gap: 11px;
}

.bvsc-footer-dot {
  width: 5px;

  height: 5px;

  border-radius: 50%;

  background: var(--sc-green);
}


/* ============================================================
   DESKTOP RESOLUTIONS
   ============================================================ */

@media (max-width: 1450px) {

  .bvsc-workspace {
    grid-template-columns:
      minmax(500px, 1fr)
      340px;
  }

}

@media (max-width: 1250px) {

  .bvsc-workspace {
    grid-template-columns:
      minmax(450px, 1fr)
      315px;
  }

}
