$surface: #ffffff;
$border: #e2e8f0;
$primary: #1b64f2;
$danger: #e11d48;
$text: #0f172a;
$muted: #6b7280;

:host {
  display: block;
}

.security-section {
  margin: 1.5rem auto;
  max-width: 900px;
  background: $surface;
  border-radius: 24px;
  padding: 2rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

.section-header {
  margin-bottom: 1.25rem;

  h2 {
    margin: 0;
    color: $text;
  }

  p {
    margin: 0.25rem 0 0;
    color: $muted;
  }
}

.card {
  border: 1px solid $border;
  border-radius: 20px;
  padding: 1.5rem;
  background: linear-gradient(160deg, rgba(247, 250, 255, 0.8), #fff);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.security-status {
  p {
    margin: 0.2rem 0;
    color: $text;
  }

  .status-enabled {
    color: #059669;
  }

  .status-disabled {
    color: $danger;
  }
}

.info-text {
  margin: 1rem 0;
  color: $muted;
}

.security-actions {
  display: flex;
  gap: 0.75rem;
}

.primary-button,
.danger-button,
.secondary-button {
  border-radius: 14px;
  padding: 0.75rem 1.5rem;
  border: none;
  font-weight: 600;
  cursor: pointer;
}

.primary-button {
  background: linear-gradient(135deg, #1b64f2, #7b5bff);
  color: #fff;
  box-shadow: 0 15px 25px rgba(27, 100, 242, 0.25);
}

.danger-button {
  background: rgba($danger, 0.12);
  color: $danger;
}

.secondary-button {
  background: rgba(15, 23, 42, 0.07);
  color: $text;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
}

.modal-content {
  background: #fff;
  border-radius: 24px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem;
  box-shadow: 0 40px 80px rgba(15, 23, 42, 0.25);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;

  h2 {
    margin: 0;
  }
}

.modal-close {
  border: none;
  background: rgba(15, 23, 42, 0.08);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.modal-instructions {
  margin: 1rem 0;
  color: $muted;
}

.qr-code-container {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;

  .qr-code-image {
    width: 200px;
    height: 200px;
    border: 1px solid $border;
    border-radius: 12px;
    padding: 0.75rem;
    background: #fff;
  }
}

.secret-key-container {
  background: rgba(27, 100, 242, 0.08);
  border-radius: 14px;
  padding: 0.75rem;
  margin-bottom: 1rem;

  .secret-key {
    display: inline-block;
    font-weight: 700;
    letter-spacing: 0.2rem;
  }
}

.code-input-container {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;

  .code-input {
    border: 1px solid $border;
    border-radius: 12px;
    padding: 0.65rem;
    font-size: 1.2rem;
    text-align: center;
    letter-spacing: 0.4rem;
  }
}

.backup-codes-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.5rem;

  code {
    padding: 0.5rem;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.08);
    text-align: center;
    font-weight: 700;
  }
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
}

